diff --git a/web/package.json b/web/package.json index 4b30df3d..3f93372a 100644 --- a/web/package.json +++ b/web/package.json @@ -19,8 +19,6 @@ "dependencies": { "@connectrpc/connect": "^2.1.1", "@connectrpc/connect-web": "^2.1.1", - "@emotion/react": "^11.14.0", - "@emotion/styled": "^11.14.1", "@github/relative-time-element": "^5.0.0", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-dialog": "^1.1.15", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 03a6120c..9dff6740 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -14,12 +14,6 @@ importers: '@connectrpc/connect-web': specifier: ^2.1.1 version: 2.1.1(@bufbuild/protobuf@2.12.0)(@connectrpc/connect@2.1.1(@bufbuild/protobuf@2.12.0)) - '@emotion/react': - specifier: ^11.14.0 - version: 11.14.0(@types/react@19.2.14)(react@19.2.6) - '@emotion/styled': - specifier: ^11.14.1 - version: 11.14.1(@emotion/react@11.14.0(@types/react@19.2.14)(react@19.2.6))(@types/react@19.2.14)(react@19.2.6) '@github/relative-time-element': specifier: ^5.0.0 version: 5.0.0 @@ -548,60 +542,6 @@ packages: '@emnapi/wasi-threads@1.2.1': resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@emotion/babel-plugin@11.13.5': - resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==} - - '@emotion/cache@11.14.0': - resolution: {integrity: sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==} - - '@emotion/hash@0.9.2': - resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==} - - '@emotion/is-prop-valid@1.4.0': - resolution: {integrity: sha512-QgD4fyscGcbbKwJmqNvUMSE02OsHUa+lAWKdEUIJKgqe5IwRSKd7+KhibEWdaKwgjLj0DRSHA9biAIqGBk05lw==} - - '@emotion/memoize@0.9.0': - resolution: {integrity: sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==} - - '@emotion/react@11.14.0': - resolution: {integrity: sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==} - peerDependencies: - '@types/react': '*' - react: '>=16.8.0' - peerDependenciesMeta: - '@types/react': - optional: true - - '@emotion/serialize@1.3.3': - resolution: {integrity: sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==} - - '@emotion/sheet@1.4.0': - resolution: {integrity: sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==} - - '@emotion/styled@11.14.1': - resolution: {integrity: sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==} - peerDependencies: - '@emotion/react': ^11.0.0-rc.0 - '@types/react': '*' - react: '>=16.8.0' - peerDependenciesMeta: - '@types/react': - optional: true - - '@emotion/unitless@0.10.0': - resolution: {integrity: sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==} - - '@emotion/use-insertion-effect-with-fallbacks@1.2.0': - resolution: {integrity: sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==} - peerDependencies: - react: '>=16.8.0' - - '@emotion/utils@1.4.2': - resolution: {integrity: sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==} - - '@emotion/weak-memoize@0.4.0': - resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} - '@exodus/bytes@1.15.0': resolution: {integrity: sha512-UY0nlA+feH81UGSHv92sLEPLCeZFjXOuHhrIo0HQydScuQc8s0A7kL/UdgwgDq8g8ilksmuoF35YVTNphV2aBQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -1672,9 +1612,6 @@ packages: '@types/node@24.12.2': resolution: {integrity: sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==} - '@types/parse-json@4.0.2': - resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - '@types/qs@6.15.1': resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} @@ -1777,10 +1714,6 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - babel-plugin-macros@3.1.0: - resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} - engines: {node: '>=10', npm: '>=6'} - babel-plugin-polyfill-corejs2@0.4.17: resolution: {integrity: sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==} peerDependencies: @@ -1823,10 +1756,6 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - caniuse-lite@1.0.30001792: resolution: {integrity: sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==} @@ -1882,9 +1811,6 @@ packages: confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - convert-source-map@1.9.0: - resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -1904,10 +1830,6 @@ packages: cose-base@2.2.0: resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} - cosmiconfig@7.1.0: - resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} - engines: {node: '>=10'} - css-tree@3.2.1: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -2137,9 +2059,6 @@ packages: resolution: {integrity: sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==} engines: {node: '>=20.19.0'} - error-ex@1.3.4: - resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} - es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -2151,10 +2070,6 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} @@ -2185,9 +2100,6 @@ packages: picomatch: optional: true - find-root@1.1.0: - resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -2266,9 +2178,6 @@ packages: resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} engines: {node: '>=12.0.0'} - hoist-non-react-statics@3.3.2: - resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - html-encoding-sniffer@6.0.0: resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -2297,10 +2206,6 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} @@ -2321,9 +2226,6 @@ packages: is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-core-module@2.16.1: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} @@ -2362,9 +2264,6 @@ packages: engines: {node: '>=6'} hasBin: true - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -2469,9 +2368,6 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - linkifyjs@4.3.3: resolution: {integrity: sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==} @@ -2695,17 +2591,9 @@ packages: package-manager-detector@1.6.0: resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - parse5@7.3.0: resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} @@ -2718,10 +2606,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -2823,9 +2707,6 @@ packages: typescript: optional: true - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} @@ -2937,10 +2818,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - resolve@1.22.12: resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==} engines: {node: '>= 0.4'} @@ -2990,10 +2867,6 @@ packages: source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -3020,9 +2893,6 @@ packages: style-to-object@1.0.14: resolution: {integrity: sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==} - stylis@4.2.0: - resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} - stylis@4.4.0: resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} @@ -3329,10 +3199,6 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yaml@1.10.3: - resolution: {integrity: sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==} - engines: {node: '>= 6'} - zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -3599,89 +3465,6 @@ snapshots: tslib: 2.8.1 optional: true - '@emotion/babel-plugin@11.13.5': - dependencies: - '@babel/helper-module-imports': 7.28.6 - '@babel/runtime': 7.29.2 - '@emotion/hash': 0.9.2 - '@emotion/memoize': 0.9.0 - '@emotion/serialize': 1.3.3 - babel-plugin-macros: 3.1.0 - convert-source-map: 1.9.0 - escape-string-regexp: 4.0.0 - find-root: 1.1.0 - source-map: 0.5.7 - stylis: 4.2.0 - transitivePeerDependencies: - - supports-color - - '@emotion/cache@11.14.0': - dependencies: - '@emotion/memoize': 0.9.0 - '@emotion/sheet': 1.4.0 - '@emotion/utils': 1.4.2 - '@emotion/weak-memoize': 0.4.0 - stylis: 4.2.0 - - '@emotion/hash@0.9.2': {} - - '@emotion/is-prop-valid@1.4.0': - dependencies: - '@emotion/memoize': 0.9.0 - - '@emotion/memoize@0.9.0': {} - - '@emotion/react@11.14.0(@types/react@19.2.14)(react@19.2.6)': - dependencies: - '@babel/runtime': 7.29.2 - '@emotion/babel-plugin': 11.13.5 - '@emotion/cache': 11.14.0 - '@emotion/serialize': 1.3.3 - '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.6) - '@emotion/utils': 1.4.2 - '@emotion/weak-memoize': 0.4.0 - hoist-non-react-statics: 3.3.2 - react: 19.2.6 - optionalDependencies: - '@types/react': 19.2.14 - transitivePeerDependencies: - - supports-color - - '@emotion/serialize@1.3.3': - dependencies: - '@emotion/hash': 0.9.2 - '@emotion/memoize': 0.9.0 - '@emotion/unitless': 0.10.0 - '@emotion/utils': 1.4.2 - csstype: 3.2.3 - - '@emotion/sheet@1.4.0': {} - - '@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.2.14)(react@19.2.6))(@types/react@19.2.14)(react@19.2.6)': - dependencies: - '@babel/runtime': 7.29.2 - '@emotion/babel-plugin': 11.13.5 - '@emotion/is-prop-valid': 1.4.0 - '@emotion/react': 11.14.0(@types/react@19.2.14)(react@19.2.6) - '@emotion/serialize': 1.3.3 - '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.6) - '@emotion/utils': 1.4.2 - react: 19.2.6 - optionalDependencies: - '@types/react': 19.2.14 - transitivePeerDependencies: - - supports-color - - '@emotion/unitless@0.10.0': {} - - '@emotion/use-insertion-effect-with-fallbacks@1.2.0(react@19.2.6)': - dependencies: - react: 19.2.6 - - '@emotion/utils@1.4.2': {} - - '@emotion/weak-memoize@0.4.0': {} - '@exodus/bytes@1.15.0': {} '@floating-ui/core@1.7.5': @@ -4739,8 +4522,6 @@ snapshots: dependencies: undici-types: 7.16.0 - '@types/parse-json@4.0.2': {} - '@types/qs@6.15.1': {} '@types/react-dom@19.2.3(@types/react@19.2.14)': @@ -4836,12 +4617,6 @@ snapshots: assertion-error@2.0.1: {} - babel-plugin-macros@3.1.0: - dependencies: - '@babel/runtime': 7.29.2 - cosmiconfig: 7.1.0 - resolve: 1.22.12 - babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.0): dependencies: '@babel/compat-data': 7.29.3 @@ -4890,8 +4665,6 @@ snapshots: buffer-from@1.1.2: {} - callsites@3.1.0: {} - caniuse-lite@1.0.30001792: {} ccount@2.0.1: {} @@ -4935,8 +4708,6 @@ snapshots: confbox@0.1.8: {} - convert-source-map@1.9.0: {} - convert-source-map@2.0.0: {} cookie@1.1.1: {} @@ -4955,14 +4726,6 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig@7.1.0: - dependencies: - '@types/parse-json': 4.0.2 - import-fresh: 3.3.1 - parse-json: 5.2.0 - path-type: 4.0.0 - yaml: 1.10.3 - css-tree@3.2.1: dependencies: mdn-data: 2.27.1 @@ -5208,18 +4971,12 @@ snapshots: entities@8.0.0: {} - error-ex@1.3.4: - dependencies: - is-arrayish: 0.2.1 - es-errors@1.3.0: {} es-module-lexer@2.1.0: {} escalade@3.2.0: {} - escape-string-regexp@4.0.0: {} - escape-string-regexp@5.0.0: {} estree-util-is-identifier-name@3.0.0: {} @@ -5238,8 +4995,6 @@ snapshots: optionalDependencies: picomatch: 4.0.4 - find-root@1.1.0: {} - fsevents@2.3.3: optional: true @@ -5377,10 +5132,6 @@ snapshots: highlight.js@11.11.1: {} - hoist-non-react-statics@3.3.2: - dependencies: - react-is: 16.13.1 - html-encoding-sniffer@6.0.0: dependencies: '@exodus/bytes': 1.15.0 @@ -5405,11 +5156,6 @@ snapshots: dependencies: safer-buffer: 2.1.2 - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - indent-string@4.0.0: {} inline-style-parser@0.2.7: {} @@ -5425,8 +5171,6 @@ snapshots: is-alphabetical: 2.0.1 is-decimal: 2.0.1 - is-arrayish@0.2.1: {} - is-core-module@2.16.1: dependencies: hasown: 2.0.3 @@ -5471,8 +5215,6 @@ snapshots: jsesc@3.1.0: {} - json-parse-even-better-errors@2.3.1: {} - json5@2.2.3: {} katex@0.16.45: @@ -5549,8 +5291,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 - lines-and-columns@1.2.4: {} - linkifyjs@4.3.3: {} lodash-es@4.18.1: {} @@ -6003,10 +5743,6 @@ snapshots: package-manager-detector@1.6.0: {} - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse-entities@4.0.2: dependencies: '@types/unist': 2.0.11 @@ -6017,13 +5753,6 @@ snapshots: is-decimal: 2.0.1 is-hexadecimal: 2.0.1 - parse-json@5.2.0: - dependencies: - '@babel/code-frame': 7.29.0 - error-ex: 1.3.4 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - parse5@7.3.0: dependencies: entities: 6.0.1 @@ -6036,8 +5765,6 @@ snapshots: path-parse@1.0.7: {} - path-type@4.0.0: {} - pathe@2.0.3: {} picocolors@1.1.1: {} @@ -6170,8 +5897,6 @@ snapshots: react-dom: 19.2.6(react@19.2.6) typescript: 6.0.3 - react-is@16.13.1: {} - react-is@17.0.2: {} react-leaflet-cluster@4.1.3(@react-leaflet/core@3.0.0(leaflet@1.9.4)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(leaflet@1.9.4)(react-dom@19.2.6(react@19.2.6))(react-leaflet@5.0.0(leaflet@1.9.4)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))(react@19.2.6): @@ -6328,8 +6053,6 @@ snapshots: require-from-string@2.0.2: {} - resolve-from@4.0.0: {} - resolve@1.22.12: dependencies: es-errors: 1.3.0 @@ -6392,8 +6115,6 @@ snapshots: buffer-from: 1.1.2 source-map: 0.6.1 - source-map@0.5.7: {} - source-map@0.6.1: {} space-separated-tokens@2.0.2: {} @@ -6419,8 +6140,6 @@ snapshots: dependencies: inline-style-parser: 0.2.7 - stylis@4.2.0: {} - stylis@4.4.0: {} supports-preserve-symlinks-flag@1.0.0: {} @@ -6663,6 +6382,4 @@ snapshots: yallist@3.1.1: {} - yaml@1.10.3: {} - zwitch@2.0.4: {} diff --git a/web/src/components/ActivityCalendar/CalendarCell.tsx b/web/src/components/ActivityCalendar/CalendarCell.tsx index 9fcc9b05..f1e16d5c 100644 --- a/web/src/components/ActivityCalendar/CalendarCell.tsx +++ b/web/src/components/ActivityCalendar/CalendarCell.tsx @@ -27,7 +27,7 @@ export const CalendarCell = memo((props: CalendarCellProps) => { const smallExtraClasses = size === "small" ? `${SMALL_CELL_SIZE.dimensions} min-h-0` : ""; const baseClasses = cn( - "aspect-square w-full flex items-center justify-center text-center transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 select-none border border-border/10 bg-muted/20", + "aspect-square w-full flex items-center justify-center text-center transition-all duration-150 select-none border border-border/10 bg-muted/20", sizeConfig.font, sizeConfig.borderRadius, smallExtraClasses, @@ -42,6 +42,7 @@ export const CalendarCell = memo((props: CalendarCellProps) => { const intensityClass = getCellIntensityClass(day, maxCount); const buttonClasses = cn( + "h-auto p-0", baseClasses, intensityClass, getCalendarCellStateClass(day), diff --git a/web/src/components/AttachmentLibrary/AttachmentFileRows.tsx b/web/src/components/AttachmentLibrary/AttachmentFileRows.tsx index ef80a3b0..784e910b 100644 --- a/web/src/components/AttachmentLibrary/AttachmentFileRows.tsx +++ b/web/src/components/AttachmentLibrary/AttachmentFileRows.tsx @@ -104,7 +104,7 @@ export const AttachmentUnusedRows = ({ items }: { items: AttachmentLibraryListIt {items.map((item) => (
@@ -118,10 +118,7 @@ export const AttachmentUnusedRows = ({ items }: { items: AttachmentLibraryListIt - +
))} diff --git a/web/src/components/AttachmentLibrary/AttachmentLibraryPrimitives.tsx b/web/src/components/AttachmentLibrary/AttachmentLibraryPrimitives.tsx index d173e898..cf3ffd21 100644 --- a/web/src/components/AttachmentLibrary/AttachmentLibraryPrimitives.tsx +++ b/web/src/components/AttachmentLibrary/AttachmentLibraryPrimitives.tsx @@ -52,10 +52,7 @@ export const AttachmentSourceChip = ({ if (!memoName) { return ( - + {t(unlinkedLabelKey)} ); diff --git a/web/src/components/AttachmentLibrary/AttachmentLibraryStates.tsx b/web/src/components/AttachmentLibrary/AttachmentLibraryStates.tsx index cc09ce8c..697a84fc 100644 --- a/web/src/components/AttachmentLibrary/AttachmentLibraryStates.tsx +++ b/web/src/components/AttachmentLibrary/AttachmentLibraryStates.tsx @@ -53,7 +53,7 @@ export const AttachmentLibraryUnusedPanel = ({ count, isDeleting, isExpanded, on const t = useTranslate(); return ( -
+
@@ -63,7 +63,7 @@ export const AttachmentLibraryUnusedPanel = ({ count, isDeleting, isExpanded, on
- +
diff --git a/web/src/components/CreateWebhookDialog.tsx b/web/src/components/CreateWebhookDialog.tsx index ed63104a..d578aa83 100644 --- a/web/src/components/CreateWebhookDialog.tsx +++ b/web/src/components/CreateWebhookDialog.tsx @@ -211,7 +211,7 @@ function CreateWebhookDialog({ open, onOpenChange, webhookName, onSuccess }: Pro disabled={!state.signingSecret} aria-label={t("setting.webhook.create-dialog.copy-secret")} > - {secretCopied ? : } + {secretCopied ? : }
{filteredLocales.map((locale) => ( - +
))} {filteredLocales.length === 0 && (
diff --git a/web/src/components/MemoContent/Mention.tsx b/web/src/components/MemoContent/Mention.tsx index bb7c4424..49a3b8c6 100644 --- a/web/src/components/MemoContent/Mention.tsx +++ b/web/src/components/MemoContent/Mention.tsx @@ -29,7 +29,7 @@ export const Mention: React.FC = ({ return ( {url}
+ + +
); })} diff --git a/web/src/components/MemoMetadata/Attachment/AttachmentListEditor.tsx b/web/src/components/MemoMetadata/Attachment/AttachmentListEditor.tsx index 79c38a5e..5903a887 100644 --- a/web/src/components/MemoMetadata/Attachment/AttachmentListEditor.tsx +++ b/web/src/components/MemoMetadata/Attachment/AttachmentListEditor.tsx @@ -4,6 +4,7 @@ import type { AttachmentItem, LocalFile } from "@/components/MemoEditor/types/at import { getAudioRecordingTimeLabel, toAttachmentItems } from "@/components/MemoEditor/types/attachment"; import MetadataSection from "@/components/MemoMetadata/MetadataSection"; import PreviewImageDialog from "@/components/PreviewImageDialog"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import type { Attachment } from "@/types/proto/api/v1/attachment_service_pb"; import { formatFileSize, getFileTypeLabel } from "@/utils/format"; @@ -33,56 +34,50 @@ const AttachmentItemActions: FC<{ return (
{onMoveUp && ( - + )} {onMoveDown && ( - + )} {onRemove && ( - + )}
); @@ -141,8 +136,7 @@ const AttachmentItemCard: FC<{
{(category === "image" || category === "motion") && thumbnailUrl ? ( - +
) : isVoiceNote ? ( <> +
); }; diff --git a/web/src/components/MemoMetadata/Attachment/AudioAttachmentItem.tsx b/web/src/components/MemoMetadata/Attachment/AudioAttachmentItem.tsx index adbd868b..20492b1b 100644 --- a/web/src/components/MemoMetadata/Attachment/AudioAttachmentItem.tsx +++ b/web/src/components/MemoMetadata/Attachment/AudioAttachmentItem.tsx @@ -1,5 +1,6 @@ import { PauseIcon, PlayIcon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { formatFileSize, getFileTypeLabel } from "@/utils/format"; import { formatAudioTime } from "./attachmentHelpers"; @@ -134,14 +135,14 @@ const AudioAttachmentItem = ({ filename, sourceUrl, mimeType, size, title, compa
- +
@@ -157,14 +158,14 @@ const AudioAttachmentItem = ({ filename, sourceUrl, mimeType, size, title, compa
{timeLabel}
- +
diff --git a/web/src/components/MemoMetadata/Location/LocationDisplayEditor.tsx b/web/src/components/MemoMetadata/Location/LocationDisplayEditor.tsx index 23b2a4ae..1e1979b4 100644 --- a/web/src/components/MemoMetadata/Location/LocationDisplayEditor.tsx +++ b/web/src/components/MemoMetadata/Location/LocationDisplayEditor.tsx @@ -1,5 +1,6 @@ import { MapPinIcon, XIcon } from "lucide-react"; import type { FC } from "react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import type { Location } from "@/types/proto/api/v1/memo_service_pb"; import { getLocationCoordinatesText, getLocationDisplayText } from "./locationHelpers"; @@ -30,15 +31,9 @@ const LocationDisplayEditor: FC = ({ location, onRem
{onRemove && ( - + )}
); diff --git a/web/src/components/MemoMetadata/Location/LocationDisplayView.tsx b/web/src/components/MemoMetadata/Location/LocationDisplayView.tsx index a853c996..b9d65594 100644 --- a/web/src/components/MemoMetadata/Location/LocationDisplayView.tsx +++ b/web/src/components/MemoMetadata/Location/LocationDisplayView.tsx @@ -1,17 +1,16 @@ import { MapPinIcon } from "lucide-react"; import { useState } from "react"; import { LazyLocationPicker } from "@/components/map/LazyLocationPicker"; +import { Button } from "@/components/ui/button"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; import type { Location } from "@/types/proto/api/v1/memo_service_pb"; import { getLocationCoordinatesText, getLocationDisplayText } from "./locationHelpers"; interface LocationDisplayViewProps { location?: Location; - className?: string; } -const LocationDisplayView = ({ location, className }: LocationDisplayViewProps) => { +const LocationDisplayView = ({ location }: LocationDisplayViewProps) => { const [popoverOpen, setPopoverOpen] = useState(false); if (!location) { @@ -23,20 +22,13 @@ const LocationDisplayView = ({ location, className }: LocationDisplayViewProps) return ( - +
diff --git a/web/src/components/MemoMetadata/SectionHeader.tsx b/web/src/components/MemoMetadata/SectionHeader.tsx index e753e8a0..b4189170 100644 --- a/web/src/components/MemoMetadata/SectionHeader.tsx +++ b/web/src/components/MemoMetadata/SectionHeader.tsx @@ -1,4 +1,5 @@ import type { LucideIcon } from "lucide-react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; export interface SectionHeaderTab { @@ -25,16 +26,17 @@ const SectionHeader = ({ icon: Icon, title, count, tabs }: SectionHeaderProps) =
{tabs.map((tab, idx) => (
- + {idx < tabs.length - 1 && /}
))} diff --git a/web/src/components/MemoView/components/MemoBody.tsx b/web/src/components/MemoView/components/MemoBody.tsx index a3142240..29ddfa11 100644 --- a/web/src/components/MemoView/components/MemoBody.tsx +++ b/web/src/components/MemoView/components/MemoBody.tsx @@ -12,12 +12,9 @@ const BlurOverlay: React.FC<{ onClick?: () => void }> = ({ onClick }) => { const t = useTranslate(); return (
- +
); }; diff --git a/web/src/components/MemoView/components/MemoHeader.tsx b/web/src/components/MemoView/components/MemoHeader.tsx index 7ecb5381..e87bcb75 100644 --- a/web/src/components/MemoView/components/MemoHeader.tsx +++ b/web/src/components/MemoView/components/MemoHeader.tsx @@ -45,7 +45,10 @@ const MemoHeader: React.FC = ({ showCreator, showVisibility, sh ); const timeTooltip = { createdAt: createTime ? `${t("common.created-at")}: ${createTime.toLocaleString(i18n.language)}` : undefined, - updatedAt: updateTime ? `${t("common.last-updated-at")}: ${updateTime.toLocaleString(i18n.language)}` : undefined, + updatedAt: + updateTime && (!createTime || updateTime.getTime() !== createTime.getTime()) + ? `${t("common.last-updated-at")}: ${updateTime.toLocaleString(i18n.language)}` + : undefined, }; return ( @@ -122,13 +125,12 @@ const CreatorDisplay: React.FC = ({ creator, displayTime, t {creator.displayName || creator.username} - +
@@ -157,13 +159,12 @@ interface TimeDisplayProps { const TimeDisplay: React.FC = ({ displayTime, timeTooltip, onGotoDetail }) => ( - + ); diff --git a/web/src/components/SearchBar.tsx b/web/src/components/SearchBar.tsx index 5fdb0ebd..4a8684c1 100644 --- a/web/src/components/SearchBar.tsx +++ b/web/src/components/SearchBar.tsx @@ -1,7 +1,6 @@ import { SearchIcon } from "lucide-react"; import { useRef, useState } from "react"; import { useMemoFilterContext } from "@/contexts/MemoFilterContext"; -import { cn } from "@/lib/utils"; import { useTranslate } from "@/utils/i18n"; import MemoDisplaySettingMenu from "./MemoDisplaySettingMenu"; @@ -36,7 +35,7 @@ const SearchBar = () => {
{ const chip = ( {label} {value} diff --git a/web/src/components/Settings/MemoRelatedSettings.tsx b/web/src/components/Settings/MemoRelatedSettings.tsx index de38e8f4..4a39ac6f 100644 --- a/web/src/components/Settings/MemoRelatedSettings.tsx +++ b/web/src/components/Settings/MemoRelatedSettings.tsx @@ -127,14 +127,14 @@ const MemoRelatedSettings = () => { {memoRelatedSetting.reactions.map((reactionType) => ( {reactionType} - + ))}
diff --git a/web/src/components/StatisticsView/MonthNavigator.tsx b/web/src/components/StatisticsView/MonthNavigator.tsx index 60d8184a..6feb85ae 100644 --- a/web/src/components/StatisticsView/MonthNavigator.tsx +++ b/web/src/components/StatisticsView/MonthNavigator.tsx @@ -70,22 +70,10 @@ export const MonthNavigator = memo(({ visibleMonth, onMonthChange, activityStats diff --git a/web/src/components/map/LocationPicker.tsx b/web/src/components/map/LocationPicker.tsx index 6fd269e7..58c167e7 100644 --- a/web/src/components/map/LocationPicker.tsx +++ b/web/src/components/map/LocationPicker.tsx @@ -69,11 +69,9 @@ const GlassButton = ({ icon, onClick, ariaLabel, title }: GlassButtonProps) => { aria-label={ariaLabel} title={title} className={cn( - "h-8 w-8 flex items-center justify-center rounded-lg", - "cursor-pointer transition-all duration-200", + "inline-flex items-center justify-center h-8 w-8 rounded-lg", "border border-border/80 bg-background/88 text-foreground shadow-sm backdrop-blur-md", "hover:scale-105 hover:bg-background hover:shadow-md active:scale-95", - "focus:outline-none focus:ring-2 focus:ring-ring/60", )} > {icon} diff --git a/web/src/components/ui/README.md b/web/src/components/ui/README.md new file mode 100644 index 00000000..f8ed310c --- /dev/null +++ b/web/src/components/ui/README.md @@ -0,0 +1,50 @@ +# UI Kit (`components/ui`) + +shadcn/ui primitives ("new-york" style, zinc base, lucide icons, CSS variables). +This folder is the **single source of styling truth**. Read this before adding a +component or reaching for `className` on a kit component. + +## The one rule: use props, not `className` + +Consumers style kit components through **`variant` / `size` / `shape` props only** +— do **not** pass `className` to add colors, sizing, borders, or hover states. + +- Need a look that no prop provides, but it recurs? **Add a variant here.** +- Need layout/positioning (margins, absolute)? Put it on a **wrapper** element. +- The element is genuinely bespoke (data-driven background, glass/blur, a + contextual one-off)? Don't fight the kit — use a **raw HTML element** with its + own classes. It is not a kit component. + +Color comes from the semantic OKLCH tokens documented in +[`../../themes/COLOR_GUIDE.md`](../../themes/COLOR_GUIDE.md) (`--primary`, +`--muted-foreground`, `--success`, `--warning`, …). Never hardcode `gray-500` / +`amber-50` palette classes. + +## Variant catalog + +| Component | variant | size / shape | Notes | +| --- | --- | --- | --- | +| **Button** | default · destructive · outline · secondary · ghost · link | size: default · sm · lg · icon · **icon-sm** | `icon-sm` (`size-6`) is local — for dense/compact icon buttons. Auto-sizes unsized `svg` children to `size-4`. | +| **Badge** | default · secondary · destructive · outline · **warning** | shape: default · **pill** | `warning` + `shape` are local additions. `pill` = `rounded-full`. | +| **Tabs** | — | variant: **segmented** · **underline** | Local component (not upstream shadcn). Context-based `Tabs`/`TabsList`/`TabsTrigger`, no Radix. `underline` relies on the consumer's own divider. | +| **Dialog** | — | size: sm · default · lg · xl · 2xl · full | Local `size` variants + auto-focus prevention on open. | +| **Select** | — | size: xs · sm · default | Local `size` prop on the trigger. | +| **DropdownMenu** | item: default · destructive | — | Local destructive item variant + a sub-menu hover-delay hook. | + +Each cva component also exports its variant types, e.g. `ButtonVariant`, +`ButtonSize`, `BadgeVariant`, `BadgeShape`, `TabsVariant` — use these instead of +re-deriving `VariantProps`. + +## Layering (z-index tiers) + +Defined once as Tailwind tokens in `themes/default.css` (`--z-index-*`) and used +by the primitives — do not hardcode `z-[60]`-style literals: + +| Utility | Value | Used by | +| --- | --- | --- | +| `z-overlay` | 50 | Dialog / Sheet overlay + content | +| `z-dropdown` | 60 | Select / DropdownMenu / Popover content | +| `z-tooltip` | 70 | Tooltip content + arrow | + +A dropdown inside a dialog needs `z-dropdown` (already the default) so it renders +above the overlay; a tooltip sits above everything. diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsx index 2710bfef..19c199dd 100644 --- a/web/src/components/ui/badge.tsx +++ b/web/src/components/ui/badge.tsx @@ -12,10 +12,16 @@ const badgeVariants = cva( secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", destructive: "border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90", outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + warning: "border-warning/40 bg-warning/10 text-warning", + }, + shape: { + default: "", + pill: "rounded-full", }, }, defaultVariants: { variant: "default", + shape: "default", }, }, ); @@ -23,12 +29,15 @@ const badgeVariants = cva( function Badge({ className, variant, + shape, asChild = false, ...props }: React.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { const Comp = asChild ? Slot : "span"; - return ; + return ; } export { Badge, badgeVariants }; +export type BadgeVariant = VariantProps["variant"]; +export type BadgeShape = VariantProps["shape"]; diff --git a/web/src/components/ui/button.tsx b/web/src/components/ui/button.tsx index 13fc5d82..112c65c7 100644 --- a/web/src/components/ui/button.tsx +++ b/web/src/components/ui/button.tsx @@ -20,6 +20,7 @@ const buttonVariants = cva( sm: "h-7 rounded-md gap-1 px-2 has-[>svg]:px-2", lg: "h-9 rounded-md px-4", icon: "size-8", + "icon-sm": "size-6", }, }, defaultVariants: { @@ -43,3 +44,5 @@ const Button = React.forwardRef< Button.displayName = "Button"; export { Button, buttonVariants }; +export type ButtonVariant = VariantProps["variant"]; +export type ButtonSize = VariantProps["size"]; diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx index 9181909e..f44e4503 100644 --- a/web/src/components/ui/dialog.tsx +++ b/web/src/components/ui/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef< ref={ref} data-slot="dialog-overlay" className={cn( - "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-foreground/50", + "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-overlay bg-foreground/50", className, )} {...props} @@ -29,7 +29,7 @@ const DialogOverlay = React.forwardRef< DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const dialogContentVariants = cva( - "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex flex-col translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 max-h-[calc(100vh-2rem)] sm:max-h-[calc(100vh-3rem)] md:max-h-[calc(100vh-4rem)]", + "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-overlay flex flex-col translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 max-h-[calc(100vh-2rem)] sm:max-h-[calc(100vh-3rem)] md:max-h-[calc(100vh-4rem)]", { variants: { size: { diff --git a/web/src/components/ui/dropdown-menu.tsx b/web/src/components/ui/dropdown-menu.tsx index 542cfeba..6d19f715 100644 --- a/web/src/components/ui/dropdown-menu.tsx +++ b/web/src/components/ui/dropdown-menu.tsx @@ -31,7 +31,7 @@ const DropdownMenuContent = React.forwardRef< data-slot="dropdown-menu-content" sideOffset={sideOffset} className={cn( - "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[60] max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", + "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-dropdown max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className, )} {...props} @@ -188,7 +188,7 @@ function DropdownMenuSubContent({ className, ...props }: React.ComponentProps void; + variant: TabsVariant; +} + +const TabsContext = createContext(null); + +const useTabsContext = () => { + const context = useContext(TabsContext); + if (!context) { + throw new Error("Tabs.* components must be rendered within "); + } + return context; +}; + +const tabsListVariants = cva("flex flex-row", { + variants: { + variant: { + segmented: "gap-1", + underline: "gap-1", + }, + }, + defaultVariants: { variant: "segmented" }, +}); + +const tabsTriggerVariants = cva( + "inline-flex items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0", + { + variants: { + variant: { + segmented: "rounded-md px-3 py-1.5", + underline: "rounded-t-lg rounded-b-none border-b-2 px-3 py-2", + }, + active: { true: "", false: "" }, + }, + compoundVariants: [ + { variant: "segmented", active: true, className: "bg-background text-foreground shadow-sm" }, + { variant: "segmented", active: false, className: "text-muted-foreground hover:bg-background/50 hover:text-foreground" }, + { variant: "underline", active: true, className: "border-primary bg-primary/5 text-primary" }, + { + variant: "underline", + active: false, + className: "border-transparent text-muted-foreground hover:bg-muted/50 hover:text-foreground", + }, + ], + defaultVariants: { variant: "segmented", active: false }, + }, +); + +interface TabsProps extends Omit, "onChange"> { + value: string; + onValueChange: (value: string) => void; + variant?: TabsVariant; +} + +function Tabs({ value, onValueChange, variant = "segmented", children, ...props }: TabsProps) { + return ( + +
{children}
+
+ ); +} + +function TabsList({ className, ...props }: React.ComponentProps<"div">) { + const { variant } = useTabsContext(); + return
; +} + +interface TabsTriggerProps extends Omit, "value"> { + value: string; +} + +function TabsTrigger({ value, className, onClick, ...props }: TabsTriggerProps) { + const { value: activeValue, onValueChange, variant } = useTabsContext(); + const active = activeValue === value; + return ( + - - -
+ setFilter(value as typeof filter)} variant="segmented"> + + + {t("common.all")} ({allNotifications.length}) + + + + {t("inbox.unread")} ({unreadCount}) + + + + {t("common.archived")} ({archivedCount}) + + + {/* Notifications List */} diff --git a/web/src/pages/Shortcuts.tsx b/web/src/pages/Shortcuts.tsx index 5e9850eb..bb4c37f6 100644 --- a/web/src/pages/Shortcuts.tsx +++ b/web/src/pages/Shortcuts.tsx @@ -153,10 +153,9 @@ const ShortcutGuide = ({ onUseExample }: ShortcutGuideProps) => { {shortcutExamples.map((example) => { const Icon = example.icon; return ( - + ); })} diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsx index a04fe8c0..8f61d782 100644 --- a/web/src/pages/UserProfile.tsx +++ b/web/src/pages/UserProfile.tsx @@ -1,5 +1,5 @@ import copy from "copy-to-clipboard"; -import { ExternalLinkIcon, LayoutListIcon, type LucideIcon, MapIcon } from "lucide-react"; +import { ExternalLinkIcon, LayoutListIcon, MapIcon } from "lucide-react"; import { lazy, Suspense } from "react"; import { toast } from "react-hot-toast"; import { useParams, useSearchParams } from "react-router-dom"; @@ -7,9 +7,9 @@ import MemoView from "@/components/MemoView"; import PagedMemoList from "@/components/PagedMemoList"; import UserAvatar from "@/components/UserAvatar"; import { Button } from "@/components/ui/button"; +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { useMemoFilters, useMemoSorting } from "@/hooks"; import { useUser } from "@/hooks/useUserQueries"; -import { cn } from "@/lib/utils"; import { State } from "@/types/proto/api/v1/common_pb"; import { Memo } from "@/types/proto/api/v1/memo_service_pb"; import { useTranslate } from "@/utils/i18n"; @@ -18,32 +18,6 @@ type TabView = "memos" | "map"; const UserMemoMap = lazy(() => import("@/components/UserMemoMap")); -const TabButton = ({ - icon: Icon, - label, - isActive, - onClick, -}: { - icon: LucideIcon; - label: string; - isActive: boolean; - onClick: () => void; -}) => ( - -); - interface User { name: string; username: string; @@ -117,13 +91,18 @@ const UserProfile = () => {
- toggleTab("memos")} - /> - toggleTab("map")} /> + toggleTab(value as TabView)} variant="underline"> + + + + {t("common.memos")} + + + + {t("common.map")} + + +
diff --git a/web/src/themes/COLOR_GUIDE.md b/web/src/themes/COLOR_GUIDE.md index 4197c858..aa0fdf9d 100644 --- a/web/src/themes/COLOR_GUIDE.md +++ b/web/src/themes/COLOR_GUIDE.md @@ -92,17 +92,25 @@ The color system supports both light and dark themes automatically through CSS c ### ⚠️ Feedback Colors -| Variable | Light Theme | Dark Theme | Usage | -| -------------------------- | ----------- | ---------- | ------------------------------- | -| `--destructive` | Very dark | Red | Error states, dangerous actions | -| `--destructive-foreground` | White | White | Text on destructive backgrounds | +| Variable | Light Theme | Dark Theme | Usage | +| -------------------------- | ----------- | ------------- | ---------------------------------- | +| `--destructive` | Very dark | Red | Error states, dangerous actions | +| `--destructive-foreground` | White | White | Text on destructive backgrounds | +| `--success` | Green | Brighter green| Confirmation states (copied, saved)| +| `--success-foreground` | Near white | Near black | Text on success backgrounds | +| `--warning` | Amber | Brighter amber| Caution states (unused, deprecated)| +| `--warning-foreground` | Dark | Dark | Text on warning backgrounds | **When to use:** -- Error messages -- Delete buttons -- Warning alerts -- Validation failures +- Error messages, delete buttons, validation failures → `--destructive` +- Success confirmations (e.g. "copied ✓", saved) → `--success` +- Non-critical caution (e.g. unused attachments) → `--warning` + +For tinted treatments (badges, panels), pair the token with an opacity modifier +the same way `--destructive` is used, e.g. `border-warning/30 bg-warning/10 text-warning`. +This auto-adapts across themes — never hardcode `amber-*` / `green-*` palette classes +or add manual `dark:` overrides for feedback states. ### 📊 Data Visualization @@ -260,39 +268,27 @@ To ensure proper contrast and accessibility: ## Z-Index Hierarchy -The application uses a structured z-index hierarchy to ensure proper layering of UI components: +The layering tiers are defined once as Tailwind tokens in `default.css` +(`--z-index-overlay/dropdown/tooltip`) and consumed via named utilities — do not +hardcode `z-[60]`-style literals. -| Component Type | Z-Index | Usage | -| ----------------- | -------- | ------------------------------------- | -| **Base Content** | `z-0` | Normal page content | -| **Overlays** | `z-50` | Dialog/Sheet backgrounds | -| **Modal Content** | `z-50` | Dialog/Sheet content | -| **Dropdowns** | `z-[60]` | Select, DropdownMenu, Popover content | -| **Tooltips** | `z-[70]` | Tooltip content (highest priority) | +| Component Type | Utility | Value | Usage | +| ----------------- | ------------- | ----- | ------------------------------------- | +| **Base Content** | `z-0` | 0 | Normal page content | +| **Overlays** | `z-overlay` | 50 | Dialog/Sheet backgrounds | +| **Modal Content** | `z-overlay` | 50 | Dialog/Sheet content | +| **Dropdowns** | `z-dropdown` | 60 | Select, DropdownMenu, Popover content | +| **Tooltips** | `z-tooltip` | 70 | Tooltip content (highest priority) | ### Rules -1. **Dialog/Sheet**: Use `z-50` for both overlay and content -2. **Interactive Elements**: Use `z-[60]` for dropdowns inside dialogs -3. **Tooltips**: Use `z-[70]` to appear above all other elements +1. **Dialog/Sheet**: Use `z-overlay` for both overlay and content +2. **Interactive Elements**: Use `z-dropdown` for dropdowns inside dialogs +3. **Tooltips**: Use `z-tooltip` to appear above all other elements 4. **Always test**: Ensure Select/DropdownMenu works inside Dialog/Sheet -### Example - -```tsx -// ✅ Correct: Select inside Dialog will appear above dialog content - - - - - -``` +These are already the defaults baked into the `ui/` primitives, so a `Select` +inside a `Dialog` renders above the overlay without any extra `z-*` class. --- diff --git a/web/src/themes/default-dark.css b/web/src/themes/default-dark.css index fa700550..b9c44990 100644 --- a/web/src/themes/default-dark.css +++ b/web/src/themes/default-dark.css @@ -30,6 +30,12 @@ --destructive: oklch(0.64 0.18 24); --destructive-foreground: oklch(0.98 0.004 255); + /* Feedback - success (green) and warning (amber), tuned brighter for dark surfaces */ + --success: oklch(0.7 0.15 155); + --success-foreground: oklch(0.2 0.03 155); + --warning: oklch(0.78 0.14 75); + --warning-foreground: oklch(0.25 0.03 75); + /* Borders - --border for layout dividers, --input for form field borders */ --border: oklch(0.38 0.01 255); --input: oklch(0.42 0.011 255); diff --git a/web/src/themes/default.css b/web/src/themes/default.css index 670d2517..3ec5ecee 100644 --- a/web/src/themes/default.css +++ b/web/src/themes/default.css @@ -15,6 +15,10 @@ --accent-foreground: oklch(0.2671 0.0196 98.939); --destructive: oklch(0.5 0.12 25); --destructive-foreground: oklch(1 0 0); + --success: oklch(0.55 0.13 150); + --success-foreground: oklch(0.98 0.01 150); + --warning: oklch(0.62 0.12 70); + --warning-foreground: oklch(0.25 0.03 75); --border: oklch(0.8847 0.0069 97.3627); --input: oklch(0.7621 0.0156 98.3528); --ring: oklch(0.45 0.08 250); @@ -56,6 +60,10 @@ --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); + --color-success: var(--success); + --color-success-foreground: var(--success-foreground); + --color-warning: var(--warning); + --color-warning-foreground: var(--warning-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); @@ -80,4 +88,10 @@ --shadow-lg: var(--shadow-lg); --shadow-xl: var(--shadow-xl); --shadow-2xl: var(--shadow-2xl); + + /* Layering tiers — keep overlays/dropdowns/tooltips stacked consistently. + Used by the ui/ primitives via z-overlay / z-dropdown / z-tooltip. */ + --z-index-overlay: 50; + --z-index-dropdown: 60; + --z-index-tooltip: 70; } diff --git a/web/src/themes/paper.css b/web/src/themes/paper.css index b57f97e4..291c9675 100644 --- a/web/src/themes/paper.css +++ b/web/src/themes/paper.css @@ -15,6 +15,10 @@ --accent-foreground: oklch(0.25 0.02 65); --destructive: oklch(0.48 0.15 25); --destructive-foreground: oklch(0.98 0.008 80); + --success: oklch(0.55 0.13 150); + --success-foreground: oklch(0.98 0.01 150); + --warning: oklch(0.6 0.12 65); + --warning-foreground: oklch(0.25 0.03 70); --border: oklch(0.85 0.025 72); --input: oklch(0.8 0.03 75); --ring: oklch(0.45 0.08 45);