@saas-ui/react 3.0.0-next.9 → 3.0.0-rc.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/LICENSE +21 -0
- package/README.md +16 -39
- package/dist/components/error-boundary/error-boundary.d.ts +28 -0
- package/dist/components/error-boundary/error-boundary.js +32 -0
- package/dist/components/error-boundary/error-provider.d.ts +11 -0
- package/dist/components/error-boundary/error-provider.js +9 -0
- package/dist/components/error-boundary/index.d.ts +4 -0
- package/dist/components/error-boundary/index.js +2 -0
- package/dist/components/grid-list/grid-list.context.d.ts +40 -0
- package/dist/components/grid-list/grid-list.context.js +82 -0
- package/dist/components/grid-list/grid-list.d.ts +18 -0
- package/dist/components/grid-list/grid-list.js +32 -0
- package/dist/components/grid-list/index.d.ts +1 -1
- package/dist/components/grid-list/index.js +1 -8
- package/dist/components/grid-list/namespace.d.ts +2 -0
- package/dist/components/grid-list/namespace.js +1 -0
- package/dist/components/navbar/index.d.ts +1 -1
- package/dist/components/navbar/index.js +1 -9
- package/dist/components/navbar/namespace.d.ts +2 -0
- package/dist/components/navbar/namespace.js +1 -0
- package/dist/components/navbar/navbar.d.ts +43 -0
- package/dist/components/navbar/navbar.js +35 -0
- package/dist/components/navbar/use-navbar.d.ts +49 -0
- package/dist/components/navbar/use-navbar.js +70 -0
- package/dist/components/sidebar/index.d.ts +4 -4
- package/dist/components/sidebar/index.js +2 -14
- package/dist/components/sidebar/namespace.d.ts +5 -0
- package/dist/components/sidebar/namespace.js +2 -0
- package/dist/components/sidebar/sidebar.context.d.ts +34 -0
- package/dist/components/sidebar/sidebar.context.js +75 -0
- package/dist/components/sidebar/sidebar.d.ts +47 -0
- package/dist/components/sidebar/sidebar.js +106 -0
- package/dist/components/sidebar/sidebar.types.d.ts +29 -0
- package/dist/components/sidebar/sidebar.types.js +1 -0
- package/dist/components/steps/index.d.ts +2 -1
- package/dist/components/steps/index.js +1 -10
- package/dist/components/steps/use-stepper.d.ts +79 -0
- package/dist/components/steps/use-stepper.js +110 -0
- package/dist/index.d.ts +9 -253
- package/dist/index.js +6 -561
- package/dist/system/compose-refs.d.ts +3 -0
- package/dist/system/compose-refs.js +13 -0
- package/dist/system/index.d.ts +183 -0
- package/dist/system/index.js +3 -0
- package/dist/utils/assign.d.ts +1 -0
- package/dist/utils/assign.js +1 -0
- package/dist/utils/call-all.d.ts +1 -0
- package/dist/utils/call-all.js +5 -0
- package/dist/utils/create-context.d.ts +14 -0
- package/dist/utils/create-context.js +21 -0
- package/dist/utils/create-props.d.ts +3 -0
- package/dist/utils/create-props.js +1 -0
- package/dist/utils/cx.d.ts +1 -0
- package/dist/utils/cx.js +4 -0
- package/dist/utils/data-attr.d.ts +3 -0
- package/dist/utils/data-attr.js +1 -0
- package/dist/utils/entries.d.ts +5 -0
- package/dist/utils/entries.js +8 -0
- package/dist/utils/get-child-of-type.d.ts +7 -0
- package/dist/utils/get-child-of-type.js +9 -0
- package/dist/utils/get-children-of-type.d.ts +7 -0
- package/dist/utils/get-children-of-type.js +11 -0
- package/dist/utils/get.d.ts +11 -0
- package/dist/utils/get.js +36 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/merge-refs.d.ts +3 -0
- package/dist/utils/merge-refs.js +21 -0
- package/dist/utils/run-if-fn.d.ts +2 -0
- package/dist/utils/run-if-fn.js +5 -0
- package/dist/utils/split-props.d.ts +9 -0
- package/dist/utils/split-props.js +25 -0
- package/package.json +47 -49
- package/CHANGELOG.md +0 -4033
- package/dist/.tsbuildinfo.json +0 -1
- package/dist/_tsup-dts-rollup.d.cts +0 -15192
- package/dist/_tsup-dts-rollup.d.ts +0 -15192
- package/dist/chunk-27OMFCPD.js +0 -8
- package/dist/chunk-2UMNJBGS.js +0 -101
- package/dist/chunk-3CKGT42F.js +0 -10
- package/dist/chunk-3E6URZ5P.js +0 -23
- package/dist/chunk-3EWOE56X.js +0 -46
- package/dist/chunk-3RHNNKPC.js +0 -51
- package/dist/chunk-46OCNELO.js +0 -10
- package/dist/chunk-4N4SHDPB.js +0 -10
- package/dist/chunk-52XM5VXJ.js +0 -9
- package/dist/chunk-5HVAMQYO.js +0 -8
- package/dist/chunk-5YNHX4C7.js +0 -16
- package/dist/chunk-5ZKEXMBN.js +0 -36
- package/dist/chunk-6WZK2RBQ.js +0 -12
- package/dist/chunk-6XSCENTR.js +0 -97
- package/dist/chunk-6YZ76Q2W.js +0 -8
- package/dist/chunk-7DF4NQNZ.js +0 -8
- package/dist/chunk-7HAGRXKM.js +0 -8
- package/dist/chunk-7MCVXFWM.js +0 -33
- package/dist/chunk-7PWVK3NL.js +0 -8
- package/dist/chunk-AA5L5WPD.js +0 -9
- package/dist/chunk-BDS3APRG.js +0 -56
- package/dist/chunk-BLSGOJQ7.js +0 -18
- package/dist/chunk-BSE7ZUP5.js +0 -10
- package/dist/chunk-C5KFNMWU.js +0 -8
- package/dist/chunk-C5YLE76Q.js +0 -118
- package/dist/chunk-CQD32UVJ.js +0 -8
- package/dist/chunk-CRFTMIQA.js +0 -36
- package/dist/chunk-D72A4SU3.js +0 -24
- package/dist/chunk-DEP2DH7P.js +0 -100
- package/dist/chunk-DHFAFRZ4.js +0 -8
- package/dist/chunk-DJNPK2LM.js +0 -60
- package/dist/chunk-EWATHRZA.js +0 -8
- package/dist/chunk-EWCBYJA7.js +0 -8
- package/dist/chunk-EZZW6JOU.js +0 -10
- package/dist/chunk-FD2V4Y66.js +0 -8
- package/dist/chunk-FN7TU5F5.js +0 -44
- package/dist/chunk-FPRTN3I7.js +0 -9
- package/dist/chunk-FVUEAELO.js +0 -64
- package/dist/chunk-GDDJYUWM.js +0 -12
- package/dist/chunk-GSWLAOIM.js +0 -24
- package/dist/chunk-GXOQVOKP.js +0 -67
- package/dist/chunk-HHKMVSL4.js +0 -54
- package/dist/chunk-HHTTORZ6.js +0 -8
- package/dist/chunk-HQVBJT5Y.js +0 -8
- package/dist/chunk-HREBIPVW.js +0 -36
- package/dist/chunk-HXNGSQQG.js +0 -62
- package/dist/chunk-HZX4AGO5.js +0 -8
- package/dist/chunk-J5UCKCIO.js +0 -16
- package/dist/chunk-JMYI6YXR.js +0 -1
- package/dist/chunk-JR5RLXCK.js +0 -8
- package/dist/chunk-K3MFCSAW.js +0 -8
- package/dist/chunk-KFDVVTMT.js +0 -36
- package/dist/chunk-KHCQMSP7.js +0 -36
- package/dist/chunk-KRJG7H4W.js +0 -53
- package/dist/chunk-KTLWEUNW.js +0 -1
- package/dist/chunk-LFOA3DZO.js +0 -12
- package/dist/chunk-LGLJ2QUW.js +0 -8
- package/dist/chunk-LIOV5MU4.js +0 -20
- package/dist/chunk-LU2H6GWC.js +0 -10
- package/dist/chunk-M3DJWM6D.js +0 -8
- package/dist/chunk-MK3OG2I4.js +0 -19
- package/dist/chunk-MZ2RY4NU.js +0 -34
- package/dist/chunk-NCNHDETB.js +0 -8
- package/dist/chunk-NGGISORT.js +0 -29
- package/dist/chunk-NKUBVRXY.js +0 -8896
- package/dist/chunk-NLMFEUVO.js +0 -41
- package/dist/chunk-NSFGACD7.js +0 -38
- package/dist/chunk-OJZPPAT6.js +0 -26
- package/dist/chunk-OQU4LWZW.js +0 -8
- package/dist/chunk-OWFY465Z.js +0 -45
- package/dist/chunk-P3IIT34M.js +0 -60
- package/dist/chunk-PEJYADAS.js +0 -8
- package/dist/chunk-PEVIP5UT.js +0 -8
- package/dist/chunk-PIQURQGB.js +0 -8
- package/dist/chunk-PONMXNY4.js +0 -8
- package/dist/chunk-PZWP36YA.js +0 -21
- package/dist/chunk-QAAKAKP7.js +0 -326
- package/dist/chunk-QKDPNO27.js +0 -44
- package/dist/chunk-QLN2CBY6.js +0 -8
- package/dist/chunk-QNKQFCKJ.js +0 -16
- package/dist/chunk-R2J5USV6.js +0 -12
- package/dist/chunk-RFBD2ZNL.js +0 -40
- package/dist/chunk-RTMS5TJN.js +0 -10
- package/dist/chunk-RYKJOZ3B.js +0 -27
- package/dist/chunk-SHCKFHIN.js +0 -39
- package/dist/chunk-TEQVVR3W.js +0 -8
- package/dist/chunk-TGEP2YAT.js +0 -10
- package/dist/chunk-TH6YCBEG.js +0 -8
- package/dist/chunk-TKJXJEXT.js +0 -22
- package/dist/chunk-TXIFPX2A.js +0 -230
- package/dist/chunk-TYGGMKHU.js +0 -177
- package/dist/chunk-TYMVLD3B.js +0 -14
- package/dist/chunk-U23VDAWJ.js +0 -143
- package/dist/chunk-U2CWQDXE.js +0 -20
- package/dist/chunk-U3EPRSD3.js +0 -20
- package/dist/chunk-UAX5344Y.js +0 -10
- package/dist/chunk-UEXUCHDD.js +0 -34
- package/dist/chunk-UIP2CHMU.js +0 -8
- package/dist/chunk-UZUMIWPJ.js +0 -10
- package/dist/chunk-VVTDE7NH.js +0 -115
- package/dist/chunk-WJZED26X.js +0 -28
- package/dist/chunk-XD7U6L2E.js +0 -10
- package/dist/chunk-XQTIY2ND.js +0 -71
- package/dist/chunk-XRQQE2AC.js +0 -152
- package/dist/chunk-XX2OY7LK.js +0 -10
- package/dist/chunk-Y2S4O4UY.js +0 -10
- package/dist/chunk-YHQ5JGCC.js +0 -1
- package/dist/chunk-YMCOU2N5.js +0 -8
- package/dist/chunk-YTTZX7ZE.js +0 -45
- package/dist/chunk-Z3SWPGPQ.js +0 -20
- package/dist/chunk-ZJ2VD224.js +0 -113
- package/dist/chunk-ZULBHMWG.js +0 -35
- package/dist/chunk-ZUT5GZTD.js +0 -46
- package/dist/colors.cjs +0 -351
- package/dist/colors.d.cts +0 -1
- package/dist/colors.d.ts +0 -1
- package/dist/colors.js +0 -8
- package/dist/components/accordion/index.cjs +0 -204
- package/dist/components/accordion/index.d.cts +0 -1
- package/dist/components/accordion/index.d.ts +0 -1
- package/dist/components/accordion/index.js +0 -9
- package/dist/components/action-bar/index.cjs +0 -223
- package/dist/components/action-bar/index.d.cts +0 -1
- package/dist/components/action-bar/index.d.ts +0 -1
- package/dist/components/action-bar/index.js +0 -13
- package/dist/components/alert/index.cjs +0 -233
- package/dist/components/alert/index.d.cts +0 -2
- package/dist/components/alert/index.d.ts +0 -2
- package/dist/components/alert/index.js +0 -13
- package/dist/components/app-shell/index.cjs +0 -68
- package/dist/components/app-shell/index.d.cts +0 -2
- package/dist/components/app-shell/index.d.ts +0 -2
- package/dist/components/app-shell/index.js +0 -8
- package/dist/components/aspect-ratio/index.cjs +0 -31
- package/dist/components/aspect-ratio/index.d.cts +0 -2
- package/dist/components/aspect-ratio/index.d.ts +0 -2
- package/dist/components/aspect-ratio/index.js +0 -8
- package/dist/components/avatar/index.cjs +0 -70
- package/dist/components/avatar/index.d.cts +0 -3
- package/dist/components/avatar/index.d.ts +0 -3
- package/dist/components/avatar/index.js +0 -11
- package/dist/components/back-button/index.cjs +0 -227
- package/dist/components/back-button/index.d.cts +0 -2
- package/dist/components/back-button/index.d.ts +0 -2
- package/dist/components/back-button/index.js +0 -11
- package/dist/components/badge/index.cjs +0 -33
- package/dist/components/badge/index.d.cts +0 -3
- package/dist/components/badge/index.d.ts +0 -3
- package/dist/components/badge/index.js +0 -10
- package/dist/components/bleed/index.cjs +0 -31
- package/dist/components/bleed/index.d.cts +0 -2
- package/dist/components/bleed/index.d.ts +0 -2
- package/dist/components/bleed/index.js +0 -8
- package/dist/components/blockquote/index.cjs +0 -59
- package/dist/components/blockquote/index.d.cts +0 -2
- package/dist/components/blockquote/index.d.ts +0 -2
- package/dist/components/blockquote/index.js +0 -8
- package/dist/components/box/index.cjs +0 -33
- package/dist/components/box/index.d.cts +0 -4
- package/dist/components/box/index.d.ts +0 -4
- package/dist/components/box/index.js +0 -10
- package/dist/components/breadcrumb/index.cjs +0 -58
- package/dist/components/breadcrumb/index.d.cts +0 -1
- package/dist/components/breadcrumb/index.d.ts +0 -1
- package/dist/components/breadcrumb/index.js +0 -8
- package/dist/components/button/index.cjs +0 -31
- package/dist/components/button/index.d.cts +0 -2
- package/dist/components/button/index.d.ts +0 -2
- package/dist/components/button/index.js +0 -8
- package/dist/components/button-group/index.cjs +0 -31
- package/dist/components/button-group/index.d.cts +0 -2
- package/dist/components/button-group/index.d.ts +0 -2
- package/dist/components/button-group/index.js +0 -8
- package/dist/components/card/index.cjs +0 -32
- package/dist/components/card/index.d.cts +0 -1
- package/dist/components/card/index.d.ts +0 -1
- package/dist/components/card/index.js +0 -9
- package/dist/components/center/index.cjs +0 -31
- package/dist/components/center/index.d.cts +0 -2
- package/dist/components/center/index.d.ts +0 -2
- package/dist/components/center/index.js +0 -8
- package/dist/components/checkbox/index.cjs +0 -45
- package/dist/components/checkbox/index.d.cts +0 -2
- package/dist/components/checkbox/index.d.ts +0 -2
- package/dist/components/checkbox/index.js +0 -8
- package/dist/components/checkbox-card/index.cjs +0 -66
- package/dist/components/checkbox-card/index.d.cts +0 -2
- package/dist/components/checkbox-card/index.d.ts +0 -2
- package/dist/components/checkbox-card/index.js +0 -8
- package/dist/components/checkmark/index.cjs +0 -31
- package/dist/components/checkmark/index.d.cts +0 -2
- package/dist/components/checkmark/index.d.ts +0 -2
- package/dist/components/checkmark/index.js +0 -8
- package/dist/components/client-only/index.cjs +0 -31
- package/dist/components/client-only/index.d.cts +0 -2
- package/dist/components/client-only/index.d.ts +0 -2
- package/dist/components/client-only/index.js +0 -8
- package/dist/components/clipboard/index.cjs +0 -234
- package/dist/components/clipboard/index.d.cts +0 -1
- package/dist/components/clipboard/index.d.ts +0 -1
- package/dist/components/clipboard/index.js +0 -13
- package/dist/components/close-button/index.cjs +0 -193
- package/dist/components/close-button/index.d.cts +0 -2
- package/dist/components/close-button/index.d.ts +0 -2
- package/dist/components/close-button/index.js +0 -12
- package/dist/components/code/index.cjs +0 -31
- package/dist/components/code/index.d.cts +0 -2
- package/dist/components/code/index.d.ts +0 -2
- package/dist/components/code/index.js +0 -8
- package/dist/components/collapsible/index.cjs +0 -31
- package/dist/components/collapsible/index.d.cts +0 -1
- package/dist/components/collapsible/index.d.ts +0 -1
- package/dist/components/collapsible/index.js +0 -8
- package/dist/components/color-picker/index.cjs +0 -31
- package/dist/components/color-picker/index.d.cts +0 -1
- package/dist/components/color-picker/index.d.ts +0 -1
- package/dist/components/color-picker/index.js +0 -8
- package/dist/components/color-swatch/index.cjs +0 -35
- package/dist/components/color-swatch/index.d.cts +0 -6
- package/dist/components/color-swatch/index.d.ts +0 -6
- package/dist/components/color-swatch/index.js +0 -12
- package/dist/components/command/index.cjs +0 -61
- package/dist/components/command/index.d.cts +0 -1
- package/dist/components/command/index.d.ts +0 -1
- package/dist/components/command/index.js +0 -9
- package/dist/components/container/index.cjs +0 -31
- package/dist/components/container/index.d.cts +0 -2
- package/dist/components/container/index.d.ts +0 -2
- package/dist/components/container/index.js +0 -8
- package/dist/components/data-list/index.cjs +0 -33
- package/dist/components/data-list/index.d.cts +0 -2
- package/dist/components/data-list/index.d.ts +0 -2
- package/dist/components/data-list/index.js +0 -10
- package/dist/components/dialog/index.cjs +0 -246
- package/dist/components/dialog/index.d.cts +0 -1
- package/dist/components/dialog/index.d.ts +0 -1
- package/dist/components/dialog/index.js +0 -13
- package/dist/components/drawer/index.cjs +0 -238
- package/dist/components/drawer/index.d.cts +0 -1
- package/dist/components/drawer/index.d.ts +0 -1
- package/dist/components/drawer/index.js +0 -13
- package/dist/components/editable/index.cjs +0 -31
- package/dist/components/editable/index.d.cts +0 -1
- package/dist/components/editable/index.d.ts +0 -1
- package/dist/components/editable/index.js +0 -8
- package/dist/components/empty-state/index.cjs +0 -50
- package/dist/components/empty-state/index.d.cts +0 -2
- package/dist/components/empty-state/index.d.ts +0 -2
- package/dist/components/empty-state/index.js +0 -8
- package/dist/components/env/index.cjs +0 -33
- package/dist/components/env/index.d.cts +0 -5
- package/dist/components/env/index.d.ts +0 -5
- package/dist/components/env/index.js +0 -10
- package/dist/components/field/index.cjs +0 -35
- package/dist/components/field/index.d.cts +0 -3
- package/dist/components/field/index.d.ts +0 -3
- package/dist/components/field/index.js +0 -12
- package/dist/components/fieldset/index.cjs +0 -33
- package/dist/components/fieldset/index.d.cts +0 -2
- package/dist/components/fieldset/index.d.ts +0 -2
- package/dist/components/fieldset/index.js +0 -10
- package/dist/components/file-upload/index.cjs +0 -302
- package/dist/components/file-upload/index.d.cts +0 -2
- package/dist/components/file-upload/index.d.ts +0 -2
- package/dist/components/file-upload/index.js +0 -14
- package/dist/components/flex/index.cjs +0 -31
- package/dist/components/flex/index.d.cts +0 -2
- package/dist/components/flex/index.d.ts +0 -2
- package/dist/components/flex/index.js +0 -10
- package/dist/components/float/index.cjs +0 -31
- package/dist/components/float/index.d.cts +0 -2
- package/dist/components/float/index.d.ts +0 -2
- package/dist/components/float/index.js +0 -8
- package/dist/components/focus-trap/index.cjs +0 -31
- package/dist/components/focus-trap/index.d.cts +0 -2
- package/dist/components/focus-trap/index.d.ts +0 -2
- package/dist/components/focus-trap/index.js +0 -8
- package/dist/components/for/index.cjs +0 -31
- package/dist/components/for/index.d.cts +0 -2
- package/dist/components/for/index.d.ts +0 -2
- package/dist/components/for/index.js +0 -10
- package/dist/components/format/index.cjs +0 -33
- package/dist/components/format/index.d.cts +0 -4
- package/dist/components/format/index.d.ts +0 -4
- package/dist/components/format/index.js +0 -10
- package/dist/components/grid/index.cjs +0 -31
- package/dist/components/grid/index.d.cts +0 -2
- package/dist/components/grid/index.d.ts +0 -2
- package/dist/components/grid/index.js +0 -8
- package/dist/components/grid-list/index.cjs +0 -68
- package/dist/components/grid-list/index.d.cts +0 -1
- package/dist/components/group/index.cjs +0 -31
- package/dist/components/group/index.d.cts +0 -2
- package/dist/components/group/index.d.ts +0 -2
- package/dist/components/group/index.js +0 -8
- package/dist/components/heading/index.cjs +0 -31
- package/dist/components/heading/index.d.cts +0 -2
- package/dist/components/heading/index.d.ts +0 -2
- package/dist/components/heading/index.js +0 -8
- package/dist/components/highlight/index.cjs +0 -31
- package/dist/components/highlight/index.d.cts +0 -2
- package/dist/components/highlight/index.d.ts +0 -2
- package/dist/components/highlight/index.js +0 -8
- package/dist/components/hover-card/index.cjs +0 -66
- package/dist/components/hover-card/index.d.cts +0 -1
- package/dist/components/hover-card/index.d.ts +0 -1
- package/dist/components/hover-card/index.js +0 -8
- package/dist/components/icon/index.cjs +0 -31
- package/dist/components/icon/index.d.cts +0 -2
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +0 -8
- package/dist/components/icon-badge/index.cjs +0 -70
- package/dist/components/icon-badge/index.d.cts +0 -2
- package/dist/components/icon-badge/index.d.ts +0 -2
- package/dist/components/icon-badge/index.js +0 -8
- package/dist/components/icon-button/index.cjs +0 -53
- package/dist/components/icon-button/index.d.cts +0 -2
- package/dist/components/icon-button/index.d.ts +0 -2
- package/dist/components/icon-button/index.js +0 -9
- package/dist/components/icons/index.cjs +0 -193
- package/dist/components/icons/index.d.cts +0 -18
- package/dist/components/icons/index.d.ts +0 -18
- package/dist/components/icons/index.js +0 -43
- package/dist/components/image/index.cjs +0 -31
- package/dist/components/image/index.d.cts +0 -2
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/image/index.js +0 -8
- package/dist/components/info-tip/index.cjs +0 -307
- package/dist/components/info-tip/index.d.cts +0 -2
- package/dist/components/info-tip/index.d.ts +0 -2
- package/dist/components/info-tip/index.js +0 -17
- package/dist/components/input/index.cjs +0 -39
- package/dist/components/input/index.d.cts +0 -9
- package/dist/components/input/index.d.ts +0 -9
- package/dist/components/input/index.js +0 -16
- package/dist/components/kbd/index.cjs +0 -31
- package/dist/components/kbd/index.d.cts +0 -2
- package/dist/components/kbd/index.d.ts +0 -2
- package/dist/components/kbd/index.js +0 -8
- package/dist/components/link/index.cjs +0 -71
- package/dist/components/link/index.d.cts +0 -2
- package/dist/components/link/index.d.ts +0 -2
- package/dist/components/link/index.js +0 -9
- package/dist/components/list/index.cjs +0 -31
- package/dist/components/list/index.d.cts +0 -1
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/index.js +0 -8
- package/dist/components/loader/index.cjs +0 -31
- package/dist/components/loader/index.d.cts +0 -1
- package/dist/components/loader/index.d.ts +0 -1
- package/dist/components/loader/index.js +0 -8
- package/dist/components/loading-overlay/index.cjs +0 -87
- package/dist/components/loading-overlay/index.d.cts +0 -2
- package/dist/components/loading-overlay/index.d.ts +0 -2
- package/dist/components/loading-overlay/index.js +0 -11
- package/dist/components/locale/index.cjs +0 -33
- package/dist/components/locale/index.d.cts +0 -3
- package/dist/components/locale/index.d.ts +0 -3
- package/dist/components/locale/index.js +0 -12
- package/dist/components/mark/index.cjs +0 -31
- package/dist/components/mark/index.d.cts +0 -1
- package/dist/components/mark/index.d.ts +0 -1
- package/dist/components/mark/index.js +0 -8
- package/dist/components/menu/index.cjs +0 -249
- package/dist/components/menu/index.d.cts +0 -1
- package/dist/components/menu/index.d.ts +0 -1
- package/dist/components/menu/index.js +0 -11
- package/dist/components/native-select/index.cjs +0 -185
- package/dist/components/native-select/index.d.cts +0 -2
- package/dist/components/native-select/index.d.ts +0 -2
- package/dist/components/native-select/index.js +0 -10
- package/dist/components/navbar/index.cjs +0 -108
- package/dist/components/navbar/index.d.cts +0 -1
- package/dist/components/number-input/index.cjs +0 -67
- package/dist/components/number-input/index.d.cts +0 -2
- package/dist/components/number-input/index.d.ts +0 -2
- package/dist/components/number-input/index.js +0 -9
- package/dist/components/page/index.cjs +0 -196
- package/dist/components/page/index.d.cts +0 -2
- package/dist/components/page/index.d.ts +0 -2
- package/dist/components/page/index.js +0 -12
- package/dist/components/pagination/index.cjs +0 -257
- package/dist/components/pagination/index.d.cts +0 -1
- package/dist/components/pagination/index.d.ts +0 -1
- package/dist/components/pagination/index.js +0 -11
- package/dist/components/password-input/index.cjs +0 -284
- package/dist/components/password-input/index.d.cts +0 -2
- package/dist/components/password-input/index.d.ts +0 -2
- package/dist/components/password-input/index.js +0 -11
- package/dist/components/persona/index.cjs +0 -247
- package/dist/components/persona/index.d.cts +0 -7
- package/dist/components/persona/index.d.ts +0 -7
- package/dist/components/persona/index.js +0 -13
- package/dist/components/pin-input/index.cjs +0 -52
- package/dist/components/pin-input/index.d.cts +0 -2
- package/dist/components/pin-input/index.d.ts +0 -2
- package/dist/components/pin-input/index.js +0 -8
- package/dist/components/popover/index.cjs +0 -248
- package/dist/components/popover/index.d.cts +0 -1
- package/dist/components/popover/index.d.ts +0 -1
- package/dist/components/popover/index.js +0 -13
- package/dist/components/portal/index.cjs +0 -31
- package/dist/components/portal/index.d.cts +0 -2
- package/dist/components/portal/index.d.ts +0 -2
- package/dist/components/portal/index.js +0 -8
- package/dist/components/presence/index.cjs +0 -31
- package/dist/components/presence/index.d.cts +0 -2
- package/dist/components/presence/index.d.ts +0 -2
- package/dist/components/presence/index.js +0 -8
- package/dist/components/progress/index.cjs +0 -31
- package/dist/components/progress/index.d.cts +0 -1
- package/dist/components/progress/index.d.ts +0 -1
- package/dist/components/progress/index.js +0 -8
- package/dist/components/progress-circle/index.cjs +0 -31
- package/dist/components/progress-circle/index.d.cts +0 -1
- package/dist/components/progress-circle/index.d.ts +0 -1
- package/dist/components/progress-circle/index.js +0 -8
- package/dist/components/qr-code/index.cjs +0 -31
- package/dist/components/qr-code/index.d.cts +0 -1
- package/dist/components/qr-code/index.d.ts +0 -1
- package/dist/components/qr-code/index.js +0 -8
- package/dist/components/radio/index.cjs +0 -46
- package/dist/components/radio/index.d.cts +0 -2
- package/dist/components/radio/index.d.ts +0 -2
- package/dist/components/radio/index.js +0 -8
- package/dist/components/radio-card/index.cjs +0 -75
- package/dist/components/radio-card/index.d.cts +0 -1
- package/dist/components/radio-card/index.d.ts +0 -1
- package/dist/components/radio-card/index.js +0 -8
- package/dist/components/radio-group/index.cjs +0 -31
- package/dist/components/radio-group/index.d.cts +0 -1
- package/dist/components/radio-group/index.d.ts +0 -1
- package/dist/components/radio-group/index.js +0 -8
- package/dist/components/radiomark/index.cjs +0 -31
- package/dist/components/radiomark/index.d.cts +0 -2
- package/dist/components/radiomark/index.d.ts +0 -2
- package/dist/components/radiomark/index.js +0 -10
- package/dist/components/rating-group/index.cjs +0 -31
- package/dist/components/rating-group/index.d.cts +0 -1
- package/dist/components/rating-group/index.d.ts +0 -1
- package/dist/components/rating-group/index.js +0 -8
- package/dist/components/search-input/index.cjs +0 -273
- package/dist/components/search-input/index.d.cts +0 -2
- package/dist/components/search-input/index.d.ts +0 -2
- package/dist/components/search-input/index.js +0 -10
- package/dist/components/segmented-control/index.cjs +0 -61
- package/dist/components/segmented-control/index.d.cts +0 -2
- package/dist/components/segmented-control/index.d.ts +0 -2
- package/dist/components/segmented-control/index.js +0 -8
- package/dist/components/select/index.cjs +0 -285
- package/dist/components/select/index.d.cts +0 -1
- package/dist/components/select/index.d.ts +0 -1
- package/dist/components/select/index.js +0 -13
- package/dist/components/separator/index.cjs +0 -31
- package/dist/components/separator/index.d.cts +0 -2
- package/dist/components/separator/index.d.ts +0 -2
- package/dist/components/separator/index.js +0 -8
- package/dist/components/show/index.cjs +0 -31
- package/dist/components/show/index.d.cts +0 -2
- package/dist/components/show/index.d.ts +0 -2
- package/dist/components/show/index.js +0 -8
- package/dist/components/sidebar/index.cjs +0 -168
- package/dist/components/sidebar/index.d.cts +0 -4
- package/dist/components/skeleton/index.cjs +0 -61
- package/dist/components/skeleton/index.d.cts +0 -6
- package/dist/components/skeleton/index.d.ts +0 -6
- package/dist/components/skeleton/index.js +0 -12
- package/dist/components/skip-nav/index.cjs +0 -33
- package/dist/components/skip-nav/index.d.cts +0 -4
- package/dist/components/skip-nav/index.d.ts +0 -4
- package/dist/components/skip-nav/index.js +0 -10
- package/dist/components/skip-nav-link/index.cjs +0 -33
- package/dist/components/skip-nav-link/index.d.cts +0 -4
- package/dist/components/skip-nav-link/index.d.ts +0 -4
- package/dist/components/skip-nav-link/index.js +0 -12
- package/dist/components/slider/index.cjs +0 -61
- package/dist/components/slider/index.d.cts +0 -2
- package/dist/components/slider/index.d.ts +0 -2
- package/dist/components/slider/index.js +0 -8
- package/dist/components/spacer/index.cjs +0 -31
- package/dist/components/spacer/index.d.cts +0 -2
- package/dist/components/spacer/index.d.ts +0 -2
- package/dist/components/spacer/index.js +0 -8
- package/dist/components/spinner/index.cjs +0 -44
- package/dist/components/spinner/index.d.cts +0 -2
- package/dist/components/spinner/index.d.ts +0 -2
- package/dist/components/spinner/index.js +0 -8
- package/dist/components/stack/index.cjs +0 -37
- package/dist/components/stack/index.d.cts +0 -6
- package/dist/components/stack/index.d.ts +0 -6
- package/dist/components/stack/index.js +0 -14
- package/dist/components/stat/index.cjs +0 -83
- package/dist/components/stat/index.d.cts +0 -1
- package/dist/components/stat/index.d.ts +0 -1
- package/dist/components/stat/index.js +0 -8
- package/dist/components/status/index.cjs +0 -45
- package/dist/components/status/index.d.cts +0 -2
- package/dist/components/status/index.d.ts +0 -2
- package/dist/components/status/index.js +0 -8
- package/dist/components/steps/index.cjs +0 -221
- package/dist/components/steps/index.d.cts +0 -1
- package/dist/components/switch/index.cjs +0 -48
- package/dist/components/switch/index.d.cts +0 -2
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/index.js +0 -8
- package/dist/components/table/index.cjs +0 -31
- package/dist/components/table/index.d.cts +0 -1
- package/dist/components/table/index.d.ts +0 -1
- package/dist/components/table/index.js +0 -8
- package/dist/components/tabs/index.cjs +0 -37
- package/dist/components/tabs/index.d.cts +0 -4
- package/dist/components/tabs/index.d.ts +0 -4
- package/dist/components/tabs/index.js +0 -14
- package/dist/components/tag/index.cjs +0 -53
- package/dist/components/tag/index.d.cts +0 -2
- package/dist/components/tag/index.d.ts +0 -2
- package/dist/components/tag/index.js +0 -8
- package/dist/components/textarea/index.cjs +0 -31
- package/dist/components/textarea/index.d.cts +0 -2
- package/dist/components/textarea/index.d.ts +0 -2
- package/dist/components/textarea/index.js +0 -8
- package/dist/components/timeline/index.cjs +0 -31
- package/dist/components/timeline/index.d.cts +0 -1
- package/dist/components/timeline/index.d.ts +0 -1
- package/dist/components/timeline/index.js +0 -8
- package/dist/components/toaster/index.cjs +0 -262
- package/dist/components/toaster/index.d.cts +0 -3
- package/dist/components/toaster/index.d.ts +0 -3
- package/dist/components/toaster/index.js +0 -16
- package/dist/components/toggle/index.cjs +0 -31
- package/dist/components/toggle/index.d.cts +0 -1
- package/dist/components/toggle/index.d.ts +0 -1
- package/dist/components/toggle/index.js +0 -8
- package/dist/components/toggle-tip/index.cjs +0 -297
- package/dist/components/toggle-tip/index.d.cts +0 -2
- package/dist/components/toggle-tip/index.d.ts +0 -2
- package/dist/components/toggle-tip/index.js +0 -15
- package/dist/components/tooltip/index.cjs +0 -58
- package/dist/components/tooltip/index.d.cts +0 -2
- package/dist/components/tooltip/index.d.ts +0 -2
- package/dist/components/tooltip/index.js +0 -8
- package/dist/components/typography/index.cjs +0 -37
- package/dist/components/typography/index.d.cts +0 -8
- package/dist/components/typography/index.d.ts +0 -8
- package/dist/components/typography/index.js +0 -14
- package/dist/components/visually-hidden/index.cjs +0 -31
- package/dist/components/visually-hidden/index.d.cts +0 -1
- package/dist/components/visually-hidden/index.d.ts +0 -1
- package/dist/components/visually-hidden/index.js +0 -8
- package/dist/components/wrap/index.cjs +0 -31
- package/dist/components/wrap/index.d.cts +0 -2
- package/dist/components/wrap/index.d.ts +0 -2
- package/dist/components/wrap/index.js +0 -8
- package/dist/index.cjs +0 -12240
- package/dist/index.d.cts +0 -253
- package/dist/preset.cjs +0 -9233
- package/dist/preset.d.cts +0 -3
- package/dist/preset.d.ts +0 -3
- package/dist/preset.js +0 -12
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Eelco Wiersma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,46 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="./apps/website/public/saasui.svg#gh-light-mode-only" alt="Saas UI logo" height="60px" />
|
|
3
|
-
<img src="./apps/website/public/saasui-dark.svg#gh-dark-mode-only" alt="Saas UI logo" height="60px" />
|
|
4
|
-
</p>
|
|
1
|
+
# `@saas-ui/react`
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
Unstyled React primitives for Saas UI. Styled Chakra compositions are installed
|
|
4
|
+
from the registry with `@saas-ui/cli`.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</a>
|
|
12
|
-
<a href="https://www.npmjs.com/package/@saas-ui/react">
|
|
13
|
-
<img src="https://img.shields.io/npm/dm/@saas-ui/react.svg" alt="npm downloads">
|
|
14
|
-
</a>
|
|
15
|
-
<img alt="MIT License" src="https://img.shields.io/github/license/saas-js/saas-ui"/>
|
|
16
|
-
<a href="https://twitter.com/intent/follow?screen_name=saas_js">
|
|
17
|
-
<img src="https://img.shields.io/twitter/follow/saas_js" alt="follow on Twitter">
|
|
18
|
-
</a>
|
|
19
|
-
</p>
|
|
6
|
+
```sh
|
|
7
|
+
npm i @saas-ui/react
|
|
8
|
+
```
|
|
20
9
|
|
|
21
|
-
|
|
10
|
+
```tsx
|
|
11
|
+
import { Sidebar, useSidebar } from '@saas-ui/react/sidebar'
|
|
12
|
+
import { Navbar } from '@saas-ui/react/navbar'
|
|
13
|
+
import { GridList } from '@saas-ui/react/grid-list'
|
|
14
|
+
```
|
|
22
15
|
|
|
23
|
-
|
|
24
|
-
It's built on top of Chakra UI and fully written in Typescript.
|
|
16
|
+
The package also exports `ErrorBoundary`, stepper hooks, and shared utilities.
|
|
25
17
|
|
|
26
|
-
|
|
18
|
+
Existing projects that used the previous Chakra re-export bundle should follow
|
|
19
|
+
the [migration guide](https://github.com/saas-js/saas-ui/blob/v3/MIGRATION.md).
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
## License
|
|
29
22
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
🖼 [Storybooks](https://storybook.saas-ui.pro)
|
|
33
|
-
|
|
34
|
-
🌟 [Saas UI Pro](https://saas-ui.dev/#pro-features)
|
|
35
|
-
|
|
36
|
-
## Sponsors ❤️
|
|
37
|
-
|
|
38
|
-
Saas UI is sponsored by these amazing companies and people.
|
|
39
|
-
|
|
40
|
-
- [LocalXPose](https://localxpose.io/)
|
|
41
|
-
|
|
42
|
-
## Contributing & Support
|
|
43
|
-
|
|
44
|
-
Want to help? Great! Check out the [contributing guidelines](CONTRIBUTING.md) and feel free to open a PR or [discussion](https://github.com/saas-js/saas-ui/discussions/new) for feature requests and feedback.
|
|
45
|
-
|
|
46
|
-
If you'd like to support the project financially, you can [become a sponsor](https://github.com/sponsors/saas-js) of Saas UI or consider ordering [Saas UI Pro Beta](https://saas-ui.lemonsqueezy.com/checkout/buy/5c76854f-738a-46b8-b32d-932a97d477f5). All funds will go toward the further development of Saas UI. This will give you access to the private Git repository with the beta and our private Discord server for support.
|
|
23
|
+
MIT
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ErrorContext } from './error-provider.tsx';
|
|
3
|
+
export interface ErrorBoundaryProps {
|
|
4
|
+
fallback?: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface ErrorBoundaryState {
|
|
9
|
+
error?: Error | null;
|
|
10
|
+
errorInfo?: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A container component that catches errors and displays a fallback UI.
|
|
14
|
+
*
|
|
15
|
+
* @see Docs https://saas-ui.dev/docs/components/utils/error-boundary
|
|
16
|
+
*/
|
|
17
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps> {
|
|
18
|
+
state: ErrorBoundaryState;
|
|
19
|
+
static contextType: React.Context<import("./error-provider.tsx").ErrorContextValue>;
|
|
20
|
+
context: React.ContextType<typeof ErrorContext>;
|
|
21
|
+
constructor(props: ErrorBoundaryProps);
|
|
22
|
+
static getDerivedStateFromError(error: Error): {
|
|
23
|
+
error: Error;
|
|
24
|
+
};
|
|
25
|
+
onError: (error: Error, errorInfo: any) => void;
|
|
26
|
+
componentDidCatch(error: Error, errorInfo: any): void;
|
|
27
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ErrorContext } from "./error-provider.js";
|
|
4
|
+
/**
|
|
5
|
+
* A container component that catches errors and displays a fallback UI.
|
|
6
|
+
*
|
|
7
|
+
* @see Docs https://saas-ui.dev/docs/components/utils/error-boundary
|
|
8
|
+
*/
|
|
9
|
+
export class ErrorBoundary extends React.Component {
|
|
10
|
+
state;
|
|
11
|
+
static contextType = ErrorContext;
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
this.state = { error: null };
|
|
15
|
+
}
|
|
16
|
+
static getDerivedStateFromError(error) {
|
|
17
|
+
return { error };
|
|
18
|
+
}
|
|
19
|
+
onError = (error, errorInfo) => {
|
|
20
|
+
this.props.onError?.(error, errorInfo);
|
|
21
|
+
this.context.onError?.(error, errorInfo);
|
|
22
|
+
};
|
|
23
|
+
componentDidCatch(error, errorInfo) {
|
|
24
|
+
this.onError(error, errorInfo);
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
if (this.state.error) {
|
|
28
|
+
return this.props.fallback || _jsx("h1", { children: "Something went wrong." });
|
|
29
|
+
}
|
|
30
|
+
return this.props.children;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ErrorProviderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ErrorContextValue {
|
|
7
|
+
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ErrorContext: React.Context<ErrorContextValue>;
|
|
10
|
+
export declare const ErrorProvider: (props: ErrorProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const useErrorContext: () => ErrorContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export const ErrorContext = React.createContext({});
|
|
4
|
+
export const ErrorProvider = (props) => {
|
|
5
|
+
const { children, onError } = props;
|
|
6
|
+
const value = React.useMemo(() => ({ onError }), [onError]);
|
|
7
|
+
return _jsx(ErrorContext.Provider, { value: value, children: children });
|
|
8
|
+
};
|
|
9
|
+
export const useErrorContext = () => React.useContext(ErrorContext);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ErrorProvider, ErrorContext, useErrorContext, } from './error-provider.tsx';
|
|
2
|
+
export type { ErrorProviderProps, ErrorContextValue, } from './error-provider.tsx';
|
|
3
|
+
export { ErrorBoundary } from './error-boundary.tsx';
|
|
4
|
+
export type { ErrorBoundaryProps, ErrorBoundaryState, } from './error-boundary.tsx';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface GridListContext {
|
|
3
|
+
id: string;
|
|
4
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
focusId: string | null;
|
|
6
|
+
setFocusId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const GridListProvider: React.Provider<GridListContext>, useGridListContext: () => GridListContext;
|
|
9
|
+
export interface UseGridListProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
onBlur?: React.FocusEventHandler<HTMLDivElement>;
|
|
12
|
+
}
|
|
13
|
+
export declare const useGridList: (props: UseGridListProps) => {
|
|
14
|
+
id: string;
|
|
15
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
16
|
+
focusId: string | null;
|
|
17
|
+
setFocusId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
18
|
+
listProps: {
|
|
19
|
+
onBlur: (e: React.FocusEvent<HTMLDivElement, Element>) => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export interface GridListItemOptions {
|
|
23
|
+
id?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onFocus?: React.FocusEventHandler<HTMLDivElement>;
|
|
26
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
27
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
28
|
+
}
|
|
29
|
+
export declare const useGridListItem: (props: GridListItemOptions) => {
|
|
30
|
+
itemProps: {
|
|
31
|
+
id: string;
|
|
32
|
+
"data-focus": boolean | "true" | "false";
|
|
33
|
+
"aria-disabled": boolean | undefined;
|
|
34
|
+
tabIndex: number;
|
|
35
|
+
onFocus: (event: React.FocusEvent<HTMLDivElement, Element>) => void;
|
|
36
|
+
onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
37
|
+
onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { nextById, prevById, queryAll } from '@zag-js/dom-utils';
|
|
3
|
+
import { callAll, createContext, dataAttr } from "../../utils/index.js";
|
|
4
|
+
export const [GridListProvider, useGridListContext] = createContext({
|
|
5
|
+
name: 'GridListContext',
|
|
6
|
+
errorMessage: 'useGridListContext: `context` is undefined. Seems you forgot to wrap the components in `<GridList />`',
|
|
7
|
+
});
|
|
8
|
+
function queryAllItems(root) {
|
|
9
|
+
return queryAll(root, `[role='row'][tabindex]:not([aria-disabled='true'])`);
|
|
10
|
+
}
|
|
11
|
+
export const useGridList = (props) => {
|
|
12
|
+
const id = React.useId();
|
|
13
|
+
const ref = React.useRef(null);
|
|
14
|
+
const [focusId, setFocusId] = React.useState(null);
|
|
15
|
+
const listProps = {
|
|
16
|
+
onBlur: callAll(props.onBlur, (e) => {
|
|
17
|
+
if (e.relatedTarget) {
|
|
18
|
+
const items = queryAllItems(ref.current);
|
|
19
|
+
if (!items.includes(e.relatedTarget)) {
|
|
20
|
+
setFocusId(null);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
id: props.id ?? id,
|
|
27
|
+
containerRef: ref,
|
|
28
|
+
focusId,
|
|
29
|
+
setFocusId,
|
|
30
|
+
listProps,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export const useGridListItem = (props) => {
|
|
34
|
+
const { id: containerId, containerRef, focusId, setFocusId, } = useGridListContext();
|
|
35
|
+
const id = `${containerId}-${React.useId()}`;
|
|
36
|
+
const buttonId = props.id ?? id;
|
|
37
|
+
const isFocused = focusId === buttonId;
|
|
38
|
+
function getItems() {
|
|
39
|
+
return queryAllItems(containerRef.current);
|
|
40
|
+
}
|
|
41
|
+
const itemProps = {
|
|
42
|
+
id: buttonId,
|
|
43
|
+
['data-focus']: dataAttr(isFocused),
|
|
44
|
+
['aria-disabled']: props.disabled ? true : undefined,
|
|
45
|
+
tabIndex: props.disabled ? -1 : 0,
|
|
46
|
+
onFocus: callAll(props.onFocus, () => {
|
|
47
|
+
setFocusId(buttonId);
|
|
48
|
+
}),
|
|
49
|
+
onKeyDown: callAll(props.onKeyDown, React.useCallback((e) => {
|
|
50
|
+
const items = getItems();
|
|
51
|
+
const keyMap = {
|
|
52
|
+
ArrowUp: () => {
|
|
53
|
+
prevById(items, buttonId)?.focus();
|
|
54
|
+
},
|
|
55
|
+
ArrowDown: () => {
|
|
56
|
+
nextById(items, buttonId)?.focus();
|
|
57
|
+
},
|
|
58
|
+
Home: () => {
|
|
59
|
+
items[0]?.focus();
|
|
60
|
+
},
|
|
61
|
+
End: () => {
|
|
62
|
+
items[items.length - 1]?.focus();
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
if (keyMap[e.key]) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
keyMap[e.key](e);
|
|
68
|
+
}
|
|
69
|
+
}, [buttonId])),
|
|
70
|
+
onClick: (e) => {
|
|
71
|
+
if (props.disabled) {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
props.onClick?.(e);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
itemProps,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type HTMLSystemProps } from '../../system/index.ts';
|
|
3
|
+
import { type GridListItemOptions } from './grid-list.context.ts';
|
|
4
|
+
export interface GridListRootProps extends HTMLSystemProps<'div'> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* React component to render lists of data
|
|
8
|
+
*/
|
|
9
|
+
export declare const GridListRoot: React.ForwardRefExoticComponent<GridListRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export interface GridListHeaderProps extends HTMLSystemProps<'div'> {
|
|
11
|
+
}
|
|
12
|
+
export declare const GridListHeader: React.ForwardRefExoticComponent<GridListHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export interface GridListItemProps extends GridListItemOptions, HTMLSystemProps<'div'> {
|
|
14
|
+
}
|
|
15
|
+
export declare const GridListItem: React.ForwardRefExoticComponent<GridListItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export interface GridListCellProps extends HTMLSystemProps<'div'> {
|
|
17
|
+
}
|
|
18
|
+
export declare const GridListCell: React.ForwardRefExoticComponent<GridListCellProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { sui } from "../../system/index.js";
|
|
4
|
+
import { mergeRefs } from "../../utils/index.js";
|
|
5
|
+
import { GridListProvider, useGridList, useGridListItem, } from "./grid-list.context.js";
|
|
6
|
+
/**
|
|
7
|
+
* React component to render lists of data
|
|
8
|
+
*/
|
|
9
|
+
export const GridListRoot = React.forwardRef((props, ref) => {
|
|
10
|
+
const { children, ...rest } = props;
|
|
11
|
+
const { listProps, ...context } = useGridList(props);
|
|
12
|
+
return (_jsx(GridListProvider, { value: context, children: _jsx(sui.div, { ref: mergeRefs(ref, context.containerRef), role: "grid", "aria-readonly": true, ...rest, ...listProps, children: children }) }));
|
|
13
|
+
});
|
|
14
|
+
export const GridListHeader = React.forwardRef((props, ref) => {
|
|
15
|
+
const { children, ...rest } = props;
|
|
16
|
+
return (_jsx(sui.div, { ref: ref, role: "columnheader", ...rest, children: children }));
|
|
17
|
+
});
|
|
18
|
+
export const GridListItem = React.forwardRef((props, ref) => {
|
|
19
|
+
const { children, disabled, id, onClick, onFocus, onKeyDown, ...rest } = props;
|
|
20
|
+
const { itemProps } = useGridListItem({
|
|
21
|
+
disabled,
|
|
22
|
+
id,
|
|
23
|
+
onClick,
|
|
24
|
+
onFocus,
|
|
25
|
+
onKeyDown,
|
|
26
|
+
});
|
|
27
|
+
return (_jsx(sui.div, { ref: ref, role: "row", ...rest, ...itemProps, children: children }));
|
|
28
|
+
});
|
|
29
|
+
export const GridListCell = React.forwardRef((props, ref) => {
|
|
30
|
+
const { children, ...rest } = props;
|
|
31
|
+
return (_jsx(sui.div, { ref: ref, role: "gridcell", ...rest, children: children }));
|
|
32
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * as GridList from './namespace.ts';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { GridListRoot as Root, GridListHeader as Header, GridListItem as Item, GridListCell as Cell, } from './grid-list.tsx';
|
|
2
|
+
export type { GridListRootProps as RootProps, GridListHeaderProps as HeaderProps, GridListItemProps as ItemProps, GridListCellProps as CellProps, } from './grid-list.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridListRoot as Root, GridListHeader as Header, GridListItem as Item, GridListCell as Cell, } from "./grid-list.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * as Navbar from './namespace.ts';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { NavbarRoot as Root, NavbarContent as Content, NavbarBrand as Brand, NavbarItemGroup as ItemGroup, NavbarItem as Item, NavbarLink as Link, } from './navbar.tsx';
|
|
2
|
+
export type { NavbarRootProps as RootProps, NavbarItemProps as ItemProps, NavbarLinkProps as LinkProps, } from './navbar.tsx';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavbarRoot as Root, NavbarContent as Content, NavbarBrand as Brand, NavbarItemGroup as ItemGroup, NavbarItem as Item, NavbarLink as Link, } from "./navbar.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type HTMLSystemProps } from '../../system/index.ts';
|
|
3
|
+
import { UseNavbarProps } from './use-navbar.ts';
|
|
4
|
+
export declare const NavbarProvider: React.Provider<{
|
|
5
|
+
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
height: string | number;
|
|
7
|
+
hidden: boolean;
|
|
8
|
+
shouldHideOnScroll: boolean;
|
|
9
|
+
rootProps: {
|
|
10
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
11
|
+
'data-hidden': boolean | "true" | "false";
|
|
12
|
+
'data-at-top': boolean | "true" | "false";
|
|
13
|
+
style: {
|
|
14
|
+
'--navbar-height': string | number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}>, useNavbarContext: () => {
|
|
18
|
+
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
19
|
+
height: string | number;
|
|
20
|
+
hidden: boolean;
|
|
21
|
+
shouldHideOnScroll: boolean;
|
|
22
|
+
rootProps: {
|
|
23
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
'data-hidden': boolean | "true" | "false";
|
|
25
|
+
'data-at-top': boolean | "true" | "false";
|
|
26
|
+
style: {
|
|
27
|
+
'--navbar-height': string | number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export interface NavbarRootProps extends UseNavbarProps, Omit<HTMLSystemProps<'div'>, 'height'> {
|
|
32
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
33
|
+
}
|
|
34
|
+
export declare const NavbarRoot: React.ForwardRefExoticComponent<Omit<NavbarRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export declare const NavbarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export declare const NavbarBrand: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export declare const NavbarItemGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLUListElement>>;
|
|
38
|
+
export interface NavbarItemProps extends HTMLSystemProps<'li'> {
|
|
39
|
+
}
|
|
40
|
+
export declare const NavbarItem: React.ForwardRefExoticComponent<NavbarItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
41
|
+
export interface NavbarLinkProps extends HTMLSystemProps<'a'> {
|
|
42
|
+
}
|
|
43
|
+
export declare const NavbarLink: React.ForwardRefExoticComponent<NavbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { sui } from "../../system/index.js";
|
|
5
|
+
import { createContext } from "../../utils/index.js";
|
|
6
|
+
import { splitNavbarProps, useNavbar } from "./use-navbar.js";
|
|
7
|
+
export const [NavbarProvider, useNavbarContext] = createContext({
|
|
8
|
+
name: 'NavbarContext',
|
|
9
|
+
strict: true,
|
|
10
|
+
errorMessage: 'useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />',
|
|
11
|
+
});
|
|
12
|
+
export const NavbarRoot = forwardRef((props, ref) => {
|
|
13
|
+
const { children, ...rest } = props;
|
|
14
|
+
const [navbarProps, rootProps] = splitNavbarProps(rest);
|
|
15
|
+
const context = useNavbar({ ...navbarProps, ref });
|
|
16
|
+
return (_jsx(NavbarProvider, { value: context, children: _jsx(sui.div, { ...rootProps, ...context.rootProps, style: {
|
|
17
|
+
'--navbar-height': context.height,
|
|
18
|
+
...props.style,
|
|
19
|
+
}, children: children }) }));
|
|
20
|
+
});
|
|
21
|
+
export const NavbarContent = forwardRef((props, ref) => {
|
|
22
|
+
return _jsx(sui.div, { ...props, ref: ref });
|
|
23
|
+
});
|
|
24
|
+
export const NavbarBrand = forwardRef((props, ref) => {
|
|
25
|
+
return _jsx(sui.div, { ...props, ref: ref });
|
|
26
|
+
});
|
|
27
|
+
export const NavbarItemGroup = forwardRef((props, ref) => {
|
|
28
|
+
return _jsx(sui.ul, { ...props, ref: ref });
|
|
29
|
+
});
|
|
30
|
+
export const NavbarItem = forwardRef((props, ref) => {
|
|
31
|
+
return _jsx(sui.li, { ...props, ref: ref });
|
|
32
|
+
});
|
|
33
|
+
export const NavbarLink = forwardRef((props, ref) => {
|
|
34
|
+
return _jsx(sui.a, { ...props, ref: ref });
|
|
35
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const splitNavbarProps: <T extends Record<string, any>>(props: T) => [Pick<T, "parentRef" | "height" | "shouldHideOnScroll" | "disableScrollHandler" | "onScrollPositionChange">, Omit<T, "parentRef" | "height" | "shouldHideOnScroll" | "disableScrollHandler" | "onScrollPositionChange">];
|
|
3
|
+
export interface UseNavbarProps {
|
|
4
|
+
/**
|
|
5
|
+
* Ref to the DOM node.
|
|
6
|
+
*/
|
|
7
|
+
ref: React.ForwardedRef<HTMLDivElement>;
|
|
8
|
+
/**
|
|
9
|
+
* The parent element where the navbar is placed within.
|
|
10
|
+
* This is used to determine the scroll position and whether the navbar should be hidden or not.
|
|
11
|
+
* @default `window`
|
|
12
|
+
*/
|
|
13
|
+
parentRef?: React.RefObject<HTMLElement>;
|
|
14
|
+
/**
|
|
15
|
+
* The height of the navbar.
|
|
16
|
+
* @default "3.5rem" (56px)
|
|
17
|
+
*/
|
|
18
|
+
height?: number | string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the navbar should hide on scroll or not.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
shouldHideOnScroll?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the navbar parent scroll event should be listened to or not.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disableScrollHandler?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The scroll event handler for the navbar. The event fires when the navbar parent element is scrolled.
|
|
31
|
+
* it only works if `disableScrollHandler` is set to `false` or `shouldHideOnScroll` is set to `true`.
|
|
32
|
+
*/
|
|
33
|
+
onScrollPositionChange?: (scrollPosition: number) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useNavbar(props: UseNavbarProps): {
|
|
36
|
+
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
37
|
+
height: string | number;
|
|
38
|
+
hidden: boolean;
|
|
39
|
+
shouldHideOnScroll: boolean;
|
|
40
|
+
rootProps: {
|
|
41
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
42
|
+
'data-hidden': boolean | "true" | "false";
|
|
43
|
+
'data-at-top': boolean | "true" | "false";
|
|
44
|
+
style: {
|
|
45
|
+
'--navbar-height': string | number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type UseNavbarReturn = ReturnType<typeof useNavbar>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import { useResizeObserver } from '@react-aria/utils';
|
|
3
|
+
import { useScrollPosition } from '@saas-ui/hooks';
|
|
4
|
+
import { dataAttr, splitProps } from "../../utils/index.js";
|
|
5
|
+
export const splitNavbarProps = (props) => splitProps(props, [
|
|
6
|
+
'parentRef',
|
|
7
|
+
'height',
|
|
8
|
+
'shouldHideOnScroll',
|
|
9
|
+
'disableScrollHandler',
|
|
10
|
+
'onScrollPositionChange',
|
|
11
|
+
]);
|
|
12
|
+
export function useNavbar(props) {
|
|
13
|
+
const { ref, parentRef, height = '3.5rem', shouldHideOnScroll = false, disableScrollHandler = false, onScrollPositionChange, } = props;
|
|
14
|
+
const rootRef = useRef(null);
|
|
15
|
+
useImperativeHandle(ref, () => rootRef.current);
|
|
16
|
+
const prevWidth = useRef(0);
|
|
17
|
+
const navHeight = useRef(0);
|
|
18
|
+
const [hidden, setHidden] = useState(false);
|
|
19
|
+
const [atTop, setAtTop] = useState(true);
|
|
20
|
+
const updateWidth = () => {
|
|
21
|
+
if (rootRef.current) {
|
|
22
|
+
const width = rootRef.current.offsetWidth;
|
|
23
|
+
if (width !== prevWidth.current) {
|
|
24
|
+
prevWidth.current = width;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
useResizeObserver({
|
|
29
|
+
ref: rootRef,
|
|
30
|
+
onResize: () => {
|
|
31
|
+
const currentWidth = rootRef.current?.offsetWidth;
|
|
32
|
+
if (currentWidth !== prevWidth.current) {
|
|
33
|
+
updateWidth();
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
updateWidth();
|
|
39
|
+
navHeight.current = rootRef.current?.offsetHeight || 0;
|
|
40
|
+
}, []);
|
|
41
|
+
useScrollPosition({
|
|
42
|
+
elementRef: parentRef,
|
|
43
|
+
isEnabled: shouldHideOnScroll || !disableScrollHandler,
|
|
44
|
+
callback: ({ prevPos, currPos }) => {
|
|
45
|
+
onScrollPositionChange?.(currPos.y);
|
|
46
|
+
setAtTop(currPos.y === 0);
|
|
47
|
+
if (shouldHideOnScroll) {
|
|
48
|
+
setHidden((prev) => {
|
|
49
|
+
const next = currPos.y > prevPos.y && currPos.y > navHeight.current;
|
|
50
|
+
return next !== prev ? next : prev;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
const rootProps = {
|
|
56
|
+
ref: rootRef,
|
|
57
|
+
'data-hidden': dataAttr(hidden),
|
|
58
|
+
'data-at-top': dataAttr(atTop),
|
|
59
|
+
style: {
|
|
60
|
+
'--navbar-height': height,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
rootRef,
|
|
65
|
+
height,
|
|
66
|
+
hidden,
|
|
67
|
+
shouldHideOnScroll,
|
|
68
|
+
rootProps,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export * as Sidebar from './namespace.ts';
|
|
2
|
+
export { useSidebar, useSidebarTrigger, type SidebarProviderProps, } from './sidebar.context.tsx';
|
|
3
|
+
export type { UseSidebarReturn } from './sidebar.context.tsx';
|
|
4
|
+
export type { SidebarMode, SidebarOptions, SidebarOptions as RootBaseProps, } from './sidebar.types.ts';
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
sidebar_exports,
|
|
4
|
-
useSidebar,
|
|
5
|
-
useSidebarItemStyles,
|
|
6
|
-
useSidebarStyles
|
|
7
|
-
} from "../../chunk-U23VDAWJ.js";
|
|
8
|
-
import "../../chunk-RTMS5TJN.js";
|
|
9
|
-
export {
|
|
10
|
-
sidebar_exports as Sidebar,
|
|
11
|
-
useSidebar,
|
|
12
|
-
useSidebarItemStyles,
|
|
13
|
-
useSidebarStyles
|
|
14
|
-
};
|
|
1
|
+
export * as Sidebar from "./namespace.js";
|
|
2
|
+
export { useSidebar, useSidebarTrigger, } from "./sidebar.context.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SidebarRoot as Root, SidebarContext as Context, SidebarTrigger as Trigger, SidebarFlyoutTrigger as FlyoutTrigger, SidebarBackdrop as Backdrop, SidebarHeader as Header, SidebarBody as Body, SidebarFooter as Footer, SidebarTrack as Track, SidebarGroup as Group, SidebarGroupHeader as GroupHeader, SidebarGroupTitle as GroupTitle, SidebarGroupEndElement as GroupEndElement, SidebarGroupContent as GroupContent, SidebarNavItem as NavItem, SidebarNavButton as NavButton, SidebarNavItemEndElement as NavItemEndElement, } from './sidebar.tsx';
|
|
2
|
+
export type { SidebarNavButtonProps as NavButtonProps, SidebarFlyoutTriggerProps as FlyoutTriggerProps, SidebarTriggerProps as TriggerProps, } from './sidebar.tsx';
|
|
3
|
+
export type { SidebarOptions as RootBaseProps, SidebarMode as Mode, } from './sidebar.types.ts';
|
|
4
|
+
export { SidebarProvider as Provider } from './sidebar.context.tsx';
|
|
5
|
+
export type { SidebarProviderProps as ProviderProps } from './sidebar.context.tsx';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SidebarRoot as Root, SidebarContext as Context, SidebarTrigger as Trigger, SidebarFlyoutTrigger as FlyoutTrigger, SidebarBackdrop as Backdrop, SidebarHeader as Header, SidebarBody as Body, SidebarFooter as Footer, SidebarTrack as Track, SidebarGroup as Group, SidebarGroupHeader as GroupHeader, SidebarGroupTitle as GroupTitle, SidebarGroupEndElement as GroupEndElement, SidebarGroupContent as GroupContent, SidebarNavItem as NavItem, SidebarNavButton as NavButton, SidebarNavItemEndElement as NavItemEndElement, } from "./sidebar.js";
|
|
2
|
+
export { SidebarProvider as Provider } from "./sidebar.context.js";
|