@gv-tech/ui-web 2.22.1 → 2.23.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/dist/accordion-Dd8Hrexd.mjs +244 -0
- package/dist/accordion-DdSOiVyo.js +1 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +5 -7
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.mjs +1 -2
- package/dist/alert-dialog-B7zX3gJX.js +7 -0
- package/dist/alert-dialog-BQoG5g_w.mjs +213 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +17 -21
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.mjs +2 -4
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +8 -8
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.mjs +37 -29
- package/dist/{aspect-ratio-CFWobEnT.mjs → aspect-ratio-DnChDaBi.mjs} +10 -4
- package/dist/{aspect-ratio-D9dApiWv.js → aspect-ratio-QD1ZXP2B.js} +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +2 -4
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/avatar-C4onD8-4.mjs +127 -0
- package/dist/avatar-ki_M47qG.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +10 -7
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.mjs +2 -3
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +4 -5
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.mjs +17 -13
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +9 -17
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.mjs +67 -58
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +11 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.mjs +39 -0
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +3 -5
- package/dist/button.d.ts.map +1 -1
- package/dist/button.mjs +33 -26
- package/dist/calendar-D9sapvfY.js +1 -0
- package/dist/{calendar-DtFx4qdT.mjs → calendar-Dg6VGycy.mjs} +631 -625
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +5 -5
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.mjs +1 -2
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -10
- package/dist/card.d.ts.map +1 -1
- package/dist/card.mjs +53 -40
- package/dist/carousel-6oFHLN7R.js +1 -0
- package/dist/{carousel-PQJ97GjQ.mjs → carousel-DbDoNdqJ.mjs} +54 -59
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +18 -13
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.mjs +2 -4
- package/dist/chart.cjs +3 -3
- package/dist/chart.d.ts +35 -7
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.mjs +64 -71
- package/dist/checkbox-BLgY82mB.js +1 -0
- package/dist/{checkbox-BOmSuATv.mjs → checkbox-Bts_zfqd.mjs} +32 -29
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +2 -5
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.mjs +1 -2
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +4 -6
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.mjs +21 -3
- package/dist/combobox-6qNx9Wbb.js +4 -0
- package/dist/combobox-yDMqxM_J.mjs +5522 -0
- package/dist/combobox.cjs +1 -0
- package/dist/combobox.d.ts +21 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.mjs +4 -0
- package/dist/command-C6wJ5giF.mjs +576 -0
- package/dist/command-DCrPL1iW.js +1 -0
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +16 -80
- package/dist/command.d.ts.map +1 -1
- package/dist/command.mjs +1 -2
- package/dist/context-menu-CydUpD4W.mjs +349 -0
- package/dist/context-menu-DQ7XuuG5.js +1 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +29 -21
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.mjs +1 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +15 -17
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.mjs +89 -43
- package/dist/direction.cjs +1 -0
- package/dist/direction.d.ts +7 -0
- package/dist/direction.d.ts.map +1 -0
- package/dist/direction.mjs +15 -0
- package/dist/dist-1C8JOpVg.js +1 -0
- package/dist/{dist-CTaBktQl.mjs → dist-B1OcuinL.mjs} +93 -92
- package/dist/dist-BGZDG175.mjs +199 -0
- package/dist/dist-BPBwSSyk.mjs +8 -0
- package/dist/{dist-BTlmz3JV.js → dist-BPX1UGAz2.js} +1 -1
- package/dist/dist-BRsDdVlJ.js +1 -0
- package/dist/{dist-_LAgxsbh.mjs → dist-BWwCr-xN.mjs} +10 -9
- package/dist/dist-BYdcKuDi.mjs +16 -0
- package/dist/{dist-DCKyUINZ.mjs → dist-BlB11V_z.mjs} +1 -1
- package/dist/dist-CCXBcfM3.js +1 -0
- package/dist/{dist--EFQaGUD.mjs → dist-CDU9vno-.mjs} +4 -4
- package/dist/dist-CJolxugc.js +1 -0
- package/dist/dist-CQhWBhaI.mjs +91 -0
- package/dist/dist-CRLbUj9C.js +1 -0
- package/dist/dist-CWElW7UD.js +1 -0
- package/dist/{dist-NIAlh3KC.js → dist-CXbzwSnE.js} +1 -1
- package/dist/{dist-C5EZ0AD6.mjs → dist-CYj6O95k.mjs} +42 -41
- package/dist/{dist-Bjlzl0jN.mjs → dist-Cacc4QIh.mjs} +13 -10
- package/dist/dist-ChuP-5Gb.js +1 -0
- package/dist/dist-CiM892Rg.js +1 -0
- package/dist/{dist-Doq7FY_P.js → dist-CuMQq0hV.js} +1 -1
- package/dist/dist-DMnXk8Uo.js +1 -0
- package/dist/{dist-CRmJFaEL.mjs → dist-DPBTfUqI.mjs} +18 -17
- package/dist/dist-DR0lXVFG.js +1 -0
- package/dist/dist-Da7BU5sd.js +5 -0
- package/dist/{dist-D_tuvB-W.mjs → dist-Dz3LbuDd.mjs} +8 -9
- package/dist/{dist-9gQKRtL7.mjs → dist-GhACpuJb2.mjs} +1 -1
- package/dist/dist-o4zlRoDG.js +1 -0
- package/dist/{dist-DdVp13bp.mjs → dist-rGeQfsgN.mjs} +1 -1
- package/dist/{dist-BQOrag93.mjs → dist-tvb2Wafb.mjs} +22 -21
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +10 -21
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.mjs +74 -45
- package/dist/dropdown-menu-BoJvZ3Fj.js +1 -0
- package/dist/dropdown-menu-CriaO1_i.mjs +347 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +27 -21
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/empty.cjs +1 -0
- package/dist/empty.d.ts +13 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.mjs +60 -0
- package/dist/{es2015-DkZq_IIO.mjs → es2015-BhmbVcui.mjs} +2 -2
- package/dist/{es2015-Ca60p53M.js → es2015-D22cM8Q_.js} +1 -1
- package/dist/field.cjs +1 -0
- package/dist/field.d.ts +18 -0
- package/dist/field.d.ts.map +1 -0
- package/dist/field.mjs +109 -0
- package/dist/floating-ui.react-dom-DgS_bqyY.mjs +1089 -0
- package/dist/floating-ui.react-dom-DpCJEf_x.js +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +8 -8
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-theme.d.ts +16 -0
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/{hover-card-BOk3-K0k.mjs → hover-card-CJ-ibpbC.mjs} +53 -33
- package/dist/hover-card-CK5SjVLL.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +4 -6
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.mjs +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +14 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +66 -54
- package/dist/input-group.cjs +1 -0
- package/dist/input-group.d.ts +18 -0
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-group.mjs +78 -0
- package/dist/input-otp-BH_9dVhh.mjs +391 -0
- package/dist/input-otp-BibboKMt.js +20 -0
- package/dist/input-otp.cjs +1 -0
- package/dist/input-otp.d.ts +9 -0
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.mjs +4 -0
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +1 -4
- package/dist/input.d.ts.map +1 -1
- package/dist/input.mjs +11 -11
- package/dist/item.cjs +1 -0
- package/dist/item.d.ts +25 -0
- package/dist/item.d.ts.map +1 -0
- package/dist/item.mjs +118 -0
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.d.ts +5 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.mjs +20 -0
- package/dist/label-BXMSoyyu.js +1 -0
- package/dist/label-C8GNfPU0.mjs +25 -0
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +2 -5
- package/dist/label.d.ts.map +1 -1
- package/dist/label.mjs +1 -2
- package/dist/menubar-BcyqIJgy.mjs +441 -0
- package/dist/menubar-DPxokWFI.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +25 -19
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.mjs +1 -1
- package/dist/native-select.cjs +1 -0
- package/dist/native-select.d.ts +8 -0
- package/dist/native-select.d.ts.map +1 -0
- package/dist/native-select.mjs +39 -0
- package/dist/navigation-menu-2yE2MUu-.js +1 -0
- package/dist/navigation-menu-N8gkxEXE.mjs +628 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +11 -11
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.mjs +1 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +13 -26
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.mjs +76 -59
- package/dist/popover-D1AO-E8p.js +1 -0
- package/dist/popover-wQACF3ut.mjs +245 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +9 -8
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.mjs +2 -3
- package/dist/{progress-30ehxjKg.mjs → progress-DPWSEWa5.mjs} +19 -14
- package/dist/{progress-BqWHea4f.js → progress-ShXZwOfj.js} +2 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -4
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.mjs +1 -1
- package/dist/radio-group-CQbZCQmj.mjs +199 -0
- package/dist/radio-group-DAEi5vW_.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +3 -8
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.mjs +1 -2
- package/dist/resizable-Cv-mKMKP.js +1 -0
- package/dist/{resizable-DhOcAmNX.mjs → resizable-DJSE3e5L.mjs} +310 -282
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +6 -7
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/{scroll-area-DJcPs0_v.mjs → scroll-area-8QcqkHnC.mjs} +69 -58
- package/dist/scroll-area-Cqqinhxf.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +3 -5
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.mjs +1 -2
- package/dist/search.cjs +1 -1
- package/dist/search.d.ts +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.mjs +15 -14
- package/dist/select-DdUveoSA.js +1 -0
- package/dist/{select-D4bxRFq5.mjs → select-yoeH35x2.mjs} +279 -245
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +13 -13
- package/dist/select.d.ts.map +1 -1
- package/dist/select.mjs +1 -1
- package/dist/{separator-DZACUutC.mjs → separator-BU1ea5gl.mjs} +14 -10
- package/dist/separator-DBjErwHf.js +1 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +2 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.mjs +1 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +13 -26
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.mjs +84 -54
- package/dist/shim-B5sEfNEJ.js +1 -0
- package/dist/shim-DX33EwUw.mjs +91 -0
- package/dist/sidebar-B-sWccYh.mjs +355 -0
- package/dist/sidebar-DIW-1cin.js +1 -0
- package/dist/sidebar.cjs +1 -0
- package/dist/sidebar.d.ts +45 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.mjs +5 -0
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +1 -4
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/{slider-DTdrUy_s.mjs → slider-CCPXejUF.mjs} +81 -59
- package/dist/slider-w05gD_Ix.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +2 -4
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.mjs +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +1 -5
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.mjs +23 -16
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +4 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.mjs +15 -0
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +1 -1
- package/dist/switch-CDBqsWQa.mjs +112 -0
- package/dist/switch-X2WBJsUu.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +4 -4
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +8 -10
- package/dist/table.d.ts.map +1 -1
- package/dist/table.mjs +62 -54
- package/dist/tabs-DzvgrVzk.js +1 -0
- package/dist/tabs-KDeHjVQU.mjs +160 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +10 -8
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.mjs +2 -2
- package/dist/text.d.ts +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +1 -4
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.mjs +10 -10
- package/dist/{theme-toggle-Dtze9fyN.js → theme-toggle-C2Y4bIM3.js} +1 -1
- package/dist/{theme-toggle-DAHBgdy0.mjs → theme-toggle-clE-HpSS.mjs} +9 -9
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +1 -2
- package/dist/toast-1keyrzem.js +1 -0
- package/dist/{toast-G9LdgDDE.mjs → toast-DVI6jPq5.mjs} +102 -101
- package/dist/toast.cjs +1 -1
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.mjs +1 -1
- package/dist/{toaster-WQJjavlc.mjs → toaster-Czhz-ktg.mjs} +1 -1
- package/dist/{toaster-CKD4CKAZ.js → toaster-DfDb2-aI.js} +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +1 -1
- package/dist/toggle-BGkq5XDM.js +1 -0
- package/dist/toggle-BfIIdlA6.mjs +58 -0
- package/dist/toggle-group-CbqgoPFU.mjs +167 -0
- package/dist/toggle-group-D7hR4BT2.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +7 -9
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.mjs +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +6 -5
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.mjs +2 -19
- package/dist/tooltip-CAIbshMk.js +1 -0
- package/dist/{tooltip-BHEcM7lO.mjs → tooltip-D_o8Z-Ya.mjs} +106 -90
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +5 -10
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.mjs +1 -1
- package/package.json +8 -6
- package/src/accordion.tsx +58 -51
- package/src/alert-dialog.tsx +140 -93
- package/src/alert.tsx +44 -33
- package/src/aspect-ratio.tsx +10 -4
- package/src/avatar.tsx +92 -37
- package/src/badge.tsx +24 -14
- package/src/breadcrumb.tsx +73 -85
- package/src/button-group.tsx +78 -0
- package/src/button.tsx +46 -24
- package/src/calendar.tsx +52 -40
- package/src/card.tsx +67 -42
- package/src/carousel.tsx +164 -174
- package/src/chart.tsx +206 -232
- package/src/checkbox.tsx +17 -17
- package/src/collapsible.tsx +16 -10
- package/src/combobox.tsx +282 -0
- package/src/command.tsx +123 -120
- package/src/context-menu.tsx +206 -179
- package/src/dialog.tsx +111 -65
- package/src/direction.tsx +18 -0
- package/src/drawer.tsx +75 -78
- package/src/dropdown-menu.tsx +211 -180
- package/src/empty.tsx +83 -0
- package/src/field.tsx +217 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hover-card.tsx +33 -27
- package/src/index.ts +108 -154
- package/src/input-group.tsx +143 -0
- package/src/input-otp.tsx +81 -0
- package/src/input.tsx +8 -8
- package/src/item.tsx +185 -0
- package/src/kbd.tsx +21 -0
- package/src/label.tsx +17 -14
- package/src/menubar.tsx +211 -199
- package/src/native-select.tsx +54 -0
- package/src/navigation-menu.tsx +115 -110
- package/src/pagination.tsx +65 -80
- package/src/popover.tsx +53 -41
- package/src/progress.tsx +22 -20
- package/src/radio-group.tsx +22 -34
- package/src/resizable.tsx +34 -49
- package/src/scroll-area.tsx +43 -35
- package/src/search.tsx +12 -9
- package/src/select.tsx +138 -133
- package/src/separator.tsx +25 -18
- package/src/sheet.tsx +97 -127
- package/src/sidebar.tsx +660 -0
- package/src/skeleton.tsx +7 -6
- package/src/slider.tsx +51 -19
- package/src/sonner.tsx +22 -12
- package/src/spinner.tsx +10 -0
- package/src/support-fab.tsx +1 -1
- package/src/switch.tsx +28 -21
- package/src/table.tsx +61 -87
- package/src/tabs.tsx +75 -56
- package/src/textarea.tsx +8 -10
- package/src/toast.tsx +5 -0
- package/src/toggle-group.tsx +76 -40
- package/src/toggle.tsx +35 -15
- package/src/tooltip.tsx +41 -43
- package/dist/accordion-BTF24dQU.js +0 -1
- package/dist/accordion-DHTV2Am8.mjs +0 -221
- package/dist/alert-dialog-Bwn2-Uyf.mjs +0 -164
- package/dist/alert-dialog-DBMX5E0-.js +0 -7
- package/dist/avatar-BI7s8omb.js +0 -1
- package/dist/avatar-hzlewncL.mjs +0 -185
- package/dist/calendar-ykdYhTj9.js +0 -1
- package/dist/carousel-DSmAn1nc.js +0 -1
- package/dist/checkbox-dK6DJKeV.js +0 -1
- package/dist/command-CDSbHz4C.js +0 -1
- package/dist/command-j0rZqZ7B.mjs +0 -531
- package/dist/context-menu-BWgLbKLP.js +0 -1
- package/dist/context-menu-CWSzssAO.mjs +0 -292
- package/dist/dist-B28N93_W.js +0 -1
- package/dist/dist-B43Kk7ii.js +0 -1
- package/dist/dist-BTPL2C0R.js +0 -1
- package/dist/dist-BjEG16aJ.mjs +0 -111
- package/dist/dist-BlKAvKHD.js +0 -1
- package/dist/dist-C3Z3atn0.mjs +0 -10
- package/dist/dist-C4q8IPk4.mjs +0 -28
- package/dist/dist-CPglx4om.js +0 -1
- package/dist/dist-CV2U2xFR.js +0 -1
- package/dist/dist-Cv9YaN1n.mjs +0 -61
- package/dist/dist-DAe-fOIM.mjs +0 -25
- package/dist/dist-DQAJMTj0.js +0 -1
- package/dist/dist-DaCPM8ia.js +0 -1
- package/dist/dist-DasmYflz.js +0 -1
- package/dist/dist-DneYUKe0.js +0 -1
- package/dist/dist-Du2jbEkG.mjs +0 -1282
- package/dist/dist-Dw6-GQAn.js +0 -1
- package/dist/dist-DwGlbIjj.js +0 -5
- package/dist/dist-Dzjlf9ug.js +0 -1
- package/dist/dist-GaBUW_Tu.js +0 -1
- package/dist/dropdown-menu-Bz5LlLjl.js +0 -1
- package/dist/dropdown-menu-Cp1qpOLk.mjs +0 -288
- package/dist/hover-card-CyKIuXGH.js +0 -1
- package/dist/label-DGuuPl_e.mjs +0 -22
- package/dist/label-gVkdll-j.js +0 -1
- package/dist/menubar-DNrIQhY5.mjs +0 -410
- package/dist/menubar-DkjAo6qJ.js +0 -1
- package/dist/navigation-menu-1cmCEi0j.mjs +0 -602
- package/dist/navigation-menu-qPt8hpr5.js +0 -1
- package/dist/popover-CbM1tqdC.mjs +0 -201
- package/dist/popover-DGTgqdKX.js +0 -1
- package/dist/radio-group-BGThTiQM.mjs +0 -193
- package/dist/radio-group-ClFpAswm.js +0 -1
- package/dist/resizable-D09wr7tV.js +0 -1
- package/dist/scroll-area-W_aOLOdE.js +0 -1
- package/dist/select-BQtkQBiD.js +0 -1
- package/dist/separator-BmkhoDge.js +0 -1
- package/dist/slider-Bkluwc3b.js +0 -1
- package/dist/switch-DENAxyga.js +0 -1
- package/dist/switch-DbsdyQVg.mjs +0 -103
- package/dist/tabs-C9sMowgZ.mjs +0 -136
- package/dist/tabs-DeK-zpy4.js +0 -1
- package/dist/toast-BtXY2QTe.js +0 -1
- package/dist/toggle-group-B0H9TwdD.mjs +0 -155
- package/dist/toggle-group-CAyztsIl.js +0 -1
- package/dist/tooltip-CKcMl7tK.js +0 -1
- /package/dist/{dist-C_45sBzc.js → dist-C_45sBzc2.js} +0 -0
- /package/dist/{dist-DGzGsPqo.mjs → dist-DGzGsPqo2.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./combobox-6qNx9Wbb.js");exports.Combobox=e.t,exports.ComboboxChip=e.n,exports.ComboboxChips=e.r,exports.ComboboxChipsInput=e.i,exports.ComboboxCollection=e.a,exports.ComboboxContent=e.o,exports.ComboboxEmpty=e.s,exports.ComboboxGroup=e.c,exports.ComboboxInput=e.l,exports.ComboboxItem=e.u,exports.ComboboxLabel=e.d,exports.ComboboxList=e.f,exports.ComboboxSeparator=e.p,exports.ComboboxTrigger=e.m,exports.ComboboxValue=e.h,exports.useComboboxAnchor=e.g;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react';
|
|
2
|
+
import { ComboboxChipBaseProps, ComboboxChipsBaseProps, ComboboxChipsInputBaseProps, ComboboxCollectionBaseProps, ComboboxContentBaseProps, ComboboxEmptyBaseProps, ComboboxGroupBaseProps, ComboboxInputBaseProps, ComboboxItemBaseProps, ComboboxLabelBaseProps, ComboboxListBaseProps, ComboboxSeparatorBaseProps, ComboboxTriggerBaseProps, ComboboxValueBaseProps } from '@gv-tech/ui-core';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
5
|
+
declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props & ComboboxValueBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props & ComboboxTriggerBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & ComboboxInputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> & ComboboxContentBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props & ComboboxListBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & ComboboxItemBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props & ComboboxGroupBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props & ComboboxLabelBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props & ComboboxCollectionBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props & ComboboxEmptyBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props & ComboboxSeparatorBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props & ComboboxChipsBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & ComboboxChipBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props & ComboboxChipsInputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
20
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
21
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../src/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAE3B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAM1B,QAAA,MAAM,QAAQ,+BAAyB,CAAC;AAExC,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,2CAE1F;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,OAAO,CAAC,KAAK,GAAG,wBAAwB,2CAW5D;AAeD,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAgB,EAChB,WAAkB,EAClB,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,2CAsBxD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAe,EACf,WAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAC9B,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ,CAAC,GACpG,wBAAwB,2CAuBzB;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG,qBAAqB,2CAWlG;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG,qBAAqB,2CAkB5G;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,2CAErG;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,UAAU,CAAC,KAAK,GAAG,sBAAsB,2CAQ1G;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,UAAU,CAAC,KAAK,GAAG,2BAA2B,2CAEzG;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,2CAWrG;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,SAAS,CAAC,KAAK,GAAG,0BAA0B,2CAQjH;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,iBAAiB,CAAC,KAAK,CAAC,GAC5D,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAC7B,sBAAsB,2CAWvB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG,qBAAqB,2CAsBtD;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,GAAG,2BAA2B,2CAQ/G;AAED,iBAAS,iBAAiB,2CAEzB;AAED,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./combobox-yDMqxM_J.mjs";
|
|
4
|
+
export { m as Combobox, l as ComboboxChip, f as ComboboxChips, o as ComboboxChipsInput, e as ComboboxCollection, u as ComboboxContent, p as ComboboxEmpty, t as ComboboxGroup, s as ComboboxInput, h as ComboboxItem, n as ComboboxLabel, r as ComboboxList, d as ComboboxSeparator, c as ComboboxTrigger, a as ComboboxValue, i as useComboboxAnchor };
|
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
import { t as e } from "./utils-A_oVsYw5.mjs";
|
|
2
|
+
import { i as t } from "./dist-CQhWBhaI.mjs";
|
|
3
|
+
import { t as n } from "./dist-Df2ez-DA.mjs";
|
|
4
|
+
import { a as r, i, n as a, o } from "./dist-CYj6O95k.mjs";
|
|
5
|
+
import { n as s } from "./dist-GhACpuJb2.mjs";
|
|
6
|
+
import { Dialog as c, DialogContent as l, DialogDescription as u, DialogHeader as d, DialogTitle as f } from "./dialog.mjs";
|
|
7
|
+
import { InputGroup as p, InputGroupAddon as m } from "./input-group.mjs";
|
|
8
|
+
import * as h from "react";
|
|
9
|
+
import "react-dom";
|
|
10
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
|
+
import { CheckIcon as v, SearchIcon as y } from "lucide-react";
|
|
12
|
+
//#region ../../node_modules/.bun/cmdk@1.1.1+2d3f272c3a65784a/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
13
|
+
var b = 1, ee = .9, x = .8, S = .17, C = .1, w = .999, T = .9999, E = .99, D = /[\\\/_+.#"@\[\(\{&]/, O = /[\\\/_+.#"@\[\(\{&]/g, k = /[\s-]/, A = /[\s-]/g;
|
|
14
|
+
function j(e, t, n, r, i, a, o) {
|
|
15
|
+
if (a === t.length) return i === e.length ? b : E;
|
|
16
|
+
var s = `${i},${a}`;
|
|
17
|
+
if (o[s] !== void 0) return o[s];
|
|
18
|
+
for (var c = r.charAt(a), l = n.indexOf(c, i), u = 0, d, f, p, m; l >= 0;) d = j(e, t, n, r, l + 1, a + 1, o), d > u && (l === i ? d *= b : D.test(e.charAt(l - 1)) ? (d *= x, p = e.slice(i, l - 1).match(O), p && i > 0 && (d *= w ** +p.length)) : k.test(e.charAt(l - 1)) ? (d *= ee, m = e.slice(i, l - 1).match(A), m && i > 0 && (d *= w ** +m.length)) : (d *= S, i > 0 && (d *= w ** +(l - i))), e.charAt(l) !== t.charAt(a) && (d *= T)), (d < C && n.charAt(l - 1) === r.charAt(a + 1) || r.charAt(a + 1) === r.charAt(a) && n.charAt(l - 1) !== r.charAt(a)) && (f = j(e, t, n, r, l + 1, a + 2, o), f * C > d && (d = f * C)), d > u && (u = d), l = n.indexOf(c, l + 1);
|
|
19
|
+
return o[s] = u, u;
|
|
20
|
+
}
|
|
21
|
+
function M(e) {
|
|
22
|
+
return e.toLowerCase().replace(A, " ");
|
|
23
|
+
}
|
|
24
|
+
function N(e, t, n) {
|
|
25
|
+
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, j(e, t, M(e), M(t), 0, 0, {});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../../node_modules/.bun/@radix-ui+react-primitive@2.1.4+2d3f272c3a65784a/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
29
|
+
var P = [
|
|
30
|
+
"a",
|
|
31
|
+
"button",
|
|
32
|
+
"div",
|
|
33
|
+
"form",
|
|
34
|
+
"h2",
|
|
35
|
+
"h3",
|
|
36
|
+
"img",
|
|
37
|
+
"input",
|
|
38
|
+
"label",
|
|
39
|
+
"li",
|
|
40
|
+
"nav",
|
|
41
|
+
"ol",
|
|
42
|
+
"p",
|
|
43
|
+
"select",
|
|
44
|
+
"span",
|
|
45
|
+
"svg",
|
|
46
|
+
"ul"
|
|
47
|
+
].reduce((e, t) => {
|
|
48
|
+
let n = s(`Primitive.${t}`), r = h.forwardRef((e, r) => {
|
|
49
|
+
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
50
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(o, {
|
|
51
|
+
...a,
|
|
52
|
+
ref: r
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
return r.displayName = `Primitive.${t}`, {
|
|
56
|
+
...e,
|
|
57
|
+
[t]: r
|
|
58
|
+
};
|
|
59
|
+
}, {}), F = "[cmdk-group=\"\"]", I = "[cmdk-group-items=\"\"]", te = "[cmdk-group-heading=\"\"]", L = "[cmdk-item=\"\"]", ne = `${L}:not([aria-disabled="true"])`, R = "cmdk-item-select", z = "data-value", re = (e, t, n) => N(e, t, n), B = h.createContext(void 0), V = () => h.useContext(B), H = h.createContext(void 0), U = () => h.useContext(H), W = h.createContext(void 0), G = h.forwardRef((e, t) => {
|
|
60
|
+
let r = X(() => ({
|
|
61
|
+
search: "",
|
|
62
|
+
value: e.value ?? e.defaultValue ?? "",
|
|
63
|
+
selectedItemId: void 0,
|
|
64
|
+
filtered: {
|
|
65
|
+
count: 0,
|
|
66
|
+
items: /* @__PURE__ */ new Map(),
|
|
67
|
+
groups: /* @__PURE__ */ new Set()
|
|
68
|
+
}
|
|
69
|
+
})), i = X(() => /* @__PURE__ */ new Set()), a = X(() => /* @__PURE__ */ new Map()), o = X(() => /* @__PURE__ */ new Map()), s = X(() => /* @__PURE__ */ new Set()), c = J(e), { label: l, children: u, value: d, onValueChange: f, filter: p, shouldFilter: m, loop: g, disablePointerSelection: _ = !1, vimBindings: v = !0, ...y } = e, b = n(), ee = n(), x = n(), S = h.useRef(null), C = me();
|
|
70
|
+
Y(() => {
|
|
71
|
+
if (d !== void 0) {
|
|
72
|
+
let e = d.trim();
|
|
73
|
+
r.current.value = e, w.emit();
|
|
74
|
+
}
|
|
75
|
+
}, [d]), Y(() => {
|
|
76
|
+
C(6, A);
|
|
77
|
+
}, []);
|
|
78
|
+
let w = h.useMemo(() => ({
|
|
79
|
+
subscribe: (e) => (s.current.add(e), () => s.current.delete(e)),
|
|
80
|
+
snapshot: () => r.current,
|
|
81
|
+
setState: (e, t, n) => {
|
|
82
|
+
var i, a, o;
|
|
83
|
+
if (!Object.is(r.current[e], t)) {
|
|
84
|
+
if (r.current[e] = t, e === "search") k(), D(), C(1, O);
|
|
85
|
+
else if (e === "value") {
|
|
86
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
87
|
+
let e = document.getElementById(x);
|
|
88
|
+
e ? e.focus() : (i = document.getElementById(b)) == null || i.focus();
|
|
89
|
+
}
|
|
90
|
+
if (C(7, () => {
|
|
91
|
+
r.current.selectedItemId = j()?.id, w.emit();
|
|
92
|
+
}), n || C(5, A), c.current?.value !== void 0) {
|
|
93
|
+
let e = t ?? "";
|
|
94
|
+
(o = (a = c.current).onValueChange) == null || o.call(a, e);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
w.emit();
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
emit: () => {
|
|
102
|
+
s.current.forEach((e) => e());
|
|
103
|
+
}
|
|
104
|
+
}), []), T = h.useMemo(() => ({
|
|
105
|
+
value: (e, t, n) => {
|
|
106
|
+
t !== o.current.get(e)?.value && (o.current.set(e, {
|
|
107
|
+
value: t,
|
|
108
|
+
keywords: n
|
|
109
|
+
}), r.current.filtered.items.set(e, E(t, n)), C(2, () => {
|
|
110
|
+
D(), w.emit();
|
|
111
|
+
}));
|
|
112
|
+
},
|
|
113
|
+
item: (e, t) => (i.current.add(e), t && (a.current.has(t) ? a.current.get(t).add(e) : a.current.set(t, new Set([e]))), C(3, () => {
|
|
114
|
+
k(), D(), r.current.value || O(), w.emit();
|
|
115
|
+
}), () => {
|
|
116
|
+
o.current.delete(e), i.current.delete(e), r.current.filtered.items.delete(e);
|
|
117
|
+
let t = j();
|
|
118
|
+
C(4, () => {
|
|
119
|
+
k(), t?.getAttribute("id") === e && O(), w.emit();
|
|
120
|
+
});
|
|
121
|
+
}),
|
|
122
|
+
group: (e) => (a.current.has(e) || a.current.set(e, /* @__PURE__ */ new Set()), () => {
|
|
123
|
+
o.current.delete(e), a.current.delete(e);
|
|
124
|
+
}),
|
|
125
|
+
filter: () => c.current.shouldFilter,
|
|
126
|
+
label: l || e["aria-label"],
|
|
127
|
+
getDisablePointerSelection: () => c.current.disablePointerSelection,
|
|
128
|
+
listId: b,
|
|
129
|
+
inputId: x,
|
|
130
|
+
labelId: ee,
|
|
131
|
+
listInnerRef: S
|
|
132
|
+
}), []);
|
|
133
|
+
function E(e, t) {
|
|
134
|
+
let n = c.current?.filter ?? re;
|
|
135
|
+
return e ? n(e, r.current.search, t) : 0;
|
|
136
|
+
}
|
|
137
|
+
function D() {
|
|
138
|
+
if (!r.current.search || c.current.shouldFilter === !1) return;
|
|
139
|
+
let e = r.current.filtered.items, t = [];
|
|
140
|
+
r.current.filtered.groups.forEach((n) => {
|
|
141
|
+
let r = a.current.get(n), i = 0;
|
|
142
|
+
r.forEach((t) => {
|
|
143
|
+
let n = e.get(t);
|
|
144
|
+
i = Math.max(n, i);
|
|
145
|
+
}), t.push([n, i]);
|
|
146
|
+
});
|
|
147
|
+
let n = S.current;
|
|
148
|
+
M().sort((t, n) => {
|
|
149
|
+
let r = t.getAttribute("id"), i = n.getAttribute("id");
|
|
150
|
+
return (e.get(i) ?? 0) - (e.get(r) ?? 0);
|
|
151
|
+
}).forEach((e) => {
|
|
152
|
+
let t = e.closest(I);
|
|
153
|
+
t ? t.appendChild(e.parentElement === t ? e : e.closest(`${I} > *`)) : n.appendChild(e.parentElement === n ? e : e.closest(`${I} > *`));
|
|
154
|
+
}), t.sort((e, t) => t[1] - e[1]).forEach((e) => {
|
|
155
|
+
let t = S.current?.querySelector(`${F}[${z}="${encodeURIComponent(e[0])}"]`);
|
|
156
|
+
t?.parentElement.appendChild(t);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function O() {
|
|
160
|
+
let e = M().find((e) => e.getAttribute("aria-disabled") !== "true")?.getAttribute(z);
|
|
161
|
+
w.setState("value", e || void 0);
|
|
162
|
+
}
|
|
163
|
+
function k() {
|
|
164
|
+
if (!r.current.search || c.current.shouldFilter === !1) {
|
|
165
|
+
r.current.filtered.count = i.current.size;
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
r.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
169
|
+
let e = 0;
|
|
170
|
+
for (let t of i.current) {
|
|
171
|
+
let n = E(o.current.get(t)?.value ?? "", o.current.get(t)?.keywords ?? []);
|
|
172
|
+
r.current.filtered.items.set(t, n), n > 0 && e++;
|
|
173
|
+
}
|
|
174
|
+
for (let [e, t] of a.current) for (let n of t) if (r.current.filtered.items.get(n) > 0) {
|
|
175
|
+
r.current.filtered.groups.add(e);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
r.current.filtered.count = e;
|
|
179
|
+
}
|
|
180
|
+
function A() {
|
|
181
|
+
var e;
|
|
182
|
+
let t = j();
|
|
183
|
+
t && (t.parentElement?.firstChild === t && ((e = t.closest(F)?.querySelector(te)) == null || e.scrollIntoView({ block: "nearest" })), t.scrollIntoView({ block: "nearest" }));
|
|
184
|
+
}
|
|
185
|
+
function j() {
|
|
186
|
+
return S.current?.querySelector(`${L}[aria-selected="true"]`);
|
|
187
|
+
}
|
|
188
|
+
function M() {
|
|
189
|
+
return Array.from(S.current?.querySelectorAll(ne) || []);
|
|
190
|
+
}
|
|
191
|
+
function N(e) {
|
|
192
|
+
let t = M()[e];
|
|
193
|
+
t && w.setState("value", t.getAttribute(z));
|
|
194
|
+
}
|
|
195
|
+
function V(e) {
|
|
196
|
+
var t;
|
|
197
|
+
let n = j(), r = M(), i = r.findIndex((e) => e === n), a = r[i + e];
|
|
198
|
+
(t = c.current) != null && t.loop && (a = i + e < 0 ? r[r.length - 1] : i + e === r.length ? r[0] : r[i + e]), a && w.setState("value", a.getAttribute(z));
|
|
199
|
+
}
|
|
200
|
+
function U(e) {
|
|
201
|
+
let t = j()?.closest(F), n;
|
|
202
|
+
for (; t && !n;) t = e > 0 ? de(t, F) : fe(t, F), n = t?.querySelector(ne);
|
|
203
|
+
n ? w.setState("value", n.getAttribute(z)) : V(e);
|
|
204
|
+
}
|
|
205
|
+
let W = () => N(M().length - 1), G = (e) => {
|
|
206
|
+
e.preventDefault(), e.metaKey ? W() : e.altKey ? U(1) : V(1);
|
|
207
|
+
}, K = (e) => {
|
|
208
|
+
e.preventDefault(), e.metaKey ? N(0) : e.altKey ? U(-1) : V(-1);
|
|
209
|
+
};
|
|
210
|
+
return h.createElement(P.div, {
|
|
211
|
+
ref: t,
|
|
212
|
+
tabIndex: -1,
|
|
213
|
+
...y,
|
|
214
|
+
"cmdk-root": "",
|
|
215
|
+
onKeyDown: (e) => {
|
|
216
|
+
var t;
|
|
217
|
+
(t = y.onKeyDown) == null || t.call(y, e);
|
|
218
|
+
let n = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
219
|
+
if (!(e.defaultPrevented || n)) switch (e.key) {
|
|
220
|
+
case "n":
|
|
221
|
+
case "j":
|
|
222
|
+
v && e.ctrlKey && G(e);
|
|
223
|
+
break;
|
|
224
|
+
case "ArrowDown":
|
|
225
|
+
G(e);
|
|
226
|
+
break;
|
|
227
|
+
case "p":
|
|
228
|
+
case "k":
|
|
229
|
+
v && e.ctrlKey && K(e);
|
|
230
|
+
break;
|
|
231
|
+
case "ArrowUp":
|
|
232
|
+
K(e);
|
|
233
|
+
break;
|
|
234
|
+
case "Home":
|
|
235
|
+
e.preventDefault(), N(0);
|
|
236
|
+
break;
|
|
237
|
+
case "End":
|
|
238
|
+
e.preventDefault(), W();
|
|
239
|
+
break;
|
|
240
|
+
case "Enter": {
|
|
241
|
+
e.preventDefault();
|
|
242
|
+
let t = j();
|
|
243
|
+
if (t) {
|
|
244
|
+
let e = new Event(R);
|
|
245
|
+
t.dispatchEvent(e);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}, h.createElement("label", {
|
|
251
|
+
"cmdk-label": "",
|
|
252
|
+
htmlFor: T.inputId,
|
|
253
|
+
id: T.labelId,
|
|
254
|
+
style: ge
|
|
255
|
+
}, l), Q(e, (e) => h.createElement(H.Provider, { value: w }, h.createElement(B.Provider, { value: T }, e))));
|
|
256
|
+
}), K = h.forwardRef((e, r) => {
|
|
257
|
+
let i = n(), a = h.useRef(null), o = h.useContext(W), s = V(), c = J(e), l = c.current?.forceMount ?? o?.forceMount;
|
|
258
|
+
Y(() => {
|
|
259
|
+
if (!l) return s.item(i, o?.id);
|
|
260
|
+
}, [l]);
|
|
261
|
+
let u = pe(i, a, [
|
|
262
|
+
e.value,
|
|
263
|
+
e.children,
|
|
264
|
+
a
|
|
265
|
+
], e.keywords), d = U(), f = Z((e) => e.value && e.value === u.current), p = Z((e) => l || s.filter() === !1 ? !0 : e.search ? e.filtered.items.get(i) > 0 : !0);
|
|
266
|
+
h.useEffect(() => {
|
|
267
|
+
let t = a.current;
|
|
268
|
+
if (!(!t || e.disabled)) return t.addEventListener(R, m), () => t.removeEventListener(R, m);
|
|
269
|
+
}, [
|
|
270
|
+
p,
|
|
271
|
+
e.onSelect,
|
|
272
|
+
e.disabled
|
|
273
|
+
]);
|
|
274
|
+
function m() {
|
|
275
|
+
var e, t;
|
|
276
|
+
g(), (t = (e = c.current).onSelect) == null || t.call(e, u.current);
|
|
277
|
+
}
|
|
278
|
+
function g() {
|
|
279
|
+
d.setState("value", u.current, !0);
|
|
280
|
+
}
|
|
281
|
+
if (!p) return null;
|
|
282
|
+
let { disabled: _, value: v, onSelect: y, forceMount: b, keywords: ee, ...x } = e;
|
|
283
|
+
return h.createElement(P.div, {
|
|
284
|
+
ref: t(a, r),
|
|
285
|
+
...x,
|
|
286
|
+
id: i,
|
|
287
|
+
"cmdk-item": "",
|
|
288
|
+
role: "option",
|
|
289
|
+
"aria-disabled": !!_,
|
|
290
|
+
"aria-selected": !!f,
|
|
291
|
+
"data-disabled": !!_,
|
|
292
|
+
"data-selected": !!f,
|
|
293
|
+
onPointerMove: _ || s.getDisablePointerSelection() ? void 0 : g,
|
|
294
|
+
onClick: _ ? void 0 : m
|
|
295
|
+
}, e.children);
|
|
296
|
+
}), ie = h.forwardRef((e, r) => {
|
|
297
|
+
let { heading: i, children: a, forceMount: o, ...s } = e, c = n(), l = h.useRef(null), u = h.useRef(null), d = n(), f = V(), p = Z((e) => o || f.filter() === !1 ? !0 : e.search ? e.filtered.groups.has(c) : !0);
|
|
298
|
+
Y(() => f.group(c), []), pe(c, l, [
|
|
299
|
+
e.value,
|
|
300
|
+
e.heading,
|
|
301
|
+
u
|
|
302
|
+
]);
|
|
303
|
+
let m = h.useMemo(() => ({
|
|
304
|
+
id: c,
|
|
305
|
+
forceMount: o
|
|
306
|
+
}), [o]);
|
|
307
|
+
return h.createElement(P.div, {
|
|
308
|
+
ref: t(l, r),
|
|
309
|
+
...s,
|
|
310
|
+
"cmdk-group": "",
|
|
311
|
+
role: "presentation",
|
|
312
|
+
hidden: p ? void 0 : !0
|
|
313
|
+
}, i && h.createElement("div", {
|
|
314
|
+
ref: u,
|
|
315
|
+
"cmdk-group-heading": "",
|
|
316
|
+
"aria-hidden": !0,
|
|
317
|
+
id: d
|
|
318
|
+
}, i), Q(e, (e) => h.createElement("div", {
|
|
319
|
+
"cmdk-group-items": "",
|
|
320
|
+
role: "group",
|
|
321
|
+
"aria-labelledby": i ? d : void 0
|
|
322
|
+
}, h.createElement(W.Provider, { value: m }, e))));
|
|
323
|
+
}), ae = h.forwardRef((e, n) => {
|
|
324
|
+
let { alwaysRender: r, ...i } = e, a = h.useRef(null), o = Z((e) => !e.search);
|
|
325
|
+
return !r && !o ? null : h.createElement(P.div, {
|
|
326
|
+
ref: t(a, n),
|
|
327
|
+
...i,
|
|
328
|
+
"cmdk-separator": "",
|
|
329
|
+
role: "separator"
|
|
330
|
+
});
|
|
331
|
+
}), oe = h.forwardRef((e, t) => {
|
|
332
|
+
let { onValueChange: n, ...r } = e, i = e.value != null, a = U(), o = Z((e) => e.search), s = Z((e) => e.selectedItemId), c = V();
|
|
333
|
+
return h.useEffect(() => {
|
|
334
|
+
e.value != null && a.setState("search", e.value);
|
|
335
|
+
}, [e.value]), h.createElement(P.input, {
|
|
336
|
+
ref: t,
|
|
337
|
+
...r,
|
|
338
|
+
"cmdk-input": "",
|
|
339
|
+
autoComplete: "off",
|
|
340
|
+
autoCorrect: "off",
|
|
341
|
+
spellCheck: !1,
|
|
342
|
+
"aria-autocomplete": "list",
|
|
343
|
+
role: "combobox",
|
|
344
|
+
"aria-expanded": !0,
|
|
345
|
+
"aria-controls": c.listId,
|
|
346
|
+
"aria-labelledby": c.labelId,
|
|
347
|
+
"aria-activedescendant": s,
|
|
348
|
+
id: c.inputId,
|
|
349
|
+
type: "text",
|
|
350
|
+
value: i ? e.value : o,
|
|
351
|
+
onChange: (e) => {
|
|
352
|
+
i || a.setState("search", e.target.value), n?.(e.target.value);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}), se = h.forwardRef((e, n) => {
|
|
356
|
+
let { children: r, label: i = "Suggestions", ...a } = e, o = h.useRef(null), s = h.useRef(null), c = Z((e) => e.selectedItemId), l = V();
|
|
357
|
+
return h.useEffect(() => {
|
|
358
|
+
if (s.current && o.current) {
|
|
359
|
+
let e = s.current, t = o.current, n, r = new ResizeObserver(() => {
|
|
360
|
+
n = requestAnimationFrame(() => {
|
|
361
|
+
let n = e.offsetHeight;
|
|
362
|
+
t.style.setProperty("--cmdk-list-height", n.toFixed(1) + "px");
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
return r.observe(e), () => {
|
|
366
|
+
cancelAnimationFrame(n), r.unobserve(e);
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
}, []), h.createElement(P.div, {
|
|
370
|
+
ref: t(o, n),
|
|
371
|
+
...a,
|
|
372
|
+
"cmdk-list": "",
|
|
373
|
+
role: "listbox",
|
|
374
|
+
tabIndex: -1,
|
|
375
|
+
"aria-activedescendant": c,
|
|
376
|
+
"aria-label": i,
|
|
377
|
+
id: l.listId
|
|
378
|
+
}, Q(e, (e) => h.createElement("div", {
|
|
379
|
+
ref: t(s, l.listInnerRef),
|
|
380
|
+
"cmdk-list-sizer": ""
|
|
381
|
+
}, e)));
|
|
382
|
+
}), ce = h.forwardRef((e, t) => {
|
|
383
|
+
let { open: n, onOpenChange: s, overlayClassName: c, contentClassName: l, container: u, ...d } = e;
|
|
384
|
+
return h.createElement(o, {
|
|
385
|
+
open: n,
|
|
386
|
+
onOpenChange: s
|
|
387
|
+
}, h.createElement(r, { container: u }, h.createElement(i, {
|
|
388
|
+
"cmdk-overlay": "",
|
|
389
|
+
className: c
|
|
390
|
+
}), h.createElement(a, {
|
|
391
|
+
"aria-label": e.label,
|
|
392
|
+
"cmdk-dialog": "",
|
|
393
|
+
className: l
|
|
394
|
+
}, h.createElement(G, {
|
|
395
|
+
ref: t,
|
|
396
|
+
...d
|
|
397
|
+
}))));
|
|
398
|
+
}), le = h.forwardRef((e, t) => Z((e) => e.filtered.count === 0) ? h.createElement(P.div, {
|
|
399
|
+
ref: t,
|
|
400
|
+
...e,
|
|
401
|
+
"cmdk-empty": "",
|
|
402
|
+
role: "presentation"
|
|
403
|
+
}) : null), ue = h.forwardRef((e, t) => {
|
|
404
|
+
let { progress: n, children: r, label: i = "Loading...", ...a } = e;
|
|
405
|
+
return h.createElement(P.div, {
|
|
406
|
+
ref: t,
|
|
407
|
+
...a,
|
|
408
|
+
"cmdk-loading": "",
|
|
409
|
+
role: "progressbar",
|
|
410
|
+
"aria-valuenow": n,
|
|
411
|
+
"aria-valuemin": 0,
|
|
412
|
+
"aria-valuemax": 100,
|
|
413
|
+
"aria-label": i
|
|
414
|
+
}, Q(e, (e) => h.createElement("div", { "aria-hidden": !0 }, e)));
|
|
415
|
+
}), q = Object.assign(G, {
|
|
416
|
+
List: se,
|
|
417
|
+
Item: K,
|
|
418
|
+
Input: oe,
|
|
419
|
+
Group: ie,
|
|
420
|
+
Separator: ae,
|
|
421
|
+
Dialog: ce,
|
|
422
|
+
Empty: le,
|
|
423
|
+
Loading: ue
|
|
424
|
+
});
|
|
425
|
+
function de(e, t) {
|
|
426
|
+
let n = e.nextElementSibling;
|
|
427
|
+
for (; n;) {
|
|
428
|
+
if (n.matches(t)) return n;
|
|
429
|
+
n = n.nextElementSibling;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function fe(e, t) {
|
|
433
|
+
let n = e.previousElementSibling;
|
|
434
|
+
for (; n;) {
|
|
435
|
+
if (n.matches(t)) return n;
|
|
436
|
+
n = n.previousElementSibling;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function J(e) {
|
|
440
|
+
let t = h.useRef(e);
|
|
441
|
+
return Y(() => {
|
|
442
|
+
t.current = e;
|
|
443
|
+
}), t;
|
|
444
|
+
}
|
|
445
|
+
var Y = typeof window > "u" ? h.useEffect : h.useLayoutEffect;
|
|
446
|
+
function X(e) {
|
|
447
|
+
let t = h.useRef();
|
|
448
|
+
return t.current === void 0 && (t.current = e()), t;
|
|
449
|
+
}
|
|
450
|
+
function Z(e) {
|
|
451
|
+
let t = U(), n = () => e(t.snapshot());
|
|
452
|
+
return h.useSyncExternalStore(t.subscribe, n, n);
|
|
453
|
+
}
|
|
454
|
+
function pe(e, t, n, r = []) {
|
|
455
|
+
let i = h.useRef(), a = V();
|
|
456
|
+
return Y(() => {
|
|
457
|
+
var o;
|
|
458
|
+
let s = (() => {
|
|
459
|
+
for (let e of n) {
|
|
460
|
+
if (typeof e == "string") return e.trim();
|
|
461
|
+
if (typeof e == "object" && "current" in e) return e.current ? e.current.textContent?.trim() : i.current;
|
|
462
|
+
}
|
|
463
|
+
})(), c = r.map((e) => e.trim());
|
|
464
|
+
a.value(e, s, c), (o = t.current) == null || o.setAttribute(z, s), i.current = s;
|
|
465
|
+
}), i;
|
|
466
|
+
}
|
|
467
|
+
var me = () => {
|
|
468
|
+
let [e, t] = h.useState(), n = X(() => /* @__PURE__ */ new Map());
|
|
469
|
+
return Y(() => {
|
|
470
|
+
n.current.forEach((e) => e()), n.current = /* @__PURE__ */ new Map();
|
|
471
|
+
}, [e]), (e, r) => {
|
|
472
|
+
n.current.set(e, r), t({});
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
function he(e) {
|
|
476
|
+
let t = e.type;
|
|
477
|
+
return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
|
|
478
|
+
}
|
|
479
|
+
function Q({ asChild: e, children: t }, n) {
|
|
480
|
+
return e && h.isValidElement(t) ? h.cloneElement(he(t), { ref: t.ref }, n(t.props.children)) : n(t);
|
|
481
|
+
}
|
|
482
|
+
var ge = {
|
|
483
|
+
position: "absolute",
|
|
484
|
+
width: "1px",
|
|
485
|
+
height: "1px",
|
|
486
|
+
padding: "0",
|
|
487
|
+
margin: "-1px",
|
|
488
|
+
overflow: "hidden",
|
|
489
|
+
clip: "rect(0, 0, 0, 0)",
|
|
490
|
+
whiteSpace: "nowrap",
|
|
491
|
+
borderWidth: "0"
|
|
492
|
+
};
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/command.tsx
|
|
495
|
+
function $({ className: t, ...n }) {
|
|
496
|
+
return /* @__PURE__ */ g(q, {
|
|
497
|
+
"data-slot": "command",
|
|
498
|
+
className: e("bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1", t),
|
|
499
|
+
...n
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
function _e({ title: t = "Command Palette", description: n = "Search for a command to run...", children: r, className: i, showCloseButton: a = !1, ...o }) {
|
|
503
|
+
return /* @__PURE__ */ _(c, {
|
|
504
|
+
...o,
|
|
505
|
+
children: [/* @__PURE__ */ _(d, {
|
|
506
|
+
className: "sr-only",
|
|
507
|
+
children: [/* @__PURE__ */ g(f, { children: t }), /* @__PURE__ */ g(u, { children: n })]
|
|
508
|
+
}), /* @__PURE__ */ g(l, {
|
|
509
|
+
className: e("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl", i),
|
|
510
|
+
showCloseButton: a,
|
|
511
|
+
children: /* @__PURE__ */ g($, {
|
|
512
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",
|
|
513
|
+
children: r
|
|
514
|
+
})
|
|
515
|
+
})]
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function ve({ className: t, ...n }) {
|
|
519
|
+
return /* @__PURE__ */ g("div", {
|
|
520
|
+
"data-slot": "command-input-wrapper",
|
|
521
|
+
className: "p-1 pb-0",
|
|
522
|
+
children: /* @__PURE__ */ _(p, {
|
|
523
|
+
className: "border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!",
|
|
524
|
+
children: [/* @__PURE__ */ g(q.Input, {
|
|
525
|
+
"data-slot": "command-input",
|
|
526
|
+
className: e("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
527
|
+
...n
|
|
528
|
+
}), /* @__PURE__ */ g(m, { children: /* @__PURE__ */ g(y, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
529
|
+
})
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function ye({ className: t, ...n }) {
|
|
533
|
+
return /* @__PURE__ */ g(q.List, {
|
|
534
|
+
"data-slot": "command-list",
|
|
535
|
+
className: e("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", t),
|
|
536
|
+
...n
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
function be({ className: t, ...n }) {
|
|
540
|
+
return /* @__PURE__ */ g(q.Empty, {
|
|
541
|
+
"data-slot": "command-empty",
|
|
542
|
+
className: e("py-6 text-center text-sm", t),
|
|
543
|
+
...n
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
function xe({ className: t, ...n }) {
|
|
547
|
+
return /* @__PURE__ */ g(q.Group, {
|
|
548
|
+
"data-slot": "command-group",
|
|
549
|
+
className: e("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium", t),
|
|
550
|
+
...n
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
function Se({ className: t, ...n }) {
|
|
554
|
+
return /* @__PURE__ */ g(q.Separator, {
|
|
555
|
+
"data-slot": "command-separator",
|
|
556
|
+
className: e("bg-border -mx-1 h-px", t),
|
|
557
|
+
...n
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function Ce({ className: t, children: n, ...r }) {
|
|
561
|
+
return /* @__PURE__ */ _(q.Item, {
|
|
562
|
+
"data-slot": "command-item",
|
|
563
|
+
className: e("group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4", t),
|
|
564
|
+
...r,
|
|
565
|
+
children: [n, /* @__PURE__ */ g(v, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function we({ className: t, ...n }) {
|
|
569
|
+
return /* @__PURE__ */ g("span", {
|
|
570
|
+
"data-slot": "command-shortcut",
|
|
571
|
+
className: e("text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest", t),
|
|
572
|
+
...n
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
//#endregion
|
|
576
|
+
export { ve as a, Se as c, xe as i, we as l, _e as n, Ce as o, be as r, ye as s, $ as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./chunk-mLOUI7ql.js"),t=require("./utils-ChMUqofy.js"),n=require("./dist-DR0lXVFG.js"),r=require("./dist-Byhx2fDJ.js"),i=require("./dist-Da7BU5sd.js"),a=require("./dist-BPX1UGAz2.js"),o=require("./dialog.cjs"),s=require("./input-group.cjs");let c=require("react"),l=e.r(c,1);c=e.r(c);let u=require("react-dom");u=e.r(u,1);let d=require("react/jsx-runtime"),f=require("lucide-react");var p=1,m=.9,h=.8,g=.17,_=.1,v=.999,y=.9999,b=.99,x=/[\\\/_+.#"@\[\(\{&]/,S=/[\\\/_+.#"@\[\(\{&]/g,C=/[\s-]/,w=/[\s-]/g;function T(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?p:b;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,E,D;l>=0;)d=T(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=p:x.test(e.charAt(l-1))?(d*=h,E=e.slice(i,l-1).match(S),E&&i>0&&(d*=v**+E.length)):C.test(e.charAt(l-1))?(d*=m,D=e.slice(i,l-1).match(w),D&&i>0&&(d*=v**+D.length)):(d*=g,i>0&&(d*=v**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=y)),(d<_&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=T(e,t,n,r,l+1,a+2,o),f*_>d&&(d=f*_)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function E(e){return e.toLowerCase().replace(w,` `)}function D(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,T(e,t,E(e),E(t),0,0,{})}var O=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=a.n(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),k=`[cmdk-group=""]`,A=`[cmdk-group-items=""]`,ee=`[cmdk-group-heading=""]`,te=`[cmdk-item=""]`,j=`${te}:not([aria-disabled="true"])`,M=`cmdk-item-select`,N=`data-value`,ne=(e,t,n)=>D(e,t,n),P=l.createContext(void 0),F=()=>l.useContext(P),I=l.createContext(void 0),L=()=>l.useContext(I),R=l.createContext(void 0),z=l.forwardRef((e,t)=>{let n=Z(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),i=Z(()=>new Set),a=Z(()=>new Map),o=Z(()=>new Map),s=Z(()=>new Set),c=Y(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=r.t(),x=r.t(),S=r.t(),C=l.useRef(null),w=oe();X(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,T.emit()}},[f]),X(()=>{w(6,z)},[]);let T=l.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)R(),F(),w(1,L);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(S);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(w(7,()=>{n.current.selectedItemId=B()?.id,T.emit()}),r||w(5,z),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),E=l.useMemo(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),w(2,()=>{F(),T.emit()}))},item:(e,t)=>(i.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),w(3,()=>{R(),F(),n.current.value||L(),T.emit()}),()=>{o.current.delete(e),i.current.delete(e),n.current.filtered.items.delete(e);let t=B();w(4,()=>{R(),t?.getAttribute(`id`)===e&&L(),T.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:u||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let r=c.current?.filter??ne;return e?r(e,n.current.search,t):0}function F(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=C.current;V().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(A);t?t.appendChild(e.parentElement===t?e:e.closest(`${A} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${A} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${k}[${N}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function L(){let e=V().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(N);T.setState(`value`,e||void 0)}function R(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of i.current){let r=D(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function z(){var e;let t=B();t&&(t.parentElement?.firstChild===t&&((e=t.closest(k)?.querySelector(ee))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function B(){return C.current?.querySelector(`${te}[aria-selected="true"]`)}function V(){return Array.from(C.current?.querySelectorAll(j)||[])}function H(e){let t=V()[e];t&&T.setState(`value`,t.getAttribute(N))}function U(e){var t;let n=B(),r=V(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&T.setState(`value`,a.getAttribute(N))}function W(e){let t=B()?.closest(k),n;for(;t&&!n;)t=e>0?re(t,k):ie(t,k),n=t?.querySelector(j);n?T.setState(`value`,n.getAttribute(N)):U(e)}let G=()=>H(V().length-1),K=e=>{e.preventDefault(),e.metaKey?G():e.altKey?W(1):U(1)},q=e=>{e.preventDefault(),e.metaKey?H(0):e.altKey?W(-1):U(-1)};return l.createElement(O.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&K(e);break;case`ArrowDown`:K(e);break;case`p`:case`k`:v&&e.ctrlKey&&q(e);break;case`ArrowUp`:q(e);break;case`Home`:e.preventDefault(),H(0);break;case`End`:e.preventDefault(),G();break;case`Enter`:{e.preventDefault();let t=B();if(t){let e=new Event(M);t.dispatchEvent(e)}}}}},l.createElement(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:ce},u),$(e,e=>l.createElement(I.Provider,{value:T},l.createElement(P.Provider,{value:E},e))))}),B=l.forwardRef((e,t)=>{let i=r.t(),a=l.useRef(null),o=l.useContext(R),s=F(),c=Y(e),u=c.current?.forceMount??o?.forceMount;X(()=>{if(!u)return s.item(i,o?.id)},[u]);let d=ae(i,a,[e.value,e.children,a],e.keywords),f=L(),p=Q(e=>e.value&&e.value===d.current),m=Q(e=>u||s.filter()===!1?!0:e.search?e.filtered.items.get(i)>0:!0);l.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(M,h),()=>t.removeEventListener(M,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=c.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:x,...S}=e;return l.createElement(O.div,{ref:n.i(a,t),...S,id:i,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||s.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),V=l.forwardRef((e,t)=>{let{heading:i,children:a,forceMount:o,...s}=e,c=r.t(),u=l.useRef(null),d=l.useRef(null),f=r.t(),p=F(),m=Q(e=>o||p.filter()===!1?!0:e.search?e.filtered.groups.has(c):!0);X(()=>p.group(c),[]),ae(c,u,[e.value,e.heading,d]);let h=l.useMemo(()=>({id:c,forceMount:o}),[o]);return l.createElement(O.div,{ref:n.i(u,t),...s,"cmdk-group":``,role:`presentation`,hidden:m?void 0:!0},i&&l.createElement(`div`,{ref:d,"cmdk-group-heading":``,"aria-hidden":!0,id:f},i),$(e,e=>l.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":i?f:void 0},l.createElement(R.Provider,{value:h},e))))}),H=l.forwardRef((e,t)=>{let{alwaysRender:r,...i}=e,a=l.useRef(null),o=Q(e=>!e.search);return!r&&!o?null:l.createElement(O.div,{ref:n.i(a,t),...i,"cmdk-separator":``,role:`separator`})}),U=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=L(),o=Q(e=>e.search),s=Q(e=>e.selectedItemId),c=F();return l.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),l.createElement(O.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),W=l.forwardRef((e,t)=>{let{children:r,label:i=`Suggestions`,...a}=e,o=l.useRef(null),s=l.useRef(null),c=Q(e=>e.selectedItemId),u=F();return l.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),l.createElement(O.div,{ref:n.i(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":i,id:u.listId},$(e,e=>l.createElement(`div`,{ref:n.i(s,u.listInnerRef),"cmdk-list-sizer":``},e)))}),G=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:s,...c}=e;return l.createElement(i.o,{open:n,onOpenChange:r},l.createElement(i.a,{container:s},l.createElement(i.i,{"cmdk-overlay":``,className:a}),l.createElement(i.n,{"aria-label":e.label,"cmdk-dialog":``,className:o},l.createElement(z,{ref:t,...c}))))}),K=l.forwardRef((e,t)=>Q(e=>e.filtered.count===0)?l.createElement(O.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),q=l.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return l.createElement(O.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$(e,e=>l.createElement(`div`,{"aria-hidden":!0},e)))}),J=Object.assign(z,{List:W,Item:B,Input:U,Group:V,Separator:H,Dialog:G,Empty:K,Loading:q});function re(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ie(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Y(e){let t=l.useRef(e);return X(()=>{t.current=e}),t}var X=typeof window>`u`?l.useEffect:l.useLayoutEffect;function Z(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Q(e){let t=L(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ae(e,t,n,r=[]){let i=l.useRef(),a=F();return X(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(N,s),i.current=s}),i}var oe=()=>{let[e,t]=l.useState(),n=Z(()=>new Map);return X(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function se(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function $({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(se(t),{ref:t.ref},n(t.props.children)):n(t)}var ce={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function le({className:e,...n}){return(0,d.jsx)(J,{"data-slot":`command`,className:t.t(`bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1`,e),...n})}function ue({title:e=`Command Palette`,description:n=`Search for a command to run...`,children:r,className:i,showCloseButton:a=!1,...s}){return(0,d.jsxs)(o.Dialog,{...s,children:[(0,d.jsxs)(o.DialogHeader,{className:`sr-only`,children:[(0,d.jsx)(o.DialogTitle,{children:e}),(0,d.jsx)(o.DialogDescription,{children:n})]}),(0,d.jsx)(o.DialogContent,{className:t.t(`top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl`,i),showCloseButton:a,children:(0,d.jsx)(le,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5`,children:r})})]})}function de({className:e,...n}){return(0,d.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,d.jsxs)(s.InputGroup,{className:`border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!`,children:[(0,d.jsx)(J.Input,{"data-slot":`command-input`,className:t.t(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...n}),(0,d.jsx)(s.InputGroupAddon,{children:(0,d.jsx)(f.SearchIcon,{className:`size-4 shrink-0 opacity-50`})})]})})}function fe({className:e,...n}){return(0,d.jsx)(J.List,{"data-slot":`command-list`,className:t.t(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...n})}function pe({className:e,...n}){return(0,d.jsx)(J.Empty,{"data-slot":`command-empty`,className:t.t(`py-6 text-center text-sm`,e),...n})}function me({className:e,...n}){return(0,d.jsx)(J.Group,{"data-slot":`command-group`,className:t.t(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,e),...n})}function he({className:e,...n}){return(0,d.jsx)(J.Separator,{"data-slot":`command-separator`,className:t.t(`bg-border -mx-1 h-px`,e),...n})}function ge({className:e,children:n,...r}){return(0,d.jsxs)(J.Item,{"data-slot":`command-item`,className:t.t(`group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4`,e),...r,children:[n,(0,d.jsx)(f.CheckIcon,{className:`ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}function _e({className:e,...n}){return(0,d.jsx)(`span`,{"data-slot":`command-shortcut`,className:t.t(`text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest`,e),...n})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return le}});
|
package/dist/command.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./command-DCrPL1iW.js");exports.Command=e.t,exports.CommandDialog=e.n,exports.CommandEmpty=e.r,exports.CommandGroup=e.i,exports.CommandInput=e.a,exports.CommandItem=e.o,exports.CommandList=e.s,exports.CommandSeparator=e.c,exports.CommandShortcut=e.l;
|