@gears-frontx/ui-kit 0.3.0-alpha.2 → 0.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/accordion.d.ts +1 -0
- package/dist/accordion.js +35 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert-dialog.d.ts +1 -0
- package/dist/alert-dialog.js +97 -0
- package/dist/alert-dialog.js.map +1 -0
- package/dist/alert.d.ts +1 -0
- package/dist/alert.js +39 -0
- package/dist/alert.js.map +1 -0
- package/dist/aspect-ratio.d.ts +1 -0
- package/dist/aspect-ratio.js +19 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/attachment.d.ts +1 -0
- package/dist/attachment.js +133 -0
- package/dist/attachment.js.map +1 -0
- package/dist/avatar.d.ts +1 -0
- package/dist/avatar.js +87 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.js +33 -46
- package/dist/badge.js.map +1 -1
- package/dist/breadcrumb.d.ts +1 -0
- package/dist/breadcrumb.js +81 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/bubble.d.ts +1 -0
- package/dist/bubble.js +94 -0
- package/dist/bubble.js.map +1 -0
- package/dist/button-group.d.ts +1 -0
- package/dist/button-group.js +61 -0
- package/dist/button-group.js.map +1 -0
- package/dist/button.js +30 -29
- package/dist/button.js.map +1 -1
- package/dist/calendar.d.ts +1 -0
- package/dist/calendar.js +134 -0
- package/dist/calendar.js.map +1 -0
- package/dist/card.js +24 -24
- package/dist/carousel.d.ts +1 -0
- package/dist/carousel.js +163 -0
- package/dist/carousel.js.map +1 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +202 -0
- package/dist/chart.js.map +1 -0
- package/dist/checkbox.js +14 -39
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/accordion.X_AK08Iv.css +1 -0
- package/dist/chunks/alert-dialog.B50f-Gsz.css +1 -0
- package/dist/chunks/alert.BJLRcB65.css +1 -0
- package/dist/chunks/aspect-ratio.DJbPE7BX.css +1 -0
- package/dist/chunks/attachment.rknKEWlr.css +1 -0
- package/dist/chunks/avatar.CsQmQnay.css +1 -0
- package/dist/chunks/badge.DR0epAiZ.css +1 -0
- package/dist/chunks/breadcrumb.QKz32ceR.css +1 -0
- package/dist/chunks/bubble.BKcAopT7.css +1 -0
- package/dist/chunks/button-group.D0Ir-jbL.css +1 -0
- package/dist/chunks/button.D69BdJF1.css +1 -0
- package/dist/chunks/calendar.Cnbv4EzY.css +1 -0
- package/dist/chunks/card.D3Ct_dza.css +1 -0
- package/dist/chunks/carousel.CjaKGN_D.css +1 -0
- package/dist/chunks/chart.CeyctrXQ.css +1 -0
- package/dist/chunks/checkbox.CZfE_PkU.css +1 -0
- package/dist/chunks/collapsible.BQ-sU5sQ.css +1 -0
- package/dist/chunks/combobox.CtYpZAKB.css +1 -0
- package/dist/chunks/command.Km60IuqD.css +1 -0
- package/dist/chunks/context-menu.Bjib7_AL.css +1 -0
- package/dist/chunks/data-table.DECm3qI-.css +1 -0
- package/dist/chunks/date-picker.BcRqyOg8.css +1 -0
- package/dist/chunks/dialog.BxcZ12Gb.css +1 -0
- package/dist/chunks/drawer.BkS_qEHj.css +1 -0
- package/dist/chunks/dropdown-menu.CDaeWYDT.css +1 -0
- package/dist/chunks/empty.B334jSES.css +1 -0
- package/dist/chunks/field.yTrg1G90.css +1 -0
- package/dist/chunks/hover-card.DmwvigMp.css +1 -0
- package/dist/chunks/input-group.CFIUP-Oh.css +1 -0
- package/dist/chunks/input-otp.XSpqyVij.css +1 -0
- package/dist/chunks/input.DvA_mTq8.css +1 -0
- package/dist/chunks/item.CLg1KaYF.css +1 -0
- package/dist/chunks/kbd.DZuUVB_m.css +1 -0
- package/dist/chunks/marker.DDxI_rZn.css +1 -0
- package/dist/chunks/menubar.CxRNI9o4.css +1 -0
- package/dist/chunks/message-scroller.CbLooS7Q.css +1 -0
- package/dist/chunks/message.BhD5JDJK.css +1 -0
- package/dist/chunks/native-select.BdYLTCZv.css +1 -0
- package/dist/chunks/navigation-menu.C2JGHAKD.css +1 -0
- package/dist/chunks/pagination.DUiQuWla.css +1 -0
- package/dist/chunks/popover.fOvPrnsr.css +1 -0
- package/dist/chunks/progress.Bp13t8iw.css +1 -0
- package/dist/chunks/questionnaire.DYnuWKAQ.css +1 -0
- package/dist/chunks/radio-group.CV3MBCsI.css +1 -0
- package/dist/chunks/resizable.B71V-1lR.css +1 -0
- package/dist/chunks/scroll-area.C4kWMAsU.css +1 -0
- package/dist/chunks/select.iEwV-sfJ.css +1 -0
- package/dist/chunks/sheet.DALPg9vf.css +1 -0
- package/dist/chunks/sidebar.CGTQhfWG.css +1 -0
- package/dist/chunks/slider.B5nouD7J.css +1 -0
- package/dist/chunks/spinner.UKK4f1tu.css +1 -0
- package/dist/chunks/switch.CIW9Jr1x.css +1 -0
- package/dist/chunks/table.CFAJfhd-.css +1 -0
- package/dist/chunks/tabs.C4jGj2Vg.css +1 -0
- package/dist/chunks/textarea.ORRSI69B.css +1 -0
- package/dist/chunks/toggle-group.Bd0cCCnV.css +1 -0
- package/dist/chunks/toggle.B9tvfl1n.css +1 -0
- package/dist/collapsible.d.ts +1 -0
- package/dist/collapsible.js +22 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/combobox.d.ts +1 -0
- package/dist/combobox.js +159 -0
- package/dist/combobox.js.map +1 -0
- package/dist/command.d.ts +1 -0
- package/dist/command.js +75 -0
- package/dist/command.js.map +1 -0
- package/dist/components/accordion/accordion.d.ts +24 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/public.d.ts +2 -0
- package/dist/components/accordion/public.d.ts.map +1 -0
- package/dist/components/alert/alert.d.ts +21 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/public.d.ts +2 -0
- package/dist/components/alert/public.d.ts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +95 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/public.d.ts +2 -0
- package/dist/components/alert-dialog/public.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/public.d.ts +2 -0
- package/dist/components/aspect-ratio/public.d.ts.map +1 -0
- package/dist/components/attachment/attachment.d.ts +71 -0
- package/dist/components/attachment/attachment.d.ts.map +1 -0
- package/dist/components/attachment/public.d.ts +2 -0
- package/dist/components/attachment/public.d.ts.map +1 -0
- package/dist/components/avatar/avatar.d.ts +40 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/public.d.ts +2 -0
- package/dist/components/avatar/public.d.ts.map +1 -0
- package/dist/components/badge/badge.d.ts +3 -16
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/public.d.ts +1 -1
- package/dist/components/badge/public.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/public.d.ts +2 -0
- package/dist/components/breadcrumb/public.d.ts.map +1 -0
- package/dist/components/bubble/bubble.d.ts +35 -0
- package/dist/components/bubble/bubble.d.ts.map +1 -0
- package/dist/components/bubble/public.d.ts +2 -0
- package/dist/components/bubble/public.d.ts.map +1 -0
- package/dist/components/button/button.d.ts +1 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/public.d.ts +1 -1
- package/dist/components/button/public.d.ts.map +1 -1
- package/dist/components/button-group/button-group.d.ts +17 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/public.d.ts +2 -0
- package/dist/components/button-group/public.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/public.d.ts +2 -0
- package/dist/components/calendar/public.d.ts.map +1 -0
- package/dist/components/carousel/carousel.d.ts +43 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/public.d.ts +2 -0
- package/dist/components/carousel/public.d.ts.map +1 -0
- package/dist/components/chart/chart.d.ts +48 -0
- package/dist/components/chart/chart.d.ts.map +1 -0
- package/dist/components/chart/public.d.ts +2 -0
- package/dist/components/chart/public.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.d.ts +14 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/public.d.ts +2 -0
- package/dist/components/collapsible/public.d.ts.map +1 -0
- package/dist/components/combobox/combobox.d.ts +128 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/public.d.ts +2 -0
- package/dist/components/combobox/public.d.ts.map +1 -0
- package/dist/components/command/command.d.ts +44 -0
- package/dist/components/command/command.d.ts.map +1 -0
- package/dist/components/command/public.d.ts +2 -0
- package/dist/components/command/public.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.d.ts +82 -0
- package/dist/components/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu/public.d.ts +2 -0
- package/dist/components/context-menu/public.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +81 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-table/public.d.ts +2 -0
- package/dist/components/data-table/public.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +76 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/public.d.ts +2 -0
- package/dist/components/date-picker/public.d.ts.map +1 -0
- package/dist/components/dialog/dialog.d.ts +12 -3
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/direction/direction.d.ts +2 -0
- package/dist/components/direction/direction.d.ts.map +1 -0
- package/dist/components/direction/public.d.ts +2 -0
- package/dist/components/direction/public.d.ts.map +1 -0
- package/dist/components/drawer/drawer.d.ts +83 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/public.d.ts +2 -0
- package/dist/components/drawer/public.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -4
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/empty/empty.d.ts +23 -0
- package/dist/components/empty/empty.d.ts.map +1 -0
- package/dist/components/empty/public.d.ts +2 -0
- package/dist/components/empty/public.d.ts.map +1 -0
- package/dist/components/field/field.d.ts +33 -12
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/public.d.ts +1 -1
- package/dist/components/field/public.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.d.ts +33 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/public.d.ts +2 -0
- package/dist/components/hover-card/public.d.ts.map +1 -0
- package/dist/components/input-group/input-group.d.ts +38 -0
- package/dist/components/input-group/input-group.d.ts.map +1 -0
- package/dist/components/input-group/public.d.ts +2 -0
- package/dist/components/input-group/public.d.ts.map +1 -0
- package/dist/components/input-otp/input-otp.d.ts +17 -0
- package/dist/components/input-otp/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp/public.d.ts +2 -0
- package/dist/components/input-otp/public.d.ts.map +1 -0
- package/dist/components/item/item.d.ts +47 -0
- package/dist/components/item/item.d.ts.map +1 -0
- package/dist/components/item/public.d.ts +2 -0
- package/dist/components/item/public.d.ts.map +1 -0
- package/dist/components/kbd/kbd.d.ts +8 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/public.d.ts +2 -0
- package/dist/components/kbd/public.d.ts.map +1 -0
- package/dist/components/marker/marker.d.ts +19 -0
- package/dist/components/marker/marker.d.ts.map +1 -0
- package/dist/components/marker/public.d.ts +2 -0
- package/dist/components/marker/public.d.ts.map +1 -0
- package/dist/components/menubar/menubar.d.ts +57 -0
- package/dist/components/menubar/menubar.d.ts.map +1 -0
- package/dist/components/menubar/public.d.ts +2 -0
- package/dist/components/menubar/public.d.ts.map +1 -0
- package/dist/components/message/message.d.ts +35 -0
- package/dist/components/message/message.d.ts.map +1 -0
- package/dist/components/message/public.d.ts +2 -0
- package/dist/components/message/public.d.ts.map +1 -0
- package/dist/components/message-scroller/message-scroller.d.ts +75 -0
- package/dist/components/message-scroller/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller/public.d.ts +2 -0
- package/dist/components/message-scroller/public.d.ts.map +1 -0
- package/dist/components/native-select/native-select.d.ts +14 -0
- package/dist/components/native-select/native-select.d.ts.map +1 -0
- package/dist/components/native-select/public.d.ts +2 -0
- package/dist/components/native-select/public.d.ts.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +83 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu/public.d.ts +2 -0
- package/dist/components/navigation-menu/public.d.ts.map +1 -0
- package/dist/components/pagination/pagination.d.ts +37 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/public.d.ts +2 -0
- package/dist/components/pagination/public.d.ts.map +1 -0
- package/dist/components/popover/popover.d.ts +32 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/public.d.ts +2 -0
- package/dist/components/popover/public.d.ts.map +1 -0
- package/dist/components/progress/progress.d.ts +22 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/public.d.ts +2 -0
- package/dist/components/progress/public.d.ts.map +1 -0
- package/dist/components/questionnaire/public.d.ts +2 -0
- package/dist/components/questionnaire/public.d.ts.map +1 -0
- package/dist/components/questionnaire/questionnaire.d.ts +192 -0
- package/dist/components/questionnaire/questionnaire.d.ts.map +1 -0
- package/dist/components/resizable/public.d.ts +2 -0
- package/dist/components/resizable/public.d.ts.map +1 -0
- package/dist/components/resizable/resizable.d.ts +12 -0
- package/dist/components/resizable/resizable.d.ts.map +1 -0
- package/dist/components/scroll-area/public.d.ts +2 -0
- package/dist/components/scroll-area/public.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +10 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/select/select.d.ts +3 -5
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/sheet/public.d.ts +2 -0
- package/dist/components/sheet/public.d.ts.map +1 -0
- package/dist/components/sheet/sheet.d.ts +56 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sidebar/public.d.ts +2 -0
- package/dist/components/sidebar/public.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +167 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/use-mobile.d.ts +18 -0
- package/dist/components/sidebar/use-mobile.d.ts.map +1 -0
- package/dist/components/slider/public.d.ts +2 -0
- package/dist/components/slider/public.d.ts.map +1 -0
- package/dist/components/slider/slider.d.ts +6 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/spinner/public.d.ts +2 -0
- package/dist/components/spinner/public.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +4 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toggle/public.d.ts +2 -0
- package/dist/components/toggle/public.d.ts.map +1 -0
- package/dist/components/toggle/toggle.d.ts +11 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle-group/public.d.ts +2 -0
- package/dist/components/toggle-group/public.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +1 -4
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/context-menu.d.ts +1 -0
- package/dist/context-menu.js +201 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/data-table.d.ts +1 -0
- package/dist/data-table.js +162 -0
- package/dist/data-table.js.map +1 -0
- package/dist/date-picker.d.ts +1 -0
- package/dist/date-picker.js +175 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/dialog.js +40 -55
- package/dist/dialog.js.map +1 -1
- package/dist/direction.d.ts +1 -0
- package/dist/direction.js +6 -0
- package/dist/direction.js.map +1 -0
- package/dist/docs/accordion.md +86 -0
- package/dist/docs/alert-dialog.md +151 -0
- package/dist/docs/alert.md +74 -0
- package/dist/docs/aspect-ratio.md +65 -0
- package/dist/docs/attachment.md +254 -0
- package/dist/docs/avatar.md +185 -0
- package/dist/docs/badge.md +72 -60
- package/dist/docs/breadcrumb.md +86 -0
- package/dist/docs/bubble.md +233 -0
- package/dist/docs/button-group.md +107 -0
- package/dist/docs/calendar.md +114 -0
- package/dist/docs/card.md +15 -7
- package/dist/docs/carousel.md +152 -0
- package/dist/docs/chart.md +174 -0
- package/dist/docs/collapsible.md +80 -0
- package/dist/docs/combobox.md +192 -0
- package/dist/docs/command.md +171 -0
- package/dist/docs/context-menu.md +173 -0
- package/dist/docs/data-table.md +183 -0
- package/dist/docs/date-picker.md +137 -0
- package/dist/docs/dialog.md +33 -0
- package/dist/docs/direction.md +51 -0
- package/dist/docs/drawer.md +242 -0
- package/dist/docs/empty.md +80 -0
- package/dist/docs/field.md +105 -38
- package/dist/docs/hover-card.md +81 -0
- package/dist/docs/input-group.md +158 -0
- package/dist/docs/input-otp.md +116 -0
- package/dist/docs/input.md +31 -20
- package/dist/docs/item.md +106 -0
- package/dist/docs/kbd.md +53 -0
- package/dist/docs/marker.md +178 -0
- package/dist/docs/menubar.md +108 -0
- package/dist/docs/message-scroller.md +221 -0
- package/dist/docs/message.md +183 -0
- package/dist/docs/native-select.md +93 -0
- package/dist/docs/navigation-menu.md +176 -0
- package/dist/docs/pagination.md +96 -0
- package/dist/docs/popover.md +87 -0
- package/dist/docs/progress.md +58 -0
- package/dist/docs/questionnaire.md +311 -0
- package/dist/docs/resizable.md +95 -0
- package/dist/docs/scroll-area.md +93 -0
- package/dist/docs/sheet.md +168 -0
- package/dist/docs/sidebar.md +309 -0
- package/dist/docs/slider.md +66 -0
- package/dist/docs/spinner.md +55 -0
- package/dist/docs/table.md +85 -20
- package/dist/docs/textarea.md +19 -2
- package/dist/docs/toggle-group.md +77 -0
- package/dist/docs/toggle.md +58 -0
- package/dist/docs/typeset.md +75 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +120 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown-menu.js +98 -129
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/empty.d.ts +1 -0
- package/dist/empty.js +50 -0
- package/dist/empty.js.map +1 -0
- package/dist/field.js +105 -20
- package/dist/field.js.map +1 -1
- package/dist/hover-card.d.ts +1 -0
- package/dist/hover-card.js +44 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +431 -93
- package/dist/index.js.map +1 -1
- package/dist/input-group.d.ts +1 -0
- package/dist/input-group.js +91 -0
- package/dist/input-group.js.map +1 -0
- package/dist/input-otp.d.ts +1 -0
- package/dist/input-otp.js +28 -0
- package/dist/input-otp.js.map +1 -0
- package/dist/input.js +17 -17
- package/dist/item.d.ts +1 -0
- package/dist/item.js +107 -0
- package/dist/item.js.map +1 -0
- package/dist/kbd.d.ts +1 -0
- package/dist/kbd.js +17 -0
- package/dist/kbd.js.map +1 -0
- package/dist/marker.d.ts +1 -0
- package/dist/marker.js +52 -0
- package/dist/marker.js.map +1 -0
- package/dist/menubar.d.ts +1 -0
- package/dist/menubar.js +50 -0
- package/dist/menubar.js.map +1 -0
- package/dist/message-scroller.d.ts +1 -0
- package/dist/message-scroller.js +69 -0
- package/dist/message-scroller.js.map +1 -0
- package/dist/message.d.ts +1 -0
- package/dist/message.js +37 -0
- package/dist/message.js.map +1 -0
- package/dist/native-select.d.ts +1 -0
- package/dist/native-select.js +42 -0
- package/dist/native-select.js.map +1 -0
- package/dist/navigation-menu.d.ts +1 -0
- package/dist/navigation-menu.js +97 -0
- package/dist/navigation-menu.js.map +1 -0
- package/dist/pagination.d.ts +1 -0
- package/dist/pagination.js +104 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +1 -0
- package/dist/popover.js +59 -0
- package/dist/popover.js.map +1 -0
- package/dist/progress.d.ts +1 -0
- package/dist/progress.js +36 -0
- package/dist/progress.js.map +1 -0
- package/dist/questionnaire.d.ts +1 -0
- package/dist/questionnaire.js +209 -0
- package/dist/questionnaire.js.map +1 -0
- package/dist/radio-group.js +7 -7
- package/dist/resizable.d.ts +1 -0
- package/dist/resizable.js +24 -0
- package/dist/resizable.js.map +1 -0
- package/dist/scroll-area.d.ts +1 -0
- package/dist/scroll-area.js +32 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.js +83 -107
- package/dist/select.js.map +1 -1
- package/dist/sheet.d.ts +1 -0
- package/dist/sheet.js +94 -0
- package/dist/sheet.js.map +1 -0
- package/dist/sidebar.d.ts +1 -0
- package/dist/sidebar.js +386 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/slider.d.ts +1 -0
- package/dist/slider.js +40 -0
- package/dist/slider.js.map +1 -0
- package/dist/spinner.d.ts +1 -0
- package/dist/spinner.js +21 -0
- package/dist/spinner.js.map +1 -0
- package/dist/switch.js +11 -11
- package/dist/table.js +34 -35
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +17 -17
- package/dist/textarea.js +14 -7
- package/dist/textarea.js.map +1 -1
- package/dist/theme.css +35 -20
- package/dist/toast.js +55 -164
- package/dist/toast.js.map +1 -1
- package/dist/toggle-group.d.ts +1 -0
- package/dist/toggle-group.js +46 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.d.ts +1 -0
- package/dist/toggle.js +39 -0
- package/dist/toggle.js.map +1 -0
- package/dist/tooltip.js.map +1 -1
- package/dist/typeset.css +532 -0
- package/dist/utilities.css +583 -0
- package/llms.txt +268 -18
- package/package.json +16 -3
- package/dist/chunks/badge.BcdxDzJ7.css +0 -1
- package/dist/chunks/button.DNo8DTR3.css +0 -1
- package/dist/chunks/card.B0AcyAT1.css +0 -1
- package/dist/chunks/checkbox.D3kdAalh.css +0 -1
- package/dist/chunks/dialog.D6LS2vnG.css +0 -1
- package/dist/chunks/dropdown-menu.DmDZc5gB.css +0 -1
- package/dist/chunks/field.BNZx8HfN.css +0 -1
- package/dist/chunks/input.C8RDCC-a.css +0 -1
- package/dist/chunks/radio-group.zAFY9yCF.css +0 -1
- package/dist/chunks/select.Dt0diN4P.css +0 -1
- package/dist/chunks/switch.CsaIRnCA.css +0 -1
- package/dist/chunks/table.BuWHXL6e.css +0 -1
- package/dist/chunks/tabs.KEksCAxN.css +0 -1
- package/dist/chunks/textarea.N3iiWUuz.css +0 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Sidebar
|
|
2
|
+
|
|
3
|
+
A composable application-shell sidebar: an expand/collapse state machine
|
|
4
|
+
(`SidebarProvider` + `useSidebar`) plus ~20 layout parts composed under it.
|
|
5
|
+
Persists its desktop open state in a cookie, toggles on Cmd/Ctrl+B, and
|
|
6
|
+
switches to a slide-in `Sheet` on mobile automatically. Built entirely from
|
|
7
|
+
other kit parts — `Sheet`, `Button`, `Input`, `Separator`, `Skeleton`,
|
|
8
|
+
`Tooltip` — plus an internal `useIsMobile` hook (not exported; if a
|
|
9
|
+
consumer needs the same breakpoint elsewhere, write their own).
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- A persistent app-shell navigation panel: sections, nav links, a search
|
|
14
|
+
field, a user menu in the footer — the layout shadcn's own dashboard
|
|
15
|
+
blocks are built around.
|
|
16
|
+
|
|
17
|
+
## When not to use
|
|
18
|
+
|
|
19
|
+
- A transient, dismiss-on-action panel (filters, a form, item details) —
|
|
20
|
+
use `Sheet` or `Drawer` directly; Sidebar's whole design is a
|
|
21
|
+
persistent, cookie-remembered part of the shell, not a one-off overlay.
|
|
22
|
+
- A dropdown-style nav menu — use `NavigationMenu` or `DropdownMenu`.
|
|
23
|
+
|
|
24
|
+
## Setup
|
|
25
|
+
|
|
26
|
+
Wrap the whole shell in `SidebarProvider`, with `Sidebar` and
|
|
27
|
+
`SidebarInset` as siblings inside it — NOT `Sidebar` wrapping
|
|
28
|
+
`SidebarInset`:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import {
|
|
32
|
+
Sidebar,
|
|
33
|
+
SidebarContent,
|
|
34
|
+
SidebarFooter,
|
|
35
|
+
SidebarGroup,
|
|
36
|
+
SidebarGroupContent,
|
|
37
|
+
SidebarGroupLabel,
|
|
38
|
+
SidebarHeader,
|
|
39
|
+
SidebarInset,
|
|
40
|
+
SidebarMenu,
|
|
41
|
+
SidebarMenuButton,
|
|
42
|
+
SidebarMenuItem,
|
|
43
|
+
SidebarProvider,
|
|
44
|
+
SidebarTrigger,
|
|
45
|
+
} from '@gears-frontx/ui-kit';
|
|
46
|
+
|
|
47
|
+
function AppShell() {
|
|
48
|
+
return (
|
|
49
|
+
<SidebarProvider>
|
|
50
|
+
<Sidebar>
|
|
51
|
+
<SidebarHeader>Acme Inc</SidebarHeader>
|
|
52
|
+
<SidebarContent>
|
|
53
|
+
<SidebarGroup>
|
|
54
|
+
<SidebarGroupLabel>Platform</SidebarGroupLabel>
|
|
55
|
+
<SidebarGroupContent>
|
|
56
|
+
<SidebarMenu>
|
|
57
|
+
<SidebarMenuItem>
|
|
58
|
+
<SidebarMenuButton isActive>
|
|
59
|
+
<HomeIcon />
|
|
60
|
+
<span>Home</span>
|
|
61
|
+
</SidebarMenuButton>
|
|
62
|
+
</SidebarMenuItem>
|
|
63
|
+
</SidebarMenu>
|
|
64
|
+
</SidebarGroupContent>
|
|
65
|
+
</SidebarGroup>
|
|
66
|
+
</SidebarContent>
|
|
67
|
+
<SidebarFooter>v1.0</SidebarFooter>
|
|
68
|
+
</Sidebar>
|
|
69
|
+
<SidebarInset>
|
|
70
|
+
<SidebarTrigger />
|
|
71
|
+
{/* page content */}
|
|
72
|
+
</SidebarInset>
|
|
73
|
+
</SidebarProvider>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`SidebarMenuButton`/`SidebarMenuSubButton` expect children shaped as
|
|
79
|
+
`<Icon /><span>Label</span>` — the trailing `<span>` is what truncates
|
|
80
|
+
with an ellipsis. An icon-only button (no label span) works too; a bare
|
|
81
|
+
text node does not truncate.
|
|
82
|
+
|
|
83
|
+
Collapsed to the icon rail the row becomes a 32px square with room for
|
|
84
|
+
exactly one 16px icon, so **every child after the first is hidden**. That
|
|
85
|
+
covers the richer shape upstream uses for header/footer rows — leading
|
|
86
|
+
mark, a text block, a trailing chevron — not just `<Icon /><span>`. Two
|
|
87
|
+
consequences worth knowing:
|
|
88
|
+
|
|
89
|
+
- Put the icon **first**. A row whose first child is the label keeps the
|
|
90
|
+
label in the rail and drops the icon.
|
|
91
|
+
- Do not set `display` in an **inline style** on a direct child of
|
|
92
|
+
`SidebarMenuButton`. Inline styles outrank the rule that hides it, so
|
|
93
|
+
the child stays in the 32px square and pushes the icon out of the box.
|
|
94
|
+
Style a nested wrapper instead, or use a class.
|
|
95
|
+
|
|
96
|
+
### Layout: the panel is `position: fixed`
|
|
97
|
+
|
|
98
|
+
The desktop panel is fixed (upstream's own choice) so it stays pinned
|
|
99
|
+
while `SidebarInset` scrolls the page. That resolves against the
|
|
100
|
+
**viewport**, so a Sidebar placed inside a bounded box — a preview frame,
|
|
101
|
+
a split pane, a dashboard card — escapes that box unless an ancestor
|
|
102
|
+
establishes a containing block for fixed descendants:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
<div style={{ contain: 'layout paint', height: '30rem' }}>
|
|
106
|
+
<SidebarProvider style={{ minHeight: '100%' }}>…</SidebarProvider>
|
|
107
|
+
</div>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`transform` or `filter` on the ancestor work equally well. Nothing is
|
|
111
|
+
needed for the normal case, where the shell IS the page.
|
|
112
|
+
|
|
113
|
+
## Props
|
|
114
|
+
|
|
115
|
+
### SidebarProvider
|
|
116
|
+
|
|
117
|
+
| Prop | Type | Default |
|
|
118
|
+
|------|------|---------|
|
|
119
|
+
| `defaultOpen` | `boolean` — starting state AND an opt-out of the cookie | persisted cookie, else `true` |
|
|
120
|
+
| `open` | `boolean` — controlled desktop open state | — |
|
|
121
|
+
| `onOpenChange` | `(open: boolean) => void` | — |
|
|
122
|
+
|
|
123
|
+
Omit `defaultOpen` and the provider restores whatever was last persisted
|
|
124
|
+
(`sidebar_state`, 7 days). Pass it and it wins outright, cookie ignored.
|
|
125
|
+
That opt-out matters because the cookie is a single key for the whole
|
|
126
|
+
document: two providers on one page would otherwise read the same key and
|
|
127
|
+
move together, and `defaultOpen={false}` would silently do nothing as soon
|
|
128
|
+
as anything had ever been toggled.
|
|
129
|
+
|
|
130
|
+
`SidebarProvider` also wraps its subtree in a `TooltipProvider` with
|
|
131
|
+
`delay={0}` (upstream does the same). Collapsed to the icon rail the
|
|
132
|
+
tooltip IS the row's only label, so a hover delay would leave the nav
|
|
133
|
+
unreadable for its duration. Nesting inside your own `TooltipProvider` is
|
|
134
|
+
fine — Base UI scopes them.
|
|
135
|
+
|
|
136
|
+
### Sidebar
|
|
137
|
+
|
|
138
|
+
| Prop | Type | Default |
|
|
139
|
+
|------|------|---------|
|
|
140
|
+
| `side` | `left` \| `right` | `left` |
|
|
141
|
+
| `variant` | `sidebar` \| `floating` \| `inset` | `sidebar` |
|
|
142
|
+
| `collapsible` | `offcanvas` \| `icon` \| `none` | `offcanvas` |
|
|
143
|
+
|
|
144
|
+
`variant="inset"` also affects `SidebarInset`'s own rendering (it grows a
|
|
145
|
+
margin/radius/shadow to read as a floating card) — see `useSidebar`'s
|
|
146
|
+
`state` for driving conditional UI elsewhere in the shell.
|
|
147
|
+
|
|
148
|
+
### SidebarTrigger
|
|
149
|
+
|
|
150
|
+
| Prop | Type | Default |
|
|
151
|
+
|------|------|---------|
|
|
152
|
+
| `label` | `string` — accessible name for the icon-only button | `'Toggle Sidebar'` |
|
|
153
|
+
|
|
154
|
+
All other props are `Button` props (this IS a `Button`, `variant="ghost"
|
|
155
|
+
size="sm"`, with a fixed icon slot).
|
|
156
|
+
|
|
157
|
+
### SidebarMenuButton
|
|
158
|
+
|
|
159
|
+
| Prop | Type | Default |
|
|
160
|
+
|------|------|---------|
|
|
161
|
+
| `variant` | `default` \| `outline` | `default` |
|
|
162
|
+
| `size` | `default` \| `sm` \| `lg` | `default` |
|
|
163
|
+
| `isActive` | `boolean` — accent fill, reflected as `data-active` | `false` |
|
|
164
|
+
| `tooltip` | `string \| TooltipContentProps` — see below | — |
|
|
165
|
+
| `render` | `ReactElement` — polymorphism, e.g. render as a link | — |
|
|
166
|
+
|
|
167
|
+
`tooltip` only ever shows while the sidebar is desktop-collapsed to its
|
|
168
|
+
icon rail (`useSidebar().state === 'collapsed'` and not mobile) — pass it
|
|
169
|
+
on every icon-only nav item so the label is still reachable when
|
|
170
|
+
collapsed; it is simply never mounted otherwise, expanded or on mobile,
|
|
171
|
+
where the label is already visible next to the icon.
|
|
172
|
+
|
|
173
|
+
### SidebarMenuSubButton
|
|
174
|
+
|
|
175
|
+
| Prop | Type | Default |
|
|
176
|
+
|------|------|---------|
|
|
177
|
+
| `size` | `sm` \| `md` | `md` |
|
|
178
|
+
| `isActive` | `boolean` | `false` |
|
|
179
|
+
| `render` | `ReactElement` | — |
|
|
180
|
+
|
|
181
|
+
### SidebarMenuAction
|
|
182
|
+
|
|
183
|
+
| Prop | Type | Default |
|
|
184
|
+
|------|------|---------|
|
|
185
|
+
| `showOnHover` | `boolean` — paint only on item hover/focus-within (or `aria-expanded`) instead of always-visible | `false` |
|
|
186
|
+
|
|
187
|
+
### SidebarMenuSkeleton
|
|
188
|
+
|
|
189
|
+
| Prop | Type | Default |
|
|
190
|
+
|------|------|---------|
|
|
191
|
+
| `showIcon` | `boolean` | `false` |
|
|
192
|
+
|
|
193
|
+
Every other exported part (`SidebarContent`, `SidebarGroup`,
|
|
194
|
+
`SidebarGroupContent`, `SidebarGroupAction`, `SidebarGroupLabel`,
|
|
195
|
+
`SidebarHeader`, `SidebarFooter`, `SidebarInput`, `SidebarInset`,
|
|
196
|
+
`SidebarMenu`, `SidebarMenuItem`, `SidebarMenuBadge`, `SidebarMenuSub`,
|
|
197
|
+
`SidebarMenuSubItem`, `SidebarRail`, `SidebarSeparator`) takes only its
|
|
198
|
+
native element's own props plus `className`; `SidebarGroupLabel` and
|
|
199
|
+
`SidebarGroupAction` additionally take `render` for polymorphism (same
|
|
200
|
+
`useRender`/`mergeProps` idiom as `Badge`).
|
|
201
|
+
|
|
202
|
+
## `useSidebar()`
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const { state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar } = useSidebar();
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
`state` is `'expanded' | 'collapsed'`, derived from `open`. Throws outside
|
|
209
|
+
a `SidebarProvider` — there is no sensible default a bare consumer of the
|
|
210
|
+
hook could fall back to.
|
|
211
|
+
|
|
212
|
+
## Custom width
|
|
213
|
+
|
|
214
|
+
Override `--sidebar-width` / `--sidebar-width-icon` via `style` on
|
|
215
|
+
`SidebarProvider` — every desktop/mobile size below reads from these two,
|
|
216
|
+
inherited down to `Sidebar`/`SidebarInset` the same way `Card` shares
|
|
217
|
+
`--card-spacing` with its own parts:
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
<SidebarProvider style={{ '--sidebar-width': '20rem' }}>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Not reproduced from upstream
|
|
224
|
+
|
|
225
|
+
Row geometry is upstream's, not invented: the metrics come from
|
|
226
|
+
`apps/v4/registry/new-york-v4/ui/sidebar.tsx`, which carries the real
|
|
227
|
+
Tailwind utility strings, re-expressed on the kit's token scales
|
|
228
|
+
(`p-2` → `--space-2`, `h-8` → `--control-height-sm`, `w-5` → `--space-5`,
|
|
229
|
+
`size-4` → `--icon-size-sm`). Rows are 28/32/48px for `sm`/`default`/`lg`,
|
|
230
|
+
sub-rows 28px at both sizes, badges and actions 20px squares centred on
|
|
231
|
+
their row. The type ramp is the kit's, so body text is 15px where
|
|
232
|
+
upstream's `text-sm` is 14px.
|
|
233
|
+
|
|
234
|
+
- **Cookie read happens after mount, not during render.** Upstream's own
|
|
235
|
+
model reads the `sidebar_state` cookie in a Next.js Server Component and
|
|
236
|
+
hands the result down as `defaultOpen`, so the very first HTML byte
|
|
237
|
+
already reflects the persisted state. This kit owns no server-rendering
|
|
238
|
+
step of its own, so `SidebarProvider` reads `document.cookie` itself —
|
|
239
|
+
in an effect, not in the state initializer, so the first render is
|
|
240
|
+
identical on both sides of hydration (a server render has no cookie to
|
|
241
|
+
read and would always emit the expanded default). The cost is one frame
|
|
242
|
+
of expanded sidebar before a persisted collapsed state applies; an app
|
|
243
|
+
that owns a server render buys that frame back by reading the cookie
|
|
244
|
+
there and passing `defaultOpen`, which is upstream's model exactly. The
|
|
245
|
+
write path (toggling persists a 7-day cookie) is unchanged.
|
|
246
|
+
- **Skeleton row widths come from `useId`, not `Math.random()`.**
|
|
247
|
+
Upstream rolls each `SidebarMenuSkeleton` row's width randomly in a lazy
|
|
248
|
+
state initializer, which renders a different number on the server than
|
|
249
|
+
on the client. The rows still vary — the width is hashed from the row's
|
|
250
|
+
own `useId`, which React keeps stable across hydration and distinct
|
|
251
|
+
between siblings.
|
|
252
|
+
- **`SidebarMenuButton`'s tooltip mounts conditionally instead of using a
|
|
253
|
+
`hidden` attribute.** Upstream always mounts `TooltipContent` and flips
|
|
254
|
+
a `hidden` attribute on it depending on collapse state — correct only if
|
|
255
|
+
something declares `[hidden] { display: none }` for that popup, and this
|
|
256
|
+
kit's own `tooltip.module.css` (an existing component directory this
|
|
257
|
+
port must not edit) declares no such rule, so the popup's own
|
|
258
|
+
`display: inline-flex` would out-cascade the UA's `[hidden]` default.
|
|
259
|
+
This port instead only renders the `<Tooltip>` wrapper at all when the
|
|
260
|
+
sidebar is desktop-collapsed — same visible result, no reliance on a
|
|
261
|
+
rule that doesn't exist.
|
|
262
|
+
- **`SidebarInput` is hidden in the icon rail.** Upstream leaves it
|
|
263
|
+
alone, and its own dashboard blocks sidestep the result by hiding the
|
|
264
|
+
whole search group at the composition level — something a kit part
|
|
265
|
+
cannot ask of every consumer. There is nothing useful a text field can
|
|
266
|
+
do at 48px minus padding, so it goes when the labels go.
|
|
267
|
+
- **Every child after the first is hidden in the icon rail**, and the row
|
|
268
|
+
centers what remains. Upstream sets no `justify-content` and relies on
|
|
269
|
+
`overflow: hidden` clipping whatever does not fit, which is correct only
|
|
270
|
+
when the leading child happens to fill the 32px square exactly — with a
|
|
271
|
+
16px icon its `size="lg"` rows sit visibly left of centre, and with
|
|
272
|
+
centring added the un-hidden siblings push the icon out of the box
|
|
273
|
+
entirely. See the shape note under **Setup**.
|
|
274
|
+
- **The trailing 32px of a row with a badge or action is reserved.**
|
|
275
|
+
Upstream reserves it for an action only
|
|
276
|
+
(`group-has-data-[sidebar=menu-action]:pr-8`); a badge gets the same
|
|
277
|
+
footprint here, since a long label sliding under a count reads exactly
|
|
278
|
+
as badly as one sliding under a menu button.
|
|
279
|
+
- **No RTL icon flip on `SidebarTrigger`.** Upstream mirrors its trigger
|
|
280
|
+
icon horizontally under a dir="rtl" ancestor. This kit has no bundled
|
|
281
|
+
RTL-detection utility that a self-contained Sidebar could depend on
|
|
282
|
+
without adding a new cross-component coupling (a separate `direction`
|
|
283
|
+
component exists in the kit, but wiring it in is a decision for that
|
|
284
|
+
component's own consumers, not implicit here) — left unflipped.
|
|
285
|
+
- **`useIsMobile` starts `false`, not upstream's tri-state
|
|
286
|
+
`undefined`.** See `use-mobile.ts`'s own comment: collapsing the "not
|
|
287
|
+
measured yet" state into "assume desktop" removes a null-check every
|
|
288
|
+
caller of the hook would otherwise carry, at the cost of the same
|
|
289
|
+
one-frame flash-of-desktop-layout upstream's own `hidden md:block` CSS
|
|
290
|
+
already exists to paper over (kept here too, on `.root`).
|
|
291
|
+
|
|
292
|
+
## Anti-patterns
|
|
293
|
+
|
|
294
|
+
- Do not nest `SidebarInset` inside `Sidebar` — they are siblings under
|
|
295
|
+
`SidebarProvider`; `SidebarInset` is the MAIN content area, not part of
|
|
296
|
+
the sidebar panel.
|
|
297
|
+
- Do not read/write the `sidebar_state` cookie directly — go through
|
|
298
|
+
`SidebarProvider`'s `open`/`onOpenChange` if external state needs to
|
|
299
|
+
observe or drive it; the cookie write is an implementation detail of
|
|
300
|
+
`setOpen`, not a public contract.
|
|
301
|
+
- Do not put a bare text node in `SidebarMenuButton` — wrap it in `<span>`
|
|
302
|
+
so it gets truncation.
|
|
303
|
+
- Do not put the label before the icon, and do not set `display` inline on
|
|
304
|
+
a direct child — both break the icon rail (see **Setup**).
|
|
305
|
+
- Do not place a Sidebar inside a bounded box without giving that box
|
|
306
|
+
`contain: layout paint` (or a `transform`) — the fixed panel will escape
|
|
307
|
+
it and pin itself to the viewport.
|
|
308
|
+
- Do not call `useSidebar()` outside a `SidebarProvider` — it throws by
|
|
309
|
+
design; there is no sensible default state.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Slider
|
|
2
|
+
|
|
3
|
+
A draggable control for picking a number (or a range) from a bounded
|
|
4
|
+
scale. Wraps the Base UI Slider primitive (Root/Control/Track/Indicator/
|
|
5
|
+
Thumb): pointer drag, click-on-track, and arrow-key/Page-key input, one
|
|
6
|
+
`Thumb` per value for range sliders.
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
- A single numeric value from a continuous or stepped range: volume,
|
|
11
|
+
zoom, a price ceiling.
|
|
12
|
+
- A range of two values: a min/max price filter.
|
|
13
|
+
|
|
14
|
+
## When not to use
|
|
15
|
+
|
|
16
|
+
- A small, fixed set of discrete options — use `toggle-group` or
|
|
17
|
+
`radio-group`.
|
|
18
|
+
- Precise numeric entry — pair with (or use instead) a numeric `input`.
|
|
19
|
+
|
|
20
|
+
## Props (kit level)
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `value` / `defaultValue` | controlled / uncontrolled — a number, or a `[min, max]` array for a range | — |
|
|
25
|
+
| `onValueChange` | `(value, eventDetails) => void`, fires while dragging | — |
|
|
26
|
+
| `onValueCommitted` | `(value, eventDetails) => void`, fires once the interaction ends | — |
|
|
27
|
+
| `min` / `max` | bounds of the scale | `0` / `100` |
|
|
28
|
+
| `step` | granularity the thumb snaps to | `1` |
|
|
29
|
+
| `orientation` | `horizontal` \| `vertical` | `horizontal` |
|
|
30
|
+
| `disabled` | `boolean` | `false` |
|
|
31
|
+
| `className` | `string` — merged after the kit class | — |
|
|
32
|
+
|
|
33
|
+
Other props follow Base UI Slider.Root (`name`, `form`, `largeStep`,
|
|
34
|
+
`minStepsBetweenValues`, `thumbCollisionBehavior`, ...). The number of
|
|
35
|
+
rendered thumbs is derived from `value`/`defaultValue`'s length — a
|
|
36
|
+
`[10, 20]` default renders two thumbs automatically. Anything else is one
|
|
37
|
+
thumb, including a slider given neither prop: Base UI initializes that one
|
|
38
|
+
to the scalar `min`, so a second thumb would have no value behind it.
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { Slider } from '@gears-frontx/ui-kit';
|
|
44
|
+
|
|
45
|
+
// Single value
|
|
46
|
+
<Slider defaultValue={50} aria-label="Volume" />
|
|
47
|
+
|
|
48
|
+
// Range (two thumbs, derived from the array)
|
|
49
|
+
<Slider defaultValue={[20, 80]} aria-label="Price range" />
|
|
50
|
+
|
|
51
|
+
// Stepped, controlled
|
|
52
|
+
<Slider value={zoom} onValueChange={setZoom} min={50} max={200} step={10} aria-label="Zoom" />
|
|
53
|
+
|
|
54
|
+
// Vertical
|
|
55
|
+
<Slider orientation="vertical" defaultValue={30} aria-label="Brightness" />
|
|
56
|
+
|
|
57
|
+
// Disabled
|
|
58
|
+
<Slider defaultValue={40} disabled aria-label="Locked" />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Anti-patterns
|
|
62
|
+
|
|
63
|
+
- Do not render one without a visible label or `aria-label` — the thumb
|
|
64
|
+
is a native range input under the hood and needs an accessible name.
|
|
65
|
+
- Do not use `onValueChange` for a network call on every pixel of drag —
|
|
66
|
+
use `onValueCommitted` for anything that shouldn't fire continuously.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Spinner
|
|
2
|
+
|
|
3
|
+
A spinning loading indicator — lucide's `loader-circle` icon rotating
|
|
4
|
+
continuously via CSS. No Base UI primitive and no variant axis: a single
|
|
5
|
+
visual, sized like the kit's other small icons.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A standalone loading indicator next to text ("Saving...") or inside a
|
|
10
|
+
container that has no button of its own to carry `loading`.
|
|
11
|
+
- Building a custom loading affordance where `Button`'s own built-in
|
|
12
|
+
`loading` prop (see `button.md`) doesn't apply — e.g. a loading state
|
|
13
|
+
inside a `Card` or a table cell.
|
|
14
|
+
|
|
15
|
+
## When not to use
|
|
16
|
+
|
|
17
|
+
- Inside a `Button` — use `Button`'s `loading` prop instead; it already
|
|
18
|
+
centers a spinner, sets `aria-busy`, and keeps the button's label in the
|
|
19
|
+
accessibility tree. Reaching for this component there duplicates that
|
|
20
|
+
wiring by hand.
|
|
21
|
+
|
|
22
|
+
## Props (kit level)
|
|
23
|
+
|
|
24
|
+
`Spinner` takes no kit-specific props — every prop is the underlying
|
|
25
|
+
native `<svg>` element's props, forwarded as-is. Two attributes carry a
|
|
26
|
+
default that a consumer can still override by passing their own:
|
|
27
|
+
|
|
28
|
+
| Attribute | Default | Override for |
|
|
29
|
+
|-----------|---------|--------------|
|
|
30
|
+
| `role` | `status` | A different live-region role, if the surrounding markup already announces the loading state. |
|
|
31
|
+
| `aria-label` | `Loading` (upstream's own hardcoded string) | A localized or more specific label ("Saving changes"). |
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { Spinner } from '@gears-frontx/ui-kit';
|
|
37
|
+
|
|
38
|
+
// Standalone, with its default "Loading" label
|
|
39
|
+
<Spinner />
|
|
40
|
+
|
|
41
|
+
// Inline next to text, with a specific label
|
|
42
|
+
<p style={{ display: 'flex', alignItems: 'center', gap: 'var(--space-2)' }}>
|
|
43
|
+
<Spinner aria-label="Saving changes" />
|
|
44
|
+
Saving changes...
|
|
45
|
+
</p>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
- Do not use this inside `Button` — use `loading` there (see `button.md`);
|
|
51
|
+
`Button`'s own spinner is a separate, simpler CSS-only implementation
|
|
52
|
+
already wired to `aria-busy`.
|
|
53
|
+
- Do not drop the `aria-label` via an empty override (`aria-label=""`) —
|
|
54
|
+
a spinner with no accessible name announces nothing to assistive tech;
|
|
55
|
+
either keep the default or supply a real label.
|
package/dist/docs/table.md
CHANGED
|
@@ -90,6 +90,67 @@ scroll wrapper" above) — it does not stand between the table and its
|
|
|
90
90
|
implicit roles, since a plain ancestor `div` has no effect on a
|
|
91
91
|
descendant's own role.
|
|
92
92
|
|
|
93
|
+
## Metrics and type
|
|
94
|
+
|
|
95
|
+
Taken from the Studio Data Table frame:
|
|
96
|
+
|
|
97
|
+
| Part | Drawn | Shipped |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| Header bar height | 36px | `--control-height-md` |
|
|
100
|
+
| Header label | JetBrains Mono 10/14, uppercase | the Mono role whole (`--font-mono`, `--text-mono-*`) + `text-transform: uppercase`, in `--subtle-foreground` |
|
|
101
|
+
| Cell block padding | 12px | `--space-3` |
|
|
102
|
+
| Cell inline padding | 16px | `--space-4` |
|
|
103
|
+
| Row height (one line of text) | 40px | falls out of the padding (16 + 12 + 12); `--control-height-lg` is also pinned as a floor on `.tableCell` so an empty or sub-line cell cannot collapse the row — `height` on a table cell is a floor, not a cap |
|
|
104
|
+
| Row height (row holding a 32px control) | 56px | falls out of the same padding (32 + 12 + 12) |
|
|
105
|
+
| Row rule | 1px | `--border-width` `--border` |
|
|
106
|
+
|
|
107
|
+
The header is the one place the table leaves Inter: its column labels are
|
|
108
|
+
mono by design, and that carries through to a header rendered as a button
|
|
109
|
+
(`DataTableSortButton` inherits it rather than imposing Button's own type).
|
|
110
|
+
|
|
111
|
+
Re-measured 2026-08-20 against the frame's node geometry rather than against
|
|
112
|
+
its rendered rows. Two earlier readings took the artifacts-root /
|
|
113
|
+
artifacts-folder row (node 40001712:10911) at face value — 56px tall, one
|
|
114
|
+
line of text, therefore 56px is the single-line row height — and pinned a
|
|
115
|
+
56px floor on the cell to reproduce it. Walking that row's children shows
|
|
116
|
+
56 is not a type measurement: the row holds a 32px Row-actions button at
|
|
117
|
+
y=12 and a 28px readiness ring at y=14, so its height is
|
|
118
|
+
`--control-height-sm` plus 12px of air a side. The 16px text line is the
|
|
119
|
+
shortest thing in the box.
|
|
120
|
+
|
|
121
|
+
The frame states its real block padding in the variants whose rows are
|
|
122
|
+
type-driven, where no control sets the height, and every one lands on 8–12px:
|
|
123
|
+
projects (40001450:5771) draws a 58px row with its text block at y=10..46;
|
|
124
|
+
activity (40001454:5364) a 64px row at y=8..51; findings (40001453:6215) a
|
|
125
|
+
72px row at y=10..56. `--space-3` is that padding on the token scale, and it
|
|
126
|
+
reproduces the whole frame from one value instead of from a pinned number:
|
|
127
|
+
one Meta line gives 16 + 24 = 40px, a 32px control gives 32 + 24 = 56px
|
|
128
|
+
(artifacts-root exactly), two Meta lines give 32 + 24 = 56px against the
|
|
129
|
+
projects/activity rows' 58/64.
|
|
130
|
+
|
|
131
|
+
So the 56px row now falls out of the drawn control rather than being
|
|
132
|
+
asserted. That is also what fixes the case the pinned floor hid: at
|
|
133
|
+
`--space-4` the kit's own row-actions rows measured 65px against the frame's
|
|
134
|
+
56 (32 + 16 + 16, plus the rule), and because a floor only ever grows a row
|
|
135
|
+
it could not pull that overshoot back — the error stayed invisible while
|
|
136
|
+
text-only rows sat at a coincidentally correct 56. 40px is kept as a floor
|
|
137
|
+
because it is the type-driven height anyway, and it is `--control-height-lg`,
|
|
138
|
+
which is also the height the frame draws every column resize handle at across
|
|
139
|
+
all six variants (e.g. 40001452:6069, 40001450:5916) and the height of the
|
|
140
|
+
projects header band.
|
|
141
|
+
|
|
142
|
+
Cell type needs no reconciliation either: the frame sets every cell in
|
|
143
|
+
Studio/Type/UI Secondary, which is Inter 12/16 — `--text-meta-*` exactly. An
|
|
144
|
+
earlier note here recorded the drawn line as a hand-set 17 normalized up to
|
|
145
|
+
the ramp's 16; the design context reports 16 outright.
|
|
146
|
+
|
|
147
|
+
`density="compact"` drops the header to `--control-height-sm` and the cells'
|
|
148
|
+
block padding to `--space-2`, taking a type-driven row to 32px. `height`
|
|
149
|
+
resets to `auto` in the compact override — the default density's 40px floor
|
|
150
|
+
would otherwise hold every compact row at the default height, since a floor
|
|
151
|
+
only ever grows a row, never shrinks one. The frame draws no compact
|
|
152
|
+
specimen, so that step is proportional rather than measured.
|
|
153
|
+
|
|
93
154
|
## Column widths
|
|
94
155
|
|
|
95
156
|
There's no `width` prop — size a column the same way the upstream source's
|
|
@@ -105,30 +166,34 @@ wider than 100.
|
|
|
105
166
|
|
|
106
167
|
`TableRow` reads plain `data-*` attributes for its state, forwarded like any
|
|
107
168
|
other prop rather than driven by a kit-specific prop. Your own logic sets
|
|
108
|
-
the attribute; the kit only paints it.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
column).
|
|
117
|
-
- `data-state="stale"` — a
|
|
169
|
+
the attribute; the kit only paints it.
|
|
170
|
+
|
|
171
|
+
A row is flat: transparent at rest, packed against its neighbours, with a
|
|
172
|
+
single full-bleed 1px `--border` rule under it and no corner radius, ring,
|
|
173
|
+
or fill of its own. Every state below is expressed as a full-bleed tint on
|
|
174
|
+
that shape — the drawn state language of the Studio Data Table:
|
|
175
|
+
|
|
176
|
+
- `data-state="selected"` — a `--selection-subtle` tint, for a row the
|
|
177
|
+
user has selected (e.g. via a leading checkbox column).
|
|
178
|
+
- `data-state="stale"` — a `--warning-soft` tint, for a row whose data
|
|
118
179
|
needs attention (out-of-date sync, pending action).
|
|
119
|
-
- `data-state="restricted"` — a
|
|
180
|
+
- `data-state="restricted"` — a `--danger-soft` tint, for a row the
|
|
120
181
|
viewer lacks access to.
|
|
121
182
|
- Hover, and any row containing a descendant that is *currently*
|
|
122
183
|
`aria-expanded="true"` (e.g. a row-level disclosure toggle, only while
|
|
123
|
-
open — a collapsed toggle does not match) —
|
|
124
|
-
|
|
125
|
-
`--
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
184
|
+
open — a collapsed toggle does not match) — a `--muted` tint, one step
|
|
185
|
+
off both backdrops a table meets (`--surface` inside a card,
|
|
186
|
+
`--background` bare on the page). A `data-state` tint outranks hover, so
|
|
187
|
+
a selected row stays selected-colored under the pointer.
|
|
188
|
+
|
|
189
|
+
Because rows carry no fill at rest, the surface behind the table shows
|
|
190
|
+
through them — put a `Table` on a `Card`, on `DataTable`'s own card, or on
|
|
191
|
+
the page, and it takes that surface without any per-row override.
|
|
192
|
+
|
|
193
|
+
The rule under the last row of the table is dropped: below it sits either
|
|
194
|
+
the container's own bottom border or a footer bar's top border, and a
|
|
195
|
+
second line there would double it. A `<tfoot>` after the body still gets
|
|
196
|
+
its separator, since the body is then no longer the last section.
|
|
132
197
|
|
|
133
198
|
## Props (kit level)
|
|
134
199
|
|
package/dist/docs/textarea.md
CHANGED
|
@@ -7,8 +7,9 @@ elsewhere it keeps the native resize handle.
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
9
9
|
- Multi-line free text: descriptions, comments, messages.
|
|
10
|
-
- Inside a `Field`
|
|
11
|
-
|
|
10
|
+
- Inside a `Field` — wire `id`/`aria-describedby` to the surrounding
|
|
11
|
+
`FieldLabel`/`FieldDescription`/`FieldError` by hand (see field.md);
|
|
12
|
+
Textarea has no primitive to auto-register with, unlike `Input`.
|
|
12
13
|
|
|
13
14
|
## When not to use
|
|
14
15
|
|
|
@@ -26,6 +27,15 @@ All other props are native `<textarea>` props (`value`, `onChange`,
|
|
|
26
27
|
`placeholder`, `disabled`, `rows`, `aria-invalid`, ...) and are forwarded
|
|
27
28
|
as-is. `aria-invalid` switches the border and ring to the destructive color.
|
|
28
29
|
|
|
30
|
+
`rows` also sets a starting-height floor via CSS (a `--rows` custom
|
|
31
|
+
property, the same private-per-instance idiom as AspectRatio's `--ratio`):
|
|
32
|
+
`field-sizing: content` below makes the box grow with its own content, but
|
|
33
|
+
per the CSS Sizing spec that mode drops the native `rows`/`cols` attribute's
|
|
34
|
+
sizing contribution outright rather than using it as a starting point, so
|
|
35
|
+
`rows` alone renders identically to the unset default in any browser that
|
|
36
|
+
supports `field-sizing` - measured, not assumed. The floor reconstructs
|
|
37
|
+
what the attribute would have done.
|
|
38
|
+
|
|
29
39
|
## Examples
|
|
30
40
|
|
|
31
41
|
```tsx
|
|
@@ -42,6 +52,13 @@ import { Textarea } from '@gears-frontx/ui-kit';
|
|
|
42
52
|
|
|
43
53
|
// Invalid state
|
|
44
54
|
<Textarea aria-invalid={true} defaultValue={tooLong} />
|
|
55
|
+
|
|
56
|
+
// Inside a Field — id/aria-describedby wired by hand (see field.md)
|
|
57
|
+
<Field>
|
|
58
|
+
<FieldLabel htmlFor="notes">Notes</FieldLabel>
|
|
59
|
+
<Textarea id="notes" aria-describedby="notes-desc" />
|
|
60
|
+
<FieldDescription id="notes-desc">Optional context.</FieldDescription>
|
|
61
|
+
</Field>
|
|
45
62
|
```
|
|
46
63
|
|
|
47
64
|
## Anti-patterns
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# ToggleGroup
|
|
2
|
+
|
|
3
|
+
A set of related toggle buttons that share pressed state. Wraps the Base
|
|
4
|
+
UI ToggleGroup/Toggle primitives: single- or multiple-selection, arrow-key
|
|
5
|
+
navigation between items, state via `data-pressed` on each item.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A small set of related options presented as buttons: text alignment
|
|
10
|
+
(left/center/right), view mode (list/grid), a multi-select filter row.
|
|
11
|
+
|
|
12
|
+
## When not to use
|
|
13
|
+
|
|
14
|
+
- Mutually-exclusive options with more prose or more than ~6 choices —
|
|
15
|
+
use `radio-group`.
|
|
16
|
+
- A single independent on/off control — use `toggle`.
|
|
17
|
+
|
|
18
|
+
## Props (kit level)
|
|
19
|
+
|
|
20
|
+
`ToggleGroup`:
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `value` / `defaultValue` | controlled / uncontrolled array of pressed item values | — |
|
|
25
|
+
| `onValueChange` | `(values: string[], eventDetails) => void` | — |
|
|
26
|
+
| `multiple` | allow more than one item pressed at once | `false` |
|
|
27
|
+
| `orientation` | `horizontal` \| `vertical` | `horizontal` |
|
|
28
|
+
| `disabled` | disables every item in the group | `false` |
|
|
29
|
+
| `variant` | `default` \| `outline` — applied to every item unless an item overrides it | `default` |
|
|
30
|
+
| `size` | `default` \| `sm` \| `lg` — applied to every item unless an item overrides it | `default` |
|
|
31
|
+
| `className` | `string` — merged after the kit class | — |
|
|
32
|
+
|
|
33
|
+
`ToggleGroupItem`: `value` (required — identifies the item), `variant`,
|
|
34
|
+
`size` (fall back to the group's when the group sets one), `className`;
|
|
35
|
+
other props follow Base UI Toggle (`disabled`, ...).
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { ToggleGroup, ToggleGroupItem } from '@gears-frontx/ui-kit';
|
|
41
|
+
|
|
42
|
+
// Single selection (the default)
|
|
43
|
+
<ToggleGroup value={align} onValueChange={([v]) => setAlign(v)} aria-label="Text alignment">
|
|
44
|
+
<ToggleGroupItem value="left" aria-label="Align left"><AlignLeftIcon /></ToggleGroupItem>
|
|
45
|
+
<ToggleGroupItem value="center" aria-label="Align center"><AlignCenterIcon /></ToggleGroupItem>
|
|
46
|
+
<ToggleGroupItem value="right" aria-label="Align right"><AlignRightIcon /></ToggleGroupItem>
|
|
47
|
+
</ToggleGroup>
|
|
48
|
+
|
|
49
|
+
// Multiple selection
|
|
50
|
+
<ToggleGroup multiple defaultValue={['bold']} variant="outline" aria-label="Text formatting">
|
|
51
|
+
<ToggleGroupItem value="bold" aria-label="Bold"><BoldIcon /></ToggleGroupItem>
|
|
52
|
+
<ToggleGroupItem value="italic" aria-label="Italic"><ItalicIcon /></ToggleGroupItem>
|
|
53
|
+
</ToggleGroup>
|
|
54
|
+
|
|
55
|
+
// Vertical, large
|
|
56
|
+
<ToggleGroup orientation="vertical" size="lg" aria-label="View mode">
|
|
57
|
+
<ToggleGroupItem value="list" aria-label="List view"><ListIcon /></ToggleGroupItem>
|
|
58
|
+
<ToggleGroupItem value="grid" aria-label="Grid view"><GridIcon /></ToggleGroupItem>
|
|
59
|
+
</ToggleGroup>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Anti-patterns
|
|
63
|
+
|
|
64
|
+
- Do not render a `ToggleGroupItem` outside a `ToggleGroup` — pressed
|
|
65
|
+
state, arrow-key navigation, and single/multiple selection all live on
|
|
66
|
+
the group; use standalone `Toggle` instead.
|
|
67
|
+
- Do not omit `aria-label`/`aria-labelledby` on the group — it groups
|
|
68
|
+
buttons, but the group itself still needs a name for assistive tech.
|
|
69
|
+
|
|
70
|
+
## Deviation from upstream
|
|
71
|
+
|
|
72
|
+
Upstream's `spacing` prop (`0` collapses the group into a bordered
|
|
73
|
+
"segment" look with adjoining items sharing borders, via Tailwind
|
|
74
|
+
arbitrary sibling selectors) is not ported — it's a Tailwind-specific
|
|
75
|
+
mechanic with no direct CSS Modules equivalent, and it is opt-in even
|
|
76
|
+
upstream (the shipped default is a small gap between independently
|
|
77
|
+
bordered items, which is what this component always renders).
|