@zentauri-ui/zentauri-components 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -0
- package/cli/cli.integration.test.ts +8 -0
- package/cli/index.mjs +46 -1
- package/dist/charts/area.js +11 -10
- package/dist/charts/area.js.map +1 -1
- package/dist/charts/area.mjs +4 -3
- package/dist/charts/area.mjs.map +1 -1
- package/dist/charts/bar.js +10 -9
- package/dist/charts/bar.js.map +1 -1
- package/dist/charts/bar.mjs +4 -3
- package/dist/charts/bar.mjs.map +1 -1
- package/dist/charts/bubble.js +10 -9
- package/dist/charts/bubble.js.map +1 -1
- package/dist/charts/bubble.mjs +4 -3
- package/dist/charts/bubble.mjs.map +1 -1
- package/dist/charts/line.js +10 -9
- package/dist/charts/line.js.map +1 -1
- package/dist/charts/line.mjs +4 -3
- package/dist/charts/line.mjs.map +1 -1
- package/dist/charts/pie.js +6 -5
- package/dist/charts/pie.js.map +1 -1
- package/dist/charts/pie.mjs +3 -2
- package/dist/charts/pie.mjs.map +1 -1
- package/dist/charts/shared/chart-frame.d.ts.map +1 -1
- package/dist/{chunk-QSIJKHC5.mjs → chunk-4XVNQ7IY.mjs} +223 -214
- package/dist/chunk-4XVNQ7IY.mjs.map +1 -0
- package/dist/chunk-4ZKBLVQX.js +248 -0
- package/dist/chunk-4ZKBLVQX.js.map +1 -0
- package/dist/chunk-ABOZ5QIX.js +84 -0
- package/dist/chunk-ABOZ5QIX.js.map +1 -0
- package/dist/chunk-ACGVDY5J.mjs +220 -0
- package/dist/chunk-ACGVDY5J.mjs.map +1 -0
- package/dist/{chunk-PPVJ4INP.mjs → chunk-ASJQP53L.mjs} +3 -3
- package/dist/{chunk-PPVJ4INP.mjs.map → chunk-ASJQP53L.mjs.map} +1 -1
- package/dist/{chunk-D55YIHBN.js → chunk-BTJYXKCW.js} +223 -214
- package/dist/chunk-BTJYXKCW.js.map +1 -0
- package/dist/{chunk-MM3P52WS.js → chunk-CL55KGDF.js} +56 -52
- package/dist/chunk-CL55KGDF.js.map +1 -0
- package/dist/chunk-CSFLMMAT.mjs +198 -0
- package/dist/chunk-CSFLMMAT.mjs.map +1 -0
- package/dist/chunk-EDARAO7X.js +206 -0
- package/dist/chunk-EDARAO7X.js.map +1 -0
- package/dist/chunk-EIRCCTNA.js +175 -0
- package/dist/chunk-EIRCCTNA.js.map +1 -0
- package/dist/chunk-EN4VLNBF.js +197 -0
- package/dist/chunk-EN4VLNBF.js.map +1 -0
- package/dist/chunk-FHLZH3PB.mjs +326 -0
- package/dist/chunk-FHLZH3PB.mjs.map +1 -0
- package/dist/chunk-FXYPRPAT.mjs +35 -0
- package/dist/chunk-FXYPRPAT.mjs.map +1 -0
- package/dist/{chunk-SPX2QDIB.mjs → chunk-G2WARVAM.mjs} +8 -4
- package/dist/chunk-G2WARVAM.mjs.map +1 -0
- package/dist/chunk-HCGSEPOD.mjs +196 -0
- package/dist/chunk-HCGSEPOD.mjs.map +1 -0
- package/dist/chunk-HDO5ZM2S.mjs +82 -0
- package/dist/chunk-HDO5ZM2S.mjs.map +1 -0
- package/dist/chunk-HMNIH3KJ.mjs +277 -0
- package/dist/chunk-HMNIH3KJ.mjs.map +1 -0
- package/dist/chunk-HNLQXHSQ.mjs +263 -0
- package/dist/chunk-HNLQXHSQ.mjs.map +1 -0
- package/dist/{chunk-M6FS7X54.mjs → chunk-ITVMSCOJ.mjs} +56 -52
- package/dist/chunk-ITVMSCOJ.mjs.map +1 -0
- package/dist/chunk-K7TCW5PJ.js +338 -0
- package/dist/chunk-K7TCW5PJ.js.map +1 -0
- package/dist/chunk-KTGV76M3.mjs +325 -0
- package/dist/chunk-KTGV76M3.mjs.map +1 -0
- package/dist/{chunk-JOMSI4WH.js → chunk-NFEA5TN2.js} +52 -47
- package/dist/chunk-NFEA5TN2.js.map +1 -0
- package/dist/chunk-NHQ3S4Y6.mjs +282 -0
- package/dist/chunk-NHQ3S4Y6.mjs.map +1 -0
- package/dist/{chunk-OVTWPGMW.mjs → chunk-NMQAHUYA.mjs} +52 -47
- package/dist/chunk-NMQAHUYA.mjs.map +1 -0
- package/dist/{chunk-MWR5DIA5.mjs → chunk-OULU7OC4.mjs} +3 -3
- package/dist/{chunk-MWR5DIA5.mjs.map → chunk-OULU7OC4.mjs.map} +1 -1
- package/dist/chunk-OZHETX4J.mjs +169 -0
- package/dist/chunk-OZHETX4J.mjs.map +1 -0
- package/dist/chunk-OZMSE44N.mjs +235 -0
- package/dist/chunk-OZMSE44N.mjs.map +1 -0
- package/dist/chunk-P5WLYJ2C.mjs +272 -0
- package/dist/chunk-P5WLYJ2C.mjs.map +1 -0
- package/dist/chunk-PMWRJ2KS.mjs +192 -0
- package/dist/chunk-PMWRJ2KS.mjs.map +1 -0
- package/dist/chunk-PR4QXFJT.js +132 -0
- package/dist/chunk-PR4QXFJT.js.map +1 -0
- package/dist/chunk-QAJOE3HJ.js +281 -0
- package/dist/chunk-QAJOE3HJ.js.map +1 -0
- package/dist/chunk-QBPVJH4P.mjs +128 -0
- package/dist/chunk-QBPVJH4P.mjs.map +1 -0
- package/dist/{chunk-MTJRPLMG.js → chunk-QNUDODDX.js} +8 -4
- package/dist/chunk-QNUDODDX.js.map +1 -0
- package/dist/{chunk-DO2LEXUY.js → chunk-QQ6F4LZK.js} +5 -5
- package/dist/{chunk-DO2LEXUY.js.map → chunk-QQ6F4LZK.js.map} +1 -1
- package/dist/chunk-QXHS3HHZ.mjs +340 -0
- package/dist/chunk-QXHS3HHZ.mjs.map +1 -0
- package/dist/chunk-QYLTKBH7.js +338 -0
- package/dist/chunk-QYLTKBH7.js.map +1 -0
- package/dist/chunk-TTTYW3TR.js +207 -0
- package/dist/chunk-TTTYW3TR.js.map +1 -0
- package/dist/chunk-W3QRRWQX.js +37 -0
- package/dist/chunk-W3QRRWQX.js.map +1 -0
- package/dist/chunk-WPXQHWPV.js +232 -0
- package/dist/chunk-WPXQHWPV.js.map +1 -0
- package/dist/chunk-XRDVD2EN.js +288 -0
- package/dist/chunk-XRDVD2EN.js.map +1 -0
- package/dist/chunk-XYEMP4K7.js +273 -0
- package/dist/chunk-XYEMP4K7.js.map +1 -0
- package/dist/chunk-YAO62VH2.js +342 -0
- package/dist/chunk-YAO62VH2.js.map +1 -0
- package/dist/{chunk-PVTTWOYV.js → chunk-Z6S36PDD.js} +7 -7
- package/dist/{chunk-PVTTWOYV.js.map → chunk-Z6S36PDD.js.map} +1 -1
- package/dist/chunk-ZYKJC5HH.js +296 -0
- package/dist/chunk-ZYKJC5HH.js.map +1 -0
- package/dist/design-system/accordion.d.ts +70 -0
- package/dist/design-system/accordion.d.ts.map +1 -0
- package/dist/design-system/alert.d.ts +39 -0
- package/dist/design-system/alert.d.ts.map +1 -0
- package/dist/design-system/avatar.d.ts +36 -0
- package/dist/design-system/avatar.d.ts.map +1 -0
- package/dist/design-system/badge.d.ts +71 -0
- package/dist/design-system/badge.d.ts.map +1 -0
- package/dist/design-system/breadcrumb.d.ts +27 -0
- package/dist/design-system/breadcrumb.d.ts.map +1 -0
- package/dist/design-system/button.d.ts +48 -0
- package/dist/design-system/button.d.ts.map +1 -0
- package/dist/design-system/card.d.ts +65 -0
- package/dist/design-system/card.d.ts.map +1 -0
- package/dist/design-system/divider.d.ts +45 -0
- package/dist/design-system/divider.d.ts.map +1 -0
- package/dist/design-system/drawer.d.ts +67 -0
- package/dist/design-system/drawer.d.ts.map +1 -0
- package/dist/design-system/dropdown.d.ts +79 -0
- package/dist/design-system/dropdown.d.ts.map +1 -0
- package/dist/design-system/dynamic-stepper.d.ts +29 -0
- package/dist/design-system/dynamic-stepper.d.ts.map +1 -0
- package/dist/design-system/empty-state.d.ts +29 -0
- package/dist/design-system/empty-state.d.ts.map +1 -0
- package/dist/design-system/file-upload.d.ts +19 -0
- package/dist/design-system/file-upload.d.ts.map +1 -0
- package/dist/design-system/index.d.ts +30 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/inputs.d.ts +31 -0
- package/dist/design-system/inputs.d.ts.map +1 -0
- package/dist/design-system/modal.d.ts +66 -0
- package/dist/design-system/modal.d.ts.map +1 -0
- package/dist/design-system/pagination.d.ts +65 -0
- package/dist/design-system/pagination.d.ts.map +1 -0
- package/dist/design-system/progress.d.ts +57 -0
- package/dist/design-system/progress.d.ts.map +1 -0
- package/dist/design-system/select.d.ts +92 -0
- package/dist/design-system/select.d.ts.map +1 -0
- package/dist/design-system/skeleton.d.ts +104 -0
- package/dist/design-system/skeleton.d.ts.map +1 -0
- package/dist/design-system/slider.d.ts +44 -0
- package/dist/design-system/slider.d.ts.map +1 -0
- package/dist/design-system/spinner.d.ts +39 -0
- package/dist/design-system/spinner.d.ts.map +1 -0
- package/dist/design-system/stepper.d.ts +42 -0
- package/dist/design-system/stepper.d.ts.map +1 -0
- package/dist/design-system/table.d.ts +77 -0
- package/dist/design-system/table.d.ts.map +1 -0
- package/dist/design-system/tabs.d.ts +49 -0
- package/dist/design-system/tabs.d.ts.map +1 -0
- package/dist/design-system/toast.d.ts +43 -0
- package/dist/design-system/toast.d.ts.map +1 -0
- package/dist/design-system/toggle.d.ts +73 -0
- package/dist/design-system/toggle.d.ts.map +1 -0
- package/dist/design-system/tokens.d.ts +15 -0
- package/dist/design-system/tokens.d.ts.map +1 -0
- package/dist/design-system/tooltip.d.ts +41 -0
- package/dist/design-system/tooltip.d.ts.map +1 -0
- package/dist/design-system/typography.d.ts +42 -0
- package/dist/design-system/typography.d.ts.map +1 -0
- package/dist/hooks/useResizeObserver.js +6 -31
- package/dist/hooks/useResizeObserver.js.map +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -33
- package/dist/hooks/useResizeObserver.mjs.map +1 -1
- package/dist/ui/accordion/animated.js +7 -7
- package/dist/ui/accordion/animated.mjs +2 -2
- package/dist/ui/accordion/variants.d.ts +5 -5
- package/dist/ui/accordion/variants.d.ts.map +1 -1
- package/dist/ui/accordion.js +9 -9
- package/dist/ui/accordion.mjs +2 -2
- package/dist/ui/alert/animated.js +2 -2
- package/dist/ui/alert/animated.mjs +1 -1
- package/dist/ui/alert/variants.d.ts +4 -4
- package/dist/ui/alert/variants.d.ts.map +1 -1
- package/dist/ui/alert.js +10 -10
- package/dist/ui/alert.mjs +2 -2
- package/dist/ui/avatar/animated.js +5 -5
- package/dist/ui/avatar/animated.mjs +2 -2
- package/dist/ui/avatar/variants.d.ts +1 -1
- package/dist/ui/avatar/variants.d.ts.map +1 -1
- package/dist/ui/avatar.js +9 -9
- package/dist/ui/avatar.mjs +2 -2
- package/dist/ui/badge/animated.js +2 -2
- package/dist/ui/badge/animated.mjs +1 -1
- package/dist/ui/badge/variants.d.ts +29 -32
- package/dist/ui/badge/variants.d.ts.map +1 -1
- package/dist/ui/badge.js +4 -4
- package/dist/ui/badge.mjs +2 -2
- package/dist/ui/breadcrumb/variants.d.ts +1 -1
- package/dist/ui/breadcrumb/variants.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +42 -40
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/breadcrumb.mjs +42 -40
- package/dist/ui/breadcrumb.mjs.map +1 -1
- package/dist/ui/buttons/animated.js +3 -3
- package/dist/ui/buttons/animated.mjs +1 -1
- package/dist/ui/buttons/variants.d.ts +2 -2
- package/dist/ui/buttons/variants.d.ts.map +1 -1
- package/dist/ui/buttons.js +4 -4
- package/dist/ui/buttons.mjs +2 -2
- package/dist/ui/card/animated.js +7 -7
- package/dist/ui/card/animated.mjs +2 -2
- package/dist/ui/card/variants.d.ts +7 -7
- package/dist/ui/card/variants.d.ts.map +1 -1
- package/dist/ui/card.js +12 -12
- package/dist/ui/card.mjs +2 -2
- package/dist/ui/divider/animated.js +2 -2
- package/dist/ui/divider/animated.mjs +1 -1
- package/dist/ui/divider/variants.d.ts +4 -4
- package/dist/ui/divider/variants.d.ts.map +1 -1
- package/dist/ui/divider.js +6 -6
- package/dist/ui/divider.mjs +2 -2
- package/dist/ui/drawer/animated.js +11 -11
- package/dist/ui/drawer/animated.mjs +2 -2
- package/dist/ui/drawer/variants.d.ts +1 -1
- package/dist/ui/drawer/variants.d.ts.map +1 -1
- package/dist/ui/drawer.js +11 -11
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown/variants.d.ts +4 -4
- package/dist/ui/dropdown/variants.d.ts.map +1 -1
- package/dist/ui/dropdown.js +106 -104
- package/dist/ui/dropdown.js.map +1 -1
- package/dist/ui/dropdown.mjs +106 -104
- package/dist/ui/dropdown.mjs.map +1 -1
- package/dist/ui/dynamic-stepper/variants.d.ts +5 -9
- package/dist/ui/dynamic-stepper/variants.d.ts.map +1 -1
- package/dist/ui/dynamic-stepper.js +100 -93
- package/dist/ui/dynamic-stepper.js.map +1 -1
- package/dist/ui/dynamic-stepper.mjs +98 -91
- package/dist/ui/dynamic-stepper.mjs.map +1 -1
- package/dist/ui/empty-state/animated.js +2 -2
- package/dist/ui/empty-state/animated.mjs +1 -1
- package/dist/ui/empty-state/variants.d.ts +3 -3
- package/dist/ui/empty-state/variants.d.ts.map +1 -1
- package/dist/ui/empty-state.js +10 -10
- package/dist/ui/empty-state.mjs +2 -2
- package/dist/ui/file-upload/variants.d.ts.map +1 -1
- package/dist/ui/file-upload.js +28 -26
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/file-upload.mjs +28 -26
- package/dist/ui/file-upload.mjs.map +1 -1
- package/dist/ui/inputs/animated.js +3 -3
- package/dist/ui/inputs/animated.mjs +1 -1
- package/dist/ui/inputs/variants.d.ts +1 -1
- package/dist/ui/inputs/variants.d.ts.map +1 -1
- package/dist/ui/inputs.js +4 -4
- package/dist/ui/inputs.mjs +2 -2
- package/dist/ui/modal/animated.js +4 -4
- package/dist/ui/modal/animated.mjs +1 -1
- package/dist/ui/modal/variants.d.ts +1 -1
- package/dist/ui/modal/variants.d.ts.map +1 -1
- package/dist/ui/modal.js +12 -12
- package/dist/ui/modal.mjs +2 -2
- package/dist/ui/pagination/variants.d.ts +3 -7
- package/dist/ui/pagination/variants.d.ts.map +1 -1
- package/dist/ui/pagination.js +84 -84
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/pagination.mjs +81 -81
- package/dist/ui/pagination.mjs.map +1 -1
- package/dist/ui/progress/animated.js +8 -8
- package/dist/ui/progress/animated.mjs +2 -2
- package/dist/ui/progress/variants.d.ts +3 -3
- package/dist/ui/progress/variants.d.ts.map +1 -1
- package/dist/ui/progress.js +9 -9
- package/dist/ui/progress.mjs +2 -2
- package/dist/ui/search.js +2 -2
- package/dist/ui/search.mjs +1 -1
- package/dist/ui/select/variants.d.ts +6 -6
- package/dist/ui/select/variants.d.ts.map +1 -1
- package/dist/ui/select.js +122 -123
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/select.mjs +122 -123
- package/dist/ui/select.mjs.map +1 -1
- package/dist/ui/skeleton/animated.js +8 -8
- package/dist/ui/skeleton/animated.mjs +1 -1
- package/dist/ui/skeleton/variants.d.ts +5 -4
- package/dist/ui/skeleton/variants.d.ts.map +1 -1
- package/dist/ui/skeleton.js +9 -9
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider/variants.d.ts +3 -3
- package/dist/ui/slider/variants.d.ts.map +1 -1
- package/dist/ui/slider.js +69 -67
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/slider.mjs +69 -67
- package/dist/ui/slider.mjs.map +1 -1
- package/dist/ui/spinner/animated/variants.d.ts +2 -2
- package/dist/ui/spinner/animated/variants.d.ts.map +1 -1
- package/dist/ui/spinner/animated.js +44 -38
- package/dist/ui/spinner/animated.js.map +1 -1
- package/dist/ui/spinner/animated.mjs +44 -38
- package/dist/ui/spinner/animated.mjs.map +1 -1
- package/dist/ui/stepper/variants.d.ts +1 -1
- package/dist/ui/stepper/variants.d.ts.map +1 -1
- package/dist/ui/stepper.js +57 -50
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/stepper.mjs +57 -50
- package/dist/ui/stepper.mjs.map +1 -1
- package/dist/ui/table/animated.js +8 -8
- package/dist/ui/table/animated.mjs +2 -2
- package/dist/ui/table/variants.d.ts +2 -2
- package/dist/ui/table/variants.d.ts.map +1 -1
- package/dist/ui/table.js +14 -14
- package/dist/ui/table.mjs +1 -1
- package/dist/ui/tabs/animated.js +2 -2
- package/dist/ui/tabs/animated.mjs +1 -1
- package/dist/ui/tabs/variants.d.ts +2 -2
- package/dist/ui/tabs/variants.d.ts.map +1 -1
- package/dist/ui/tabs.js +9 -9
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/toast/animated.js +7 -7
- package/dist/ui/toast/animated.mjs +1 -1
- package/dist/ui/toast/variants.d.ts +3 -3
- package/dist/ui/toast/variants.d.ts.map +1 -1
- package/dist/ui/toast.js +12 -12
- package/dist/ui/toast.mjs +1 -1
- package/dist/ui/toggle/animated/toggle-animated.d.ts.map +1 -1
- package/dist/ui/toggle/animated.js +13 -6
- package/dist/ui/toggle/animated.js.map +1 -1
- package/dist/ui/toggle/animated.mjs +12 -5
- package/dist/ui/toggle/animated.mjs.map +1 -1
- package/dist/ui/toggle/toggle-base.d.ts +2 -0
- package/dist/ui/toggle/toggle-base.d.ts.map +1 -1
- package/dist/ui/toggle/variants.d.ts +4 -4
- package/dist/ui/toggle/variants.d.ts.map +1 -1
- package/dist/ui/toggle.js +5 -94
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/toggle.mjs +4 -93
- package/dist/ui/toggle.mjs.map +1 -1
- package/dist/ui/tooltip/animated.js +3 -3
- package/dist/ui/tooltip/animated.mjs +1 -1
- package/dist/ui/tooltip/variants.d.ts +3 -3
- package/dist/ui/tooltip/variants.d.ts.map +1 -1
- package/dist/ui/tooltip.js +7 -7
- package/dist/ui/tooltip.mjs +1 -1
- package/dist/ui/typography/variants.d.ts +1 -3
- package/dist/ui/typography/variants.d.ts.map +1 -1
- package/dist/ui/typography.js +51 -41
- package/dist/ui/typography.js.map +1 -1
- package/dist/ui/typography.mjs +51 -41
- package/dist/ui/typography.mjs.map +1 -1
- package/package.json +2 -1
- package/src/charts/shared/chart-frame.tsx +19 -8
- package/src/design-system/accordion.ts +111 -0
- package/src/design-system/alert.ts +64 -0
- package/src/design-system/avatar.ts +61 -0
- package/src/design-system/badge.ts +85 -0
- package/src/design-system/breadcrumb.ts +45 -0
- package/src/design-system/button.ts +81 -0
- package/src/design-system/card.ts +104 -0
- package/src/design-system/divider.ts +73 -0
- package/src/design-system/drawer.ts +111 -0
- package/src/design-system/dropdown.ts +130 -0
- package/src/design-system/dynamic-stepper.ts +218 -0
- package/src/design-system/empty-state.ts +39 -0
- package/src/design-system/file-upload.ts +30 -0
- package/src/design-system/index.ts +29 -0
- package/src/design-system/inputs.ts +74 -0
- package/src/design-system/modal.ts +110 -0
- package/src/design-system/pagination.ts +92 -0
- package/src/design-system/progress.ts +86 -0
- package/src/design-system/select.ts +155 -0
- package/src/design-system/skeleton.ts +129 -0
- package/src/design-system/slider.ts +70 -0
- package/src/design-system/spinner.ts +59 -0
- package/src/design-system/stepper.ts +66 -0
- package/src/design-system/table.ts +115 -0
- package/src/design-system/tabs.ts +73 -0
- package/src/design-system/toast.ts +69 -0
- package/src/design-system/toggle.ts +120 -0
- package/src/design-system/tokens.ts +22 -0
- package/src/design-system/tooltip.ts +63 -0
- package/src/design-system/typography.ts +64 -0
- package/src/ui/accordion/variants.ts +24 -106
- package/src/ui/alert/alert.test.tsx +1 -1
- package/src/ui/alert/variants.ts +25 -77
- package/src/ui/avatar/variants.ts +21 -66
- package/src/ui/badge/badge.test.tsx +1 -1
- package/src/ui/badge/variants.ts +28 -89
- package/src/ui/breadcrumb/variants.ts +24 -40
- package/src/ui/buttons/button.test.tsx +25 -5
- package/src/ui/buttons/variants.ts +15 -84
- package/src/ui/card/card.test.tsx +1 -1
- package/src/ui/card/variants.ts +46 -121
- package/src/ui/divider/divider-base.tsx +1 -1
- package/src/ui/divider/variants.ts +32 -70
- package/src/ui/drawer/drawer-base.tsx +1 -1
- package/src/ui/drawer/variants.ts +41 -132
- package/src/ui/dropdown/variants.ts +36 -142
- package/src/ui/dynamic-stepper/variants.ts +32 -216
- package/src/ui/empty-state/variants.ts +29 -44
- package/src/ui/file-upload/variants.ts +12 -36
- package/src/ui/inputs/input.test.tsx +11 -11
- package/src/ui/inputs/variants.ts +308 -371
- package/src/ui/modal/variants.ts +29 -120
- package/src/ui/pagination/pagination.test.tsx +1 -1
- package/src/ui/pagination/variants.ts +22 -95
- package/src/ui/progress/variants.ts +41 -112
- package/src/ui/select/variants.ts +40 -165
- package/src/ui/skeleton/variants.ts +154 -250
- package/src/ui/slider/variants.ts +34 -67
- package/src/ui/spinner/animated/variants.ts +10 -39
- package/src/ui/stepper/stepper.test.tsx +12 -4
- package/src/ui/stepper/variants.ts +23 -68
- package/src/ui/table/variants.ts +36 -106
- package/src/ui/tabs/variants.ts +26 -73
- package/src/ui/toast/variants.ts +24 -75
- package/src/ui/toggle/animated/toggle-animated.tsx +14 -4
- package/src/ui/toggle/toggle-base.tsx +3 -7
- package/src/ui/toggle/variants.ts +27 -111
- package/src/ui/tooltip/variants.ts +18 -57
- package/src/ui/typography/typography.test.tsx +1 -1
- package/src/ui/typography/variants.ts +17 -54
- package/dist/chunk-25EAVVGS.mjs +0 -267
- package/dist/chunk-25EAVVGS.mjs.map +0 -1
- package/dist/chunk-3OXIZ4ZO.js +0 -175
- package/dist/chunk-3OXIZ4ZO.js.map +0 -1
- package/dist/chunk-3Z73M5TW.js +0 -273
- package/dist/chunk-3Z73M5TW.js.map +0 -1
- package/dist/chunk-4F56BLZQ.js +0 -336
- package/dist/chunk-4F56BLZQ.js.map +0 -1
- package/dist/chunk-4PZIDDC6.js +0 -279
- package/dist/chunk-4PZIDDC6.js.map +0 -1
- package/dist/chunk-73RHHGIA.mjs +0 -197
- package/dist/chunk-73RHHGIA.mjs.map +0 -1
- package/dist/chunk-746CV3AN.js +0 -246
- package/dist/chunk-746CV3AN.js.map +0 -1
- package/dist/chunk-CFTDAGKD.js +0 -130
- package/dist/chunk-CFTDAGKD.js.map +0 -1
- package/dist/chunk-D55YIHBN.js.map +0 -1
- package/dist/chunk-EU63V22F.mjs +0 -126
- package/dist/chunk-EU63V22F.mjs.map +0 -1
- package/dist/chunk-EZS47EZW.mjs +0 -70
- package/dist/chunk-EZS47EZW.mjs.map +0 -1
- package/dist/chunk-GHJN3Z3V.js +0 -292
- package/dist/chunk-GHJN3Z3V.js.map +0 -1
- package/dist/chunk-GIC3J6HR.mjs +0 -196
- package/dist/chunk-GIC3J6HR.mjs.map +0 -1
- package/dist/chunk-GPAUYUM3.js +0 -232
- package/dist/chunk-GPAUYUM3.js.map +0 -1
- package/dist/chunk-HARD4NMB.mjs +0 -268
- package/dist/chunk-HARD4NMB.mjs.map +0 -1
- package/dist/chunk-HV7LVRK3.js +0 -277
- package/dist/chunk-HV7LVRK3.js.map +0 -1
- package/dist/chunk-J5QJEKY2.mjs +0 -169
- package/dist/chunk-J5QJEKY2.mjs.map +0 -1
- package/dist/chunk-JE6B3DHW.mjs +0 -220
- package/dist/chunk-JE6B3DHW.mjs.map +0 -1
- package/dist/chunk-JOMSI4WH.js.map +0 -1
- package/dist/chunk-KA5MORDC.js +0 -336
- package/dist/chunk-KA5MORDC.js.map +0 -1
- package/dist/chunk-LPL6NJ5Q.mjs +0 -264
- package/dist/chunk-LPL6NJ5Q.mjs.map +0 -1
- package/dist/chunk-M6FS7X54.mjs.map +0 -1
- package/dist/chunk-MM3P52WS.js.map +0 -1
- package/dist/chunk-MTJRPLMG.js.map +0 -1
- package/dist/chunk-OB6TYS5Q.js +0 -205
- package/dist/chunk-OB6TYS5Q.js.map +0 -1
- package/dist/chunk-OHST7AHC.mjs +0 -99
- package/dist/chunk-OHST7AHC.mjs.map +0 -1
- package/dist/chunk-OVTWPGMW.mjs.map +0 -1
- package/dist/chunk-PSIAOIXJ.mjs +0 -278
- package/dist/chunk-PSIAOIXJ.mjs.map +0 -1
- package/dist/chunk-QNF4JPFP.js +0 -339
- package/dist/chunk-QNF4JPFP.js.map +0 -1
- package/dist/chunk-QSIJKHC5.mjs.map +0 -1
- package/dist/chunk-RFFGQYDQ.mjs +0 -337
- package/dist/chunk-RFFGQYDQ.mjs.map +0 -1
- package/dist/chunk-S5H2OMTZ.mjs +0 -233
- package/dist/chunk-S5H2OMTZ.mjs.map +0 -1
- package/dist/chunk-SPX2QDIB.mjs.map +0 -1
- package/dist/chunk-TIPNRH26.js +0 -102
- package/dist/chunk-TIPNRH26.js.map +0 -1
- package/dist/chunk-V2PEOBAT.mjs +0 -324
- package/dist/chunk-V2PEOBAT.mjs.map +0 -1
- package/dist/chunk-VGWA26BN.js +0 -72
- package/dist/chunk-VGWA26BN.js.map +0 -1
- package/dist/chunk-WNLDXBS6.mjs +0 -323
- package/dist/chunk-WNLDXBS6.mjs.map +0 -1
- package/dist/chunk-YIO7DFUA.js +0 -207
- package/dist/chunk-YIO7DFUA.js.map +0 -1
|
@@ -1,53 +1,21 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import {
|
|
4
|
+
zuiAccordionAppearances,
|
|
5
|
+
zuiAccordionBase,
|
|
6
|
+
zuiAccordionContentBase,
|
|
7
|
+
zuiAccordionContentSizes,
|
|
8
|
+
zuiAccordionItemAppearances,
|
|
9
|
+
zuiAccordionItemBase,
|
|
10
|
+
zuiAccordionSizes,
|
|
11
|
+
zuiAccordionTriggerBase,
|
|
12
|
+
zuiAccordionTriggerSizes,
|
|
13
|
+
} from "../../design-system/accordion";
|
|
14
|
+
|
|
15
|
+
export const accordionVariants = cva(zuiAccordionBase, {
|
|
4
16
|
variants: {
|
|
5
|
-
appearance:
|
|
6
|
-
|
|
7
|
-
"divide-y divide-black/10 dark:divide-white/10 rounded-xl border border-black/10 dark:border-white/10",
|
|
8
|
-
outline:
|
|
9
|
-
"divide-y divide-black/10 dark:divide-white/10 rounded-xl border border-black/15 dark:border-white/15",
|
|
10
|
-
ghost: "divide-y divide-black/5 dark:divide-white/5",
|
|
11
|
-
card: "space-y-2",
|
|
12
|
-
separated: "space-y-3",
|
|
13
|
-
sky: "divide-y divide-sky-800 dark:divide-sky-600 rounded-xl border border-sky-800 dark:border-sky-600",
|
|
14
|
-
rose: "divide-y divide-rose-800 dark:divide-rose-600 rounded-xl border border-rose-800 dark:border-rose-600",
|
|
15
|
-
purple:
|
|
16
|
-
"divide-y divide-purple-800 dark:divide-purple-600 rounded-xl border border-purple-800 dark:border-purple-600",
|
|
17
|
-
pink: "divide-y divide-pink-800 dark:divide-pink-600 rounded-xl border border-pink-800 dark:border-pink-600",
|
|
18
|
-
orange:
|
|
19
|
-
"divide-y divide-orange-800 dark:divide-orange-600 rounded-xl border border-orange-800 dark:border-orange-600",
|
|
20
|
-
yellow:
|
|
21
|
-
"divide-y divide-yellow-800 dark:divide-yellow-600 rounded-xl border border-yellow-800 dark:border-yellow-600",
|
|
22
|
-
teal: "divide-y divide-teal-800 dark:divide-teal-600 rounded-xl border border-teal-800 dark:border-teal-600",
|
|
23
|
-
indigo:
|
|
24
|
-
"divide-y divide-indigo-800 dark:divide-indigo-600 rounded-xl border border-indigo-800 dark:border-indigo-600",
|
|
25
|
-
emerald:
|
|
26
|
-
"divide-y divide-emerald-800 dark:divide-emerald-600 rounded-xl border border-emerald-800 dark:border-emerald-600",
|
|
27
|
-
"gradient-blue":
|
|
28
|
-
"divide-y divide-blue-800 dark:divide-blue-600 rounded-xl border border-blue-800 dark:border-blue-600",
|
|
29
|
-
"gradient-green":
|
|
30
|
-
"divide-y divide-green-800 dark:divide-green-600 rounded-xl border border-green-800 dark:border-green-600",
|
|
31
|
-
"gradient-red":
|
|
32
|
-
"divide-y divide-red-800 dark:divide-red-600 rounded-xl border border-red-800 dark:border-red-600",
|
|
33
|
-
"gradient-yellow":
|
|
34
|
-
"divide-y divide-yellow-800 dark:divide-yellow-600 rounded-xl border border-yellow-800 dark:border-yellow-600",
|
|
35
|
-
"gradient-purple":
|
|
36
|
-
"divide-y divide-purple-800 dark:divide-purple-600 rounded-xl border border-purple-800 dark:border-purple-600",
|
|
37
|
-
"gradient-teal":
|
|
38
|
-
"divide-y divide-teal-800 dark:divide-teal-600 rounded-xl border border-teal-800 dark:border-teal-600",
|
|
39
|
-
"gradient-indigo":
|
|
40
|
-
"divide-y divide-indigo-800 dark:divide-indigo-600 rounded-xl border border-indigo-800 dark:border-indigo-600",
|
|
41
|
-
"gradient-pink":
|
|
42
|
-
"divide-y divide-pink-800 dark:divide-pink-600 rounded-xl border border-pink-800 dark:border-pink-600",
|
|
43
|
-
"gradient-orange":
|
|
44
|
-
"divide-y divide-orange-800 dark:divide-orange-600 rounded-xl border border-orange-800 dark:border-orange-600",
|
|
45
|
-
},
|
|
46
|
-
size: {
|
|
47
|
-
sm: "px-3 py-2 text-sm",
|
|
48
|
-
md: "px-4 py-3 text-sm",
|
|
49
|
-
lg: "px-5 py-4 text-base",
|
|
50
|
-
},
|
|
17
|
+
appearance: zuiAccordionAppearances,
|
|
18
|
+
size: zuiAccordionSizes,
|
|
51
19
|
},
|
|
52
20
|
defaultVariants: {
|
|
53
21
|
appearance: "default",
|
|
@@ -55,73 +23,23 @@ export const accordionVariants = cva("w-full", {
|
|
|
55
23
|
},
|
|
56
24
|
});
|
|
57
25
|
|
|
58
|
-
export const accordionItemVariants = cva(
|
|
26
|
+
export const accordionItemVariants = cva(zuiAccordionItemBase, {
|
|
59
27
|
variants: {
|
|
60
|
-
appearance:
|
|
61
|
-
default: "",
|
|
62
|
-
outline: "",
|
|
63
|
-
ghost: "",
|
|
64
|
-
card: "rounded-xl border border-black/10 bg-black/5 p-2",
|
|
65
|
-
separated:
|
|
66
|
-
"rounded-xl border border-black/10 dark:border-white/10 bg-slate-50/40 dark:bg-slate-950/40 p-2",
|
|
67
|
-
sky: "rounded-xl border border-sky-800 dark:border-sky-600 bg-sky-100/50 dark:bg-sky-600/[0.03] p-2",
|
|
68
|
-
rose: "rounded-xl border border-rose-800 dark:border-rose-600 bg-rose-100/50 dark:bg-rose-600/[0.03] p-2",
|
|
69
|
-
purple:
|
|
70
|
-
"rounded-xl border border-purple-800 dark:border-purple-600 bg-purple-100/50 dark:bg-purple-600/[0.03] p-2",
|
|
71
|
-
pink: "rounded-xl border border-pink-800 dark:border-pink-600 bg-pink-100/50 dark:bg-pink-600/[0.03] p-2",
|
|
72
|
-
orange:
|
|
73
|
-
"rounded-xl border border-orange-800 dark:border-orange-600 bg-orange-100/50 dark:bg-orange-600/[0.03] p-2",
|
|
74
|
-
yellow:
|
|
75
|
-
"rounded-xl border border-yellow-800 dark:border-yellow-600 bg-yellow-100/50 dark:bg-yellow-600/[0.03] p-2",
|
|
76
|
-
teal: "rounded-xl border border-teal-800 dark:border-teal-600 bg-teal-100/50 dark:bg-teal-600/[0.03] p-2",
|
|
77
|
-
indigo:
|
|
78
|
-
"rounded-xl border border-indigo-800 dark:border-indigo-600 bg-indigo-100/50 dark:bg-indigo-600/[0.03] p-2",
|
|
79
|
-
emerald:
|
|
80
|
-
"rounded-xl border border-emerald-800 dark:border-emerald-600 bg-emerald-100/50 dark:bg-emerald-600/[0.03] p-2",
|
|
81
|
-
"gradient-blue":
|
|
82
|
-
"rounded-xl bg-linear-to-r from-blue-300 dark:from-blue-600 to-purple-300 dark:to-purple-600 p-2",
|
|
83
|
-
"gradient-green":
|
|
84
|
-
"rounded-xl bg-linear-to-r from-green-300 dark:from-green-600 to-lime-300 dark:to-lime-600 p-2",
|
|
85
|
-
"gradient-red":
|
|
86
|
-
"rounded-xl bg-linear-to-r from-red-300 dark:from-red-600 to-pink-300 dark:to-pink-600 p-2",
|
|
87
|
-
"gradient-yellow":
|
|
88
|
-
"rounded-xl bg-linear-to-r from-yellow-300 dark:from-yellow-600 to-orange-300 dark:to-orange-600 p-2",
|
|
89
|
-
"gradient-purple":
|
|
90
|
-
"rounded-xl bg-linear-to-r from-purple-300 dark:from-purple-600 to-pink-300 dark:to-pink-600 p-2",
|
|
91
|
-
"gradient-teal":
|
|
92
|
-
"rounded-xl bg-linear-to-r from-teal-300 dark:from-teal-600 to-cyan-300 dark:to-cyan-600 p-2",
|
|
93
|
-
"gradient-indigo":
|
|
94
|
-
"rounded-xl bg-linear-to-r from-indigo-300 dark:from-indigo-600 to-purple-300 dark:to-purple-600 p-2",
|
|
95
|
-
"gradient-pink":
|
|
96
|
-
"rounded-xl bg-linear-to-r from-pink-300 dark:from-pink-600 to-rose-300 dark:to-rose-600 p-2",
|
|
97
|
-
"gradient-orange":
|
|
98
|
-
"rounded-xl bg-linear-to-r from-orange-300 dark:from-orange-600 to-red-300 dark:to-red-600 p-2",
|
|
99
|
-
},
|
|
28
|
+
appearance: zuiAccordionItemAppearances,
|
|
100
29
|
},
|
|
101
30
|
defaultVariants: { appearance: "default" },
|
|
102
31
|
});
|
|
103
32
|
|
|
104
|
-
export const accordionTriggerVariants = cva(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
variants: {
|
|
108
|
-
size: {
|
|
109
|
-
sm: "py-2 text-sm",
|
|
110
|
-
md: "py-3 text-sm",
|
|
111
|
-
lg: "py-4 text-base",
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
defaultVariants: { size: "md" },
|
|
33
|
+
export const accordionTriggerVariants = cva(zuiAccordionTriggerBase, {
|
|
34
|
+
variants: {
|
|
35
|
+
size: zuiAccordionTriggerSizes,
|
|
115
36
|
},
|
|
116
|
-
|
|
37
|
+
defaultVariants: { size: "md" },
|
|
38
|
+
});
|
|
117
39
|
|
|
118
|
-
export const accordionContentVariants = cva(
|
|
40
|
+
export const accordionContentVariants = cva(zuiAccordionContentBase, {
|
|
119
41
|
variants: {
|
|
120
|
-
size:
|
|
121
|
-
sm: "pb-2 text-xs",
|
|
122
|
-
md: "pb-3 text-sm",
|
|
123
|
-
lg: "pb-4 text-base",
|
|
124
|
-
},
|
|
42
|
+
size: zuiAccordionContentSizes,
|
|
125
43
|
},
|
|
126
44
|
defaultVariants: { size: "md" },
|
|
127
45
|
});
|
|
@@ -124,7 +124,7 @@ describe("Alert", () => {
|
|
|
124
124
|
</Alert>,
|
|
125
125
|
);
|
|
126
126
|
const root = document.querySelector('[data-slot="alert"]') as HTMLElement;
|
|
127
|
-
expect(root.className).toMatch(
|
|
127
|
+
expect(root.className).toMatch(/--zui-alert-success-border/);
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
|
package/src/ui/alert/variants.ts
CHANGED
|
@@ -1,87 +1,35 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
info: "border-sky-500/40 bg-sky-500/10 text-sky-950 dark:text-sky-50",
|
|
17
|
-
ghost:
|
|
18
|
-
"border-transparent bg-transparent text-slate-700 dark:text-slate-200",
|
|
19
|
-
purple:
|
|
20
|
-
"border-purple-800 dark:border-purple-600 bg-purple-50 dark:bg-purple-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
21
|
-
pink: "border-pink-800 dark:border-pink-600 bg-pink-50 dark:bg-pink-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
22
|
-
orange:
|
|
23
|
-
"border-orange-800 dark:border-orange-600 bg-orange-50 dark:bg-orange-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
24
|
-
yellow:
|
|
25
|
-
"border-yellow-800 dark:border-yellow-600 bg-yellow-50 dark:bg-yellow-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
26
|
-
teal: "border-teal-800 dark:border-teal-600 bg-teal-50 dark:bg-teal-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
27
|
-
indigo:
|
|
28
|
-
"border-indigo-800 dark:border-indigo-600 bg-indigo-50 dark:bg-indigo-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
29
|
-
gray: "border-gray-800 dark:border-gray-600 bg-gray-50 dark:bg-gray-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
30
|
-
violet:
|
|
31
|
-
"border-violet-800 dark:border-violet-600 bg-violet-50 dark:bg-violet-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
32
|
-
"gradient-blue":
|
|
33
|
-
"border-blue-800 dark:border-blue-600 bg-linear-to-r from-blue-50 dark:from-blue-950/70 to-purple-50 dark:to-purple-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
34
|
-
"gradient-green":
|
|
35
|
-
"border-green-800 dark:border-green-600 bg-linear-to-r from-green-50 dark:from-green-950/70 to-lime-50 dark:to-lime-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
36
|
-
"gradient-red":
|
|
37
|
-
"border-red-800 dark:border-red-600 bg-linear-to-r from-red-50 dark:from-red-950/70 to-pink-50 dark:to-pink-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
38
|
-
"gradient-yellow":
|
|
39
|
-
"border-yellow-800 dark:border-yellow-600 bg-linear-to-r from-yellow-50 dark:from-yellow-950/70 to-orange-50 dark:to-orange-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
40
|
-
"gradient-purple":
|
|
41
|
-
"border-purple-800 dark:border-purple-600 bg-linear-to-r from-purple-50 dark:from-purple-950/70 to-pink-50 dark:to-pink-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
42
|
-
"gradient-teal":
|
|
43
|
-
"border-teal-800 dark:border-teal-600 bg-linear-to-r from-teal-50 dark:from-teal-950/70 to-cyan-50 dark:to-cyan-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
44
|
-
"gradient-indigo":
|
|
45
|
-
"border-indigo-800 dark:border-indigo-600 bg-linear-to-r from-indigo-50 dark:from-indigo-950/70 to-purple-50 dark:to-purple-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
46
|
-
"gradient-pink":
|
|
47
|
-
"border-pink-800 dark:border-pink-600 bg-linear-to-r from-pink-50 dark:from-pink-950/70 to-rose-50 dark:to-rose-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
48
|
-
"gradient-orange":
|
|
49
|
-
"border-orange-800 dark:border-orange-600 bg-linear-to-r from-orange-50 dark:from-orange-950/70 to-red-50 dark:to-red-950/70 backdrop-blur-xl text-slate-900 dark:text-slate-50",
|
|
50
|
-
},
|
|
51
|
-
size: {
|
|
52
|
-
sm: "rounded-lg p-3",
|
|
53
|
-
md: "rounded-xl p-4",
|
|
54
|
-
lg: "rounded-2xl p-5 text-base",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
defaultVariants: {
|
|
58
|
-
appearance: "default",
|
|
59
|
-
size: "md",
|
|
60
|
-
},
|
|
3
|
+
import {
|
|
4
|
+
zuiAlertAppearances,
|
|
5
|
+
zuiAlertBase,
|
|
6
|
+
zuiAlertDescriptionBase,
|
|
7
|
+
zuiAlertSizes,
|
|
8
|
+
zuiAlertTextSizes,
|
|
9
|
+
zuiAlertTitleBase,
|
|
10
|
+
} from "../../design-system/alert";
|
|
11
|
+
|
|
12
|
+
export const alertVariants = cva(zuiAlertBase, {
|
|
13
|
+
variants: {
|
|
14
|
+
appearance: zuiAlertAppearances,
|
|
15
|
+
size: zuiAlertSizes,
|
|
61
16
|
},
|
|
62
|
-
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
appearance: "default",
|
|
19
|
+
size: "md",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
63
22
|
|
|
64
|
-
export const alertTitleVariants = cva(
|
|
23
|
+
export const alertTitleVariants = cva(zuiAlertTitleBase, {
|
|
65
24
|
variants: {
|
|
66
|
-
size:
|
|
67
|
-
sm: "text-xs md:text-sm",
|
|
68
|
-
md: "text-xs md:text-sm",
|
|
69
|
-
lg: "text-xs md:text-sm",
|
|
70
|
-
},
|
|
25
|
+
size: zuiAlertTextSizes,
|
|
71
26
|
},
|
|
72
27
|
defaultVariants: { size: "md" },
|
|
73
28
|
});
|
|
74
29
|
|
|
75
|
-
export const alertDescriptionVariants = cva(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
variants: {
|
|
79
|
-
size: {
|
|
80
|
-
sm: "text-xs md:text-sm",
|
|
81
|
-
md: "text-xs md:text-sm",
|
|
82
|
-
lg: "text-xs md:text-sm",
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
defaultVariants: { size: "md" },
|
|
30
|
+
export const alertDescriptionVariants = cva(zuiAlertDescriptionBase, {
|
|
31
|
+
variants: {
|
|
32
|
+
size: zuiAlertTextSizes,
|
|
86
33
|
},
|
|
87
|
-
|
|
34
|
+
defaultVariants: { size: "md" },
|
|
35
|
+
});
|
|
@@ -1,72 +1,27 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"border-yellow-800 dark:border-yellow-600 bg-yellow-100/50 dark:bg-yellow-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
21
|
-
teal: "border-teal-800 dark:border-teal-600 bg-teal-100/50 dark:bg-teal-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
22
|
-
indigo:
|
|
23
|
-
"border-indigo-800 dark:border-indigo-600 bg-indigo-100/50 dark:bg-indigo-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
24
|
-
emerald:
|
|
25
|
-
"border-emerald-800 dark:border-emerald-600 bg-emerald-100/50 dark:bg-emerald-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
26
|
-
gray: "border-gray-800 dark:border-gray-600 bg-gray-100/50 dark:bg-gray-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
27
|
-
amber:
|
|
28
|
-
"border-amber-800 dark:border-amber-600 bg-amber-100/50 dark:bg-amber-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
29
|
-
violet:
|
|
30
|
-
"border-violet-800 dark:border-violet-600 bg-violet-100/50 dark:bg-violet-600/[0.03] text-slate-700 dark:text-slate-200",
|
|
31
|
-
"gradient-blue":
|
|
32
|
-
"bg-linear-to-r from-blue-500 dark:from-blue-600 to-purple-500 dark:to-purple-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
33
|
-
"gradient-green":
|
|
34
|
-
"bg-linear-to-r from-green-500 dark:from-green-600 to-lime-500 dark:to-lime-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
35
|
-
"gradient-red":
|
|
36
|
-
"bg-linear-to-r from-red-500 dark:from-red-600 to-pink-500 dark:to-pink-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
37
|
-
"gradient-yellow":
|
|
38
|
-
"bg-linear-to-r from-yellow-500 dark:from-yellow-600 to-orange-500 dark:to-orange-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
39
|
-
"gradient-purple":
|
|
40
|
-
"bg-linear-to-r from-purple-500 dark:from-purple-600 to-pink-500 dark:to-pink-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
41
|
-
"gradient-teal":
|
|
42
|
-
"bg-linear-to-r from-teal-500 dark:from-teal-600 to-cyan-500 dark:to-cyan-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
43
|
-
"gradient-indigo":
|
|
44
|
-
"bg-linear-to-r from-indigo-500 dark:from-indigo-600 to-purple-500 dark:to-purple-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
45
|
-
"gradient-pink":
|
|
46
|
-
"bg-linear-to-r from-pink-500 dark:from-pink-600 to-rose-500 dark:to-rose-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
47
|
-
"gradient-orange":
|
|
48
|
-
"bg-linear-to-r from-orange-500 dark:from-orange-600 to-red-500 dark:to-red-600 backdrop-blur-xl text-slate-700 dark:text-slate-200",
|
|
49
|
-
},
|
|
50
|
-
size: {
|
|
51
|
-
sm: "size-8 text-xs",
|
|
52
|
-
md: "size-10 text-sm",
|
|
53
|
-
lg: "size-12 text-base",
|
|
54
|
-
xl: "size-16 text-lg",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
defaultVariants: {
|
|
58
|
-
size: "md",
|
|
59
|
-
appearance: "default",
|
|
60
|
-
},
|
|
3
|
+
import {
|
|
4
|
+
zuiAvatarAppearances,
|
|
5
|
+
zuiAvatarBase,
|
|
6
|
+
zuiAvatarFallbackBase,
|
|
7
|
+
zuiAvatarGroupBase,
|
|
8
|
+
zuiAvatarImageBase,
|
|
9
|
+
zuiAvatarSizes,
|
|
10
|
+
} from "../../design-system/avatar";
|
|
11
|
+
|
|
12
|
+
export const avatarVariants = cva(zuiAvatarBase, {
|
|
13
|
+
variants: {
|
|
14
|
+
appearance: zuiAvatarAppearances,
|
|
15
|
+
size: zuiAvatarSizes,
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: "md",
|
|
19
|
+
appearance: "default",
|
|
61
20
|
},
|
|
62
|
-
);
|
|
21
|
+
});
|
|
63
22
|
|
|
64
|
-
export const avatarImageVariants = cva(
|
|
23
|
+
export const avatarImageVariants = cva(zuiAvatarImageBase);
|
|
65
24
|
|
|
66
|
-
export const avatarFallbackVariants = cva(
|
|
67
|
-
"flex size-full items-center justify-center bg-slate-200 dark:bg-slate-800 font-medium text-slate-800 dark:text-slate-100",
|
|
68
|
-
);
|
|
25
|
+
export const avatarFallbackVariants = cva(zuiAvatarFallbackBase);
|
|
69
26
|
|
|
70
|
-
export const avatarGroupVariants = cva(
|
|
71
|
-
"flex items-center [&_[data-slot=avatar]]:-ml-2 [&_[data-slot=avatar]]:ring-2 [&_[data-slot=avatar]]:ring-white dark:[&_[data-slot=avatar]]:ring-slate-950 [&_[data-slot=avatar]]:first:ml-0",
|
|
72
|
-
);
|
|
27
|
+
export const avatarGroupVariants = cva(zuiAvatarGroupBase);
|
|
@@ -20,7 +20,7 @@ describe("Badge", () => {
|
|
|
20
20
|
it("should apply secondary appearance", () => {
|
|
21
21
|
render(<Badge appearance="secondary">S</Badge>);
|
|
22
22
|
const root = document.querySelector('[data-slot="badge"]') as HTMLElement;
|
|
23
|
-
expect(root.className).toMatch(
|
|
23
|
+
expect(root.className).toMatch(/--zui-badge-secondary-bg/);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
it("should call onClose when closable", async () => {
|
package/src/ui/badge/variants.ts
CHANGED
|
@@ -1,96 +1,35 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"border border-black/10 dark:border-white/10 bg-black/5 dark:bg-white/5 text-slate-900 dark:text-slate-50",
|
|
14
|
-
ghost: "bg-transparent text-slate-700 dark:text-slate-200",
|
|
15
|
-
glass:
|
|
16
|
-
"border border-black/15 dark:border-white/15 bg-black/10 dark:bg-white/10 text-slate-900 dark:text-white backdrop-blur-md",
|
|
17
|
-
emerald: "bg-emerald-500 dark:bg-emerald-800 text-slate-100 dark:text-white",
|
|
18
|
-
indigo: "bg-indigo-800 dark:bg-indigo-600 text-slate-100 dark:text-white",
|
|
19
|
-
purple: "bg-purple-800 dark:bg-purple-600 text-slate-100 dark:text-white",
|
|
20
|
-
pink: "bg-pink-800 dark:bg-pink-600 text-slate-100 dark:text-white",
|
|
21
|
-
rose: "bg-rose-500 dark:bg-rose-700 text-slate-100 dark:text-white",
|
|
22
|
-
sky: "bg-sky-500 dark:bg-sky-700 text-slate-100 dark:text-white",
|
|
23
|
-
teal: "bg-teal-500 dark:bg-teal-700 text-slate-100 dark:text-white",
|
|
24
|
-
yellow: "bg-yellow-500 dark:bg-yellow-800 text-slate-100 dark:text-white",
|
|
25
|
-
orange: "bg-orange-500 dark:bg-orange-800 text-slate-100 dark:text-white",
|
|
26
|
-
"gradient-blue":
|
|
27
|
-
"bg-linear-to-r from-blue-800 dark:from-blue-600 to-purple-800 dark:to-purple-600 text-slate-100 dark:text-white",
|
|
28
|
-
"gradient-green":
|
|
29
|
-
"bg-linear-to-r from-green-800 dark:from-green-600 to-lime-800 dark:to-lime-600 text-slate-100 dark:text-white",
|
|
30
|
-
"gradient-red":
|
|
31
|
-
"bg-linear-to-r from-red-800 dark:from-red-600 to-pink-800 dark:to-pink-600 text-slate-100 dark:text-white",
|
|
32
|
-
"gradient-yellow":
|
|
33
|
-
"bg-linear-to-r from-yellow-800 dark:from-yellow-600 to-orange-800 dark:to-orange-600 text-slate-100 dark:text-white",
|
|
34
|
-
"gradient-purple":
|
|
35
|
-
"bg-linear-to-r from-purple-800 dark:from-purple-600 to-pink-800 dark:to-pink-600 text-slate-100 dark:text-white",
|
|
36
|
-
"gradient-teal":
|
|
37
|
-
"bg-linear-to-r from-teal-800 dark:from-teal-600 to-cyan-800 dark:to-cyan-600 text-slate-100 dark:text-white",
|
|
38
|
-
"gradient-indigo":
|
|
39
|
-
"bg-linear-to-r from-indigo-800 dark:from-indigo-600 to-purple-800 dark:to-purple-600 text-slate-100 dark:text-white",
|
|
40
|
-
"gradient-pink":
|
|
41
|
-
"bg-linear-to-r from-pink-800 dark:from-pink-600 to-rose-800 dark:to-rose-600 text-slate-100 dark:text-white",
|
|
42
|
-
"gradient-orange":
|
|
43
|
-
"bg-linear-to-r from-orange-800 dark:from-orange-600 to-red-800 dark:to-red-600 text-slate-100 dark:text-white",
|
|
44
|
-
} as const;
|
|
3
|
+
import {
|
|
4
|
+
zuiBadgeAppearances,
|
|
5
|
+
zuiBadgeBase,
|
|
6
|
+
zuiBadgeCloseButtonBase,
|
|
7
|
+
zuiBadgeCloseButtonSizes,
|
|
8
|
+
zuiBadgeShapes,
|
|
9
|
+
zuiBadgeSizes,
|
|
10
|
+
zuiButtonLikeSolidAppearances,
|
|
11
|
+
type ZuiButtonLikeSolidAppearance,
|
|
12
|
+
} from "../../design-system/badge";
|
|
45
13
|
|
|
46
|
-
export
|
|
14
|
+
export const buttonLikeSolidAppearances = zuiButtonLikeSolidAppearances;
|
|
15
|
+
export type ButtonLikeSolidAppearance = ZuiButtonLikeSolidAppearance;
|
|
47
16
|
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"whitespace-nowrap ring-offset-slate-50 dark:ring-offset-slate-950 transition-colors",
|
|
59
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-600 dark:focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
60
|
-
"select-none",
|
|
61
|
-
],
|
|
62
|
-
{
|
|
63
|
-
variants: {
|
|
64
|
-
appearance: badgeAppearances,
|
|
65
|
-
size: {
|
|
66
|
-
sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
|
|
67
|
-
md: "h-7 min-h-7 px-2.5 text-xs leading-none",
|
|
68
|
-
lg: "h-8 min-h-8 px-3 text-sm leading-none",
|
|
69
|
-
},
|
|
70
|
-
shape: {
|
|
71
|
-
pill: "rounded-full",
|
|
72
|
-
square: "rounded-md",
|
|
73
|
-
dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
appearance: "default",
|
|
78
|
-
size: "md",
|
|
79
|
-
shape: "pill",
|
|
80
|
-
},
|
|
17
|
+
export const badgeVariants = cva(zuiBadgeBase, {
|
|
18
|
+
variants: {
|
|
19
|
+
appearance: zuiBadgeAppearances,
|
|
20
|
+
size: zuiBadgeSizes,
|
|
21
|
+
shape: zuiBadgeShapes,
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
appearance: "default",
|
|
25
|
+
size: "md",
|
|
26
|
+
shape: "pill",
|
|
81
27
|
},
|
|
82
|
-
);
|
|
28
|
+
});
|
|
83
29
|
|
|
84
|
-
export const badgeCloseButtonVariants = cva(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
variants: {
|
|
88
|
-
size: {
|
|
89
|
-
sm: "size-4",
|
|
90
|
-
md: "size-5",
|
|
91
|
-
lg: "size-6",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
defaultVariants: { size: "md" },
|
|
30
|
+
export const badgeCloseButtonVariants = cva(zuiBadgeCloseButtonBase, {
|
|
31
|
+
variants: {
|
|
32
|
+
size: zuiBadgeCloseButtonSizes,
|
|
95
33
|
},
|
|
96
|
-
|
|
34
|
+
defaultVariants: { size: "md" },
|
|
35
|
+
});
|
|
@@ -1,54 +1,38 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import {
|
|
4
|
+
zuiBreadcrumbAppearances,
|
|
5
|
+
zuiBreadcrumbItemBase,
|
|
6
|
+
zuiBreadcrumbLinkBase,
|
|
7
|
+
zuiBreadcrumbListBase,
|
|
8
|
+
zuiBreadcrumbNavBase,
|
|
9
|
+
zuiBreadcrumbPageBase,
|
|
10
|
+
zuiBreadcrumbSeparatorBase,
|
|
11
|
+
zuiBreadcrumbSeparatorSizes,
|
|
12
|
+
} from "../../design-system/breadcrumb";
|
|
13
|
+
|
|
14
|
+
export const breadcrumbNavVariants = cva(zuiBreadcrumbNavBase, {
|
|
4
15
|
variants: {
|
|
5
|
-
appearance:
|
|
6
|
-
default: "text-slate-600 dark:text-slate-300",
|
|
7
|
-
muted: "text-slate-500 dark:text-slate-400",
|
|
8
|
-
sky: "text-sky-800 dark:text-sky-600",
|
|
9
|
-
rose: "text-rose-800 dark:text-rose-600",
|
|
10
|
-
purple: "text-purple-800 dark:text-purple-600",
|
|
11
|
-
pink: "text-pink-800 dark:text-pink-600",
|
|
12
|
-
orange: "text-orange-800 dark:text-orange-600",
|
|
13
|
-
yellow: "text-yellow-800 dark:text-yellow-600",
|
|
14
|
-
teal: "text-teal-800 dark:text-teal-600",
|
|
15
|
-
indigo: "text-indigo-800 dark:text-indigo-600",
|
|
16
|
-
emerald: "text-emerald-800 dark:text-emerald-600",
|
|
17
|
-
gray: "text-gray-800 dark:text-gray-600",
|
|
18
|
-
amber: "text-amber-800 dark:text-amber-600",
|
|
19
|
-
violet: "text-violet-800 dark:text-violet-600",
|
|
20
|
-
},
|
|
16
|
+
appearance: zuiBreadcrumbAppearances,
|
|
21
17
|
},
|
|
22
18
|
defaultVariants: {
|
|
23
19
|
appearance: "default",
|
|
24
20
|
},
|
|
25
21
|
});
|
|
26
22
|
|
|
27
|
-
export const breadcrumbListVariants = cva(
|
|
28
|
-
"flex flex-wrap items-center gap-1.5",
|
|
29
|
-
);
|
|
23
|
+
export const breadcrumbListVariants = cva(zuiBreadcrumbListBase);
|
|
30
24
|
|
|
31
|
-
export const breadcrumbItemVariants = cva(
|
|
25
|
+
export const breadcrumbItemVariants = cva(zuiBreadcrumbItemBase);
|
|
32
26
|
|
|
33
|
-
export const breadcrumbLinkVariants = cva(
|
|
34
|
-
"rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/30 dark:focus-visible:ring-white/30 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-50 dark:focus-visible:ring-offset-slate-950",
|
|
35
|
-
);
|
|
27
|
+
export const breadcrumbLinkVariants = cva(zuiBreadcrumbLinkBase);
|
|
36
28
|
|
|
37
|
-
export const breadcrumbPageVariants = cva(
|
|
38
|
-
"font-medium text-slate-800 dark:text-slate-100",
|
|
39
|
-
);
|
|
29
|
+
export const breadcrumbPageVariants = cva(zuiBreadcrumbPageBase);
|
|
40
30
|
|
|
41
|
-
export const breadcrumbSeparatorVariants = cva(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
variants: {
|
|
45
|
-
size: {
|
|
46
|
-
sm: "text-xs",
|
|
47
|
-
md: "text-sm",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
size: "md",
|
|
52
|
-
},
|
|
31
|
+
export const breadcrumbSeparatorVariants = cva(zuiBreadcrumbSeparatorBase, {
|
|
32
|
+
variants: {
|
|
33
|
+
size: zuiBreadcrumbSeparatorSizes,
|
|
53
34
|
},
|
|
54
|
-
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "md",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -111,7 +111,7 @@ describe("Button (component library)", () => {
|
|
|
111
111
|
expect(
|
|
112
112
|
root.className,
|
|
113
113
|
"Default appearance must include the default surface token classes",
|
|
114
|
-
).toMatch(
|
|
114
|
+
).toMatch(/--zui-button-default-bg/);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
it("should apply secondary appearance when appearance='secondary'", () => {
|
|
@@ -120,7 +120,7 @@ describe("Button (component library)", () => {
|
|
|
120
120
|
expect(
|
|
121
121
|
root.className,
|
|
122
122
|
"Secondary appearance must switch to the slate surface recipe",
|
|
123
|
-
).toMatch(
|
|
123
|
+
).toMatch(/--zui-button-secondary-bg/);
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
it("should apply destructive appearance when appearance='destructive'", () => {
|
|
@@ -129,7 +129,7 @@ describe("Button (component library)", () => {
|
|
|
129
129
|
expect(
|
|
130
130
|
root.className,
|
|
131
131
|
"Destructive appearance must surface danger styling",
|
|
132
|
-
).toMatch(
|
|
132
|
+
).toMatch(/--zui-button-destructive-bg/);
|
|
133
133
|
});
|
|
134
134
|
|
|
135
135
|
it("should apply outline appearance when appearance='outline'", () => {
|
|
@@ -138,7 +138,7 @@ describe("Button (component library)", () => {
|
|
|
138
138
|
expect(
|
|
139
139
|
root.className,
|
|
140
140
|
"Outline appearance must include border and translucent surface classes",
|
|
141
|
-
).toMatch(
|
|
141
|
+
).toMatch(/--zui-button-outline-border/);
|
|
142
142
|
});
|
|
143
143
|
|
|
144
144
|
it("should apply gradient appearance tokens for gradient presets", () => {
|
|
@@ -148,6 +148,10 @@ describe("Button (component library)", () => {
|
|
|
148
148
|
root.className,
|
|
149
149
|
"Gradient-blue appearance must include directional gradient utilities",
|
|
150
150
|
).toMatch(/bg-linear-to-r/);
|
|
151
|
+
expect(
|
|
152
|
+
root.className,
|
|
153
|
+
"Gradient-blue appearance must expose gradient color variables",
|
|
154
|
+
).toMatch(/--zui-button-gradient-blue-from/);
|
|
151
155
|
});
|
|
152
156
|
});
|
|
153
157
|
|
|
@@ -198,12 +202,28 @@ describe("Button (component library)", () => {
|
|
|
198
202
|
expect(
|
|
199
203
|
root.className,
|
|
200
204
|
"Consumer class names must not replace variant output",
|
|
201
|
-
).toMatch(
|
|
205
|
+
).toMatch(/--zui-button-secondary-bg/);
|
|
202
206
|
expect(
|
|
203
207
|
root.className,
|
|
204
208
|
"Consumer class names must be appended for Tailwind overrides",
|
|
205
209
|
).toMatch(/my-custom-trigger/);
|
|
206
210
|
});
|
|
211
|
+
|
|
212
|
+
it("should allow consumers to override button CSS variables without changing variant props", () => {
|
|
213
|
+
render(
|
|
214
|
+
<Button
|
|
215
|
+
className="[--zui-button-secondary-bg:#123456]"
|
|
216
|
+
appearance="secondary"
|
|
217
|
+
>
|
|
218
|
+
Branded
|
|
219
|
+
</Button>,
|
|
220
|
+
);
|
|
221
|
+
const root = getButtonSlot();
|
|
222
|
+
expect(
|
|
223
|
+
root.className,
|
|
224
|
+
"Appearance API should stay stable while CSS variables remain overrideable",
|
|
225
|
+
).toMatch(/--zui-button-secondary-bg:#123456/);
|
|
226
|
+
});
|
|
207
227
|
});
|
|
208
228
|
|
|
209
229
|
describe("props: disabled state", () => {
|