@gears-frontx/ui-kit 0.3.0-alpha.3 → 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 +28 -6
- 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 +32 -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 -130
- 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 +54 -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 -24
- package/package.json +15 -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,158 @@
|
|
|
1
|
+
# InputGroup
|
|
2
|
+
|
|
3
|
+
Composes an `Input`/`Textarea` with icon, text, and button addons into one
|
|
4
|
+
visually unified field — the group draws the border, background, focus ring
|
|
5
|
+
and error border; the wrapped control draws none of its own. No Base UI
|
|
6
|
+
primitive backs it — pure styling composition over `Input`/`Textarea`/
|
|
7
|
+
`Button`.
|
|
8
|
+
|
|
9
|
+
The group is `--control-height-lg` tall, the same as a standalone `Input`,
|
|
10
|
+
so a group and a plain field line up in the same form. A `block-start`/
|
|
11
|
+
`block-end` addon or a wrapped `Textarea` grows it past that floor.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- A field with a fixed prefix/suffix (`$`, `.com`, a unit).
|
|
16
|
+
- A field with an attached action that shares the field's own border (a
|
|
17
|
+
clear button, a copy button, a password reveal toggle).
|
|
18
|
+
|
|
19
|
+
## When not to use
|
|
20
|
+
|
|
21
|
+
- A single leading icon or one small trailing action — `Input`'s own
|
|
22
|
+
`icon`/`end` slots are simpler and don't need the extra parts here.
|
|
23
|
+
- Joining independent, differently-sized controls (not one logical field) —
|
|
24
|
+
use `ButtonGroup` instead.
|
|
25
|
+
|
|
26
|
+
## Parts
|
|
27
|
+
|
|
28
|
+
| Part | Renders | Notes |
|
|
29
|
+
|------|---------|-------|
|
|
30
|
+
| `InputGroup` | `<div role="group">` | Draws the field chrome |
|
|
31
|
+
| `InputGroupAddon` | `<div role="group">` | Icon/text/button cluster; click focuses the field |
|
|
32
|
+
| `InputGroupButton` | `Button` | Compact ghost button, `xs` by default |
|
|
33
|
+
| `InputGroupText` | `<span>` | Static label/icon, not clickable |
|
|
34
|
+
| `InputGroupInput` | `Input` | Border/background stripped — the group draws them |
|
|
35
|
+
| `InputGroupTextarea` | `Textarea` | Same stripping, plus `resize: none` |
|
|
36
|
+
|
|
37
|
+
## Props (kit level)
|
|
38
|
+
|
|
39
|
+
`InputGroupAddon`:
|
|
40
|
+
|
|
41
|
+
| Prop | Type | Default |
|
|
42
|
+
|------|------|---------|
|
|
43
|
+
| `align` | `inline-start` \| `inline-end` \| `block-start` \| `block-end` | `inline-start` |
|
|
44
|
+
|
|
45
|
+
`InputGroupButton`:
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default |
|
|
48
|
+
|------|------|---------|
|
|
49
|
+
| `size` | `xs` \| `sm` | `xs` |
|
|
50
|
+
| `variant` | every `Button` variant | `ghost` |
|
|
51
|
+
| `type` | `button` \| `submit` \| `reset` | `button` |
|
|
52
|
+
|
|
53
|
+
`InputGroupInput`/`InputGroupTextarea` forward every `Input`/`Textarea`
|
|
54
|
+
prop unchanged.
|
|
55
|
+
|
|
56
|
+
## States
|
|
57
|
+
|
|
58
|
+
The group reads these off the wrapped control, so they are set on
|
|
59
|
+
`InputGroupInput`/`InputGroupTextarea`, never on `InputGroup` itself:
|
|
60
|
+
|
|
61
|
+
| State | Set by | Result |
|
|
62
|
+
|-------|--------|--------|
|
|
63
|
+
| Focus | the control taking `:focus-visible` | `--ring` border + inset ring on the GROUP |
|
|
64
|
+
| Error | `aria-invalid` on the control | `--destructive` border + inset ring on the group |
|
|
65
|
+
| Disabled | `disabled` on the control | the whole group dims to 0.42, once |
|
|
66
|
+
|
|
67
|
+
A disabled `InputGroupButton` inside an addon dims only itself — a dead
|
|
68
|
+
action is not a dead field.
|
|
69
|
+
|
|
70
|
+
## Layout
|
|
71
|
+
|
|
72
|
+
`inline-start`/`inline-end` addons share the field's row; `block-start`/
|
|
73
|
+
`block-end` addons take a full-width row above/below it. Both axes can be
|
|
74
|
+
used in the same group (upstream's flex-column switch supports only one at
|
|
75
|
+
a time). An inline addon absorbs the field's inset on its own side, so the
|
|
76
|
+
text stays flush with where a standalone `Input` would put it.
|
|
77
|
+
|
|
78
|
+
## Implementation note
|
|
79
|
+
|
|
80
|
+
Upstream offers `InputGroupButton` sizes `xs`/`sm`/`icon-xs`/`icon-sm`.
|
|
81
|
+
This port keeps `xs` and `sm` and drops the two icon-only twins: "icon-only"
|
|
82
|
+
is a state `Button` derives from its own `icon` prop with no `children`, and
|
|
83
|
+
it squares up whatever size is active (see button.tsx). So upstream's
|
|
84
|
+
`size="icon-xs"` is this kit's
|
|
85
|
+
`<InputGroupButton icon={<XIcon />} aria-label="Clear" />`.
|
|
86
|
+
|
|
87
|
+
`xs` sits one step below the kit's smallest control height and is composed
|
|
88
|
+
from it (`--control-height-sm` minus `--space-2`) rather than hardcoded, so
|
|
89
|
+
retuning the control scale keeps the relationship. Inside a group the
|
|
90
|
+
button's focus ring also draws at a tighter offset than the kit's default —
|
|
91
|
+
the standard 2px standoff overshoots the group's own border.
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
import {
|
|
97
|
+
InputGroup,
|
|
98
|
+
InputGroupAddon,
|
|
99
|
+
InputGroupButton,
|
|
100
|
+
InputGroupInput,
|
|
101
|
+
InputGroupText,
|
|
102
|
+
InputGroupTextarea,
|
|
103
|
+
} from '@gears-frontx/ui-kit';
|
|
104
|
+
|
|
105
|
+
// Prefixed amount field
|
|
106
|
+
<InputGroup>
|
|
107
|
+
<InputGroupAddon>
|
|
108
|
+
<InputGroupText>$</InputGroupText>
|
|
109
|
+
</InputGroupAddon>
|
|
110
|
+
<InputGroupInput type="number" placeholder="0.00" aria-label="Amount" />
|
|
111
|
+
</InputGroup>
|
|
112
|
+
|
|
113
|
+
// Search field with a leading icon and a trailing shortcut hint
|
|
114
|
+
<InputGroup>
|
|
115
|
+
<InputGroupAddon>
|
|
116
|
+
<SearchIcon />
|
|
117
|
+
</InputGroupAddon>
|
|
118
|
+
<InputGroupInput type="search" placeholder="Search" aria-label="Search" />
|
|
119
|
+
<InputGroupAddon align="inline-end">
|
|
120
|
+
<Kbd>⌘K</Kbd>
|
|
121
|
+
</InputGroupAddon>
|
|
122
|
+
</InputGroup>
|
|
123
|
+
|
|
124
|
+
// Search field with a trailing clear button (icon-only, xs)
|
|
125
|
+
<InputGroup>
|
|
126
|
+
<InputGroupInput placeholder="Search" aria-label="Search" />
|
|
127
|
+
<InputGroupAddon align="inline-end">
|
|
128
|
+
<InputGroupButton icon={<XIcon />} aria-label="Clear" onClick={clear} />
|
|
129
|
+
</InputGroupAddon>
|
|
130
|
+
</InputGroup>
|
|
131
|
+
|
|
132
|
+
// Multi-line field with a helper/toolbar row underneath
|
|
133
|
+
<InputGroup>
|
|
134
|
+
<InputGroupTextarea placeholder="Notes" aria-label="Notes" />
|
|
135
|
+
<InputGroupAddon align="block-end">
|
|
136
|
+
<InputGroupText>0/280</InputGroupText>
|
|
137
|
+
</InputGroupAddon>
|
|
138
|
+
</InputGroup>
|
|
139
|
+
|
|
140
|
+
// Error state — aria-invalid on the control, the group draws the border
|
|
141
|
+
<InputGroup>
|
|
142
|
+
<InputGroupAddon>
|
|
143
|
+
<InputGroupText>@</InputGroupText>
|
|
144
|
+
</InputGroupAddon>
|
|
145
|
+
<InputGroupInput aria-label="Email" aria-invalid aria-describedby="email-error" />
|
|
146
|
+
</InputGroup>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Anti-patterns
|
|
150
|
+
|
|
151
|
+
- Do not put more than one focusable field inside a single `InputGroup` —
|
|
152
|
+
it is one logical field with one set of addons, not a mini form.
|
|
153
|
+
- Do not put `aria-invalid` or `disabled` on `InputGroup` itself — the
|
|
154
|
+
group reads both off the control, and neither means anything on a `div`.
|
|
155
|
+
- Do not rely on `InputGroupAddon`'s click-to-focus for anything other than
|
|
156
|
+
padding around static content — a button inside the addon keeps its own
|
|
157
|
+
click handling; the addon's own `onClick` only forwards, it does not
|
|
158
|
+
suppress the button's.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# InputOtp
|
|
2
|
+
|
|
3
|
+
A one-time-passcode entry: one input slot per character, with paste,
|
|
4
|
+
auto-advance, and completion handling built in. Built on Base UI's
|
|
5
|
+
`OTPField` primitive (Root/Input/Separator).
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- Verification codes: SMS/email OTP, 2FA, magic-link fallback codes.
|
|
10
|
+
|
|
11
|
+
## When not to use
|
|
12
|
+
|
|
13
|
+
- Free-form short text (a promo code, a postal code) — use `input`.
|
|
14
|
+
- A single numeric field — use `input` with `inputMode="numeric"`.
|
|
15
|
+
|
|
16
|
+
## Props (kit level)
|
|
17
|
+
|
|
18
|
+
`InputOtp` (the root):
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default |
|
|
21
|
+
|------|------|---------|
|
|
22
|
+
| `length` | number of character slots — **required** | — |
|
|
23
|
+
| `value` / `defaultValue` | controlled / uncontrolled OTP string | — |
|
|
24
|
+
| `onValueChange` | `(value: string, eventDetails) => void` | — |
|
|
25
|
+
| `onValueComplete` | `(value: string, eventDetails) => void`, fires once every slot is filled | — |
|
|
26
|
+
| `validationType` | `'numeric'` \| `'alphanumeric'` \| ... — filters typed/pasted characters | `'numeric'` |
|
|
27
|
+
| `mask` | mask entered characters (password-style) | `false` |
|
|
28
|
+
| `autoSubmit` | submit the owning form once complete | `false` |
|
|
29
|
+
| `disabled` / `readOnly` / `required` | `boolean` | `false` |
|
|
30
|
+
| `className` | `string` — merged after the kit class | — |
|
|
31
|
+
|
|
32
|
+
`InputOtpGroup`: a plain `<div>` — purely visual, groups a run of
|
|
33
|
+
`InputOtpSlot`s so an `InputOtpSeparator` can sit between groups (e.g.
|
|
34
|
+
`123` `456`).
|
|
35
|
+
|
|
36
|
+
`InputOtpSlot`: one character input. No `index` prop to pass — Base UI
|
|
37
|
+
derives each slot's position from render order automatically. Other props
|
|
38
|
+
follow Base UI `OTPField.Input`.
|
|
39
|
+
|
|
40
|
+
`InputOtpSeparator`: a decorative divider between groups; defaults to a
|
|
41
|
+
dash, override via children.
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { InputOtp, InputOtpGroup, InputOtpSeparator, InputOtpSlot } from '@gears-frontx/ui-kit';
|
|
47
|
+
|
|
48
|
+
// Six digits in two groups of three
|
|
49
|
+
<label htmlFor="otp">Verification code</label>
|
|
50
|
+
<InputOtp id="otp" length={6} onValueComplete={verify}>
|
|
51
|
+
<InputOtpGroup>
|
|
52
|
+
<InputOtpSlot />
|
|
53
|
+
<InputOtpSlot />
|
|
54
|
+
<InputOtpSlot />
|
|
55
|
+
</InputOtpGroup>
|
|
56
|
+
<InputOtpSeparator />
|
|
57
|
+
<InputOtpGroup>
|
|
58
|
+
<InputOtpSlot />
|
|
59
|
+
<InputOtpSlot />
|
|
60
|
+
<InputOtpSlot />
|
|
61
|
+
</InputOtpGroup>
|
|
62
|
+
</InputOtp>
|
|
63
|
+
|
|
64
|
+
// Controlled
|
|
65
|
+
<InputOtp length={4} value={code} onValueChange={setCode}>
|
|
66
|
+
<InputOtpGroup>
|
|
67
|
+
<InputOtpSlot />
|
|
68
|
+
<InputOtpSlot />
|
|
69
|
+
<InputOtpSlot />
|
|
70
|
+
<InputOtpSlot />
|
|
71
|
+
</InputOtpGroup>
|
|
72
|
+
</InputOtp>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Anti-patterns
|
|
76
|
+
|
|
77
|
+
- Do not put `aria-label` on the first slot expecting it to label the
|
|
78
|
+
whole field — Base UI ignores `aria-label` on slot index 0 (it warns in
|
|
79
|
+
development) because a single-slot label doesn't describe a multi-slot
|
|
80
|
+
control; label the field with a `<label htmlFor={rootId}>` (or
|
|
81
|
+
`Field.Label`) pointing at the root's `id` instead, as in the example
|
|
82
|
+
above.
|
|
83
|
+
- Do not render fewer/more `InputOtpSlot`s than `length` — completion
|
|
84
|
+
detection and paste handling both key off that count matching exactly.
|
|
85
|
+
|
|
86
|
+
## Deviation from upstream
|
|
87
|
+
|
|
88
|
+
Upstream (`registry/bases/base/ui/input-otp.tsx`) wraps the third-party
|
|
89
|
+
`input-otp` npm package: its `OTPInput` renders ONE shared, visually
|
|
90
|
+
hidden native `<input>`, and every visible "slot" is a plain decorative
|
|
91
|
+
`<div>` that reads its character, active, and fake-caret state from React
|
|
92
|
+
context (`OTPInputContext`).
|
|
93
|
+
|
|
94
|
+
This kit instead builds on Base UI's `OTPField` primitive (stable since
|
|
95
|
+
our pinned `@base-ui/react` 1.6.0), which takes a structurally different
|
|
96
|
+
approach: it renders one REAL `<input>` PER SLOT, and derives each
|
|
97
|
+
input's position from render order via an internal composite list rather
|
|
98
|
+
than an explicit index prop or a shared context read. Consequences:
|
|
99
|
+
|
|
100
|
+
- `InputOtpSlot` IS the character input, not a context-driven display
|
|
101
|
+
div — no `index` prop to pass, no `OTPInputContext` to read from.
|
|
102
|
+
- The caret-blink effect (kept, as requested, as a CSS Modules keyframe —
|
|
103
|
+
see `input-otp.module.css`'s `input-otp-caret-blink`) is plain CSS on
|
|
104
|
+
the slot itself (`:focus:not([data-filled])::after`), not a JS-computed
|
|
105
|
+
`hasFakeCaret` flag threaded through context: with a real per-slot
|
|
106
|
+
input, "is this the active, still-empty slot" is exactly what
|
|
107
|
+
`:focus:not([data-filled])` already answers natively.
|
|
108
|
+
- `InputOtpSeparator` wraps Base UI's own `OTPField.Separator` part
|
|
109
|
+
(`@base-ui/react/otp-field` re-exports `@base-ui/react/separator`)
|
|
110
|
+
rather than a plain decorative div — it already carries
|
|
111
|
+
`role="separator"`.
|
|
112
|
+
|
|
113
|
+
The exported part names mirror upstream's (`InputOtp`/`InputOtpGroup`/
|
|
114
|
+
`InputOtpSlot`/`InputOtpSeparator` for upstream's `InputOTP`/
|
|
115
|
+
`InputOTPGroup`/`InputOTPSlot`/`InputOTPSeparator`) as closely as the
|
|
116
|
+
different primitive underneath allows.
|
package/dist/docs/input.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Input
|
|
2
2
|
|
|
3
3
|
A single-line text field. Wraps the Base UI Input primitive: a native
|
|
4
|
-
`<input
|
|
5
|
-
error, validation state) when rendered inside one.
|
|
4
|
+
`<input>`.
|
|
6
5
|
|
|
7
6
|
## When to use
|
|
8
7
|
|
|
9
8
|
- Any single-line free-text value: names, emails, search queries, numbers,
|
|
10
9
|
file uploads (`type="file"`).
|
|
11
|
-
- Inside
|
|
12
|
-
|
|
10
|
+
- Inside `Field`, with `id`/`aria-describedby` wired by hand — the kit has
|
|
11
|
+
no component that wires label association or validation display
|
|
12
|
+
automatically (see field.md).
|
|
13
13
|
|
|
14
14
|
## When not to use
|
|
15
15
|
|
|
@@ -38,19 +38,30 @@ come from the native `type` — a search field is `type="search"` (searchbox
|
|
|
38
38
|
role) plus a magnifier passed to `icon`; nothing renders automatically.
|
|
39
39
|
A disabled input dims its `icon` and `end` slots too (0.42 opacity) — a
|
|
40
40
|
clear button left in `end` doesn't stay visually live just because it isn't
|
|
41
|
-
the native control.
|
|
42
|
-
disabled
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
the native control. Removing `end`'s tab stop is a separate fix: passing
|
|
42
|
+
`disabled` straight to `Input` also sets `inert` on the `end` wrapper,
|
|
43
|
+
which drops it from the tab order and blocks activation — the actual fix
|
|
44
|
+
for a keyboard user, since dimming alone (`pointer-events: none`) only
|
|
45
|
+
disarms the mouse. Both the dimming and the `inert` only fire from this
|
|
46
|
+
direct `disabled` prop — the kit's `Field` wires no disabled state of its
|
|
47
|
+
own (see field.md), so there is no other path to observe. Consumers who
|
|
48
|
+
disable a field through their own state should pass `disabled` straight to
|
|
49
|
+
`Input` (and to any interactive `end` content) rather than relying on
|
|
50
|
+
anything upstream.
|
|
51
|
+
|
|
52
|
+
## File inputs
|
|
53
|
+
|
|
54
|
+
`type="file"` keeps the same field box as any other Input; the browser's
|
|
55
|
+
file-selector button inside it is styled to match, per upstream: no border,
|
|
56
|
+
no fill, `Label` typography at the label weight, and `--control-height-sm`
|
|
57
|
+
(one step below the field) so it sits inside the field's padding rather
|
|
58
|
+
than against its border. The kit also zeroes the UA's own padding/margin on
|
|
59
|
+
that pseudo-element — the kit ships no preflight, so without that reset the
|
|
60
|
+
browser's defaults indent the button past the field's padding. The filename
|
|
61
|
+
text beside it is the input's own value text and is not separately
|
|
62
|
+
styleable. Consumers who need a different affordance (a drop zone, a real
|
|
63
|
+
Button that proxies the click) build it themselves; this is the plain
|
|
64
|
+
native control, dressed.
|
|
54
65
|
|
|
55
66
|
## Examples
|
|
56
67
|
|
|
@@ -72,7 +83,7 @@ import { Input } from '@gears-frontx/ui-kit';
|
|
|
72
83
|
// Controlled
|
|
73
84
|
<Input value={email} onValueChange={setEmail} type="email" />
|
|
74
85
|
|
|
75
|
-
// Invalid state (set
|
|
86
|
+
// Invalid state (set by hand from your form's validation)
|
|
76
87
|
<Input aria-invalid={true} defaultValue="not-an-email" />
|
|
77
88
|
|
|
78
89
|
// Disabled
|
|
@@ -85,7 +96,7 @@ import { Input } from '@gears-frontx/ui-kit';
|
|
|
85
96
|
enough — it hands you the string directly.
|
|
86
97
|
- Do not restyle via inline `style` — sizing/spacing tweaks belong to layout
|
|
87
98
|
containers, colors to theme tokens.
|
|
88
|
-
- Do not
|
|
89
|
-
|
|
99
|
+
- Do not expect label/error/description wiring for free — pair `Input`
|
|
100
|
+
with `Field` and wire `id`/`aria-describedby` yourself (see field.md).
|
|
90
101
|
- Do not put an interactive control in `icon` — that slot is aria-hidden
|
|
91
102
|
and pointer-transparent; live content goes in `end`.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Item
|
|
2
|
+
|
|
3
|
+
A single row in a list of similar things — a notification, a file, a
|
|
4
|
+
search result, a settings row. Unlike Card, Item is built for repetition:
|
|
5
|
+
`ItemGroup` spaces a run of them and gives the run `role="list"`.
|
|
6
|
+
|
|
7
|
+
Item's root is the one part in this file with real behavior: it is built
|
|
8
|
+
on Base UI's headless `useRender`/`mergeProps` utilities (not a stateful
|
|
9
|
+
primitive) so it can render as something other than a `<div>` — e.g. a
|
|
10
|
+
whole item as a link via `render={<a href="..." />}`. Every other part is
|
|
11
|
+
a plain styled element, same as Card.
|
|
12
|
+
|
|
13
|
+
Composition: `ItemGroup` (→ `Item`+, separated by optional
|
|
14
|
+
`ItemSeparator`) → `Item` (→ `ItemMedia`, `ItemContent` (→ `ItemTitle`,
|
|
15
|
+
`ItemDescription`), `ItemActions`, `ItemHeader`, `ItemFooter`).
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- A row in a list/table-like collection where each row shares the same
|
|
20
|
+
shape (icon/avatar, title + description, trailing action).
|
|
21
|
+
- A single row that should itself be a navigation target — pass
|
|
22
|
+
`render={<a href="..." />}` instead of wrapping a link around it.
|
|
23
|
+
|
|
24
|
+
## When not to use
|
|
25
|
+
|
|
26
|
+
- A one-off bounded panel of unrelated content — use `Card`.
|
|
27
|
+
- Genuinely tabular data (sortable columns, cell alignment) — use `table`.
|
|
28
|
+
|
|
29
|
+
## Props (kit level)
|
|
30
|
+
|
|
31
|
+
`Item`:
|
|
32
|
+
|
|
33
|
+
| Prop | Type | Default |
|
|
34
|
+
|------|------|---------|
|
|
35
|
+
| `variant` | `'default' \| 'outline' \| 'muted'` | `'default'` |
|
|
36
|
+
| `size` | `'default' \| 'sm' \| 'xs'` | `'default'` |
|
|
37
|
+
| `render` | `ReactElement \| ((props, state) => ReactElement)` — replaces the root element; `state` is `{ variant, size }` | — |
|
|
38
|
+
| `className` | `string` — merged after variant/size classes | — |
|
|
39
|
+
|
|
40
|
+
`ItemMedia`:
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default |
|
|
43
|
+
|------|------|---------|
|
|
44
|
+
| `variant` | `'default' \| 'icon' \| 'image'` — `image` also shrinks to match the ancestor `Item`'s `size` | `'default'` |
|
|
45
|
+
|
|
46
|
+
Every other part (`ItemContent`, `ItemTitle`, `ItemDescription`,
|
|
47
|
+
`ItemActions`, `ItemHeader`, `ItemFooter`, `ItemGroup`) takes no
|
|
48
|
+
kit-specific props — native element props, forwarded as-is.
|
|
49
|
+
`ItemSeparator` takes the kit `Separator`'s own props (its `orientation`
|
|
50
|
+
is fixed to `'horizontal'`).
|
|
51
|
+
|
|
52
|
+
`Item` reflects neither `variant` nor `size` as a DOM attribute — no
|
|
53
|
+
`data-slot`/`data-variant`/`data-size`, per the kit-wide convention (see
|
|
54
|
+
`card.md`). Style off the exported classes if you need to target a
|
|
55
|
+
specific combination from outside the component.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import {
|
|
61
|
+
Item,
|
|
62
|
+
ItemActions,
|
|
63
|
+
ItemContent,
|
|
64
|
+
ItemDescription,
|
|
65
|
+
ItemGroup,
|
|
66
|
+
ItemMedia,
|
|
67
|
+
ItemSeparator,
|
|
68
|
+
ItemTitle,
|
|
69
|
+
Button,
|
|
70
|
+
} from '@gears-frontx/ui-kit';
|
|
71
|
+
|
|
72
|
+
<ItemGroup>
|
|
73
|
+
<Item>
|
|
74
|
+
<ItemMedia variant="icon">
|
|
75
|
+
<FileIcon />
|
|
76
|
+
</ItemMedia>
|
|
77
|
+
<ItemContent>
|
|
78
|
+
<ItemTitle>Q3 report.pdf</ItemTitle>
|
|
79
|
+
<ItemDescription>Uploaded 2 days ago, 1.2 MB</ItemDescription>
|
|
80
|
+
</ItemContent>
|
|
81
|
+
<ItemActions>
|
|
82
|
+
<Button variant="ghost" size="sm">Download</Button>
|
|
83
|
+
</ItemActions>
|
|
84
|
+
</Item>
|
|
85
|
+
<ItemSeparator />
|
|
86
|
+
<Item variant="outline" size="sm" render={<a href="/files/2" />}>
|
|
87
|
+
Notes.txt
|
|
88
|
+
</Item>
|
|
89
|
+
</ItemGroup>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Anti-patterns
|
|
93
|
+
|
|
94
|
+
- Do not wrap an `<a>` around an entire `Item` for row-level navigation —
|
|
95
|
+
use `render={<a href="..." />}` on `Item` itself; a nested interactive
|
|
96
|
+
wrapper doesn't get the row's own hover/focus treatment and risks
|
|
97
|
+
interactive-in-interactive nesting once `ItemActions` has its own
|
|
98
|
+
buttons.
|
|
99
|
+
- Do not expect `ItemGroup`'s spacing to react to a size set only via
|
|
100
|
+
`className` — the shrink-to-smallest-size behavior reads the `Item`
|
|
101
|
+
size *class* `Item` itself emits from its `size` prop, not an arbitrary
|
|
102
|
+
consumer class.
|
|
103
|
+
- Do not put more than one `ItemContent` expecting both to grow — the
|
|
104
|
+
second one goes fixed-width (`flex: none`), matching upstream: the
|
|
105
|
+
pattern is a primary content block plus a fixed trailing block (e.g. a
|
|
106
|
+
timestamp), not two equal columns.
|
package/dist/docs/kbd.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Kbd
|
|
2
|
+
|
|
3
|
+
A visual representation of a keyboard key or shortcut. No Base UI
|
|
4
|
+
primitive: `Kbd` is a plain `<kbd>` with no interactive or ARIA behavior of
|
|
5
|
+
its own — it is decoration, not a live control.
|
|
6
|
+
|
|
7
|
+
## Parts
|
|
8
|
+
|
|
9
|
+
- **`Kbd`** — a single key or short label (`Esc`, `⌘`, `Enter`).
|
|
10
|
+
- **`KbdGroup`** — groups several `Kbd`s into one shortcut (`⌘` + `K`).
|
|
11
|
+
Renders as a `<kbd>` itself, matching upstream — see `kbd.tsx` for why.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- Labeling a keyboard shortcut in help text, a menu item, or a tooltip
|
|
16
|
+
(`Cmd`+`K` to open the command palette).
|
|
17
|
+
|
|
18
|
+
## When not to use
|
|
19
|
+
|
|
20
|
+
- An actual interactive button that happens to look like a key — use
|
|
21
|
+
`button`, not `Kbd`; this component carries no click handling, focus
|
|
22
|
+
management, or ARIA role.
|
|
23
|
+
|
|
24
|
+
## Props (kit level)
|
|
25
|
+
|
|
26
|
+
`Kbd` and `KbdGroup` take no kit-specific props — every prop is the
|
|
27
|
+
underlying native `<kbd>` element's props (`className`, `id`, `aria-*`,
|
|
28
|
+
...), forwarded as-is.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Kbd, KbdGroup } from '@gears-frontx/ui-kit';
|
|
34
|
+
|
|
35
|
+
// A single key
|
|
36
|
+
<p>Press <Kbd>Esc</Kbd> to close.</p>
|
|
37
|
+
|
|
38
|
+
// A chorded shortcut
|
|
39
|
+
<KbdGroup>
|
|
40
|
+
<Kbd>Ctrl</Kbd>
|
|
41
|
+
<Kbd>B</Kbd>
|
|
42
|
+
</KbdGroup>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Anti-patterns
|
|
46
|
+
|
|
47
|
+
- Do not wrap `Kbd` in a `Button` to make it clickable and call it a
|
|
48
|
+
shortcut trigger — wire the actual keyboard listener yourself and use
|
|
49
|
+
`Kbd` purely to describe the shortcut in text.
|
|
50
|
+
- Do not nest `Kbd` inside `Tooltip`'s content expecting an automatic
|
|
51
|
+
color adjustment — upstream's Tooltip-context recolor keys off a
|
|
52
|
+
`data-slot` attribute this kit doesn't emit (see `kbd.tsx`); it renders
|
|
53
|
+
with its plain `--muted`/`--muted-foreground` pair there instead.
|