Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Zen components conversion.
Mike Cao5999bf62560d
diff --git a/next.config.js b/next.config.jsindex aea3f6ba0..d2b736537 100644--- a/next.config.js+++ b/next.config.js@@ -200,24 +200,6 @@ const config = {typescript: {ignoreBuildErrors: true,},- experimental: {- turbo: {- rules: {- '*.svg': {- loaders: ['@svgr/webpack'],- as: '*.js',- },- },- },- },- webpack(config) {- config.module.rules.push({- test: /\.svg$/,- issuer: /\.(js|ts)x?$/,- use: ['@svgr/webpack'],- });- return config;- },async headers() {return headers;},diff --git a/package.json b/package.jsonindex ee264841d..8c7d91fae 100644--- a/package.json+++ b/package.json@@ -10,7 +10,7 @@"url": "https://github.com/umami-software/umami.git"},"scripts": {- "dev": "next dev -p 3000 --turbo",+ "dev": "next dev -p 3000","build": "npm-run-all check-env build-db check-db build-tracker build-geo build-app","start": "next start","build-docker": "npm-run-all build-db build-tracker build-geo build-app",@@ -71,12 +71,13 @@"@dicebear/core": "^9.2.2","@fontsource/inter": "^4.5.15","@hello-pangea/dnd": "^17.0.0",- "@prisma/client": "6.1.0",+ "@internationalized/date": "^3.7.0",+ "@prisma/client": "6.4.1","@prisma/extension-read-replicas": "^0.4.0","@react-spring/web": "^9.7.5","@tanstack/react-query": "^5.66.11","@umami/prisma-client": "^0.14.0",- "@umami/react-zen": "^0.62.0",+ "@umami/react-zen": "link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen","@umami/redis-client": "^0.26.0","bcryptjs": "^2.4.3","chalk": "^4.1.2",@@ -105,10 +106,10 @@"lucide-react": "^0.475.0","maxmind": "^4.3.24","md5": "^2.3.0",- "next": "15.2.0",+ "next": "15.2.1","node-fetch": "^3.3.2","npm-run-all": "^4.1.5",- "prisma": "6.1.0",+ "prisma": "6.4.1","pure-rand": "^6.1.0","react": "^19.0.0","react-aria-components": "^1.6.0",@@ -119,7 +120,6 @@"react-simple-maps": "^2.3.0","react-use-measure": "^2.1.7","react-window": "^1.8.11",- "react-zen": "link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen","request-ip": "^3.3.0","semver": "^7.7.1","serialize-error": "^12.0.0",@@ -196,7 +196,7 @@"sharp"],"overrides": {- "react-zen": "link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen"+ "@umami/react-zen": "link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen"}}}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex bec4adfee..c4028ca79 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -5,7 +5,7 @@ settings:excludeLinksFromLockfile: falseoverrides:- react-zen: link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen+ '@umami/react-zen': link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zenimporters:@@ -29,24 +29,27 @@ importers:'@hello-pangea/dnd':specifier: ^17.0.0+ '@internationalized/date':+ specifier: ^3.7.0+ version: 3.7.0'@prisma/client':- specifier: 6.1.0- version: 6.1.0([email protected])+ specifier: 6.4.1'@prisma/extension-read-replicas':specifier: ^0.4.0- version: 0.4.0(@prisma/[email protected]([email protected]))+ version: 0.4.0(@prisma/[email protected]([email protected]([email protected]))([email protected]))'@react-spring/web':specifier: ^9.7.5'@tanstack/react-query':specifier: ^5.66.11- version: 5.66.11([email protected])+ version: 5.67.1([email protected])'@umami/prisma-client':specifier: ^0.14.0- version: 0.14.0(@prisma/[email protected]([email protected]))(@prisma/[email protected](@prisma/[email protected]([email protected])))+ version: 0.14.0(@prisma/[email protected]([email protected]([email protected]))([email protected]))(@prisma/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected])))'@umami/react-zen':- specifier: ^0.62.0- version: 0.62.0(@babel/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))+ specifier: link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen+ version: link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen'@umami/redis-client':specifier: ^0.26.0version: 0.26.0@@ -132,8 +135,8 @@ importers:specifier: ^2.3.0version: 2.3.0next:- specifier: 15.2.0- version: 15.2.0(@babel/[email protected])([email protected]([email protected]))([email protected])+ specifier: 15.2.1+ version: 15.2.1(@babel/[email protected])([email protected]([email protected]))([email protected])node-fetch:specifier: ^3.3.2version: 3.3.2@@ -141,8 +144,8 @@ importers:specifier: ^4.1.5version: 4.1.5prisma:- specifier: 6.1.0- version: 6.1.0+ specifier: 6.4.1+ version: 6.4.1([email protected])pure-rand:specifier: ^6.1.0version: 6.1.0@@ -173,9 +176,6 @@ importers:react-window:specifier: ^1.8.11- react-zen:- specifier: link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zen- version: link:C:/Users/mike/AppData/Local/pnpm/global/5/node_modules/@umami/react-zenrequest-ip:specifier: ^3.3.0version: 3.3.0@@ -200,7 +200,7 @@ importers:devDependencies:'@formatjs/cli':specifier: ^4.8.4- version: 4.8.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))+ version: 4.8.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))'@netlify/plugin-nextjs':specifier: ^5.9.4version: 5.9.4@@ -236,7 +236,7 @@ importers:version: 29.5.14'@types/node':specifier: ^22.13.8- version: 22.13.8+ version: 22.13.9'@types/react':specifier: ^19.0.10version: 19.0.10@@ -284,19 +284,19 @@ importers:version: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])eslint-plugin-jest:specifier: ^27.9.0- version: 27.9.0(@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])+ version: 27.9.0(@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])eslint-plugin-prettier:specifier: ^4.2.1extract-react-intl-messages:specifier: ^4.1.1- version: 4.1.1([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))+ version: 4.1.1([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))husky:specifier: ^8.0.3version: 8.0.3jest:specifier: ^29.7.0- version: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ version: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))lint-staged:specifier: ^14.0.1version: 14.0.1([email protected])@@ -341,7 +341,7 @@ importers:version: 6.1.2([email protected])rollup-plugin-postcss:specifier: ^4.0.2stylelint:specifier: ^15.11.0version: 15.11.0([email protected])@@ -359,10 +359,10 @@ importers:version: 6.2.1ts-jest:specifier: ^29.2.6- version: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])+ version: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])ts-node:specifier: ^10.9.2- version: 10.9.2(@types/[email protected])([email protected])+ version: 10.9.2(@types/[email protected])([email protected])typescript:specifier: ^5.8.2version: 5.8.2@@ -1122,8 +1122,8 @@ packages:peerDependencies:postcss-selector-parser: ^6.0.13- '@cypress/[email protected]':- resolution: {integrity: sha512-LzxlLEMbBOPYB85uXrDqvD4MgcenjRBLIns3zyhx7vTPj/0u2eQhzXvPiGcaJrV38Q9dbkExWp6cOHPJ+EtFYg==}+ '@cypress/[email protected]':+ resolution: {integrity: sha512-h0NFgh1mJmm1nr4jCwkGHwKneVYKghUyWe6TMNrk0B9zsjAJxpg8C4/+BAcmLgCPa1vj1V8rNUaILl+zYRUWBQ==}engines: {node: '>= 6'}'@cypress/[email protected]':@@ -1496,9 +1496,6 @@ packages:'@fontsource/[email protected]':resolution: {integrity: sha512-FzleM9AxZQK2nqsTDtBiY0PMEVWvnKnuu2i09+p6DHvrHsuucoV2j0tmw+kAT3L4hvsLdAIDv6MdGehsPIdT+Q==}- '@fontsource/[email protected]':- resolution: {integrity: sha512-uct4zEo8dgy4nId5gzeaU07gUHdtGY8KUMpCBV8BNaj21+WZcfc10uOtvHi09T0Z1dqAme7jLQY6Vtn1MKrZoQ==}-'@formatjs/[email protected]':resolution: {integrity: sha512-zZI8QYVl5CHaT6j9OHjS+0mMnWzopBVH0un4n5b4IhIJRzIKnxwFTkxBp5Ifqj6FntrwzIGqP+D6v8u7MPYsmw==}hasBin: true@@ -1808,56 +1805,56 @@ packages:resolution: {integrity: sha512-Q9qyhGUxFuM3kuWmoaj4yHPUfHhOsZmwdsQv4kIXkBWVu8FOe0RFHRP0A0EXciSVFGwq+XAo3H5jEtVSANAOWw==}engines: {node: '>=18.0.0'}- '@next/[email protected]':- resolution: {integrity: sha512-eMgJu1RBXxxqqnuRJQh5RozhskoNUDHBFybvi+Z+yK9qzKeG7dadhv/Vp1YooSZmCnegf7JxWuapV77necLZNA==}+ '@next/[email protected]':+ resolution: {integrity: sha512-JmY0qvnPuS2NCWOz2bbby3Pe0VzdAQ7XpEB6uLIHmtXNfAsAO0KLQLkuAoc42Bxbo3/jMC3dcn9cdf+piCcG2Q==}'@next/[email protected]':resolution: {integrity: sha512-FDL3qs+5DML0AJz56DCVr+KnFYivxeAX73En8QbPw9GjJZ6zbfvqDy+HrarHFzbsIASn7y8y5ySJ/lllSruNVQ==}- '@next/[email protected]':- resolution: {integrity: sha512-rlp22GZwNJjFCyL7h5wz9vtpBVuCt3ZYjFWpEPBGzG712/uL1bbSkS675rVAUCRZ4hjoTJ26Q7IKhr5DfJrHDA==}+ '@next/[email protected]':+ resolution: {integrity: sha512-aWXT+5KEREoy3K5AKtiKwioeblmOvFFjd+F3dVleLvvLiQ/mD//jOOuUcx5hzcO9ISSw4lrqtUPntTpK32uXXQ==}engines: {node: '>= 10'}cpu: [arm64]os: [darwin]- '@next/[email protected]':- resolution: {integrity: sha512-DiU85EqSHogCz80+sgsx90/ecygfCSGl5P3b4XDRVZpgujBm5lp4ts7YaHru7eVTyZMjHInzKr+w0/7+qDrvMA==}+ '@next/[email protected]':+ resolution: {integrity: sha512-E/w8ervu4fcG5SkLhvn1NE/2POuDCDEy5gFbfhmnYXkyONZR68qbUlJlZwuN82o7BrBVAw+tkR8nTIjGiMW1jQ==}engines: {node: '>= 10'}cpu: [x64]os: [darwin]- '@next/[email protected]':- resolution: {integrity: sha512-VnpoMaGukiNWVxeqKHwi8MN47yKGyki5q+7ql/7p/3ifuU2341i/gDwGK1rivk0pVYbdv5D8z63uu9yMw0QhpQ==}+ '@next/[email protected]':+ resolution: {integrity: sha512-gXDX5lIboebbjhiMT6kFgu4svQyjoSed6dHyjx5uZsjlvTwOAnZpn13w9XDaIMFFHw7K8CpBK7HfDKw0VZvUXQ==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]- '@next/[email protected]':- resolution: {integrity: sha512-ka97/ssYE5nPH4Qs+8bd8RlYeNeUVBhcnsNUmFM6VWEob4jfN9FTr0NBhXVi1XEJpj3cMfgSRW+LdE3SUZbPrw==}+ '@next/[email protected]':+ resolution: {integrity: sha512-3v0pF/adKZkBWfUffmB/ROa+QcNTrnmYG4/SS+r52HPwAK479XcWoES2I+7F7lcbqc7mTeVXrIvb4h6rR/iDKg==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]- '@next/[email protected]':- resolution: {integrity: sha512-zY1JduE4B3q0k2ZCE+DAF/1efjTXUsKP+VXRtrt/rJCTgDlUyyryx7aOgYXNc1d8gobys/Lof9P9ze8IyRDn7Q==}+ '@next/[email protected]':+ resolution: {integrity: sha512-RbsVq2iB6KFJRZ2cHrU67jLVLKeuOIhnQB05ygu5fCNgg8oTewxweJE8XlLV+Ii6Y6u4EHwETdUiRNXIAfpBww==}engines: {node: '>= 10'}cpu: [x64]os: [linux]- '@next/[email protected]':- resolution: {integrity: sha512-QqvLZpurBD46RhaVaVBepkVQzh8xtlUN00RlG4Iq1sBheNugamUNPuZEH1r9X1YGQo1KqAe1iiShF0acva3jHQ==}+ '@next/[email protected]':+ resolution: {integrity: sha512-QHsMLAyAIu6/fWjHmkN/F78EFPKmhQlyX5C8pRIS2RwVA7z+t9cTb0IaYWC3EHLOTjsU7MNQW+n2xGXr11QPpg==}engines: {node: '>= 10'}cpu: [x64]os: [linux]- '@next/[email protected]':- resolution: {integrity: sha512-ODZ0r9WMyylTHAN6pLtvUtQlGXBL9voljv6ujSlcsjOxhtXPI1Ag6AhZK0SE8hEpR1374WZZ5w33ChpJd5fsjw==}+ '@next/[email protected]':+ resolution: {integrity: sha512-Gk42XZXo1cE89i3hPLa/9KZ8OuupTjkDmhLaMKFohjf9brOeZVEa3BQy1J9s9TWUqPhgAEbwv6B2+ciGfe54Vw==}engines: {node: '>= 10'}cpu: [arm64]os: [win32]- '@next/[email protected]':- resolution: {integrity: sha512-8+4Z3Z7xa13NdUuUAcpVNA6o76lNPniBd9Xbo02bwXQXnZgFvEopwY2at5+z7yHl47X9qbZpvwatZ2BRo3EdZw==}+ '@next/[email protected]':+ resolution: {integrity: sha512-YjqXCl8QGhVlMR8uBftWk0iTmvtntr41PhG1kvzGp0sUP/5ehTM+cwx25hKE54J0CRnHYjSGjSH3gkHEaHIN9g==}engines: {node: '>= 10'}cpu: [x64]os: [win32]@@ -1882,34 +1879,37 @@ packages:resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}engines: {node: '>=14'}- '@prisma/[email protected]':- resolution: {integrity: sha512-AbQYc5+EJKm1Ydfq3KxwcGiy7wIbm4/QbjCKWWoNROtvy7d6a3gmAGkKjK0iUCzh+rHV8xDhD5Cge8ke/kiy5Q==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-A7Mwx44+GVZVexT5e2GF/WcKkEkNNKbgr059xpr5mn+oUm2ZW1svhe+0TRNBwCdzhfIZ+q23jEgsNPvKD9u+6g==}engines: {node: '>=18.18'}peerDependencies:prisma: '*'+ typescript: '>=5.1.0'peerDependenciesMeta:prisma:optional: true+ typescript:+ optional: true- '@prisma/[email protected]':- resolution: {integrity: sha512-0himsvcM4DGBTtvXkd2Tggv6sl2JyUYLzEGXXleFY+7Kp6rZeSS3hiTW9mwtUlXrwYbJP6pwlVNB7jYElrjWUg==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-Q9xk6yjEGIThjSD8zZegxd5tBRNHYd13GOIG0nLsanbTXATiPXCLyvlYEfvbR2ft6dlRsziQXfQGxAgv7zcMUA==}- '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959':- resolution: {integrity: sha512-PdJqmYM2Fd8K0weOOtQThWylwjsDlTig+8Pcg47/jszMuLL9iLIaygC3cjWJLda69siRW4STlCTMSgOjZzvKPQ==}+ '@prisma/engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d':+ resolution: {integrity: sha512-Xq54qw55vaCGrGgIJqyDwOq0TtjZPJEWsbQAHugk99hpDf2jcEeQhUcF+yzEsSqegBaDNLA4IC8Nn34sXmkiTQ==}- '@prisma/[email protected]':- resolution: {integrity: sha512-GnYJbCiep3Vyr1P/415ReYrgJUjP79fBNc1wCo7NP6Eia0CzL2Ot9vK7Infczv3oK7JLrCcawOSAxFxNFsAERQ==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-KldENzMHtKYwsOSLThghOIdXOBEsfDuGSrxAZjMnimBiDKd3AE4JQ+Kv+gBD/x77WoV9xIPf25GXMWffXZ17BA==}'@prisma/[email protected]':resolution: {integrity: sha512-0KVjOgYJO9ymOACwLXebXB1XZCrfXXZMDkZrdZQOm9rqraC1rguwpPzXUdgv2txMLyJNSe+i5DOruDCU4FfvCA==}peerDependencies:'@prisma/client': ^5.2.0- '@prisma/[email protected]':- resolution: {integrity: sha512-asdFi7TvPlEZ8CzSZ/+Du5wZ27q6OJbRSXh+S8ISZguu+S9KtS/gP7NeXceZyb1Jv1SM1S5YfiCv+STDsG6rrg==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-uZ5hVeTmDspx7KcaRCNoXmcReOD+84nwlO2oFvQPRQh9xiFYnnUKDz7l9bLxp8t4+25CsaNlgrgilXKSQwrIGQ==}- '@prisma/[email protected]':- resolution: {integrity: sha512-ia8bNjboBoHkmKGGaWtqtlgQOhCi7+f85aOkPJKgNwWvYrT6l78KgojLekE8zMhVk0R9lWcifV0Pf8l3/15V0Q==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-gXqZaDI5scDkBF8oza7fOD3Q3QMD0e0rBynlzDDZdTWbWmzjuW58PRZtj+jkvKje2+ZigCWkH8SsWZAsH6q1Yw==}'@react-aria/[email protected]':resolution: {integrity: sha512-a7awFG3hshJ/kX7Qti/cJAKOG0XU5F/XW6fQffKGfEge7PmiWIvaLTrT5her79/v8v/bRBykIkpEgDCFE7WGzg==}@@ -2710,11 +2710,11 @@ packages:'@swc/[email protected]':resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}- '@tanstack/[email protected]':- resolution: {integrity: sha512-ZEYxgHUcohj3sHkbRaw0gYwFxjY5O6M3IXOYXEun7E1rqNhsP8fOtqjJTKPZpVHcdIdrmX4lzZctT4+pts0OgA==}+ '@tanstack/[email protected]':+ resolution: {integrity: sha512-AkFmuukVejyqVIjEQoFhLb3q+xHl7JG8G9cANWTMe3s8iKzD9j1VBSYXgCjy6vm6xM8cUCR9zP2yqWxY9pTWOA==}- '@tanstack/[email protected]':- resolution: {integrity: sha512-uPDiQbZScWkAeihmZ9gAm3wOBA1TmLB1KCB1fJ1hIiEKq3dTT+ja/aYM7wGUD+XiEsY4sDSE7p8VIz/21L2Dow==}+ '@tanstack/[email protected]':+ resolution: {integrity: sha512-fH5u4JLwB6A+wLFdi8wWBWAYoJV5deYif2OveJ26ktAWjU499uvVFS1wPWnyEyq5LvZX1MZInvv9QRaIZANRaQ==}peerDependencies:react: ^18 || ^19@@ -2798,8 +2798,8 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==}- '@types/[email protected]':- resolution: {integrity: sha512-G3EfaZS+iOGYWLLRCEAXdWK9my08oHNZ+FHluRiggIYJPOXzhOiDgpVCUHaUvyIC5/fj7C/p637jdzC666AOKQ==}+ '@types/[email protected]':+ resolution: {integrity: sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==}'@types/[email protected]':resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}@@ -2937,9 +2937,6 @@ packages:'@prisma/client': ^4.8.0'@prisma/extension-read-replicas': ^0.3.0- '@umami/[email protected]':- resolution: {integrity: sha512-Anbk2tyagNuEhtZu1xGwRxOTVSb73AYVp6Hr7LKFcUfk48dE04jWqmSLqoYkkSBhOxoMXtpgY9lthozjj0zCzg==}-'@umami/[email protected]':resolution: {integrity: sha512-j2vxb1gYF5zfk7BkrHgau2MwKsB5ijbQh2w1WoIvbP41cqTMsFm/zUrjhZ0cP1ZxR/riQR1AWxKmqNggYRZ5eA==}@@ -3275,8 +3272,8 @@ packages:resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==}+ resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==}engines: {node: '>= 0.4'}@@ -3302,8 +3299,8 @@ packages:resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}- resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==}+ resolution: {integrity: sha512-LoPe/D7zioC0REI5W73PeR1e1MLCipRGq/VkovJnd6Df+QVqT+vT33OXCp8QUd7kA7RZrHWxb1B36OQKI/0gOA==}resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}@@ -3855,8 +3852,8 @@ packages:engines: {node: '>=0.10.0'}hasBin: true- resolution: {integrity: sha512-AidaH9JETVRr9DIPGfp1kAarm/W6hRJTPuCnkF+2MqhF4KaAgRIcBc8nvjk+YMXZhwfISof/7WG29eS4iGxQLQ==}+ resolution: {integrity: sha512-oen93kVyqSb3l+ziUgzIOlWt/oOuy4zRmpwestMn4rhFWAoFJeFuCVte9F2fASjeZZo7l/Cif9TiyrdW4CwEMA==}resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}@@ -3924,6 +3921,11 @@ packages:resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==}+ peerDependencies:+ esbuild: '>=0.12 <1'+resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==}engines: {node: '>=18'}@@ -4374,10 +4376,6 @@ packages:engines: {node: '>=16 || 14 >=14.17'}hasBin: true- resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}- hasBin: true-resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}deprecated: Glob versions prior to v9 are no longer supported@@ -4825,9 +4823,6 @@ packages:resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}engines: {node: '>=14'}- resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}-resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==}engines: {node: '>=10'}@@ -5402,8 +5397,8 @@ packages:resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}- resolution: {integrity: sha512-VaiM7sZYX8KIAHBrRGSFytKknkrexNfGb8GlG6e93JqueCspuGte8i4ybn8z4ww1x3f2uzY4YpTaBEW4/hvsoQ==}+ resolution: {integrity: sha512-zxbsdQv3OqWXybK5tMkPCBKyhIz63RstJ+NvlfkaLMc/m5MwXgz2e92k+hSKcyBpyADhMk2C31RIiaDjUZae7g==}engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}hasBin: truepeerDependencies:@@ -5568,9 +5563,6 @@ packages:resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}engines: {node: '>=6'}- resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}-resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}engines: {node: '>=6'}@@ -6110,10 +6102,15 @@ packages:resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}- resolution: {integrity: sha512-aFI3Yi+ApUxkwCJJwyQSwpyzUX7YX3ihzuHNHOyv4GJg3X5tQsmRaJEnZ+ZyfHpMtnyahhmXVfbTZ+lS8ZtfKw==}+ resolution: {integrity: sha512-q2uJkgXnua/jj66mk6P9bX/zgYJFI/jn4Yp0aS6SPRrjH/n6VyOV7RDe1vHD0DX8Aanx4MvgmUPPoYnR6MJnPg==}engines: {node: '>=18.18'}hasBin: true+ peerDependencies:+ typescript: '>=5.1.0'+ peerDependenciesMeta:+ typescript:+ optional: trueresolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}@@ -6143,8 +6140,8 @@ packages:resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==}- resolution: {integrity: sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==}+ resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==}engines: {node: '>=0.6'}@@ -6199,11 +6196,6 @@ packages:peerDependencies:react: ^16.8.0 || ^17 || ^18 || ^19- resolution: {integrity: sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw==}- peerDependencies:- react: '*'-resolution: {integrity: sha512-TgyzN0GJDILl4EIjbBWJddp+zRMx7IrYXeeUBwDisXfuglJaafAUVYYTx9wTWMRJrm2LubaCeH3L68mIPTmUYA==}peerDependencies:@@ -6992,8 +6984,8 @@ packages:resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==}engines: {node: '>=10'}- resolution: {integrity: sha512-3T/PUdKTCnkUmhQU6FFJEHsLwadsRegktX3TNHk+2JJB9HlA8gp1/VXblXVDI93kSnXF2rdPx0GMbHtJIV2LPg==}+ resolution: {integrity: sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==}engines: {node: '>=16'}@@ -7245,24 +7237,6 @@ packages:react:optional: true- resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==}- engines: {node: '>=12.20.0'}- peerDependencies:- '@types/react': '>=18.0.0'- immer: '>=9.0.6'- react: '>=18.0.0'- use-sync-external-store: '>=1.2.0'- peerDependenciesMeta:- '@types/react':- optional: true- immer:- optional: true- react:- optional: true- use-sync-external-store:- optional: true-snapshots:'@ampproject/[email protected]':@@ -8165,7 +8139,7 @@ snapshots:dependencies:postcss-selector-parser: 6.1.2- '@cypress/[email protected]':+ '@cypress/[email protected]':dependencies:aws-sign2: 0.7.0aws4: 1.13.2@@ -8180,7 +8154,7 @@ snapshots:json-stringify-safe: 5.0.1mime-types: 2.1.35performance-now: 2.1.0- qs: 6.13.1+ qs: 6.14.0safe-buffer: 5.2.1tough-cookie: 5.1.2tunnel-agent: 0.6.0@@ -8458,12 +8432,10 @@ snapshots:'@fontsource/[email protected]': {}- '@fontsource/[email protected]': {}-- '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':+ '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':dependencies:'@formatjs/icu-messageformat-parser': 2.1.0- '@formatjs/ts-transformer': 3.9.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))+ '@formatjs/ts-transformer': 3.9.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))'@types/estree': 0.0.50'@types/fs-extra': 9.0.13'@types/json-stable-stringify': 1.2.0@@ -8550,15 +8522,15 @@ snapshots:optionalDependencies:typescript: 5.8.2- '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':+ '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':dependencies:intl-messageformat-parser: 6.1.2tslib: 2.8.1typescript: 4.9.5optionalDependencies:- ts-jest: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])+ ts-jest: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])- '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':+ '@formatjs/[email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))':dependencies:'@formatjs/icu-messageformat-parser': 2.1.0'@types/node': 14.18.63@@ -8566,7 +8538,7 @@ snapshots:tslib: 2.8.1typescript: 4.9.5optionalDependencies:- ts-jest: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])+ ts-jest: 29.2.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])'@hello-pangea/[email protected](@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:@@ -8708,27 +8680,27 @@ snapshots:'@jest/[email protected]':dependencies:'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2jest-message-util: 29.7.0jest-util: 29.7.0slash: 3.0.0dependencies:'@jest/console': 29.7.0'@jest/reporters': 29.7.0'@jest/test-result': 29.7.0'@jest/transform': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9ansi-escapes: 4.3.2chalk: 4.1.2ci-info: 3.9.0exit: 0.1.2graceful-fs: 4.2.11jest-changed-files: 29.7.0- jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))jest-haste-map: 29.7.0jest-message-util: 29.7.0jest-regex-util: 29.6.3@@ -8753,7 +8725,7 @@ snapshots:dependencies:'@jest/fake-timers': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9jest-mock: 29.7.0'@jest/[email protected]':@@ -8771,7 +8743,7 @@ snapshots:dependencies:'@jest/types': 29.6.3'@sinonjs/fake-timers': 10.3.0- '@types/node': 22.13.8+ '@types/node': 22.13.9jest-message-util: 29.7.0jest-mock: 29.7.0jest-util: 29.7.0@@ -8793,7 +8765,7 @@ snapshots:'@jest/transform': 29.7.0'@jest/types': 29.6.3'@jridgewell/trace-mapping': 0.3.25- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2collect-v8-coverage: 1.0.2exit: 0.1.2@@ -8863,7 +8835,7 @@ snapshots:'@jest/schemas': 29.6.3'@types/istanbul-lib-coverage': 2.0.6'@types/istanbul-reports': 3.0.4- '@types/node': 22.13.8+ '@types/node': 22.13.9'@types/yargs': 17.0.33chalk: 4.1.2@@ -8898,34 +8870,34 @@ snapshots:'@netlify/[email protected]': {}- '@next/[email protected]': {}+ '@next/[email protected]': {}'@next/[email protected]':dependencies:glob: 10.3.10- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true- '@next/[email protected]':+ '@next/[email protected]':optional: true'@nodelib/[email protected]':@@ -8945,34 +8917,35 @@ snapshots:'@pkgjs/[email protected]':optional: true- '@prisma/[email protected]([email protected])':optionalDependencies:- prisma: 6.1.0+ prisma: 6.4.1([email protected])+ typescript: 5.8.2- '@prisma/[email protected]': {}+ '@prisma/[email protected]': {}- '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959': {}+ '@prisma/engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d': {}- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.1.0- '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959- '@prisma/fetch-engine': 6.1.0- '@prisma/get-platform': 6.1.0+ '@prisma/debug': 6.4.1+ '@prisma/engines-version': 6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d+ '@prisma/fetch-engine': 6.4.1+ '@prisma/get-platform': 6.4.1+ '@prisma/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))':dependencies:- '@prisma/client': 6.1.0([email protected])- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.1.0- '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959- '@prisma/get-platform': 6.1.0+ '@prisma/debug': 6.4.1+ '@prisma/engines-version': 6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d+ '@prisma/get-platform': 6.4.1- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.1.0+ '@prisma/debug': 6.4.1dependencies:@@ -10254,11 +10227,11 @@ snapshots:dependencies:tslib: 2.8.1- '@tanstack/[email protected]': {}+ '@tanstack/[email protected]': {}- '@tanstack/[email protected]([email protected])':+ '@tanstack/[email protected]([email protected])':dependencies:- '@tanstack/query-core': 5.66.11+ '@tanstack/query-core': 5.67.1react: 19.0.0'@trysound/[email protected]': {}@@ -10298,20 +10271,20 @@ snapshots:'@types/[email protected]':dependencies:- '@types/node': 22.13.8+ '@types/node': 22.13.9'@types/[email protected]':dependencies:- '@types/node': 22.13.8+ '@types/node': 22.13.9'@types/[email protected]':dependencies:'@types/minimatch': 5.1.2- '@types/node': 22.13.8+ '@types/node': 22.13.9'@types/[email protected]':dependencies:- '@types/node': 22.13.8+ '@types/node': 22.13.9'@types/[email protected]':dependencies:@@ -10347,7 +10320,7 @@ snapshots:'@types/[email protected]': {}- '@types/[email protected]':+ '@types/[email protected]':dependencies:undici-types: 6.20.0@@ -10389,7 +10362,7 @@ snapshots:'@types/[email protected]':dependencies:- '@types/node': 22.13.8+ '@types/node': 22.13.9optional: true'@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':@@ -10519,41 +10492,15 @@ snapshots:'@typescript-eslint/types': 6.21.0eslint-visitor-keys: 3.4.3- '@umami/[email protected](@prisma/[email protected]([email protected]))(@prisma/[email protected](@prisma/[email protected]([email protected])))':+ '@umami/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))(@prisma/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected])))':dependencies:- '@prisma/client': 6.1.0([email protected])- '@prisma/extension-read-replicas': 0.4.0(@prisma/[email protected]([email protected]))+ '@prisma/extension-read-replicas': 0.4.0(@prisma/[email protected]([email protected]([email protected]))([email protected]))chalk: 4.1.2debug: 4.4.0([email protected])transitivePeerDependencies:- supports-color- '@umami/[email protected](@babel/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))':- dependencies:- '@fontsource/jetbrains-mono': 5.2.1- classnames: 2.5.1- glob: 10.4.5- lucide-react: 0.475.0([email protected])- react: 19.0.0- react-dom: 19.0.0([email protected])- react-hook-form: 7.54.2([email protected])- react-icons: 5.5.0([email protected])- thenby: 1.3.4- zustand: 5.0.3(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))- transitivePeerDependencies:- - '@babel/core'- - '@opentelemetry/api'- - '@playwright/test'- - '@types/react'- - babel-plugin-macros- - babel-plugin-react-compiler- - immer- - sass- - use-sync-external-store-'@umami/[email protected]':dependencies:debug: 4.4.0([email protected])@@ -10695,7 +10642,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4is-array-buffer: 3.0.5@@ -10784,7 +10731,7 @@ snapshots:dependencies:browserslist: 4.24.4- caniuse-lite: 1.0.30001701+ caniuse-lite: 1.0.30001702fraction.js: 4.3.7normalize-range: 0.1.2picocolors: 1.1.1@@ -10857,12 +10804,12 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])):+ [email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])):dependencies:'@babel/core': 7.26.9'@babel/helper-plugin-utils': 7.26.5'@babel/types': 7.26.9- '@formatjs/ts-transformer': 2.13.0([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))+ '@formatjs/ts-transformer': 2.13.0([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))'@types/babel__core': 7.20.5'@types/fs-extra': 9.0.13'@types/schema-utils': 2.4.0@@ -10931,8 +10878,8 @@ snapshots:dependencies:- caniuse-lite: 1.0.30001701- electron-to-chromium: 1.5.109+ caniuse-lite: 1.0.30001702+ electron-to-chromium: 1.5.112node-releases: 2.0.19update-browserslist-db: 1.1.3([email protected])@@ -10973,7 +10920,7 @@ snapshots:get-intrinsic: 1.3.0set-function-length: 1.2.2dependencies:call-bind-apply-helpers: 1.0.2get-intrinsic: 1.3.0@@ -11000,11 +10947,11 @@ snapshots:dependencies:browserslist: 4.24.4- caniuse-lite: 1.0.30001701+ caniuse-lite: 1.0.30001702lodash.memoize: 4.1.2lodash.uniq: 4.5.0- [email protected]: {}+ [email protected]: {}@@ -11166,13 +11113,13 @@ snapshots:optionalDependencies:typescript: 5.8.2- [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):+ [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):dependencies:'@jest/types': 29.6.3chalk: 4.1.2exit: 0.1.2graceful-fs: 4.2.11- jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))jest-util: 29.7.0prompts: 2.4.2transitivePeerDependencies:@@ -11330,7 +11277,7 @@ snapshots:dependencies:- '@cypress/request': 3.0.7+ '@cypress/request': 3.0.8'@cypress/xvfb': 1.2.4([email protected])'@types/sinonjs__fake-timers': 8.1.1'@types/sizzle': 2.3.9@@ -11430,19 +11377,19 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0is-data-view: 1.0.2dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0is-data-view: 1.0.2dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0is-data-view: 1.0.2@@ -11601,7 +11548,7 @@ snapshots:dependencies:jake: 10.9.2- [email protected]: {}+ [email protected]: {}@@ -11637,7 +11584,7 @@ snapshots:arraybuffer.prototype.slice: 1.0.4available-typed-arrays: 1.0.7call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4data-view-buffer: 1.0.2data-view-byte-length: 1.0.2data-view-byte-offset: 1.0.1@@ -11692,7 +11639,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1es-abstract: 1.23.9es-errors: 1.3.0@@ -11731,6 +11678,13 @@ snapshots:is-date-object: 1.1.0is-symbol: 1.1.1+ dependencies:+ debug: 4.4.0([email protected])+ esbuild: 0.25.0+ transitivePeerDependencies:+ - supports-color+optionalDependencies:'@esbuild/aix-ppc64': 0.25.0@@ -11869,13 +11823,13 @@ snapshots:- eslint-import-resolver-webpack- supports-color- [email protected](@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]):+ [email protected](@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]):dependencies:'@typescript-eslint/utils': 5.62.0([email protected])([email protected])eslint: 8.57.1optionalDependencies:'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])- jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))transitivePeerDependencies:- supports-color- typescript@@ -12076,10 +12030,10 @@ snapshots:- [email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])):+ [email protected]([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected])):dependencies:'@babel/core': 7.26.9- babel-plugin-react-intl: 7.9.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))+ babel-plugin-react-intl: 7.9.4([email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]))flat: 5.0.2glob: 7.2.3js-yaml: 3.14.1@@ -12247,7 +12201,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1functions-have-names: 1.2.3hasown: 2.0.2@@ -12293,7 +12247,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0get-intrinsic: 1.3.0@@ -12325,15 +12279,6 @@ snapshots:minipass: 7.1.2path-scurry: 1.11.1- dependencies:- foreground-child: 3.3.1- jackspeak: 3.4.3- minimatch: 9.0.5- minipass: 7.1.2- package-json-from-dist: 1.0.1- path-scurry: 1.11.1-dependencies:fs.realpath: 1.0.0@@ -12540,7 +12485,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4get-intrinsic: 1.3.0@@ -12551,7 +12496,7 @@ snapshots:dependencies:async-function: 1.0.0- call-bound: 1.0.3+ call-bound: 1.0.4get-proto: 1.0.1has-tostringtag: 1.0.2safe-regex-test: 1.1.0@@ -12562,7 +12507,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-tostringtag: 1.0.2@@ -12583,13 +12528,13 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4get-intrinsic: 1.3.0is-typed-array: 1.1.15dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-tostringtag: 1.0.2@@ -12598,7 +12543,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4@@ -12608,7 +12553,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4get-proto: 1.0.1has-tostringtag: 1.0.2safe-regex-test: 1.1.0@@ -12630,7 +12575,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-tostringtag: 1.0.2@@ -12653,7 +12598,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4gopd: 1.2.0has-tostringtag: 1.0.2hasown: 2.0.2@@ -12662,7 +12607,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4@@ -12670,12 +12615,12 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-tostringtag: 1.0.2dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-symbols: 1.1.0safe-regex-test: 1.1.0@@ -12691,11 +12636,11 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4get-intrinsic: 1.3.0@@ -12762,12 +12707,6 @@ snapshots:optionalDependencies:'@pkgjs/parseargs': 0.11.0- dependencies:- '@isaacs/cliui': 8.0.2- optionalDependencies:- '@pkgjs/parseargs': 0.11.0-dependencies:async: 3.2.6@@ -12787,7 +12726,7 @@ snapshots:'@jest/expect': 29.7.0'@jest/test-result': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2co: 4.6.0dedent: 1.5.3@@ -12807,16 +12746,16 @@ snapshots:- babel-plugin-macros- supports-color- [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):+ [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):dependencies:'@jest/test-result': 29.7.0'@jest/types': 29.6.3chalk: 4.1.2- create-jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ create-jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))exit: 0.1.2import-local: 3.2.0- jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest-config: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))jest-util: 29.7.0jest-validate: 29.7.0yargs: 17.7.2@@ -12826,7 +12765,7 @@ snapshots:- supports-color- ts-node- [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):+ [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):dependencies:'@babel/core': 7.26.9'@jest/test-sequencer': 29.7.0@@ -12851,8 +12790,8 @@ snapshots:slash: 3.0.0strip-json-comments: 3.1.1optionalDependencies:- '@types/node': 22.13.8- ts-node: 10.9.2(@types/[email protected])([email protected])+ '@types/node': 22.13.9+ ts-node: 10.9.2(@types/[email protected])([email protected])transitivePeerDependencies:- babel-plugin-macros- supports-color@@ -12881,7 +12820,7 @@ snapshots:'@jest/environment': 29.7.0'@jest/fake-timers': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9jest-mock: 29.7.0jest-util: 29.7.0@@ -12891,7 +12830,7 @@ snapshots:dependencies:'@jest/types': 29.6.3'@types/graceful-fs': 4.1.9- '@types/node': 22.13.8+ '@types/node': 22.13.9anymatch: 3.1.3fb-watchman: 2.0.2graceful-fs: 4.2.11@@ -12930,7 +12869,7 @@ snapshots:dependencies:'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9jest-util: 29.7.0@@ -12965,7 +12904,7 @@ snapshots:'@jest/test-result': 29.7.0'@jest/transform': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2emittery: 0.13.1graceful-fs: 4.2.11@@ -12993,7 +12932,7 @@ snapshots:'@jest/test-result': 29.7.0'@jest/transform': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2cjs-module-lexer: 1.4.3collect-v8-coverage: 1.0.2@@ -13039,7 +12978,7 @@ snapshots:dependencies:'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9chalk: 4.1.2ci-info: 3.9.0graceful-fs: 4.2.11@@ -13058,7 +12997,7 @@ snapshots:dependencies:'@jest/test-result': 29.7.0'@jest/types': 29.6.3- '@types/node': 22.13.8+ '@types/node': 22.13.9ansi-escapes: 4.3.2chalk: 4.1.2emittery: 0.13.1@@ -13067,17 +13006,17 @@ snapshots:dependencies:- '@types/node': 22.13.8+ '@types/node': 22.13.9jest-util: 29.7.0merge-stream: 2.0.0supports-color: 8.1.1- [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):+ [email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])):dependencies:'@jest/types': 29.6.3import-local: 3.2.0- jest-cli: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest-cli: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))transitivePeerDependencies:- '@types/node'- babel-plugin-macros@@ -13120,7 +13059,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4isarray: 2.0.5jsonify: 0.0.1object-keys: 1.1.1@@ -13521,26 +13460,26 @@ snapshots:- [email protected](@babel/[email protected])([email protected]([email protected]))([email protected]):+ [email protected](@babel/[email protected])([email protected]([email protected]))([email protected]):dependencies:- '@next/env': 15.2.0+ '@next/env': 15.2.1'@swc/counter': 0.1.3'@swc/helpers': 0.5.15busboy: 1.6.0- caniuse-lite: 1.0.30001701+ caniuse-lite: 1.0.30001702postcss: 8.4.31react: 19.0.0react-dom: 19.0.0([email protected])styled-jsx: 5.1.6(@babel/[email protected])([email protected])optionalDependencies:- '@next/swc-darwin-arm64': 15.2.0- '@next/swc-darwin-x64': 15.2.0- '@next/swc-linux-arm64-gnu': 15.2.0- '@next/swc-linux-arm64-musl': 15.2.0- '@next/swc-linux-x64-gnu': 15.2.0- '@next/swc-linux-x64-musl': 15.2.0- '@next/swc-win32-arm64-msvc': 15.2.0- '@next/swc-win32-x64-msvc': 15.2.0+ '@next/swc-darwin-arm64': 15.2.1+ '@next/swc-darwin-x64': 15.2.1+ '@next/swc-linux-arm64-gnu': 15.2.1+ '@next/swc-linux-arm64-musl': 15.2.1+ '@next/swc-linux-x64-gnu': 15.2.1+ '@next/swc-linux-x64-musl': 15.2.1+ '@next/swc-win32-arm64-msvc': 15.2.1+ '@next/swc-win32-x64-msvc': 15.2.1sharp: 0.33.5transitivePeerDependencies:- '@babel/core'@@ -13618,7 +13557,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1es-object-atoms: 1.1.1has-symbols: 1.1.0@@ -13646,7 +13585,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1es-object-atoms: 1.1.1@@ -13712,8 +13651,6 @@ snapshots:- [email protected]: {}-dependencies:callsites: 3.1.0@@ -13917,13 +13854,13 @@ snapshots:postcss: 8.5.3postcss-value-parser: 4.2.0- [email protected]([email protected])([email protected](@types/[email protected])([email protected])):+ [email protected]([email protected])([email protected](@types/[email protected])([email protected])):dependencies:lilconfig: 2.1.0yaml: 1.10.2optionalDependencies:postcss: 8.5.3- ts-node: 10.9.2(@types/[email protected])([email protected])+ ts-node: 10.9.2(@types/[email protected])([email protected])dependencies:@@ -14223,11 +14160,16 @@ snapshots:ansi-styles: 5.2.0react-is: 18.3.1dependencies:- '@prisma/engines': 6.1.0+ '@prisma/engines': 6.4.1+ esbuild: 0.25.0+ esbuild-register: 3.6.0([email protected])optionalDependencies:fsevents: 2.3.3+ typescript: 5.8.2+ transitivePeerDependencies:+ - supports-color@@ -14255,7 +14197,7 @@ snapshots:dependencies:side-channel: 1.1.0@@ -14378,10 +14320,6 @@ snapshots:dependencies:react: 19.0.0- dependencies:- react: 19.0.0-dependencies:'@formatjs/ecma402-abstract': 2.3.3@@ -14661,7 +14599,7 @@ snapshots:dependencies:rollup: 3.29.5- [email protected]([email protected])([email protected](@types/[email protected])([email protected])):+ [email protected]([email protected])([email protected](@types/[email protected])([email protected])):dependencies:chalk: 4.1.2concat-with-sourcemaps: 1.1.0@@ -14670,7 +14608,7 @@ snapshots:p-queue: 6.6.2pify: 5.0.0postcss: 8.5.3- postcss-load-config: 3.1.4([email protected])([email protected](@types/[email protected])([email protected]))+ postcss-load-config: 3.1.4([email protected])([email protected](@types/[email protected])([email protected]))postcss-modules: 4.3.1([email protected])promise.series: 0.2.0resolve: 1.22.10@@ -14706,7 +14644,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4get-intrinsic: 1.3.0has-symbols: 1.1.0isarray: 2.0.5@@ -14722,7 +14660,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0is-regex: 1.2.1@@ -14744,7 +14682,7 @@ snapshots:dependencies:- type-fest: 4.36.0+ type-fest: 4.37.0dependencies:@@ -14820,14 +14758,14 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0get-intrinsic: 1.3.0object-inspect: 1.13.4dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0get-intrinsic: 1.3.0object-inspect: 1.13.4@@ -14964,7 +14902,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1es-abstract: 1.23.9es-errors: 1.3.0@@ -14992,7 +14930,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-data-property: 1.1.4define-properties: 1.2.1es-abstract: 1.23.9@@ -15002,7 +14940,7 @@ snapshots:dependencies:call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4define-properties: 1.2.1es-object-atoms: 1.1.1@@ -15252,12 +15190,12 @@ snapshots:dependencies:typescript: 5.8.2- [email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]):+ [email protected](@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected](@types/[email protected])([email protected](@types/[email protected])([email protected])))([email protected]):dependencies:bs-logger: 0.2.6ejs: 3.1.10fast-json-stable-stringify: 2.1.0- jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))+ jest: 29.7.0(@types/[email protected])([email protected](@types/[email protected])([email protected]))jest-util: 29.7.0json5: 2.2.3lodash.memoize: 4.1.2@@ -15272,14 +15210,14 @@ snapshots:babel-jest: 29.7.0(@babel/[email protected])esbuild: 0.25.0dependencies:'@cspotcode/source-map-support': 0.8.1'@tsconfig/node10': 1.0.11'@tsconfig/node12': 1.0.11'@tsconfig/node14': 1.0.3'@tsconfig/node16': 1.0.4- '@types/node': 22.13.8+ '@types/node': 22.13.9acorn: 8.14.0acorn-walk: 8.3.4arg: 4.1.3@@ -15330,11 +15268,11 @@ snapshots:- [email protected]: {}+ [email protected]: {}dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4es-errors: 1.3.0is-typed-array: 1.1.15@@ -15375,7 +15313,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4has-bigints: 1.1.0has-symbols: 1.1.0which-boxed-primitive: 1.1.1@@ -15470,7 +15408,7 @@ snapshots:dependencies:- call-bound: 1.0.3+ call-bound: 1.0.4function.prototype.name: 1.1.8has-tostringtag: 1.0.2is-async-function: 2.1.1@@ -15495,7 +15433,7 @@ snapshots:dependencies:available-typed-arrays: 1.0.7call-bind: 1.0.8- call-bound: 1.0.3+ call-bound: 1.0.4for-each: 0.3.5gopd: 1.2.0has-tostringtag: 1.0.2@@ -15603,10 +15541,3 @@ snapshots:'@types/react': 19.0.10immer: 9.0.21react: 19.0.0-- [email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected])):- optionalDependencies:- '@types/react': 19.0.10- immer: 9.0.21- react: 19.0.0- use-sync-external-store: 1.4.0([email protected])diff --git a/src/app/(main)/App.tsx b/src/app/(main)/App.tsxindex 0ea6799fa..58ccb849a 100644--- a/src/app/(main)/App.tsx+++ b/src/app/(main)/App.tsx@@ -6,7 +6,7 @@ import { UpdateNotice } from './UpdateNotice';import { NavBar } from '@/app/(main)/NavBar';import { Page } from '@/components/layout/Page';import { useLogin, useConfig } from '@/components/hooks';-import { SideNav } from '@/app/(main)/SideNav';+import { Nav } from '@/app/(main)/Nav';export function App({ children }) {const { user, isLoading, error } = useLogin();@@ -30,8 +30,8 @@ export function App({ children }) {}return (- <Grid>- <SideNav />+ <Grid height="100vh" width="100%" columns="auto 1fr">+ <Nav /><Grid rows="auto 1fr"><NavBar /><Page>diff --git a/src/app/(main)/SideNav.tsx b/src/app/(main)/Nav.tsxsimilarity index 69%rename from src/app/(main)/SideNav.tsxrename to src/app/(main)/Nav.tsxindex e146b8b45..81f25f677 100644--- a/src/app/(main)/SideNav.tsx+++ b/src/app/(main)/Nav.tsx@@ -1,11 +1,21 @@+import { useState } from 'react';import Link from 'next/link';-import { SideNav as Nav, SideNavHeader, SideNavSection, SideNavItem } from '@umami/react-zen';+import {+ SideNav,+ SideNavHeader,+ SideNavSection,+ SideNavItem,+ Button,+ Icon,+ Row,+} from '@umami/react-zen';import { Lucide, Icons } from '@/components/icons';import { useMessages, useTeamUrl } from '@/components/hooks';-export function SideNav() {+export function Nav() {const { formatMessage, labels } = useMessages();const { renderTeamUrl } = useTeamUrl();+ const [isCollapsed, setCollapsed] = useState(false);const links = [{@@ -36,7 +46,7 @@ export function SideNav() {].filter(n => n);return (- <Nav>+ <SideNav isCollapsed={isCollapsed}><SideNavSection><SideNavHeader name="umami" icon={<Icons.Logo />} /></SideNavSection>@@ -49,6 +59,15 @@ export function SideNav() {);})}</SideNavSection>- </Nav>+ <SideNavSection>+ <Row justifyContent="flex-start">+ <Button onPress={() => setCollapsed(!isCollapsed)} variant="quiet">+ <Icon>+ <Lucide.PanelLeft />+ </Icon>+ </Button>+ </Row>+ </SideNavSection>+ </SideNav>);}diff --git a/src/app/(main)/NavBar.module.css b/src/app/(main)/NavBar.module.cssdeleted file mode 100644index 2db4a6d65..000000000--- a/src/app/(main)/NavBar.module.css+++ /dev/null@@ -1,60 +0,0 @@-.navbar {- display: grid;- grid-template-columns: max-content 1fr 1fr;- position: relative;- align-items: center;- height: 60px;- background: var(--base75);- border-bottom: 1px solid var(--base300);- padding: 0 20px;- z-index: 200;-}--.links {- display: flex;- flex-direction: row;- gap: 30px;- padding: 0 40px;- font-weight: 700;- max-height: 60px;- align-items: center;-}--.links a,-.links a:active,-.links a:visited {- color: var(--font-color200);- line-height: 60px;- border-bottom: 2px solid transparent;-}--.links a:hover {- color: var(--font-color100);- border-bottom: 2px solid var(--primary400);-}--.links a.selected {- color: var(--font-color100);- border-bottom: 2px solid var(--primary400);-}--.mobile {- flex-direction: row;- align-items: center;- justify-content: flex-end;- display: none;-}--@media only screen and (max-width: 768px) {- .navbar {- grid-template-columns: repeat(2, 1fr);- }-- .links {- display: none;- }-- .mobile {- display: flex;- }-}diff --git a/src/app/(main)/SideNav.module.css b/src/app/(main)/SideNav.module.cssdeleted file mode 100644index ac92d6234..000000000--- a/src/app/(main)/SideNav.module.css+++ /dev/null@@ -1,46 +0,0 @@-.sidenav {- position: fixed;- top: 0;- width: 200px;- height: 100vh;- background-color: var(--layer-color-1);- border-right: 1px solid var(--border-color);-}--.header {- display: flex;- align-items: center;- gap: var(--gap);- padding: var(--padding);-}--.name {- font-weight: var(--font-weight-bold);-}--.section {- padding: var(--spacing-3);- gap: var(--spacing-9);-}--.title {- font-weight: var(--font-weight-bold);-}--.items {- display: grid;- gap: var(--gap);-}--.item {- color: var(--font-color-muted) !important;- display: flex;- align-items: center;- gap: var(--gap);- padding: var(--padding);-}--.item:hover {- color: var(--font-color) !important;- background-color: var(--layer-color-2);-}diff --git a/src/app/(main)/console/TestConsole.tsx b/src/app/(main)/console/TestConsole.tsxindex 384532176..a93045e77 100644--- a/src/app/(main)/console/TestConsole.tsx+++ b/src/app/(main)/console/TestConsole.tsx@@ -1,4 +1,4 @@-import { Button } from 'react-basics';+import { Button } from '@umami/react-zen';import Link from 'next/link';import Script from 'next/script';import { WebsiteSelect } from '@/components/input/WebsiteSelect';diff --git a/src/app/(main)/dashboard/DashboardEdit.tsx b/src/app/(main)/dashboard/DashboardEdit.tsxindex 4cfc7ebd3..7dabdf641 100644--- a/src/app/(main)/dashboard/DashboardEdit.tsx+++ b/src/app/(main)/dashboard/DashboardEdit.tsx@@ -1,7 +1,7 @@import { useState, useMemo, useEffect } from 'react';import { DragDropContext, Draggable, Droppable } from '@hello-pangea/dnd';import classNames from 'classnames';-import { Button, Loading, Toggle, SearchField } from 'react-basics';+import { Button, Loading, Toggle, SearchField } from '@umami/react-zen';import { firstBy } from 'thenby';import { useDashboard, saveDashboard } from '@/store/dashboard';import { useMessages, useWebsites } from '@/components/hooks';diff --git a/src/app/(main)/dashboard/DashboardPage.tsx b/src/app/(main)/dashboard/DashboardPage.tsxindex 058837c5c..8944e8578 100644--- a/src/app/(main)/dashboard/DashboardPage.tsx+++ b/src/app/(main)/dashboard/DashboardPage.tsx@@ -1,5 +1,5 @@'use client';-import { Icon, Icons, Loading, Text } from 'react-basics';+import { Icon, Icons, Loading, Text } from '@umami/react-zen';import { PageHeader } from '@/components/layout/PageHeader';import { Pager } from '@/components/common/Pager';import { WebsiteChartList } from '../websites/[websiteId]/WebsiteChartList';diff --git a/src/app/(main)/dashboard/DashboardSettingsButton.tsx b/src/app/(main)/dashboard/DashboardSettingsButton.tsxindex 6e0ebae74..82585fe91 100644--- a/src/app/(main)/dashboard/DashboardSettingsButton.tsx+++ b/src/app/(main)/dashboard/DashboardSettingsButton.tsx@@ -1,4 +1,4 @@-import { TooltipPopup, Icon, Text, Flexbox, Button } from 'react-basics';+import { Row, TooltipTrigger, Tooltip, Icon, Text, Button } from '@umami/react-zen';import { Icons } from '@/components/icons';import { saveDashboard } from '@/store/dashboard';import { useMessages } from '@/components/hooks';@@ -15,20 +15,21 @@ export function DashboardSettingsButton() {};return (- <Flexbox gap={10}>- <TooltipPopup label={formatMessage(labels.toggleCharts)} position="bottom">- <Button onClick={handleToggleCharts}>+ <Row gap="3">+ <TooltipTrigger>+ <Button onPress={handleToggleCharts}><Icon><Icons.BarChart /></Icon></Button>- </TooltipPopup>- <Button onClick={handleEdit}>+ <Tooltip placement="bottom">{formatMessage(labels.toggleCharts)}</Tooltip>+ </TooltipTrigger>+ <Button onPress={handleEdit}><Icon><Icons.Edit /></Icon><Text>{formatMessage(labels.edit)}</Text></Button>- </Flexbox>+ </Row>);}diff --git a/src/app/(main)/profile/DateRangeSetting.tsx b/src/app/(main)/profile/DateRangeSetting.tsxindex b65490b77..27a021764 100644--- a/src/app/(main)/profile/DateRangeSetting.tsx+++ b/src/app/(main)/profile/DateRangeSetting.tsx@@ -1,5 +1,5 @@import { DateFilter } from '@/components/input/DateFilter';-import { Button, Flexbox } from 'react-basics';+import { Button, Flexbox } from '@umami/react-zen';import { useDateRange, useMessages } from '@/components/hooks';import { DEFAULT_DATE_RANGE } from '@/lib/constants';import { DateRange } from '@/lib/types';diff --git a/src/app/(main)/profile/LanguageSetting.tsx b/src/app/(main)/profile/LanguageSetting.tsxindex a4c950f73..efa9168e0 100644--- a/src/app/(main)/profile/LanguageSetting.tsx+++ b/src/app/(main)/profile/LanguageSetting.tsx@@ -1,5 +1,5 @@import { useState } from 'react';-import { Button, Dropdown, Item, Flexbox } from 'react-basics';+import { Button, Dropdown, Item, Flexbox } from '@umami/react-zen';import { useLocale, useMessages } from '@/components/hooks';import { DEFAULT_LOCALE } from '@/lib/constants';import { languages } from '@/lib/lang';diff --git a/src/app/(main)/profile/PasswordChangeButton.tsx b/src/app/(main)/profile/PasswordChangeButton.tsxindex 757c10bdc..8c7eef666 100644--- a/src/app/(main)/profile/PasswordChangeButton.tsx+++ b/src/app/(main)/profile/PasswordChangeButton.tsx@@ -1,29 +1,29 @@-import { Button, Icon, Text, useToasts, ModalTrigger, Modal } from 'react-basics';+import { Button, Icon, Text, useToast, DialogTrigger, Dialog, Modal } from '@umami/react-zen';import { PasswordEditForm } from '@/app/(main)/profile/PasswordEditForm';import { Icons } from '@/components/icons';import { useMessages } from '@/components/hooks';export function PasswordChangeButton() {const { formatMessage, labels, messages } = useMessages();- const { showToast } = useToasts();+ const { toast } = useToast();const handleSave = () => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));};return (- <>- <ModalTrigger>- <Button>- <Icon>- <Icons.Lock />- </Icon>- <Text>{formatMessage(labels.changePassword)}</Text>- </Button>- <Modal title={formatMessage(labels.changePassword)}>- {close => <PasswordEditForm onSave={handleSave} onClose={close} />}- </Modal>- </ModalTrigger>- </>+ <DialogTrigger>+ <Button>+ <Icon>+ <Icons.Lock />+ </Icon>+ <Text>{formatMessage(labels.changePassword)}</Text>+ </Button>+ <Modal>+ <Dialog title={formatMessage(labels.changePassword)}>+ {({ close }) => <PasswordEditForm onSave={handleSave} onClose={close} />}+ </Dialog>+ </Modal>+ </DialogTrigger>);}diff --git a/src/app/(main)/profile/PasswordEditForm.tsx b/src/app/(main)/profile/PasswordEditForm.tsxindex 18696d3ad..5256f5bc7 100644--- a/src/app/(main)/profile/PasswordEditForm.tsx+++ b/src/app/(main)/profile/PasswordEditForm.tsx@@ -1,5 +1,5 @@import { useRef } from 'react';-import { Form, FormRow, FormInput, FormButtons, PasswordField, Button } from 'react-basics';+import { Form, FormRow, FormInput, FormButtons, PasswordField, Button } from '@umami/react-zen';import { useApi, useMessages } from '@/components/hooks';export function PasswordEditForm({ onSave, onClose }) {diff --git a/src/app/(main)/profile/ProfileSettings.tsx b/src/app/(main)/profile/ProfileSettings.tsxindex 9b3c6bb4f..0de3cf8d3 100644--- a/src/app/(main)/profile/ProfileSettings.tsx+++ b/src/app/(main)/profile/ProfileSettings.tsx@@ -1,4 +1,4 @@-import { Form, FormRow } from 'react-basics';+import { Form, FormRow } from '@umami/react-zen';import { TimezoneSetting } from '@/app/(main)/profile/TimezoneSetting';import { DateRangeSetting } from '@/app/(main)/profile/DateRangeSetting';import { LanguageSetting } from '@/app/(main)/profile/LanguageSetting';diff --git a/src/app/(main)/profile/ThemeSetting.tsx b/src/app/(main)/profile/ThemeSetting.tsxindex cf49a7c53..89d188241 100644--- a/src/app/(main)/profile/ThemeSetting.tsx+++ b/src/app/(main)/profile/ThemeSetting.tsx@@ -1,5 +1,5 @@import classNames from 'classnames';-import { Button, Icon } from 'react-basics';+import { Button, Icon } from '@umami/react-zen';import { useTheme } from '@/components/hooks';import { Icons } from '@/components/icons';import styles from './ThemeSetting.module.css';diff --git a/src/app/(main)/profile/TimezoneSetting.tsx b/src/app/(main)/profile/TimezoneSetting.tsxindex 2181d873c..c5dd851d0 100644--- a/src/app/(main)/profile/TimezoneSetting.tsx+++ b/src/app/(main)/profile/TimezoneSetting.tsx@@ -1,5 +1,5 @@import { useState } from 'react';-import { Dropdown, Item, Button, Flexbox } from 'react-basics';+import { Dropdown, Item, Button, Flexbox } from '@umami/react-zen';import { useTimezone, useMessages } from '@/components/hooks';import { getTimezone } from '@/lib/date';import styles from './TimezoneSetting.module.css';diff --git a/src/app/(main)/reports/ReportDeleteButton.tsx b/src/app/(main)/reports/ReportDeleteButton.tsxindex 41448ed87..1f4286b88 100644--- a/src/app/(main)/reports/ReportDeleteButton.tsx+++ b/src/app/(main)/reports/ReportDeleteButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Icons, Modal, ModalTrigger, Text } from 'react-basics';+import { Button, Icon, Icons, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';import { useApi, useMessages, useModified } from '@/components/hooks';import { ConfirmationForm } from '@/components/common/ConfirmationForm';@@ -29,25 +29,29 @@ export function ReportDeleteButton({};return (- <ModalTrigger>+ <DialogTrigger><Button><Icon><Icons.Trash /></Icon><Text>{formatMessage(labels.delete)}</Text></Button>- <Modal title={formatMessage(labels.deleteReport)}>- {(close: () => void) => (- <ConfirmationForm- message={formatMessage(messages.confirmDelete, { target: <b>{reportName}</b> })}- isLoading={isPending}- error={error}- onConfirm={handleConfirm.bind(null, close)}- onClose={close}- buttonLabel={formatMessage(labels.delete)}- />- )}+ <Modal>+ <Dialog title={formatMessage(labels.deleteReport)}>+ {({ close }) => (+ <ConfirmationForm+ message={formatMessage(messages.confirmDelete, {+ target: <b key="report-name">{reportName}</b>,+ })}+ isLoading={isPending}+ error={error}+ onConfirm={handleConfirm.bind(null, close)}+ onClose={close}+ buttonLabel={formatMessage(labels.delete)}+ />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/reports/ReportsDataTable.tsx b/src/app/(main)/reports/ReportsDataTable.tsxindex 90fd291d7..8c071f9c3 100644--- a/src/app/(main)/reports/ReportsDataTable.tsx+++ b/src/app/(main)/reports/ReportsDataTable.tsx@@ -1,7 +1,7 @@+import { ReactNode } from 'react';import { useReports } from '@/components/hooks';-import { ReportsTable } from './ReportsTable';import { DataGrid } from '@/components/common/DataGrid';-import { ReactNode } from 'react';+import { ReportsTable } from './ReportsTable';export function ReportsDataTable({websiteId,diff --git a/src/app/(main)/reports/ReportsHeader.tsx b/src/app/(main)/reports/ReportsHeader.tsxindex 8cba861f1..2bc98c790 100644--- a/src/app/(main)/reports/ReportsHeader.tsx+++ b/src/app/(main)/reports/ReportsHeader.tsx@@ -1,5 +1,5 @@import { PageHeader } from '@/components/layout/PageHeader';-import { Icon, Icons, Text } from 'react-basics';+import { Icon, Icons, Text } from '@umami/react-zen';import { useLogin, useMessages, useTeamUrl } from '@/components/hooks';import { LinkButton } from '@/components/common/LinkButton';import { ROLES } from '@/lib/constants';diff --git a/src/app/(main)/reports/ReportsTable.tsx b/src/app/(main)/reports/ReportsTable.tsxindex 40eb94600..cc3443d77 100644--- a/src/app/(main)/reports/ReportsTable.tsx+++ b/src/app/(main)/reports/ReportsTable.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable, Icon, Icons, Text } from 'react-basics';+import { Icon, Icons, Text, DataTable, DataColumn, Row } from '@umami/react-zen';import { LinkButton } from '@/components/common/LinkButton';import { useMessages, useLogin, useTeamUrl } from '@/components/hooks';import { REPORT_TYPES } from '@/lib/constants';@@ -10,39 +10,39 @@ export function ReportsTable({ data = [], showDomain }: { data: any[]; showDomaiconst { renderTeamUrl } = useTeamUrl();return (- <GridTable data={data}>- <GridColumn name="name" label={formatMessage(labels.name)} />- <GridColumn name="description" label={formatMessage(labels.description)} />- <GridColumn name="type" label={formatMessage(labels.type)}>- {row => {+ <DataTable data={data}>+ <DataColumn id="name" label={formatMessage(labels.name)} />+ <DataColumn id="description" label={formatMessage(labels.description)} />+ <DataColumn id="type" label={formatMessage(labels.type)}>+ {(row: any) => {return formatMessage(labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === row.type)],);}}- </GridColumn>+ </DataColumn>{showDomain && (- <GridColumn name="domain" label={formatMessage(labels.domain)}>- {row => row?.website?.domain}- </GridColumn>+ <DataColumn id="domain" label={formatMessage(labels.domain)}>+ {(row: any) => row?.website?.domain}+ </DataColumn>)}- <GridColumn name="action" label="" alignment="end">- {row => {+ <DataColumn id="action" label="" align="end">+ {(row: any) => {const { id, name, userId, website } = row;return (- <>+ <Row gap="3">{(user.id === userId || user.id === website?.userId) && (<ReportDeleteButton reportId={id} reportName={name} />)}<LinkButton href={renderTeamUrl(`/reports/${id}`)}><Icon>- <Icons.ArrowRight />+ <Icons.Arrow /></Icon><Text>{formatMessage(labels.view)}</Text></LinkButton>- </>+ </Row>);}}- </GridColumn>- </GridTable>+ </DataColumn>+ </DataTable>);}diff --git a/src/app/(main)/reports/[reportId]/BaseParameters.tsx b/src/app/(main)/reports/[reportId]/BaseParameters.tsxindex 374699c96..879ed93b3 100644--- a/src/app/(main)/reports/[reportId]/BaseParameters.tsx+++ b/src/app/(main)/reports/[reportId]/BaseParameters.tsx@@ -1,5 +1,5 @@import { useContext } from 'react';-import { FormRow } from 'react-basics';+import { Column, Label } from '@umami/react-zen';import { parseDateRange } from '@/lib/date';import { DateFilter } from '@/components/input/DateFilter';import { WebsiteSelect } from '@/components/input/WebsiteSelect';@@ -40,16 +40,18 @@ export function BaseParameters({return (<>{showWebsiteSelect && (- <FormRow label={formatMessage(labels.website)}>+ <Column>+ <Label>{formatMessage(labels.website)}</Label>{allowWebsiteSelect ? (<WebsiteSelect teamId={teamId} websiteId={websiteId} onSelect={handleWebsiteSelect} />) : (name)}- </FormRow>+ </Column>)}{showDateSelect && (- <FormRow label={formatMessage(labels.dateRange)} className={styles.dropdown}>+ <Column className={styles.dropdown}>+ <Label>{formatMessage(labels.dateRange)}</Label>{allowDateSelect && (<DateFiltervalue={value}@@ -58,7 +60,7 @@ export function BaseParameters({onChange={handleDateChange}/>)}- </FormRow>+ </Column>)}</>);diff --git a/src/app/(main)/reports/[reportId]/FieldAggregateForm.tsx b/src/app/(main)/reports/[reportId]/FieldAggregateForm.tsxindex c3c6cb1d5..fd895c7ee 100644--- a/src/app/(main)/reports/[reportId]/FieldAggregateForm.tsx+++ b/src/app/(main)/reports/[reportId]/FieldAggregateForm.tsx@@ -1,4 +1,4 @@-import { Form, FormRow, Menu, Item } from 'react-basics';+import { Form, FormRow, Menu, Item } from '@umami/react-zen';import { useMessages } from '@/components/hooks';export function FieldAggregateForm({diff --git a/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx b/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsxindex bec97da74..a1ffe2c86 100644--- a/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx+++ b/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx@@ -4,19 +4,21 @@ import { OPERATORS } from '@/lib/constants';import { isEqualsOperator } from '@/lib/params';import {Button,- Dropdown,+ Column,+ Row,+ Select,Flexbox,- Form,- FormRow,Icon,Icons,- Item,Loading,Menu,+ MenuItem,+ ListItem,SearchField,Text,TextField,-} from 'react-basics';+ Label,+} from '@umami/react-zen';import styles from './FieldFilterEditForm.module.css';export interface FieldFilterFormProps {@@ -94,10 +96,6 @@ export function FieldFilterEditForm({: values;}, [value, formattedValues]);- const renderFilterValue = (value: any) => {- return filters.find((filter: { value: any }) => filter.value === value)?.label;- };-const handleAdd = () => {onChange({ name, type, operator, value: isEquals ? selected : value });};@@ -133,21 +131,21 @@ export function FieldFilterEditForm({};return (- <Form>- <FormRow label={label} className={styles.filter}>+ <Column>+ <Row className={styles.filter}>+ <Label>{label}</Label><Flexbox gap={10}>{allowFilterSelect && (- <Dropdown+ <SelectclassName={styles.dropdown}items={filterDropdownItems(name)}value={operator}- renderValue={renderFilterValue}onChange={handleOperatorChange}>- {({ value, label }) => {- return <Item key={value}>{label}</Item>;+ {({ value, label }: any) => {+ return <ListItem key={value}>{label}</ListItem>;}}- </Dropdown>+ </Select>)}{selected && isEquals && (<div className={styles.selected} onClick={handleReset}>@@ -163,7 +161,6 @@ export function FieldFilterEditForm({className={styles.text}value={value}placeholder={formatMessage(labels.enter)}- onChange={e => setValue(e.target.value)}onSearch={handleSearch}delay={500}onFocus={() => setShowMenu(true)}@@ -187,11 +184,11 @@ export function FieldFilterEditForm({/>)}</Flexbox>- <Button variant="primary" onClick={handleAdd} disabled={isDisabled}>+ <Button variant="primary" onPress={handleAdd} isDisabled={isDisabled}>{formatMessage(isNew ? labels.add : labels.update)}</Button>- </FormRow>- </Form>+ </Row>+ </Column>);}@@ -199,10 +196,10 @@ const ResultsMenu = ({ values, type, isLoading, onSelect }) => {const { formatValue } = useFormat();if (isLoading) {return (- <Menu className={styles.menu} variant="popup">- <Item>+ <Menu className={styles.menu}>+ <MenuItem><Loading icon="dots" position="center" />- </Item>+ </MenuItem></Menu>);}@@ -212,9 +209,9 @@ const ResultsMenu = ({ values, type, isLoading, onSelect }) => {}return (- <Menu className={styles.menu} variant="popup" onSelect={onSelect}>+ <Menu className={styles.menu} onSelectionChange={onSelect}>{values?.map(({ value }) => {- return <Item key={value}>{formatValue(value, type)}</Item>;+ return <MenuItem key={value}>{formatValue(value, type)}</MenuItem>;})}</Menu>);diff --git a/src/app/(main)/reports/[reportId]/FieldParameters.tsx b/src/app/(main)/reports/[reportId]/FieldParameters.tsxindex ff2e3db75..9c1ed9383 100644--- a/src/app/(main)/reports/[reportId]/FieldParameters.tsx+++ b/src/app/(main)/reports/[reportId]/FieldParameters.tsx@@ -1,7 +1,7 @@import { useFields, useMessages } from '@/components/hooks';import { Icons } from '@/components/icons';import { useContext } from 'react';-import { Button, FormRow, Icon, Popup, PopupTrigger } from 'react-basics';+import { Button, FormRow, Icon, Popup, PopupTrigger } from '@umami/react-zen';import { FieldSelectForm } from '../[reportId]/FieldSelectForm';import { ParameterList } from '../[reportId]/ParameterList';import { PopupForm } from '../[reportId]/PopupForm';diff --git a/src/app/(main)/reports/[reportId]/FieldSelectForm.tsx b/src/app/(main)/reports/[reportId]/FieldSelectForm.tsxindex 55ac70ea6..cc3ef08e0 100644--- a/src/app/(main)/reports/[reportId]/FieldSelectForm.tsx+++ b/src/app/(main)/reports/[reportId]/FieldSelectForm.tsx@@ -1,4 +1,4 @@-import { Menu, Item, Form, FormRow } from 'react-basics';+import { List, ListItem, Label, Column } from '@umami/react-zen';import { useMessages } from '@/components/hooks';import styles from './FieldSelectForm.module.css';import { Key } from 'react';@@ -13,19 +13,18 @@ export function FieldSelectForm({ fields = [], onSelect, showType = true }: Fielconst { formatMessage, labels } = useMessages();return (- <Form>- <FormRow label={formatMessage(labels.fields)}>- <Menu className={styles.menu} onSelect={key => onSelect(fields[key as any])}>- {fields.map(({ name, label, type }: any, index: Key) => {- return (- <Item key={index} className={styles.item}>- <div>{label || name}</div>- {showType && type && <div className={styles.type}>{type}</div>}- </Item>- );- })}- </Menu>- </FormRow>- </Form>+ <Column>+ <Label>{formatMessage(labels.fields)}</Label>+ <List onSelectionChange={key => onSelect(fields[key as any])}>+ {fields.map(({ name, label, type }: any, index: Key) => {+ return (+ <ListItem key={index} className={styles.item}>+ <div>{label || name}</div>+ {showType && type && <div className={styles.type}>{type}</div>}+ </ListItem>+ );+ })}+ </List>+ </Column>);}diff --git a/src/app/(main)/reports/[reportId]/FilterParameters.tsx b/src/app/(main)/reports/[reportId]/FilterParameters.tsxindex 0011e527d..39f15d822 100644--- a/src/app/(main)/reports/[reportId]/FilterParameters.tsx+++ b/src/app/(main)/reports/[reportId]/FilterParameters.tsx@@ -1,7 +1,7 @@import { useContext } from 'react';import { useMessages, useFormat, useFilters, useFields } from '@/components/hooks';import { Icons } from '@/components/icons';-import { Button, FormRow, Icon, Popup, PopupTrigger } from 'react-basics';+import { Button, FormRow, Icon, Popup, PopupTrigger } from '@umami/react-zen';import { FilterSelectForm } from '../[reportId]/FilterSelectForm';import { ParameterList } from '../[reportId]/ParameterList';import { PopupForm } from '../[reportId]/PopupForm';diff --git a/src/app/(main)/reports/[reportId]/ParameterList.tsx b/src/app/(main)/reports/[reportId]/ParameterList.tsxindex 4a93884c1..fc3c31f39 100644--- a/src/app/(main)/reports/[reportId]/ParameterList.tsx+++ b/src/app/(main)/reports/[reportId]/ParameterList.tsx@@ -1,5 +1,5 @@import { ReactNode } from 'react';-import { Icon } from 'react-basics';+import { Icon } from '@umami/react-zen';import { Icons } from '@/components/icons';import { Empty } from '@/components/common/Empty';import { useMessages } from '@/components/hooks';diff --git a/src/app/(main)/reports/[reportId]/Report.tsx b/src/app/(main)/reports/[reportId]/Report.tsxindex 1deb1204a..fa297337a 100644--- a/src/app/(main)/reports/[reportId]/Report.tsx+++ b/src/app/(main)/reports/[reportId]/Report.tsx@@ -1,5 +1,5 @@import { createContext, ReactNode } from 'react';-import { Loading } from 'react-basics';+import { Loading } from '@umami/react-zen';import classNames from 'classnames';import { useReport } from '@/components/hooks';import styles from './Report.module.css';diff --git a/src/app/(main)/reports/[reportId]/ReportHeader.tsx b/src/app/(main)/reports/[reportId]/ReportHeader.tsxindex d78d213b8..060ee6591 100644--- a/src/app/(main)/reports/[reportId]/ReportHeader.tsx+++ b/src/app/(main)/reports/[reportId]/ReportHeader.tsx@@ -1,5 +1,5 @@import { useContext } from 'react';-import { Icon, LoadingButton, InlineEditField, useToasts } from 'react-basics';+import { Icon, LoadingButton, InlineEditField, useToast } from '@umami/react-zen';import { useMessages, useApi, useNavigation, useTeamUrl } from '@/components/hooks';import { ReportContext } from './Report';import styles from './ReportHeader.module.css';@@ -9,7 +9,7 @@ import { Breadcrumb } from '@/components/common/Breadcrumb';export function ReportHeader({ icon }) {const { report, updateReport } = useContext(ReportContext);const { formatMessage, labels, messages } = useMessages();- const { showToast } = useToasts();+ const { toast } = useToast();const { router } = useNavigation();const { renderTeamUrl } = useTeamUrl();@@ -29,14 +29,14 @@ export function ReportHeader({ icon }) {if (!report.id) {create(report, {onSuccess: async ({ id }) => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));router.push(renderTeamUrl(`/reports/${id}`));},});} else {update(report, {onSuccess: async () => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));},});}@@ -94,7 +94,7 @@ export function ReportHeader({ icon }) {variant="primary"isLoading={isCreating || isUpdating}disabled={!websiteId || !dateRange?.value || !name}- onClick={handleSave}+ onPress={handleSave}>{formatMessage(labels.save)}</LoadingButton>diff --git a/src/app/(main)/reports/[reportId]/ReportMenu.tsx b/src/app/(main)/reports/[reportId]/ReportMenu.tsxindex b3dbee83f..2e5c5f24b 100644--- a/src/app/(main)/reports/[reportId]/ReportMenu.tsx+++ b/src/app/(main)/reports/[reportId]/ReportMenu.tsx@@ -1,7 +1,7 @@import { useContext, useState } from 'react';import { ReportContext } from './Report';import styles from './ReportMenu.module.css';-import { Icon, Icons } from 'react-basics';+import { Icon, Icons } from '@umami/react-zen';import classNames from 'classnames';export function ReportMenu({ children }) {diff --git a/src/app/(main)/reports/create/ReportTemplates.module.css b/src/app/(main)/reports/create/ReportTemplates.module.cssdeleted file mode 100644index 0cdcb8351..000000000--- a/src/app/(main)/reports/create/ReportTemplates.module.css+++ /dev/null@@ -1,32 +0,0 @@-.reports {- display: grid;- grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));- gap: 20px;-}--.report {- display: flex;- flex-direction: column;- gap: 20px;- padding: 20px;- border: 1px solid var(--base500);- border-radius: var(--border-radius);-}--.title {- display: flex;- gap: 10px;- align-items: center;- font-size: var(--font-size-lg);- font-weight: 700;-}--.description {- flex: 1;-}--.buttons {- display: flex;- align-items: center;- justify-content: center;-}diff --git a/src/app/(main)/reports/create/ReportTemplates.tsx b/src/app/(main)/reports/create/ReportTemplates.tsxindex b6472c62e..17a73f39c 100644--- a/src/app/(main)/reports/create/ReportTemplates.tsx+++ b/src/app/(main)/reports/create/ReportTemplates.tsx@@ -1,9 +1,8 @@-import { Button, Icon, Text } from '@umami/react-zen';+import { Icon, Text, Row, Column, Grid } from '@umami/react-zen';import { useMessages, useTeamUrl } from '@/components/hooks';import { Icons } from '@/components/icons';import { PageHeader } from '@/components/layout/PageHeader';-import Link from 'next/link';-import styles from './ReportTemplates.module.css';+import { LinkButton } from '@/components/common/LinkButton';export function ReportTemplates({ showHeader = true }: { showHeader?: boolean }) {const { formatMessage, labels } = useMessages();@@ -57,13 +56,13 @@ export function ReportTemplates({ showHeader = true }: { showHeader?: boolean })return (<>{showHeader && <PageHeader title={formatMessage(labels.reports)} />}- <div className={styles.reports}>+ <Grid columns="repeat(3, minmax(200px, 1fr))" gap="3">{reports.map(({ title, description, url, icon }) => {return (<ReportItem key={title} icon={icon} title={title} description={description} url={url} />);})}- </div>+ </Grid></>);}@@ -72,22 +71,22 @@ function ReportItem({ title, description, url, icon }) {const { formatMessage, labels } = useMessages();return (- <div className={styles.report}>- <div className={styles.title}>- <Icon size="lg">{icon}</Icon>- <Text>{title}</Text>- </div>- <div className={styles.description}>{description}</div>- <div className={styles.buttons}>- <Link href={url}>- <Button variant="primary">- <Icon>- <Icons.Plus />- </Icon>- <Text>{formatMessage(labels.create)}</Text>- </Button>- </Link>- </div>- </div>+ <Column gap="6" padding="6" borderSize="1" borderRadius="3" justifyContent="space-between">+ <Row gap="3" alignItems="center">+ <Icon size="md">{icon}</Icon>+ <Text size="5" weight="bold">+ {title}+ </Text>+ </Row>+ <Text>{description}</Text>+ <Row justifyContent="flex-end">+ <LinkButton href={url} variant="primary">+ <Icon fillColor="currentColor">+ <Icons.Plus />+ </Icon>+ <Text>{formatMessage(labels.create)}</Text>+ </LinkButton>+ </Row>+ </Column>);}diff --git a/src/app/(main)/reports/event-data/EventDataParameters.tsx b/src/app/(main)/reports/event-data/EventDataParameters.tsxindex 751b34942..814c9f551 100644--- a/src/app/(main)/reports/event-data/EventDataParameters.tsx+++ b/src/app/(main)/reports/event-data/EventDataParameters.tsx@@ -1,5 +1,13 @@import { useContext } from 'react';-import { Form, FormRow, FormButtons, SubmitButton, PopupTrigger, Icon, Popup } from 'react-basics';+import {+ Form,+ FormRow,+ FormButtons,+ SubmitButton,+ PopupTrigger,+ Icon,+ Popup,+} from '@umami/react-zen';import { Empty } from '@/components/common/Empty';import { Icons } from '@/components/icons';import { useApi, useMessages } from '@/components/hooks';diff --git a/src/app/(main)/reports/event-data/EventDataTable.tsx b/src/app/(main)/reports/event-data/EventDataTable.tsxindex 60cdd7dd2..0dd99db58 100644--- a/src/app/(main)/reports/event-data/EventDataTable.tsx+++ b/src/app/(main)/reports/event-data/EventDataTable.tsx@@ -1,5 +1,5 @@import { useContext } from 'react';-import { GridTable, GridColumn } from 'react-basics';+import { GridTable, GridColumn } from '@umami/react-zen';import { useMessages } from '@/components/hooks';import { ReportContext } from '../[reportId]/Report';diff --git a/src/app/(main)/reports/funnel/FunnelParameters.tsx b/src/app/(main)/reports/funnel/FunnelParameters.tsxindex 9089f7de2..553d7f659 100644--- a/src/app/(main)/reports/funnel/FunnelParameters.tsx+++ b/src/app/(main)/reports/funnel/FunnelParameters.tsx@@ -11,7 +11,7 @@ import {SubmitButton,TextField,Button,-} from 'react-basics';+} from '@umami/react-zen';import { Icons } from '@/components/icons';import { FunnelStepAddForm } from './FunnelStepAddForm';import { ReportContext } from '../[reportId]/Report';diff --git a/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx b/src/app/(main)/reports/funnel/FunnelStepAddForm.tsxindex 3d0ab2c1d..067adb6e8 100644--- a/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx+++ b/src/app/(main)/reports/funnel/FunnelStepAddForm.tsx@@ -1,6 +1,6 @@import { useState } from 'react';import { useMessages } from '@/components/hooks';-import { Button, FormRow, TextField, Flexbox, Dropdown, Item } from 'react-basics';+import { Button, FormRow, TextField, Flexbox, Dropdown, Item } from '@umami/react-zen';import styles from './FunnelStepAddForm.module.css';export interface FunnelStepAddFormProps {diff --git a/src/app/(main)/reports/goals/GoalsAddForm.tsx b/src/app/(main)/reports/goals/GoalsAddForm.tsxindex 57ca0dda5..cdeb526c8 100644--- a/src/app/(main)/reports/goals/GoalsAddForm.tsx+++ b/src/app/(main)/reports/goals/GoalsAddForm.tsx@@ -1,6 +1,6 @@import { useMessages } from '@/components/hooks';import { useState } from 'react';-import { Button, Dropdown, Flexbox, FormRow, Item, TextField } from 'react-basics';+import { Button, Dropdown, Flexbox, FormRow, Item, TextField } from '@umami/react-zen';import styles from './GoalsAddForm.module.css';export function GoalsAddForm({diff --git a/src/app/(main)/reports/goals/GoalsParameters.tsx b/src/app/(main)/reports/goals/GoalsParameters.tsxindex 63407d906..d387601f8 100644--- a/src/app/(main)/reports/goals/GoalsParameters.tsx+++ b/src/app/(main)/reports/goals/GoalsParameters.tsx@@ -12,7 +12,7 @@ import {Popup,PopupTrigger,SubmitButton,-} from 'react-basics';+} from '@umami/react-zen';import { BaseParameters } from '../[reportId]/BaseParameters';import { ParameterList } from '../[reportId]/ParameterList';import { PopupForm } from '../[reportId]/PopupForm';diff --git a/src/app/(main)/reports/insights/InsightsParameters.tsx b/src/app/(main)/reports/insights/InsightsParameters.tsxindex 8aa6ac57a..4677623c5 100644--- a/src/app/(main)/reports/insights/InsightsParameters.tsx+++ b/src/app/(main)/reports/insights/InsightsParameters.tsx@@ -1,6 +1,6 @@import { useMessages } from '@/components/hooks';import { useContext } from 'react';-import { Form, FormButtons, SubmitButton } from 'react-basics';+import { Form, FormButtons, SubmitButton } from '@umami/react-zen';import { BaseParameters } from '../[reportId]/BaseParameters';import { ReportContext } from '../[reportId]/Report';import { FieldParameters } from '../[reportId]/FieldParameters';diff --git a/src/app/(main)/reports/insights/InsightsTable.tsx b/src/app/(main)/reports/insights/InsightsTable.tsxindex 848135d0a..0e06228a1 100644--- a/src/app/(main)/reports/insights/InsightsTable.tsx+++ b/src/app/(main)/reports/insights/InsightsTable.tsx@@ -1,5 +1,5 @@import { useContext, useEffect, useState } from 'react';-import { GridTable, GridColumn } from 'react-basics';+import { GridTable, GridColumn } from '@umami/react-zen';import { useFormat, useMessages } from '@/components/hooks';import { ReportContext } from '../[reportId]/Report';import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';diff --git a/src/app/(main)/reports/journey/JourneyParameters.tsx b/src/app/(main)/reports/journey/JourneyParameters.tsxindex 3118265c8..cae2f6457 100644--- a/src/app/(main)/reports/journey/JourneyParameters.tsx+++ b/src/app/(main)/reports/journey/JourneyParameters.tsx@@ -9,7 +9,7 @@ import {Item,SubmitButton,TextField,-} from 'react-basics';+} from '@umami/react-zen';import { ReportContext } from '../[reportId]/Report';import { BaseParameters } from '../[reportId]/BaseParameters';diff --git a/src/app/(main)/reports/journey/JourneyView.tsx b/src/app/(main)/reports/journey/JourneyView.tsxindex 3df54d180..f4d2c3292 100644--- a/src/app/(main)/reports/journey/JourneyView.tsx+++ b/src/app/(main)/reports/journey/JourneyView.tsx@@ -1,5 +1,5 @@import { useContext, useMemo, useState } from 'react';-import { TextOverflow, TooltipPopup } from 'react-basics';+import { TextOverflow, TooltipPopup } from '@umami/react-zen';import { firstBy } from 'thenby';import classNames from 'classnames';import { useEscapeKey, useMessages } from '@/components/hooks';diff --git a/src/app/(main)/reports/retention/RetentionParameters.tsx b/src/app/(main)/reports/retention/RetentionParameters.tsxindex 42ae179b8..434848b30 100644--- a/src/app/(main)/reports/retention/RetentionParameters.tsx+++ b/src/app/(main)/reports/retention/RetentionParameters.tsx@@ -1,8 +1,7 @@import { useContext } from 'react';import { useMessages } from '@/components/hooks';-import { Form, FormButtons, FormRow, SubmitButton } from 'react-basics';+import { Form, FormButtons, FormSubmitButton } from '@umami/react-zen';import { ReportContext } from '../[reportId]/Report';-import { MonthSelect } from '@/components/input/MonthSelect';import { BaseParameters } from '../[reportId]/BaseParameters';import { parseDateRange } from '@/lib/date';@@ -31,13 +30,11 @@ export function RetentionParameters() {return (<Form values={parameters} onSubmit={handleSubmit} preventSubmit={true}><BaseParameters showDateSelect={false} allowWebsiteSelect={!id} />- <FormRow label={formatMessage(labels.date)}>- <MonthSelect date={startDate} onChange={handleDateChange} />- </FormRow>+<FormButtons>- <SubmitButton variant="primary" disabled={queryDisabled} isLoading={isRunning}>+ <FormSubmitButton variant="primary" disabled={queryDisabled} isLoading={isRunning}>{formatMessage(labels.runQuery)}- </SubmitButton>+ </FormSubmitButton></FormButtons></Form>);diff --git a/src/app/(main)/reports/revenue/RevenueParameters.tsx b/src/app/(main)/reports/revenue/RevenueParameters.tsxindex 8451644e1..d75caa0c1 100644--- a/src/app/(main)/reports/revenue/RevenueParameters.tsx+++ b/src/app/(main)/reports/revenue/RevenueParameters.tsx@@ -1,7 +1,15 @@import { useMessages } from '@/components/hooks';import { useRevenueValues } from '@/components/hooks/queries/useRevenueValues';import { useContext } from 'react';-import { Dropdown, Form, FormButtons, FormInput, FormRow, Item, SubmitButton } from 'react-basics';+import {+ Dropdown,+ Form,+ FormButtons,+ FormInput,+ FormRow,+ Item,+ SubmitButton,+} from '@umami/react-zen';import { BaseParameters } from '../[reportId]/BaseParameters';import { ReportContext } from '../[reportId]/Report';diff --git a/src/app/(main)/reports/revenue/RevenueTable.tsx b/src/app/(main)/reports/revenue/RevenueTable.tsxindex 9e5ab2162..52f2c4d0a 100644--- a/src/app/(main)/reports/revenue/RevenueTable.tsx+++ b/src/app/(main)/reports/revenue/RevenueTable.tsx@@ -1,7 +1,7 @@import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';import { useMessages } from '@/components/hooks';import { useContext } from 'react';-import { GridColumn, GridTable } from 'react-basics';+import { GridColumn, GridTable } from '@umami/react-zen';import { ReportContext } from '../[reportId]/Report';import { formatLongCurrency } from '@/lib/format';diff --git a/src/app/(main)/reports/utm/UTMParameters.tsx b/src/app/(main)/reports/utm/UTMParameters.tsxindex 2a43fc401..c666d6369 100644--- a/src/app/(main)/reports/utm/UTMParameters.tsx+++ b/src/app/(main)/reports/utm/UTMParameters.tsx@@ -1,6 +1,6 @@import { useContext } from 'react';import { useMessages } from '@/components/hooks';-import { Form, FormButtons, SubmitButton } from 'react-basics';+import { Form, FormButtons, SubmitButton } from '@umami/react-zen';import { ReportContext } from '../[reportId]/Report';import { BaseParameters } from '../[reportId]/BaseParameters';diff --git a/src/app/(main)/settings/teams/TeamAddForm.tsx b/src/app/(main)/settings/teams/TeamAddForm.tsxindex c53db62a1..e015fb587 100644--- a/src/app/(main)/settings/teams/TeamAddForm.tsx+++ b/src/app/(main)/settings/teams/TeamAddForm.tsx@@ -3,11 +3,10 @@ import {Button,Form,FormButtons,- FormInput,- FormRow,- SubmitButton,+ FormField,+ FormSubmitButton,TextField,-} from 'react-basics';+} from '@umami/react-zen';export function TeamAddForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) {const { formatMessage, labels } = useMessages();@@ -27,16 +26,14 @@ export function TeamAddForm({ onSave, onClose }: { onSave: () => void; onClose:return (<Form onSubmit={handleSubmit} error={error}>- <FormRow label={formatMessage(labels.name)}>- <FormInput name="name" rules={{ required: formatMessage(labels.required) }}>- <TextField autoComplete="off" />- </FormInput>- </FormRow>- <FormButtons flex>- <SubmitButton variant="primary" disabled={isPending}>+ <FormField name="name" label={formatMessage(labels.name)}>+ <TextField autoComplete="off" />+ </FormField>+ <FormButtons>+ <FormSubmitButton variant="primary" disabled={isPending}>{formatMessage(labels.save)}- </SubmitButton>- <Button disabled={isPending} onClick={onClose}>+ </FormSubmitButton>+ <Button isDisabled={isPending} onPress={onClose}>{formatMessage(labels.cancel)}</Button></FormButtons>diff --git a/src/app/(main)/settings/teams/TeamJoinForm.tsx b/src/app/(main)/settings/teams/TeamJoinForm.tsxindex 21a1d799e..2016aff32 100644--- a/src/app/(main)/settings/teams/TeamJoinForm.tsx+++ b/src/app/(main)/settings/teams/TeamJoinForm.tsx@@ -1,20 +1,17 @@-import { useRef } from 'react';import {Form,- FormRow,- FormInput,+ FormField,FormButtons,TextField,Button,- SubmitButton,-} from 'react-basics';+ FormSubmitButton,+} from '@umami/react-zen';import { useApi, useMessages, useModified } from '@/components/hooks';export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose: () => void }) {const { formatMessage, labels } = useMessages();const { post, useMutation } = useApi();const { mutate, error } = useMutation({ mutationFn: (data: any) => post('/teams/join', data) });- const ref = useRef(null);const { touch } = useModified();const handleSubmit = async (data: any) => {@@ -28,15 +25,17 @@ export function TeamJoinForm({ onSave, onClose }: { onSave: () => void; onClose:};return (- <Form ref={ref} onSubmit={handleSubmit} error={error}>- <FormRow label={formatMessage(labels.accessCode)}>- <FormInput name="accessCode" rules={{ required: formatMessage(labels.required) }}>- <TextField autoComplete="off" />- </FormInput>- </FormRow>- <FormButtons flex>- <SubmitButton variant="primary">{formatMessage(labels.join)}</SubmitButton>- <Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>+ <Form onSubmit={handleSubmit} error={error}>+ <FormField+ label={formatMessage(labels.accessCode)}+ name="accessCode"+ rules={{ required: formatMessage(labels.required) }}+ >+ <TextField autoComplete="off" />+ </FormField>+ <FormButtons>+ <FormSubmitButton variant="primary">{formatMessage(labels.join)}</FormSubmitButton>+ <Button onPress={onClose}>{formatMessage(labels.cancel)}</Button></FormButtons></Form>);diff --git a/src/app/(main)/settings/teams/TeamLeaveButton.tsx b/src/app/(main)/settings/teams/TeamLeaveButton.tsxindex 4d373c54a..1a6e217f0 100644--- a/src/app/(main)/settings/teams/TeamLeaveButton.tsx+++ b/src/app/(main)/settings/teams/TeamLeaveButton.tsx@@ -1,6 +1,6 @@import { useLocale, useLogin, useMessages, useModified } from '@/components/hooks';import { useRouter } from 'next/navigation';-import { Button, Icon, Icons, Modal, ModalTrigger, Text } from 'react-basics';+import { Button, Icon, Icons, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';import { TeamLeaveForm } from './TeamLeaveForm';export function TeamLeaveButton({ teamId, teamName }: { teamId: string; teamName: string }) {@@ -16,24 +16,26 @@ export function TeamLeaveButton({ teamId, teamName }: { teamId: string; teamName};return (- <ModalTrigger>+ <DialogTrigger><Button variant="secondary"><Icon rotate={dir === 'rtl' ? 180 : 0}><Icons.Logout /></Icon><Text>{formatMessage(labels.leave)}</Text></Button>- <Modal title={formatMessage(labels.leaveTeam)}>- {(close: () => void) => (- <TeamLeaveForm- teamId={teamId}- userId={user.id}- teamName={teamName}- onSave={handleLeave}- onClose={close}- />- )}+ <Modal>+ <Dialog title={formatMessage(labels.leaveTeam)}>+ {({ close }) => (+ <TeamLeaveForm+ teamId={teamId}+ userId={user.id}+ teamName={teamName}+ onSave={handleLeave}+ onClose={close}+ />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/settings/teams/TeamsAddButton.tsx b/src/app/(main)/settings/teams/TeamsAddButton.tsxindex 72feefe6d..d0adb52cf 100644--- a/src/app/(main)/settings/teams/TeamsAddButton.tsx+++ b/src/app/(main)/settings/teams/TeamsAddButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Modal, ModalTrigger, Text, useToasts } from 'react-basics';+import { Button, Icon, Modal, DialogTrigger, Dialog, Text, useToast } from '@umami/react-zen';import { Icons } from '@/components/icons';import { useMessages, useModified } from '@/components/hooks';import { TeamAddForm } from './TeamAddForm';@@ -6,26 +6,28 @@ import { messages } from '@/components/messages';export function TeamsAddButton({ onSave }: { onSave?: () => void }) {const { formatMessage, labels } = useMessages();- const { showToast } = useToasts();+ const { toast } = useToast();const { touch } = useModified();const handleSave = async () => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));touch('teams');onSave?.();};return (- <ModalTrigger>+ <DialogTrigger><Button variant="primary"><Icon><Icons.Plus /></Icon><Text>{formatMessage(labels.createTeam)}</Text></Button>- <Modal title={formatMessage(labels.createTeam)}>- {(close: () => void) => <TeamAddForm onSave={handleSave} onClose={close} />}+ <Modal>+ <Dialog title={formatMessage(labels.createTeam)}>+ {({ close }) => <TeamAddForm onSave={handleSave} onClose={close} />}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/settings/teams/TeamsHeader.tsx b/src/app/(main)/settings/teams/TeamsHeader.tsxindex 1dcf5a6e5..cbd61e6be 100644--- a/src/app/(main)/settings/teams/TeamsHeader.tsx+++ b/src/app/(main)/settings/teams/TeamsHeader.tsx@@ -1,4 +1,4 @@-import { Flexbox } from 'react-basics';+import { Row } from '@umami/react-zen';import { PageHeader } from '@/components/layout/PageHeader';import { ROLES } from '@/lib/constants';import { useLogin, useMessages } from '@/components/hooks';@@ -12,10 +12,10 @@ export function TeamsHeader({ allowCreate = true }: { allowCreate?: boolean }) {return (<PageHeader title={formatMessage(labels.teams)}>- <Flexbox gap={10}>+ <Row gap="3">{!cloudMode && <TeamsJoinButton />}{allowCreate && user.role !== ROLES.viewOnly && <TeamsAddButton />}- </Flexbox>+ </Row></PageHeader>);}diff --git a/src/app/(main)/settings/teams/TeamsJoinButton.tsx b/src/app/(main)/settings/teams/TeamsJoinButton.tsxindex 72899c707..74f40e17b 100644--- a/src/app/(main)/settings/teams/TeamsJoinButton.tsx+++ b/src/app/(main)/settings/teams/TeamsJoinButton.tsx@@ -1,29 +1,31 @@-import { Button, Icon, Modal, ModalTrigger, Text, useToasts } from 'react-basics';+import { Button, Icon, Modal, DialogTrigger, Dialog, Text, useToast } from '@umami/react-zen';import { Icons } from '@/components/icons';import { useMessages, useModified } from '@/components/hooks';import { TeamJoinForm } from './TeamJoinForm';export function TeamsJoinButton() {const { formatMessage, labels, messages } = useMessages();- const { showToast } = useToasts();+ const { toast } = useToast();const { touch } = useModified();const handleJoin = () => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));touch('teams');};return (- <ModalTrigger>+ <DialogTrigger><Button variant="secondary"><Icon><Icons.AddUser /></Icon><Text>{formatMessage(labels.joinTeam)}</Text></Button>- <Modal title={formatMessage(labels.joinTeam)}>- {close => <TeamJoinForm onSave={handleJoin} onClose={close} />}+ <Modal>+ <Dialog title={formatMessage(labels.joinTeam)}>+ {({ close }) => <TeamJoinForm onSave={handleJoin} onClose={close} />}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/settings/teams/TeamsTable.tsx b/src/app/(main)/settings/teams/TeamsTable.tsxindex 5028f20ac..179f7b7f1 100644--- a/src/app/(main)/settings/teams/TeamsTable.tsx+++ b/src/app/(main)/settings/teams/TeamsTable.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable, Icon, Text } from 'react-basics';+import { DataColumn, DataTable, Icon, Text } from '@umami/react-zen';import { useMessages } from '@/components/hooks';import { Icons } from '@/components/icons';import { ROLES } from '@/lib/constants';@@ -15,33 +15,33 @@ export function TeamsTable({const { formatMessage, labels } = useMessages();return (- <GridTable data={data}>- <GridColumn name="name" label={formatMessage(labels.name)} />- <GridColumn name="owner" label={formatMessage(labels.owner)}>- {row => row.teamUser.find(({ role }) => role === ROLES.teamOwner)?.user?.username}- </GridColumn>- <GridColumn name="websites" label={formatMessage(labels.websites)}>- {row => row._count.website}- </GridColumn>- <GridColumn name="members" label={formatMessage(labels.members)}>- {row => row._count.teamUser}- </GridColumn>+ <DataTable data={data}>+ <DataColumn id="name" label={formatMessage(labels.name)} />+ <DataColumn id="owner" label={formatMessage(labels.owner)}>+ {(row: any) => row.teamUser.find(({ role }) => role === ROLES.teamOwner)?.user?.username}+ </DataColumn>+ <DataColumn id="websites" label={formatMessage(labels.websites)}>+ {(row: any) => row._count.website}+ </DataColumn>+ <DataColumn id="members" label={formatMessage(labels.members)}>+ {(row: any) => row._count.teamUser}+ </DataColumn>{showActions && (- <GridColumn name="action" label=" " alignment="end">- {row => {+ <DataColumn id="action" label=" " align="end">+ {(row: any) => {const { id } = row;return (<LinkButton href={`/teams/${id}/settings`}><Icon>- <Icons.ArrowRight />+ <Icons.Arrow /></Icon><Text>{formatMessage(labels.view)}</Text></LinkButton>);}}- </GridColumn>+ </DataColumn>)}- </GridTable>+ </DataTable>);}diff --git a/src/app/(main)/settings/teams/WebsiteTags.tsx b/src/app/(main)/settings/teams/WebsiteTags.tsxindex 3258471ba..c55c8afef 100644--- a/src/app/(main)/settings/teams/WebsiteTags.tsx+++ b/src/app/(main)/settings/teams/WebsiteTags.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Icons, Text } from 'react-basics';+import { Button, Icon, Icons, Text } from '@umami/react-zen';import styles from './WebsiteTags.module.css';export function WebsiteTags({@@ -21,7 +21,7 @@ export function WebsiteTags({return (<div key={websiteId} className={styles.tag}>- <Button onClick={() => onClick(websiteId)} variant="primary" size="sm">+ <Button onPress={() => onClick(websiteId)} variant="primary" size="sm"><Text><b>{`${website.name}`}</b></Text>diff --git a/src/app/(main)/settings/users/UserAddForm.tsx b/src/app/(main)/settings/users/UserAddForm.tsxindex ef8d37783..03d0c08ee 100644--- a/src/app/(main)/settings/users/UserAddForm.tsx+++ b/src/app/(main)/settings/users/UserAddForm.tsx@@ -1,15 +1,14 @@import {- Dropdown,- Item,+ Select,+ ListItem,Form,- FormRow,+ FormField,FormButtons,- FormInput,+ FormSubmitButton,TextField,PasswordField,- SubmitButton,Button,-} from 'react-basics';+} from '@umami/react-zen';import { useApi, useMessages } from '@/components/hooks';import { ROLES } from '@/lib/constants';@@ -29,44 +28,38 @@ export function UserAddForm({ onSave, onClose }) {});};- const renderValue = (value: string) => {- if (value === ROLES.user) {- return formatMessage(labels.user);- }- if (value === ROLES.admin) {- return formatMessage(labels.admin);- }- if (value === ROLES.viewOnly) {- return formatMessage(labels.viewOnly);- }- };-return (<Form onSubmit={handleSubmit} error={error}>- <FormRow label={formatMessage(labels.username)}>- <FormInput name="username" rules={{ required: formatMessage(labels.required) }}>- <TextField autoComplete="new-username" />- </FormInput>- </FormRow>- <FormRow label={formatMessage(labels.password)}>- <FormInput name="password" rules={{ required: formatMessage(labels.required) }}>- <PasswordField autoComplete="new-password" />- </FormInput>- </FormRow>- <FormRow label={formatMessage(labels.role)}>- <FormInput name="role" rules={{ required: formatMessage(labels.required) }}>- <Dropdown renderValue={renderValue}>- <Item key={ROLES.viewOnly}>{formatMessage(labels.viewOnly)}</Item>- <Item key={ROLES.user}>{formatMessage(labels.user)}</Item>- <Item key={ROLES.admin}>{formatMessage(labels.admin)}</Item>- </Dropdown>- </FormInput>- </FormRow>- <FormButtons flex>- <SubmitButton variant="primary" disabled={false}>+ <FormField+ label={formatMessage(labels.username)}+ name="username"+ rules={{ required: formatMessage(labels.required) }}+ >+ <TextField autoComplete="new-username" />+ </FormField>+ <FormField+ label={formatMessage(labels.password)}+ name="password"+ rules={{ required: formatMessage(labels.required) }}+ >+ <PasswordField autoComplete="new-password" />+ </FormField>+ <FormField+ label={formatMessage(labels.role)}+ name="role"+ rules={{ required: formatMessage(labels.required) }}+ >+ <Select>+ <ListItem id={ROLES.viewOnly}>{formatMessage(labels.viewOnly)}</ListItem>+ <ListItem id={ROLES.user}>{formatMessage(labels.user)}</ListItem>+ <ListItem id={ROLES.admin}>{formatMessage(labels.admin)}</ListItem>+ </Select>+ </FormField>+ <FormButtons>+ <FormSubmitButton variant="primary" disabled={false}>{formatMessage(labels.save)}- </SubmitButton>- <Button disabled={isPending} onClick={onClose}>+ </FormSubmitButton>+ <Button isDisabled={isPending} onPress={onClose}>{formatMessage(labels.cancel)}</Button></FormButtons>diff --git a/src/app/(main)/settings/websites/[websiteId]/ShareUrl.tsx b/src/app/(main)/settings/websites/[websiteId]/ShareUrl.tsxindex d091f9639..95bfad8f4 100644--- a/src/app/(main)/settings/websites/[websiteId]/ShareUrl.tsx+++ b/src/app/(main)/settings/websites/[websiteId]/ShareUrl.tsx@@ -1,13 +1,14 @@import {Form,- FormRow,+ FormField,FormButtons,- Flexbox,TextField,Button,- Toggle,- LoadingButton,-} from 'react-basics';+ Switch,+ FormSubmitButton,+ Box,+ useToast,+} from '@umami/react-zen';import { useContext, useState } from 'react';import { getRandomChars } from '@/lib/crypto';import { useApi, useMessages, useModified } from '@/components/hooks';@@ -25,6 +26,7 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>mutationFn: (data: any) => post(`/websites/${website.id}`, data),});const { touch } = useModified();+ const { toast } = useToast();const url = `${hostUrl || window?.location.origin || ''}${process.env.basePath || ''@@ -34,7 +36,8 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>setId(generateId());};- const handleCheck = (checked: boolean) => {+ const handleSwitch = (checked: boolean) => {+ console.log({ checked });const data = {name: website.name,domain: website.domain,@@ -42,6 +45,7 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>};mutate(data, {onSuccess: async () => {+ toast(formatMessage(messages.saved));touch(`website:${website.id}`);onSave?.();},@@ -54,6 +58,7 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>{ name: website.name, domain: website.domain, shareId: id },{onSuccess: async () => {+ toast(formatMessage(messages.saved));touch(`website:${website.id}`);onSave?.();},@@ -63,27 +68,21 @@ export function ShareUrl({ hostUrl, onSave }: { hostUrl?: string; onSave?: () =>return (<>- <Toggle checked={Boolean(id)} onChecked={handleCheck} style={{ marginBottom: 30 }}>- {formatMessage(labels.enableShareUrl)}- </Toggle>+ <Box marginBottom="6">+ <Switch defaultSelected={!!id} isSelected={!!id} onChange={handleSwitch}>+ {formatMessage(labels.enableShareUrl)}+ </Switch>+ </Box>{id && (- <Form error={error}>- <FormRow>- <p>{formatMessage(messages.shareUrl)}</p>- <Flexbox gap={10}>- <TextField value={url} readOnly allowCopy />- <Button onClick={handleGenerate}>{formatMessage(labels.regenerate)}</Button>- </Flexbox>- </FormRow>- <FormButtons>- <LoadingButton- variant="primary"- disabled={id === shareId}- isLoading={isPending}- onClick={handleSave}- >+ <Form onSubmit={handleSave} error={error} values={{ id, url }}>+ <FormField label={formatMessage(messages.shareUrl)} name="url">+ <TextField isReadOnly allowCopy />+ </FormField>+ <FormButtons justifyContent="space-between">+ <Button onPress={handleGenerate}>{formatMessage(labels.regenerate)}</Button>+ <FormSubmitButton variant="primary" isDisabled={id === shareId} isLoading={isPending}>{formatMessage(labels.save)}- </LoadingButton>+ </FormSubmitButton></FormButtons></Form>)}diff --git a/src/app/(main)/settings/websites/[websiteId]/TrackingCode.tsx b/src/app/(main)/settings/websites/[websiteId]/TrackingCode.tsxindex f1852c620..cad0e8049 100644--- a/src/app/(main)/settings/websites/[websiteId]/TrackingCode.tsx+++ b/src/app/(main)/settings/websites/[websiteId]/TrackingCode.tsx@@ -1,4 +1,4 @@-import { TextArea } from 'react-basics';+import { TextArea } from '@umami/react-zen';import { useMessages, useConfig } from '@/components/hooks';const SCRIPT_NAME = 'script.js';diff --git a/src/app/(main)/settings/websites/[websiteId]/WebsiteData.tsx b/src/app/(main)/settings/websites/[websiteId]/WebsiteData.tsxindex bf140c3ff..1db2a4413 100644--- a/src/app/(main)/settings/websites/[websiteId]/WebsiteData.tsx+++ b/src/app/(main)/settings/websites/[websiteId]/WebsiteData.tsx@@ -1,9 +1,10 @@-import { Button, Modal, ModalTrigger, ActionForm } from 'react-basics';+import { Button, Modal, DialogTrigger, Dialog, Column } from '@umami/react-zen';import { useRouter } from 'next/navigation';import { useLogin, useMessages, useModified, useTeams, useTeamUrl } from '@/components/hooks';import { WebsiteDeleteForm } from './WebsiteDeleteForm';import { WebsiteResetForm } from './WebsiteResetForm';import { WebsiteTransferForm } from './WebsiteTransferForm';+import { ActionForm } from '@/components/layout/ActionForm';import { ROLES } from '@/lib/constants';export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?: () => void }) {@@ -39,50 +40,58 @@ export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?:};return (- <>+ <Column gap="6"><ActionFormlabel={formatMessage(labels.transferWebsite)}description={formatMessage(messages.transferWebsite)}>- <ModalTrigger disabled={!canTransferWebsite}>- <Button variant="secondary" disabled={!canTransferWebsite}>+ <DialogTrigger>+ <Button variant="secondary" isDisabled={!canTransferWebsite}>{formatMessage(labels.transfer)}</Button>- <Modal title={formatMessage(labels.transferWebsite)}>- {(close: () => void) => (- <WebsiteTransferForm websiteId={websiteId} onSave={handleSave} onClose={close} />- )}+ <Modal>+ <Dialog title={formatMessage(labels.transferWebsite)}>+ {({ close }) => (+ <WebsiteTransferForm websiteId={websiteId} onSave={handleSave} onClose={close} />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger></ActionForm>+<ActionFormlabel={formatMessage(labels.resetWebsite)}description={formatMessage(messages.resetWebsiteWarning)}>- <ModalTrigger>+ <DialogTrigger><Button variant="secondary">{formatMessage(labels.reset)}</Button>- <Modal title={formatMessage(labels.resetWebsite)}>- {(close: () => void) => (- <WebsiteResetForm websiteId={websiteId} onSave={handleReset} onClose={close} />- )}+ <Modal>+ <Dialog title={formatMessage(labels.resetWebsite)}>+ {({ close }) => (+ <WebsiteResetForm websiteId={websiteId} onSave={handleReset} onClose={close} />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger></ActionForm>+<ActionFormlabel={formatMessage(labels.deleteWebsite)}description={formatMessage(messages.deleteWebsiteWarning)}>- <ModalTrigger>+ <DialogTrigger><Button data-test="button-delete" variant="danger">{formatMessage(labels.delete)}</Button>- <Modal title={formatMessage(labels.deleteWebsite)}>- {(close: () => void) => (- <WebsiteDeleteForm websiteId={websiteId} onSave={handleSave} onClose={close} />- )}+ <Modal>+ <Dialog title={formatMessage(labels.deleteWebsite)}>+ {({ close }) => (+ <WebsiteDeleteForm websiteId={websiteId} onSave={handleSave} onClose={close} />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger></ActionForm>- </>+ </Column>);}diff --git a/src/app/(main)/settings/websites/[websiteId]/WebsiteSettings.tsx b/src/app/(main)/settings/websites/[websiteId]/WebsiteSettings.tsxindex 8cb961826..d0bcc512d 100644--- a/src/app/(main)/settings/websites/[websiteId]/WebsiteSettings.tsx+++ b/src/app/(main)/settings/websites/[websiteId]/WebsiteSettings.tsx@@ -26,7 +26,7 @@ export function WebsiteSettings({<Link href={`/websites/${websiteId}`} target={openExternal ? '_blank' : null}><Button variant="primary"><Icon>- <Icons.ArrowRight />+ <Icons.Arrow /></Icon><Text>{formatMessage(labels.view)}</Text></Button>diff --git a/src/app/(main)/settings/websites/[websiteId]/WebsiteTransferForm.tsx b/src/app/(main)/settings/websites/[websiteId]/WebsiteTransferForm.tsxindex 4ac0fc692..719018bd6 100644--- a/src/app/(main)/settings/websites/[websiteId]/WebsiteTransferForm.tsx+++ b/src/app/(main)/settings/websites/[websiteId]/WebsiteTransferForm.tsx@@ -3,13 +3,13 @@ import {Button,Form,FormButtons,- FormRow,- LoadingButton,+ FormField,+ FormSubmitButton,Loading,- Dropdown,- Item,- Flexbox,-} from 'react-basics';+ Select,+ ListItem,+ Text,+} from '@umami/react-zen';import { useApi, useLogin, useMessages, useTeams } from '@/components/hooks';import { WebsiteContext } from '@/app/(main)/websites/[websiteId]/WebsiteProvider';import { ROLES } from '@/lib/constants';@@ -28,12 +28,19 @@ export function WebsiteTransferForm({const [teamId, setTeamId] = useState<string>(null);const { formatMessage, labels, messages } = useMessages();const { post, useMutation } = useApi();- const { mutate, isPending, error } = useMutation({+ const { mutate, error } = useMutation({mutationFn: (data: any) => post(`/websites/${websiteId}/transfer`, data),});const { result, query } = useTeams(user.id);const isTeamWebsite = !!website?.teamId;+ const items = result.data.filter(({ teamUser }) =>+ teamUser.find(+ ({ role, userId }) =>+ [ROLES.teamOwner, ROLES.teamManager].includes(role) && userId === user.id,+ ),+ );+const handleSubmit = async () => {mutate({@@ -53,45 +60,35 @@ export function WebsiteTransferForm({setTeamId(key as string);};- const renderValue = (teamId: string) => result?.data?.find(({ id }) => id === teamId)?.name;-if (query.isLoading) {return <Loading icon="dots" position="center" />;}return (- <Form error={error}>- <FormRow>- <Flexbox direction="column" gap={20}>- {formatMessage(- isTeamWebsite ? messages.transferTeamWebsiteToUser : messages.transferUserWebsiteToTeam,- )}- {!isTeamWebsite && (- <Dropdown onChange={handleChange} value={teamId} renderValue={renderValue}>- {result.data- .filter(({ teamUser }) =>- teamUser.find(- ({ role, userId }) =>- [ROLES.teamOwner, ROLES.teamManager].includes(role) && userId === user.id,- ),- )- .map(({ id, name }) => {- return <Item key={id}>{name}</Item>;- })}- </Dropdown>- )}- </Flexbox>- </FormRow>- <FormButtons flex>- <LoadingButton- variant="primary"- isLoading={isPending}- disabled={!isTeamWebsite && !teamId}- onClick={handleSubmit}- >+ <Form onSubmit={handleSubmit} error={error} values={{ teamId }}>+ <Text>+ {formatMessage(+ isTeamWebsite ? messages.transferTeamWebsiteToUser : messages.transferUserWebsiteToTeam,+ )}+ </Text>+ <FormField name="teamId">+ {!isTeamWebsite && (+ <Select onSelectionChange={handleChange} value={teamId}>+ {items.map(({ id, name }) => {+ return (+ <ListItem key={id} id={id}>+ {name}+ </ListItem>+ );+ })}+ </Select>+ )}+ </FormField>+ <FormButtons>+ <Button onPress={onClose}>{formatMessage(labels.cancel)}</Button>+ <FormSubmitButton variant="primary" isDisabled={!isTeamWebsite && !teamId}>{formatMessage(labels.transfer)}- </LoadingButton>- <Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>+ </FormSubmitButton></FormButtons></Form>);diff --git a/src/app/(main)/teams/[teamId]/TeamProvider.tsx b/src/app/(main)/teams/[teamId]/TeamProvider.tsxindex f19f81948..e2cba00b0 100644--- a/src/app/(main)/teams/[teamId]/TeamProvider.tsx+++ b/src/app/(main)/teams/[teamId]/TeamProvider.tsx@@ -1,7 +1,7 @@'use client';import { createContext, ReactNode, useEffect } from 'react';import { useTeam, useModified } from '@/components/hooks';-import { Loading } from 'react-basics';+import { Loading } from '@umami/react-zen';export const TeamContext = createContext(null);diff --git a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditButton.tsx b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditButton.tsxindex 5965ec5fb..4ddef649f 100644--- a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditButton.tsx+++ b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditButton.tsx@@ -1,5 +1,14 @@import { useMessages, useModified } from '@/components/hooks';-import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics';+import {+ Button,+ Icon,+ Icons,+ Modal,+ DialogTrigger,+ Dialog,+ Text,+ useToast,+} from '@umami/react-zen';import { TeamMemberEditForm } from './TeamMemberEditForm';export function TeamMemberEditButton({@@ -14,34 +23,36 @@ export function TeamMemberEditButton({onSave?: () => void;}) {const { formatMessage, labels, messages } = useMessages();- const { showToast } = useToasts();+ const { toast } = useToast();const { touch } = useModified();const handleSave = () => {- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));touch('teams:members');onSave?.();};return (- <ModalTrigger>+ <DialogTrigger><Button><Icon><Icons.Edit /></Icon><Text>{formatMessage(labels.edit)}</Text></Button>- <Modal title={formatMessage(labels.editMember)}>- {(close: () => void) => (- <TeamMemberEditForm- teamId={teamId}- userId={userId}- role={role}- onSave={handleSave}- onClose={close}- />- )}+ <Modal>+ <Dialog title={formatMessage(labels.editMember)}>+ {({ close }) => (+ <TeamMemberEditForm+ teamId={teamId}+ userId={userId}+ role={role}+ onSave={handleSave}+ onClose={close}+ />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditForm.tsx b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditForm.tsxindex 57c183883..6ccbf36a4 100644--- a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditForm.tsx+++ b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberEditForm.tsx@@ -2,14 +2,13 @@ import { useApi, useMessages } from '@/components/hooks';import { ROLES } from '@/lib/constants';import {Button,- Dropdown,+ Select,Form,FormButtons,- FormInput,- FormRow,- Item,- SubmitButton,-} from 'react-basics';+ FormField,+ ListItem,+ FormSubmitButton,+} from '@umami/react-zen';export function TeamMemberEditForm({teamId,@@ -39,39 +38,25 @@ export function TeamMemberEditForm({});};- const renderValue = (value: string) => {- if (value === ROLES.teamManager) {- return formatMessage(labels.manager);- }- if (value === ROLES.teamMember) {- return formatMessage(labels.member);- }- if (value === ROLES.teamViewOnly) {- return formatMessage(labels.viewOnly);- }- };-return (<Form onSubmit={handleSubmit} error={error} values={{ role }}>- <FormRow label={formatMessage(labels.role)}>- <FormInput name="role" rules={{ required: formatMessage(labels.required) }}>- <Dropdown- renderValue={renderValue}- style={{- minWidth: '250px',- }}- >- <Item key={ROLES.teamManager}>{formatMessage(labels.manager)}</Item>- <Item key={ROLES.teamMember}>{formatMessage(labels.member)}</Item>- <Item key={ROLES.teamViewOnly}>{formatMessage(labels.viewOnly)}</Item>- </Dropdown>- </FormInput>- </FormRow>- <FormButtons flex>- <SubmitButton variant="primary" disabled={false}>+ <FormField+ name="role"+ rules={{ required: formatMessage(labels.required) }}+ label={formatMessage(labels.role)}+ >+ <Select>+ <ListItem id={ROLES.teamManager}>{formatMessage(labels.manager)}</ListItem>+ <ListItem id={ROLES.teamMember}>{formatMessage(labels.member)}</ListItem>+ <ListItem id={ROLES.teamViewOnly}>{formatMessage(labels.viewOnly)}</ListItem>+ </Select>+ </FormField>++ <FormButtons>+ <FormSubmitButton variant="primary" disabled={false}>{formatMessage(labels.save)}- </SubmitButton>- <Button disabled={isPending} onClick={onClose}>+ </FormSubmitButton>+ <Button isDisabled={isPending} onPress={onClose}>{formatMessage(labels.cancel)}</Button></FormButtons>diff --git a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberRemoveButton.tsx b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberRemoveButton.tsxindex 80ef2ca85..29e08d14c 100644--- a/src/app/(main)/teams/[teamId]/settings/members/TeamMemberRemoveButton.tsx+++ b/src/app/(main)/teams/[teamId]/settings/members/TeamMemberRemoveButton.tsx@@ -1,7 +1,7 @@import { ConfirmationForm } from '@/components/common/ConfirmationForm';import { useApi, useMessages, useModified } from '@/components/hooks';import { messages } from '@/components/messages';-import { Button, Icon, Icons, Modal, ModalTrigger, Text } from 'react-basics';+import { Button, Icon, Icons, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';export function TeamMemberRemoveButton({teamId,@@ -33,25 +33,29 @@ export function TeamMemberRemoveButton({};return (- <ModalTrigger>+ <DialogTrigger><Button><Icon><Icons.Close /></Icon><Text>{formatMessage(labels.remove)}</Text></Button>- <Modal title={formatMessage(labels.removeMember)}>- {(close: () => void) => (- <ConfirmationForm- message={formatMessage(messages.confirmRemove, { target: <b>{userName}</b> })}- isLoading={isPending}- error={error}- onConfirm={handleConfirm.bind(null, close)}- onClose={close}- buttonLabel={formatMessage(labels.remove)}- />- )}+ <Modal>+ <Dialog title={formatMessage(labels.removeMember)}>+ {({ close }) => (+ <ConfirmationForm+ message={formatMessage(messages.confirmRemove, {+ target: <b key="username">{userName}</b>,+ })}+ isLoading={isPending}+ error={error}+ onConfirm={handleConfirm.bind(null, close)}+ onClose={close}+ buttonLabel={formatMessage(labels.remove)}+ />+ )}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger>);}diff --git a/src/app/(main)/teams/[teamId]/settings/members/TeamMembersTable.tsx b/src/app/(main)/teams/[teamId]/settings/members/TeamMembersTable.tsxindex 58e414637..23f38d400 100644--- a/src/app/(main)/teams/[teamId]/settings/members/TeamMembersTable.tsx+++ b/src/app/(main)/teams/[teamId]/settings/members/TeamMembersTable.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable } from 'react-basics';+import { DataColumn, DataTable } from '@umami/react-zen';import { useMessages, useLogin } from '@/components/hooks';import { ROLES } from '@/lib/constants';import { TeamMemberRemoveButton } from './TeamMemberRemoveButton';@@ -24,15 +24,15 @@ export function TeamMembersTable({};return (- <GridTable data={data}>- <GridColumn name="username" label={formatMessage(labels.username)}>- {row => row?.user?.username}- </GridColumn>- <GridColumn name="role" label={formatMessage(labels.role)}>- {row => roles[row?.role]}- </GridColumn>- <GridColumn name="action" label=" " alignment="end">- {row => {+ <DataTable data={data}>+ <DataColumn id="username" label={formatMessage(labels.username)}>+ {(row: any) => row?.user?.username}+ </DataColumn>+ <DataColumn id="role" label={formatMessage(labels.role)}>+ {(row: any) => roles[row?.role]}+ </DataColumn>+ <DataColumn id="action" align="end">+ {(row: any) => {return (allowEdit &&row?.role !== ROLES.teamOwner &&@@ -48,7 +48,7 @@ export function TeamMembersTable({));}}- </GridColumn>- </GridTable>+ </DataColumn>+ </DataTable>);}diff --git a/src/app/(main)/teams/[teamId]/settings/team/TeamDetails.tsx b/src/app/(main)/teams/[teamId]/settings/team/TeamDetails.tsxindex 18b43abdd..c23f4bfe6 100644--- a/src/app/(main)/teams/[teamId]/settings/team/TeamDetails.tsx+++ b/src/app/(main)/teams/[teamId]/settings/team/TeamDetails.tsx@@ -4,7 +4,7 @@ import { Icons } from '@/components/icons';import { PageHeader } from '@/components/layout/PageHeader';import { ROLES } from '@/lib/constants';import { useContext, useState } from 'react';-import { Flexbox, Item, Tabs } from 'react-basics';+import { Column, Tabs, TabList, Tab, TabPanel } from '@umami/react-zen';import { TeamLeaveButton } from '@/app/(main)/settings/teams/TeamLeaveButton';import { TeamManage } from './TeamManage';import { TeamEditForm } from './TeamEditForm';@@ -26,16 +26,22 @@ export function TeamDetails({ teamId }: { teamId: string }) {) && user.role !== ROLES.viewOnly;return (- <Flexbox direction="column">+ <Column><PageHeader title={team?.name} icon={<Icons.Users />}>{!isTeamOwner && <TeamLeaveButton teamId={team.id} teamName={team.name} />}</PageHeader>- <Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>- <Item key="details">{formatMessage(labels.details)}</Item>- {isTeamOwner && <Item key="manage">{formatMessage(labels.manage)}</Item>}+ <Tabs selectedKey={tab} onSelectionChange={(value: any) => setTab(value)}>+ <TabList>+ <Tab id="details">{formatMessage(labels.details)}</Tab>+ {isTeamOwner && <Tab id="manage">{formatMessage(labels.manage)}</Tab>}+ </TabList>+ <TabPanel id="details">+ <TeamEditForm teamId={teamId} allowEdit={canEdit} />+ </TabPanel>+ <TabPanel id="manage">+ <TeamManage teamId={teamId} />+ </TabPanel></Tabs>- {tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}- {tab === 'manage' && <TeamManage teamId={teamId} />}- </Flexbox>+ </Column>);}diff --git a/src/app/(main)/teams/[teamId]/settings/team/TeamEditForm.tsx b/src/app/(main)/teams/[teamId]/settings/team/TeamEditForm.tsxindex fc62a188f..02326864f 100644--- a/src/app/(main)/teams/[teamId]/settings/team/TeamEditForm.tsx+++ b/src/app/(main)/teams/[teamId]/settings/team/TeamEditForm.tsx@@ -1,20 +1,18 @@import {- SubmitButton,Form,- FormInput,- FormRow,+ FormField,FormButtons,+ FormSubmitButton,TextField,Button,- Flexbox,- useToasts,-} from 'react-basics';+ useToast,+} from '@umami/react-zen';import { getRandomChars } from '@/lib/crypto';-import { useContext, useRef, useState } from 'react';+import { useContext, useState } from 'react';import { useApi, useMessages, useModified } from '@/components/hooks';import { TeamContext } from '@/app/(main)/teams/[teamId]/TeamProvider';-const generateId = () => getRandomChars(16);+const generateId = () => `team_${getRandomChars(16)}`;export function TeamEditForm({ teamId, allowEdit }: { teamId: string; allowEdit?: boolean }) {const team = useContext(TeamContext);@@ -23,57 +21,48 @@ export function TeamEditForm({ teamId, allowEdit }: { teamId: string; allowEdit?const { mutate, error } = useMutation({mutationFn: (data: any) => post(`/teams/${teamId}`, data),});- const ref = useRef(null);const [accessCode, setAccessCode] = useState(team.accessCode);- const { showToast } = useToasts();+ const { toast } = useToast();const { touch } = useModified();const cloudMode = !!process.env.cloudMode;const handleSubmit = async (data: any) => {mutate(data, {onSuccess: async () => {- ref.current.reset(data);touch('teams');- showToast({ message: formatMessage(messages.saved), variant: 'success' });+ toast(formatMessage(messages.saved));},});};const handleRegenerate = () => {- const code = generateId();- ref.current.setValue('accessCode', code, {- shouldValidate: true,- shouldDirty: true,- });- setAccessCode(code);+ setAccessCode(generateId());};return (- <Form ref={ref} onSubmit={handleSubmit} error={error} values={team}>- <FormRow label={formatMessage(labels.teamId)}>- <TextField value={teamId} readOnly allowCopy />- </FormRow>- <FormRow label={formatMessage(labels.name)}>- {allowEdit && (- <FormInput name="name" rules={{ required: formatMessage(labels.required) }}>- <TextField />- </FormInput>- )}+ <Form onSubmit={handleSubmit} error={error} values={{ ...team, accessCode }}>+ <FormField name="id" label={formatMessage(labels.teamId)}>+ <TextField isReadOnly allowCopy />+ </FormField>+ <FormField+ name="name"+ label={formatMessage(labels.name)}+ rules={{ required: formatMessage(labels.required) }}+ >+ {allowEdit && <TextField />}{!allowEdit && team.name}- </FormRow>+ </FormField>{!cloudMode && allowEdit && (- <FormRow label={formatMessage(labels.accessCode)}>- <Flexbox gap={10}>- <TextField value={accessCode} readOnly allowCopy />- {allowEdit && (- <Button onClick={handleRegenerate}>{formatMessage(labels.regenerate)}</Button>- )}- </Flexbox>- </FormRow>+ <FormField name="accessCode" label={formatMessage(labels.accessCode)}>+ <TextField isReadOnly allowCopy />+ </FormField>)}{allowEdit && (- <FormButtons>- <SubmitButton variant="primary">{formatMessage(labels.save)}</SubmitButton>+ <FormButtons justifyContent="space-between">+ {allowEdit && (+ <Button onPress={handleRegenerate}>{formatMessage(labels.regenerate)}</Button>+ )}+ <FormSubmitButton variant="primary">{formatMessage(labels.save)}</FormSubmitButton></FormButtons>)}</Form>diff --git a/src/app/(main)/teams/[teamId]/settings/team/TeamManage.tsx b/src/app/(main)/teams/[teamId]/settings/team/TeamManage.tsxindex 172878946..8579500b3 100644--- a/src/app/(main)/teams/[teamId]/settings/team/TeamManage.tsx+++ b/src/app/(main)/teams/[teamId]/settings/team/TeamManage.tsx@@ -1,6 +1,7 @@import { useMessages, useModified } from '@/components/hooks';import { useRouter } from 'next/navigation';-import { ActionForm, Button, Modal, ModalTrigger } from 'react-basics';+import { Button, Modal, DialogTrigger, Dialog } from '@umami/react-zen';+import { ActionForm } from '@/components/layout/ActionForm';import { TeamDeleteForm } from './TeamDeleteForm';export function TeamManage({ teamId }: { teamId: string }) {@@ -18,14 +19,14 @@ export function TeamManage({ teamId }: { teamId: string }) {label={formatMessage(labels.deleteTeam)}description={formatMessage(messages.deleteTeamWarning)}>- <ModalTrigger>+ <DialogTrigger><Button variant="danger">{formatMessage(labels.delete)}</Button>- <Modal title={formatMessage(labels.deleteTeam)}>- {(close: () => void) => (- <TeamDeleteForm teamId={teamId} onSave={handleLeave} onClose={close} />- )}+ <Modal>+ <Dialog title={formatMessage(labels.deleteTeam)}>+ {({ close }) => <TeamDeleteForm teamId={teamId} onSave={handleLeave} onClose={close} />}+ </Dialog></Modal>- </ModalTrigger>+ </DialogTrigger></ActionForm>);}diff --git a/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsiteRemoveButton.tsx b/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsiteRemoveButton.tsxindex 6eaa3363b..3e112405d 100644--- a/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsiteRemoveButton.tsx+++ b/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsiteRemoveButton.tsx@@ -1,5 +1,5 @@import { useApi, useMessages } from '@/components/hooks';-import { Icon, Icons, LoadingButton, Text } from 'react-basics';+import { Icon, Icons, LoadingButton, Text } from '@umami/react-zen';export function TeamWebsiteRemoveButton({ teamId, websiteId, onSave }) {const { formatMessage, labels } = useMessages();diff --git a/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsitesTable.tsx b/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsitesTable.tsxindex 5e829608a..dc175d2e7 100644--- a/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsitesTable.tsx+++ b/src/app/(main)/teams/[teamId]/settings/websites/TeamWebsitesTable.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable, Icon, Text } from 'react-basics';+import { DataColumn, DataTable, Icon, Text } from '@umami/react-zen';import { useLogin, useMessages } from '@/components/hooks';import { Icons } from '@/components/icons';import { LinkButton } from '@/components/common/LinkButton';@@ -16,14 +16,14 @@ export function TeamWebsitesTable({const { formatMessage, labels } = useMessages();return (- <GridTable data={data}>- <GridColumn name="name" label={formatMessage(labels.name)} />- <GridColumn name="domain" label={formatMessage(labels.domain)} />- <GridColumn name="createdBy" label={formatMessage(labels.createdBy)}>- {row => row?.createUser?.username}- </GridColumn>- <GridColumn name="action" label=" " alignment="end">- {row => {+ <DataTable data={data}>+ <DataColumn id="name" label={formatMessage(labels.name)} />+ <DataColumn id="domain" label={formatMessage(labels.domain)} />+ <DataColumn id="createdBy" label={formatMessage(labels.createdBy)}>+ {(row: any) => row?.createUser?.username}+ </DataColumn>+ <DataColumn id="action" label=" " align="end">+ {(row: any) => {const { id: websiteId } = row;return (<>@@ -37,14 +37,14 @@ export function TeamWebsitesTable({)}<LinkButton href={`/teams/${teamId}/websites/${websiteId}`}><Icon>- <Icons.ArrowRight />+ <Icons.Arrow /></Icon><Text>{formatMessage(labels.view)}</Text></LinkButton></>);}}- </GridColumn>- </GridTable>+ </DataColumn>+ </DataTable>);}diff --git a/src/app/(main)/teams/[teamId]/settings/websites/[websiteId]/page.tsx b/src/app/(main)/teams/[teamId]/settings/websites/[websiteId]/page.tsxindex 22739a997..a18f8a2eb 100644--- a/src/app/(main)/teams/[teamId]/settings/websites/[websiteId]/page.tsx+++ b/src/app/(main)/teams/[teamId]/settings/websites/[websiteId]/page.tsx@@ -1,4 +1,4 @@-import { Page } from '@/app/(main)/settings/websites/[websiteId]/page';+import Page from '@/app/(main)/settings/websites/[websiteId]/page';export default function ({ params }) {return <Page params={params} />;diff --git a/src/app/(main)/websites/[websiteId]/WebsiteChartList.tsx b/src/app/(main)/websites/[websiteId]/WebsiteChartList.tsxindex e7a410aa2..19f1d2baa 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteChartList.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteChartList.tsx@@ -1,12 +1,12 @@-import { Button, Text, Icon, Icons } from 'react-basics';+import { Text, Icon, Icons } from '@umami/react-zen';import { useMemo } from 'react';import { firstBy } from 'thenby';-import Link from 'next/link';import { WebsiteChart } from './WebsiteChart';import { useDashboard } from '@/store/dashboard';import { WebsiteHeader } from './WebsiteHeader';import { WebsiteMetricsBar } from './WebsiteMetricsBar';-import { useMessages, useLocale, useTeamUrl } from '@/components/hooks';+import { useMessages, useTeamUrl } from '@/components/hooks';+import { LinkButton } from '@/components/common/LinkButton';export function WebsiteChartList({websites,@@ -20,7 +20,6 @@ export function WebsiteChartList({const { formatMessage, labels } = useMessages();const { websiteOrder, websiteActive } = useDashboard();const { renderTeamUrl } = useTeamUrl();- const { dir } = useLocale();const ordered = useMemo(() => {return websites@@ -35,16 +34,14 @@ export function WebsiteChartList({return index < limit ? (<div key={id}><WebsiteHeader websiteId={id} showLinks={false}>- <Link href={renderTeamUrl(`/websites/${id}`)}>- <Button variant="primary">- <Text>{formatMessage(labels.viewDetails)}</Text>+ <LinkButton href={renderTeamUrl(`/websites/${id}`)} variant="primary">+ <Text>{formatMessage(labels.viewDetails)}</Text>+ <Icon><Icon>- <Icon rotate={dir === 'rtl' ? 180 : 0}>- <Icons.ArrowRight />- </Icon>+ <Icons.Arrow /></Icon>- </Button>- </Link>+ </Icon>+ </LinkButton></WebsiteHeader><WebsiteMetricsBar websiteId={id} showChange={true} />{showCharts && <WebsiteChart websiteId={id} />}diff --git a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.module.css b/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.module.cssdeleted file mode 100644index afe2028ae..000000000--- a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.module.css+++ /dev/null@@ -1,64 +0,0 @@-.layout {- display: grid;- grid-template-columns: 300px 1fr;- border-top: 1px solid var(--base300);-}--.menu {- display: flex;- flex-direction: column;- position: relative;- padding: 20px 20px 20px 0;-}--.back {- display: inline-flex;- align-items: center;- align-self: center;- margin-bottom: 20px;-}--.content {- min-height: 800px;- padding: 20px 0 20px 20px;- border-left: 1px solid var(--base300);-}--.dropdown {- display: none;-}--@media screen and (max-width: 992px) {- .layout {- grid-template-columns: 1fr;- }-- .content {- border: 0;- }-- .back {- align-self: flex-start;- margin: 0;- }-- .nav {- display: none;- }-- .dropdown {- display: flex;- width: 200px;- align-self: flex-end;- }-- .menu {- display: flex;- flex-direction: row;- gap: 20px;- align-items: center;- justify-content: space-between;- padding-inline-end: 0;- z-index: 10;- }-}diff --git a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx b/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsxindex 7ca072c3c..0c6d8755b 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteExpandedView.tsx@@ -1,6 +1,6 @@-import { Dropdown, Icon, Icons, Item, Text } from 'react-basics';+import { Select, Icon, Icons, ListItem, Text, Grid, Column } from '@umami/react-zen';import { LinkButton } from '@/components/common/LinkButton';-import { useLocale, useMessages, useNavigation } from '@/components/hooks';+import { useMessages, useNavigation } from '@/components/hooks';import { MenuNav } from '@/components/layout/MenuNav';import { BrowsersTable } from '@/components/metrics/BrowsersTable';import { CitiesTable } from '@/components/metrics/CitiesTable';@@ -17,7 +17,7 @@ import { RegionsTable } from '@/components/metrics/RegionsTable';import { ScreenTable } from '@/components/metrics/ScreenTable';import { TagsTable } from '@/components/metrics/TagsTable';import { ChannelsTable } from '@/components/metrics/ChannelsTable';-import styles from './WebsiteExpandedView.module.css';+import Link from 'next/link';const views = {url: PagesTable,@@ -48,7 +48,6 @@ export function WebsiteExpandedView({websiteId: string;domainName?: string;}) {- const { dir } = useLocale();const { formatMessage, labels } = useMessages();const {router,@@ -136,39 +135,25 @@ export function WebsiteExpandedView({const DetailsComponent = views[view] || (() => null);+ /*const handleChange = (view: any) => {router.push(renderUrl({ view }));};const renderValue = (value: string) => items.find(({ key }) => key === value)?.label;-+*/return (- <div className={styles.layout}>- <div className={styles.menu}>- <LinkButton- href={renderUrl({ view: undefined })}- className={styles.back}- variant="quiet"- scroll={false}- >- <Icon rotate={dir === 'rtl' ? 0 : 180}>- <Icons.ArrowRight />+ <Grid columns="auto 1fr" gap="6">+ <Column gap="6" width="200px">+ <LinkButton href={renderUrl({ view: undefined })} variant="quiet" scroll={false}>+ <Icon rotate={180}>+ <Icons.Arrow /></Icon><Text>{formatMessage(labels.back)}</Text></LinkButton>- <MenuNav className={styles.nav} items={items} selectedKey={view} shallow={true} />- <Dropdown- className={styles.dropdown}- items={items}- value={view}- renderValue={renderValue}- onChange={handleChange}- alignment="end"- >- {({ key, label }) => <Item key={key}>{label}</Item>}- </Dropdown>- </div>- <div className={styles.content}>+ <MenuNav items={items} selectedKey={view} />+ </Column>+ <Column><DetailsComponentwebsiteId={websiteId}domainName={domainName}@@ -178,7 +163,7 @@ export function WebsiteExpandedView({allowFilter={true}allowSearch={true}/>- </div>- </div>+ </Column>+ </Grid>);}diff --git a/src/app/(main)/websites/[websiteId]/WebsiteFilterButton.tsx b/src/app/(main)/websites/[websiteId]/WebsiteFilterButton.tsxindex 12541bac1..6331250eb 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteFilterButton.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteFilterButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Icons, Popup, PopupTrigger, Text } from 'react-basics';+import { Button, Icon, Icons, Box, MenuTrigger, Popover, Text } from '@umami/react-zen';import { PopupForm } from '@/app/(main)/reports/[reportId]/PopupForm';import { FilterSelectForm } from '@/app/(main)/reports/[reportId]/FilterSelectForm';import { useFields, useMessages, useNavigation, useDateRange } from '@/components/hooks';@@ -7,13 +7,9 @@ import styles from './WebsiteFilterButton.module.css';export function WebsiteFilterButton({websiteId,- className,- position = 'bottom',- alignment = 'end',showText = true,}: {websiteId: string;- className?: string;position?: 'bottom' | 'top' | 'left' | 'right';alignment?: 'end' | 'center' | 'start';showText?: boolean;@@ -32,17 +28,17 @@ export function WebsiteFilterButton({};return (- <PopupTrigger className={className}>+ <MenuTrigger><Button className={styles.button} variant="quiet"><Icon><Icons.Plus /></Icon>{showText && <Text>{formatMessage(labels.filter)}</Text>}</Button>- <Popup position={position} alignment={alignment}>- {(close: () => void) => {+ <Popover placement="bottom end">+ {({ close }: any) => {return (- <PopupForm>+ <Box padding="3" backgroundColor="1"><FilterSelectFormwebsiteId={websiteId}fields={fields}@@ -53,10 +49,10 @@ export function WebsiteFilterButton({close();}}/>- </PopupForm>+ </Box>);}}- </Popup>- </PopupTrigger>+ </Popover>+ </MenuTrigger>);}diff --git a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsxindex b2b4a490a..dbd234958 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx@@ -1,5 +1,5 @@import { ReactNode } from 'react';-import { Button, Icon, Text } from 'react-basics';+import { Button, Icon, Text } from '@umami/react-zen';import Link from 'next/link';import { usePathname } from 'next/navigation';import classNames from 'classnames';diff --git a/src/app/(main)/websites/[websiteId]/WebsiteMetricsBar.tsx b/src/app/(main)/websites/[websiteId]/WebsiteMetricsBar.tsxindex c6870873f..a4b71701e 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteMetricsBar.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteMetricsBar.tsx@@ -1,4 +1,4 @@-import { Dropdown, Item } from 'react-basics';+import { Select, ListItem } from '@umami/react-zen';import classNames from 'classnames';import { useDateRange, useMessages, useSticky } from '@/components/hooks';import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';@@ -114,18 +114,16 @@ export function WebsiteMetricsBar({{compareMode && (<div className={styles.vs}><b>VS</b>- <Dropdown+ <SelectclassName={styles.dropdown}items={items}value={dateCompare || 'prev'}- renderValue={value => items.find(i => i.value === value)?.label}- alignment="end"onChange={(value: any) => setWebsiteDateCompare(websiteId, value)}>{items.map(({ label, value }) => (- <Item key={value}>{label}</Item>+ <ListItem key={value}>{label}</ListItem>))}- </Dropdown>+ </Select></div>)}</div>diff --git a/src/app/(main)/websites/[websiteId]/WebsiteProvider.tsx b/src/app/(main)/websites/[websiteId]/WebsiteProvider.tsxindex c843bc6af..4c11e2e98 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteProvider.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteProvider.tsx@@ -1,7 +1,7 @@'use client';import { createContext, ReactNode, useEffect } from 'react';import { useModified, useWebsite } from '@/components/hooks';-import { Loading } from 'react-basics';+import { Loading } from '@umami/react-zen';export const WebsiteContext = createContext(null);diff --git a/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx b/src/app/(main)/websites/[websiteId]/events/EventProperties.tsxindex 602497976..534433973 100644--- a/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx+++ b/src/app/(main)/websites/[websiteId]/events/EventProperties.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable } from 'react-basics';+import { GridColumn, GridTable } from '@umami/react-zen';import { useEventDataProperties, useEventDataValues, useMessages } from '@/components/hooks';import { LoadingPanel } from '@/components/common/LoadingPanel';import { PieChart } from '@/components/charts/PieChart';diff --git a/src/app/(main)/websites/[websiteId]/events/EventsMetricsBar.tsx b/src/app/(main)/websites/[websiteId]/events/EventsMetricsBar.tsxindex f6bb328cd..9aa92140f 100644--- a/src/app/(main)/websites/[websiteId]/events/EventsMetricsBar.tsx+++ b/src/app/(main)/websites/[websiteId]/events/EventsMetricsBar.tsx@@ -4,7 +4,7 @@ import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';import { MetricCard } from '@/components/metrics/MetricCard';import { MetricsBar } from '@/components/metrics/MetricsBar';import { formatLongNumber } from '@/lib/format';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';export function EventsMetricsBar({ websiteId }: { websiteId: string }) {const { formatMessage, labels } = useMessages();diff --git a/src/app/(main)/websites/[websiteId]/events/EventsPage.tsx b/src/app/(main)/websites/[websiteId]/events/EventsPage.tsxindex 1016c88c2..17f67e86b 100644--- a/src/app/(main)/websites/[websiteId]/events/EventsPage.tsx+++ b/src/app/(main)/websites/[websiteId]/events/EventsPage.tsx@@ -6,7 +6,7 @@ import { EventsChart } from '@/components/metrics/EventsChart';import { GridRow } from '@/components/layout/Grid';import { MetricsTable } from '@/components/metrics/MetricsTable';import { useMessages } from '@/components/hooks';-import { Item, Tabs } from 'react-basics';+import { Item, Tabs } from '@umami/react-zen';import { useState } from 'react';import { EventProperties } from './EventProperties';diff --git a/src/app/(main)/websites/[websiteId]/events/EventsTable.tsx b/src/app/(main)/websites/[websiteId]/events/EventsTable.tsxindex d97c9f2f2..b5c9165f5 100644--- a/src/app/(main)/websites/[websiteId]/events/EventsTable.tsx+++ b/src/app/(main)/websites/[websiteId]/events/EventsTable.tsx@@ -1,4 +1,4 @@-import { GridTable, GridColumn, Icon } from 'react-basics';+import { GridTable, GridColumn, Icon } from '@umami/react-zen';import { useMessages, useTeamUrl, useTimezone } from '@/components/hooks';import { Empty } from '@/components/common/Empty';import { Avatar } from '@/components/common/Avatar';diff --git a/src/app/(main)/websites/[websiteId]/realtime/RealtimeLog.tsx b/src/app/(main)/websites/[websiteId]/realtime/RealtimeLog.tsxindex 05cfc001a..db88822ea 100644--- a/src/app/(main)/websites/[websiteId]/realtime/RealtimeLog.tsx+++ b/src/app/(main)/websites/[websiteId]/realtime/RealtimeLog.tsx@@ -7,7 +7,7 @@ import { BROWSERS, OS_NAMES } from '@/lib/constants';import { stringToColor } from '@/lib/format';import { RealtimeData } from '@/lib/types';import { useContext, useMemo, useState } from 'react';-import { Icon, SearchField, StatusLight, Text } from 'react-basics';+import { Icon, SearchField, StatusLight, Text } from '@umami/react-zen';import { FixedSizeList } from 'react-window';import { WebsiteContext } from '../WebsiteProvider';import styles from './RealtimeLog.module.css';diff --git a/src/app/(main)/websites/[websiteId]/realtime/RealtimeUrls.tsx b/src/app/(main)/websites/[websiteId]/realtime/RealtimeUrls.tsxindex 6895a1e9c..12528f62e 100644--- a/src/app/(main)/websites/[websiteId]/realtime/RealtimeUrls.tsx+++ b/src/app/(main)/websites/[websiteId]/realtime/RealtimeUrls.tsx@@ -1,5 +1,5 @@import { Key, useContext, useState } from 'react';-import { ButtonGroup, Button, Flexbox } from 'react-basics';+import { ButtonGroup, Button, Flexbox } from '@umami/react-zen';import thenby from 'thenby';import { percentFilter } from '@/lib/filters';import { ListTable } from '@/components/metrics/ListTable';diff --git a/src/app/(main)/websites/[websiteId]/reports/WebsiteReportsPage.tsx b/src/app/(main)/websites/[websiteId]/reports/WebsiteReportsPage.tsxindex fe38ef6dd..20e02a6a0 100644--- a/src/app/(main)/websites/[websiteId]/reports/WebsiteReportsPage.tsx+++ b/src/app/(main)/websites/[websiteId]/reports/WebsiteReportsPage.tsx@@ -1,6 +1,6 @@'use client';import Link from 'next/link';-import { Button, Flexbox, Icon, Icons, Text } from 'react-basics';+import { Button, Flexbox, Icon, Icons, Text } from '@umami/react-zen';import { useMessages, useTeamUrl } from '@/components/hooks';import { WebsiteHeader } from '../WebsiteHeader';import { ReportsDataTable } from '@/app/(main)/reports/ReportsDataTable';diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsxindex bf36ddcab..7e2c5a9d5 100644--- a/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionProperties.tsx@@ -1,4 +1,4 @@-import { GridColumn, GridTable } from 'react-basics';+import { GridColumn, GridTable } from '@umami/react-zen';import { useSessionDataProperties, useSessionDataValues, useMessages } from '@/components/hooks';import { LoadingPanel } from '@/components/common/LoadingPanel';import { PieChart } from '@/components/charts/PieChart';diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsMetricsBar.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsMetricsBar.tsxindex 57e67228b..b1091010c 100644--- a/src/app/(main)/websites/[websiteId]/sessions/SessionsMetricsBar.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsMetricsBar.tsx@@ -4,7 +4,7 @@ import { WebsiteDateFilter } from '@/components/input/WebsiteDateFilter';import { MetricCard } from '@/components/metrics/MetricCard';import { MetricsBar } from '@/components/metrics/MetricsBar';import { formatLongNumber } from '@/lib/format';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';export function SessionsMetricsBar({ websiteId }: { websiteId: string }) {const { formatMessage, labels } = useMessages();diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsxindex 6be033700..5f18a9f03 100644--- a/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx@@ -5,7 +5,7 @@ import { SessionsMetricsBar } from './SessionsMetricsBar';import { SessionProperties } from './SessionProperties';import { WorldMap } from '@/components/metrics/WorldMap';import { GridRow } from '@/components/layout/Grid';-import { Item, Tabs } from 'react-basics';+import { Item, Tabs } from '@umami/react-zen';import { useState } from 'react';import { useMessages } from '@/components/hooks';import { SessionsWeekly } from './SessionsWeekly';diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsxindex bb2542171..d9c21319d 100644--- a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx@@ -1,5 +1,5 @@import Link from 'next/link';-import { GridColumn, GridTable } from 'react-basics';+import { GridColumn, GridTable } from '@umami/react-zen';import { useFormat, useMessages, useTimezone } from '@/components/hooks';import { Avatar } from '@/components/common/Avatar';import styles from './SessionsTable.module.css';diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsxindex 58e1c1a04..92ee3caa1 100644--- a/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsWeekly.tsx@@ -4,7 +4,7 @@ import { LoadingPanel } from '@/components/common/LoadingPanel';import { getDayOfWeekAsDate } from '@/lib/date';import styles from './SessionsWeekly.module.css';import classNames from 'classnames';-import { TooltipPopup } from 'react-basics';+import { TooltipPopup } from '@umami/react-zen';export function SessionsWeekly({ websiteId }: { websiteId: string }) {const { data, ...props } = useWebsiteSessionsWeekly(websiteId);diff --git a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionActivity.tsx b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionActivity.tsxindex 5a70a012b..73caa59ab 100644--- a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionActivity.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionActivity.tsx@@ -1,5 +1,5 @@import { isSameDay } from 'date-fns';-import { Loading, Icon, StatusLight } from 'react-basics';+import { Loading, Icon, StatusLight } from '@umami/react-zen';import { Icons } from '@/components/icons';import { useSessionActivity, useTimezone } from '@/components/hooks';import styles from './SessionActivity.module.css';diff --git a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionData.tsx b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionData.tsxindex cc85bf4e9..0288f4276 100644--- a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionData.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionData.tsx@@ -1,4 +1,4 @@-import { TextOverflow } from 'react-basics';+import { TextOverflow } from '@umami/react-zen';import { useMessages, useSessionData } from '@/components/hooks';import { Empty } from '@/components/common/Empty';import { DATA_TYPES } from '@/lib/constants';diff --git a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionInfo.tsx b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionInfo.tsxindex fc0535c1e..4374e6c2a 100644--- a/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionInfo.tsx+++ b/src/app/(main)/websites/[websiteId]/sessions/[sessionId]/SessionInfo.tsx@@ -1,6 +1,6 @@import { useFormat, useLocale, useMessages, useRegionNames, useTimezone } from '@/components/hooks';import { TypeIcon } from '@/components/common/TypeIcon';-import { Icon, CopyIcon } from 'react-basics';+import { Icon, CopyIcon } from '@umami/react-zen';import { Icons } from '@/components/icons';import styles from './SessionInfo.module.css';diff --git a/src/app/Providers.tsx b/src/app/Providers.tsxindex ca0d049bc..8d5141dee 100644--- a/src/app/Providers.tsx+++ b/src/app/Providers.tsx@@ -1,13 +1,12 @@'use client';+import { useEffect } from 'react';import { IntlProvider } from 'react-intl';import { QueryClient, QueryClientProvider } from '@tanstack/react-query';-import { ZenProvider } from '@umami/react-zen';-import 'chartjs-adapter-date-fns';-import { useEffect } from 'react';+import { ZenProvider, RouterProvider } from '@umami/react-zen';import { useRouter } from 'next/navigation';-import { RouterProvider } from 'react-aria-components';import { ErrorBoundary } from '@/components/common/ErrorBoundary';import { useLocale } from '@/components/hooks';+import 'chartjs-adapter-date-fns';const client = new QueryClient({defaultOptions: {diff --git a/src/app/api/teams/[teamId]/users/route.ts b/src/app/api/teams/[teamId]/users/route.tsindex 57460b89e..376351ea4 100644--- a/src/app/api/teams/[teamId]/users/route.ts+++ b/src/app/api/teams/[teamId]/users/route.ts@@ -2,7 +2,7 @@ import { z } from 'zod';import { unauthorized, json, badRequest } from '@/lib/response';import { canAddUserToTeam, canViewTeam } from '@/lib/auth';import { parseRequest } from '@/lib/request';-import { pagingParams, roleParam } from '@/lib/schema';+import { pagingParams, teamRoleParam } from '@/lib/schema';import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries';export async function GET(request: Request, { params }: { params: Promise<{ teamId: string }> }) {@@ -48,7 +48,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ teamexport async function POST(request: Request, { params }: { params: Promise<{ teamId: string }> }) {const schema = z.object({userId: z.string().uuid(),- role: roleParam,+ role: teamRoleParam,});const { auth, body, error } = await parseRequest(request, schema);diff --git a/src/app/api/users/[userId]/route.ts b/src/app/api/users/[userId]/route.tsindex 3dd88aabd..20ce5f23d 100644--- a/src/app/api/users/[userId]/route.ts+++ b/src/app/api/users/[userId]/route.ts@@ -4,6 +4,7 @@ import { getUser, getUserByUsername, updateUser, deleteUser } from '@/queries';import { json, unauthorized, badRequest, ok } from '@/lib/response';import { hashPassword } from '@/lib/auth';import { parseRequest } from '@/lib/request';+import { userRoleParam } from '@/lib/schema';export async function GET(request: Request, { params }: { params: Promise<{ userId: string }> }) {const { auth, error } = await parseRequest(request);@@ -26,8 +27,8 @@ export async function GET(request: Request, { params }: { params: Promise<{ userexport async function POST(request: Request, { params }: { params: Promise<{ userId: string }> }) {const schema = z.object({username: z.string().max(255),- password: z.string().max(255),- role: z.enum(['admin', 'user', 'view-only']),+ password: z.string().max(255).optional(),+ role: userRoleParam,});const { auth, body, error } = await parseRequest(request, schema);diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex 448915eb2..d8decb9e2 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -23,7 +23,7 @@ export default function ({ children }) {<meta name="theme-color" content="#2f2f2f" media="(prefers-color-scheme: dark)" /><meta name="robots" content="noindex,nofollow" /></head>- <body>+ <body suppressHydrationWarning><Providers>{children}</Providers></body></html>diff --git a/src/app/not-found.tsx b/src/app/not-found.tsxindex c673e40f4..b37615134 100644--- a/src/app/not-found.tsx+++ b/src/app/not-found.tsx@@ -1,12 +1,12 @@'use client';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';import { useMessages } from '@/components/hooks';export default function () {const { formatMessage, labels } = useMessages();return (- <Flexbox alignItems="center" justifyContent="center" flex={1} style={{ minHeight: 600 }}>+ <Flexbox alignItems="center" justifyContent="center" flexGrow="1" minHeight="600px"><h1>{formatMessage(labels.pageNotFound)}</h1></Flexbox>);diff --git a/src/app/share/[...shareId]/Header.tsx b/src/app/share/[...shareId]/Header.tsxindex cfc693adc..c7a873479 100644--- a/src/app/share/[...shareId]/Header.tsx+++ b/src/app/share/[...shareId]/Header.tsx@@ -1,5 +1,5 @@import { ThemeButton } from '@umami/react-zen';-import { Icon, Text } from 'react-basics';+import { Icon, Text } from '@umami/react-zen';import Link from 'next/link';import { LanguageButton } from '@/components/input/LanguageButton';import { SettingsButton } from '@/components/input/SettingsButton';diff --git a/src/app/sso/SSOPage.tsx b/src/app/sso/SSOPage.tsxindex 1bd4bd692..4d737f948 100644--- a/src/app/sso/SSOPage.tsx+++ b/src/app/sso/SSOPage.tsx@@ -1,6 +1,6 @@'use client';import { useEffect } from 'react';-import { Loading } from 'react-basics';+import { Loading } from '@umami/react-zen';import { useRouter, useSearchParams } from 'next/navigation';import { setClientAuthToken } from '@/lib/client';diff --git a/src/assets/path.svg b/src/assets/path.svgindex eb9e24ba9..064864725 100644--- a/src/assets/path.svg+++ b/src/assets/path.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" fill="none" viewBox="0 0 64 64"><path d="m56.4 47.6-6-6c-.8-.8-2-.8-2.8 0s-.8 2 0 2.8l2.6 2.6H18.5c-3.6 0-6.5-2.9-6.5-6.5s2.9-6.5 6.5-6.5h27C51.3 34 56 29.3 56 23.5S51.3 13 45.5 13H22.7c-.9-3.4-4-6-7.7-6-4.4 0-8 3.6-8 8s3.6 8 8 8c3.7 0 6.8-2.6 7.7-6h22.8c3.6 0 6.5 2.9 6.5 6.5S49.1 30 45.5 30h-27C12.7 30 8 34.7 8 40.5S12.7 51 18.5 51h31.7l-2.6 2.6c-.8.8-.8 2 0 2.8.4.4.9.6 1.4.6s1-.2 1.4-.6l6-6c.8-.8.8-2 0-2.8M15 19c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 64 64"><path d="m56.4 47.6-6-6c-.8-.8-2-.8-2.8 0s-.8 2 0 2.8l2.6 2.6H18.5c-3.6 0-6.5-2.9-6.5-6.5s2.9-6.5 6.5-6.5h27C51.3 34 56 29.3 56 23.5S51.3 13 45.5 13H22.7c-.9-3.4-4-6-7.7-6-4.4 0-8 3.6-8 8s3.6 8 8 8c3.7 0 6.8-2.6 7.7-6h22.8c3.6 0 6.5 2.9 6.5 6.5S49.1 30 45.5 30h-27C12.7 30 8 34.7 8 40.5S12.7 51 18.5 51h31.7l-2.6 2.6c-.8.8-.8 2 0 2.8.4.4.9.6 1.4.6s1-.2 1.4-.6l6-6c.8-.8.8-2 0-2.8M15 19c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4"/></svg>diff --git a/src/components/charts/BarChartTooltip.tsx b/src/components/charts/BarChartTooltip.tsxindex f6a1a8936..45f4a067a 100644--- a/src/components/charts/BarChartTooltip.tsx+++ b/src/components/charts/BarChartTooltip.tsx@@ -1,7 +1,7 @@import { useLocale } from '@/components/hooks';import { formatDate } from '@/lib/date';import { formatLongCurrency, formatLongNumber } from '@/lib/format';-import { Flexbox, StatusLight } from 'react-basics';+import { Flexbox, StatusLight } from '@umami/react-zen';const formats = {millisecond: 'T',diff --git a/src/components/charts/BubbleChart.tsx b/src/components/charts/BubbleChart.tsxindex 0ff498b77..9d1c367e4 100644--- a/src/components/charts/BubbleChart.tsx+++ b/src/components/charts/BubbleChart.tsx@@ -1,6 +1,6 @@import { Chart, ChartProps } from '@/components/charts/Chart';import { useState } from 'react';-import { StatusLight } from 'react-basics';+import { StatusLight } from '@umami/react-zen';import { formatLongNumber } from '@/lib/format';export interface BubbleChartProps extends ChartProps {diff --git a/src/components/charts/Chart.tsx b/src/components/charts/Chart.tsxindex 17ff1db1f..bcdb9cb7f 100644--- a/src/components/charts/Chart.tsx+++ b/src/components/charts/Chart.tsx@@ -1,5 +1,5 @@import { useState, useRef, useEffect, useMemo, ReactNode } from 'react';-import { Loading } from 'react-basics';+import { Loading } from '@umami/react-zen';import classNames from 'classnames';import ChartJS, { LegendItem, ChartOptions } from 'chart.js/auto';import { HoverTooltip } from '@/components/common/HoverTooltip';diff --git a/src/components/charts/PieChart.tsx b/src/components/charts/PieChart.tsxindex 01254140b..738c1ec33 100644--- a/src/components/charts/PieChart.tsx+++ b/src/components/charts/PieChart.tsx@@ -1,6 +1,6 @@import { Chart, ChartProps } from '@/components/charts/Chart';import { useState } from 'react';-import { StatusLight } from 'react-basics';+import { StatusLight } from '@umami/react-zen';import { formatLongNumber } from '@/lib/format';export interface PieChartProps extends ChartProps {diff --git a/src/components/common/Breadcrumb.tsx b/src/components/common/Breadcrumb.tsxindex 2416f7cb2..bc9931b49 100644--- a/src/components/common/Breadcrumb.tsx+++ b/src/components/common/Breadcrumb.tsx@@ -1,5 +1,5 @@import Link from 'next/link';-import { Flexbox, Icon, Icons, Text } from 'react-basics';+import { Flexbox, Icon, Icons, Text } from '@umami/react-zen';import styles from './Breadcrumb.module.css';import { Fragment } from 'react';@@ -25,7 +25,7 @@ export function Breadcrumb({ data }: BreadcrumbProps) {)}{i !== data.length - 1 ? (<Icon rotate={270}>- <Icons.ChevronDown />+ <Icons.Chevron /></Icon>) : null}</Fragment>diff --git a/src/components/common/EmptyPlaceholder.tsx b/src/components/common/EmptyPlaceholder.tsxindex 30cd32c81..b9beb9d36 100644--- a/src/components/common/EmptyPlaceholder.tsx+++ b/src/components/common/EmptyPlaceholder.tsx@@ -1,5 +1,5 @@import { ReactNode } from 'react';-import { Icon, Text, Flexbox } from 'react-basics';+import { Icon, Text, Flexbox } from '@umami/react-zen';import { Icons } from '@/components/icons';export interface EmptyPlaceholderProps {diff --git a/src/components/common/ErrorBoundary.tsx b/src/components/common/ErrorBoundary.tsxindex 822a445ab..92802c332 100644--- a/src/components/common/ErrorBoundary.tsx+++ b/src/components/common/ErrorBoundary.tsx@@ -1,6 +1,6 @@import { ErrorInfo, ReactNode } from 'react';import { ErrorBoundary as Boundary } from 'react-error-boundary';-import { Button } from 'react-basics';+import { Button } from '@umami/react-zen';import { useMessages } from '@/components/hooks';import styles from './ErrorBoundary.module.css';diff --git a/src/components/common/ErrorMessage.tsx b/src/components/common/ErrorMessage.tsxindex 92593e132..c8956c249 100644--- a/src/components/common/ErrorMessage.tsx+++ b/src/components/common/ErrorMessage.tsx@@ -1,4 +1,4 @@-import { Icon, Icons, Text } from 'react-basics';+import { Icon, Icons, Text } from '@umami/react-zen';import styles from './ErrorMessage.module.css';import { useMessages } from '@/components/hooks';diff --git a/src/components/common/FilterButtons.tsx b/src/components/common/FilterButtons.tsxindex 09ec38d91..a3b600a64 100644--- a/src/components/common/FilterButtons.tsx+++ b/src/components/common/FilterButtons.tsx@@ -1,5 +1,5 @@import { Key } from 'react';-import { ButtonGroup, Button, Flexbox } from 'react-basics';+import { Row, Button, Flexbox } from '@umami/react-zen';export interface FilterButtonsProps {items: any[];@@ -10,9 +10,11 @@ export interface FilterButtonsProps {export function FilterButtons({ items, selectedKey, onSelect }: FilterButtonsProps) {return (<Flexbox justifyContent="center">- <ButtonGroup items={items} selectedKey={selectedKey as any} onSelect={onSelect}>- {({ key, label }) => <Button key={key}>{label}</Button>}- </ButtonGroup>+ <Row>+ {items.map(({ key, label }) => (+ <Button key={key}>{label}</Button>+ ))}+ </Row></Flexbox>);}diff --git a/src/components/common/FilterLink.tsx b/src/components/common/FilterLink.tsxindex e5343caae..0ab86ad29 100644--- a/src/components/common/FilterLink.tsx+++ b/src/components/common/FilterLink.tsx@@ -1,8 +1,8 @@+import { ReactNode } from 'react';import classNames from 'classnames';-import { useMessages, useNavigation } from '@/components/hooks';import Link from 'next/link';-import { ReactNode } from 'react';-import { Icon, Icons } from 'react-basics';+import { Icon, Icons } from '@umami/react-zen';+import { useMessages, useNavigation } from '@/components/hooks';import styles from './FilterLink.module.css';export interface FilterLinkProps {@@ -44,7 +44,7 @@ export function FilterLink({{externalUrl && (<a className={styles.link} href={externalUrl} target="_blank" rel="noreferrer noopener"><Icon className={styles.icon}>- <Icons.External />+ <Icons.ExternalLink /></Icon></a>)}diff --git a/src/components/common/HamburgerButton.tsx b/src/components/common/HamburgerButton.tsxindex f9bc42a54..7d1465866 100644--- a/src/components/common/HamburgerButton.tsx+++ b/src/components/common/HamburgerButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Icons } from 'react-basics';+import { Button, Icon, Icons } from '@umami/react-zen';import { useState } from 'react';import { MobileMenu } from './MobileMenu';diff --git a/src/components/common/HoverTooltip.tsx b/src/components/common/HoverTooltip.tsxindex 1ceb51009..1d26a83e4 100644--- a/src/components/common/HoverTooltip.tsx+++ b/src/components/common/HoverTooltip.tsx@@ -1,5 +1,5 @@import { ReactNode, useEffect, useState } from 'react';-import { Tooltip } from 'react-basics';+import { Tooltip } from '@umami/react-zen';import styles from './HoverTooltip.module.css';export function HoverTooltip({ children }: { children: ReactNode }) {diff --git a/src/components/common/LinkButton.tsx b/src/components/common/LinkButton.tsxindex 5115ec135..2a7393a39 100644--- a/src/components/common/LinkButton.tsx+++ b/src/components/common/LinkButton.tsx@@ -1,29 +1,29 @@import { ReactNode } from 'react';-import classNames from 'classnames';import Link from 'next/link';+import { Button } from '@umami/react-zen';import { useLocale } from '@/components/hooks';-// eslint-disable-next-line css-modules/no-unused-class-import styles from './LinkButton.module.css';export interface LinkButtonProps {href: string;- className?: string;- variant?: string;scroll?: boolean;+ variant?: any;children?: ReactNode;}-export function LinkButton({ href, className, variant, scroll = true, children }: LinkButtonProps) {+export function LinkButton({+ href,+ variant = 'quiet',+ scroll = true,+ children,+ ...props+}: LinkButtonProps) {const { dir } = useLocale();return (- <Link- className={classNames(styles.button, className, { [styles[variant]]: true })}- href={href}- dir={dir}- scroll={scroll}- >- {children}- </Link>+ <Button {...props} variant={variant} asChild>+ <Link href={href} dir={dir} scroll={scroll}>+ {children}+ </Link>+ </Button>);}diff --git a/src/components/common/TypeConfirmationForm.tsx b/src/components/common/TypeConfirmationForm.tsxindex 015a08dcd..d15e11921 100644--- a/src/components/common/TypeConfirmationForm.tsx+++ b/src/components/common/TypeConfirmationForm.tsx@@ -2,11 +2,10 @@ import {Button,Form,FormButtons,- FormRow,- FormInput,+ FormField,TextField,- SubmitButton,-} from 'react-basics';+ FormSubmitButton,+} from '@umami/react-zen';import { useMessages } from '@/components/hooks';export function TypeConfirmationForm({@@ -20,7 +19,7 @@ export function TypeConfirmationForm({}: {confirmationValue: string;buttonLabel?: string;- buttonVariant?: 'none' | 'primary' | 'secondary' | 'quiet' | 'danger';+ buttonVariant?: 'primary' | 'secondary' | 'outline' | 'quiet' | 'danger' | 'none';isLoading?: boolean;error?: string | Error;onConfirm?: () => void;@@ -35,18 +34,22 @@ export function TypeConfirmationForm({return (<Form onSubmit={onConfirm} error={error}><p>- {formatMessage(messages.actionConfirmation, { confirmation: <b>{confirmationValue}</b> })}+ {formatMessage(messages.actionConfirmation, {+ confirmation: <b key="value">{confirmationValue}</b>,+ })}</p>- <FormRow label={formatMessage(labels.confirm)}>- <FormInput name="confirm" rules={{ validate: value => value === confirmationValue }}>- <TextField autoComplete="off" />- </FormInput>- </FormRow>- <FormButtons flex>- <SubmitButton isLoading={isLoading} variant={buttonVariant}>+ <FormField+ label={formatMessage(labels.confirm)}+ name="confirm"+ rules={{ validate: value => value === confirmationValue }}+ >+ <TextField autoComplete="off" />+ </FormField>+ <FormButtons>+ <Button onPress={onClose}>{formatMessage(labels.cancel)}</Button>+ <FormSubmitButton isLoading={isLoading} variant={buttonVariant}>{buttonLabel || formatMessage(labels.ok)}- </SubmitButton>- <Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>+ </FormSubmitButton></FormButtons></Form>);diff --git a/src/components/icons.ts b/src/components/icons.tsindex 689dbf036..9fcd33778 100644--- a/src/components/icons.ts+++ b/src/components/icons.ts@@ -1,4 +1,4 @@-import { Icons as ReactBasicsIcons } from 'react-basics';+import { Icons as ReactBasicsIcons } from '@umami/react-zen';import * as lucide from 'lucide-react';import * as LocalIcons from '@/components/svg';diff --git a/src/components/input/DateFilter.tsx b/src/components/input/DateFilter.tsxindex cd6a0747f..d1484d01e 100644--- a/src/components/input/DateFilter.tsx+++ b/src/components/input/DateFilter.tsx@@ -1,5 +1,15 @@-import { useState } from 'react';-import { Icon, Modal, Dropdown, Item, Text, Flexbox } from 'react-basics';+import { useState, Key } from 'react';+import {+ Icon,+ Modal,+ Select,+ Text,+ Block,+ Row,+ ListItem,+ ListSeparator,+ Dialog,+} from '@umami/react-zen';import { endOfYear, isSameDay } from 'date-fns';import { DatePickerForm } from '@/components/metrics/DatePickerForm';import { useLocale, useMessages } from '@/components/hooks';@@ -39,19 +49,19 @@ export function DateFilter({label: formatMessage(labels.lastHours, { x: 24 }),value: '24hour',},+ { divider: true },{label: formatMessage(labels.thisWeek),value: '0week',- divider: true,},{label: formatMessage(labels.lastDays, { x: 7 }),value: '7day',},+ { divider: true },{label: formatMessage(labels.thisMonth),value: '0month',- divider: true,},{label: formatMessage(labels.lastDays, { x: 30 }),@@ -61,7 +71,8 @@ export function DateFilter({label: formatMessage(labels.lastDays, { x: 90 }),value: '90day',},- { label: formatMessage(labels.thisYear), value: '0year', divider: true },+ { divider: true },+ { label: formatMessage(labels.thisYear), value: '0year' },{label: formatMessage(labels.lastMonths, { x: 6 }),value: '6month',@@ -70,29 +81,31 @@ export function DateFilter({label: formatMessage(labels.lastMonths, { x: 12 }),value: '12month',},+ { divider: true },showAllTime && {label: formatMessage(labels.allTime),value: 'all',- divider: true,},+ { divider: true },{label: formatMessage(labels.customRange),value: 'custom',- divider: true,},- ].filter(n => n);+ ]+ .filter(n => n)+ .map((a, id) => ({ ...a, id }));- const handleChange = (value: string) => {+ const handleChange = (value: Key) => {if (value === 'custom') {setShowPicker(true);return;}- onChange(value);+ onChange(value.toString());};const handlePickerChange = (value: string) => {setShowPicker(false);- onChange(value);+ onChange(value.toString());};const handleClose = () => setShowPicker(false);@@ -122,33 +135,37 @@ export function DateFilter({return options.find(e => e.value === value)?.label;};+ console.log({ showPicker });+return (<>- <Dropdown+ <SelectclassName={classNames(className, styles.dropdown)}items={options}- renderValue={renderValue}value={value}- alignment={alignment}placeholder={formatMessage(labels.selectDate)}- onChange={key => handleChange(key as any)}+ onSelectionChange={handleChange}>- {({ label, value, divider }) => (- <Item key={value} divider={divider}>- {label}- </Item>- )}- </Dropdown>+ {({ label, value, divider }: any) => {+ if (divider) {+ return <ListSeparator />;+ }++ return <ListItem id={value}>{label}</ListItem>;+ }}+ </Select>{showPicker && (- <Modal onClose={handleClose}>- <DatePickerForm- startDate={startDate}- endDate={endDate}- minDate={new Date(2000, 0, 1)}- maxDate={endOfYear(new Date())}- onChange={handlePickerChange}- onClose={() => setShowPicker(false)}- />+ <Modal isOpen={true}>+ <Dialog>+ <DatePickerForm+ startDate={startDate}+ endDate={endDate}+ minDate={new Date(2000, 0, 1)}+ maxDate={endOfYear(new Date())}+ onChange={handlePickerChange}+ onClose={() => setShowPicker(false)}+ />+ </Dialog></Modal>)}</>@@ -167,8 +184,8 @@ const CustomRange = ({ startDate, endDate, unit, onClick }) => {}return (- <Flexbox gap={10} alignItems="center" wrap="nowrap">- <Icon className="mr-2" onClick={handleClick}>+ <Row gap="3" alignItems="center" wrap="nowrap">+ <Icon onClick={handleClick}><Icons.Calendar /></Icon><Text>@@ -181,6 +198,6 @@ const CustomRange = ({ startDate, endDate, unit, onClick }) => {</>)}</Text>- </Flexbox>+ </Row>);};diff --git a/src/components/input/LanguageButton.module.css b/src/components/input/LanguageButton.module.cssdeleted file mode 100644index d73bcb777..000000000--- a/src/components/input/LanguageButton.module.css+++ /dev/null@@ -1,46 +0,0 @@-.menu {- display: grid;- grid-template-columns: repeat(3, 1fr);- padding: 10px;- background: var(--base50);- z-index: var(--z-index-popup);- border-radius: 5px;- border: 1px solid var(--border-color);- margin-inline-start: 10px;-}--.item {- display: flex;- align-items: center;- justify-content: space-between;- min-width: 200px;- border-radius: 5px;- padding: 5px 10px;-}--.item:hover {- background: var(--base75);- cursor: pointer;-}--.selected {- color: var(--font-color);- font-weight: 700;- background: var(--blue100);-}--.icon {- color: var(--primary400);-}--@media screen and (max-width: 992px) {- .menu {- grid-template-columns: repeat(2, 1fr);- }-}--@media screen and (max-width: 768px) {- .menu {- transform: translateX(40px);- }-}diff --git a/src/components/input/LogoutButton.tsx b/src/components/input/LogoutButton.tsxindex 38d3e778d..add0eff95 100644--- a/src/components/input/LogoutButton.tsx+++ b/src/components/input/LogoutButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, Icons, TooltipPopup } from 'react-basics';+import { Button, Icon, Icons, TooltipPopup } from '@umami/react-zen';import Link from 'next/link';import { useMessages } from '@/components/hooks';diff --git a/src/components/input/MonthSelect.tsx b/src/components/input/MonthSelect.tsxindex 8fd6a524e..2b9641a03 100644--- a/src/components/input/MonthSelect.tsx+++ b/src/components/input/MonthSelect.tsx@@ -1,14 +1,6 @@import { useRef } from 'react';-import {- Text,- Icon,- CalendarMonthSelect,- CalendarYearSelect,- Button,- PopupTrigger,- Popup,-} from 'react-basics';-import { startOfMonth, endOfMonth } from 'date-fns';+import { Row, Text, Icon, Button, MenuTrigger, Popover, Menu, MenuItem } from '@umami/react-zen';+import { startOfMonth, endOfMonth, startOfYear, addMonths, subYears } from 'date-fns';import { Icons } from '@/components/icons';import { useLocale } from '@/components/hooks';import { formatDate } from '@/lib/date';@@ -25,40 +17,48 @@ export function MonthSelect({ date = new Date(), onChange }) {close();};+ const start = startOfYear(date);+ const months: Date[] = [];+ for (let i = 0; i < 12; i++) {+ months.push(addMonths(start, i));+ }+ const years: number[] = [];+ for (let i = 0; i < 10; i++) {+ years.push(subYears(start, 10 - i).getFullYear());+ }+return (- <>- <div ref={ref} className={styles.container}>- <PopupTrigger>- <Button className={styles.input} variant="quiet">- <Text>{month}</Text>- <Icon size="sm">- <Icons.ChevronDown />- </Icon>- </Button>- <Popup className={styles.popup} alignment="start">- {close => (- <CalendarMonthSelect- date={date}- locale={dateLocale}- onSelect={handleChange.bind(null, close)}- />- )}- </Popup>- </PopupTrigger>- <PopupTrigger>- <Button className={styles.input} variant="quiet">- <Text>{year}</Text>- <Icon size="sm">- <Icons.ChevronDown />- </Icon>- </Button>- <Popup className={styles.popup} alignment="start">- {(close: any) => (- <CalendarYearSelect date={date} onSelect={handleChange.bind(null, close)} />- )}- </Popup>- </PopupTrigger>- </div>- </>+ <Row>+ <MenuTrigger>+ <Button className={styles.input} variant="quiet">+ <Text>{month}</Text>+ <Icon size="sm">+ <Icons.Chevron />+ </Icon>+ </Button>+ <Popover>+ <Menu items={months}>+ {month => {+ return <MenuItem id={month}>{month.getDay()}</MenuItem>;+ }}+ </Menu>+ </Popover>+ </MenuTrigger>+ <MenuTrigger>+ <Button className={styles.input} variant="quiet">+ <Text>{year}</Text>+ <Icon size="sm">+ <Icons.Chevron />+ </Icon>+ </Button>+ <Popover>+ <Menu items={years}>+ {year => {+ return <MenuItem id={year}>{year}</MenuItem>;+ }}+ </Menu>+ </Popover>+ </MenuTrigger>+ </Row>);}diff --git a/src/components/input/RefreshButton.tsx b/src/components/input/RefreshButton.tsxindex c4c94560b..bf563a825 100644--- a/src/components/input/RefreshButton.tsx+++ b/src/components/input/RefreshButton.tsx@@ -1,4 +1,4 @@-import { LoadingButton, Icon, TooltipPopup } from 'react-basics';+import { LoadingButton, Icon, TooltipPopup } from '@umami/react-zen';import { setWebsiteDateRange } from '@/store/websites';import { useDateRange } from '@/components/hooks';import { Icons } from '@/components/icons';diff --git a/src/components/input/SettingsButton.tsx b/src/components/input/SettingsButton.tsxindex 4778542c2..331207455 100644--- a/src/components/input/SettingsButton.tsx+++ b/src/components/input/SettingsButton.tsx@@ -1,4 +1,4 @@-import { Button, Icon, PopupTrigger, Popup, Form, FormRow } from 'react-basics';+import { Button, Icon, PopupTrigger, Popup, Form, FormRow } from '@umami/react-zen';import { TimezoneSetting } from '@/app/(main)/profile/TimezoneSetting';import { DateRangeSetting } from '@/app/(main)/profile/DateRangeSetting';import { Icons } from '@/components/icons';diff --git a/src/components/input/WebsiteDateFilter.tsx b/src/components/input/WebsiteDateFilter.tsxindex e1d1506c0..ac54b26e9 100644--- a/src/components/input/WebsiteDateFilter.tsx+++ b/src/components/input/WebsiteDateFilter.tsx@@ -1,7 +1,7 @@import { useDateRange, useLocale } from '@/components/hooks';import { isAfter } from 'date-fns';import { getOffsetDateRange } from '@/lib/date';-import { Button, Icon, Icons } from 'react-basics';+import { Button, Icon, Icons } from '@umami/react-zen';import { DateFilter } from './DateFilter';import styles from './WebsiteDateFilter.module.css';import { DateRange } from '@/lib/types';@@ -40,14 +40,14 @@ export function WebsiteDateFilter({/>{value !== 'all' && !value.startsWith('range') && (<div className={styles.buttons}>- <Button onClick={() => handleIncrement(-1)}>- <Icon rotate={dir === 'rtl' ? 270 : 90}>- <Icons.ChevronDown />+ <Button onPress={() => handleIncrement(-1)}>+ <Icon size="sm" rotate={180}>+ <Icons.Chevron /></Icon></Button>- <Button onClick={() => handleIncrement(1)} disabled={disableForward}>- <Icon rotate={dir === 'rtl' ? 90 : 270}>- <Icons.ChevronDown />+ <Button onPress={() => handleIncrement(1)} isDisabled={disableForward}>+ <Icon size="sm">+ <Icons.Chevron /></Icon></Button></div>diff --git a/src/components/input/WebsiteSelect.tsx b/src/components/input/WebsiteSelect.tsxindex df5289a17..453fd6ce1 100644--- a/src/components/input/WebsiteSelect.tsx+++ b/src/components/input/WebsiteSelect.tsx@@ -1,5 +1,5 @@import { useState, Key } from 'react';-import { Dropdown, Item } from 'react-basics';+import { Dropdown, Item } from '@umami/react-zen';import { useWebsite, useWebsites, useMessages } from '@/components/hooks';import { Empty } from '@/components/common/Empty';import styles from './WebsiteSelect.module.css';diff --git a/src/components/layout/ActionForm.tsx b/src/components/layout/ActionForm.tsxnew file mode 100644index 000000000..d330feede--- /dev/null+++ b/src/components/layout/ActionForm.tsx@@ -0,0 +1,15 @@+import { Row, Column, Text } from '@umami/react-zen';++export function ActionForm({ label, description, children }) {+ return (+ <Row padding="6" borderSize="1" borderRadius="3" justifyContent="space-between" shadow="2">+ <Column>+ <Text weight="bold">{label}</Text>+ <Text>{description}</Text>+ </Column>+ <Row gap="3" alignItems="center">+ {children}+ </Row>+ </Row>+ );+}diff --git a/src/components/layout/Grid.tsx b/src/components/layout/Grid.tsxindex ec7f4fda1..b43a8ac8f 100644--- a/src/components/layout/Grid.tsx+++ b/src/components/layout/Grid.tsx@@ -1,6 +1,6 @@import { CSSProperties } from 'react';import classNames from 'classnames';-import { mapChildren } from 'react-basics';+import { mapChildren } from '@/lib/react';// eslint-disable-next-line css-modules/no-unused-classimport styles from './Grid.module.css';diff --git a/src/components/layout/MenuNav.tsx b/src/components/layout/MenuNav.tsxindex 82e697cfc..f91cd131b 100644--- a/src/components/layout/MenuNav.tsx+++ b/src/components/layout/MenuNav.tsx@@ -1,29 +1,37 @@-import { List, ListItem, Text } from '@umami/react-zen';-import { usePathname } from 'next/navigation';+import { Column, Button, Text, List, ListItem } from '@umami/react-zen';import Link from 'next/link';-export interface SideNavProps {+export interface MenuNavProps {items: any[];- shallow?: boolean;- scroll?: boolean;+ selectedKey?: string;}-export function MenuNav({ items, shallow = true, scroll = false }: SideNavProps) {- const pathname = usePathname();-+export function MenuNav({ items, selectedKey }: MenuNavProps) {return (<List>{items.map(({ key, label, url }) => {- const isSelected = pathname.startsWith(url);-return (- <ListItem key={key}>- <Link href={url} shallow={shallow} scroll={scroll}>- <Text weight={isSelected ? 'bold' : 'regular'}>{label}</Text>- </Link>+ <ListItem key={key} href={url}>+ <Text weight={key === selectedKey ? 'bold' : 'regular'}>{label}</Text></ListItem>);})}</List>);}++export function MenuNav2({ items, selectedKey }: MenuNavProps) {+ return (+ <Column gap="3" alignItems="flex-start" justifyContent="stretch">+ {items.map(({ key, label, url }) => {+ return (+ <Button key={key} style={{ width: '100%' }} asChild>+ <Link href={url}>+ <Text weight={key === selectedKey ? 'bold' : 'regular'}>{label}</Text>+ </Link>+ </Button>+ );+ })}+ </Column>+ );+}diff --git a/src/components/metrics/ActiveUsers.tsx b/src/components/metrics/ActiveUsers.tsxindex 2b965363e..754c119b2 100644--- a/src/components/metrics/ActiveUsers.tsx+++ b/src/components/metrics/ActiveUsers.tsx@@ -1,5 +1,5 @@import { useMemo } from 'react';-import { StatusLight } from 'react-basics';+import { StatusLight } from '@umami/react-zen';import { useApi } from '@/components/hooks';import { useMessages } from '@/components/hooks';import styles from './ActiveUsers.module.css';diff --git a/src/components/metrics/ChangeLabel.tsx b/src/components/metrics/ChangeLabel.tsxindex f19e6b6ef..898c4456c 100644--- a/src/components/metrics/ChangeLabel.tsx+++ b/src/components/metrics/ChangeLabel.tsx@@ -1,5 +1,5 @@import classNames from 'classnames';-import { Icon, Icons } from 'react-basics';+import { Icon, Icons } from '@umami/react-zen';import { ReactNode } from 'react';import styles from './ChangeLabel.module.css';@@ -35,7 +35,7 @@ export function ChangeLabel({>{!neutral && (<Icon rotate={positive ? -90 : 90} size={size}>- <Icons.ArrowRight />+ <Icons.Arrow /></Icon>)}{children || value}diff --git a/src/components/metrics/DatePickerForm.tsx b/src/components/metrics/DatePickerForm.tsxindex 345b2de07..2ed3a8ea3 100644--- a/src/components/metrics/DatePickerForm.tsx+++ b/src/components/metrics/DatePickerForm.tsx@@ -1,9 +1,9 @@import { useState } from 'react';-import { Button, ButtonGroup, Calendar } from 'react-basics';+import { Button, Row, Calendar } from '@umami/react-zen';import { isAfter, isBefore, isSameDay, startOfDay, endOfDay } from 'date-fns';-import { useLocale } from '@/components/hooks';import { FILTER_DAY, FILTER_RANGE } from '@/lib/constants';import { useMessages } from '@/components/hooks';+import { parseDate } from '@internationalized/date';import styles from './DatePickerForm.module.css';export function DatePickerForm({@@ -17,10 +17,9 @@ export function DatePickerForm({const [selected, setSelected] = useState(isSameDay(defaultStartDate, defaultEndDate) ? FILTER_DAY : FILTER_RANGE,);- const [singleDate, setSingleDate] = useState(defaultStartDate);- const [startDate, setStartDate] = useState(defaultStartDate);- const [endDate, setEndDate] = useState(defaultEndDate);- const { dateLocale } = useLocale();+ const [singleDate, setSingleDate] = useState(defaultStartDate || new Date());+ const [startDate, setStartDate] = useState(defaultStartDate || new Date());+ const [endDate, setEndDate] = useState(defaultEndDate || new Date());const { formatMessage, labels } = useMessages();const disabled =@@ -36,48 +35,41 @@ export function DatePickerForm({}};+ console.log({ minDate, maxDate, singleDate, startDate, endDate, disabled });+return (<div className={styles.container}><div className={styles.filter}>- <ButtonGroup selectedKey={selected} onSelect={key => setSelected(key as any)}>- <Button key={FILTER_DAY}>{formatMessage(labels.singleDay)}</Button>- <Button key={FILTER_RANGE}>{formatMessage(labels.dateRange)}</Button>- </ButtonGroup>+ <Row>+ <Button key={FILTER_DAY} onPress={key => setSelected(key as any)}>+ {formatMessage(labels.singleDay)}+ </Button>+ <Button key={FILTER_RANGE} onPress={key => setSelected(key as any)}>+ {formatMessage(labels.dateRange)}+ </Button>+ </Row></div><div className={styles.calendars}>{selected === FILTER_DAY && (<Calendar- date={singleDate}- minDate={minDate}- maxDate={maxDate}- locale={dateLocale}- onChange={setSingleDate}+ value={parseDate(singleDate.toISOString().split('T')[0])}+ onChange={d => setSingleDate(d.toDate('America/Los_Angeles'))}/>)}{selected === FILTER_RANGE && (<><Calendar- date={startDate}- minDate={minDate}- maxDate={endDate}- locale={dateLocale}- onChange={setStartDate}- />- <Calendar- date={endDate}- minDate={startDate}- maxDate={maxDate}- locale={dateLocale}- onChange={setEndDate}+ value={parseDate(startDate.toISOString().split('T')[0])}+ onChange={d => setStartDate(d.toDate('America/Los_Angeles'))}/></>)}</div><div className={styles.buttons}>- <Button variant="primary" onClick={handleSave} disabled={disabled}>+ <Button variant="primary" onPress={handleSave} isDisabled={disabled}>{formatMessage(labels.save)}</Button>- <Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>+ <Button onPress={onClose}>{formatMessage(labels.cancel)}</Button></div></div>);diff --git a/src/components/metrics/FilterTags.tsx b/src/components/metrics/FilterTags.tsxindex 91e740a2d..377c8f0bd 100644--- a/src/components/metrics/FilterTags.tsx+++ b/src/components/metrics/FilterTags.tsx@@ -1,5 +1,5 @@import { MouseEvent } from 'react';-import { Button, Icon, Icons, Popup, PopupTrigger, Text } from 'react-basics';+import { Button, Icon, Icons, Popover, MenuTrigger, Text, Row } from '@umami/react-zen';import {useDateRange,useFields,@@ -8,7 +8,6 @@ import {useFormat,useFilters,} from '@/components/hooks';-import { PopupForm } from '@/app/(main)/reports/[reportId]/PopupForm';import { FieldFilterEditForm } from '@/app/(main)/reports/[reportId]/FieldFilterEditForm';import { OPERATOR_PREFIXES } from '@/lib/constants';import { isSearchOperator, parseParameterValue } from '@/lib/params';@@ -59,8 +58,17 @@ export function FilterTags({};return (- <div className={styles.filters}>- <div className={styles.label}>{formatMessage(labels.filters)}</div>+ <Row+ gap="3"+ backgroundColor="1"+ alignItems="center"+ paddingX="3"+ paddingY="2"+ borderRadius="2"+ borderSize="1"+ marginBottom="6"+ >+ <Text weight="bold">{formatMessage(labels.filters)}</Text>{Object.keys(params).map(key => {if (!params[key]) {return null;@@ -70,44 +78,44 @@ export function FilterTags({const paramValue = isSearchOperator(operator) ? value : formatValue(value, key);return (- <PopupTrigger key={key}>- <div key={key} className={styles.tag}>- <Text className={styles.name}>{label}</Text>- <Text className={styles.operator}>{operatorLabels[operator]}</Text>- <Text className={styles.value}>{paramValue}</Text>- <Icon className={styles.icon} onClick={e => handleCloseFilter(key, e)}>- <Icons.Close />- </Icon>- </div>- <Popup alignment="start">- {(close: () => void) => {+ <MenuTrigger key={key}>+ <Button variant="outline">+ <Row alignItems="center" gap="3">+ <Text weight="bold">{label}</Text>+ <Text>{operatorLabels[operator]}</Text>+ <Text weight="bold">{paramValue}</Text>+ <Icon onClick={e => handleCloseFilter(key, e)}>+ <Icons.Close />+ </Icon>+ </Row>+ </Button>+ <Popover placement="start">+ {({ close }: any) => {return (- <PopupForm>- <FieldFilterEditForm- label={label}- type="string"- websiteId={websiteId}- name={key}- operator={operator}- defaultValue={value}- startDate={startDate}- endDate={endDate}- onChange={values => handleChangeFilter(values, close)}- />- </PopupForm>+ <FieldFilterEditForm+ label={label}+ type="string"+ websiteId={websiteId}+ name={key}+ operator={operator}+ defaultValue={value}+ startDate={startDate}+ endDate={endDate}+ onChange={values => handleChangeFilter(values, close)}+ />);}}- </Popup>- </PopupTrigger>+ </Popover>+ </MenuTrigger>);})}<WebsiteFilterButton websiteId={websiteId} alignment="center" showText={false} />- <Button className={styles.close} variant="quiet" onClick={handleResetFilter}>+ <Button className={styles.close} variant="quiet" onPress={handleResetFilter}><Icon><Icons.Close /></Icon><Text>{formatMessage(labels.clearAll)}</Text></Button>- </div>+ </Row>);}diff --git a/src/components/metrics/HostsTable.tsx b/src/components/metrics/HostsTable.tsxindex f9efcf507..0a1ee51b7 100644--- a/src/components/metrics/HostsTable.tsx+++ b/src/components/metrics/HostsTable.tsx@@ -1,7 +1,7 @@import { MetricsTable, MetricsTableProps } from './MetricsTable';import { FilterLink } from '@/components/common/FilterLink';import { useMessages } from '@/components/hooks';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';export function HostsTable(props: MetricsTableProps) {const { formatMessage, labels } = useMessages();diff --git a/src/components/metrics/Legend.tsx b/src/components/metrics/Legend.tsxindex 538eb2bea..5fb891c41 100644--- a/src/components/metrics/Legend.tsx+++ b/src/components/metrics/Legend.tsx@@ -1,4 +1,4 @@-import { StatusLight } from 'react-basics';+import { StatusLight } from '@umami/react-zen';import { colord } from 'colord';import classNames from 'classnames';import { LegendItem } from 'chart.js/auto';diff --git a/src/components/metrics/MetricsBar.tsx b/src/components/metrics/MetricsBar.tsxindex cb74fdc50..232ac1252 100644--- a/src/components/metrics/MetricsBar.tsx+++ b/src/components/metrics/MetricsBar.tsx@@ -1,8 +1,8 @@import { ReactNode } from 'react';-import { Loading, cloneChildren } from 'react-basics';+import { Loading, Row } from '@umami/react-zen';+import { cloneChildren } from '@/lib/react';import { ErrorMessage } from '@/components/common/ErrorMessage';import { formatLongNumber } from '@/lib/format';-import styles from './MetricsBar.module.css';export interface MetricsBarProps {isLoading?: boolean;@@ -15,15 +15,15 @@ export function MetricsBar({ children, isLoading, isFetched, error }: MetricsBarconst formatFunc = n => (n >= 0 ? formatLongNumber(n) : `-${formatLongNumber(Math.abs(n))}`);return (- <div className={styles.bar}>+ <Row>{isLoading && !isFetched && <Loading icon="dots" />}{error && <ErrorMessage />}{!isLoading &&!error &&isFetched &&cloneChildren(children, child => {- return { format: child.props.format || formatFunc };+ return { format: child.props['format'] || formatFunc };})}- </div>+ </Row>);}diff --git a/src/components/metrics/MetricsTable.tsx b/src/components/metrics/MetricsTable.tsxindex 5a1f56de8..1b2fa3372 100644--- a/src/components/metrics/MetricsTable.tsx+++ b/src/components/metrics/MetricsTable.tsx@@ -1,17 +1,11 @@import { ReactNode, useMemo, useState } from 'react';-import { Loading, Icon, Text, SearchField } from 'react-basics';+import { Loading, Icon, Text, SearchField } from '@umami/react-zen';import classNames from 'classnames';import { ErrorMessage } from '@/components/common/ErrorMessage';import { LinkButton } from '@/components/common/LinkButton';import { DEFAULT_ANIMATION_DURATION } from '@/lib/constants';import { percentFilter } from '@/lib/filters';-import {- useNavigation,- useWebsiteMetrics,- useMessages,- useLocale,- useFormat,-} from '@/components/hooks';+import { useNavigation, useWebsiteMetrics, useMessages, useFormat } from '@/components/hooks';import { Icons } from '@/components/icons';import { ListTable, ListTableProps } from './ListTable';import styles from './MetricsTable.module.css';@@ -51,7 +45,6 @@ export function MetricsTable({const { formatValue } = useFormat();const { renderUrl } = useNavigation();const { formatMessage, labels } = useMessages();- const { dir } = useLocale();const { data, isLoading, isFetched, error } = useWebsiteMetrics(websiteId,@@ -114,8 +107,8 @@ export function MetricsTable({{showMore && data && !error && limit && (<LinkButton href={renderUrl({ view: type })} variant="quiet"><Text>{formatMessage(labels.more)}</Text>- <Icon size="sm" rotate={dir === 'rtl' ? 180 : 0}>- <Icons.ArrowRight />+ <Icon size="sm">+ <Icons.Arrow /></Icon></LinkButton>)}diff --git a/src/components/metrics/ReferrersTable.tsx b/src/components/metrics/ReferrersTable.tsxindex 1a7d9e25f..eb7dafd75 100644--- a/src/components/metrics/ReferrersTable.tsx+++ b/src/components/metrics/ReferrersTable.tsx@@ -5,7 +5,7 @@ import { MetricsTable, MetricsTableProps } from './MetricsTable';import { FilterButtons } from '@/components/common/FilterButtons';import thenby from 'thenby';import { GROUPED_DOMAINS } from '@/lib/constants';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';export interface ReferrersTableProps extends MetricsTableProps {allowFilter?: boolean;diff --git a/src/components/metrics/TagsTable.tsx b/src/components/metrics/TagsTable.tsxindex 7a39189bd..658484c8a 100644--- a/src/components/metrics/TagsTable.tsx+++ b/src/components/metrics/TagsTable.tsx@@ -1,7 +1,7 @@import { MetricsTable, MetricsTableProps } from './MetricsTable';import { FilterLink } from '@/components/common/FilterLink';import { useMessages } from '@/components/hooks';-import { Flexbox } from 'react-basics';+import { Flexbox } from '@umami/react-zen';export function TagsTable(props: MetricsTableProps) {const { formatMessage, labels } = useMessages();diff --git a/src/components/svg/Path.tsx b/src/components/svg/Path.tsxindex 3a965032e..6627964fe 100644--- a/src/components/svg/Path.tsx+++ b/src/components/svg/Path.tsx@@ -1,14 +1,7 @@import * as React from 'react';import type { SVGProps } from 'react';const SvgPath = (props: SVGProps<SVGSVGElement>) => (- <svg- xmlns="http://www.w3.org/2000/svg"- width={512}- height={512}- fill="none"- viewBox="0 0 64 64"- {...props}- >+ <svg xmlns="http://www.w3.org/2000/svg" width={512} height={512} viewBox="0 0 64 64" {...props}><path d="m56.4 47.6-6-6c-.8-.8-2-.8-2.8 0s-.8 2 0 2.8l2.6 2.6H18.5c-3.6 0-6.5-2.9-6.5-6.5s2.9-6.5 6.5-6.5h27C51.3 34 56 29.3 56 23.5S51.3 13 45.5 13H22.7c-.9-3.4-4-6-7.7-6-4.4 0-8 3.6-8 8s3.6 8 8 8c3.7 0 6.8-2.6 7.7-6h22.8c3.6 0 6.5 2.9 6.5 6.5S49.1 30 45.5 30h-27C12.7 30 8 34.7 8 40.5S12.7 51 18.5 51h31.7l-2.6 2.6c-.8.8-.8 2 0 2.8.4.4.9.6 1.4.6s1-.2 1.4-.6l6-6c.8-.8.8-2 0-2.8M15 19c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4" /></svg>);diff --git a/src/lib/react.ts b/src/lib/react.tsnew file mode 100644index 000000000..decc1d6f8--- /dev/null+++ b/src/lib/react.ts@@ -0,0 +1,77 @@+import {+ Children,+ cloneElement,+ FC,+ Fragment,+ isValidElement,+ ReactElement,+ ReactNode,+} from 'react';++export function getFragmentChildren(children: ReactNode) {+ return (children as ReactElement)?.type === Fragment+ ? (children as ReactElement).props['children']+ : children;+}++export function isValidChild(child: ReactElement, types: FC | FC[]) {+ if (!isValidElement(child)) {+ return false;+ }+ return (Array.isArray(types) ? types : [types]).find(type => type === child.type);+}++export function mapChildren(+ children: ReactNode,+ handler: (child: ReactElement, index: number) => any,+) {+ return Children.map(getFragmentChildren(children) as ReactElement[], (child, index) => {+ if (!child?.props) {+ return null;+ }+ return handler(child, index);+ });+}++export function cloneChildren(+ children: ReactNode,+ handler: (child: ReactElement, index: number) => any,+ options?: { validChildren?: any[]; onlyRenderValid?: boolean },+): ReactNode {+ if (!children) {+ return null;+ }++ const { validChildren, onlyRenderValid = false } = options || {};++ return mapChildren(children, (child, index) => {+ const invalid = validChildren && !isValidChild(child as ReactElement, validChildren);++ if (onlyRenderValid && invalid) {+ return null;+ }++ if (!invalid && isValidElement(child)) {+ return cloneElement(child, handler(child, index));+ }++ return child;+ });+}++export function renderChildren(+ children: ReactNode | ((item: any, index: number, array: any) => ReactNode),+ items: any[],+ handler: (child: ReactElement, index: number) => object | undefined,+ options?: { validChildren?: any[]; onlyRenderValid?: boolean },+): ReactNode {+ if (typeof children === 'function' && items?.length > 0) {+ return cloneChildren(items.map(children), handler, options);+ }++ return cloneChildren(getFragmentChildren(children as ReactNode), handler, options);+}++export function countChildren(children: ReactNode): number {+ return Children.count(getFragmentChildren(children));+}diff --git a/src/lib/schema.ts b/src/lib/schema.tsindex 4e2b3e4a3..d8d5c8e17 100644--- a/src/lib/schema.ts+++ b/src/lib/schema.ts@@ -34,7 +34,9 @@ export const unitParam = z.string().refine(value => UNIT_TYPES.includes(value),message: 'Invalid unit',});-export const roleParam = z.enum(['team-member', 'team-view-only', 'team-manager']);+export const userRoleParam = z.enum(['admin', 'user', 'view-only']);++export const teamRoleParam = z.enum(['team-member', 'team-view-only', 'team-manager']);export const anyObjectParam = z.object({}).passthrough();