@kamod-ui/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/dist/Accordion-D1PiNspd.d.ts +39 -0
- package/dist/AlertDialog-CpnCfDdN.d.ts +64 -0
- package/dist/Button-tRKMr8-H.d.ts +84 -0
- package/dist/CalendarDateTimePanel-B3J8OlSc.d.ts +79 -0
- package/dist/Carousel-DvlcMPpB.d.ts +41 -0
- package/dist/Chart-Ax22S5_N.d.ts +10 -0
- package/dist/Checkbox-DBbLYq6Q.d.ts +12 -0
- package/dist/Collapsible-DSZCp0tm.d.ts +34 -0
- package/dist/ComboboxInlineInput-CB7CEXzy.d.ts +135 -0
- package/dist/CommandSeparator-pJQnB9Lu.d.ts +47 -0
- package/dist/DataTable-zNTTdYVU.d.ts +13 -0
- package/dist/DatePicker-AFAYh5Ca.d.ts +20 -0
- package/dist/Dialog-CqCI4s9U.d.ts +28 -0
- package/dist/DialogContent-9VJGDt5l.d.ts +24 -0
- package/dist/DialogHeader-CYT7iUDq.d.ts +13 -0
- package/dist/DialogTitle-CvcRlZ_Z.d.ts +13 -0
- package/dist/Direction-25ZOt0gW.d.ts +24 -0
- package/dist/Drawer-BOPihYBJ.d.ts +41 -0
- package/dist/Dropdown-uPFaMqkB.d.ts +143 -0
- package/dist/EmptyTitle-J8rVLcJ3.d.ts +59 -0
- package/dist/FieldTitle-aSgThW-B.d.ts +100 -0
- package/dist/HoverCard-OSnOE6pE.d.ts +52 -0
- package/dist/Input-Cem05el9.d.ts +27 -0
- package/dist/Menubar-DwYDW4w2.d.ts +88 -0
- package/dist/PopoverTrigger-B6kK73gh.d.ts +43 -0
- package/dist/Progress-BGij8Hob.d.ts +13 -0
- package/dist/RadioGroup-BaElzLwa.d.ts +40 -0
- package/dist/ScrollArea-B-vILe3g.d.ts +16 -0
- package/dist/Select-B_mNVh70.d.ts +51 -0
- package/dist/Separator-DCQYrnpB.d.ts +9 -0
- package/dist/Sheet-B41Emmis.d.ts +29 -0
- package/dist/SidebarProvider-IAihmyD7.d.ts +46 -0
- package/dist/Slider-BQLMBpYs.d.ts +16 -0
- package/dist/Switch-CTTkNdqF.d.ts +31 -0
- package/dist/Tabs-DFJR_P2D.d.ts +47 -0
- package/dist/Textarea-DbKkduOG.d.ts +27 -0
- package/dist/ThemeToggle-DfiEM1dZ.d.ts +9 -0
- package/dist/Toggle-CseZl7XN.d.ts +49 -0
- package/dist/ToggleGroup-UeYHzQe7.d.ts +137 -0
- package/dist/Tooltip-BtRWVyCA.d.ts +40 -0
- package/dist/Typography-ccTtE182.d.ts +64 -0
- package/dist/chunk-2UHCXHAX.js +119 -0
- package/dist/chunk-2UHCXHAX.js.map +1 -0
- package/dist/chunk-2XNWLXG2.js +12 -0
- package/dist/chunk-2XNWLXG2.js.map +1 -0
- package/dist/chunk-3EHH62ZA.js +175 -0
- package/dist/chunk-3EHH62ZA.js.map +1 -0
- package/dist/chunk-3GKUUTSA.js +586 -0
- package/dist/chunk-3GKUUTSA.js.map +1 -0
- package/dist/chunk-3IT2RVO6.js +151 -0
- package/dist/chunk-3IT2RVO6.js.map +1 -0
- package/dist/chunk-3WAPI4KR.js +36 -0
- package/dist/chunk-3WAPI4KR.js.map +1 -0
- package/dist/chunk-44YLIQIS.js +15 -0
- package/dist/chunk-44YLIQIS.js.map +1 -0
- package/dist/chunk-4AJM7IA4.js +9 -0
- package/dist/chunk-4AJM7IA4.js.map +1 -0
- package/dist/chunk-4HX6SEWP.js +24 -0
- package/dist/chunk-4HX6SEWP.js.map +1 -0
- package/dist/chunk-6FTWMOHU.js +478 -0
- package/dist/chunk-6FTWMOHU.js.map +1 -0
- package/dist/chunk-6ZXYDBPR.js +304 -0
- package/dist/chunk-6ZXYDBPR.js.map +1 -0
- package/dist/chunk-7E2ZPDVI.js +224 -0
- package/dist/chunk-7E2ZPDVI.js.map +1 -0
- package/dist/chunk-7HZUM5ZQ.js +85 -0
- package/dist/chunk-7HZUM5ZQ.js.map +1 -0
- package/dist/chunk-7MECYLKS.js +375 -0
- package/dist/chunk-7MECYLKS.js.map +1 -0
- package/dist/chunk-7TDS7TC6.js +49 -0
- package/dist/chunk-7TDS7TC6.js.map +1 -0
- package/dist/chunk-7ZXJRNJO.js +26 -0
- package/dist/chunk-7ZXJRNJO.js.map +1 -0
- package/dist/chunk-AVCG4W6D.js +122 -0
- package/dist/chunk-AVCG4W6D.js.map +1 -0
- package/dist/chunk-BF3F5SJX.js +89 -0
- package/dist/chunk-BF3F5SJX.js.map +1 -0
- package/dist/chunk-BHMKSFES.js +195 -0
- package/dist/chunk-BHMKSFES.js.map +1 -0
- package/dist/chunk-BMF5SGYP.js +45 -0
- package/dist/chunk-BMF5SGYP.js.map +1 -0
- package/dist/chunk-D25ZQ36E.js +273 -0
- package/dist/chunk-D25ZQ36E.js.map +1 -0
- package/dist/chunk-D5W5YHJZ.js +426 -0
- package/dist/chunk-D5W5YHJZ.js.map +1 -0
- package/dist/chunk-DHBILREV.js +70 -0
- package/dist/chunk-DHBILREV.js.map +1 -0
- package/dist/chunk-DJ4PFETN.js +17 -0
- package/dist/chunk-DJ4PFETN.js.map +1 -0
- package/dist/chunk-DKXUKLZT.js +342 -0
- package/dist/chunk-DKXUKLZT.js.map +1 -0
- package/dist/chunk-EL2HT25C.js +9 -0
- package/dist/chunk-EL2HT25C.js.map +1 -0
- package/dist/chunk-FDNPBI2Z.js +26 -0
- package/dist/chunk-FDNPBI2Z.js.map +1 -0
- package/dist/chunk-FWCN47RC.js +65 -0
- package/dist/chunk-FWCN47RC.js.map +1 -0
- package/dist/chunk-G6PBJZYF.js +114 -0
- package/dist/chunk-G6PBJZYF.js.map +1 -0
- package/dist/chunk-GFF5OT46.js +80 -0
- package/dist/chunk-GFF5OT46.js.map +1 -0
- package/dist/chunk-GLWYIUE5.js +242 -0
- package/dist/chunk-GLWYIUE5.js.map +1 -0
- package/dist/chunk-HEQRODRF.js +110 -0
- package/dist/chunk-HEQRODRF.js.map +1 -0
- package/dist/chunk-HGTFOOUL.js +61 -0
- package/dist/chunk-HGTFOOUL.js.map +1 -0
- package/dist/chunk-HNESOMVN.js +18 -0
- package/dist/chunk-HNESOMVN.js.map +1 -0
- package/dist/chunk-I2PR3HXC.js +51 -0
- package/dist/chunk-I2PR3HXC.js.map +1 -0
- package/dist/chunk-IGGEBO7K.js +8 -0
- package/dist/chunk-IGGEBO7K.js.map +1 -0
- package/dist/chunk-J2Z2LSXM.js +26 -0
- package/dist/chunk-J2Z2LSXM.js.map +1 -0
- package/dist/chunk-JC7JMWSH.js +109 -0
- package/dist/chunk-JC7JMWSH.js.map +1 -0
- package/dist/chunk-JZRMLE4X.js +77 -0
- package/dist/chunk-JZRMLE4X.js.map +1 -0
- package/dist/chunk-KBXDU3G4.js +382 -0
- package/dist/chunk-KBXDU3G4.js.map +1 -0
- package/dist/chunk-KF34SFFZ.js +18 -0
- package/dist/chunk-KF34SFFZ.js.map +1 -0
- package/dist/chunk-L42B6QZS.js +524 -0
- package/dist/chunk-L42B6QZS.js.map +1 -0
- package/dist/chunk-LGO5HXMG.js +592 -0
- package/dist/chunk-LGO5HXMG.js.map +1 -0
- package/dist/chunk-LVK44RMS.js +78 -0
- package/dist/chunk-LVK44RMS.js.map +1 -0
- package/dist/chunk-N2LRB6TA.js +8 -0
- package/dist/chunk-N2LRB6TA.js.map +1 -0
- package/dist/chunk-NHTY2HD2.js +8 -0
- package/dist/chunk-NHTY2HD2.js.map +1 -0
- package/dist/chunk-NJUXP5FM.js +392 -0
- package/dist/chunk-NJUXP5FM.js.map +1 -0
- package/dist/chunk-NPHECLV5.js +94 -0
- package/dist/chunk-NPHECLV5.js.map +1 -0
- package/dist/chunk-NXVAR6P2.js +79 -0
- package/dist/chunk-NXVAR6P2.js.map +1 -0
- package/dist/chunk-OMXWBB67.js +9 -0
- package/dist/chunk-OMXWBB67.js.map +1 -0
- package/dist/chunk-PE5QQIV5.js +69 -0
- package/dist/chunk-PE5QQIV5.js.map +1 -0
- package/dist/chunk-QAUGWXGJ.js +158 -0
- package/dist/chunk-QAUGWXGJ.js.map +1 -0
- package/dist/chunk-QCYFSBZ7.js +81 -0
- package/dist/chunk-QCYFSBZ7.js.map +1 -0
- package/dist/chunk-QJT5UAL2.js +714 -0
- package/dist/chunk-QJT5UAL2.js.map +1 -0
- package/dist/chunk-QRLVOM3E.js +83 -0
- package/dist/chunk-QRLVOM3E.js.map +1 -0
- package/dist/chunk-RBVGV7VO.js +26 -0
- package/dist/chunk-RBVGV7VO.js.map +1 -0
- package/dist/chunk-RD6VXGVY.js +340 -0
- package/dist/chunk-RD6VXGVY.js.map +1 -0
- package/dist/chunk-RSPI2A4W.js +106 -0
- package/dist/chunk-RSPI2A4W.js.map +1 -0
- package/dist/chunk-RT26RZ7W.js +79 -0
- package/dist/chunk-RT26RZ7W.js.map +1 -0
- package/dist/chunk-RXAIDZ33.js +522 -0
- package/dist/chunk-RXAIDZ33.js.map +1 -0
- package/dist/chunk-S6TO62GJ.js +53 -0
- package/dist/chunk-S6TO62GJ.js.map +1 -0
- package/dist/chunk-SJ5MYJ7L.js +283 -0
- package/dist/chunk-SJ5MYJ7L.js.map +1 -0
- package/dist/chunk-SZ2I2SRP.js +156 -0
- package/dist/chunk-SZ2I2SRP.js.map +1 -0
- package/dist/chunk-UGOQKTHL.js +23 -0
- package/dist/chunk-UGOQKTHL.js.map +1 -0
- package/dist/chunk-UGQ756Z6.js +92 -0
- package/dist/chunk-UGQ756Z6.js.map +1 -0
- package/dist/chunk-UNPCAFLS.js +22 -0
- package/dist/chunk-UNPCAFLS.js.map +1 -0
- package/dist/chunk-V27UIXBD.js +36 -0
- package/dist/chunk-V27UIXBD.js.map +1 -0
- package/dist/chunk-VB5LDR7C.js +97 -0
- package/dist/chunk-VB5LDR7C.js.map +1 -0
- package/dist/chunk-VJ26PA3U.js +9 -0
- package/dist/chunk-VJ26PA3U.js.map +1 -0
- package/dist/chunk-VKB4VUN7.js +164 -0
- package/dist/chunk-VKB4VUN7.js.map +1 -0
- package/dist/chunk-Y37OHTAO.js +208 -0
- package/dist/chunk-Y37OHTAO.js.map +1 -0
- package/dist/chunk-Y4OW24IS.js +18 -0
- package/dist/chunk-Y4OW24IS.js.map +1 -0
- package/dist/chunk-YDMMDO2W.js +141 -0
- package/dist/chunk-YDMMDO2W.js.map +1 -0
- package/dist/chunk-YENXORWK.js +9 -0
- package/dist/chunk-YENXORWK.js.map +1 -0
- package/dist/chunk-YLTIB224.js +76 -0
- package/dist/chunk-YLTIB224.js.map +1 -0
- package/dist/chunk-YVA6PAML.js +63 -0
- package/dist/chunk-YVA6PAML.js.map +1 -0
- package/dist/chunk-YWUMX4JR.js +9 -0
- package/dist/chunk-YWUMX4JR.js.map +1 -0
- package/dist/chunk-ZDXR2SWG.js +32 -0
- package/dist/chunk-ZDXR2SWG.js.map +1 -0
- package/dist/chunk-ZIFL6GXH.js +187 -0
- package/dist/chunk-ZIFL6GXH.js.map +1 -0
- package/dist/chunk-ZM4VJOGF.js +40 -0
- package/dist/chunk-ZM4VJOGF.js.map +1 -0
- package/dist/chunk-ZVKIJLNO.js +9 -0
- package/dist/chunk-ZVKIJLNO.js.map +1 -0
- package/dist/components/accordion/index.d.ts +12 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/alert/index.d.ts +64 -0
- package/dist/components/alert/index.js +4 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/alert-dialog/index.d.ts +22 -0
- package/dist/components/alert-dialog/index.js +9 -0
- package/dist/components/alert-dialog/index.js.map +1 -0
- package/dist/components/aspect-ratio/index.d.ts +11 -0
- package/dist/components/aspect-ratio/index.js +4 -0
- package/dist/components/aspect-ratio/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +53 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +175 -0
- package/dist/components/badge/index.js +4 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +38 -0
- package/dist/components/breadcrumb/index.js +4 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/index.d.ts +72 -0
- package/dist/components/button/index.js +5 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/index.d.ts +21 -0
- package/dist/components/button-group/index.js +4 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +7 -0
- package/dist/components/calendar/index.js +12 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/card/index.d.ts +80 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/carousel/index.d.ts +14 -0
- package/dist/components/carousel/index.js +5 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/chart/index.d.ts +6 -0
- package/dist/components/chart/index.js +4 -0
- package/dist/components/chart/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +7 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/collapsible/index.d.ts +11 -0
- package/dist/components/collapsible/index.js +4 -0
- package/dist/components/collapsible/index.js.map +1 -0
- package/dist/components/combobox/index.d.ts +13 -0
- package/dist/components/combobox/index.js +7 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/command/index.d.ts +21 -0
- package/dist/components/command/index.js +10 -0
- package/dist/components/command/index.js.map +1 -0
- package/dist/components/context-menu/index.d.ts +114 -0
- package/dist/components/context-menu/index.js +5 -0
- package/dist/components/context-menu/index.js.map +1 -0
- package/dist/components/data-table/index.d.ts +6 -0
- package/dist/components/data-table/index.js +5 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +7 -0
- package/dist/components/date-picker/index.js +8 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/dialog/index.d.ts +22 -0
- package/dist/components/dialog/index.js +8 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/direction/index.d.ts +7 -0
- package/dist/components/direction/index.js +4 -0
- package/dist/components/direction/index.js.map +1 -0
- package/dist/components/drawer/index.d.ts +19 -0
- package/dist/components/drawer/index.js +8 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/dropdown/index.d.ts +24 -0
- package/dist/components/dropdown/index.js +5 -0
- package/dist/components/dropdown/index.js.map +1 -0
- package/dist/components/dropzone/index.d.ts +26 -0
- package/dist/components/dropzone/index.js +5 -0
- package/dist/components/dropzone/index.js.map +1 -0
- package/dist/components/empty/index.d.ts +8 -0
- package/dist/components/empty/index.js +4 -0
- package/dist/components/empty/index.js.map +1 -0
- package/dist/components/field/index.d.ts +8 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/hover-card/index.d.ts +12 -0
- package/dist/components/hover-card/index.js +3 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/image/index.d.ts +6 -0
- package/dist/components/image/index.js +4 -0
- package/dist/components/image/index.js.map +1 -0
- package/dist/components/input/index.d.ts +27 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input-group/index.d.ts +132 -0
- package/dist/components/input-group/index.js +7 -0
- package/dist/components/input-group/index.js.map +1 -0
- package/dist/components/input-otp/index.d.ts +39 -0
- package/dist/components/input-otp/index.js +4 -0
- package/dist/components/input-otp/index.js.map +1 -0
- package/dist/components/item/index.d.ts +108 -0
- package/dist/components/item/index.js +5 -0
- package/dist/components/item/index.js.map +1 -0
- package/dist/components/kbd/index.d.ts +31 -0
- package/dist/components/kbd/index.js +4 -0
- package/dist/components/kbd/index.js.map +1 -0
- package/dist/components/label/index.d.ts +49 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/locale-segment-group/index.d.ts +15 -0
- package/dist/components/locale-segment-group/index.js +4 -0
- package/dist/components/locale-segment-group/index.js.map +1 -0
- package/dist/components/menubar/index.d.ts +23 -0
- package/dist/components/menubar/index.js +5 -0
- package/dist/components/menubar/index.js.map +1 -0
- package/dist/components/native-select/index.d.ts +89 -0
- package/dist/components/native-select/index.js +3 -0
- package/dist/components/native-select/index.js.map +1 -0
- package/dist/components/navigation-menu/index.d.ts +15 -0
- package/dist/components/navigation-menu/index.js +5 -0
- package/dist/components/navigation-menu/index.js.map +1 -0
- package/dist/components/pagination/index.d.ts +44 -0
- package/dist/components/pagination/index.js +5 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/popover/index.d.ts +76 -0
- package/dist/components/popover/index.js +5 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/progress/index.d.ts +6 -0
- package/dist/components/progress/index.js +4 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/prose/index.d.ts +8 -0
- package/dist/components/prose/index.js +4 -0
- package/dist/components/prose/index.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +11 -0
- package/dist/components/radio-group/index.js +5 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/scroll-area/index.d.ts +11 -0
- package/dist/components/scroll-area/index.js +4 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/select/index.d.ts +17 -0
- package/dist/components/select/index.js +5 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/selectable-card/index.d.ts +11 -0
- package/dist/components/selectable-card/index.js +5 -0
- package/dist/components/selectable-card/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +24 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/sheet/index.d.ts +20 -0
- package/dist/components/sheet/index.js +8 -0
- package/dist/components/sheet/index.js.map +1 -0
- package/dist/components/sidebar/index.d.ts +16 -0
- package/dist/components/sidebar/index.js +3 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/skeleton/index.d.ts +52 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/slider/index.d.ts +7 -0
- package/dist/components/slider/index.js +4 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/sonner/index.d.ts +7 -0
- package/dist/components/sonner/index.js +3 -0
- package/dist/components/sonner/index.js.map +1 -0
- package/dist/components/spinner/index.d.ts +10 -0
- package/dist/components/spinner/index.js +4 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +7 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/table/index.d.ts +45 -0
- package/dist/components/table/index.js +5 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +13 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/textarea/index.d.ts +27 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/theme-toggle/index.d.ts +6 -0
- package/dist/components/theme-toggle/index.js +6 -0
- package/dist/components/theme-toggle/index.js.map +1 -0
- package/dist/components/toast/index.d.ts +27 -0
- package/dist/components/toast/index.js +3 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/toggle/index.d.ts +7 -0
- package/dist/components/toggle/index.js +4 -0
- package/dist/components/toggle/index.js.map +1 -0
- package/dist/components/toggle-group/index.d.ts +11 -0
- package/dist/components/toggle-group/index.js +4 -0
- package/dist/components/toggle-group/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +12 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/typography/index.d.ts +8 -0
- package/dist/components/typography/index.js +4 -0
- package/dist/components/typography/index.js.map +1 -0
- package/dist/components/video/index.d.ts +8 -0
- package/dist/components/video/index.js +4 -0
- package/dist/components/video/index.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js +83 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/interactive/index.d.ts +34 -0
- package/dist/lib/interactive/index.js +3 -0
- package/dist/lib/interactive/index.js.map +1 -0
- package/dist/lib/signals/index.d.ts +15 -0
- package/dist/lib/signals/index.js +3 -0
- package/dist/lib/signals/index.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +3 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/navigationMenuTriggerStyle-MrMOOgmr.d.ts +48 -0
- package/dist/sonner-store-Dfdxy8ba.d.ts +11 -0
- package/dist/theme.css +81 -0
- package/package.json +360 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { createIdFactory, createDismissableLayer } from './chunk-HEQRODRF.js';
|
|
2
|
+
import { cn } from './chunk-OMXWBB67.js';
|
|
3
|
+
import { signal } from '@preact/signals';
|
|
4
|
+
import { createContext, isValidElement, cloneElement } from 'preact';
|
|
5
|
+
import { useMemo, useRef, useEffect, useContext } from 'preact/hooks';
|
|
6
|
+
import { tv } from 'tailwind-variants';
|
|
7
|
+
import { jsx, jsxs } from 'preact/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var DropdownContext = createContext(null);
|
|
10
|
+
var nextDropdownId = createIdFactory("kamod-dropdown");
|
|
11
|
+
var useDropdown = () => {
|
|
12
|
+
const context = useContext(DropdownContext);
|
|
13
|
+
if (!context) throw new Error("Dropdown subcomponents must be used within Dropdown");
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
var dropdownRoot = tv({
|
|
17
|
+
base: "relative inline-flex"
|
|
18
|
+
});
|
|
19
|
+
var Dropdown = ({ defaultOpen = false, class: className, children, ...rest }) => {
|
|
20
|
+
const open = useMemo(() => signal(defaultOpen), []);
|
|
21
|
+
const rootRef = useRef(null);
|
|
22
|
+
const triggerRef = useRef(null);
|
|
23
|
+
const contentRef = useRef(null);
|
|
24
|
+
const instanceId = useMemo(() => nextDropdownId(), []);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const layer = createDismissableLayer({
|
|
27
|
+
root: () => rootRef.current,
|
|
28
|
+
open: () => open.value,
|
|
29
|
+
onDismiss: () => {
|
|
30
|
+
open.value = false;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return () => layer.dispose();
|
|
34
|
+
}, []);
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
DropdownContext.Provider,
|
|
37
|
+
{
|
|
38
|
+
value: {
|
|
39
|
+
open,
|
|
40
|
+
setOpen: (next) => {
|
|
41
|
+
open.value = next;
|
|
42
|
+
},
|
|
43
|
+
triggerId: `${instanceId}-trigger`,
|
|
44
|
+
contentId: `${instanceId}-content`,
|
|
45
|
+
rootRef,
|
|
46
|
+
triggerRef,
|
|
47
|
+
contentRef
|
|
48
|
+
},
|
|
49
|
+
children: /* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
ref: rootRef,
|
|
53
|
+
class: dropdownRoot({ class: className }),
|
|
54
|
+
"data-slot": "dropdown",
|
|
55
|
+
"data-state": open.value ? "open" : "closed",
|
|
56
|
+
...rest,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
var DropdownCheckboxItem = ({
|
|
64
|
+
checked: checkedProp,
|
|
65
|
+
defaultChecked = false,
|
|
66
|
+
onCheckedChange,
|
|
67
|
+
class: className,
|
|
68
|
+
children,
|
|
69
|
+
onClick,
|
|
70
|
+
...rest
|
|
71
|
+
}) => {
|
|
72
|
+
const internal = useMemo(() => signal(defaultChecked), []);
|
|
73
|
+
const isControlled = checkedProp !== void 0;
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (checkedProp !== void 0) {
|
|
76
|
+
internal.value = checkedProp;
|
|
77
|
+
}
|
|
78
|
+
}, [checkedProp, internal]);
|
|
79
|
+
const checked = isControlled ? Boolean(checkedProp) : internal.value;
|
|
80
|
+
return /* @__PURE__ */ jsxs(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
type: "button",
|
|
84
|
+
role: "menuitemcheckbox",
|
|
85
|
+
"data-slot": "dropdown-checkbox-item",
|
|
86
|
+
"aria-checked": checked,
|
|
87
|
+
class: cn(
|
|
88
|
+
"relative flex w-full cursor-default select-none items-center gap-1 rounded-sm py-0.5 ps-7 pe-1.5 text-sm outline-none transition-colors duration-100",
|
|
89
|
+
"hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
90
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
onClick: (event) => {
|
|
94
|
+
onClick?.(event);
|
|
95
|
+
if (event.defaultPrevented) return;
|
|
96
|
+
const next = !checked;
|
|
97
|
+
if (!isControlled) {
|
|
98
|
+
internal.value = next;
|
|
99
|
+
}
|
|
100
|
+
onCheckedChange?.(next);
|
|
101
|
+
},
|
|
102
|
+
...rest,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("span", { class: "pointer-events-none absolute start-1.5 flex size-3 items-center justify-center", "aria-hidden": true, children: checked ? /* @__PURE__ */ jsx(
|
|
105
|
+
"svg",
|
|
106
|
+
{
|
|
107
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
108
|
+
width: "24",
|
|
109
|
+
height: "24",
|
|
110
|
+
viewBox: "0 0 24 24",
|
|
111
|
+
fill: "none",
|
|
112
|
+
stroke: "currentColor",
|
|
113
|
+
"stroke-width": "2",
|
|
114
|
+
"stroke-linecap": "round",
|
|
115
|
+
"stroke-linejoin": "round",
|
|
116
|
+
class: "size-3.5",
|
|
117
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
118
|
+
}
|
|
119
|
+
) : null }),
|
|
120
|
+
children
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
var positionBySide = {
|
|
126
|
+
top: "bottom-full",
|
|
127
|
+
bottom: "top-full",
|
|
128
|
+
left: "right-full",
|
|
129
|
+
right: "left-full"
|
|
130
|
+
};
|
|
131
|
+
var alignByAxis = {
|
|
132
|
+
vertical: {
|
|
133
|
+
start: "left-0",
|
|
134
|
+
center: "left-1/2 -translate-x-1/2",
|
|
135
|
+
end: "right-0"
|
|
136
|
+
},
|
|
137
|
+
horizontal: {
|
|
138
|
+
start: "top-0",
|
|
139
|
+
center: "top-1/2 -translate-y-1/2",
|
|
140
|
+
end: "bottom-0"
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
var dropdownContent = tv({
|
|
144
|
+
base: [
|
|
145
|
+
// overflow-x visible so DropdownSubContent (absolute start-full) is not clipped; keep vertical scroll for long menus
|
|
146
|
+
"bg-white text-popover-foreground z-50 flex min-w-[7rem] flex-col gap-0 overflow-x-visible overflow-y-auto rounded-lg p-px shadow-md outline-none ring-1 ring-foreground/10 dark:bg-popover",
|
|
147
|
+
"dark:ring-foreground/15",
|
|
148
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-100",
|
|
149
|
+
"data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-100",
|
|
150
|
+
"absolute isolate max-h-96"
|
|
151
|
+
],
|
|
152
|
+
variants: {
|
|
153
|
+
side: {
|
|
154
|
+
bottom: "slide-in-from-top-2",
|
|
155
|
+
top: "slide-in-from-bottom-2",
|
|
156
|
+
right: "slide-in-from-left-2",
|
|
157
|
+
left: "slide-in-from-right-2"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
defaultVariants: {
|
|
161
|
+
side: "bottom"
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
var DropdownContent = ({
|
|
165
|
+
forceMount = false,
|
|
166
|
+
side = "bottom",
|
|
167
|
+
align = "start",
|
|
168
|
+
sideOffset = 4,
|
|
169
|
+
class: className,
|
|
170
|
+
style,
|
|
171
|
+
children,
|
|
172
|
+
onKeyDown,
|
|
173
|
+
...rest
|
|
174
|
+
}) => {
|
|
175
|
+
const dropdown = useDropdown();
|
|
176
|
+
if (!dropdown.open.value && !forceMount) return null;
|
|
177
|
+
const isVertical = side === "top" || side === "bottom";
|
|
178
|
+
const alignClass = isVertical ? alignByAxis.vertical[align] : alignByAxis.horizontal[align];
|
|
179
|
+
const inlineStyle = typeof style === "object" && style !== null ? style : void 0;
|
|
180
|
+
const offsetStyle = side === "bottom" ? { marginTop: `${sideOffset}px` } : side === "top" ? { marginBottom: `${sideOffset}px` } : side === "right" ? { marginLeft: `${sideOffset}px` } : { marginRight: `${sideOffset}px` };
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: (node) => {
|
|
185
|
+
dropdown.contentRef.current = node;
|
|
186
|
+
},
|
|
187
|
+
id: dropdown.contentId,
|
|
188
|
+
role: "menu",
|
|
189
|
+
tabIndex: -1,
|
|
190
|
+
"aria-labelledby": dropdown.triggerId,
|
|
191
|
+
"data-slot": "dropdown-content",
|
|
192
|
+
"data-side": side,
|
|
193
|
+
"data-align": align,
|
|
194
|
+
"data-state": dropdown.open.value ? "open" : "closed",
|
|
195
|
+
class: `${positionBySide[side]} ${alignClass} ${dropdownContent({ side, class: className })}`,
|
|
196
|
+
style: inlineStyle ? { ...offsetStyle, ...inlineStyle } : offsetStyle,
|
|
197
|
+
onKeyDown: (event) => {
|
|
198
|
+
if (event.key === "Escape") {
|
|
199
|
+
event.preventDefault();
|
|
200
|
+
dropdown.setOpen(false);
|
|
201
|
+
dropdown.triggerRef.current?.focus();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
onKeyDown?.(event);
|
|
205
|
+
},
|
|
206
|
+
...rest,
|
|
207
|
+
children
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
var DropdownGroup = ({ class: className, children, ...rest }) => /* @__PURE__ */ jsx("div", { role: "group", "data-slot": "dropdown-group", class: cn("p-1", className), ...rest, children });
|
|
212
|
+
var dropdownItem = tv({
|
|
213
|
+
base: [
|
|
214
|
+
"relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-1 py-0.5 text-sm outline-none transition-colors duration-100 ease-out",
|
|
215
|
+
"text-popover-foreground hover:bg-accent hover:text-accent-foreground",
|
|
216
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
217
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
218
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5"
|
|
219
|
+
],
|
|
220
|
+
variants: {
|
|
221
|
+
variant: {
|
|
222
|
+
default: "",
|
|
223
|
+
destructive: "text-destructive hover:bg-destructive/10 hover:text-destructive focus:bg-destructive/10 focus:text-destructive dark:focus:bg-destructive/20 [&_svg]:text-destructive"
|
|
224
|
+
},
|
|
225
|
+
inset: {
|
|
226
|
+
true: "ps-6"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
defaultVariants: {
|
|
230
|
+
variant: "default",
|
|
231
|
+
inset: false
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
var DropdownItem = ({
|
|
235
|
+
inset = false,
|
|
236
|
+
variant = "default",
|
|
237
|
+
class: className,
|
|
238
|
+
children,
|
|
239
|
+
onClick,
|
|
240
|
+
...rest
|
|
241
|
+
}) => {
|
|
242
|
+
const dropdown = useDropdown();
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
role: "menuitem",
|
|
248
|
+
"data-slot": "dropdown-item",
|
|
249
|
+
"data-inset": inset ? "true" : void 0,
|
|
250
|
+
"data-variant": variant,
|
|
251
|
+
class: dropdownItem({ inset, variant, class: className }),
|
|
252
|
+
onClick: (event) => {
|
|
253
|
+
onClick?.(event);
|
|
254
|
+
if (event.defaultPrevented) return;
|
|
255
|
+
dropdown.setOpen(false);
|
|
256
|
+
},
|
|
257
|
+
...rest,
|
|
258
|
+
children
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
var DropdownLabel = ({ inset = false, class: className, children, ...rest }) => /* @__PURE__ */ jsx(
|
|
263
|
+
"div",
|
|
264
|
+
{
|
|
265
|
+
"data-slot": "dropdown-label",
|
|
266
|
+
"data-inset": inset ? "true" : void 0,
|
|
267
|
+
class: cn("text-muted-foreground px-1 py-0.5 text-xs font-semibold", inset && "ps-6", className),
|
|
268
|
+
...rest,
|
|
269
|
+
children
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
var DropdownPortal = ({ children, ...rest }) => /* @__PURE__ */ jsx("div", { "data-slot": "dropdown-portal", ...rest, children });
|
|
273
|
+
var DropdownRadioContext = createContext(null);
|
|
274
|
+
var DropdownRadioProvider = DropdownRadioContext.Provider;
|
|
275
|
+
var useDropdownRadio = () => {
|
|
276
|
+
const ctx = useContext(DropdownRadioContext);
|
|
277
|
+
if (!ctx) throw new Error("DropdownRadioItem must be used within DropdownRadioGroup");
|
|
278
|
+
return ctx;
|
|
279
|
+
};
|
|
280
|
+
var useDropdownRadioRoot = (defaultValue, valueProp, onValueChange) => {
|
|
281
|
+
const internal = useMemo(() => signal(valueProp ?? defaultValue), []);
|
|
282
|
+
const controlledRef = useRef(false);
|
|
283
|
+
controlledRef.current = valueProp !== void 0;
|
|
284
|
+
useEffect(() => {
|
|
285
|
+
if (valueProp !== void 0) {
|
|
286
|
+
internal.value = valueProp;
|
|
287
|
+
}
|
|
288
|
+
}, [valueProp, internal]);
|
|
289
|
+
const onValueChangeRef = useRef(onValueChange);
|
|
290
|
+
onValueChangeRef.current = onValueChange;
|
|
291
|
+
return useMemo(
|
|
292
|
+
() => ({
|
|
293
|
+
value: internal,
|
|
294
|
+
setValue: (next) => {
|
|
295
|
+
if (!controlledRef.current) {
|
|
296
|
+
internal.value = next;
|
|
297
|
+
}
|
|
298
|
+
onValueChangeRef.current?.(next);
|
|
299
|
+
}
|
|
300
|
+
}),
|
|
301
|
+
[internal]
|
|
302
|
+
);
|
|
303
|
+
};
|
|
304
|
+
var DropdownRadioGroup = ({
|
|
305
|
+
value,
|
|
306
|
+
defaultValue = "",
|
|
307
|
+
onValueChange,
|
|
308
|
+
children,
|
|
309
|
+
...rest
|
|
310
|
+
}) => {
|
|
311
|
+
const ctx = useDropdownRadioRoot(defaultValue, value, onValueChange);
|
|
312
|
+
return /* @__PURE__ */ jsx(DropdownRadioProvider, { value: ctx, children: /* @__PURE__ */ jsx("div", { role: "group", "data-slot": "dropdown-radio-group", ...rest, children }) });
|
|
313
|
+
};
|
|
314
|
+
var DropdownRadioItem = ({
|
|
315
|
+
value,
|
|
316
|
+
class: className,
|
|
317
|
+
children,
|
|
318
|
+
onClick,
|
|
319
|
+
...rest
|
|
320
|
+
}) => {
|
|
321
|
+
const dropdown = useDropdown();
|
|
322
|
+
const radio = useDropdownRadio();
|
|
323
|
+
const selected = radio.value.value === value;
|
|
324
|
+
return /* @__PURE__ */ jsxs(
|
|
325
|
+
"button",
|
|
326
|
+
{
|
|
327
|
+
type: "button",
|
|
328
|
+
role: "menuitemradio",
|
|
329
|
+
"data-slot": "dropdown-radio-item",
|
|
330
|
+
"aria-checked": selected,
|
|
331
|
+
class: cn(
|
|
332
|
+
"relative flex w-full cursor-default select-none items-center gap-1 rounded-sm py-0.5 ps-7 pe-1.5 text-sm outline-none transition-colors duration-100",
|
|
333
|
+
"hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
334
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
335
|
+
className
|
|
336
|
+
),
|
|
337
|
+
onClick: (event) => {
|
|
338
|
+
onClick?.(event);
|
|
339
|
+
if (event.defaultPrevented) return;
|
|
340
|
+
radio.setValue(value);
|
|
341
|
+
dropdown.setOpen(false);
|
|
342
|
+
},
|
|
343
|
+
...rest,
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ jsx("span", { class: "pointer-events-none absolute start-1.5 flex size-3 items-center justify-center", "aria-hidden": true, children: selected ? /* @__PURE__ */ jsx("span", { class: "size-1.5 rounded-full bg-current" }) : null }),
|
|
346
|
+
children
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
};
|
|
351
|
+
var DropdownSeparator = ({ class: className, ...rest }) => /* @__PURE__ */ jsx(
|
|
352
|
+
"div",
|
|
353
|
+
{
|
|
354
|
+
role: "separator",
|
|
355
|
+
"data-slot": "dropdown-separator",
|
|
356
|
+
class: cn("bg-border -mx-px my-px h-px", className),
|
|
357
|
+
...rest
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
var DropdownShortcut = ({ class: className, children, ...rest }) => /* @__PURE__ */ jsx(
|
|
361
|
+
"span",
|
|
362
|
+
{
|
|
363
|
+
"data-slot": "dropdown-shortcut",
|
|
364
|
+
class: cn("text-muted-foreground ms-auto text-xs tracking-widest opacity-70", className),
|
|
365
|
+
...rest,
|
|
366
|
+
children
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
var DropdownSubContext = createContext(null);
|
|
370
|
+
var DropdownSubProvider = ({
|
|
371
|
+
children,
|
|
372
|
+
value
|
|
373
|
+
}) => /* @__PURE__ */ jsx(DropdownSubContext.Provider, { value, children });
|
|
374
|
+
var useDropdownSub = () => {
|
|
375
|
+
const ctx = useContext(DropdownSubContext);
|
|
376
|
+
if (!ctx) throw new Error("Dropdown subcomponents must be used within DropdownSub");
|
|
377
|
+
return ctx;
|
|
378
|
+
};
|
|
379
|
+
var useMemoDropdownSub = () => useMemo(() => {
|
|
380
|
+
const open = signal(false);
|
|
381
|
+
return {
|
|
382
|
+
open,
|
|
383
|
+
setOpen: (next) => {
|
|
384
|
+
open.value = next;
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
}, []);
|
|
388
|
+
var DropdownSub = ({ class: className, children, ...rest }) => {
|
|
389
|
+
const ctx = useMemoDropdownSub();
|
|
390
|
+
return /* @__PURE__ */ jsx(DropdownSubProvider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
391
|
+
"div",
|
|
392
|
+
{
|
|
393
|
+
"data-slot": "dropdown-sub",
|
|
394
|
+
class: cn("relative", className),
|
|
395
|
+
onPointerLeave: () => {
|
|
396
|
+
ctx.setOpen(false);
|
|
397
|
+
},
|
|
398
|
+
...rest,
|
|
399
|
+
children
|
|
400
|
+
}
|
|
401
|
+
) });
|
|
402
|
+
};
|
|
403
|
+
var DropdownSubContent = ({
|
|
404
|
+
class: className,
|
|
405
|
+
children,
|
|
406
|
+
onPointerEnter,
|
|
407
|
+
side = "inline-end",
|
|
408
|
+
...rest
|
|
409
|
+
}) => {
|
|
410
|
+
const sub = useDropdownSub();
|
|
411
|
+
if (!sub.open.value) return null;
|
|
412
|
+
const sidePosition = side === "inline-start" ? "end-full me-0.5 rtl:ms-0.5 rtl:me-0" : "start-full ms-0.5 rtl:me-0.5 rtl:ms-0";
|
|
413
|
+
return /* @__PURE__ */ jsx(
|
|
414
|
+
"div",
|
|
415
|
+
{
|
|
416
|
+
role: "menu",
|
|
417
|
+
"data-slot": "dropdown-sub-content",
|
|
418
|
+
"data-side": side,
|
|
419
|
+
"data-state": "open",
|
|
420
|
+
class: cn(
|
|
421
|
+
"absolute top-0 z-50 min-w-[7rem] max-h-[min(24rem,calc(100dvh-2rem))] overflow-x-hidden overflow-y-auto rounded-lg bg-white p-px text-popover-foreground shadow-md outline-none ring-1 ring-foreground/10 dark:bg-popover dark:ring-foreground/15",
|
|
422
|
+
sidePosition,
|
|
423
|
+
className
|
|
424
|
+
),
|
|
425
|
+
onPointerEnter: (e) => {
|
|
426
|
+
onPointerEnter?.(e);
|
|
427
|
+
sub.setOpen(true);
|
|
428
|
+
},
|
|
429
|
+
...rest,
|
|
430
|
+
children
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
};
|
|
434
|
+
var ChevronRight = ({ class: className }) => /* @__PURE__ */ jsx(
|
|
435
|
+
"svg",
|
|
436
|
+
{
|
|
437
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
438
|
+
width: "16",
|
|
439
|
+
height: "16",
|
|
440
|
+
viewBox: "0 0 24 24",
|
|
441
|
+
fill: "none",
|
|
442
|
+
stroke: "currentColor",
|
|
443
|
+
"stroke-width": "2",
|
|
444
|
+
"stroke-linecap": "round",
|
|
445
|
+
"stroke-linejoin": "round",
|
|
446
|
+
class: cn("size-3.5 shrink-0 rtl:rotate-180", className),
|
|
447
|
+
"aria-hidden": true,
|
|
448
|
+
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
var DropdownSubTrigger = ({
|
|
452
|
+
class: className,
|
|
453
|
+
children,
|
|
454
|
+
onClick,
|
|
455
|
+
onPointerEnter,
|
|
456
|
+
...rest
|
|
457
|
+
}) => {
|
|
458
|
+
const sub = useDropdownSub();
|
|
459
|
+
const open = sub.open.value;
|
|
460
|
+
return /* @__PURE__ */ jsxs(
|
|
461
|
+
"button",
|
|
462
|
+
{
|
|
463
|
+
type: "button",
|
|
464
|
+
role: "menuitem",
|
|
465
|
+
"data-slot": "dropdown-sub-trigger",
|
|
466
|
+
"data-state": open ? "open" : "closed",
|
|
467
|
+
"aria-expanded": open,
|
|
468
|
+
"aria-haspopup": "menu",
|
|
469
|
+
class: cn(
|
|
470
|
+
"flex w-full cursor-default select-none items-center gap-1 rounded-sm px-1 py-0.5 text-start text-sm outline-none transition-colors duration-100",
|
|
471
|
+
"hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
472
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
473
|
+
"[&_svg]:shrink-0",
|
|
474
|
+
className
|
|
475
|
+
),
|
|
476
|
+
onPointerEnter: (e) => {
|
|
477
|
+
onPointerEnter?.(e);
|
|
478
|
+
if (e.defaultPrevented) return;
|
|
479
|
+
sub.setOpen(true);
|
|
480
|
+
},
|
|
481
|
+
onClick: (e) => {
|
|
482
|
+
onClick?.(e);
|
|
483
|
+
if (e.defaultPrevented) return;
|
|
484
|
+
sub.setOpen(!open);
|
|
485
|
+
},
|
|
486
|
+
...rest,
|
|
487
|
+
children: [
|
|
488
|
+
children,
|
|
489
|
+
/* @__PURE__ */ jsx(ChevronRight, { class: "ms-auto" })
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
};
|
|
494
|
+
var dropdownTrigger = tv({
|
|
495
|
+
base: [
|
|
496
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap",
|
|
497
|
+
"focus-visible:ring-outline/50 transition-[color,box-shadow] outline-none focus-visible:ring-3",
|
|
498
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
499
|
+
"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
500
|
+
"h-9 px-4 py-2"
|
|
501
|
+
]
|
|
502
|
+
});
|
|
503
|
+
var callRef = (ref, node) => {
|
|
504
|
+
if (typeof ref === "function") {
|
|
505
|
+
ref(node);
|
|
506
|
+
} else if (ref && typeof ref === "object" && "current" in ref) {
|
|
507
|
+
ref.current = node;
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
var DropdownTrigger = ({
|
|
511
|
+
asChild = false,
|
|
512
|
+
class: className,
|
|
513
|
+
children,
|
|
514
|
+
onClick,
|
|
515
|
+
ref: outerRef,
|
|
516
|
+
...rest
|
|
517
|
+
}) => {
|
|
518
|
+
const dropdown = useDropdown();
|
|
519
|
+
const handleClick = (event) => {
|
|
520
|
+
onClick?.(event);
|
|
521
|
+
if (event.defaultPrevented) return;
|
|
522
|
+
dropdown.setOpen(!dropdown.open.value);
|
|
523
|
+
};
|
|
524
|
+
if (asChild) {
|
|
525
|
+
if (!isValidElement(children)) {
|
|
526
|
+
return null;
|
|
527
|
+
}
|
|
528
|
+
const childProps = children.props ?? {};
|
|
529
|
+
return cloneElement(children, {
|
|
530
|
+
...childProps,
|
|
531
|
+
...rest,
|
|
532
|
+
id: dropdown.triggerId,
|
|
533
|
+
"aria-controls": dropdown.contentId,
|
|
534
|
+
"aria-haspopup": "menu",
|
|
535
|
+
"aria-expanded": dropdown.open.value,
|
|
536
|
+
"data-slot": "dropdown-trigger",
|
|
537
|
+
"data-state": dropdown.open.value ? "open" : "closed",
|
|
538
|
+
onClick: (event) => {
|
|
539
|
+
childProps.onClick?.(event);
|
|
540
|
+
handleClick(event);
|
|
541
|
+
},
|
|
542
|
+
ref: (node) => {
|
|
543
|
+
dropdown.triggerRef.current = node;
|
|
544
|
+
callRef(childProps.ref, node);
|
|
545
|
+
callRef(outerRef, node);
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
return /* @__PURE__ */ jsx(
|
|
550
|
+
"button",
|
|
551
|
+
{
|
|
552
|
+
ref: (node) => {
|
|
553
|
+
dropdown.triggerRef.current = node;
|
|
554
|
+
callRef(outerRef, node);
|
|
555
|
+
},
|
|
556
|
+
id: dropdown.triggerId,
|
|
557
|
+
type: "button",
|
|
558
|
+
class: dropdownTrigger({ class: className }),
|
|
559
|
+
"data-slot": "dropdown-trigger",
|
|
560
|
+
"data-state": dropdown.open.value ? "open" : "closed",
|
|
561
|
+
"aria-controls": dropdown.contentId,
|
|
562
|
+
"aria-haspopup": "menu",
|
|
563
|
+
"aria-expanded": dropdown.open.value,
|
|
564
|
+
onClick: (event) => handleClick(event),
|
|
565
|
+
...rest,
|
|
566
|
+
children
|
|
567
|
+
}
|
|
568
|
+
);
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
// src/components/dropdown/index.ts
|
|
572
|
+
var dropdown_default = {
|
|
573
|
+
Root: Dropdown,
|
|
574
|
+
Trigger: DropdownTrigger,
|
|
575
|
+
Content: DropdownContent,
|
|
576
|
+
Item: DropdownItem,
|
|
577
|
+
Label: DropdownLabel,
|
|
578
|
+
Separator: DropdownSeparator,
|
|
579
|
+
Group: DropdownGroup,
|
|
580
|
+
Shortcut: DropdownShortcut,
|
|
581
|
+
Sub: DropdownSub,
|
|
582
|
+
SubTrigger: DropdownSubTrigger,
|
|
583
|
+
SubContent: DropdownSubContent,
|
|
584
|
+
Portal: DropdownPortal,
|
|
585
|
+
CheckboxItem: DropdownCheckboxItem,
|
|
586
|
+
RadioGroup: DropdownRadioGroup,
|
|
587
|
+
RadioItem: DropdownRadioItem
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
export { Dropdown, DropdownCheckboxItem, DropdownContent, DropdownGroup, DropdownItem, DropdownLabel, DropdownPortal, DropdownRadioGroup, DropdownRadioItem, DropdownSeparator, DropdownShortcut, DropdownSub, DropdownSubContent, DropdownSubTrigger, DropdownTrigger, dropdown_default };
|
|
591
|
+
//# sourceMappingURL=chunk-LGO5HXMG.js.map
|
|
592
|
+
//# sourceMappingURL=chunk-LGO5HXMG.js.map
|