diff --git a/package.json b/package.json index 70fb7c4f5..d0662c783 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "punycode": "^2.3.1", "qrcode": "^1.5.4", "react": "^19.2.8", - "react-aria-components": "^1.19.0", "react-dom": "^19.2.8", "react-error-boundary": "^6.1.2", "react-resizable-panels": "^4.12.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a111a113..0ee4d89d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,9 +143,6 @@ importers: react: specifier: ^19.2.8 version: 19.2.8 - react-aria-components: - specifier: ^1.19.0 - version: 1.19.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) react-dom: specifier: ^19.2.8 version: 19.2.8(react@19.2.8) @@ -1621,15 +1618,6 @@ packages: '@types/node': optional: true - '@internationalized/date@3.12.2': - resolution: {integrity: sha512-FY1Y+H64NDs+HAF6omlnWxm3mEpfgaCSWtL5l551ZZfImA+kGjPFgrnJrGjH6lfmLL0g8Z/mBu1R3kufeCp6Jw==} - - '@internationalized/number@3.6.7': - resolution: {integrity: sha512-3ji1fcrT+FPAK86UqEhB/psHixYo6niWPJtt7+qRaYFynt/BaJG8GhAPimtWUpEiVSTq8ZM8L5psMxGquiB/Vg==} - - '@internationalized/string@3.2.9': - resolution: {integrity: sha512-kzP/M/mbQxODlmOt4bIQZ2SBVUWUSqMLXooXixnX7noche8WHaQcA+nwFN1K2KCF/cp+LDUhcJsCicwkvhD1pg==} - '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -2215,11 +2203,6 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@react-types/shared@3.36.0': - resolution: {integrity: sha512-DkP/H0C2YjjS7gZWKNqOmU8a16qHPjQNdzMwmTq9SzplM6Iw0kVMTZ0OIoe6FOgGqa+FwMsE2QbPjh/n3g/jXQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - '@redis/bloom@5.12.1': resolution: {integrity: sha512-PUUfv+ms7jgPSBVoo/DN4AkPHj4D5TZSd6SbJX7egzBplkYUcKmHRE8RKia7UtZ8bSQbLguLvxVO+asKtQfZWA==} engines: {node: '>= 18.19.0'} @@ -5039,18 +5022,6 @@ packages: rc9@3.0.1: resolution: {integrity: sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==} - react-aria-components@1.19.0: - resolution: {integrity: sha512-2smSS5nqJ8cGYMQezuUXveZm7eMyHCqTN6mDpylQBYLYbdF5dxCCuW1DHn1VKLe1DybSfPvX/cZtJlDmvFfn8A==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - react-aria@3.50.0: - resolution: {integrity: sha512-S0Os6QZk33fzUAKu1QLT9afoUaCBt1ZNdoiq0n2YMVgKIdNIQS8zxiZ8O9hYE6QyDkHKjD6q39LQZ+qaSAIgjw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-day-picker@9.14.0: resolution: {integrity: sha512-tBaoDWjPwe0M5pGrum4H0SR6Lyk+BO9oHnp9JbKpGKW2mlraNPgP9BMfsg5pWpwrssARmeqk7YBl2oXutZTaHA==} engines: {node: '>=18'} @@ -5118,11 +5089,6 @@ packages: react: ^16.8.0 || 17.x || 18.x react-dom: ^16.8.0 || 17.x || 18.x - react-stately@3.48.0: - resolution: {integrity: sha512-ImicSAG+lTotAe5izcs1fz49Zk48w7pDusqYg04WaPhCoej8BJ24soMu3iLXIrsi273s4P1gZrYGrqReMfgEEA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-style-singleton@2.2.3: resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} engines: {node: '>=10'} @@ -7136,18 +7102,6 @@ snapshots: optionalDependencies: '@types/node': 26.1.2 - '@internationalized/date@3.12.2': - dependencies: - '@swc/helpers': 0.5.23 - - '@internationalized/number@3.6.7': - dependencies: - '@swc/helpers': 0.5.23 - - '@internationalized/string@3.2.9': - dependencies: - '@swc/helpers': 0.5.23 - '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -7704,10 +7658,6 @@ snapshots: react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - '@react-types/shared@3.36.0(react@19.2.8)': - dependencies: - react: 19.2.8 - '@redis/bloom@5.12.1(@redis/client@5.12.1)': dependencies: '@redis/client': 5.12.1 @@ -10552,31 +10502,6 @@ snapshots: defu: 6.1.7 destr: 2.0.5 - react-aria-components@1.19.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8): - dependencies: - '@internationalized/date': 3.12.2 - '@react-types/shared': 3.36.0(react@19.2.8) - '@swc/helpers': 0.5.23 - client-only: 0.0.1 - react: 19.2.8 - react-aria: 3.50.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - react-dom: 19.2.8(react@19.2.8) - react-stately: 3.48.0(react@19.2.8) - - react-aria@3.50.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8): - dependencies: - '@internationalized/date': 3.12.2 - '@internationalized/number': 3.6.7 - '@internationalized/string': 3.2.9 - '@react-types/shared': 3.36.0(react@19.2.8) - '@swc/helpers': 0.5.23 - aria-hidden: 1.2.6 - clsx: 2.1.1 - react: 19.2.8 - react-dom: 19.2.8(react@19.2.8) - react-stately: 3.48.0(react@19.2.8) - use-sync-external-store: 1.6.0(react@19.2.8) - react-day-picker@9.14.0(react@19.2.8): dependencies: '@date-fns/tz': 1.5.0 @@ -10640,16 +10565,6 @@ snapshots: react-dom: 19.2.8(react@19.2.8) topojson-client: 3.1.0 - react-stately@3.48.0(react@19.2.8): - dependencies: - '@internationalized/date': 3.12.2 - '@internationalized/number': 3.6.7 - '@internationalized/string': 3.2.9 - '@react-types/shared': 3.36.0(react@19.2.8) - '@swc/helpers': 0.5.23 - react: 19.2.8 - use-sync-external-store: 1.6.0(react@19.2.8) - react-style-singleton@2.2.3(@types/react@19.2.17)(react@19.2.8): dependencies: get-nonce: 1.0.1 diff --git a/src/app/(main)/SideNav.tsx b/src/app/(main)/SideNav.tsx index c06958781..c0ca1297b 100644 --- a/src/app/(main)/SideNav.tsx +++ b/src/app/(main)/SideNav.tsx @@ -2,7 +2,6 @@ import { Button, type ButtonProps, Column, - Focusable, Icon, Row, Text, @@ -111,22 +110,21 @@ export function SideNav(props: any) { {links.map(({ id, path, label, icon }) => { const isSelected = pathname.startsWith(renderUrl(path, false)); const content = ( - - - - - + + + ); return ( diff --git a/src/app/(main)/admin/AdminNav.tsx b/src/app/(main)/admin/AdminNav.tsx index ef6170ee6..d03391021 100644 --- a/src/app/(main)/admin/AdminNav.tsx +++ b/src/app/(main)/admin/AdminNav.tsx @@ -1,4 +1,4 @@ -import { Column, Focusable, Row, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import { Column, Row, Tooltip, TooltipTrigger } from '@umami/react-zen'; import { IconLabel } from '@/components/common/IconLabel'; import Link from '@/components/common/Link'; import { NavMenu } from '@/components/common/NavMenu'; @@ -49,16 +49,15 @@ export function AdminNav({ onItemClick }: { onItemClick?: () => void }) { - - - } label={t(labels.back)} padding /> - - + + } label={t(labels.back)} padding /> + {t(labels.back)} diff --git a/src/app/(main)/boards/[boardId]/BoardComponentSelect.tsx b/src/app/(main)/boards/[boardId]/BoardComponentSelect.tsx index b0f1a3965..c1fa5fde4 100644 --- a/src/app/(main)/boards/[boardId]/BoardComponentSelect.tsx +++ b/src/app/(main)/boards/[boardId]/BoardComponentSelect.tsx @@ -1,13 +1,4 @@ -import { - Button, - Column, - Focusable, - ListItem, - Row, - Select, - Text, - TextField, -} from '@umami/react-zen'; +import { Button, Column, ListItem, Row, Select, Text, TextField } from '@umami/react-zen'; import { useEffect, useMemo, useState } from 'react'; import { useApi, useMessages } from '@/components/hooks'; import { LinkSelect } from '@/components/input/LinkSelect'; @@ -465,34 +456,34 @@ export function BoardComponentSelect({ const Icon = def.icon; return ( - - handleSelectComponent(def)} - > - - - - {def.name} - - - {def.description} - - - - + handleSelectComponent(def)} + > + + + + {def.name} + + + {def.description} + + + ); })} diff --git a/src/app/(main)/settings/SettingsNav.tsx b/src/app/(main)/settings/SettingsNav.tsx index 6c9cd25d4..3dd2d384e 100644 --- a/src/app/(main)/settings/SettingsNav.tsx +++ b/src/app/(main)/settings/SettingsNav.tsx @@ -1,4 +1,4 @@ -import { Column, Focusable, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import { Column, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; import { IconLabel } from '@/components/common/IconLabel'; import Link from '@/components/common/Link'; import { useMessages, useNavigation } from '@/components/hooks'; @@ -60,16 +60,15 @@ export function SettingsNav({ {(() => { const content = ( - - - } label={isCollapsed ? '' : t(labels.back)} padding /> - - + + } label={isCollapsed ? '' : t(labels.back)} padding /> + ); return isCollapsed ? ( @@ -92,22 +91,21 @@ export function SettingsNav({ {sectionItems.map(({ id, path, label, icon }) => { const isSelected = selectedKey === id; const content = ( - - - - - + + + ); return ( diff --git a/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx b/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx index 55c442ad2..45fc58c0b 100644 --- a/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx +++ b/src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx @@ -1,4 +1,4 @@ -import { Column, Focusable, Icon, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import { Column, Icon, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; import classNames from 'classnames'; import { useMemo, useState } from 'react'; import { firstBy } from 'thenby'; @@ -232,9 +232,7 @@ export function Journey({ websiteId, steps, startStep, endStep, view }: JourneyP
{formatLongNumber(nodeCount)}
) : ( - -
{formatLongNumber(nodeCount)}
-
+
{formatLongNumber(nodeCount)}
{`${dropped}% ${t(labels.dropoff)}`} diff --git a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx index 7c0b9058c..bc12d74b1 100644 --- a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx +++ b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx @@ -1,4 +1,4 @@ -import { Column, Focusable, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import { Column, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; import { IconLabel } from '@/components/common/IconLabel'; import Link from '@/components/common/Link'; import { useMessages, useNavigation, useWebsiteNavItems } from '@/components/hooks'; @@ -22,16 +22,15 @@ export function WebsiteNav({ {isCollapsed ? ( - - - } label="" padding /> - - + + } label="" padding /> + {t(labels.back)} ) : ( @@ -58,22 +57,21 @@ export function WebsiteNav({ {isCollapsed ? ( - - - - - + + + {label} ) : ( diff --git a/src/app/share/[slug]/[[...path]]/ShareNav.tsx b/src/app/share/[slug]/[[...path]]/ShareNav.tsx index 66be78d3a..2389989c9 100644 --- a/src/app/share/[slug]/[[...path]]/ShareNav.tsx +++ b/src/app/share/[slug]/[[...path]]/ShareNav.tsx @@ -1,7 +1,6 @@ import { Button, Column, - Focusable, Icon, Row, Text, @@ -179,22 +178,17 @@ export function ShareNav({ {collapsed ? ( - - - - - + + + {label} ) : ( diff --git a/src/components/input/NavButton.tsx b/src/components/input/NavButton.tsx deleted file mode 100644 index 2e7b599b3..000000000 --- a/src/components/input/NavButton.tsx +++ /dev/null @@ -1,138 +0,0 @@ -import { - Column, - Icon, - Menu, - MenuItem, - MenuSection, - MenuSeparator, - MenuTrigger, - Popover, - Pressable, - Row, - SubmenuTrigger, - Text, -} from '@umami/react-zen'; -import { ArrowRight } from 'lucide-react'; -import type { Key } from 'react'; -import { IconLabel } from '@/components/common/IconLabel'; -import { useLoginQuery, useMessages, useMobile, useNavigation } from '@/components/hooks'; -import { ChevronRight, User, Users } from '@/components/icons'; -import { Switch } from '@/components/svg'; -import { LAST_TEAM_CONFIG } from '@/lib/constants'; -import { removeItem } from '@/lib/storage'; - -export interface TeamsButtonProps { - showText?: boolean; - onAction?: (id: any) => void; -} - -export function NavButton({ showText = true }: TeamsButtonProps) { - const { user } = useLoginQuery(); - const { t, labels } = useMessages(); - const { teamId, router } = useNavigation(); - const { isMobile } = useMobile(); - const team = user?.teams?.find(({ id }) => id === teamId); - const selectedKeys = new Set([teamId || 'user']); - const label = teamId ? team?.name : user.username; - const cloudMode = !!process.env.cloudMode; - - const getUrl = (url: string) => { - return cloudMode ? `${process.env.cloudUrl}${url}` : url; - }; - - const handleAction = async (key: Key) => { - if (key === 'user') { - removeItem(LAST_TEAM_CONFIG); - if (cloudMode) { - window.location.href = '/'; - } else { - router.push('/'); - } - } - }; - - const handleNavigate = (url: string) => { - if (cloudMode) { - window.location.href = url; - } else { - router.push(url); - } - }; - - return ( - - - - - {teamId ? : } - {showText && {label}} - - {showText && ( - - - - )} - - - - - - - - } label={t(labels.switchAccount)} /> - - - - - - - } label={user.username} /> - - - - - {user?.teams?.map(({ id, name }) => ( - handleNavigate(getUrl(`/teams/${id}`))} - > - }> - {name} - - - ))} - {user?.teams?.length === 0 && ( - - - - Manage teams - - - - - - - )} - - - - - - - - - - ); -} diff --git a/src/components/metrics/WeeklyTraffic.tsx b/src/components/metrics/WeeklyTraffic.tsx index b75954c32..548d8cb42 100644 --- a/src/components/metrics/WeeklyTraffic.tsx +++ b/src/components/metrics/WeeklyTraffic.tsx @@ -1,4 +1,4 @@ -import { Focusable, Grid, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; +import { Grid, Row, Text, Tooltip, TooltipTrigger } from '@umami/react-zen'; import { addHours, format, startOfDay } from 'date-fns'; import { Fragment } from 'react'; import { LoadingPanel } from '@/components/common/LoadingPanel'; @@ -77,26 +77,25 @@ export function WeeklyTraffic({ websiteId }: { websiteId: string }) { {day?.map((count: number, j) => { const pct = max ? count / max : 0; const cell = ( - + - - - + style={{ opacity: pct, transform: `scale(${pct})` }} + /> + ); if (count <= 0) {