@gears-frontx/ui-kit 0.3.0-alpha.3 → 0.4.0-alpha.1
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 +182 -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,93 @@
|
|
|
1
|
+
# NativeSelect
|
|
2
|
+
|
|
3
|
+
A real `<select>`, styled to match the kit's field chrome. No Base UI
|
|
4
|
+
primitive backs it (there is no Base UI NativeSelect) — this is pure
|
|
5
|
+
styling translation over native markup, the same shape as `Table`.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A choice list where the platform's own native picker (OS-drawn options,
|
|
10
|
+
keyboard-typeahead, mobile wheel picker) is preferable to a custom popup —
|
|
11
|
+
long lists, forms optimized for mobile, or anywhere `Select`'s Base UI
|
|
12
|
+
popup would be overkill.
|
|
13
|
+
- Progressive-enhancement contexts (no-JS forms, SSR fallbacks) where a
|
|
14
|
+
real `<select>` must keep working without a popup primitive.
|
|
15
|
+
|
|
16
|
+
## When not to use
|
|
17
|
+
|
|
18
|
+
- Custom item content (icons, descriptions, groups with rich styling) —
|
|
19
|
+
`<option>` cannot render arbitrary markup; use `Select` instead.
|
|
20
|
+
|
|
21
|
+
## Sizing
|
|
22
|
+
|
|
23
|
+
The wrapper declares no `width` of its own — standalone it shrinks to fit
|
|
24
|
+
its content (a plain `inline-flex` box with `width: auto` sizes the same
|
|
25
|
+
way `inline-block` does), and inside a vertical `Field` it stretches to
|
|
26
|
+
fill the field (a flex column's default `align-items: stretch` only takes
|
|
27
|
+
effect on a child whose own width is `auto`, which `field.module.css`'s
|
|
28
|
+
`.orientationVertical` relies on for every field control). Both behaviors
|
|
29
|
+
fall out of ordinary CSS layout, not a rule written to detect either case —
|
|
30
|
+
so the wrapper also stretches inside any other stretch-inducing ancestor
|
|
31
|
+
(e.g. a bare grid row), matching `Input`'s own always-`width: 100%` chrome
|
|
32
|
+
rather than introducing a NativeSelect-specific exception.
|
|
33
|
+
|
|
34
|
+
This replaced an explicit `width: fit-content` that fought
|
|
35
|
+
`field.module.css`'s `.orientationVertical > * { width: 100% }` for the
|
|
36
|
+
win at equal (0-1-0) specificity — a collision resolved only by which
|
|
37
|
+
stylesheet a consumer's bundler happened to concatenate last. Mirrors
|
|
38
|
+
upstream: shadcn's `SelectTrigger` ships its own `w-fit` while `Field`'s
|
|
39
|
+
vertical orientation applies `[&>*]:w-full` to its children, the same two
|
|
40
|
+
rules on the same node — Tailwind's utility-layer generation order
|
|
41
|
+
resolves that deterministically in their build, a guarantee this kit's
|
|
42
|
+
CSS Modules don't have. Not declaring a competing width here removes the
|
|
43
|
+
collision instead of trying to out-cascade it.
|
|
44
|
+
|
|
45
|
+
The field height itself is `--control-height-lg` (40px), not
|
|
46
|
+
`--control-height-md` — fields sit one step up from the md button, the
|
|
47
|
+
same rule `Input`/`Select` already follow (see input.module.css); only
|
|
48
|
+
`size="sm"` drops to `--control-height-sm`.
|
|
49
|
+
|
|
50
|
+
## Props (kit level)
|
|
51
|
+
|
|
52
|
+
| Prop | Type | Default |
|
|
53
|
+
|------|------|---------|
|
|
54
|
+
| `size` | `default` \| `sm` | `default` |
|
|
55
|
+
| `className` | `string` — merged onto the wrapper | — |
|
|
56
|
+
|
|
57
|
+
All other props are native `<select>` props (`value`, `onChange`,
|
|
58
|
+
`disabled`, `aria-*`, ...) and are forwarded to the `<select>` itself.
|
|
59
|
+
|
|
60
|
+
`NativeSelectOption` and `NativeSelectOptGroup` are thin styled wrappers
|
|
61
|
+
around `<option>`/`<optgroup>` — forward every native prop unchanged.
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from '@gears-frontx/ui-kit';
|
|
67
|
+
|
|
68
|
+
<NativeSelect aria-label="Region" defaultValue="eu">
|
|
69
|
+
<NativeSelectOption value="eu">Europe</NativeSelectOption>
|
|
70
|
+
<NativeSelectOption value="us">Americas</NativeSelectOption>
|
|
71
|
+
</NativeSelect>
|
|
72
|
+
|
|
73
|
+
// Grouped options
|
|
74
|
+
<NativeSelect aria-label="Timezone">
|
|
75
|
+
<NativeSelectOptGroup label="Europe">
|
|
76
|
+
<NativeSelectOption value="cet">Central European Time</NativeSelectOption>
|
|
77
|
+
</NativeSelectOptGroup>
|
|
78
|
+
</NativeSelect>
|
|
79
|
+
|
|
80
|
+
// Compact size, disabled
|
|
81
|
+
<NativeSelect size="sm" disabled aria-label="Region">
|
|
82
|
+
<NativeSelectOption value="eu">Europe</NativeSelectOption>
|
|
83
|
+
</NativeSelect>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Anti-patterns
|
|
87
|
+
|
|
88
|
+
- Do not reach for this when item content needs more than plain text —
|
|
89
|
+
`Select` is the composable, richly-stylable alternative.
|
|
90
|
+
- Do not restyle `<option>`/`<optgroup>` fill/text via the kit's own theme
|
|
91
|
+
tokens — most engines render native popup chrome with OS colors
|
|
92
|
+
regardless of author CSS, which is why this component uses the
|
|
93
|
+
`Canvas`/`CanvasText` system keywords instead (see native-select.module.css).
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# NavigationMenu
|
|
2
|
+
|
|
3
|
+
A horizontal navigation bar whose items can expand into a rich dropdown
|
|
4
|
+
panel. Wraps Base UI's dedicated `@base-ui/react/navigation-menu`
|
|
5
|
+
primitive — a different family from `dropdown-menu` (`@base-ui/react/menu`)
|
|
6
|
+
despite the similar trigger/content vocabulary.
|
|
7
|
+
|
|
8
|
+
The defining mechanic: there is **one shared popup and one shared
|
|
9
|
+
Viewport** for the whole menu, not one per item. When a different trigger
|
|
10
|
+
becomes active, that item's `NavigationMenuContent` is portaled into the
|
|
11
|
+
same Viewport and the popup morphs (`--popup-width`/`--popup-height`,
|
|
12
|
+
`--positioner-width`/`--positioner-height`) to the newly active content's
|
|
13
|
+
measured size — see `NavigationMenuContent.mjs`'s `ReactDOM.createPortal`
|
|
14
|
+
and `NavigationMenuTrigger.mjs`'s `setSharedFixedSize` in
|
|
15
|
+
`node_modules/@base-ui/react/navigation-menu/`.
|
|
16
|
+
|
|
17
|
+
Composition: `NavigationMenu` (root — also renders the shared
|
|
18
|
+
Portal → Positioner → Popup → Viewport tree automatically) →
|
|
19
|
+
`NavigationMenuList` → `NavigationMenuItem` → `NavigationMenuTrigger`
|
|
20
|
+
(chevron via `NavigationMenuIcon`) + `NavigationMenuContent` (portals into
|
|
21
|
+
the shared Viewport when active). A plain `NavigationMenuLink` can sit
|
|
22
|
+
directly in an `NavigationMenuItem` with no trigger/content, for a row
|
|
23
|
+
entry that just navigates.
|
|
24
|
+
|
|
25
|
+
## When to use
|
|
26
|
+
|
|
27
|
+
- A page's primary horizontal navigation bar, where some entries expand
|
|
28
|
+
into a panel of links/sections and others are plain links.
|
|
29
|
+
- Desktop-oriented top-level navigation with hover-or-click expansion.
|
|
30
|
+
|
|
31
|
+
## When not to use
|
|
32
|
+
|
|
33
|
+
- A menu of actions anchored to a button (not persistent page navigation)
|
|
34
|
+
— use `dropdown-menu`.
|
|
35
|
+
- Picking one value bound to a form field — use `select`.
|
|
36
|
+
- Small screens / a single flat link list — plain `<nav>` markup or a
|
|
37
|
+
drawer is simpler than this component's shared-viewport machinery.
|
|
38
|
+
|
|
39
|
+
## Props (kit level)
|
|
40
|
+
|
|
41
|
+
`NavigationMenu` (root) — holds the composed Portal/Positioner/Popup/
|
|
42
|
+
Viewport tree, so the positioning props that sit on `Content` in
|
|
43
|
+
DropdownMenu/Select sit here instead:
|
|
44
|
+
|
|
45
|
+
| Prop | Type | Default |
|
|
46
|
+
|------|------|---------|
|
|
47
|
+
| `value` / `defaultValue` | the active item's value | uncontrolled, `null` |
|
|
48
|
+
| `onValueChange` | `(value, eventDetails) => void` | — |
|
|
49
|
+
| `orientation` | `horizontal` \| `vertical` | `horizontal` |
|
|
50
|
+
| `delay` / `closeDelay` | `number` (ms) — hover open/close delay | `50` / `50` |
|
|
51
|
+
| `side` | `top` \| `bottom` \| `left` \| `right` \| `inline-start` \| `inline-end` | `bottom` |
|
|
52
|
+
| `align` | `start` \| `center` \| `end` | `start` |
|
|
53
|
+
| `sideOffset` / `alignOffset` | `number` | `8` / `0` |
|
|
54
|
+
| `container` | DOM node to portal the shared popup into | `<body>` |
|
|
55
|
+
| `positionMethod` | `absolute` \| `fixed` — pass `fixed` when the menu sits inside a `transform`/`filter` container | `absolute` |
|
|
56
|
+
| `collisionBoundary` / `collisionPadding` | see Base UI NavigationMenu.Positioner | viewport / `5` |
|
|
57
|
+
| `className` | `string` — merged after the kit class | — |
|
|
58
|
+
|
|
59
|
+
`NavigationMenuTrigger` / `NavigationMenuContent` / `NavigationMenuLink` /
|
|
60
|
+
`NavigationMenuList` / `NavigationMenuItem` / `NavigationMenuViewport`:
|
|
61
|
+
thin styled pass-throughs, no extra props beyond Base UI's own (see each
|
|
62
|
+
part's `.d.ts` under `node_modules/@base-ui/react/navigation-menu/`).
|
|
63
|
+
|
|
64
|
+
`NavigationMenuLink`: `active` (marks the current page, styles via
|
|
65
|
+
`[data-active]` and sets `aria-current="page"`), `closeOnClick` (`false`
|
|
66
|
+
by default — a plain in-content link does not auto-close the menu unless
|
|
67
|
+
asked to).
|
|
68
|
+
|
|
69
|
+
`navigationMenuTriggerStyle()` — a `cva()` className recipe (no variants
|
|
70
|
+
yet) that makes a plain `NavigationMenuLink` look identical to a
|
|
71
|
+
`NavigationMenuTrigger`, for a row entry that navigates directly with no
|
|
72
|
+
dropdown (e.g. "Pricing" beside "Products"/"Solutions"). Same name and
|
|
73
|
+
purpose as the upstream shadcn export.
|
|
74
|
+
|
|
75
|
+
`NavigationMenuIcon` — the trigger's chevron, exported because it is a
|
|
76
|
+
real Base UI part (state-aware: it reads "is this item's popup open" from
|
|
77
|
+
item context) rather than a private helper. Must be rendered inside a
|
|
78
|
+
`NavigationMenuItem`; `NavigationMenuTrigger` already includes one by
|
|
79
|
+
default.
|
|
80
|
+
|
|
81
|
+
`NavigationMenuIndicator` — an optional small arrow that tracks the
|
|
82
|
+
active trigger. Must be rendered as a child of the **same**
|
|
83
|
+
`NavigationMenuItem` as its `NavigationMenuTrigger`: Base UI's `Icon` part
|
|
84
|
+
(which both `NavigationMenuIcon` and `NavigationMenuIndicator` wrap) reads
|
|
85
|
+
its active state from that item's own context and throws if used outside
|
|
86
|
+
one — unlike the classic Radix indicator, this is not one shared
|
|
87
|
+
list-level element with computed `left`/`width` math.
|
|
88
|
+
|
|
89
|
+
The popup portals to `<body>` by default, so if your theme lives on a
|
|
90
|
+
subtree (`data-theme` on a section instead of `<html>`), pass that section
|
|
91
|
+
as `container` on `NavigationMenu` — same contract as `Dialog`/`Select`/
|
|
92
|
+
`DropdownMenu`.
|
|
93
|
+
|
|
94
|
+
## Visual states (no variant/size props)
|
|
95
|
+
|
|
96
|
+
Unlike most of the kit, `NavigationMenu` defines no `.variantXxx`/
|
|
97
|
+
`.sizeXxx` axis — none of its parts have a variant or size prop upstream.
|
|
98
|
+
Every visual state is driven by Base UI's own data attributes instead:
|
|
99
|
+
|
|
100
|
+
- `.trigger[data-popup-open]` / `:hover` — accent fill, same tone as a
|
|
101
|
+
highlighted menu item elsewhere in the kit.
|
|
102
|
+
- `.triggerIcon[data-popup-open]` — chevron rotates 180°.
|
|
103
|
+
- `.popup[data-starting-style]` / `[data-ending-style]` — fade only; the
|
|
104
|
+
popup's width/height already carry the size change (see below), so no
|
|
105
|
+
additional scale transform is layered on top.
|
|
106
|
+
- `.positioner[data-instant]` — Base UI's own flag for a change that must
|
|
107
|
+
not animate (initial open, and while the window resizes) — suppresses
|
|
108
|
+
the position transition entirely for that frame.
|
|
109
|
+
- `.content[data-starting-style]` / `[data-ending-style]` plus
|
|
110
|
+
`[data-activation-direction='left' | 'right']` — the per-item panel
|
|
111
|
+
fades and slides horizontally as the active item changes; `'up'`/
|
|
112
|
+
`'down'` are deliberately left unstyled, matching the upstream shadcn
|
|
113
|
+
port (the shared-Viewport mechanic is a horizontal-orientation concept).
|
|
114
|
+
- `.link[data-active]` — marks the current-page link.
|
|
115
|
+
- `.indicator[data-popup-open]` — the tracking arrow becomes visible under
|
|
116
|
+
the active trigger.
|
|
117
|
+
|
|
118
|
+
All geometry-changing transitions (the positioner's position, the popup's
|
|
119
|
+
width/height, the content's slide) are suppressed under
|
|
120
|
+
`prefers-reduced-motion: reduce`; opacity fades are kept, per the kit's
|
|
121
|
+
established mixed-transition idiom (see `dropdown-menu.md`/`select.md`).
|
|
122
|
+
|
|
123
|
+
## Examples
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import {
|
|
127
|
+
NavigationMenu,
|
|
128
|
+
NavigationMenuContent,
|
|
129
|
+
NavigationMenuItem,
|
|
130
|
+
NavigationMenuLink,
|
|
131
|
+
NavigationMenuList,
|
|
132
|
+
NavigationMenuTrigger,
|
|
133
|
+
navigationMenuTriggerStyle,
|
|
134
|
+
} from '@gears-frontx/ui-kit';
|
|
135
|
+
|
|
136
|
+
<NavigationMenu>
|
|
137
|
+
<NavigationMenuList>
|
|
138
|
+
<NavigationMenuItem>
|
|
139
|
+
<NavigationMenuTrigger>Products</NavigationMenuTrigger>
|
|
140
|
+
<NavigationMenuContent>
|
|
141
|
+
<NavigationMenuLink href="/products/a">Product A</NavigationMenuLink>
|
|
142
|
+
<NavigationMenuLink href="/products/b">Product B</NavigationMenuLink>
|
|
143
|
+
</NavigationMenuContent>
|
|
144
|
+
</NavigationMenuItem>
|
|
145
|
+
<NavigationMenuItem>
|
|
146
|
+
<NavigationMenuLink className={navigationMenuTriggerStyle()} href="/pricing">
|
|
147
|
+
Pricing
|
|
148
|
+
</NavigationMenuLink>
|
|
149
|
+
</NavigationMenuItem>
|
|
150
|
+
</NavigationMenuList>
|
|
151
|
+
</NavigationMenu>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Known gap
|
|
155
|
+
|
|
156
|
+
Base UI writes four runtime CSS custom properties this port consumes —
|
|
157
|
+
`--positioner-width`, `--positioner-height` (on the positioner) and
|
|
158
|
+
`--popup-width`, `--popup-height` (on the popup) — the direct equivalent
|
|
159
|
+
of `--anchor-width`/`--anchor-height` used elsewhere in the kit, and the
|
|
160
|
+
mechanism behind the shared-Viewport morph described above (see
|
|
161
|
+
`node_modules/@base-ui/react/navigation-menu/utils/setSharedFixedSize.mjs`).
|
|
162
|
+
They are listed in `tokens.test.ts`'s `BASE_UI_RUNTIME_VARS` exempt list,
|
|
163
|
+
which is what keeps `navigation-menu.module.css` passing that file's
|
|
164
|
+
"consumes only theme-defined or same-part local variables" guard.
|
|
165
|
+
|
|
166
|
+
## Anti-patterns
|
|
167
|
+
|
|
168
|
+
- Do not use `NavigationMenu` for a menu of actions anchored to a button
|
|
169
|
+
— use `dropdown-menu`.
|
|
170
|
+
- Do not nest a second `NavigationMenu` inside a `NavigationMenuContent`
|
|
171
|
+
for anything beyond a genuine mega-menu sub-navigation — Base UI
|
|
172
|
+
supports nesting (the root renders a `<div>` instead of `<nav>` when
|
|
173
|
+
nested), but it multiplies the shared-viewport machinery this component
|
|
174
|
+
already carries.
|
|
175
|
+
- Do not render `NavigationMenuIcon`/`NavigationMenuIndicator` outside a
|
|
176
|
+
`NavigationMenuItem` — both throw (Base UI's own item-context guard).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Pagination
|
|
2
|
+
|
|
3
|
+
Page-number navigation built from real anchors, styled through `Button`'s
|
|
4
|
+
own variant classes so a page link looks exactly like a ghost/outline
|
|
5
|
+
button. No Base UI primitive backs it — pure styling translation over
|
|
6
|
+
semantic markup (`nav` > `ul` > `li`), the same shape as `Table`/
|
|
7
|
+
`Breadcrumb`.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Navigating between server-rendered pages of a result set, where each page
|
|
12
|
+
is a real URL (`<PaginationLink href="?page=2">`).
|
|
13
|
+
|
|
14
|
+
## When not to use
|
|
15
|
+
|
|
16
|
+
- Client-side "load more"/infinite scroll — use a plain `Button`.
|
|
17
|
+
- A single prev/next stepper with no page numbers — `PaginationPrevious`/
|
|
18
|
+
`PaginationNext` alone (skip `PaginationLink`) already cover that.
|
|
19
|
+
|
|
20
|
+
## Parts
|
|
21
|
+
|
|
22
|
+
| Part | Renders | Notes |
|
|
23
|
+
|------|---------|-------|
|
|
24
|
+
| `Pagination` | `<nav aria-label="pagination">` | The root landmark |
|
|
25
|
+
| `PaginationContent` | `<ul>` | Row of page items |
|
|
26
|
+
| `PaginationItem` | `<li>` | One item |
|
|
27
|
+
| `PaginationLink` | `<a>` | A page number; square by default |
|
|
28
|
+
| `PaginationPrevious` | `<a>` | Chevron + "Previous" (hidden below 640px) |
|
|
29
|
+
| `PaginationNext` | `<a>` | "Next" + chevron (hidden below 640px) |
|
|
30
|
+
| `PaginationEllipsis` | `<span>` | Collapsed-pages indicator |
|
|
31
|
+
|
|
32
|
+
## Props (kit level)
|
|
33
|
+
|
|
34
|
+
`PaginationLink`:
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Default |
|
|
37
|
+
|------|------|---------|
|
|
38
|
+
| `isActive` | `boolean` — outline variant + `aria-current="page"` when true, ghost otherwise | `false` |
|
|
39
|
+
| `size` | `default` \| `sm` \| `lg` (Button's own size scale) | `default` |
|
|
40
|
+
| `square` | `boolean` — square, icon-sized footprint | `true` |
|
|
41
|
+
|
|
42
|
+
`PaginationPrevious`/`PaginationNext` accept the same props minus `size`/
|
|
43
|
+
`square` (fixed to `default`/`false`), plus `text` to relabel the button.
|
|
44
|
+
|
|
45
|
+
## Implementation note
|
|
46
|
+
|
|
47
|
+
`PaginationLink` is styled through the exact same CSS classes `Button`
|
|
48
|
+
renders with (`button.module.css`'s `.button`/`.variantOutline`/
|
|
49
|
+
`.variantGhost`/`.sizeDefault` etc.) — visually and behaviorally the same
|
|
50
|
+
"button" surface, applied to a real `<a>` instead of Base UI's `Button`
|
|
51
|
+
primitive, so pagination items are real, crawlable, cmd-clickable links.
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import {
|
|
57
|
+
Pagination,
|
|
58
|
+
PaginationContent,
|
|
59
|
+
PaginationEllipsis,
|
|
60
|
+
PaginationItem,
|
|
61
|
+
PaginationLink,
|
|
62
|
+
PaginationNext,
|
|
63
|
+
PaginationPrevious,
|
|
64
|
+
} from '@gears-frontx/ui-kit';
|
|
65
|
+
|
|
66
|
+
<Pagination>
|
|
67
|
+
<PaginationContent>
|
|
68
|
+
<PaginationItem>
|
|
69
|
+
<PaginationPrevious href="?page=1" />
|
|
70
|
+
</PaginationItem>
|
|
71
|
+
<PaginationItem>
|
|
72
|
+
<PaginationLink href="?page=1">1</PaginationLink>
|
|
73
|
+
</PaginationItem>
|
|
74
|
+
<PaginationItem>
|
|
75
|
+
<PaginationLink href="?page=2" isActive>
|
|
76
|
+
2
|
|
77
|
+
</PaginationLink>
|
|
78
|
+
</PaginationItem>
|
|
79
|
+
<PaginationItem>
|
|
80
|
+
<PaginationEllipsis />
|
|
81
|
+
</PaginationItem>
|
|
82
|
+
<PaginationItem>
|
|
83
|
+
<PaginationNext href="?page=3" />
|
|
84
|
+
</PaginationItem>
|
|
85
|
+
</PaginationContent>
|
|
86
|
+
</Pagination>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Anti-patterns
|
|
90
|
+
|
|
91
|
+
- Do not wrap a client-side handler in `href="#"` and call
|
|
92
|
+
`preventDefault()` as the only navigation mechanism — a real `href` keeps
|
|
93
|
+
the page crawlable and cmd/middle-click-able, matching a genuine link's
|
|
94
|
+
semantics.
|
|
95
|
+
- Do not set `isActive` on more than one `PaginationLink` at a time — only
|
|
96
|
+
one page is "current".
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Popover
|
|
2
|
+
|
|
3
|
+
A portalled panel anchored to a trigger, opened by click by default. Wraps
|
|
4
|
+
the Base UI Popover primitives; positioning, portalling, and Escape/
|
|
5
|
+
outside-press dismissal come from Base UI. Unlike `dialog`, a popover is
|
|
6
|
+
non-modal by default: it does not trap focus or lock page scroll, and does
|
|
7
|
+
not render a backdrop.
|
|
8
|
+
|
|
9
|
+
Composition: `Popover` (root, holds open state) → `PopoverTrigger` →
|
|
10
|
+
`PopoverContent` (portals and positions `PopoverHeader` / `PopoverTitle` /
|
|
11
|
+
`PopoverDescription` / consumer content against the trigger).
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- A focused piece of UI anchored to a control — a filter panel, a settings
|
|
16
|
+
form for one field, a small piece of interactive content the user opens
|
|
17
|
+
deliberately.
|
|
18
|
+
|
|
19
|
+
## When not to use
|
|
20
|
+
|
|
21
|
+
- A menu of actions — use `dropdown-menu`.
|
|
22
|
+
- A supplementary, non-interactive hint — use `tooltip`.
|
|
23
|
+
- Content revealed on hover rather than click, where the trigger's own
|
|
24
|
+
purpose is only to preview something (e.g. a user's profile card behind
|
|
25
|
+
their name) — use `hover-card`.
|
|
26
|
+
- A focused task that should block the rest of the page — use `dialog`.
|
|
27
|
+
|
|
28
|
+
## Props (kit level)
|
|
29
|
+
|
|
30
|
+
`Popover` (root): `open` / `defaultOpen`, `onOpenChange`,
|
|
31
|
+
`onOpenChangeComplete`, `modal` (`false` default; `true`; `'trap-focus'`),
|
|
32
|
+
`handle` (for a trigger placed outside the root, see Base UI's
|
|
33
|
+
detached-trigger pattern) — see Base UI Popover.Root.
|
|
34
|
+
|
|
35
|
+
`PopoverTrigger`: `openOnHover` (`false` default — pass `true` to also open
|
|
36
|
+
on hover, e.g. an info icon whose only job is revealing more text), `delay`
|
|
37
|
+
/ `closeDelay` (ms, only meaningful with `openOnHover`; Base UI defaults
|
|
38
|
+
`300`/`0`). Renders a native `<button>`.
|
|
39
|
+
|
|
40
|
+
`PopoverContent`:
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default |
|
|
43
|
+
|------|------|---------|
|
|
44
|
+
| `side` | `top` \| `bottom` \| `left` \| `right` \| `inline-start` \| `inline-end` | `bottom` |
|
|
45
|
+
| `align` | `start` \| `center` \| `end` | `center` |
|
|
46
|
+
| `sideOffset` / `alignOffset` | `number` | `4` / `0` |
|
|
47
|
+
| `container` | DOM node to portal the popup into | `<body>` |
|
|
48
|
+
| `positionMethod` | `absolute` \| `fixed` — pass `fixed` when the trigger sits inside a `transform`/`filter` container | `absolute` |
|
|
49
|
+
| `collisionBoundary` / `collisionPadding` | see Base UI Popover.Positioner — bound and pad the flip/shift collision logic | viewport / `5` |
|
|
50
|
+
| `className` | `string` — merged after the kit class | — |
|
|
51
|
+
|
|
52
|
+
The popup portals to `<body>` by default, so if your theme lives on a
|
|
53
|
+
subtree (`data-theme` on a section instead of `<html>`), pass that section
|
|
54
|
+
as `container` or the popup renders with the root theme — same contract as
|
|
55
|
+
`Dialog`/`Tooltip`/`DropdownMenu`.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import {
|
|
61
|
+
Button,
|
|
62
|
+
Popover,
|
|
63
|
+
PopoverContent,
|
|
64
|
+
PopoverDescription,
|
|
65
|
+
PopoverHeader,
|
|
66
|
+
PopoverTitle,
|
|
67
|
+
PopoverTrigger,
|
|
68
|
+
} from '@gears-frontx/ui-kit';
|
|
69
|
+
|
|
70
|
+
<Popover>
|
|
71
|
+
<PopoverTrigger render={<Button variant="outline">Open popover</Button>} />
|
|
72
|
+
<PopoverContent>
|
|
73
|
+
<PopoverHeader>
|
|
74
|
+
<PopoverTitle>Dimensions</PopoverTitle>
|
|
75
|
+
<PopoverDescription>Set the dimensions for the layer.</PopoverDescription>
|
|
76
|
+
</PopoverHeader>
|
|
77
|
+
</PopoverContent>
|
|
78
|
+
</Popover>;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Anti-patterns
|
|
82
|
+
|
|
83
|
+
- Do not use `Popover` for a fly-out list of actions — `dropdown-menu`
|
|
84
|
+
ships the role, keyboard navigation, and item variants for that.
|
|
85
|
+
- Do not skip `modal={true}` (or `'trap-focus'`) when the popover's own
|
|
86
|
+
content needs to trap focus (a small form the user must complete before
|
|
87
|
+
moving on) — the default is intentionally non-modal.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Progress
|
|
2
|
+
|
|
3
|
+
A bar communicating the completion of a task. Wraps the Base UI Progress
|
|
4
|
+
primitive (Root/Track/Indicator/Label/Value): reports `role="progressbar"`
|
|
5
|
+
with `aria-valuenow`/`aria-valuemin`/`aria-valuemax` to screen readers.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A determinate, long-running task with a known percentage: upload,
|
|
10
|
+
import, multi-step onboarding.
|
|
11
|
+
- An indeterminate task (unknown duration) — pass `value={null}`.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- A short async action with no meaningful percentage — a `Button`'s
|
|
16
|
+
`loading` spinner reads better.
|
|
17
|
+
- Step-by-step navigation where the steps themselves are the UI — a
|
|
18
|
+
dedicated stepper/wizard component fits better than a bar.
|
|
19
|
+
|
|
20
|
+
## Props (kit level)
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `value` | current value, or `null` for indeterminate — **required** | — |
|
|
25
|
+
| `min` / `max` | bounds of the scale | `0` / `100` |
|
|
26
|
+
| `className` | `string` — merged after the kit class | — |
|
|
27
|
+
|
|
28
|
+
`ProgressTrack`, `ProgressIndicator`, `ProgressLabel`, `ProgressValue` are
|
|
29
|
+
also exported standalone for composing a custom layout (e.g. a label row
|
|
30
|
+
above the bar) instead of the `Progress` convenience wrapper's default
|
|
31
|
+
Track+Indicator. All forward Base UI's own props for that part.
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { Progress, ProgressLabel, ProgressValue } from '@gears-frontx/ui-kit';
|
|
37
|
+
|
|
38
|
+
// Determinate
|
|
39
|
+
<Progress value={64} aria-label="Uploading" />
|
|
40
|
+
|
|
41
|
+
// Indeterminate
|
|
42
|
+
<Progress value={null} aria-label="Importing" />
|
|
43
|
+
|
|
44
|
+
// Composed: label + live percentage above the bar
|
|
45
|
+
<Progress value={progress}>
|
|
46
|
+
<ProgressLabel>Uploading</ProgressLabel>
|
|
47
|
+
<ProgressValue />
|
|
48
|
+
</Progress>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Anti-patterns
|
|
52
|
+
|
|
53
|
+
- Do not render one without `aria-label`/`aria-labelledby`, or a
|
|
54
|
+
`ProgressLabel` when composing manually — the bar reports a value but
|
|
55
|
+
needs a name for what it's the progress *of*.
|
|
56
|
+
- Do not fake an indeterminate look with a stuck `value` — pass
|
|
57
|
+
`value={null}`; the indicator otherwise reports a false, static
|
|
58
|
+
percentage to assistive tech.
|