@constructive-io/ui 0.4.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -22
- package/dist/button-D4vqTxhp.d.cts +20 -0
- package/dist/button-D4vqTxhp.d.ts +20 -0
- package/dist/components/alert-dialog.cjs +129 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +33 -0
- package/dist/components/alert-dialog.d.ts +23 -21
- package/dist/components/alert-dialog.js +98 -296
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +62 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +19 -0
- package/dist/components/alert.d.ts +18 -13
- package/dist/components/alert.js +49 -31
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +81 -0
- package/dist/components/app-bar.cjs.map +1 -0
- package/dist/components/app-bar.d.cts +27 -0
- package/dist/components/app-bar.d.ts +27 -0
- package/dist/components/app-bar.js +77 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-shell.cjs +267 -0
- package/dist/components/app-shell.cjs.map +1 -0
- package/dist/components/app-shell.d.cts +98 -0
- package/dist/components/app-shell.d.ts +98 -0
- package/dist/components/app-shell.js +264 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/autocomplete.cjs +167 -0
- package/dist/components/autocomplete.cjs.map +1 -0
- package/dist/components/autocomplete.d.cts +28 -0
- package/dist/components/autocomplete.d.ts +24 -24
- package/dist/components/autocomplete.js +146 -397
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +39 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +13 -0
- package/dist/components/avatar.d.ts +11 -11
- package/dist/components/avatar.js +24 -27
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +48 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +15 -0
- package/dist/components/badge.d.ts +13 -13
- package/dist/components/badge.js +39 -38
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +89 -0
- package/dist/components/breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb.d.cts +15 -0
- package/dist/components/breadcrumb.d.ts +14 -13
- package/dist/components/breadcrumb.js +63 -137
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +75 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +2 -0
- package/dist/components/button.d.ts +2 -17
- package/dist/components/button.js +66 -57
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +72 -0
- package/dist/components/calendar-rac.cjs.map +1 -0
- package/dist/components/calendar-rac.d.cts +13 -0
- package/dist/components/calendar-rac.d.ts +8 -8
- package/dist/components/calendar-rac.js +49 -61
- package/dist/components/calendar-rac.js.map +1 -1
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +17 -0
- package/dist/components/card.d.ts +15 -17
- package/dist/components/card.js +58 -57
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +19 -0
- package/dist/components/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group.d.cts +7 -0
- package/dist/components/checkbox-group.d.ts +5 -5
- package/dist/components/checkbox-group.js +12 -10
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.cjs +67 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +8 -0
- package/dist/components/checkbox.d.ts +6 -6
- package/dist/components/checkbox.js +58 -61
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +90 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +45 -0
- package/dist/components/collapsible.d.ts +19 -28
- package/dist/components/collapsible.js +74 -112
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +257 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.d.cts +44 -0
- package/dist/components/combobox.d.ts +36 -36
- package/dist/components/combobox.js +229 -515
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +139 -0
- package/dist/components/command.cjs.map +1 -0
- package/dist/components/command.d.cts +24 -0
- package/dist/components/command.d.ts +22 -22
- package/dist/components/command.js +109 -240
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +139 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +31 -0
- package/dist/components/dialog.d.ts +27 -31
- package/dist/components/dialog.js +112 -429
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +90 -0
- package/dist/components/dock.cjs.map +1 -0
- package/dist/components/dock.d.cts +30 -0
- package/dist/components/dock.d.ts +25 -26
- package/dist/components/dock.js +78 -104
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +115 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +16 -0
- package/dist/components/drawer.d.ts +15 -15
- package/dist/components/drawer.js +77 -121
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +217 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +53 -0
- package/dist/components/dropdown-menu.d.ts +49 -46
- package/dist/components/dropdown-menu.js +177 -357
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +72 -0
- package/dist/components/empty.cjs.map +1 -0
- package/dist/components/empty.d.cts +15 -0
- package/dist/components/empty.d.ts +15 -0
- package/dist/components/empty.js +64 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.cjs +186 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +46 -0
- package/dist/components/field.d.ts +44 -49
- package/dist/components/field.js +166 -108
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +153 -0
- package/dist/components/flickering-grid.cjs.map +1 -0
- package/dist/components/flickering-grid.d.cts +16 -0
- package/dist/components/flickering-grid.d.ts +14 -13
- package/dist/components/flickering-grid.js +144 -141
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +62 -0
- package/dist/components/flow-zoom-panel.cjs.map +1 -0
- package/dist/components/flow-zoom-panel.d.cts +12 -0
- package/dist/components/flow-zoom-panel.d.ts +12 -0
- package/dist/components/flow-zoom-panel.js +61 -0
- package/dist/components/flow-zoom-panel.js.map +1 -0
- package/dist/components/form-control.cjs +65 -0
- package/dist/components/form-control.cjs.map +1 -0
- package/dist/components/form-control.d.cts +15 -0
- package/dist/components/form-control.d.ts +11 -11
- package/dist/components/form-control.js +56 -167
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +102 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +2 -0
- package/dist/components/form.d.ts +2 -37
- package/dist/components/form.js +76 -163
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +70 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +16 -0
- package/dist/components/input-group.d.ts +14 -16
- package/dist/components/input-group.js +51 -163
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +37 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +2 -0
- package/dist/components/input.d.ts +2 -11
- package/dist/components/input.js +30 -54
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +147 -0
- package/dist/components/json-input.cjs.map +1 -0
- package/dist/components/json-input.d.cts +26 -0
- package/dist/components/json-input.d.ts +20 -19
- package/dist/components/json-input.js +132 -340
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +27 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +11 -0
- package/dist/components/label.d.ts +6 -6
- package/dist/components/label.js +17 -20
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +68 -0
- package/dist/components/motion-grid.cjs.map +1 -0
- package/dist/components/motion-grid.d.cts +20 -0
- package/dist/components/motion-grid.d.ts +15 -15
- package/dist/components/motion-grid.js +59 -75
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +573 -0
- package/dist/components/multi-select.cjs.map +1 -0
- package/dist/components/multi-select.d.cts +198 -0
- package/dist/components/multi-select.d.ts +173 -173
- package/dist/components/multi-select.js +562 -874
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +30 -0
- package/dist/components/page-header.cjs.map +1 -0
- package/dist/components/page-header.d.cts +17 -0
- package/dist/components/page-header.d.ts +11 -11
- package/dist/components/page-header.js +23 -11
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.cjs +95 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.d.cts +17 -0
- package/dist/components/pagination.d.ts +15 -17
- package/dist/components/pagination.js +70 -128
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +97 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +40 -0
- package/dist/components/popover.d.ts +33 -28
- package/dist/components/popover.js +78 -178
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +156 -0
- package/dist/components/portal.cjs.map +1 -0
- package/dist/components/portal.d.cts +118 -0
- package/dist/components/portal.d.ts +33 -23
- package/dist/components/portal.js +128 -57
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +30 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +10 -0
- package/dist/components/progress.d.ts +8 -8
- package/dist/components/progress.js +21 -24
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +76 -0
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.cts +25 -0
- package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
- package/dist/components/progressive-blur-scroll-container.js +70 -137
- package/dist/components/progressive-blur-scroll-container.js.map +1 -1
- package/dist/components/progressive-blur.cjs +46 -0
- package/dist/components/progressive-blur.cjs.map +1 -0
- package/dist/components/progressive-blur.d.cts +17 -0
- package/dist/components/progressive-blur.d.ts +15 -14
- package/dist/components/progressive-blur.js +38 -63
- package/dist/components/progressive-blur.js.map +1 -1
- package/dist/components/radio-group.cjs +38 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +10 -0
- package/dist/components/radio-group.d.ts +8 -8
- package/dist/components/radio-group.js +28 -30
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +8 -0
- package/dist/components/record-picker.d.cts +16 -0
- package/dist/components/record-picker.d.ts +13 -13
- package/dist/components/record-picker.js +5 -364
- package/dist/components/resizable.cjs +50 -0
- package/dist/components/resizable.cjs.map +1 -0
- package/dist/components/resizable.d.cts +11 -0
- package/dist/components/resizable.d.ts +10 -10
- package/dist/components/resizable.js +29 -37
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +56 -0
- package/dist/components/responsive-diagram.cjs.map +1 -0
- package/dist/components/responsive-diagram.d.cts +10 -0
- package/dist/components/responsive-diagram.d.ts +7 -7
- package/dist/components/responsive-diagram.js +50 -60
- package/dist/components/responsive-diagram.js.map +1 -1
- package/dist/components/scroll-area.cjs +46 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +12 -0
- package/dist/components/scroll-area.d.ts +11 -11
- package/dist/components/scroll-area.js +35 -62
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +204 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +47 -0
- package/dist/components/select.d.ts +38 -38
- package/dist/components/select.js +172 -269
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +23 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +2 -0
- package/dist/components/separator.d.ts +2 -11
- package/dist/components/separator.js +14 -18
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +19 -0
- package/dist/components/sheet.d.cts +107 -0
- package/dist/components/sheet.d.ts +85 -90
- package/dist/components/sheet.js +3 -598
- package/dist/components/sidebar.cjs +29 -0
- package/dist/components/sidebar.d.cts +67 -0
- package/dist/components/sidebar.d.ts +63 -73
- package/dist/components/sidebar.js +3 -1215
- package/dist/components/skeleton.cjs +24 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +11 -0
- package/dist/components/skeleton.d.ts +10 -6
- package/dist/components/skeleton.js +15 -10
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +23 -0
- package/dist/components/sonner.cjs.map +1 -0
- package/dist/components/sonner.d.cts +10 -0
- package/dist/components/sonner.d.ts +7 -7
- package/dist/components/sonner.js +17 -18
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/stack/index.cjs +44 -0
- package/dist/components/stack/index.d.cts +2 -0
- package/dist/components/stack/index.d.ts +2 -674
- package/dist/components/stack/index.js +3 -1444
- package/dist/components/stepper.cjs +160 -0
- package/dist/components/stepper.cjs.map +1 -0
- package/dist/components/stepper.d.cts +32 -0
- package/dist/components/stepper.d.ts +27 -25
- package/dist/components/stepper.js +133 -261
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +35 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +8 -0
- package/dist/components/switch.d.ts +7 -7
- package/dist/components/switch.js +26 -34
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +85 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.d.cts +23 -0
- package/dist/components/table.d.ts +23 -15
- package/dist/components/table.js +56 -46
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +49 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +10 -0
- package/dist/components/tabs.d.ts +9 -9
- package/dist/components/tabs.js +31 -36
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +132 -0
- package/dist/components/tags.cjs.map +1 -0
- package/dist/components/tags.d.cts +36 -0
- package/dist/components/tags.d.ts +24 -28
- package/dist/components/tags.js +114 -438
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +34 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +10 -0
- package/dist/components/textarea.d.ts +8 -8
- package/dist/components/textarea.js +27 -48
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +9 -0
- package/dist/components/toast/index.d.cts +2 -0
- package/dist/components/toast/index.d.ts +2 -52
- package/dist/components/toast/index.js +3 -623
- package/dist/components/tooltip.cjs +67 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +2 -0
- package/dist/components/tooltip.d.ts +2 -29
- package/dist/components/tooltip.js +53 -166
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +24 -0
- package/dist/components/unlink-button.cjs.map +1 -0
- package/dist/components/unlink-button.d.cts +14 -0
- package/dist/components/unlink-button.d.ts +11 -11
- package/dist/components/unlink-button.js +18 -86
- package/dist/components/unlink-button.js.map +1 -1
- package/dist/form-DgRTv7O7.d.ts +54 -0
- package/dist/form-DoZEWSzb.d.cts +54 -0
- package/dist/index-CjA4CENl.d.cts +684 -0
- package/dist/index-CjA4CENl.d.ts +684 -0
- package/dist/index-UnM04j0t.d.cts +58 -0
- package/dist/index-UnM04j0t.d.ts +58 -0
- package/dist/index.cjs +408 -9346
- package/dist/index.d.cts +224 -2548
- package/dist/index.d.ts +224 -2548
- package/dist/index.js +65 -9022
- package/dist/input-CBrCuMH8.d.cts +11 -0
- package/dist/input-CBrCuMH8.d.ts +11 -0
- package/dist/motion-config-COCFHq1L.cjs +271 -0
- package/dist/motion-config-COCFHq1L.cjs.map +1 -0
- package/dist/motion-config-COsZ6azM.js +241 -0
- package/dist/motion-config-COsZ6azM.js.map +1 -0
- package/dist/record-picker-BbxngCeV.js +162 -0
- package/dist/record-picker-BbxngCeV.js.map +1 -0
- package/dist/record-picker-Bz4FApxD.cjs +167 -0
- package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
- package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
- package/dist/separator-BQEsr0Rc.d.cts +11 -0
- package/dist/separator-BQEsr0Rc.d.ts +11 -0
- package/dist/sheet-BLHnhLRH.js +425 -0
- package/dist/sheet-BLHnhLRH.js.map +1 -0
- package/dist/sheet-BdA0rfIz.cjs +515 -0
- package/dist/sheet-BdA0rfIz.cjs.map +1 -0
- package/dist/sidebar-CPy_fibW.cjs +608 -0
- package/dist/sidebar-CPy_fibW.cjs.map +1 -0
- package/dist/sidebar-Cfax0g0_.js +463 -0
- package/dist/sidebar-Cfax0g0_.js.map +1 -0
- package/dist/slot-C-jEfihz.cjs +122 -0
- package/dist/slot-C-jEfihz.cjs.map +1 -0
- package/dist/slot-EL8zfLG0.js +97 -0
- package/dist/slot-EL8zfLG0.js.map +1 -0
- package/dist/stack-DKdvlOM6.cjs +1771 -0
- package/dist/stack-DKdvlOM6.cjs.map +1 -0
- package/dist/stack-jMdxDrex.js +1531 -0
- package/dist/stack-jMdxDrex.js.map +1 -0
- package/dist/toast-D6MqijT2.cjs +316 -0
- package/dist/toast-D6MqijT2.cjs.map +1 -0
- package/dist/toast-D_BOLzm3.js +287 -0
- package/dist/toast-D_BOLzm3.js.map +1 -0
- package/dist/tooltip-CTRQoN1A.d.cts +29 -0
- package/dist/tooltip-CTRQoN1A.d.ts +29 -0
- package/dist/utils-BkMLyah9.js +12 -0
- package/dist/utils-BkMLyah9.js.map +1 -0
- package/dist/utils-CzTQ3-VI.cjs +17 -0
- package/dist/utils-CzTQ3-VI.cjs.map +1 -0
- package/package.json +288 -47
- package/src/styles/globals.css +155 -203
- package/dist/components/org-chart/index.d.ts +0 -54
- package/dist/components/org-chart/index.js +0 -861
- package/dist/components/org-chart/index.js.map +0 -1
- package/dist/components/record-picker.js.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,380 +1,200 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React2 from 'react';
|
|
3
|
-
import { Menu } from '@base-ui/react/menu';
|
|
4
|
-
import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
import { clsx } from 'clsx';
|
|
7
|
-
import { twMerge } from 'tailwind-merge';
|
|
1
|
+
'use client';
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React2.useLayoutEffect(() => {
|
|
19
|
-
const el = document.getElementById(PORTAL_ROOT_ID);
|
|
20
|
-
setContainer(el);
|
|
21
|
-
}, []);
|
|
22
|
-
return container;
|
|
23
|
-
}
|
|
24
|
-
function useFloatingOverlayPortalProps() {
|
|
25
|
-
const rootContainer = useRootPortalContainer();
|
|
26
|
-
const { floatingPortalStrategy, floatingZIndex } = React2.useContext(PortalContext);
|
|
27
|
-
const container = floatingPortalStrategy === "nested" ? void 0 : rootContainer ?? null;
|
|
28
|
-
const zIndexClass = floatingZIndex === "elevated" ? "z-[var(--z-layer-floating-elevated)]" : "z-[var(--z-layer-floating)]";
|
|
29
|
-
return { container, zIndexClass };
|
|
30
|
-
}
|
|
31
|
-
function composeRefs(...refs) {
|
|
32
|
-
return (node) => {
|
|
33
|
-
refs.forEach((ref) => {
|
|
34
|
-
if (typeof ref === "function") {
|
|
35
|
-
ref(node);
|
|
36
|
-
} else if (ref != null) {
|
|
37
|
-
ref.current = node;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function mergeProps(slotProps, childProps) {
|
|
43
|
-
const overrideProps = { ...childProps };
|
|
44
|
-
for (const propName in childProps) {
|
|
45
|
-
if (propName === "ref") continue;
|
|
46
|
-
const slotPropValue = slotProps[propName];
|
|
47
|
-
const childPropValue = childProps[propName];
|
|
48
|
-
if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
|
|
49
|
-
overrideProps[propName] = (...args) => {
|
|
50
|
-
childPropValue(...args);
|
|
51
|
-
slotPropValue(...args);
|
|
52
|
-
};
|
|
53
|
-
} else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
|
|
54
|
-
overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
|
|
55
|
-
} else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
|
|
56
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return { ...slotProps, ...overrideProps };
|
|
60
|
-
}
|
|
61
|
-
function mergePropsWithRef(parentProps, childElement) {
|
|
62
|
-
const childProps = childElement.props;
|
|
63
|
-
const parentRef = parentProps.ref;
|
|
64
|
-
const childRef = childProps.ref;
|
|
65
|
-
const mergedProps = mergeProps(parentProps, childProps);
|
|
66
|
-
if (parentRef || childRef) {
|
|
67
|
-
mergedProps.ref = composeRefs(parentRef, childRef);
|
|
68
|
-
}
|
|
69
|
-
return mergedProps;
|
|
70
|
-
}
|
|
71
|
-
function isSlottable(child) {
|
|
72
|
-
return React2.isValidElement(child);
|
|
73
|
-
}
|
|
74
|
-
var Slot = React2.forwardRef((props, forwardedRef) => {
|
|
75
|
-
const { children, ...slotProps } = props;
|
|
76
|
-
if (isSlottable(children)) {
|
|
77
|
-
const childProps = children.props;
|
|
78
|
-
const childRef = childProps.ref;
|
|
79
|
-
return React2.cloneElement(children, {
|
|
80
|
-
...mergeProps(slotProps, childProps),
|
|
81
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
if (React2.Children.count(children) > 1) {
|
|
85
|
-
const childrenArray = React2.Children.toArray(children);
|
|
86
|
-
const slottableChild = childrenArray.find(
|
|
87
|
-
(child) => React2.isValidElement(child) && child.type === Slottable
|
|
88
|
-
);
|
|
89
|
-
if (slottableChild) {
|
|
90
|
-
const newElement = slottableChild.props.children;
|
|
91
|
-
if (isSlottable(newElement)) {
|
|
92
|
-
const newElementProps = newElement.props;
|
|
93
|
-
const newChildren = childrenArray.map((child) => {
|
|
94
|
-
if (child === slottableChild) {
|
|
95
|
-
return React2.Children.count(newElementProps.children) > 1 ? React2.Children.only(null) : newElementProps.children;
|
|
96
|
-
}
|
|
97
|
-
return child;
|
|
98
|
-
});
|
|
99
|
-
const childRef = newElementProps.ref;
|
|
100
|
-
return React2.cloneElement(newElement, {
|
|
101
|
-
...mergeProps(slotProps, newElementProps),
|
|
102
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
|
|
103
|
-
children: newChildren
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
109
|
-
});
|
|
110
|
-
Slot.displayName = "Slot";
|
|
111
|
-
function Slottable({ children }) {
|
|
112
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
113
|
-
}
|
|
114
|
-
function cn(...inputs) {
|
|
115
|
-
return twMerge(clsx(inputs));
|
|
116
|
-
}
|
|
3
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
7
|
+
import { useFloatingOverlayPortalProps } from "@constructive-io/ui/portal";
|
|
8
|
+
import { Menu } from "@base-ui/react/menu";
|
|
9
|
+
|
|
10
|
+
//#region src/components/dropdown-menu.tsx
|
|
11
|
+
const DropdownMenuGroupContext = React$1.createContext(false);
|
|
117
12
|
function DropdownMenu({ ...props }) {
|
|
118
|
-
|
|
13
|
+
return /* @__PURE__ */ jsx(Menu.Root, {
|
|
14
|
+
"data-slot": "dropdown-menu",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
119
17
|
}
|
|
120
18
|
function DropdownMenuPortal({ ...props }) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Menu.Popup,
|
|
158
|
-
{
|
|
159
|
-
"data-slot": "dropdown-menu-content",
|
|
160
|
-
className: cn(
|
|
161
|
-
`bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out
|
|
162
|
-
data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95
|
|
163
|
-
data-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
|
|
164
|
-
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-40 overflow-hidden
|
|
165
|
-
rounded-md border p-1 shadow-lg`,
|
|
166
|
-
className
|
|
167
|
-
),
|
|
168
|
-
...props
|
|
169
|
-
}
|
|
170
|
-
) }) });
|
|
19
|
+
const { container } = useFloatingOverlayPortalProps();
|
|
20
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
21
|
+
"data-slot": "dropdown-menu-portal",
|
|
22
|
+
container,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }) {
|
|
27
|
+
const childRender = render === void 0 && asChild && React$1.isValidElement(children) ? children : void 0;
|
|
28
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
29
|
+
"data-slot": "dropdown-menu-trigger",
|
|
30
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
31
|
+
render: render ?? childRender,
|
|
32
|
+
...props,
|
|
33
|
+
children: childRender ? void 0 : children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuContent({ className, sideOffset = 4, side = "bottom", align = "start", onPointerDown: _onPointerDown, onPointerDownOutside: _onPointerDownOutside, onCloseAutoFocus: _onCloseAutoFocus, forceMount: _forceMount, ...props }) {
|
|
37
|
+
const { zIndexClass } = useFloatingOverlayPortalProps();
|
|
38
|
+
return /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
39
|
+
side,
|
|
40
|
+
align,
|
|
41
|
+
sideOffset,
|
|
42
|
+
className: zIndexClass,
|
|
43
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
44
|
+
"data-slot": "dropdown-menu-content",
|
|
45
|
+
className: cn(`bg-popover text-popover-foreground origin-(--transform-origin) min-w-40 overflow-hidden rounded-md border p-1
|
|
46
|
+
shadow-lg transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
47
|
+
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
48
|
+
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
49
|
+
data-[side=left]:data-starting-style:translate-x-2
|
|
50
|
+
data-[side=right]:data-starting-style:-translate-x-2
|
|
51
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
52
|
+
...props
|
|
53
|
+
})
|
|
54
|
+
}) });
|
|
171
55
|
}
|
|
172
56
|
function DropdownMenuGroup({ ...props }) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const itemClassName = cn(
|
|
185
|
-
`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive
|
|
57
|
+
return /* @__PURE__ */ jsx(DropdownMenuGroupContext.Provider, {
|
|
58
|
+
value: true,
|
|
59
|
+
children: /* @__PURE__ */ jsx(Menu.Group, {
|
|
60
|
+
"data-slot": "dropdown-menu-group",
|
|
61
|
+
...props
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function DropdownMenuItem({ className, inset, variant = "default", asChild, children, render, ...props }) {
|
|
66
|
+
const childRender = render === void 0 && asChild && React$1.isValidElement(children) ? children : void 0;
|
|
67
|
+
const itemClassName = cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive
|
|
186
68
|
data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40
|
|
187
69
|
data-[variant=destructive]:data-[highlighted]:text-destructive
|
|
188
|
-
data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2
|
|
70
|
+
data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11
|
|
189
71
|
rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
|
|
190
|
-
data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
{
|
|
219
|
-
"data-slot": "dropdown-menu-item",
|
|
220
|
-
"data-inset": inset,
|
|
221
|
-
"data-variant": variant,
|
|
222
|
-
...props,
|
|
223
|
-
render: (itemProps) => {
|
|
224
|
-
const itemOnClick = itemProps.onClick;
|
|
225
|
-
return /* @__PURE__ */ jsx(
|
|
226
|
-
"div",
|
|
227
|
-
{
|
|
228
|
-
...itemProps,
|
|
229
|
-
className: cn(itemClassName, itemProps.className),
|
|
230
|
-
onClick: (e) => {
|
|
231
|
-
onClick?.(e);
|
|
232
|
-
itemOnClick?.(e);
|
|
233
|
-
},
|
|
234
|
-
children
|
|
235
|
-
}
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
function DropdownMenuCheckboxItem({
|
|
242
|
-
className,
|
|
243
|
-
children,
|
|
244
|
-
checked,
|
|
245
|
-
...props
|
|
246
|
-
}) {
|
|
247
|
-
return /* @__PURE__ */ jsxs(
|
|
248
|
-
Menu.CheckboxItem,
|
|
249
|
-
{
|
|
250
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
251
|
-
className: cn(
|
|
252
|
-
`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
253
|
-
pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
254
|
-
[&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
255
|
-
className
|
|
256
|
-
),
|
|
257
|
-
checked,
|
|
258
|
-
...props,
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: 16 }) }) }),
|
|
261
|
-
children
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
);
|
|
72
|
+
data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`, className);
|
|
73
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
74
|
+
"data-slot": "dropdown-menu-item",
|
|
75
|
+
"data-inset": inset,
|
|
76
|
+
"data-variant": variant,
|
|
77
|
+
className: itemClassName,
|
|
78
|
+
render: render ?? childRender,
|
|
79
|
+
...props,
|
|
80
|
+
children: childRender ? void 0 : children
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
85
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
86
|
+
className: cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
87
|
+
pr-2 pl-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
88
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
|
|
89
|
+
checked,
|
|
90
|
+
...props,
|
|
91
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
93
|
+
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
|
|
94
|
+
keepMounted: true,
|
|
95
|
+
className: "transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none",
|
|
96
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { size: 16 })
|
|
97
|
+
})
|
|
98
|
+
}), children]
|
|
99
|
+
});
|
|
265
100
|
}
|
|
266
101
|
function DropdownMenuRadioGroup({ ...props }) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
);
|
|
102
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
103
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
109
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
110
|
+
className: cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
111
|
+
pr-2 pl-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
112
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
|
|
113
|
+
...props,
|
|
114
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
115
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
116
|
+
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
|
|
117
|
+
keepMounted: true,
|
|
118
|
+
className: "transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none",
|
|
119
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" })
|
|
120
|
+
})
|
|
121
|
+
}), children]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Uses Base UI's semantic GroupLabel inside DropdownMenuGroup. The standalone
|
|
126
|
+
* div fallback preserves compatibility with earlier Constructive menu markup,
|
|
127
|
+
* where labels were allowed directly inside DropdownMenuContent.
|
|
128
|
+
*/
|
|
129
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
130
|
+
const isGrouped = React$1.useContext(DropdownMenuGroupContext);
|
|
131
|
+
const labelProps = {
|
|
132
|
+
"data-slot": "dropdown-menu-label",
|
|
133
|
+
"data-inset": inset,
|
|
134
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8", className),
|
|
135
|
+
...props
|
|
136
|
+
};
|
|
137
|
+
if (isGrouped) return /* @__PURE__ */ jsx(Menu.GroupLabel, { ...labelProps });
|
|
138
|
+
return /* @__PURE__ */ jsx("div", { ...labelProps });
|
|
306
139
|
}
|
|
307
140
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
...props
|
|
314
|
-
}
|
|
315
|
-
);
|
|
141
|
+
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
142
|
+
"data-slot": "dropdown-menu-separator",
|
|
143
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
144
|
+
...props
|
|
145
|
+
});
|
|
316
146
|
}
|
|
317
147
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
px-1 font-[inherit] text-[0.625rem] font-medium`,
|
|
325
|
-
className
|
|
326
|
-
),
|
|
327
|
-
...props
|
|
328
|
-
}
|
|
329
|
-
);
|
|
148
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
149
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
150
|
+
className: cn(`bg-background text-muted-foreground/70 ms-auto -me-1 inline-flex h-5 max-h-full items-center rounded border
|
|
151
|
+
px-1 font-[inherit] text-[0.625rem] font-medium`, className),
|
|
152
|
+
...props
|
|
153
|
+
});
|
|
330
154
|
}
|
|
331
155
|
function DropdownMenuSub({ ...props }) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
),
|
|
351
|
-
...props,
|
|
352
|
-
children: [
|
|
353
|
-
children,
|
|
354
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { size: 16, className: "text-muted-foreground/80 ml-auto" })
|
|
355
|
-
]
|
|
356
|
-
}
|
|
357
|
-
);
|
|
156
|
+
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
|
|
157
|
+
"data-slot": "dropdown-menu-sub",
|
|
158
|
+
...props
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
162
|
+
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
163
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
164
|
+
"data-inset": inset,
|
|
165
|
+
className: cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent
|
|
166
|
+
data-[popup-open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm pointer-coarse:min-h-11
|
|
167
|
+
outline-hidden select-none data-[inset]:pl-8`, className),
|
|
168
|
+
...props,
|
|
169
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
170
|
+
size: 16,
|
|
171
|
+
className: "text-muted-foreground/80 ml-auto"
|
|
172
|
+
})]
|
|
173
|
+
});
|
|
358
174
|
}
|
|
359
175
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
176
|
+
const { container, zIndexClass } = useFloatingOverlayPortalProps();
|
|
177
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
178
|
+
container,
|
|
179
|
+
children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
180
|
+
side: "right",
|
|
181
|
+
sideOffset: -4,
|
|
182
|
+
className: zIndexClass,
|
|
183
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
184
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
185
|
+
className: cn(`bg-popover text-popover-foreground origin-(--transform-origin) min-w-40 overflow-hidden rounded-md border p-1
|
|
186
|
+
shadow-lg transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
187
|
+
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
188
|
+
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
189
|
+
data-[side=left]:data-starting-style:translate-x-2
|
|
190
|
+
data-[side=right]:data-starting-style:-translate-x-2
|
|
191
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
192
|
+
...props
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
});
|
|
376
196
|
}
|
|
377
197
|
|
|
198
|
+
//#endregion
|
|
378
199
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
379
|
-
//# sourceMappingURL=dropdown-menu.js.map
|
|
380
200
|
//# sourceMappingURL=dropdown-menu.js.map
|