@zentauri-ui/zentauri-components 1.4.6 → 1.4.7
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 +136 -90
- package/cli/index.mjs +45 -26
- package/cli/registry.json +9 -1
- package/cli/rewrite-imports.mjs +8 -3
- package/dist/charts/area/Area.d.ts +6 -0
- package/dist/charts/area/Area.d.ts.map +1 -0
- package/dist/charts/area/index.d.ts +4 -0
- package/dist/charts/area/index.d.ts.map +1 -0
- package/dist/charts/area.js +119 -0
- package/dist/charts/area.js.map +1 -0
- package/dist/charts/area.mjs +106 -0
- package/dist/charts/area.mjs.map +1 -0
- package/dist/charts/bar/Bar.d.ts +6 -0
- package/dist/charts/bar/Bar.d.ts.map +1 -0
- package/dist/charts/bar/index.d.ts +4 -0
- package/dist/charts/bar/index.d.ts.map +1 -0
- package/dist/charts/bar.js +110 -0
- package/dist/charts/bar.js.map +1 -0
- package/dist/charts/bar.mjs +97 -0
- package/dist/charts/bar.mjs.map +1 -0
- package/dist/charts/bubble/Bubble.d.ts +6 -0
- package/dist/charts/bubble/Bubble.d.ts.map +1 -0
- package/dist/charts/bubble/index.d.ts +4 -0
- package/dist/charts/bubble/index.d.ts.map +1 -0
- package/dist/charts/bubble.js +122 -0
- package/dist/charts/bubble.js.map +1 -0
- package/dist/charts/bubble.mjs +109 -0
- package/dist/charts/bubble.mjs.map +1 -0
- package/dist/charts/line/Line.d.ts +6 -0
- package/dist/charts/line/Line.d.ts.map +1 -0
- package/dist/charts/line/index.d.ts +4 -0
- package/dist/charts/line/index.d.ts.map +1 -0
- package/dist/charts/line.js +113 -0
- package/dist/charts/line.js.map +1 -0
- package/dist/charts/line.mjs +100 -0
- package/dist/charts/line.mjs.map +1 -0
- package/dist/charts/shared/chart-frame.d.ts +32 -0
- package/dist/charts/shared/chart-frame.d.ts.map +1 -0
- package/dist/charts/shared/colors.d.ts +43 -0
- package/dist/charts/shared/colors.d.ts.map +1 -0
- package/dist/charts/shared/types.d.ts +43 -0
- package/dist/charts/shared/types.d.ts.map +1 -0
- package/dist/charts/shared/variants.d.ts +93 -0
- package/dist/charts/shared/variants.d.ts.map +1 -0
- package/dist/{chunk-IXDJ3IPG.mjs → chunk-2BAMNRAL.mjs} +40 -32
- package/dist/chunk-2BAMNRAL.mjs.map +1 -0
- package/dist/{chunk-JE3PD5ZA.js → chunk-2VUMVDR3.js} +8 -8
- package/dist/{chunk-JE3PD5ZA.js.map → chunk-2VUMVDR3.js.map} +1 -1
- package/dist/{chunk-DFEZH7TC.mjs → chunk-4D54YOL6.mjs} +2 -2
- package/dist/{chunk-DFEZH7TC.mjs.map → chunk-4D54YOL6.mjs.map} +1 -1
- package/dist/{chunk-BORK3BJO.mjs → chunk-5TV7EL3H.mjs} +19 -19
- package/dist/chunk-5TV7EL3H.mjs.map +1 -0
- package/dist/{chunk-BSWYZTYK.js → chunk-7DCFVPWN.js} +2 -2
- package/dist/chunk-7DCFVPWN.js.map +1 -0
- package/dist/{chunk-5QB2KNZQ.js → chunk-7TLKLMBM.js} +11 -9
- package/dist/chunk-7TLKLMBM.js.map +1 -0
- package/dist/{chunk-2P3UU2J3.mjs → chunk-A6KMZ5ZS.mjs} +12 -12
- package/dist/chunk-A6KMZ5ZS.mjs.map +1 -0
- package/dist/{chunk-U4YQCAXW.js → chunk-AD2LA3XN.js} +18 -18
- package/dist/chunk-AD2LA3XN.js.map +1 -0
- package/dist/{chunk-XLAFQ24R.js → chunk-AUGLZ3AN.js} +49 -41
- package/dist/chunk-AUGLZ3AN.js.map +1 -0
- package/dist/{chunk-OJ67PZ6N.js → chunk-BCZIYH53.js} +8 -8
- package/dist/{chunk-OJ67PZ6N.js.map → chunk-BCZIYH53.js.map} +1 -1
- package/dist/{chunk-UBFKTC2P.mjs → chunk-C5L465FW.mjs} +12 -12
- package/dist/chunk-C5L465FW.mjs.map +1 -0
- package/dist/chunk-CIN5JDN4.js +174 -0
- package/dist/chunk-CIN5JDN4.js.map +1 -0
- package/dist/{chunk-3OR47XMY.js → chunk-E4FZY7O2.js} +52 -33
- package/dist/chunk-E4FZY7O2.js.map +1 -0
- package/dist/{chunk-LVUPECBT.mjs → chunk-FQBMIZH2.mjs} +12 -12
- package/dist/chunk-FQBMIZH2.mjs.map +1 -0
- package/dist/{chunk-RDSPHBHK.mjs → chunk-G3LEYBRV.mjs} +50 -7
- package/dist/chunk-G3LEYBRV.mjs.map +1 -0
- package/dist/chunk-GBWGVNDA.js +160 -0
- package/dist/chunk-GBWGVNDA.js.map +1 -0
- package/dist/{chunk-XWM2S6VV.mjs → chunk-I6GR234Z.mjs} +22 -20
- package/dist/chunk-I6GR234Z.mjs.map +1 -0
- package/dist/{chunk-UXGHUBNJ.mjs → chunk-INMNX3HQ.mjs} +13 -13
- package/dist/{chunk-UXGHUBNJ.mjs.map → chunk-INMNX3HQ.mjs.map} +1 -1
- package/dist/chunk-IQZROQNJ.mjs +165 -0
- package/dist/chunk-IQZROQNJ.mjs.map +1 -0
- package/dist/{chunk-PGH27VTL.mjs → chunk-JBAUEGYD.mjs} +40 -32
- package/dist/chunk-JBAUEGYD.mjs.map +1 -0
- package/dist/{chunk-WZKGRU3U.js → chunk-JUDMPOCI.js} +103 -38
- package/dist/chunk-JUDMPOCI.js.map +1 -0
- package/dist/chunk-K6YI4FJO.mjs +158 -0
- package/dist/chunk-K6YI4FJO.mjs.map +1 -0
- package/dist/{chunk-WP7GYBRI.js → chunk-KC5LEZ6J.js} +2 -2
- package/dist/chunk-KC5LEZ6J.js.map +1 -0
- package/dist/{chunk-BVXTOEBI.mjs → chunk-LN77JJTY.mjs} +45 -26
- package/dist/chunk-LN77JJTY.mjs.map +1 -0
- package/dist/{chunk-E3DZNJAD.js → chunk-MCOQHXRW.js} +23 -21
- package/dist/chunk-MCOQHXRW.js.map +1 -0
- package/dist/{chunk-FLILFCQE.mjs → chunk-MTLLJFUI.mjs} +7 -8
- package/dist/chunk-MTLLJFUI.mjs.map +1 -0
- package/dist/{chunk-6I7X5BF2.js → chunk-N2OAI2HN.js} +18 -18
- package/dist/chunk-N2OAI2HN.js.map +1 -0
- package/dist/{chunk-BITDSQMR.js → chunk-OB4KJZK2.js} +19 -19
- package/dist/chunk-OB4KJZK2.js.map +1 -0
- package/dist/{chunk-PCK6LX3K.js → chunk-OLEMP2HL.js} +19 -19
- package/dist/{chunk-PCK6LX3K.js.map → chunk-OLEMP2HL.js.map} +1 -1
- package/dist/{chunk-2PQEXQVR.js → chunk-PWL5WD34.js} +76 -27
- package/dist/chunk-PWL5WD34.js.map +1 -0
- package/dist/{chunk-N4NO3SYL.js → chunk-Q5B44QW7.js} +48 -40
- package/dist/chunk-Q5B44QW7.js.map +1 -0
- package/dist/{chunk-FT2LMA66.mjs → chunk-QADZK5R7.mjs} +2 -2
- package/dist/chunk-QADZK5R7.mjs.map +1 -0
- package/dist/{chunk-WDCIZHXY.mjs → chunk-QZTEFGZF.mjs} +6 -4
- package/dist/chunk-QZTEFGZF.mjs.map +1 -0
- package/dist/{chunk-UOFTZKMM.js → chunk-S7WKFNPT.js} +18 -18
- package/dist/chunk-S7WKFNPT.js.map +1 -0
- package/dist/{chunk-XIXF7UVM.mjs → chunk-TINHLHCN.mjs} +12 -12
- package/dist/chunk-TINHLHCN.mjs.map +1 -0
- package/dist/{chunk-7HL3A4YF.mjs → chunk-TJUNN2PT.mjs} +73 -24
- package/dist/chunk-TJUNN2PT.mjs.map +1 -0
- package/dist/{chunk-4B7KGBQB.js → chunk-UWA23DUC.js} +12 -13
- package/dist/chunk-UWA23DUC.js.map +1 -0
- package/dist/{chunk-CY5BQKRZ.mjs → chunk-VXDEPZKH.mjs} +2 -2
- package/dist/chunk-VXDEPZKH.mjs.map +1 -0
- package/dist/{chunk-C2FCPQTO.js → chunk-Y745GQR2.js} +16 -16
- package/dist/chunk-Y745GQR2.js.map +1 -0
- package/dist/{chunk-TZ2JVWTZ.mjs → chunk-YNBJAFI2.mjs} +3 -3
- package/dist/{chunk-TZ2JVWTZ.mjs.map → chunk-YNBJAFI2.mjs.map} +1 -1
- package/dist/{chunk-P5HUBXUX.js → chunk-YTRGRHEB.js} +55 -12
- package/dist/chunk-YTRGRHEB.js.map +1 -0
- package/dist/{chunk-YNCD6TKE.mjs → chunk-ZBBFOMSJ.mjs} +103 -38
- package/dist/chunk-ZBBFOMSJ.mjs.map +1 -0
- package/dist/{chunk-UOZYPWDZ.js → chunk-ZS5756ZC.js} +2 -2
- package/dist/{chunk-UOZYPWDZ.js.map → chunk-ZS5756ZC.js.map} +1 -1
- package/dist/{chunk-W6PRMYUC.mjs → chunk-ZYZJ74XB.mjs} +3 -3
- package/dist/{chunk-W6PRMYUC.mjs.map → chunk-ZYZJ74XB.mjs.map} +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.d.ts.map +1 -1
- package/dist/hooks/useClickOutside.js +2 -2
- package/dist/hooks/useClickOutside.mjs +1 -1
- package/dist/hooks/useClipboard/useClipboard.d.ts.map +1 -1
- package/dist/hooks/useClipboard.js.map +1 -1
- package/dist/hooks/useClipboard.mjs.map +1 -1
- package/dist/hooks/useFocusManagement/useFocusManagement.d.ts +5 -14
- package/dist/hooks/useFocusManagement/useFocusManagement.d.ts.map +1 -1
- package/dist/hooks/useFocusManagement.js +2 -2
- package/dist/hooks/useFocusManagement.mjs +1 -1
- package/dist/hooks/useLocalStorage/index.d.ts +1 -1
- package/dist/hooks/useLocalStorage/index.d.ts.map +1 -1
- package/dist/hooks/useLocalStorage.js +1 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +1 -3
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +2 -2
- package/dist/hooks/useMediaQuery.mjs +1 -1
- package/dist/hooks/usePagination.js +4 -4
- package/dist/hooks/usePagination.mjs +2 -2
- package/dist/hooks/usePrefersColorScheme.js +2 -2
- package/dist/hooks/usePrefersColorScheme.mjs +1 -1
- package/dist/hooks/usePrefersReducedMotion.js +2 -2
- package/dist/hooks/usePrefersReducedMotion.mjs +1 -1
- package/dist/hooks/useResizeObserver/index.d.ts +1 -1
- package/dist/hooks/useResizeObserver/index.d.ts.map +1 -1
- package/dist/hooks/useSessionStorage/useSessionStorage.d.ts.map +1 -1
- package/dist/hooks/useSessionStorage.js.map +1 -1
- package/dist/hooks/useSessionStorage.mjs.map +1 -1
- package/dist/hooks/useThrottledCallback/useThrottledCallback.d.ts.map +1 -1
- package/dist/hooks/useThrottledCallback.js.map +1 -1
- package/dist/hooks/useThrottledCallback.mjs.map +1 -1
- package/dist/hooks/useWindowSize/useWindowSize.d.ts.map +1 -1
- package/dist/hooks/useWindowSize.js +4 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/hooks/useWindowSize.mjs +4 -1
- package/dist/hooks/useWindowSize.mjs.map +1 -1
- package/dist/hooks/utils.js +5 -5
- package/dist/hooks/utils.mjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/ui/accordion/animated/accordion-content-animated.d.ts.map +1 -1
- package/dist/ui/accordion/animated/index.d.ts +1 -1
- package/dist/ui/accordion/animated/index.d.ts.map +1 -1
- package/dist/ui/accordion/animated/types.d.ts.map +1 -1
- package/dist/ui/accordion/animated.js +8 -11
- package/dist/ui/accordion/animated.js.map +1 -1
- package/dist/ui/accordion/animated.mjs +4 -7
- package/dist/ui/accordion/animated.mjs.map +1 -1
- package/dist/ui/accordion/variants.d.ts +2 -2
- package/dist/ui/accordion.js +10 -10
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/accordion.mjs +3 -3
- package/dist/ui/accordion.mjs.map +1 -1
- package/dist/ui/alert/alert-base.d.ts.map +1 -1
- package/dist/ui/alert/alert.d.ts.map +1 -1
- package/dist/ui/alert/animated/index.d.ts.map +1 -1
- package/dist/ui/alert/animated.js +3 -3
- package/dist/ui/alert/animated.mjs +2 -2
- package/dist/ui/alert/types.d.ts.map +1 -1
- package/dist/ui/alert/variants.d.ts +1 -1
- package/dist/ui/alert.js +11 -11
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/alert.mjs +3 -3
- package/dist/ui/alert.mjs.map +1 -1
- package/dist/ui/avatar/animated/index.d.ts +1 -1
- package/dist/ui/avatar/animated/index.d.ts.map +1 -1
- package/dist/ui/avatar/animated.js +6 -6
- package/dist/ui/avatar/animated.mjs +3 -3
- package/dist/ui/avatar/avatar-base.d.ts.map +1 -1
- package/dist/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/ui/avatar/variants.d.ts +1 -1
- package/dist/ui/avatar/variants.d.ts.map +1 -1
- package/dist/ui/avatar.js +10 -10
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/avatar.mjs +3 -3
- package/dist/ui/avatar.mjs.map +1 -1
- package/dist/ui/badge/animated/index.d.ts +1 -1
- package/dist/ui/badge/animated/index.d.ts.map +1 -1
- package/dist/ui/badge/animated/types.d.ts.map +1 -1
- package/dist/ui/badge/animated.js +3 -3
- package/dist/ui/badge/animated.mjs +2 -2
- package/dist/ui/badge/badge-base.d.ts +1 -1
- package/dist/ui/badge/badge-base.d.ts.map +1 -1
- package/dist/ui/badge/types.d.ts +1 -0
- package/dist/ui/badge/types.d.ts.map +1 -1
- package/dist/ui/badge/variants.d.ts +18 -18
- package/dist/ui/badge/variants.d.ts.map +1 -1
- package/dist/ui/badge.js +5 -5
- package/dist/ui/badge.mjs +3 -3
- package/dist/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb/types.d.ts.map +1 -1
- package/dist/ui/breadcrumb/variants.d.ts +1 -1
- package/dist/ui/breadcrumb/variants.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +47 -43
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/breadcrumb.mjs +43 -39
- package/dist/ui/breadcrumb.mjs.map +1 -1
- package/dist/ui/buttons/animated/index.d.ts +1 -1
- package/dist/ui/buttons/animated/index.d.ts.map +1 -1
- package/dist/ui/buttons/animated/types.d.ts.map +1 -1
- package/dist/ui/buttons/animated.js +4 -4
- package/dist/ui/buttons/animated.mjs +2 -2
- package/dist/ui/buttons/types.d.ts.map +1 -1
- package/dist/ui/buttons/variants.d.ts +2 -2
- package/dist/ui/buttons.js +5 -5
- package/dist/ui/buttons.mjs +3 -3
- package/dist/ui/card/animated.js +8 -8
- package/dist/ui/card/animated.mjs +3 -3
- package/dist/ui/card/card-base.d.ts.map +1 -1
- package/dist/ui/card/card.d.ts.map +1 -1
- package/dist/ui/card/index.d.ts +2 -2
- package/dist/ui/card/index.d.ts.map +1 -1
- package/dist/ui/card/variants.d.ts +1 -1
- package/dist/ui/card.js +13 -13
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/card.mjs +3 -3
- package/dist/ui/card.mjs.map +1 -1
- package/dist/ui/divider/animated/index.d.ts +1 -1
- package/dist/ui/divider/animated/index.d.ts.map +1 -1
- package/dist/ui/divider/animated/types.d.ts.map +1 -1
- package/dist/ui/divider/animated.js +3 -3
- package/dist/ui/divider/animated.mjs +2 -2
- package/dist/ui/divider/divider-base.d.ts.map +1 -1
- package/dist/ui/divider/variants.d.ts +2 -2
- package/dist/ui/divider.js +7 -7
- package/dist/ui/divider.mjs +3 -3
- package/dist/ui/drawer/animated/drawer-content-animated.d.ts.map +1 -1
- package/dist/ui/drawer/animated/index.d.ts +1 -1
- package/dist/ui/drawer/animated/index.d.ts.map +1 -1
- package/dist/ui/drawer/animated.js +19 -20
- package/dist/ui/drawer/animated.js.map +1 -1
- package/dist/ui/drawer/animated.mjs +9 -10
- package/dist/ui/drawer/animated.mjs.map +1 -1
- package/dist/ui/drawer/drawer-base.d.ts +1 -1
- package/dist/ui/drawer/drawer-base.d.ts.map +1 -1
- package/dist/ui/drawer/types.d.ts +1 -0
- package/dist/ui/drawer/types.d.ts.map +1 -1
- package/dist/ui/drawer/variants.d.ts +3 -3
- package/dist/ui/drawer.js +13 -13
- package/dist/ui/drawer.mjs +3 -3
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts.map +1 -1
- package/dist/ui/dropdown/types.d.ts +1 -0
- package/dist/ui/dropdown/types.d.ts.map +1 -1
- package/dist/ui/dropdown/variants.d.ts +4 -4
- package/dist/ui/dropdown.js +49 -31
- package/dist/ui/dropdown.js.map +1 -1
- package/dist/ui/dropdown.mjs +46 -28
- package/dist/ui/dropdown.mjs.map +1 -1
- package/dist/ui/empty-state/animated/empty-state-animated.d.ts.map +1 -1
- package/dist/ui/empty-state/animated/index.d.ts +2 -2
- package/dist/ui/empty-state/animated/index.d.ts.map +1 -1
- package/dist/ui/empty-state/animated.js +3 -3
- package/dist/ui/empty-state/animated.js.map +1 -1
- package/dist/ui/empty-state/animated.mjs +2 -2
- package/dist/ui/empty-state/animated.mjs.map +1 -1
- package/dist/ui/empty-state/empty-state-base.d.ts.map +1 -1
- package/dist/ui/empty-state/index.d.ts +1 -1
- package/dist/ui/empty-state/index.d.ts.map +1 -1
- package/dist/ui/empty-state/types.d.ts +1 -0
- package/dist/ui/empty-state/types.d.ts.map +1 -1
- package/dist/ui/empty-state.js +11 -11
- package/dist/ui/empty-state.mjs +3 -3
- package/dist/ui/file-upload/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload/variants.d.ts +1 -1
- package/dist/ui/file-upload/variants.d.ts.map +1 -1
- package/dist/ui/file-upload.js +4 -6
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/file-upload.mjs +2 -4
- package/dist/ui/file-upload.mjs.map +1 -1
- package/dist/ui/inputs/animated/index.d.ts +1 -1
- package/dist/ui/inputs/animated/index.d.ts.map +1 -1
- package/dist/ui/inputs/animated.js +3 -3
- package/dist/ui/inputs/animated.mjs +1 -1
- package/dist/ui/inputs/input-base.d.ts.map +1 -1
- package/dist/ui/inputs/types.d.ts +3 -1
- package/dist/ui/inputs/types.d.ts.map +1 -1
- package/dist/ui/inputs/variants.d.ts +2 -2
- package/dist/ui/inputs.js +49 -5
- package/dist/ui/inputs.js.map +1 -1
- package/dist/ui/inputs.mjs +47 -3
- package/dist/ui/inputs.mjs.map +1 -1
- package/dist/ui/modal/animated/index.d.ts +1 -1
- package/dist/ui/modal/animated/index.d.ts.map +1 -1
- package/dist/ui/modal/animated/modal-content-animated.d.ts.map +1 -1
- package/dist/ui/modal/animated.js +12 -13
- package/dist/ui/modal/animated.js.map +1 -1
- package/dist/ui/modal/animated.mjs +8 -9
- package/dist/ui/modal/animated.mjs.map +1 -1
- package/dist/ui/modal/index.d.ts +1 -1
- package/dist/ui/modal/index.d.ts.map +1 -1
- package/dist/ui/modal/modal-base.d.ts +4 -2
- package/dist/ui/modal/modal-base.d.ts.map +1 -1
- package/dist/ui/modal/types.d.ts.map +1 -1
- package/dist/ui/modal/variants.d.ts +2 -2
- package/dist/ui/modal.js +14 -14
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/modal.mjs +4 -4
- package/dist/ui/modal.mjs.map +1 -1
- package/dist/ui/pagination/pagination.d.ts +2 -2
- package/dist/ui/pagination/variants.d.ts +3 -3
- package/dist/ui/pagination.js +25 -25
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/pagination.mjs +15 -15
- package/dist/ui/pagination.mjs.map +1 -1
- package/dist/ui/progress/animated/progress-animated.d.ts.map +1 -1
- package/dist/ui/progress/animated.js +52 -14
- package/dist/ui/progress/animated.js.map +1 -1
- package/dist/ui/progress/animated.mjs +45 -7
- package/dist/ui/progress/animated.mjs.map +1 -1
- package/dist/ui/progress/index.d.ts +2 -2
- package/dist/ui/progress/index.d.ts.map +1 -1
- package/dist/ui/progress/progress-base.d.ts.map +1 -1
- package/dist/ui/progress/progress.d.ts.map +1 -1
- package/dist/ui/progress/types.d.ts +3 -0
- package/dist/ui/progress/types.d.ts.map +1 -1
- package/dist/ui/progress/variants.d.ts +1 -1
- package/dist/ui/progress.js +10 -15
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/progress.mjs +4 -9
- package/dist/ui/progress.mjs.map +1 -1
- package/dist/ui/search/search-bar.d.ts +1 -1
- package/dist/ui/search/search-bar.d.ts.map +1 -1
- package/dist/ui/search/search-suggestion-list.d.ts.map +1 -1
- package/dist/ui/search/search-suggestion-utils.d.ts.map +1 -1
- package/dist/ui/search.js +15 -7
- package/dist/ui/search.js.map +1 -1
- package/dist/ui/search.mjs +11 -3
- package/dist/ui/search.mjs.map +1 -1
- package/dist/ui/select/select.d.ts +1 -1
- package/dist/ui/select/select.d.ts.map +1 -1
- package/dist/ui/select/types.d.ts +1 -0
- package/dist/ui/select/types.d.ts.map +1 -1
- package/dist/ui/select/variants.d.ts +4 -4
- package/dist/ui/select/variants.d.ts.map +1 -1
- package/dist/ui/select.js +145 -63
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/select.mjs +141 -59
- package/dist/ui/select.mjs.map +1 -1
- package/dist/ui/skeleton/animated/skeleton-animated.d.ts.map +1 -1
- package/dist/ui/skeleton/animated/types.d.ts.map +1 -1
- package/dist/ui/skeleton/animated.js +34 -10
- package/dist/ui/skeleton/animated.js.map +1 -1
- package/dist/ui/skeleton/animated.mjs +29 -5
- package/dist/ui/skeleton/animated.mjs.map +1 -1
- package/dist/ui/skeleton/variants.d.ts +3 -3
- package/dist/ui/skeleton.js +10 -10
- package/dist/ui/skeleton.mjs +2 -2
- package/dist/ui/slider/slider.d.ts.map +1 -1
- package/dist/ui/slider/types.d.ts +8 -2
- package/dist/ui/slider/types.d.ts.map +1 -1
- package/dist/ui/slider/variants.d.ts +1 -1
- package/dist/ui/slider.js +53 -17
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/slider.mjs +45 -9
- package/dist/ui/slider.mjs.map +1 -1
- package/dist/ui/spinner/animated/spinner.d.ts.map +1 -1
- package/dist/ui/spinner/animated/variants.d.ts +1 -1
- package/dist/ui/spinner/animated.js +68 -56
- package/dist/ui/spinner/animated.js.map +1 -1
- package/dist/ui/spinner/animated.mjs +64 -52
- package/dist/ui/spinner/animated.mjs.map +1 -1
- package/dist/ui/stepper/stepper.d.ts +2 -7
- package/dist/ui/stepper/stepper.d.ts.map +1 -1
- package/dist/ui/stepper/types.d.ts +3 -3
- package/dist/ui/stepper/types.d.ts.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 +12 -13
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/stepper.mjs +9 -10
- package/dist/ui/stepper.mjs.map +1 -1
- package/dist/ui/table/animated/index.d.ts +2 -2
- package/dist/ui/table/animated/index.d.ts.map +1 -1
- package/dist/ui/table/animated.js +9 -9
- package/dist/ui/table/animated.mjs +3 -3
- package/dist/ui/table/table-base.d.ts +1 -1
- package/dist/ui/table/table-base.d.ts.map +1 -1
- package/dist/ui/table/types.d.ts +5 -1
- package/dist/ui/table/types.d.ts.map +1 -1
- package/dist/ui/table/variants.d.ts +3 -3
- package/dist/ui/table.js +15 -15
- package/dist/ui/table.mjs +2 -2
- package/dist/ui/tabs/animated/animations.d.ts.map +1 -1
- package/dist/ui/tabs/animated/index.d.ts +1 -1
- package/dist/ui/tabs/animated/index.d.ts.map +1 -1
- package/dist/ui/tabs/animated/types.d.ts.map +1 -1
- package/dist/ui/tabs/animated.js +4 -4
- package/dist/ui/tabs/animated.js.map +1 -1
- package/dist/ui/tabs/animated.mjs +2 -2
- package/dist/ui/tabs/animated.mjs.map +1 -1
- package/dist/ui/tabs/index.d.ts +1 -1
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/tabs-base.d.ts.map +1 -1
- package/dist/ui/tabs/tabs.d.ts +1 -1
- package/dist/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/ui/tabs/types.d.ts +2 -1
- package/dist/ui/tabs/types.d.ts.map +1 -1
- package/dist/ui/tabs/variants.d.ts +1 -1
- package/dist/ui/tabs.js +10 -10
- package/dist/ui/tabs.mjs +2 -2
- package/dist/ui/toast/animated/toast-animated.d.ts.map +1 -1
- package/dist/ui/toast/animated.js +12 -10
- package/dist/ui/toast/animated.js.map +1 -1
- package/dist/ui/toast/animated.mjs +5 -3
- package/dist/ui/toast/animated.mjs.map +1 -1
- package/dist/ui/toast/types.d.ts.map +1 -1
- package/dist/ui/toast/variants.d.ts +1 -1
- package/dist/ui/toast.js +13 -13
- package/dist/ui/toast.mjs +2 -2
- package/dist/ui/toggle/animated/index.d.ts +2 -2
- package/dist/ui/toggle/animated/index.d.ts.map +1 -1
- package/dist/ui/toggle/animated/types.d.ts.map +1 -1
- package/dist/ui/toggle/animated.js +3 -3
- package/dist/ui/toggle/animated.mjs +1 -1
- package/dist/ui/toggle/index.d.ts +1 -1
- package/dist/ui/toggle/index.d.ts.map +1 -1
- package/dist/ui/toggle/toggle-base.d.ts.map +1 -1
- package/dist/ui/toggle/variants.d.ts +1 -1
- package/dist/ui/toggle.js +31 -6
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/toggle.mjs +30 -5
- package/dist/ui/toggle.mjs.map +1 -1
- package/dist/ui/tooltip/animated/animations.d.ts.map +1 -1
- package/dist/ui/tooltip/animated/types.d.ts.map +1 -1
- package/dist/ui/tooltip/animated.js +5 -5
- package/dist/ui/tooltip/animated.js.map +1 -1
- package/dist/ui/tooltip/animated.mjs +2 -2
- package/dist/ui/tooltip/animated.mjs.map +1 -1
- package/dist/ui/tooltip/tooltip-base.d.ts.map +1 -1
- package/dist/ui/tooltip/types.d.ts +1 -0
- package/dist/ui/tooltip/types.d.ts.map +1 -1
- package/dist/ui/tooltip/variants.d.ts +1 -1
- package/dist/ui/tooltip/variants.d.ts.map +1 -1
- package/dist/ui/tooltip.js +8 -8
- package/dist/ui/tooltip.mjs +2 -2
- package/dist/ui/typography/blockquote-base.d.ts.map +1 -1
- package/dist/ui/typography/code-block-base.d.ts.map +1 -1
- package/dist/ui/typography/heading-base.d.ts.map +1 -1
- package/dist/ui/typography/list-base.d.ts.map +1 -1
- package/dist/ui/typography/types.d.ts.map +1 -1
- package/dist/ui/typography/variants.d.ts +3 -3
- package/dist/ui/typography/variants.d.ts.map +1 -1
- package/dist/ui/typography.js +21 -43
- package/dist/ui/typography.js.map +1 -1
- package/dist/ui/typography.mjs +13 -35
- package/dist/ui/typography.mjs.map +1 -1
- package/package.json +32 -12
- package/src/charts/area/Area.tsx +103 -0
- package/src/charts/area/index.ts +9 -0
- package/src/charts/bar/Bar.tsx +94 -0
- package/src/charts/bar/index.ts +9 -0
- package/src/charts/bubble/Bubble.tsx +113 -0
- package/src/charts/bubble/index.ts +9 -0
- package/src/charts/line/Line.tsx +97 -0
- package/src/charts/line/index.ts +9 -0
- package/src/charts/shared/chart-frame.tsx +107 -0
- package/src/charts/shared/colors.ts +31 -0
- package/src/charts/shared/types.ts +60 -0
- package/src/charts/shared/variants.ts +87 -0
- package/src/hooks/index.ts +8 -2
- package/src/hooks/useClickOutside/useClickOutside.ts +1 -4
- package/src/hooks/useClipboard/useClipboard.test.ts +3 -1
- package/src/hooks/useClipboard/useClipboard.ts +1 -2
- package/src/hooks/useDisclosure/useDisclosure.test.ts +1 -2
- package/src/hooks/useDocumentTitle/useDocumentTitle.test.ts +1 -3
- package/src/hooks/useFocusManagement/useFocusManagement.test.tsx +8 -0
- package/src/hooks/useFocusManagement/useFocusManagement.ts +162 -34
- package/src/hooks/useInView/useInView.test.ts +6 -1
- package/src/hooks/useLocalStorage/index.ts +1 -4
- package/src/hooks/useLocalStorage/useLocalStorage.test.ts +8 -20
- package/src/hooks/useLocalStorage/useLocalStorage.ts +4 -4
- package/src/hooks/useMediaQuery/useMediaQuery.ts +1 -4
- package/src/hooks/usePrefersReducedMotion/usePrefersReducedMotion.test.ts +3 -1
- package/src/hooks/useResizeObserver/index.ts +1 -4
- package/src/hooks/useSessionStorage/useSessionStorage.test.ts +2 -6
- package/src/hooks/useSessionStorage/useSessionStorage.ts +4 -2
- package/src/hooks/useThrottledCallback/useThrottledCallback.ts +4 -3
- package/src/hooks/useWindowSize/useWindowSize.ts +4 -1
- package/src/lib/utils.ts +3 -3
- package/src/ui/accordion/accordion.tsx +6 -1
- package/src/ui/accordion/animated/accordion-content-animated.tsx +1 -4
- package/src/ui/accordion/animated/index.ts +4 -1
- package/src/ui/accordion/animated/types.ts +6 -2
- package/src/ui/accordion/variants.ts +9 -9
- package/src/ui/alert/alert-base.tsx +6 -1
- package/src/ui/alert/alert.tsx +2 -2
- package/src/ui/alert/animated/index.ts +2 -2
- package/src/ui/alert/animated/types.ts +1 -1
- package/src/ui/alert/types.ts +1 -3
- package/src/ui/alert/variants.ts +9 -9
- package/src/ui/avatar/animated/index.ts +6 -2
- package/src/ui/avatar/avatar-base.tsx +2 -7
- package/src/ui/avatar/avatar.tsx +6 -1
- package/src/ui/avatar/variants.ts +23 -11
- package/src/ui/badge/animated/index.ts +6 -2
- package/src/ui/badge/animated/types.ts +1 -2
- package/src/ui/badge/badge-base.tsx +4 -1
- package/src/ui/badge/types.ts +1 -0
- package/src/ui/badge/variants.ts +16 -18
- package/src/ui/breadcrumb/breadcrumb.tsx +10 -2
- package/src/ui/breadcrumb/types.ts +20 -9
- package/src/ui/breadcrumb/variants.ts +34 -38
- package/src/ui/buttons/animated/index.ts +7 -1
- package/src/ui/buttons/animated/types.ts +0 -1
- package/src/ui/buttons/button.test.tsx +2 -2
- package/src/ui/buttons/types.ts +4 -5
- package/src/ui/buttons/variants.ts +17 -17
- package/src/ui/card/animated/types.ts +0 -1
- package/src/ui/card/card-base.tsx +1 -6
- package/src/ui/card/card.test.tsx +7 -3
- package/src/ui/card/card.tsx +1 -3
- package/src/ui/card/index.ts +7 -3
- package/src/ui/card/types.ts +1 -1
- package/src/ui/card/variants.ts +9 -9
- package/src/ui/divider/animated/index.ts +5 -1
- package/src/ui/divider/animated/types.ts +4 -2
- package/src/ui/divider/divider-base.tsx +0 -1
- package/src/ui/drawer/animated/drawer-content-animated.tsx +6 -11
- package/src/ui/drawer/animated/index.ts +6 -1
- package/src/ui/drawer/drawer-base.tsx +16 -8
- package/src/ui/drawer/types.ts +12 -3
- package/src/ui/drawer/variants.ts +18 -18
- package/src/ui/dropdown/dropdown.test.tsx +1 -3
- package/src/ui/dropdown/dropdown.tsx +30 -5
- package/src/ui/dropdown/types.ts +1 -0
- package/src/ui/dropdown/variants.ts +20 -20
- package/src/ui/empty-state/animated/empty-state-animated.tsx +2 -4
- package/src/ui/empty-state/animated/index.ts +8 -5
- package/src/ui/empty-state/empty-state-base.tsx +14 -2
- package/src/ui/empty-state/index.ts +7 -1
- package/src/ui/empty-state/types.ts +1 -0
- package/src/ui/file-upload/file-upload.tsx +3 -9
- package/src/ui/file-upload/variants.ts +18 -9
- package/src/ui/inputs/animated/index.ts +7 -1
- package/src/ui/inputs/input-base.tsx +60 -6
- package/src/ui/inputs/input.test.tsx +5 -1
- package/src/ui/inputs/types.ts +7 -2
- package/src/ui/modal/animated/index.ts +6 -1
- package/src/ui/modal/animated/modal-content-animated.tsx +4 -5
- package/src/ui/modal/index.ts +1 -1
- package/src/ui/modal/modal-base.tsx +19 -10
- package/src/ui/modal/modal.test.tsx +44 -4
- package/src/ui/modal/modal.tsx +1 -1
- package/src/ui/modal/types.ts +10 -2
- package/src/ui/modal/variants.ts +18 -18
- package/src/ui/pagination/pagination.tsx +2 -2
- package/src/ui/pagination/variants.ts +9 -9
- package/src/ui/progress/animated/progress-animated.tsx +43 -5
- package/src/ui/progress/animated/types.ts +1 -1
- package/src/ui/progress/index.ts +12 -2
- package/src/ui/progress/progress-base.tsx +61 -5
- package/src/ui/progress/progress.test.tsx +1 -3
- package/src/ui/progress/progress.tsx +2 -6
- package/src/ui/progress/types.ts +3 -0
- package/src/ui/search/filter-search-suggestions.test.ts +46 -12
- package/src/ui/search/filter-search-suggestions.ts +3 -3
- package/src/ui/search/search-bar.tsx +22 -22
- package/src/ui/search/search-suggestion-list.tsx +14 -5
- package/src/ui/search/search-suggestion-utils.ts +4 -1
- package/src/ui/select/select.tsx +96 -6
- package/src/ui/select/types.ts +1 -0
- package/src/ui/select/variants.ts +71 -68
- package/src/ui/skeleton/animated/skeleton-animated.tsx +25 -4
- package/src/ui/skeleton/animated/types.ts +0 -1
- package/src/ui/skeleton/skeleton-base.tsx +3 -3
- package/src/ui/skeleton/variants.ts +9 -9
- package/src/ui/slider/slider.test.tsx +23 -9
- package/src/ui/slider/slider.tsx +45 -4
- package/src/ui/slider/types.ts +9 -3
- package/src/ui/slider/variants.ts +1 -1
- package/src/ui/spinner/animated/spinner.tsx +6 -3
- package/src/ui/stepper/stepper.test.tsx +5 -6
- package/src/ui/stepper/stepper.tsx +12 -16
- package/src/ui/stepper/types.ts +11 -5
- package/src/ui/stepper/variants.ts +30 -15
- package/src/ui/table/animated/index.ts +6 -4
- package/src/ui/table/table-base.tsx +32 -11
- package/src/ui/table/types.ts +8 -1
- package/src/ui/tabs/animated/animations.ts +5 -1
- package/src/ui/tabs/animated/index.ts +7 -1
- package/src/ui/tabs/animated/types.ts +3 -3
- package/src/ui/tabs/index.ts +8 -1
- package/src/ui/tabs/tabs-base.tsx +71 -10
- package/src/ui/tabs/tabs.tsx +8 -1
- package/src/ui/tabs/types.ts +2 -1
- package/src/ui/tabs/variants.ts +10 -10
- package/src/ui/toast/animated/toast-animated.tsx +3 -1
- package/src/ui/toast/animated/types.ts +1 -1
- package/src/ui/toast/toast-base.tsx +1 -1
- package/src/ui/toast/types.ts +3 -1
- package/src/ui/toast/variants.ts +9 -9
- package/src/ui/toggle/animated/index.ts +7 -4
- package/src/ui/toggle/animated/types.ts +4 -2
- package/src/ui/toggle/index.ts +5 -1
- package/src/ui/toggle/toggle-base.tsx +36 -4
- package/src/ui/tooltip/animated/animations.ts +0 -1
- package/src/ui/tooltip/animated/types.ts +0 -1
- package/src/ui/tooltip/tooltip-base.tsx +118 -22
- package/src/ui/tooltip/types.ts +1 -0
- package/src/ui/tooltip/variants.ts +11 -13
- package/src/ui/typography/blockquote-base.tsx +1 -8
- package/src/ui/typography/code-block-base.tsx +19 -24
- package/src/ui/typography/heading-base.tsx +35 -38
- package/src/ui/typography/inline-code-base.tsx +15 -15
- package/src/ui/typography/list-base.tsx +1 -9
- package/src/ui/typography/text-base.tsx +32 -32
- package/src/ui/typography/types.ts +4 -17
- package/src/ui/typography/typography.test.tsx +3 -1
- package/src/ui/typography/variants.ts +16 -8
- package/dist/chunk-2P3UU2J3.mjs.map +0 -1
- package/dist/chunk-2PQEXQVR.js.map +0 -1
- package/dist/chunk-3OR47XMY.js.map +0 -1
- package/dist/chunk-4B7KGBQB.js.map +0 -1
- package/dist/chunk-5QB2KNZQ.js.map +0 -1
- package/dist/chunk-6I7X5BF2.js.map +0 -1
- package/dist/chunk-7HL3A4YF.mjs.map +0 -1
- package/dist/chunk-BITDSQMR.js.map +0 -1
- package/dist/chunk-BORK3BJO.mjs.map +0 -1
- package/dist/chunk-BSWYZTYK.js.map +0 -1
- package/dist/chunk-BVXTOEBI.mjs.map +0 -1
- package/dist/chunk-C2FCPQTO.js.map +0 -1
- package/dist/chunk-CY5BQKRZ.mjs.map +0 -1
- package/dist/chunk-E3DZNJAD.js.map +0 -1
- package/dist/chunk-FLILFCQE.mjs.map +0 -1
- package/dist/chunk-FT2LMA66.mjs.map +0 -1
- package/dist/chunk-IXDJ3IPG.mjs.map +0 -1
- package/dist/chunk-LVUPECBT.mjs.map +0 -1
- package/dist/chunk-N4NO3SYL.js.map +0 -1
- package/dist/chunk-P5HUBXUX.js.map +0 -1
- package/dist/chunk-PGH27VTL.mjs.map +0 -1
- package/dist/chunk-RDSPHBHK.mjs.map +0 -1
- package/dist/chunk-U4YQCAXW.js.map +0 -1
- package/dist/chunk-UBFKTC2P.mjs.map +0 -1
- package/dist/chunk-UOFTZKMM.js.map +0 -1
- package/dist/chunk-WDCIZHXY.mjs.map +0 -1
- package/dist/chunk-WL5I7RVS.mjs +0 -54
- package/dist/chunk-WL5I7RVS.mjs.map +0 -1
- package/dist/chunk-WP7GYBRI.js.map +0 -1
- package/dist/chunk-WZKGRU3U.js.map +0 -1
- package/dist/chunk-XIXF7UVM.mjs.map +0 -1
- package/dist/chunk-XLAFQ24R.js.map +0 -1
- package/dist/chunk-XWM2S6VV.mjs.map +0 -1
- package/dist/chunk-YNCD6TKE.mjs.map +0 -1
- package/dist/chunk-YPLVTUYL.js +0 -56
- package/dist/chunk-YPLVTUYL.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,15 +6,16 @@ A React UI kit for building product interfaces with Tailwind CSS. Components are
|
|
|
6
6
|
|
|
7
7
|
The library targets **React 18+** apps that use **Tailwind CSS v4** (or an equivalent setup where Tailwind can scan this package via `@source`). Styling uses utility classes; **class-variance-authority** powers variant APIs (size, appearance, and similar props), with **clsx** and **tailwind-merge** for predictable `className` composition. **Framer Motion** backs motion where a feature ships animated variants, and **react-icons** is used for iconography where applicable.
|
|
8
8
|
|
|
9
|
-
Published artifacts live under `dist/`. Imports use **per-entry subpaths**: `@zentauri-ui/zentauri-components/ui/<area>` for static UI, `@zentauri-ui/zentauri-components/ui/<area>/animated` where a motion bundle exists, and `@zentauri-ui/zentauri-components/hooks/<entry>` for React hooks (and shared helpers under `hooks/utils`). Base UI entries do **not** re-export animated components; motion lives on its own entry so optional `framer-motion` usage stays tree-shakeable and chunk-friendly. Each entry resolves to its own ESM (`.mjs`), CJS (`.js`), and types (`.d.ts`) so bundlers pull only what you import. Most apps rely on Tailwind scanning the package sources (see installation); a separate CSS import is not required for that setup.
|
|
9
|
+
Published artifacts live under `dist/`. Imports use **per-entry subpaths**: `@zentauri-ui/zentauri-components/ui/<area>` for static UI, `@zentauri-ui/zentauri-components/ui/<area>/animated` where a motion bundle exists, `@zentauri-ui/zentauri-components/charts/<type>` for Recharts-powered chart primitives, and `@zentauri-ui/zentauri-components/hooks/<entry>` for React hooks (and shared helpers under `hooks/utils`). Base UI entries do **not** re-export animated components; motion lives on its own entry so optional `framer-motion` usage stays tree-shakeable and chunk-friendly. Each entry resolves to its own ESM (`.mjs`), CJS (`.js`), and types (`.d.ts`) so bundlers pull only what you import. Most apps rely on Tailwind scanning the package sources (see installation); a separate CSS import is not required for that setup.
|
|
10
10
|
|
|
11
11
|
## Package exports
|
|
12
12
|
|
|
13
|
-
| Subpath
|
|
14
|
-
|
|
|
15
|
-
| `@zentauri-ui/zentauri-components/ui/<name>`
|
|
16
|
-
| `@zentauri-ui/zentauri-components/ui/<name>/animated` | Motion entry for that area when published: animated components, motion presets, and related types (depends on **framer-motion**).
|
|
17
|
-
| `@zentauri-ui/zentauri-components/
|
|
13
|
+
| Subpath | Description |
|
|
14
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `@zentauri-ui/zentauri-components/ui/<name>` | Single UI area: static primitives, compound parts, variants, and types. Does **not** include Framer Motion–based animated exports. |
|
|
16
|
+
| `@zentauri-ui/zentauri-components/ui/<name>/animated` | Motion entry for that area when published: animated components, motion presets, and related types (depends on **framer-motion**). |
|
|
17
|
+
| `@zentauri-ui/zentauri-components/charts/<type>` | Responsive Recharts chart entry for `area`, `bar`, `bubble`, or `line`, with shared variants, palettes, and exported chart prop types. |
|
|
18
|
+
| `@zentauri-ui/zentauri-components/hooks/<entry>` | One hook module or `utils` (`cn`, `clampPage`, `range` from `src/lib/utils.ts`). Entries match files under `src/hooks/` (see **React hooks**). |
|
|
18
19
|
|
|
19
20
|
The UI `<name>` segment matches the folder under `src/ui/` (for example `accordion`, `select`, `empty-state`, `buttons` for `Button`, `inputs` for `Input`, `typography` for `Heading` / `Text` and related primitives). The hooks `<entry>` is the file stem (for example `useMediaQuery`, `usePagination`) or `utils`.
|
|
20
21
|
|
|
@@ -23,7 +24,7 @@ Only a subset of UI areas publish a `/animated` entry (see **Components**). Some
|
|
|
23
24
|
## Animated components (`ui/<name>/animated`)
|
|
24
25
|
|
|
25
26
|
- **Why a separate subpath:** animated modules import **framer-motion**. Keeping them on `…/ui/<name>/animated` avoids pulling motion into pages that only use the static `…/ui/<name>` entry and keeps server/client boundaries predictable in app routers.
|
|
26
|
-
- **When to install `framer-motion`:** add it when your app imports any `@zentauri-ui/zentauri-components/ui/*/animated` path (see **Optional: animations and
|
|
27
|
+
- **When to install `framer-motion`:** add it when your app imports any `@zentauri-ui/zentauri-components/ui/*/animated` path (see **Optional: animations, icons, and charts** under installation).
|
|
27
28
|
|
|
28
29
|
Published motion entries (same `<name>` as the base UI folder):
|
|
29
30
|
|
|
@@ -38,38 +39,39 @@ Published motion entries (same `<name>` as the base UI folder):
|
|
|
38
39
|
|
|
39
40
|
## Components
|
|
40
41
|
|
|
41
|
-
Import static primitives from `@zentauri-ui/zentauri-components/ui/<subpath>` when the **Base** column lists a path. When the **Animated** column lists a path, motion components and preset helpers come from `@zentauri-ui/zentauri-components/ui/<subpath>/animated` (they are not exported from the base entry). **Spinner** has no static bundle—use only the animated subpath.
|
|
42
|
-
|
|
43
|
-
| Area
|
|
44
|
-
|
|
|
45
|
-
| Accordion
|
|
46
|
-
| Alert
|
|
47
|
-
| Avatar
|
|
48
|
-
| Badge
|
|
49
|
-
| Breadcrumb
|
|
50
|
-
| Button
|
|
51
|
-
| Card
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
42
|
+
Import static primitives from `@zentauri-ui/zentauri-components/ui/<subpath>` when the **Base** column lists a path. Charts use `@zentauri-ui/zentauri-components/charts/<type>`. When the **Animated** column lists a path, motion components and preset helpers come from `@zentauri-ui/zentauri-components/ui/<subpath>/animated` (they are not exported from the base entry). **Spinner** has no static bundle—use only the animated subpath.
|
|
43
|
+
|
|
44
|
+
| Area | Base subpath | Animated subpath `…/ui/…/animated` |
|
|
45
|
+
| ----------- | --------------- | ---------------------------------- |
|
|
46
|
+
| Accordion | `accordion` | `accordion/animated` |
|
|
47
|
+
| Alert | `alert` | `alert/animated` |
|
|
48
|
+
| Avatar | `avatar` | `avatar/animated` |
|
|
49
|
+
| Badge | `badge` | `badge/animated` |
|
|
50
|
+
| Breadcrumb | `breadcrumb` | — |
|
|
51
|
+
| Button | `buttons` | `buttons/animated` |
|
|
52
|
+
| Card | `card` | `card/animated` |
|
|
53
|
+
| Charts | `charts/<type>` | — |
|
|
54
|
+
| Divider | `divider` | `divider/animated` |
|
|
55
|
+
| Drawer | `drawer` | `drawer/animated` |
|
|
56
|
+
| Dropdown | `dropdown` | — |
|
|
57
|
+
| Empty state | `empty-state` | `empty-state/animated` |
|
|
58
|
+
| File upload | `file-upload` | — |
|
|
59
|
+
| Input | `inputs` | `inputs/animated` |
|
|
60
|
+
| Modal | `modal` | `modal/animated` |
|
|
61
|
+
| Pagination | `pagination` | — |
|
|
62
|
+
| Progress | `progress` | `progress/animated` |
|
|
63
|
+
| Search | `search` | - |
|
|
64
|
+
| Select | `select` | — |
|
|
65
|
+
| Skeleton | `skeleton` | `skeleton/animated` |
|
|
66
|
+
| Slider | `slider` | — |
|
|
67
|
+
| Spinner | — | `spinner/animated` |
|
|
68
|
+
| Stepper | `stepper` | — |
|
|
69
|
+
| Table | `table` | `table/animated` |
|
|
70
|
+
| Tabs | `tabs` | `tabs/animated` |
|
|
71
|
+
| Toast | `toast` | `toast/animated` |
|
|
72
|
+
| Toggle | `toggle` | `toggle/animated` |
|
|
73
|
+
| Tooltip | `tooltip` | `tooltip/animated` |
|
|
74
|
+
| Typography | `typography` | — |
|
|
73
75
|
|
|
74
76
|
## Typography
|
|
75
77
|
|
|
@@ -110,8 +112,7 @@ export function ArticleIntro() {
|
|
|
110
112
|
Feature title
|
|
111
113
|
</Heading>
|
|
112
114
|
<Text as="p" size="sm" tone="muted">
|
|
113
|
-
Supporting copy with
|
|
114
|
-
<InlineCode tone="accent">inline code</InlineCode>.
|
|
115
|
+
Supporting copy with <InlineCode tone="accent">inline code</InlineCode>.
|
|
115
116
|
</Text>
|
|
116
117
|
<List marker="disc" tone="default">
|
|
117
118
|
<List.Item>First item</List.Item>
|
|
@@ -132,38 +133,80 @@ export function ArticleIntro() {
|
|
|
132
133
|
}
|
|
133
134
|
```
|
|
134
135
|
|
|
136
|
+
## Charts
|
|
137
|
+
|
|
138
|
+
Import the chart you need from `@zentauri-ui/zentauri-components/charts/<type>`, or vendor it with `zentauri-components add charts/<type>`. It is built on **Recharts**, so install `recharts` when you use these entries.
|
|
139
|
+
|
|
140
|
+
**Components:** `AreaChart`, `BarChart`, `BubbleChart`, `LineChart`.
|
|
141
|
+
|
|
142
|
+
**Types:** `AreaChartProps`, `BarChartProps`, `BubbleChartProps`, `LineChartProps`, plus shared `ChartSeries`, `ChartDatum`, `ChartColor`, `ChartMargin`, and `ChartSharedStatic`.
|
|
143
|
+
|
|
144
|
+
**Chart entries:** `charts/area`, `charts/bar`, `charts/bubble`, `charts/line`.
|
|
145
|
+
|
|
146
|
+
**Variants:** `appearance` (`default`, `muted`, `outline`, `glass`) and `density` (`compact`, `comfortable`, `spacious`). Color presets are exported via `chartPalette` and `chartColorValues`.
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
import {
|
|
150
|
+
AreaChart,
|
|
151
|
+
type ChartSeries,
|
|
152
|
+
} from "@zentauri-ui/zentauri-components/charts/area";
|
|
153
|
+
|
|
154
|
+
const data = [
|
|
155
|
+
{ month: "Jan", revenue: 4200, signups: 240 },
|
|
156
|
+
{ month: "Feb", revenue: 5100, signups: 280 },
|
|
157
|
+
{ month: "Mar", revenue: 6800, signups: 360 },
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
const series: ChartSeries[] = [
|
|
161
|
+
{ dataKey: "revenue", name: "Revenue", color: "cyan" },
|
|
162
|
+
{ dataKey: "signups", name: "Signups", color: "emerald" },
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
export function RevenueChart() {
|
|
166
|
+
return (
|
|
167
|
+
<AreaChart
|
|
168
|
+
xKey="month"
|
|
169
|
+
data={data}
|
|
170
|
+
series={series}
|
|
171
|
+
appearance="outline"
|
|
172
|
+
showLegend
|
|
173
|
+
/>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
135
178
|
## React hooks
|
|
136
179
|
|
|
137
180
|
Hooks live in `src/hooks/`. Each hook is a separate published entry under `@zentauri-ui/zentauri-components/hooks/<name>` (same pattern as UI areas). Types are exported where the implementation defines them (for example `UseDisclosureResult`, `PaginationPageItem`). For class-name merging and pagination helpers used alongside hooks, import from `@zentauri-ui/zentauri-components/hooks/utils`.
|
|
138
181
|
|
|
139
|
-
| Hook / module
|
|
140
|
-
|
|
|
141
|
-
| `useBodyScrollLock`
|
|
142
|
-
| `useClickOutside`
|
|
143
|
-
| `useClipboard`
|
|
144
|
-
| `useControllableState`
|
|
145
|
-
| `useDebouncedValue`
|
|
146
|
-
| `useDisclosure`
|
|
147
|
-
| `useDocumentTitle`
|
|
148
|
-
| `useFocusManagement`
|
|
149
|
-
| `useHover`
|
|
150
|
-
| `useInView`
|
|
151
|
-
| `useIntersectionObserver`
|
|
152
|
-
| `useIsomorphicLayoutEffect
|
|
153
|
-
| `useIsMounted`
|
|
154
|
-
| `useLocalStorage`
|
|
155
|
-
| `useMediaQuery`
|
|
156
|
-
| `useNetworkStatus`
|
|
157
|
-
| `usePageVisibility`
|
|
158
|
-
| `usePagination`
|
|
159
|
-
| `usePrefersColorScheme`
|
|
160
|
-
| `usePrefersReducedMotion`
|
|
161
|
-
| `useResizeObserver`
|
|
162
|
-
| `useSessionStorage`
|
|
163
|
-
| `useThrottledCallback`
|
|
164
|
-
| `useToggle`
|
|
165
|
-
| `useWindowSize`
|
|
166
|
-
| `cn`, `clampPage`, `range`
|
|
182
|
+
| Hook / module | Subpath `…/hooks/…` | Notes (selected exports) |
|
|
183
|
+
| --------------------------- | --------------------------- | -------------------------------------------------------------------------- |
|
|
184
|
+
| `useBodyScrollLock` | `useBodyScrollLock` | Locks document scroll while open |
|
|
185
|
+
| `useClickOutside` | `useClickOutside` | `ClickOutsideEventType`, `UseClickOutsideParams` |
|
|
186
|
+
| `useClipboard` | `useClipboard` | `UseClipboardResult` |
|
|
187
|
+
| `useControllableState` | `useControllableState` | `UseControllableStateParams` |
|
|
188
|
+
| `useDebouncedValue` | `useDebouncedValue` | Debounced state from a value |
|
|
189
|
+
| `useDisclosure` | `useDisclosure` | `UseDisclosureParams`, `UseDisclosureResult` |
|
|
190
|
+
| `useDocumentTitle` | `useDocumentTitle` | `UseDocumentTitleParams` |
|
|
191
|
+
| `useFocusManagement` | `useFocusManagement` | Focus trap / focus moves for overlays |
|
|
192
|
+
| `useHover` | `useHover` | Pointer hover state |
|
|
193
|
+
| `useInView` | `useInView` | `UseInViewParams` |
|
|
194
|
+
| `useIntersectionObserver` | `useIntersectionObserver` | `UseIntersectionObserverParams` |
|
|
195
|
+
| `useIsomorphicLayoutEffect` | `useIsomorphicLayoutEffect` | `useLayoutEffect` safe for SSR |
|
|
196
|
+
| `useIsMounted` | `useIsMounted` | Ref / flag after mount |
|
|
197
|
+
| `useLocalStorage` | `useLocalStorage` | `UseLocalStorageResult` |
|
|
198
|
+
| `useMediaQuery` | `useMediaQuery` | Match CSS media queries |
|
|
199
|
+
| `useNetworkStatus` | `useNetworkStatus` | Online / offline |
|
|
200
|
+
| `usePageVisibility` | `usePageVisibility` | Document visibility API |
|
|
201
|
+
| `usePagination` | `usePagination` | `buildPaginationItems`, `BuildPaginationItemsParams`, `PaginationPageItem` |
|
|
202
|
+
| `usePrefersColorScheme` | `usePrefersColorScheme` | `ColorSchemePreference` |
|
|
203
|
+
| `usePrefersReducedMotion` | `usePrefersReducedMotion` | `prefers-reduced-motion` |
|
|
204
|
+
| `useResizeObserver` | `useResizeObserver` | `ElementSize` |
|
|
205
|
+
| `useSessionStorage` | `useSessionStorage` | `UseSessionStorageResult` |
|
|
206
|
+
| `useThrottledCallback` | `useThrottledCallback` | Throttled callback ref |
|
|
207
|
+
| `useToggle` | `useToggle` | Boolean toggle state |
|
|
208
|
+
| `useWindowSize` | `useWindowSize` | `WindowSize` |
|
|
209
|
+
| `cn`, `clampPage`, `range` | `utils` | Shared helpers from `src/lib/utils.ts` |
|
|
167
210
|
|
|
168
211
|
#### Hook import example
|
|
169
212
|
|
|
@@ -215,23 +258,23 @@ pnpm add react react-dom class-variance-authority clsx tailwind-merge
|
|
|
215
258
|
yarn add react react-dom class-variance-authority clsx tailwind-merge
|
|
216
259
|
```
|
|
217
260
|
|
|
218
|
-
#### Optional: animations and
|
|
261
|
+
#### Optional: animations, icons, and charts
|
|
219
262
|
|
|
220
|
-
Add **`framer-motion`** when you import any `@zentauri-ui/zentauri-components/ui/<name>/animated` entry (including **Spinner**, which is only published under `ui/spinner/animated`). Add **`react-icons`** when using icon sets from that package.
|
|
263
|
+
Add **`framer-motion`** when you import any `@zentauri-ui/zentauri-components/ui/<name>/animated` entry (including **Spinner**, which is only published under `ui/spinner/animated`). Add **`react-icons`** when using icon sets from that package. Add **`recharts`** when you import any `@zentauri-ui/zentauri-components/charts/<type>` entry or vendor charts with the CLI.
|
|
221
264
|
|
|
222
265
|
```bash
|
|
223
|
-
npm install framer-motion react-icons
|
|
266
|
+
npm install framer-motion react-icons recharts
|
|
224
267
|
```
|
|
225
268
|
|
|
226
269
|
```bash
|
|
227
|
-
pnpm add framer-motion react-icons
|
|
270
|
+
pnpm add framer-motion react-icons recharts
|
|
228
271
|
```
|
|
229
272
|
|
|
230
273
|
```bash
|
|
231
|
-
yarn add framer-motion react-icons
|
|
274
|
+
yarn add framer-motion react-icons recharts
|
|
232
275
|
```
|
|
233
276
|
|
|
234
|
-
Published `dist/` files **import** these packages; they are **not** vendored inside `@zentauri-ui/zentauri-components`. Static `ui/<name>` bundles do not depend on `framer-motion`; only `ui/<name>/animated` entries do. Your app installs peers via `dependencies` where needed, and your bundler resolves them from `node_modules`.
|
|
277
|
+
Published `dist/` files **import** these packages; they are **not** vendored inside `@zentauri-ui/zentauri-components`. Static `ui/<name>` bundles do not depend on `framer-motion`; only `ui/<name>/animated` entries do. Chart bundles are isolated to `charts/<type>` entries and depend on `recharts`. Your app installs peers via `dependencies` where needed, and your bundler resolves them from `node_modules`.
|
|
235
278
|
|
|
236
279
|
### Next.js: smaller route chunks
|
|
237
280
|
|
|
@@ -243,7 +286,7 @@ import type { NextConfig } from "next";
|
|
|
243
286
|
|
|
244
287
|
const nextConfig: NextConfig = {
|
|
245
288
|
experimental: {
|
|
246
|
-
optimizePackageImports: ["framer-motion", "react-icons"],
|
|
289
|
+
optimizePackageImports: ["framer-motion", "react-icons", "recharts"],
|
|
247
290
|
},
|
|
248
291
|
};
|
|
249
292
|
|
|
@@ -292,6 +335,7 @@ import {
|
|
|
292
335
|
```tsx
|
|
293
336
|
import { useDisclosure } from "@zentauri-ui/zentauri-components/hooks/useDisclosure";
|
|
294
337
|
import { Button } from "@zentauri-ui/zentauri-components/ui/buttons";
|
|
338
|
+
import { AreaChart } from "@zentauri-ui/zentauri-components/charts/area";
|
|
295
339
|
```
|
|
296
340
|
|
|
297
341
|
#### Imports (animated / Framer Motion)
|
|
@@ -337,9 +381,9 @@ import { Spinner } from "@zentauri-ui/zentauri-components/ui/spinner/animated";
|
|
|
337
381
|
|
|
338
382
|
## CLI — copy component source into your app
|
|
339
383
|
|
|
340
|
-
The package ships a small **Node CLI** (`zentauri-components` and `zentauri-ui` point to the same `cli/index.mjs`) that copies **selected** folders from this package’s `src/ui` and `src/hooks` into your repository—similar to shadcn/ui. You keep the files, control paths via `components.json`, and imports are rewritten to your path aliases (`@/components/ui`, `@/hooks`, `@/lib/utils`, and so on).
|
|
384
|
+
The package ships a small **Node CLI** (`zentauri-components` and `zentauri-ui` point to the same `cli/index.mjs`) that copies **selected** folders from this package’s `src/ui`, `src/charts`, and `src/hooks` into your repository—similar to shadcn/ui. You keep the files, control paths via `components.json`, and imports are rewritten to your path aliases (`@/components/ui`, `@/hooks`, `@/lib/utils`, and so on).
|
|
341
385
|
|
|
342
|
-
Which UI folders are valid for `add` is driven by **`cli/registry.json`**: a generated manifest listing every addable directory name (matching `src/ui/<name>`) plus optional **`nameAliases`** so the CLI accepts friendly tokens (for example `button` → `buttons`).
|
|
386
|
+
Which UI folders are valid for `add` is driven by **`cli/registry.json`**: a generated manifest listing every addable directory name (matching `src/ui/<name>` plus chart entries like `src/charts/area`) plus optional **`nameAliases`** so the CLI accepts friendly tokens (for example `button` → `buttons`).
|
|
343
387
|
|
|
344
388
|
### Commands
|
|
345
389
|
|
|
@@ -348,6 +392,7 @@ Call the published binary by name after the package (recommended so `npx` does n
|
|
|
348
392
|
```bash
|
|
349
393
|
npx @zentauri-ui/zentauri-components init
|
|
350
394
|
npx @zentauri-ui/zentauri-components add buttons inputs
|
|
395
|
+
npx @zentauri-ui/zentauri-components add charts/area charts/line
|
|
351
396
|
npx @zentauri-ui/zentauri-components -h
|
|
352
397
|
```
|
|
353
398
|
|
|
@@ -373,11 +418,11 @@ node node_modules/@zentauri-ui/zentauri-components/cli/index.mjs add accordion
|
|
|
373
418
|
node node_modules/@zentauri-ui/zentauri-components/cli/index.mjs add hook useWindowSize
|
|
374
419
|
```
|
|
375
420
|
|
|
376
|
-
| Command
|
|
377
|
-
|
|
|
378
|
-
| `init`
|
|
379
|
-
| `add <names...>`
|
|
380
|
-
| `add hook <names...>` | Same config lookup; copies only **hook** folders listed under `registry.hooks` (from `hooksEntryNames` in `tsup.config.ts`), including transitive sibling-hook imports. Does not copy UI unless a hook’s imports require you to add a component separately (for example `usePagination` imports types from `ui/pagination`).
|
|
421
|
+
| Command | What it does |
|
|
422
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
423
|
+
| `init` | Writes **`components.json`** in the current working directory (or `--cwd`) with default `aliases` and `resolvedPaths`. Refuses to overwrite an existing file. |
|
|
424
|
+
| `add <names...>` | Walks up from `--cwd` (default `.`) to find `components.json`, then copies each resolved **UI** folder under `src/ui` or chart entry under `src/charts/<type>`, pulls in hooks those files depend on (including transitive hook imports), and creates **`lib/utils`** at `resolvedPaths.utils` from the package template if it is missing. |
|
|
425
|
+
| `add hook <names...>` | Same config lookup; copies only **hook** folders listed under `registry.hooks` (from `hooksEntryNames` in `tsup.config.ts`), including transitive sibling-hook imports. Does not copy UI unless a hook’s imports require you to add a component separately (for example `usePagination` imports types from `ui/pagination`). |
|
|
381
426
|
|
|
382
427
|
Global flags: `-h` / `--help`, `-v` / `--version`, `--cwd <dir>` (relative to `process.cwd()`).
|
|
383
428
|
|
|
@@ -402,7 +447,7 @@ Defaults look like this; edit `resolvedPaths` and `aliases` so they match your a
|
|
|
402
447
|
|
|
403
448
|
### Registry (`cli/registry.json`)
|
|
404
449
|
|
|
405
|
-
- **`components`**: sorted list of folder names under **`src/ui
|
|
450
|
+
- **`components`**: sorted list of folder names under **`src/ui/`**, plus chart entries from **`src/charts/<type>`**, that `add` may copy. The file is **generated**; the canonical build list lives in **`tsup.config.ts`** as `uiComponentNames` and `chartEntryNames`, and the generator always ensures **`spinner`** is included so the CLI stays aligned with the animated-only spinner bundle.
|
|
406
451
|
- **`hooks`**: sorted list of folder names under **`src/hooks/`** that `add hook` may copy; generated from **`hooksEntryNames`** in **`tsup.config.ts`** (same entries as published `…/hooks/<name>` subpaths).
|
|
407
452
|
- **`nameAliases`**: optional map from a CLI token to a real folder name. Today: `button` → `buttons`, `input` → `inputs` (matching common singular names while folders stay plural).
|
|
408
453
|
|
|
@@ -417,10 +462,10 @@ After `add`, imports inside copied `.ts`/`.tsx` files are rewritten using your `
|
|
|
417
462
|
|
|
418
463
|
### When to use the CLI vs npm imports
|
|
419
464
|
|
|
420
|
-
| Approach
|
|
421
|
-
|
|
|
422
|
-
| **`npm` + package `exports`** (earlier sections) | You want versioned dependencies, smallest app-owned surface, and tree-shaken `dist/` entries.
|
|
423
|
-
| **`init` / `add`**
|
|
465
|
+
| Approach | Best when |
|
|
466
|
+
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
|
|
467
|
+
| **`npm` + package `exports`** (earlier sections) | You want versioned dependencies, smallest app-owned surface, and tree-shaken `dist/` entries. |
|
|
468
|
+
| **`init` / `add`** | You want vendored source under your repo (customize primitives, match shadcn-style workflows, or lock file-level behavior). |
|
|
424
469
|
|
|
425
470
|
Tailwind still needs to see the classes your **copied** files use—point `@source` at those paths (for example your `src/components/ui`) rather than only at `node_modules/@zentauri-ui/zentauri-components` if you no longer rely on scanning the published package.
|
|
426
471
|
|
|
@@ -432,13 +477,14 @@ https://zentauri-ui.vercel.app/
|
|
|
432
477
|
|
|
433
478
|
From this package directory in the monorepo:
|
|
434
479
|
|
|
435
|
-
- `pnpm build` (or `npm run build`) — production bundle via `tsup` (Rollup treeshake + `scripts/prepend-use-client.mjs` via `onSuccess` so each UI entry under `dist/ui/`,
|
|
480
|
+
- `pnpm build` (or `npm run build`) — production bundle via `tsup` (Rollup treeshake + `scripts/prepend-use-client.mjs` via `onSuccess` so each UI entry under `dist/ui/`, the chart entry under `dist/charts/`, and `dist/ui/<name>/animated.*` starts with `"use client"` where needed)
|
|
436
481
|
- `pnpm dev` — `tsup` watch mode (same `onSuccess` hook after each rebuild)
|
|
437
482
|
- `pnpm test` / `pnpm test:watch` — **Vitest** and **Testing Library** unit tests // covered 300+ test cases in total
|
|
438
|
-
- **`pnpm run generate:registry`** — runs `scripts/generate-registry.mjs`, which reads **`uiComponentNames`** and **`hooksEntryNames`** from `tsup.config.ts`, merges in **`spinner`**, applies fixed **`nameAliases`**, and writes **`cli/registry.json`** (`components` + `hooks`). Run this after adding or renaming UI areas or hook entries so the CLI stays in sync (the script prints counts).
|
|
483
|
+
- **`pnpm run generate:registry`** — runs `scripts/generate-registry.mjs`, which reads **`uiComponentNames`** and **`hooksEntryNames`** from `tsup.config.ts`, merges in **`spinner`**, applies fixed **`nameAliases`**, and writes **`cli/registry.json`** (`components` + `hooks`). Run this after adding or renaming UI/chart areas or hook entries so the CLI stays in sync (the script prints counts).
|
|
439
484
|
- **`prepack`** — invokes `generate:registry` automatically before `npm pack` / publish so the published tarball always ships an up-to-date registry alongside `cli/index.mjs`.
|
|
440
485
|
|
|
441
486
|
## Github Release log
|
|
487
|
+
|
|
442
488
|
https://github.com/ShubhamTiwari909/zentauri-ui/releases
|
|
443
489
|
|
|
444
490
|
## NOTE:
|
package/cli/index.mjs
CHANGED
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
* ├── cli/index.mjs ← this file (entry when run via bin)
|
|
21
21
|
* ├── cli/registry.json ← list of installable component folder names
|
|
22
22
|
* └── src/ui/<name>/ ← source copied by `add`
|
|
23
|
+
* └── src/charts/<type>/ ← chart source copied by `add charts/area` etc.
|
|
23
24
|
* └── src/hooks/<name>/ ← hooks pulled in as dependencies
|
|
24
25
|
* └── src/lib/utils.ts ← template for `cn()` etc. if missing in app
|
|
25
26
|
* ```
|
|
26
27
|
*
|
|
27
28
|
* - **packageRoot**: directory of the published `components` package (parent of
|
|
28
|
-
* `cli/`). Used to read `registry.json`, `src/ui`, `src/hooks`, `src/lib`.
|
|
29
|
+
* `cli/`). Used to read `registry.json`, `src/ui`, `src/charts`, `src/hooks`, `src/lib`.
|
|
29
30
|
* - **configDir**: directory containing `components.json` (may differ from
|
|
30
31
|
* `--cwd` when the config is found by walking up from `cwd`).
|
|
31
32
|
*
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
copyFile,
|
|
89
90
|
readdir,
|
|
90
91
|
} from "node:fs/promises";
|
|
91
|
-
import { dirname, join, relative } from "node:path";
|
|
92
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
92
93
|
import { fileURLToPath } from "node:url";
|
|
93
94
|
import { parseArgs } from "node:util";
|
|
94
95
|
|
|
@@ -102,7 +103,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
102
103
|
|
|
103
104
|
/**
|
|
104
105
|
* Root of the components package (`…/packages/components`), i.e. parent of `cli/`.
|
|
105
|
-
* All reads from `src/ui`, `src/hooks`, `registry.json`, and `package.json` are
|
|
106
|
+
* All reads from `src/ui`, `src/charts`, `src/hooks`, `registry.json`, and `package.json` are
|
|
106
107
|
* relative to this path — not the consumer’s project root.
|
|
107
108
|
*/
|
|
108
109
|
const packageRoot = join(__dirname, "..");
|
|
@@ -189,7 +190,9 @@ If npx does not pick the right binary:
|
|
|
189
190
|
* isTestFile("foo.test.utils.ts"); // true (substring ".test.")
|
|
190
191
|
*/
|
|
191
192
|
function isTestFile(name) {
|
|
192
|
-
return
|
|
193
|
+
return (
|
|
194
|
+
/\.(?:test|spec)\.(?:tsx?|jsx?)$/.test(name) || name.includes(".test.")
|
|
195
|
+
);
|
|
193
196
|
}
|
|
194
197
|
|
|
195
198
|
/**
|
|
@@ -303,7 +306,11 @@ function validateConfig(cfg) {
|
|
|
303
306
|
"components.json must define aliases.utils, aliases.hooks, and aliases.ui",
|
|
304
307
|
);
|
|
305
308
|
}
|
|
306
|
-
if (
|
|
309
|
+
if (
|
|
310
|
+
!cfg.resolvedPaths?.ui ||
|
|
311
|
+
!cfg.resolvedPaths?.utils ||
|
|
312
|
+
!cfg.resolvedPaths?.hooks
|
|
313
|
+
) {
|
|
307
314
|
throw new Error(
|
|
308
315
|
"components.json must define resolvedPaths.ui, resolvedPaths.utils, and resolvedPaths.hooks",
|
|
309
316
|
);
|
|
@@ -312,7 +319,7 @@ function validateConfig(cfg) {
|
|
|
312
319
|
|
|
313
320
|
/**
|
|
314
321
|
* Maps CLI input (any casing, optional registry alias) to a canonical folder name
|
|
315
|
-
* under `src/ui/<name>`
|
|
322
|
+
* under `src/ui/<name>` or `src/charts/<type>`.
|
|
316
323
|
*
|
|
317
324
|
* Resolution order:
|
|
318
325
|
* 1. Exact key in `registry.nameAliases`
|
|
@@ -416,12 +423,12 @@ async function collectHookTransitiveClosure(packageRoot, seedHooks) {
|
|
|
416
423
|
}
|
|
417
424
|
|
|
418
425
|
/**
|
|
419
|
-
* Copies `packageRoot/src/ui/<componentName>` into
|
|
426
|
+
* Copies `packageRoot/src/ui/<componentName>` or `packageRoot/src/charts/<type>` into
|
|
420
427
|
* `<configDir>/<resolvedPaths.ui>/<componentName>`, skipping tests, rewriting
|
|
421
428
|
* imports in TS/JS files, and collecting hook folder names referenced by those
|
|
422
429
|
* files for later copying.
|
|
423
430
|
*
|
|
424
|
-
* @param {string} componentName — resolved registry name (directory under `src/ui`)
|
|
431
|
+
* @param {string} componentName — resolved registry name (directory under `src/ui`, or `charts/<type>`)
|
|
425
432
|
* @param {object} config — validated `components.json`
|
|
426
433
|
* @param {string} configDir — dirname(components.json)
|
|
427
434
|
* @param {string} packageRoot — package containing source
|
|
@@ -433,18 +440,29 @@ async function collectHookTransitiveClosure(packageRoot, seedHooks) {
|
|
|
433
440
|
* // src/components/ui/buttons/Button.tsx
|
|
434
441
|
* // with imports pointing at @/lib/utils, @/hooks/useX, etc.
|
|
435
442
|
*/
|
|
436
|
-
async function copyUiComponent(
|
|
437
|
-
componentName
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
) {
|
|
442
|
-
const srcRoot = join(packageRoot, "src", "ui", componentName);
|
|
443
|
+
async function copyUiComponent(componentName, config, configDir, packageRoot) {
|
|
444
|
+
const isChartEntry = componentName.startsWith("charts/");
|
|
445
|
+
const srcRoot = isChartEntry
|
|
446
|
+
? join(packageRoot, "src", "charts")
|
|
447
|
+
: join(packageRoot, "src", "ui", componentName);
|
|
443
448
|
if (!existsSync(srcRoot)) {
|
|
444
|
-
throw new Error(
|
|
449
|
+
throw new Error(
|
|
450
|
+
`Missing package source: ${relative(packageRoot, srcRoot)}`,
|
|
451
|
+
);
|
|
445
452
|
}
|
|
446
|
-
const destRoot =
|
|
447
|
-
|
|
453
|
+
const destRoot = isChartEntry
|
|
454
|
+
? join(configDir, config.resolvedPaths.ui, "charts")
|
|
455
|
+
: join(configDir, config.resolvedPaths.ui, componentName);
|
|
456
|
+
const files = (await walkFiles(srcRoot)).filter((absSrc) => {
|
|
457
|
+
if (!isChartEntry) {
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
const relFromChartsRoot = relative(srcRoot, absSrc);
|
|
461
|
+
return (
|
|
462
|
+
relFromChartsRoot.startsWith("shared/") ||
|
|
463
|
+
relFromChartsRoot.startsWith(`${componentName.slice("charts/".length)}/`)
|
|
464
|
+
);
|
|
465
|
+
});
|
|
448
466
|
const usedHooks = new Set();
|
|
449
467
|
|
|
450
468
|
for (const absSrc of files) {
|
|
@@ -594,8 +612,7 @@ async function cmdAdd(names, cwd) {
|
|
|
594
612
|
validateConfig(config);
|
|
595
613
|
|
|
596
614
|
const registry = loadRegistry();
|
|
597
|
-
const hookMode =
|
|
598
|
-
names.length > 0 && names[0].toLowerCase() === "hook";
|
|
615
|
+
const hookMode = names.length > 0 && names[0].toLowerCase() === "hook";
|
|
599
616
|
const payload = hookMode ? names.slice(1) : names;
|
|
600
617
|
|
|
601
618
|
if (hookMode && payload.length === 0) {
|
|
@@ -604,9 +621,10 @@ async function cmdAdd(names, cwd) {
|
|
|
604
621
|
);
|
|
605
622
|
process.exitCode = 1;
|
|
606
623
|
return;
|
|
607
|
-
}
|
|
624
|
+
}
|
|
608
625
|
|
|
609
626
|
if (hookMode) {
|
|
627
|
+
await ensureUtilsFile(config, configDir, packageRoot);
|
|
610
628
|
const resolvedHooks = payload.map((n) => resolveHookName(n, registry));
|
|
611
629
|
const finalHooks = await collectHookTransitiveClosure(
|
|
612
630
|
packageRoot,
|
|
@@ -622,6 +640,8 @@ async function cmdAdd(names, cwd) {
|
|
|
622
640
|
|
|
623
641
|
const resolvedNames = payload.map((n) => resolveComponentName(n, registry));
|
|
624
642
|
|
|
643
|
+
await ensureUtilsFile(config, configDir, packageRoot);
|
|
644
|
+
|
|
625
645
|
const allHooks = new Set();
|
|
626
646
|
for (const name of resolvedNames) {
|
|
627
647
|
console.log(`Adding ${name}…`);
|
|
@@ -631,10 +651,9 @@ async function cmdAdd(names, cwd) {
|
|
|
631
651
|
}
|
|
632
652
|
}
|
|
633
653
|
|
|
634
|
-
const finalHooks = await collectHookTransitiveClosure(
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
);
|
|
654
|
+
const finalHooks = await collectHookTransitiveClosure(packageRoot, [
|
|
655
|
+
...allHooks,
|
|
656
|
+
]);
|
|
638
657
|
|
|
639
658
|
for (const h of finalHooks) {
|
|
640
659
|
console.log(`Adding hook ${h}…`);
|
|
@@ -685,7 +704,7 @@ async function main() {
|
|
|
685
704
|
return;
|
|
686
705
|
}
|
|
687
706
|
|
|
688
|
-
const cwd = values.cwd ?
|
|
707
|
+
const cwd = values.cwd ? resolve(process.cwd(), values.cwd) : process.cwd();
|
|
689
708
|
const cmd = positionals[0];
|
|
690
709
|
const rest = positionals.slice(1);
|
|
691
710
|
|
package/cli/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"description": "Addable UI components (src/ui) and hooks (src/hooks). Generated by scripts/generate-registry.mjs.",
|
|
3
|
+
"description": "Addable UI components (src/ui), chart entries (src/charts/*), and hooks (src/hooks). Generated by scripts/generate-registry.mjs.",
|
|
4
4
|
"components": [
|
|
5
5
|
"accordion",
|
|
6
6
|
"alert",
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"breadcrumb",
|
|
10
10
|
"buttons",
|
|
11
11
|
"card",
|
|
12
|
+
"charts/area",
|
|
13
|
+
"charts/bar",
|
|
14
|
+
"charts/bubble",
|
|
15
|
+
"charts/line",
|
|
12
16
|
"divider",
|
|
13
17
|
"drawer",
|
|
14
18
|
"dropdown",
|
|
@@ -60,6 +64,10 @@
|
|
|
60
64
|
],
|
|
61
65
|
"nameAliases": {
|
|
62
66
|
"button": "buttons",
|
|
67
|
+
"chart-area": "charts/area",
|
|
68
|
+
"chart-bar": "charts/bar",
|
|
69
|
+
"chart-bubble": "charts/bubble",
|
|
70
|
+
"chart-line": "charts/line",
|
|
63
71
|
"input": "inputs"
|
|
64
72
|
}
|
|
65
73
|
}
|
package/cli/rewrite-imports.mjs
CHANGED
|
@@ -10,8 +10,7 @@ export function rewriteImports(source, options) {
|
|
|
10
10
|
const usedHooks = new Set();
|
|
11
11
|
|
|
12
12
|
const collectHooks = (text) => {
|
|
13
|
-
const re =
|
|
14
|
-
/from\s+(["'])((?:\.\.\/)+)hooks\/([^'"]+)\1/g;
|
|
13
|
+
const re = /from\s+(["'])((?:\.\.\/)+)hooks\/([^'"]+)\1/g;
|
|
15
14
|
let m;
|
|
16
15
|
while ((m = re.exec(text)) !== null) {
|
|
17
16
|
usedHooks.add(m[3]);
|
|
@@ -29,7 +28,8 @@ export function rewriteImports(source, options) {
|
|
|
29
28
|
|
|
30
29
|
code = code.replace(
|
|
31
30
|
/from\s+(["'])((?:\.\.\/)+)hooks\/([^'"]+)\1/g,
|
|
32
|
-
(_, quote, _rel, hookName) =>
|
|
31
|
+
(_, quote, _rel, hookName) =>
|
|
32
|
+
`from ${quote}${hooksAlias}/${hookName}${quote}`,
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
if (uiAlias) {
|
|
@@ -37,6 +37,11 @@ export function rewriteImports(source, options) {
|
|
|
37
37
|
/from\s+(["'])((?:\.\.\/)+)ui\/([^'"]+)\1/g,
|
|
38
38
|
(_, quote, _rel, rest) => `from ${quote}${uiAlias}/${rest}${quote}`,
|
|
39
39
|
);
|
|
40
|
+
|
|
41
|
+
code = code.replace(
|
|
42
|
+
/from\s+(["'])((?:\.\.\/)+)charts([^'"]*)\1/g,
|
|
43
|
+
(_, quote, _rel, rest) => `from ${quote}${uiAlias}/charts${rest}${quote}`,
|
|
44
|
+
);
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
return { code, usedHooks: [...usedHooks] };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AreaChartProps } from "../shared/types";
|
|
2
|
+
export declare function AreaChart<TDatum extends Record<string, number | string | null | undefined>>({ appearance, className, containerStyle, data, density, emptyState, height, margin, series, showGrid, showLegend, showTooltip, tooltipColor, stacked, style, syncId, xKey, ...props }: AreaChartProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace AreaChart {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../src/charts/area/Area.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wBAAgB,SAAS,CACvB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EACjE,EACA,UAAU,EACV,SAAS,EACT,cAAc,EACd,IAAI,EACJ,OAAO,EACP,UAAiB,EACjB,MAAY,EACZ,MAA2B,EAC3B,MAAM,EACN,QAAe,EACf,UAAkB,EAClB,WAAkB,EAClB,YAAwB,EACxB,OAAe,EACf,KAAK,EACL,MAAM,EACN,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,MAAM,CAAC,2CAmExB;yBAxFe,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/area/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,oBAAoB,CAAC"}
|