@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,58 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
A two-state button that can be on or off. Wraps the Base UI Toggle
|
|
4
|
+
primitive: renders a `<button>`, state via `data-pressed`, standalone or as
|
|
5
|
+
an item inside `ToggleGroup`.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A single, independent on/off control that looks and behaves like a
|
|
10
|
+
button — formatting actions (bold, italic), a "favorite" star, a view
|
|
11
|
+
toggle.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- A labelled settings switch that applies immediately — use `switch`.
|
|
16
|
+
- A set of related, usually mutually-exclusive options — use `toggle-group`.
|
|
17
|
+
|
|
18
|
+
## Props (kit level)
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default |
|
|
21
|
+
|------|------|---------|
|
|
22
|
+
| `pressed` / `defaultPressed` | controlled / uncontrolled pressed state | `false` |
|
|
23
|
+
| `onPressedChange` | `(pressed: boolean, eventDetails) => void` | — |
|
|
24
|
+
| `variant` | `default` \| `outline` | `default` |
|
|
25
|
+
| `size` | `default` \| `sm` \| `lg` | `default` |
|
|
26
|
+
| `value` | identifies this toggle inside a `ToggleGroup` | — |
|
|
27
|
+
| `className` | `string` — merged after variant/size classes | — |
|
|
28
|
+
|
|
29
|
+
Other props follow Base UI Toggle (`disabled`, `render`, ...).
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Toggle } from '@gears-frontx/ui-kit';
|
|
35
|
+
|
|
36
|
+
// Standalone, uncontrolled
|
|
37
|
+
<Toggle aria-label="Bold" defaultPressed>
|
|
38
|
+
<BoldIcon />
|
|
39
|
+
</Toggle>
|
|
40
|
+
|
|
41
|
+
// Controlled
|
|
42
|
+
<Toggle pressed={starred} onPressedChange={setStarred} aria-label="Favorite">
|
|
43
|
+
<StarIcon />
|
|
44
|
+
</Toggle>
|
|
45
|
+
|
|
46
|
+
// Outline variant, large size
|
|
47
|
+
<Toggle variant="outline" size="lg" aria-label="Italic">
|
|
48
|
+
<ItalicIcon />
|
|
49
|
+
</Toggle>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Anti-patterns
|
|
53
|
+
|
|
54
|
+
- Do not render one without a visible label or `aria-label` — an icon-only
|
|
55
|
+
toggle carries no accessible name otherwise.
|
|
56
|
+
- Do not reach for `Toggle` when the options are mutually exclusive or form
|
|
57
|
+
a related set — `toggle-group` manages that shared state; wiring several
|
|
58
|
+
independent `Toggle`s by hand duplicates what the group already does.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Typeset
|
|
2
|
+
|
|
3
|
+
A prose stylesheet for rendered markdown or HTML the app does not author
|
|
4
|
+
itself — chat messages, docs pages, CMS content. Not a component: it is a
|
|
5
|
+
global stylesheet of plain class names, ported from shadcn/ui's Typeset
|
|
6
|
+
(MIT) with its `--color-*` references retargeted to this kit's own tokens.
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
- Any block of HTML that arrives as a string and gets rendered as-is —
|
|
11
|
+
a markdown renderer's output, an API-supplied description, a message
|
|
12
|
+
body. Typeset gives it headings, lists, tables, code and quote styling
|
|
13
|
+
without the app writing a rule per element.
|
|
14
|
+
- Not for application UI. Kit components style themselves; wrapping them
|
|
15
|
+
in `.typeset` would put prose rhythm on a form.
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// once, in the consumer entry module
|
|
21
|
+
import '@gears-frontx/ui-kit/theme.css'; // required — Typeset reads its tokens from here
|
|
22
|
+
import '@gears-frontx/ui-kit/typeset.css';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Typeset paints nothing on its own without `theme.css`: every color, radius
|
|
26
|
+
and font it uses is a `var(--token, fallback)` read from there. The
|
|
27
|
+
fallbacks keep it legible if the tokens are missing, not branded.
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<div class="typeset typeset-docs">
|
|
31
|
+
<!-- rendered markdown goes here -->
|
|
32
|
+
</div>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Classes
|
|
36
|
+
|
|
37
|
+
| Class | Effect |
|
|
38
|
+
|-------|--------|
|
|
39
|
+
| `typeset` | The wrapper. Everything below is scoped to its descendants. |
|
|
40
|
+
| `typeset-chat` | Tighter rhythm for chat bubbles — less vertical space per message. |
|
|
41
|
+
| `typeset-docs` | Roomier long-form rhythm, at a fixed base size independent of the surrounding UI. |
|
|
42
|
+
| `typeset-reading` | Reading mode: larger type, generous leading and flow. |
|
|
43
|
+
| `typeset-compact` | Smaller type and tighter rhythm for dense UI surfaces. |
|
|
44
|
+
| `typeset-large` | An accessibility preset — larger type, more room. Expose it as a user setting, not a default. |
|
|
45
|
+
| `not-typeset` (or `data-not-typeset`) | Opts a nested subtree back out — e.g. a kit component embedded inside otherwise-typeset content. |
|
|
46
|
+
| `typeset-scroll` | Wraps one wide block (usually a `<table>`) so it scrolls horizontally instead of compressing. |
|
|
47
|
+
|
|
48
|
+
A preset is used ALONGSIDE `typeset`, never instead of it: each one only
|
|
49
|
+
overrides the rhythm variables it cares about.
|
|
50
|
+
|
|
51
|
+
## Variables
|
|
52
|
+
|
|
53
|
+
The presets are nothing but overrides of these three, so a project-specific
|
|
54
|
+
rhythm needs no new class — set them on your own wrapper.
|
|
55
|
+
|
|
56
|
+
| Variable | Meaning | Default |
|
|
57
|
+
|----------|---------|---------|
|
|
58
|
+
| `--typeset-size` | Base font size the whole scale derives from | `1em` |
|
|
59
|
+
| `--typeset-leading` | Body line-height | `1.75` |
|
|
60
|
+
| `--typeset-flow` | Vertical space between blocks | `1.25em` |
|
|
61
|
+
|
|
62
|
+
`--typeset-font-body` / `--typeset-font-heading` / `--typeset-font-mono`
|
|
63
|
+
select the families; body inherits from the page by default.
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
- `@layer components` (a native cascade layer, not a Tailwind construct)
|
|
68
|
+
is upstream's own device for staying overridable without `!important`:
|
|
69
|
+
any un-layered rule you write — including a CSS Modules class from this
|
|
70
|
+
same kit — wins over anything Typeset declares.
|
|
71
|
+
- The kit ships one type family for every role, so `--font-heading` maps to
|
|
72
|
+
`--font-sans`. `typeset-reading` therefore changes rhythm and scale, not
|
|
73
|
+
the typeface, where upstream's own version also switches to a serif.
|
|
74
|
+
- Dark mode needs nothing: the tokens Typeset reads already flip with
|
|
75
|
+
`theme.css`.
|
package/dist/drawer.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/drawer/public.js'
|
package/dist/drawer.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
import { Drawer as n } from "@base-ui/react/drawer";
|
|
4
|
+
import { cx as i, cva as f } from "class-variance-authority";
|
|
5
|
+
import { createContext as m, useContext as D } from "react";
|
|
6
|
+
import './chunks/drawer.BkS_qEHj.css';const h = "_backdrop_py518_31", y = "_viewport_py518_83", v = "_popup_py518_113", g = "_sideTop_py518_369", x = "_sideBottom_py518_373", N = "_sideLeft_py518_377", T = "_sideRight_py518_381", b = "_content_py518_394", C = "_swipeHandle_py518_435", P = "_header_py518_478", H = "_footer_py518_495", S = "_title_py518_504", k = "_description_py518_512", o = {
|
|
7
|
+
backdrop: h,
|
|
8
|
+
viewport: y,
|
|
9
|
+
popup: v,
|
|
10
|
+
sideTop: g,
|
|
11
|
+
sideBottom: x,
|
|
12
|
+
sideLeft: N,
|
|
13
|
+
sideRight: T,
|
|
14
|
+
content: b,
|
|
15
|
+
swipeHandle: C,
|
|
16
|
+
header: P,
|
|
17
|
+
footer: H,
|
|
18
|
+
title: S,
|
|
19
|
+
description: k
|
|
20
|
+
}, B = {
|
|
21
|
+
top: "up",
|
|
22
|
+
right: "right",
|
|
23
|
+
bottom: "down",
|
|
24
|
+
left: "left"
|
|
25
|
+
}, _ = m(null);
|
|
26
|
+
function R() {
|
|
27
|
+
const t = D(_);
|
|
28
|
+
if (!t)
|
|
29
|
+
throw new Error("Drawer parts (DrawerContent, DrawerPortal, ...) must be rendered inside a Drawer.");
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
function W({
|
|
33
|
+
modal: t = !0,
|
|
34
|
+
side: e = "bottom",
|
|
35
|
+
showSwipeHandle: c = !1,
|
|
36
|
+
snapPoints: s,
|
|
37
|
+
...a
|
|
38
|
+
}) {
|
|
39
|
+
const l = { hasSnapPoints: s != null && s.length > 0, modal: t, showSwipeHandle: c, side: e };
|
|
40
|
+
return /* @__PURE__ */ r(_.Provider, { value: l, children: /* @__PURE__ */ r(
|
|
41
|
+
n.Root,
|
|
42
|
+
{
|
|
43
|
+
modal: t,
|
|
44
|
+
snapPoints: s,
|
|
45
|
+
swipeDirection: B[e],
|
|
46
|
+
...a
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
}
|
|
50
|
+
function $({ className: t, ...e }) {
|
|
51
|
+
return /* @__PURE__ */ r(n.Trigger, { className: t, ...e });
|
|
52
|
+
}
|
|
53
|
+
function E(t) {
|
|
54
|
+
return /* @__PURE__ */ r(n.Portal, { ...t });
|
|
55
|
+
}
|
|
56
|
+
function q({ className: t, ...e }) {
|
|
57
|
+
return /* @__PURE__ */ r(n.Close, { className: t, ...e });
|
|
58
|
+
}
|
|
59
|
+
function I({ className: t, ...e }) {
|
|
60
|
+
return /* @__PURE__ */ r("div", { "aria-hidden": "true", className: i(o.swipeHandle, t), ...e });
|
|
61
|
+
}
|
|
62
|
+
function L({ className: t, ...e }) {
|
|
63
|
+
return /* @__PURE__ */ r(n.Backdrop, { className: i(o.backdrop, t), ...e });
|
|
64
|
+
}
|
|
65
|
+
const V = f(o.popup, {
|
|
66
|
+
variants: {
|
|
67
|
+
side: {
|
|
68
|
+
top: o.sideTop,
|
|
69
|
+
right: o.sideRight,
|
|
70
|
+
bottom: o.sideBottom,
|
|
71
|
+
left: o.sideLeft
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
function z({ className: t, children: e, container: c, ...s }) {
|
|
76
|
+
const { hasSnapPoints: a, modal: d, showSwipeHandle: l, side: p } = R(), w = p === "top" || p === "bottom" ? "y" : "x";
|
|
77
|
+
return /* @__PURE__ */ u(E, { container: c, children: [
|
|
78
|
+
d === !0 && /* @__PURE__ */ r(L, { "data-snap-points": a ? "" : void 0 }),
|
|
79
|
+
/* @__PURE__ */ r(n.Viewport, { "data-modal": d, className: o.viewport, children: /* @__PURE__ */ u(
|
|
80
|
+
n.Popup,
|
|
81
|
+
{
|
|
82
|
+
"data-swipe-axis": w,
|
|
83
|
+
"data-snap-points": a ? "" : void 0,
|
|
84
|
+
"data-side": p,
|
|
85
|
+
className: V({ side: p, className: t }),
|
|
86
|
+
...s,
|
|
87
|
+
children: [
|
|
88
|
+
l && /* @__PURE__ */ r(I, {}),
|
|
89
|
+
/* @__PURE__ */ r(n.Content, { className: o.content, children: e })
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
) })
|
|
93
|
+
] });
|
|
94
|
+
}
|
|
95
|
+
function G({ className: t, ...e }) {
|
|
96
|
+
return /* @__PURE__ */ r("div", { className: i(o.header, t), ...e });
|
|
97
|
+
}
|
|
98
|
+
function J({ className: t, ...e }) {
|
|
99
|
+
return /* @__PURE__ */ r("div", { className: i(o.footer, t), ...e });
|
|
100
|
+
}
|
|
101
|
+
function K({ className: t, ...e }) {
|
|
102
|
+
return /* @__PURE__ */ r(n.Title, { className: i(o.title, t), ...e });
|
|
103
|
+
}
|
|
104
|
+
function M({ className: t, ...e }) {
|
|
105
|
+
return /* @__PURE__ */ r(n.Description, { className: i(o.description, t), ...e });
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
W as Drawer,
|
|
109
|
+
L as DrawerBackdrop,
|
|
110
|
+
q as DrawerClose,
|
|
111
|
+
z as DrawerContent,
|
|
112
|
+
M as DrawerDescription,
|
|
113
|
+
J as DrawerFooter,
|
|
114
|
+
G as DrawerHeader,
|
|
115
|
+
E as DrawerPortal,
|
|
116
|
+
I as DrawerSwipeHandle,
|
|
117
|
+
K as DrawerTitle,
|
|
118
|
+
$ as DrawerTrigger
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../src/components/drawer/drawer.tsx"],"sourcesContent":["// Load-bearing: DrawerContent calls useDrawer() (React.useContext under the\n// hood) directly in its own render body, same shape as DropdownMenuContent's\n// useContext(MenuContainerContext) — see that file's own banner comment.\n// Coupled to CLIENT_COMPONENTS in scripts/verify-consumer.sh — keep both in\n// sync if this ever changes.\n'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { cva, cx } from 'class-variance-authority';\nimport { createContext, useContext, type ComponentProps } from 'react';\n\nimport styles from './drawer.module.css';\n\n/**\n * Which edge the drawer opens from and swipes back out toward — same\n * vocabulary and default as Sheet's `side` (top/right/bottom/left,\n * default 'right' there vs. 'bottom' here, the conventional default for\n * each). Base UI's own Drawer primitive names this axis `swipeDirection`\n * with values 'up'/'down'/'left'/'right' (the direction a dismiss swipe\n * travels, not the edge the panel sits against) — the two vocabularies are\n * a straight 1:1 map (a bottom-anchored drawer is always dismissed by\n * swiping down, a top-anchored one by swiping up; left/right name the\n * same thing either way), so this kit-level prop renames only the\n * top/bottom half for consistency with Sheet's own edge-anchored\n * vocabulary, without losing any distinction Base UI itself draws.\n */\nexport type DrawerSide = 'top' | 'right' | 'bottom' | 'left';\n\nconst SIDE_TO_SWIPE_DIRECTION: Record<DrawerSide, NonNullable<DrawerPrimitive.Root.Props['swipeDirection']>> = {\n top: 'up',\n right: 'right',\n bottom: 'down',\n left: 'left',\n};\n\ninterface DrawerContextValue {\n /** Whether `snapPoints` was given a non-empty list — drives `data-snap-points`\n * on both Backdrop and Popup (see drawer.module.css). */\n hasSnapPoints: boolean;\n modal: DrawerPrimitive.Root.Props['modal'];\n showSwipeHandle: boolean;\n side: DrawerSide;\n}\n\n/**\n * `Drawer` (root) and `DrawerContent` are siblings in the JSX tree, not\n * parent/child — same shape as upstream's own `useDrawer()` context, needed\n * because `DrawerContent` has to know `side`/`modal`/`showSwipeHandle`\n * without the root prop-drilling them through whatever intervening markup\n * a consumer places between `Drawer` and `DrawerContent`.\n */\nconst DrawerContext = createContext<DrawerContextValue | null>(null);\n\nfunction useDrawer() {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error('Drawer parts (DrawerContent, DrawerPortal, ...) must be rendered inside a Drawer.');\n }\n return context;\n}\n\nexport interface DrawerProps extends Omit<DrawerPrimitive.Root.Props, 'swipeDirection'> {\n /** @default 'bottom' */\n side?: DrawerSide;\n /**\n * Renders a small grab-handle bar at the panel's innermost edge — a\n * visual affordance only (`aria-hidden`); swipe-to-dismiss itself works\n * from anywhere in the popup regardless of this prop. @default false\n */\n showSwipeHandle?: boolean;\n}\n\nexport function Drawer({\n modal = true,\n side = 'bottom',\n showSwipeHandle = false,\n snapPoints,\n ...props\n}: DrawerProps) {\n const hasSnapPoints = snapPoints != null && snapPoints.length > 0;\n // No useMemo: this object is small (four primitives) and Drawer's own\n // render body stays hook-free either way — DrawerContent is what pulls in\n // the 'use client' requirement (see the file banner), not this recompute.\n const contextValue: DrawerContextValue = { hasSnapPoints, modal, showSwipeHandle, side };\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <DrawerPrimitive.Root\n modal={modal}\n snapPoints={snapPoints}\n swipeDirection={SIDE_TO_SWIPE_DIRECTION[side]}\n {...props}\n />\n </DrawerContext.Provider>\n );\n}\n/**\n * Unlike Dialog's plain `export const Dialog = DialogPrimitive.Root` alias,\n * `Drawer` above is a real wrapper function: the root renders no DOM element\n * of its own (Base UI groups the parts via context only), so this is the\n * only place the `side`→`swipeDirection` translation and the\n * `modal`/`showSwipeHandle`/`side` handoff to `DrawerContent` (via\n * `DrawerContext`) can live.\n */\n\nexport interface DrawerTriggerProps extends Omit<DrawerPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DrawerTrigger({ className, ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger className={className} {...props} />;\n}\n\nexport type DrawerPortalProps = Omit<DrawerPrimitive.Portal.Props, 'className'>;\n\nexport function DrawerPortal(props: DrawerPortalProps) {\n return <DrawerPrimitive.Portal {...props} />;\n}\n\nexport interface DrawerCloseProps extends Omit<DrawerPrimitive.Close.Props, 'className'> {\n className?: string;\n}\n\nexport function DrawerClose({ className, ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close className={className} {...props} />;\n}\n\n/**\n * The visual grab-handle bar shown at the panel's innermost edge when\n * `Drawer`'s `showSwipeHandle` is true. `aria-hidden`: it's a drag\n * affordance, not a control — the whole popup already responds to a swipe\n * gesture, and Base UI's own Escape/outside-press/trigger dismissal need no\n * button here. Orientation and edge-ordering are driven entirely by the\n * ancestor `.popup`'s own `side`/axis classes (see drawer.module.css) — this\n * component itself carries no side-awareness.\n */\nexport type DrawerSwipeHandleProps = ComponentProps<'div'>;\n\nexport function DrawerSwipeHandle({ className, ...props }: DrawerSwipeHandleProps) {\n return <div aria-hidden=\"true\" className={cx(styles.swipeHandle, className)} {...props} />;\n}\n\nexport interface DrawerBackdropProps extends Omit<DrawerPrimitive.Backdrop.Props, 'className'> {\n className?: string;\n}\n\nexport function DrawerBackdrop({ className, ...props }: DrawerBackdropProps) {\n return <DrawerPrimitive.Backdrop className={cx(styles.backdrop, className)} {...props} />;\n}\n\nconst drawerPopupVariants = cva(styles.popup, {\n variants: {\n side: {\n top: styles.sideTop,\n right: styles.sideRight,\n bottom: styles.sideBottom,\n left: styles.sideLeft,\n },\n },\n});\n\nexport interface DrawerContentProps extends Omit<DrawerPrimitive.Popup.Props, 'className'> {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree — same contract as\n * DialogContent/SheetContent.\n */\n container?: DrawerPrimitive.Portal.Props['container'];\n}\n\nexport function DrawerContent({ className, children, container, ...props }: DrawerContentProps) {\n const { hasSnapPoints, modal, showSwipeHandle, side } = useDrawer();\n // Base UI's own axis split (down/up dismiss vertically, left/right\n // horizontally) — matches its `data-swipe-axis` exactly, computed the same\n // way upstream's own useDrawer()-based DrawerContent does.\n const swipeAxis = side === 'top' || side === 'bottom' ? 'y' : 'x';\n\n return (\n <DrawerPortal container={container}>\n {/* Overlay/backdrop renders only for a genuinely modal drawer, exactly\n * like Dialog/Sheet's own modal+showBackdrop pairing — but Drawer has\n * no separate showBackdrop escape hatch because upstream's own source\n * ties Overlay strictly to `modal === true` with no independent prop,\n * and this port stays faithful to that shape rather than inventing one. */}\n {modal === true && <DrawerBackdrop data-snap-points={hasSnapPoints ? '' : undefined} />}\n <DrawerPrimitive.Viewport data-modal={modal} className={styles.viewport}>\n <DrawerPrimitive.Popup\n data-swipe-axis={swipeAxis}\n data-snap-points={hasSnapPoints ? '' : undefined}\n data-side={side}\n className={drawerPopupVariants({ side, className })}\n {...props}\n >\n {showSwipeHandle && <DrawerSwipeHandle />}\n <DrawerPrimitive.Content className={styles.content}>{children}</DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPortal>\n );\n}\n\nexport type DrawerHeaderProps = ComponentProps<'div'>;\n\nexport function DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n return <div className={cx(styles.header, className)} {...props} />;\n}\n\nexport type DrawerFooterProps = ComponentProps<'div'>;\n\nexport function DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\n\nexport interface DrawerTitleProps extends Omit<DrawerPrimitive.Title.Props, 'className'> {\n className?: string;\n}\n\nexport function DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return <DrawerPrimitive.Title className={cx(styles.title, className)} {...props} />;\n}\n\nexport interface DrawerDescriptionProps extends Omit<DrawerPrimitive.Description.Props, 'className'> {\n className?: string;\n}\n\nexport function DrawerDescription({ className, ...props }: DrawerDescriptionProps) {\n return <DrawerPrimitive.Description className={cx(styles.description, className)} {...props} />;\n}\n"],"names":["SIDE_TO_SWIPE_DIRECTION","DrawerContext","createContext","useDrawer","context","useContext","Drawer","modal","side","showSwipeHandle","snapPoints","props","contextValue","jsx","DrawerPrimitive","DrawerTrigger","className","DrawerPortal","DrawerClose","DrawerSwipeHandle","cx","styles","DrawerBackdrop","drawerPopupVariants","cva","DrawerContent","children","container","hasSnapPoints","swipeAxis","jsxs","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;;;;;;;;;;;;;;;GA4BMA,IAAyG;AAAA,EAC7G,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR,GAkBMC,IAAgBC,EAAyC,IAAI;AAEnE,SAASC,IAAY;AACnB,QAAMC,IAAUC,EAAWJ,CAAa;AACxC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,mFAAmF;AAErG,SAAOA;AACT;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,QAAQL,CAAS,GAAI,GAAGL,GAAO;AAClE;AAMO,SAASsB,EAAY,EAAE,WAAAjB,GAAW,GAAGL,KAA2B;AACrE,SAAO,gBAAAE,EAACC,EAAgB,OAAhB,EAAsB,WAAWM,EAAGC,EAAO,OAAOL,CAAS,GAAI,GAAGL,EAAA,CAAO;AACnF;AAMO,SAASuB,EAAkB,EAAE,WAAAlB,GAAW,GAAGL,KAAiC;AACjF,SAAO,gBAAAE,EAACC,EAAgB,aAAhB,EAA4B,WAAWM,EAAGC,EAAO,aAAaL,CAAS,GAAI,GAAGL,EAAA,CAAO;AAC/F;"}
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -1,184 +1,152 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { Menu as r } from "@base-ui/react/menu";
|
|
4
|
-
import { cx as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
className: a(n.svgIcon, t),
|
|
28
|
-
viewBox: "0 0 24 24",
|
|
29
|
-
fill: "none",
|
|
30
|
-
stroke: "currentColor",
|
|
31
|
-
strokeWidth: "2",
|
|
32
|
-
strokeLinecap: "round",
|
|
33
|
-
strokeLinejoin: "round",
|
|
34
|
-
"aria-hidden": "true",
|
|
35
|
-
children: /* @__PURE__ */ o("path", { d: "M20 6 9 17l-5-5" })
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
function y({ className: t }) {
|
|
40
|
-
return /* @__PURE__ */ o(
|
|
41
|
-
"svg",
|
|
42
|
-
{
|
|
43
|
-
className: a(n.svgIcon, t),
|
|
44
|
-
viewBox: "0 0 24 24",
|
|
45
|
-
fill: "none",
|
|
46
|
-
stroke: "currentColor",
|
|
47
|
-
strokeWidth: "2",
|
|
48
|
-
strokeLinecap: "round",
|
|
49
|
-
strokeLinejoin: "round",
|
|
50
|
-
"aria-hidden": "true",
|
|
51
|
-
children: /* @__PURE__ */ o("path", { d: "m9 18 6-6-6-6" })
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
const J = r.Root;
|
|
56
|
-
function K({ className: t, ...e }) {
|
|
57
|
-
return /* @__PURE__ */ o(r.Trigger, { className: t, ...e });
|
|
4
|
+
import { cx as c, cva as f } from "class-variance-authority";
|
|
5
|
+
import { CheckIcon as m, ChevronRightIcon as D } from "lucide-react";
|
|
6
|
+
import { useContext as M, createContext as N } from "react";
|
|
7
|
+
import './chunks/dropdown-menu.CDaeWYDT.css';const w = "_positioner_hdonl_14", x = "_popup_hdonl_6", C = "_subPopup_hdonl_33", T = "_label_hdonl_124", k = "_item_hdonl_121", P = "_variantDefault_hdonl_166", R = "_variantDestructive_hdonl_180", S = "_checkboxItem_hdonl_121", G = "_radioItem_hdonl_121", j = "_itemIndicator_hdonl_222", L = "_separator_hdonl_233", V = "_shortcut_hdonl_240", y = "_subTrigger_hdonl_122", q = "_subTriggerIcon_hdonl_298", z = "_svgIcon_hdonl_305", t = {
|
|
8
|
+
positioner: w,
|
|
9
|
+
popup: x,
|
|
10
|
+
subPopup: C,
|
|
11
|
+
label: T,
|
|
12
|
+
item: k,
|
|
13
|
+
variantDefault: P,
|
|
14
|
+
variantDestructive: R,
|
|
15
|
+
checkboxItem: S,
|
|
16
|
+
radioItem: G,
|
|
17
|
+
itemIndicator: j,
|
|
18
|
+
separator: L,
|
|
19
|
+
shortcut: V,
|
|
20
|
+
subTrigger: y,
|
|
21
|
+
subTriggerIcon: q,
|
|
22
|
+
svgIcon: z
|
|
23
|
+
}, p = N(void 0), O = r.Root;
|
|
24
|
+
function Q({ className: o, ...n }) {
|
|
25
|
+
return /* @__PURE__ */ e(r.Trigger, { className: o, ...n });
|
|
58
26
|
}
|
|
59
|
-
function
|
|
60
|
-
className:
|
|
61
|
-
children:
|
|
62
|
-
container:
|
|
63
|
-
side:
|
|
27
|
+
function A({
|
|
28
|
+
className: o,
|
|
29
|
+
children: n,
|
|
30
|
+
container: a,
|
|
31
|
+
side: i = "bottom",
|
|
64
32
|
sideOffset: s = 4,
|
|
65
33
|
align: u = "start",
|
|
66
34
|
alignOffset: _ = 0,
|
|
67
|
-
positionMethod:
|
|
35
|
+
positionMethod: h,
|
|
68
36
|
collisionBoundary: I,
|
|
69
37
|
collisionPadding: g,
|
|
70
|
-
...
|
|
38
|
+
...b
|
|
71
39
|
}) {
|
|
72
|
-
const
|
|
73
|
-
return /* @__PURE__ */
|
|
40
|
+
const v = M(p), l = a ?? v;
|
|
41
|
+
return /* @__PURE__ */ e(p.Provider, { value: l, children: /* @__PURE__ */ e(r.Portal, { container: l, children: /* @__PURE__ */ e(
|
|
74
42
|
r.Positioner,
|
|
75
43
|
{
|
|
76
|
-
side:
|
|
44
|
+
side: i,
|
|
77
45
|
sideOffset: s,
|
|
78
46
|
align: u,
|
|
79
47
|
alignOffset: _,
|
|
80
|
-
positionMethod:
|
|
48
|
+
positionMethod: h,
|
|
81
49
|
collisionBoundary: I,
|
|
82
50
|
collisionPadding: g,
|
|
83
|
-
className:
|
|
84
|
-
children: /* @__PURE__ */
|
|
51
|
+
className: t.positioner,
|
|
52
|
+
children: /* @__PURE__ */ e(r.Popup, { className: c(t.popup, o), ...b, children: n })
|
|
85
53
|
}
|
|
86
54
|
) }) });
|
|
87
55
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
56
|
+
function U({ className: o, ...n }) {
|
|
57
|
+
return /* @__PURE__ */ e(r.Group, { className: o, ...n });
|
|
90
58
|
}
|
|
91
|
-
function
|
|
92
|
-
return /* @__PURE__ */
|
|
59
|
+
function W({ className: o, ...n }) {
|
|
60
|
+
return /* @__PURE__ */ e(r.GroupLabel, { className: c(t.label, o), ...n });
|
|
93
61
|
}
|
|
94
|
-
const
|
|
62
|
+
const B = f(t.item, {
|
|
95
63
|
variants: {
|
|
96
64
|
variant: {
|
|
97
|
-
default:
|
|
98
|
-
destructive:
|
|
65
|
+
default: t.variantDefault,
|
|
66
|
+
destructive: t.variantDestructive
|
|
99
67
|
}
|
|
100
68
|
},
|
|
101
69
|
defaultVariants: {
|
|
102
70
|
variant: "default"
|
|
103
71
|
}
|
|
104
72
|
});
|
|
105
|
-
function
|
|
106
|
-
return /* @__PURE__ */
|
|
73
|
+
function X({ className: o, variant: n, ...a }) {
|
|
74
|
+
return /* @__PURE__ */ e(r.Item, { className: B({ variant: n, className: o }), ...a });
|
|
107
75
|
}
|
|
108
|
-
function
|
|
109
|
-
className:
|
|
110
|
-
children:
|
|
111
|
-
...
|
|
76
|
+
function Y({
|
|
77
|
+
className: o,
|
|
78
|
+
children: n,
|
|
79
|
+
...a
|
|
112
80
|
}) {
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
/* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ d(r.CheckboxItem, { className: c(t.checkboxItem, o), ...a, children: [
|
|
82
|
+
n,
|
|
83
|
+
/* @__PURE__ */ e(r.CheckboxItemIndicator, { className: t.itemIndicator, children: /* @__PURE__ */ e(m, { className: t.svgIcon }) })
|
|
116
84
|
] });
|
|
117
85
|
}
|
|
118
|
-
function
|
|
119
|
-
return /* @__PURE__ */
|
|
86
|
+
function Z({ className: o, ...n }) {
|
|
87
|
+
return /* @__PURE__ */ e(r.RadioGroup, { className: o, ...n });
|
|
120
88
|
}
|
|
121
|
-
function
|
|
122
|
-
className:
|
|
123
|
-
children:
|
|
124
|
-
...
|
|
89
|
+
function $({
|
|
90
|
+
className: o,
|
|
91
|
+
children: n,
|
|
92
|
+
...a
|
|
125
93
|
}) {
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
|
|
128
|
-
/* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ d(r.RadioItem, { className: c(t.radioItem, o), ...a, children: [
|
|
95
|
+
n,
|
|
96
|
+
/* @__PURE__ */ e(r.RadioItemIndicator, { className: t.itemIndicator, children: /* @__PURE__ */ e(m, { className: t.svgIcon }) })
|
|
129
97
|
] });
|
|
130
98
|
}
|
|
131
|
-
function
|
|
132
|
-
return /* @__PURE__ */
|
|
99
|
+
function oo({ className: o, ...n }) {
|
|
100
|
+
return /* @__PURE__ */ e(r.Separator, { className: c(t.separator, o), ...n });
|
|
133
101
|
}
|
|
134
|
-
function
|
|
135
|
-
return /* @__PURE__ */
|
|
102
|
+
function no({ className: o, ...n }) {
|
|
103
|
+
return /* @__PURE__ */ e("span", { className: c(t.shortcut, o), ...n });
|
|
136
104
|
}
|
|
137
|
-
const
|
|
138
|
-
function
|
|
139
|
-
className:
|
|
140
|
-
children:
|
|
141
|
-
...
|
|
105
|
+
const to = r.SubmenuRoot;
|
|
106
|
+
function eo({
|
|
107
|
+
className: o,
|
|
108
|
+
children: n,
|
|
109
|
+
...a
|
|
142
110
|
}) {
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ d(r.SubmenuTrigger, { className: c(t.subTrigger, o), ...a, children: [
|
|
112
|
+
n,
|
|
113
|
+
/* @__PURE__ */ e(D, { className: c(t.svgIcon, t.subTriggerIcon) })
|
|
146
114
|
] });
|
|
147
115
|
}
|
|
148
|
-
function
|
|
149
|
-
className:
|
|
150
|
-
side:
|
|
151
|
-
align:
|
|
152
|
-
sideOffset:
|
|
116
|
+
function ro({
|
|
117
|
+
className: o,
|
|
118
|
+
side: n = "right",
|
|
119
|
+
align: a = "start",
|
|
120
|
+
sideOffset: i = 0,
|
|
153
121
|
alignOffset: s = -3,
|
|
154
122
|
...u
|
|
155
123
|
}) {
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
|
|
124
|
+
return /* @__PURE__ */ e(
|
|
125
|
+
A,
|
|
158
126
|
{
|
|
159
|
-
className:
|
|
160
|
-
side:
|
|
161
|
-
align:
|
|
162
|
-
sideOffset:
|
|
127
|
+
className: c(t.subPopup, o),
|
|
128
|
+
side: n,
|
|
129
|
+
align: a,
|
|
130
|
+
sideOffset: i,
|
|
163
131
|
alignOffset: s,
|
|
164
132
|
...u
|
|
165
133
|
}
|
|
166
134
|
);
|
|
167
135
|
}
|
|
168
136
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
137
|
+
O as DropdownMenu,
|
|
138
|
+
Y as DropdownMenuCheckboxItem,
|
|
139
|
+
A as DropdownMenuContent,
|
|
140
|
+
U as DropdownMenuGroup,
|
|
141
|
+
X as DropdownMenuItem,
|
|
142
|
+
W as DropdownMenuLabel,
|
|
143
|
+
Z as DropdownMenuRadioGroup,
|
|
144
|
+
$ as DropdownMenuRadioItem,
|
|
145
|
+
oo as DropdownMenuSeparator,
|
|
146
|
+
no as DropdownMenuShortcut,
|
|
147
|
+
to as DropdownMenuSub,
|
|
148
|
+
ro as DropdownMenuSubContent,
|
|
149
|
+
eo as DropdownMenuSubTrigger,
|
|
150
|
+
Q as DropdownMenuTrigger
|
|
183
151
|
};
|
|
184
152
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Load-bearing: DropdownMenuContent calls useContext directly, so this\n// can't be dropped. Coupled to CLIENT_COMPONENTS in\n// scripts/verify-consumer.sh — keep both in sync if this ever changes.\n'use client';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { type ComponentProps, createContext, useContext } from 'react';\n\nimport styles from './dropdown-menu.module.css';\n\n/*\n * Carries DropdownMenuContent's effective portal container down to nested\n * submenus, so a theme scoped to a subtree holds one level deep without the\n * consumer repeating `container` on every DropdownMenuSubContent. An\n * explicit `container` on the submenu still wins.\n */\nconst MenuContainerContext = createContext<MenuPrimitive.Portal.Props['container']>(undefined);\n\n/* Inline lucide paths (ISC) — the kit carries no icon dependency. */\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\nfunction ChevronRightIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n );\n}\n\nexport const DropdownMenu = MenuPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Same idiom as\n * TooltipProviderProps.\n */\nexport type DropdownMenuProps = MenuPrimitive.Root.Props;\n\nexport interface DropdownMenuTriggerProps extends Omit<MenuPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuTrigger({ className, ...props }: DropdownMenuTriggerProps) {\n return <MenuPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DropdownMenuContentProps\n extends Omit<MenuPrimitive.Popup.Props, 'className'>,\n Pick<\n MenuPrimitive.Positioner.Props,\n // positionMethod/collision*: the escape hatch for popups anchored\n // inside a transform/filter container (an animated panel is the usual\n // case), where the default absolute positioning resolves against the\n // wrong containing block — positionMethod=\"fixed\" is the standard\n // fix, and it must be reachable without bypassing the kit.\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n * Inherited by nested DropdownMenuSubContent unless it passes its own.\n */\n container?: MenuPrimitive.Portal.Props['container'];\n}\n\nexport function DropdownMenuContent({\n className,\n children,\n container,\n side = 'bottom',\n sideOffset = 4,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: DropdownMenuContentProps) {\n const inheritedContainer = useContext(MenuContainerContext);\n const effectiveContainer = container ?? inheritedContainer;\n return (\n <MenuContainerContext.Provider value={effectiveContainer}>\n <MenuPrimitive.Portal container={effectiveContainer}>\n <MenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <MenuPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n </MenuContainerContext.Provider>\n );\n}\n\nexport interface DropdownMenuGroupProps extends Omit<MenuPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuGroup({ className, ...props }: DropdownMenuGroupProps) {\n return <MenuPrimitive.Group className={className} {...props} />;\n}\n\nexport interface DropdownMenuLabelProps extends Omit<MenuPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps) {\n return <MenuPrimitive.GroupLabel className={cx(styles.label, className)} {...props} />;\n}\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface DropdownMenuItemProps\n extends Omit<MenuPrimitive.Item.Props, 'className'>, VariantProps<typeof itemVariants> {\n className?: string;\n}\n\nexport function DropdownMenuItem({ className, variant, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item className={itemVariants({ variant, className })} {...props} />;\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends Omit<MenuPrimitive.CheckboxItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuCheckboxItem({\n className,\n children,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem className={cx(styles.checkboxItem, className)} {...props}>\n {children}\n <MenuPrimitive.CheckboxItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport interface DropdownMenuRadioGroupProps\n extends Omit<MenuPrimitive.RadioGroup.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioGroup({ className, ...props }: DropdownMenuRadioGroupProps) {\n return <MenuPrimitive.RadioGroup className={className} {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends Omit<MenuPrimitive.RadioItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem className={cx(styles.radioItem, className)} {...props}>\n {children}\n <MenuPrimitive.RadioItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport interface DropdownMenuSeparatorProps\n extends Omit<MenuPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return <MenuPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport type DropdownMenuShortcutProps = ComponentProps<'span'>;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return <span className={cx(styles.shortcut, className)} {...props} />;\n}\n\nexport const DropdownMenuSub = MenuPrimitive.SubmenuRoot;\n/** Pass-through props type — see DropdownMenuProps. */\nexport type DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;\n\nexport interface DropdownMenuSubTriggerProps\n extends Omit<MenuPrimitive.SubmenuTrigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger className={cx(styles.subTrigger, className)} {...props}>\n {children}\n <ChevronRightIcon className={styles.subTriggerIcon} />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nexport type DropdownMenuSubContentProps = DropdownMenuContentProps;\n\nexport function DropdownMenuSubContent({\n className,\n side = 'right',\n align = 'start',\n sideOffset = 0,\n alignOffset = -3,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuContent\n className={cx(styles.subPopup, className)}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n {...props}\n />\n );\n}\n"],"names":["MenuContainerContext","createContext","CheckIcon","className","jsx","cx","styles","ChevronRightIcon","DropdownMenu","MenuPrimitive","DropdownMenuTrigger","props","DropdownMenuContent","children","container","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","inheritedContainer","useContext","effectiveContainer","DropdownMenuGroup","DropdownMenuLabel","itemVariants","cva","DropdownMenuItem","variant","DropdownMenuCheckboxItem","jsxs","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],"mappings":";;;;;;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AAAqB,EAACvB,EAAc,gBAAd,EAA6B,WAAWJ,EAAGC,EAAO,YAAYH,CAAS,GAAI,GAAGQ,GAC5E,UAAA;AAAA,IAAAE;AAAA,IACD,gBAAAT,EAACG,GAAA,EAAiB,WAAWD,EAAO,eAAA,CAAgB;AAAA,EAAA,GACtD;AAEJ;AAIO,SAASiC,GAAuB;AAAA,EACrC,WAAApC;AAAA,EACA,MAAAY,IAAO;AAAA,EACP,OAAAE,IAAQ;AAAA,EACR,YAAAD,IAAa;AAAA,EACb,aAAAE,IAAc;AAAA,EACd,GAAGP;AACL,GAAgC;AAC9B,SACE,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,WAAWP,EAAGC,EAAO,UAAUH,CAAS;AAAA,MACxC,MAAAY;AAAA,MACA,OAAAE;AAAA,MACA,YAAAD;AAAA,MACA,aAAAE;AAAA,MACC,GAAGP;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Load-bearing: DropdownMenuContent calls useContext directly, so this\n// can't be dropped. Coupled to CLIENT_COMPONENTS in\n// scripts/verify-consumer.sh — keep both in sync if this ever changes.\n'use client';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { type ComponentProps, createContext, useContext } from 'react';\n\nimport styles from './dropdown-menu.module.css';\n\n/*\n * Carries DropdownMenuContent's effective portal container down to nested\n * submenus, so a theme scoped to a subtree holds one level deep without the\n * consumer repeating `container` on every DropdownMenuSubContent. An\n * explicit `container` on the submenu still wins.\n */\nconst MenuContainerContext = createContext<MenuPrimitive.Portal.Props['container']>(undefined);\n\nexport const DropdownMenu = MenuPrimitive.Root;\n/**\n * Base UI pass-through; props type re-exported (see dialog.tsx).\n */\nexport type DropdownMenuProps = MenuPrimitive.Root.Props;\n\nexport interface DropdownMenuTriggerProps extends Omit<MenuPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuTrigger({ className, ...props }: DropdownMenuTriggerProps) {\n return <MenuPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DropdownMenuContentProps\n extends Omit<MenuPrimitive.Popup.Props, 'className'>,\n Pick<\n MenuPrimitive.Positioner.Props,\n // positionMethod/collision*: the escape hatch for popups anchored\n // inside a transform/filter container (an animated panel is the usual\n // case), where the default absolute positioning resolves against the\n // wrong containing block — positionMethod=\"fixed\" is the standard\n // fix, and it must be reachable without bypassing the kit.\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n * Inherited by nested DropdownMenuSubContent unless it passes its own.\n */\n container?: MenuPrimitive.Portal.Props['container'];\n}\n\nexport function DropdownMenuContent({\n className,\n children,\n container,\n side = 'bottom',\n sideOffset = 4,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: DropdownMenuContentProps) {\n const inheritedContainer = useContext(MenuContainerContext);\n const effectiveContainer = container ?? inheritedContainer;\n return (\n <MenuContainerContext.Provider value={effectiveContainer}>\n <MenuPrimitive.Portal container={effectiveContainer}>\n <MenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <MenuPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n </MenuContainerContext.Provider>\n );\n}\n\nexport interface DropdownMenuGroupProps extends Omit<MenuPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuGroup({ className, ...props }: DropdownMenuGroupProps) {\n return <MenuPrimitive.Group className={className} {...props} />;\n}\n\nexport interface DropdownMenuLabelProps extends Omit<MenuPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps) {\n return <MenuPrimitive.GroupLabel className={cx(styles.label, className)} {...props} />;\n}\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface DropdownMenuItemProps\n extends Omit<MenuPrimitive.Item.Props, 'className'>, VariantProps<typeof itemVariants> {\n className?: string;\n}\n\nexport function DropdownMenuItem({ className, variant, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item className={itemVariants({ variant, className })} {...props} />;\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends Omit<MenuPrimitive.CheckboxItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuCheckboxItem({\n className,\n children,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem className={cx(styles.checkboxItem, className)} {...props}>\n {children}\n <MenuPrimitive.CheckboxItemIndicator className={styles.itemIndicator}>\n <CheckIcon className={styles.svgIcon} />\n </MenuPrimitive.CheckboxItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport interface DropdownMenuRadioGroupProps\n extends Omit<MenuPrimitive.RadioGroup.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioGroup({ className, ...props }: DropdownMenuRadioGroupProps) {\n return <MenuPrimitive.RadioGroup className={className} {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends Omit<MenuPrimitive.RadioItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem className={cx(styles.radioItem, className)} {...props}>\n {children}\n <MenuPrimitive.RadioItemIndicator className={styles.itemIndicator}>\n <CheckIcon className={styles.svgIcon} />\n </MenuPrimitive.RadioItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport interface DropdownMenuSeparatorProps\n extends Omit<MenuPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return <MenuPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport type DropdownMenuShortcutProps = ComponentProps<'span'>;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return <span className={cx(styles.shortcut, className)} {...props} />;\n}\n\nexport const DropdownMenuSub = MenuPrimitive.SubmenuRoot;\n/** Pass-through props type — see DropdownMenuProps. */\nexport type DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;\n\nexport interface DropdownMenuSubTriggerProps\n extends Omit<MenuPrimitive.SubmenuTrigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger className={cx(styles.subTrigger, className)} {...props}>\n {children}\n <ChevronRightIcon className={cx(styles.svgIcon, styles.subTriggerIcon)} />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nexport type DropdownMenuSubContentProps = DropdownMenuContentProps;\n\nexport function DropdownMenuSubContent({\n className,\n side = 'right',\n align = 'start',\n sideOffset = 0,\n alignOffset = -3,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuContent\n className={cx(styles.subPopup, className)}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n {...props}\n />\n );\n}\n"],"names":["MenuContainerContext","createContext","DropdownMenu","MenuPrimitive","DropdownMenuTrigger","className","props","DropdownMenuContent","children","container","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","inheritedContainer","useContext","effectiveContainer","jsx","styles","cx","DropdownMenuGroup","DropdownMenuLabel","itemVariants","cva","DropdownMenuItem","variant","DropdownMenuCheckboxItem","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAkBMA,IAAuBC,EAAuD,MAAS,GAEhFC,IAAeC,EAAc;AAUnC,SAASC,EAAoB,EAAE,WAAAC,GAAW,GAAGC,KAAmC;AACrF,2BAAQH,EAAc,SAAd,EAAsB,WAAAE,GAAuB,GAAGC,GAAO;AACjE;AA6BO,SAASC,EAAoB;AAAA,EAClC,WAAAF;AAAA,EACA,UAAAG;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,YAAAC,IAAa;AAAA,EACb,OAAAC,IAAQ;AAAA,EACR,aAAAC,IAAc;AAAA,EACd,gBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,GAAGV;AACL,GAA6B;AAC3B,QAAMW,IAAqBC,EAAWlB,CAAoB,GACpDmB,IAAqBV,KAAaQ;AACxC,SACE,gBAAAG,EAACpB,EAAqB,UAArB,EAA8B,OAAOmB,GACpC,UAAA,gBAAAC,EAACjB,EAAc,QAAd,EAAqB,WAAWgB,GAC/B,UAAA,gBAAAC;AAAA,IAACjB,EAAc;AAAA,IAAd;AAAA,MACC,MAAAO;AAAA,MACA,YAAAC;AAAA,MACA,OAAAC;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,WAAWK,EAAO;AAAA,MAElB,UAAA,gBAAAD,EAACjB,EAAc,OAAd,EAAoB,WAAWmB,EAAGD,EAAO,OAAOhB,CAAS,GAAI,GAAGC,GAC9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