diff --git a/package.components.json b/package.components.json index ab3454c07..51214f892 100644 --- a/package.components.json +++ b/package.components.json @@ -1,6 +1,6 @@ { "name": "@umami/components", - "version": "0.130.0", + "version": "0.129.0", "description": "Umami React components.", "author": "Mike Cao ", "license": "MIT", diff --git a/package.json b/package.json index abad26937..78ee92685 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@react-spring/web": "^10.0.3", "@svgr/cli": "^8.1.0", "@tanstack/react-query": "^5.90.2", - "@umami/react-zen": "^0.198.0", + "@umami/react-zen": "^0.196.0", "@umami/redis-client": "^0.29.0", "bcryptjs": "^3.0.2", "chalk": "^5.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 280e1dc99..5f8e64277 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: ^5.90.2 version: 5.90.2(react@19.1.1) '@umami/react-zen': - specifier: ^0.198.0 - version: 0.198.0(@babel/core@7.28.3)(@types/react@19.1.16)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.1.3)(use-sync-external-store@1.6.0(react@19.1.1)) + specifier: ^0.196.0 + version: 0.196.0(@babel/core@7.28.3)(@types/react@19.1.16)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.1.3)(use-sync-external-store@1.6.0(react@19.1.1)) '@umami/redis-client': specifier: ^0.29.0 version: 0.29.0 @@ -364,8 +364,6 @@ importers: specifier: ^5.9.3 version: 5.9.3 - dist: {} - packages: '@ampproject/remapping@2.3.0': @@ -2756,8 +2754,8 @@ packages: resolution: {integrity: sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@umami/react-zen@0.198.0': - resolution: {integrity: sha512-usxXJPz5XnHzJ3Qo2RD0UZw+De/1QOx1f0SJDZNx8TZGLBNFqUHTAZgwOZANP7JgkS9cd4Q+WSobqP4JOp2saQ==} + '@umami/react-zen@0.196.0': + resolution: {integrity: sha512-CLxrDAJOdo+0aJAclOq7naIDg+2I5wP9wXxAFhxhQVPXHV8yUHqH9Ula632cLMo51JYp0l+eEtOtuimpuKX3jg==} '@umami/redis-client@0.29.0': resolution: {integrity: sha512-Jaqh++jskqDB7ny75pfC02OvKp1JTS4asGDsFrRL3qy8sxL3PAl9+/mybCJe4/6vWrXDJKqpgkSfUDJq2bFjyw==} @@ -10387,7 +10385,7 @@ snapshots: '@typescript-eslint/types': 8.45.0 eslint-visitor-keys: 4.2.1 - '@umami/react-zen@0.198.0(@babel/core@7.28.3)(@types/react@19.1.16)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.1.3)(use-sync-external-store@1.6.0(react@19.1.1))': + '@umami/react-zen@0.196.0(@babel/core@7.28.3)(@types/react@19.1.16)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.1.3)(use-sync-external-store@1.6.0(react@19.1.1))': dependencies: '@fontsource/jetbrains-mono': 5.2.8 '@internationalized/date': 3.10.0 diff --git a/src/app/(main)/MobileNav.tsx b/src/app/(main)/MobileNav.tsx index 5fea9f823..32751f0e5 100644 --- a/src/app/(main)/MobileNav.tsx +++ b/src/app/(main)/MobileNav.tsx @@ -1,11 +1,22 @@ -import { Row, NavMenu, NavMenuItem, IconLabel, Text, Grid } from '@umami/react-zen'; -import { Globe, Grid2x2, LinkIcon } from '@/components/icons'; +import { + Row, + Dialog, + DialogTrigger, + Button, + Icon, + Modal, + NavMenu, + NavMenuItem, + IconLabel, + Text, + Grid, +} from '@umami/react-zen'; +import { Globe, Grid2x2, LinkIcon, Menu } from '@/components/icons'; import { useMessages, useNavigation } from '@/components/hooks'; import Link from 'next/link'; import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav'; import { Logo } from '@/components/svg'; import { NavButton } from '@/components/input/NavButton'; -import { MobileMenu } from '@/components/common/MobileMenu'; export function MobileNav() { const { formatMessage, labels } = useMessages(); @@ -34,27 +45,30 @@ export function MobileNav() { return ( - - {({ close }) => { - return ( - <> - - - {links.map(link => { - return ( - - - - - - ); - })} - - {websiteId && } - - ); - }} - + + + + + + + {links.map(link => { + return ( + + + + + + ); + })} + + {websiteId && } + + + } style={{ width: 'auto' }}> umami diff --git a/src/app/(main)/websites/[websiteId]/ExpandedViewModal.tsx b/src/app/(main)/websites/[websiteId]/ExpandedViewModal.tsx index 08503334f..9e50788ac 100644 --- a/src/app/(main)/websites/[websiteId]/ExpandedViewModal.tsx +++ b/src/app/(main)/websites/[websiteId]/ExpandedViewModal.tsx @@ -1,4 +1,4 @@ -import { Dialog, Modal, useBreakpoint } from '@umami/react-zen'; +import { Dialog, Modal } from '@umami/react-zen'; import { WebsiteExpandedView } from '@/app/(main)/websites/[websiteId]/WebsiteExpandedView'; import { useNavigation } from '@/components/hooks'; @@ -14,8 +14,6 @@ export function ExpandedViewModal({ query: { view }, updateParams, } = useNavigation(); - const breakpoint = useBreakpoint(); - const isMobile = ['xs', 'sm', 'md'].includes(breakpoint); const handleClose = (close: () => void) => { router.push(updateParams({ view: undefined })); @@ -28,15 +26,11 @@ export function ExpandedViewModal({ } }; + const height = CSS.supports('height', '100dvh') ? 'calc(100dvh - 40px)' : 'calc(100vh - 40px)'; + return ( - + {({ close }) => { return ( void; -}) { +export function WebsiteExpandedMenu({ excludedIds = [] }: { excludedIds?: string[] }) { const { formatMessage, labels } = useMessages(); const { updateParams, @@ -179,5 +173,5 @@ export function WebsiteExpandedMenu({ }, ]; - return ; + return ; } diff --git a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx b/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx index f8d4c5f44..05de798d8 100644 --- a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx +++ b/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx @@ -1,8 +1,7 @@ -import { Grid, Column, Row } from '@umami/react-zen'; +import { Grid, Column } from '@umami/react-zen'; import { useMessages, useNavigation } from '@/components/hooks'; import { MetricsExpandedTable } from '@/components/metrics/MetricsExpandedTable'; import { WebsiteExpandedMenu } from '@/app/(main)/websites/[websiteId]/WebsiteExpandedMenu'; -import { MobileMenu } from '@/components/common/MobileMenu'; export function WebsiteExpandedView({ websiteId, @@ -19,33 +18,30 @@ export function WebsiteExpandedView({ } = useNavigation(); return ( - - - - {({ close }) => { - return ; - }} - - - - - - - - - - - + + + + + + + + ); } diff --git a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx index d63b1ad3f..bbbb06147 100644 --- a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx +++ b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx @@ -1,4 +1,4 @@ -import { Text, Column } from '@umami/react-zen'; +import { Text } from '@umami/react-zen'; import { Eye, User, @@ -14,13 +14,7 @@ import { useMessages, useNavigation } from '@/components/hooks'; import { SideMenu } from '@/components/common/SideMenu'; import { WebsiteSelect } from '@/components/input/WebsiteSelect'; -export function WebsiteNav({ - websiteId, - onItemClick, -}: { - websiteId: string; - onItemClick?: () => void; -}) { +export function WebsiteNav({ websiteId }: { websiteId: string }) { const { formatMessage, labels } = useMessages(); const { pathname, renderUrl, teamId, router } = useNavigation(); @@ -161,7 +155,7 @@ export function WebsiteNav({ .find(({ path }) => path && pathname.endsWith(path.split('?')[0]))?.id; return ( - + - - + ); } diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionInfo.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionInfo.tsx index e968daba1..c2127cf57 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionInfo.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionInfo.tsx @@ -1,8 +1,9 @@ import { ReactNode } from 'react'; -import { Icon, Grid, Column, Row, Label } from '@umami/react-zen'; +import { Icon, TextField, Column, Row, Label } from '@umami/react-zen'; import { useFormat, useLocale, useMessages, useRegionNames } from '@/components/hooks'; import { TypeIcon } from '@/components/common/TypeIcon'; -import { KeyRound, Calendar, MapPin, Landmark } from '@/components/icons'; +import { KeyRound, Calendar } from '@/components/icons'; +import { Location } from '@/components/svg'; import { DateDistance } from '@/components/common/DateDistance'; export function SessionInfo({ data }) { @@ -12,7 +13,11 @@ export function SessionInfo({ data }) { const { getRegionName } = useRegionNames(locale); return ( - + + + + + }> {data?.distinctId} @@ -32,11 +37,11 @@ export function SessionInfo({ data }) { {formatValue(data?.country, 'country')} - }> + }> {getRegionName(data?.region)} - }> + }> {data?.city} @@ -60,7 +65,7 @@ export function SessionInfo({ data }) { > {formatValue(data?.device, 'device')} - + ); } diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionProfile.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionProfile.tsx index 831b89c7c..bdbfbc580 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionProfile.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionProfile.tsx @@ -1,14 +1,4 @@ -import { - TextField, - Row, - Column, - Tabs, - TabList, - Tab, - TabPanel, - Icon, - Button, -} from '@umami/react-zen'; +import { Grid, Row, Column, Tabs, TabList, Tab, TabPanel, Icon, Button } from '@umami/react-zen'; import { Avatar } from '@/components/common/Avatar'; import { LoadingPanel } from '@/components/common/LoadingPanel'; import { X } from '@/components/icons'; @@ -47,34 +37,35 @@ export function SessionProfile({ - - - - - - - - - + + + + + + + + + - - - {formatMessage(labels.activity)} - {formatMessage(labels.properties)} - - - - - - - - - + + + {formatMessage(labels.activity)} + {formatMessage(labels.properties)} + + + + + + + + + + )} diff --git a/src/components/common/FilterRecord.tsx b/src/components/common/FilterRecord.tsx index 4cc36d43e..7278d23cf 100644 --- a/src/components/common/FilterRecord.tsx +++ b/src/components/common/FilterRecord.tsx @@ -65,11 +65,11 @@ export function FilterRecord({ - +