From cfeaf37c375c00faf1a4e32034b38b77142f81ec Mon Sep 17 00:00:00 2001 From: Jayash Tripathy <76092296+JayashTripathy@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:50:30 +0530 Subject: [PATCH 1/7] feat: added switch --- packages/propel/src/switch.tsx | 54 +++++++++ pnpm-lock.yaml | 201 +++++++++++++++++++++++++-------- 2 files changed, 208 insertions(+), 47 deletions(-) create mode 100644 packages/propel/src/switch.tsx diff --git a/packages/propel/src/switch.tsx b/packages/propel/src/switch.tsx new file mode 100644 index 00000000000..8c1880ac326 --- /dev/null +++ b/packages/propel/src/switch.tsx @@ -0,0 +1,54 @@ +import * as React from "react"; +import { Switch as BaseSwitch } from "@base-ui-components/react/switch"; +import { cn } from "@plane/utils"; + +interface IToggleSwitchProps { + value: boolean; + onChange: (value: boolean) => void; + label?: string; + size?: "sm" | "md" | "lg"; + disabled?: boolean; + className?: string; +} + +const Switch: React.FC = (props) => { + const { value, onChange, label, size = "sm", disabled, className } = props; + return ( + + {label} + + + ); +}; + +Switch.displayName = "plane-ui-switch"; + +export { Switch }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index abe64c2dfc0..29e2d27b974 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -98,7 +98,7 @@ importers: version: 0.33.5 swr: specifier: ^2.2.4 - version: 2.3.6(react@18.3.1) + version: 2.3.3(react@18.3.1) uuid: specifier: ^9.0.1 version: 9.0.1 @@ -235,7 +235,7 @@ importers: version: 9.0.8 concurrently: specifier: ^9.0.1 - version: 9.2.0 + version: 9.1.2 nodemon: specifier: ^3.1.7 version: 3.1.10 @@ -361,7 +361,7 @@ importers: version: 0.33.5 swr: specifier: ^2.2.2 - version: 2.3.6(react@18.3.1) + version: 2.3.3(react@18.3.1) tailwind-merge: specifier: ^2.0.0 version: 2.6.0 @@ -398,7 +398,7 @@ importers: version: 9.0.8 '@typescript-eslint/eslint-plugin': specifier: ^8.36.0 - version: 8.40.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) + version: 8.38.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) typescript: specifier: 5.8.3 version: 5.8.3 @@ -509,7 +509,7 @@ importers: version: 0.2.1(next@14.2.30(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) posthog-js: specifier: ^1.131.3 - version: 1.260.1 + version: 1.258.5 react: specifier: ^18.3.1 version: 18.3.1 @@ -551,7 +551,7 @@ importers: version: 2.0.2 swr: specifier: ^2.1.3 - version: 2.3.6(react@18.3.1) + version: 2.3.3(react@18.3.1) tailwind-merge: specifier: ^2.0.0 version: 2.6.0 @@ -659,7 +659,7 @@ importers: dependencies: '@floating-ui/dom': specifier: ^1.7.1 - version: 1.7.3 + version: 1.7.2 '@floating-ui/react': specifier: ^0.26.4 version: 0.26.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -825,7 +825,7 @@ importers: devDependencies: '@typescript-eslint/eslint-plugin': specifier: ^8.6.0 - version: 8.40.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) + version: 8.38.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^8.6.0 version: 8.40.0(eslint@8.57.1)(typescript@5.8.3) @@ -843,7 +843,7 @@ importers: version: 1.13.4(eslint@8.57.1) eslint-plugin-import: specifier: ^2.29.1 - version: 2.32.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + version: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) eslint-plugin-react: specifier: ^7.33.2 version: 7.37.5(eslint@8.57.1) @@ -1111,6 +1111,9 @@ importers: '@atlaskit/pragmatic-drag-and-drop-hitbox': specifier: ^1.0.3 version: 1.1.0 + '@base-ui-components/react': + specifier: 1.0.0-beta.2 + version: 1.0.0-beta.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@blueprintjs/core': specifier: ^4.16.3 version: 4.20.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1749,6 +1752,9 @@ packages: '@floating-ui/core@1.7.3': resolution: {integrity: sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==} + '@floating-ui/dom@1.7.2': + resolution: {integrity: sha512-7cfaOQuCS27HD7DX+6ib2OrnW+b4ZBwDNnCcT0uTyidcmyWb03FnQqJybDBoCnpdxwBSfA94UAYlRCt7mV+TbA==} + '@floating-ui/dom@1.7.3': resolution: {integrity: sha512-uZA413QEpNuhtb3/iIKoYMSK07keHPYeXF02Zhd6e213j+d1NamLix/mCLxBUDW/Gx52sPH2m+chlUsyaBs/Ag==} @@ -3313,11 +3319,11 @@ packages: '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} - '@typescript-eslint/eslint-plugin@8.40.0': - resolution: {integrity: sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw==} + '@typescript-eslint/eslint-plugin@8.38.0': + resolution: {integrity: sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.40.0 + '@typescript-eslint/parser': ^8.38.0 eslint: ^8.57.0 || ^9.0.0 typescript: 5.8.3 @@ -3328,46 +3334,76 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: 5.8.3 + '@typescript-eslint/project-service@8.38.0': + resolution: {integrity: sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: 5.8.3 + '@typescript-eslint/project-service@8.40.0': resolution: {integrity: sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: 5.8.3 + '@typescript-eslint/scope-manager@8.38.0': + resolution: {integrity: sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.40.0': resolution: {integrity: sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.38.0': + resolution: {integrity: sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: 5.8.3 + '@typescript-eslint/tsconfig-utils@8.40.0': resolution: {integrity: sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: 5.8.3 - '@typescript-eslint/type-utils@8.40.0': - resolution: {integrity: sha512-eE60cK4KzAc6ZrzlJnflXdrMqOBaugeukWICO2rB0KNvwdIMaEaYiywwHMzA1qFpTxrLhN9Lp4E/00EgWcD3Ow==} + '@typescript-eslint/type-utils@8.38.0': + resolution: {integrity: sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: 5.8.3 + '@typescript-eslint/types@8.38.0': + resolution: {integrity: sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.40.0': resolution: {integrity: sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.38.0': + resolution: {integrity: sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: 5.8.3 + '@typescript-eslint/typescript-estree@8.40.0': resolution: {integrity: sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: 5.8.3 - '@typescript-eslint/utils@8.40.0': - resolution: {integrity: sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg==} + '@typescript-eslint/utils@8.38.0': + resolution: {integrity: sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: 5.8.3 + '@typescript-eslint/visitor-keys@8.38.0': + resolution: {integrity: sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.40.0': resolution: {integrity: sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4016,8 +4052,8 @@ packages: compute-scroll-into-view@3.1.1: resolution: {integrity: sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==} - concurrently@9.2.0: - resolution: {integrity: sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==} + concurrently@9.1.2: + resolution: {integrity: sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ==} engines: {node: '>=18'} hasBin: true @@ -4569,8 +4605,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-import@2.32.0: - resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==} + eslint-plugin-import@2.31.0: + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -6198,8 +6234,8 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} - posthog-js@1.260.1: - resolution: {integrity: sha512-DD8ZSRpdScacMqtqUIvMFme8lmOWkOvExG8VvjONE7Cm3xpRH5xXpfrwMJE4bayTGWKMx4ij6SfphK6dm/o2ug==} + posthog-js@1.258.5: + resolution: {integrity: sha512-Tx6CzS8MsGAQGPrQth5TbkGxGQgAY01SktNW773/KDmVOWiRVZq/WQF/MRJRiuFxJ7qjethZQi3aBWfWKdr1RA==} peerDependencies: '@rrweb/types': 2.0.0-alpha.17 rrweb-snapshot: 2.0.0-alpha.17 @@ -7028,8 +7064,8 @@ packages: '@swc/core': ^1.2.147 webpack: '>=2' - swr@2.3.6: - resolution: {integrity: sha512-wfHRmHWk/isGNMwlLGlZX5Gzz/uTgo0o2IRuTMcf4CPuPFJZlq0rDaKUx+ozB5nBOReNV1kiOyzMfj+MBMikLw==} + swr@2.3.3: + resolution: {integrity: sha512-dshNvs3ExOqtZ6kJBaAsabhPdHyeY4P2cKwRCniDVifBMoG/SVI7tfLWqPXriVspf2Rg4tPzXJTnwaihIeFw2A==} peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -7837,6 +7873,20 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 + '@base-ui-components/react@1.0.0-beta.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.10 + '@base-ui-components/utils': 0.1.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/react-dom': 2.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/utils': 0.2.10 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + reselect: 5.1.1 + tabbable: 6.2.0 + use-sync-external-store: 1.5.0(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.11 + '@base-ui-components/utils@0.1.0(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.26.10 @@ -7848,6 +7898,17 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 + '@base-ui-components/utils@0.1.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.10 + '@floating-ui/utils': 0.2.10 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + reselect: 5.1.1 + use-sync-external-store: 1.5.0(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.11 + '@blueprintjs/colors@4.2.1': dependencies: tslib: 2.5.3 @@ -8153,6 +8214,11 @@ snapshots: dependencies: '@floating-ui/utils': 0.2.10 + '@floating-ui/dom@1.7.2': + dependencies: + '@floating-ui/core': 1.7.3 + '@floating-ui/utils': 0.2.10 + '@floating-ui/dom@1.7.3': dependencies: '@floating-ui/core': 1.7.3 @@ -9861,14 +9927,14 @@ snapshots: dependencies: '@types/node': 20.19.11 - '@typescript-eslint/eslint-plugin@8.40.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.38.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.40.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/type-utils': 8.40.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/utils': 8.40.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/scope-manager': 8.38.0 + '@typescript-eslint/type-utils': 8.38.0(eslint@8.57.1)(typescript@5.8.3) + '@typescript-eslint/utils': 8.38.0(eslint@8.57.1)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.38.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 7.0.5 @@ -9890,6 +9956,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/project-service@8.38.0(typescript@5.8.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.8.3) + '@typescript-eslint/types': 8.40.0 + debug: 4.4.1(supports-color@5.5.0) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.40.0(typescript@5.8.3)': dependencies: '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.8.3) @@ -9899,20 +9974,29 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/scope-manager@8.38.0': + dependencies: + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/visitor-keys': 8.38.0 + '@typescript-eslint/scope-manager@8.40.0': dependencies: '@typescript-eslint/types': 8.40.0 '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/tsconfig-utils@8.38.0(typescript@5.8.3)': + dependencies: + typescript: 5.8.3 + '@typescript-eslint/tsconfig-utils@8.40.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 - '@typescript-eslint/type-utils@8.40.0(eslint@8.57.1)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.38.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.40.0(eslint@8.57.1)(typescript@5.8.3) + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.38.0(eslint@8.57.1)(typescript@5.8.3) debug: 4.4.1(supports-color@5.5.0) eslint: 8.57.1 ts-api-utils: 2.1.0(typescript@5.8.3) @@ -9920,8 +10004,26 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/types@8.38.0': {} + '@typescript-eslint/types@8.40.0': {} + '@typescript-eslint/typescript-estree@8.38.0(typescript@5.8.3)': + dependencies: + '@typescript-eslint/project-service': 8.38.0(typescript@5.8.3) + '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.8.3) + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/visitor-keys': 8.38.0 + debug: 4.4.1(supports-color@5.5.0) + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.40.0(typescript@5.8.3)': dependencies: '@typescript-eslint/project-service': 8.40.0(typescript@5.8.3) @@ -9938,17 +10040,22 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.40.0(eslint@8.57.1)(typescript@5.8.3)': + '@typescript-eslint/utils@8.38.0(eslint@8.57.1)(typescript@5.8.3)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.38.0 + '@typescript-eslint/types': 8.38.0 + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.3) eslint: 8.57.1 typescript: 5.8.3 transitivePeerDependencies: - supports-color + '@typescript-eslint/visitor-keys@8.38.0': + dependencies: + '@typescript-eslint/types': 8.38.0 + eslint-visitor-keys: 4.2.1 + '@typescript-eslint/visitor-keys@8.40.0': dependencies: '@typescript-eslint/types': 8.40.0 @@ -10636,7 +10743,7 @@ snapshots: compute-scroll-into-view@3.1.1: {} - concurrently@9.2.0: + concurrently@9.1.2: dependencies: chalk: 4.1.2 lodash: 4.17.21 @@ -11195,12 +11302,12 @@ snapshots: dependencies: '@next/eslint-plugin-next': 14.2.31 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 8.40.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) + '@typescript-eslint/eslint-plugin': 8.38.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) '@typescript-eslint/parser': 8.40.0(eslint@8.57.1)(typescript@5.8.3) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-react: 7.37.5(eslint@8.57.1) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1) @@ -11228,7 +11335,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -11239,7 +11346,7 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -11250,11 +11357,11 @@ snapshots: '@typescript-eslint/parser': 8.40.0(eslint@8.57.1)(typescript@5.8.3) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -13096,7 +13203,7 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - posthog-js@1.260.1: + posthog-js@1.258.5: dependencies: core-js: 3.45.0 fflate: 0.4.8 @@ -14063,7 +14170,7 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.101.3(@swc/core@1.13.3(@swc/helpers@0.5.17))(esbuild@0.25.0) - swr@2.3.6(react@18.3.1): + swr@2.3.3(react@18.3.1): dependencies: dequal: 2.0.3 react: 18.3.1 From 885ade223d2deef530c74104de62ab9ef2992d52 Mon Sep 17 00:00:00 2001 From: Jayash Tripathy <76092296+JayashTripathy@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:10:17 +0530 Subject: [PATCH 2/7] fix: lint --- .../modals/existing-issues-list-modal.tsx | 2 +- packages/propel/src/combobox/combobox.tsx | 2 +- packages/propel/src/command/command.tsx | 2 +- packages/propel/src/switch.tsx | 65 +++++++++---------- 4 files changed, 34 insertions(+), 37 deletions(-) diff --git a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx index f5ecf81bb67..cb1ac8867ae 100644 --- a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx +++ b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx @@ -1,6 +1,7 @@ "use client"; import React, { useEffect, useState } from "react"; +import { filter } from "lodash"; import { Rocket, Search, X } from "lucide-react"; import { Combobox, Dialog, Transition } from "@headlessui/react"; // i18n @@ -20,7 +21,6 @@ import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/iss import { ProjectService } from "@/services/project"; // components import { IssueSearchModalEmptyState } from "./issue-search-modal-empty-state"; -import { filter } from "lodash"; type Props = { workspaceSlug: string | undefined; diff --git a/packages/propel/src/combobox/combobox.tsx b/packages/propel/src/combobox/combobox.tsx index 91e56372638..b5b571f5bcc 100644 --- a/packages/propel/src/combobox/combobox.tsx +++ b/packages/propel/src/combobox/combobox.tsx @@ -1,7 +1,7 @@ import * as React from "react"; +import { cn } from "@plane/utils"; import { Command } from "../command/command"; import { Popover } from "../popover/root"; -import { cn } from "@plane/utils"; export interface ComboboxOption { value: unknown; diff --git a/packages/propel/src/command/command.tsx b/packages/propel/src/command/command.tsx index 25969aada8d..a1772f9c280 100644 --- a/packages/propel/src/command/command.tsx +++ b/packages/propel/src/command/command.tsx @@ -1,6 +1,6 @@ +import * as React from "react"; import { Command as CommandPrimitive } from "cmdk"; import { SearchIcon } from "lucide-react"; -import * as React from "react"; import { cn } from "@plane/ui"; function CommandComponent({ className, ...props }: React.ComponentProps) { diff --git a/packages/propel/src/switch.tsx b/packages/propel/src/switch.tsx index 8c1880ac326..26427fb0404 100644 --- a/packages/propel/src/switch.tsx +++ b/packages/propel/src/switch.tsx @@ -11,43 +11,40 @@ interface IToggleSwitchProps { className?: string; } -const Switch: React.FC = (props) => { - const { value, onChange, label, size = "sm", disabled, className } = props; - return ( - = ({ value, onChange, label, size = "sm", disabled, className }) => ( + + {label} + - ); -}; + /> + +); Switch.displayName = "plane-ui-switch"; From 7519dd3fedf204307fc7c6a565323e3c3b2407e2 Mon Sep 17 00:00:00 2001 From: Jayash Tripathy <76092296+JayashTripathy@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:14:12 +0530 Subject: [PATCH 3/7] fix: lock file --- pnpm-lock.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 29e2d27b974..b4d469b214f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1111,9 +1111,6 @@ importers: '@atlaskit/pragmatic-drag-and-drop-hitbox': specifier: ^1.0.3 version: 1.1.0 - '@base-ui-components/react': - specifier: 1.0.0-beta.2 - version: 1.0.0-beta.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@blueprintjs/core': specifier: ^4.16.3 version: 4.20.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -7873,20 +7870,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - '@base-ui-components/react@1.0.0-beta.2(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@babel/runtime': 7.26.10 - '@base-ui-components/utils': 0.1.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@floating-ui/react-dom': 2.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@floating-ui/utils': 0.2.10 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - reselect: 5.1.1 - tabbable: 6.2.0 - use-sync-external-store: 1.5.0(react@18.3.1) - optionalDependencies: - '@types/react': 18.3.11 - '@base-ui-components/utils@0.1.0(@types/react@18.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.26.10 @@ -7898,17 +7881,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - '@base-ui-components/utils@0.1.0(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@babel/runtime': 7.26.10 - '@floating-ui/utils': 0.2.10 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - reselect: 5.1.1 - use-sync-external-store: 1.5.0(react@18.3.1) - optionalDependencies: - '@types/react': 18.3.11 - '@blueprintjs/colors@4.2.1': dependencies: tslib: 2.5.3 From 7529262ad517245f434efec58d026e77e0fef5d6 Mon Sep 17 00:00:00 2001 From: Jayash Tripathy <76092296+JayashTripathy@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:22:36 +0530 Subject: [PATCH 4/7] fix: improve accessibility and refactor switch component styles --- packages/propel/src/switch.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/propel/src/switch.tsx b/packages/propel/src/switch.tsx index 26427fb0404..a9d5eebcd0e 100644 --- a/packages/propel/src/switch.tsx +++ b/packages/propel/src/switch.tsx @@ -16,18 +16,17 @@ const Switch: React.FC = ({ value, onChange, label, size = " checked={value} disabled={disabled} onCheckedChange={onChange} + aria-label={label} className={cn( - "relative inline-flex flex-shrink-0 h-6 w-10 cursor-pointer rounded-full border border-custom-border-200 transition-colors duration-200 ease-in-out focus:outline-none bg-gray-700", - { - "h-4 w-6": size === "sm", - "h-5 w-8": size === "md", - "bg-custom-primary-100": value, - "cursor-not-allowed bg-custom-background-80": disabled, - }, + "relative inline-flex flex-shrink-0 cursor-pointer rounded-full border border-custom-border-200 transition-colors duration-200 ease-in-out focus:outline-none", + // size + size === "sm" ? "h-4 w-6" : size === "md" ? "h-5 w-8" : "h-6 w-10", + // state + disabled ? "cursor-not-allowed bg-custom-background-80" : value ? "bg-custom-primary-100" : "bg-gray-700", className )} > - {label} + {label && {label}}