@constructive-io/ui 0.6.0 → 0.8.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/button-D4vqTxhp.d.cts +20 -0
- package/dist/button-D4vqTxhp.d.ts +20 -0
- package/dist/components/alert-dialog.cjs +98 -302
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.d.cts +22 -21
- package/dist/components/alert-dialog.d.ts +22 -21
- package/dist/components/alert-dialog.js +96 -281
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +51 -108
- package/dist/components/alert.cjs.map +1 -1
- package/dist/components/alert.d.cts +13 -13
- package/dist/components/alert.d.ts +13 -13
- package/dist/components/alert.js +49 -87
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +73 -359
- package/dist/components/app-bar.cjs.map +1 -1
- package/dist/components/app-bar.d.cts +21 -20
- package/dist/components/app-bar.d.ts +21 -20
- package/dist/components/app-bar.js +71 -338
- package/dist/components/app-bar.js.map +1 -1
- package/dist/components/app-shell.cjs +252 -1777
- package/dist/components/app-shell.cjs.map +1 -1
- package/dist/components/app-shell.d.cts +77 -85
- package/dist/components/app-shell.d.ts +77 -85
- package/dist/components/app-shell.js +249 -1756
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/autocomplete.cjs +146 -397
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.d.cts +24 -24
- package/dist/components/autocomplete.d.ts +24 -24
- package/dist/components/autocomplete.js +146 -376
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +26 -38
- package/dist/components/avatar.cjs.map +1 -1
- package/dist/components/avatar.d.cts +11 -10
- package/dist/components/avatar.d.ts +11 -10
- package/dist/components/avatar.js +24 -37
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +42 -60
- package/dist/components/badge.cjs.map +1 -1
- package/dist/components/badge.d.cts +13 -13
- 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 +65 -94
- package/dist/components/breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb.d.cts +14 -13
- package/dist/components/breadcrumb.d.ts +14 -13
- package/dist/components/breadcrumb.js +63 -73
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +68 -162
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +2 -20
- package/dist/components/button.d.ts +2 -20
- package/dist/components/button.js +65 -140
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +49 -62
- package/dist/components/calendar-rac.cjs.map +1 -1
- package/dist/components/calendar-rac.d.cts +8 -8
- 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 +61 -74
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.d.cts +15 -16
- package/dist/components/card.d.ts +15 -16
- package/dist/components/card.js +58 -72
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +12 -11
- package/dist/components/checkbox-group.cjs.map +1 -1
- package/dist/components/checkbox-group.d.cts +5 -5
- 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 +60 -114
- package/dist/components/checkbox.cjs.map +1 -1
- package/dist/components/checkbox.d.cts +6 -6
- package/dist/components/checkbox.d.ts +6 -6
- package/dist/components/checkbox.js +58 -93
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +76 -113
- package/dist/components/collapsible.cjs.map +1 -1
- package/dist/components/collapsible.d.cts +16 -15
- package/dist/components/collapsible.d.ts +16 -15
- package/dist/components/collapsible.js +74 -92
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +213 -507
- package/dist/components/combobox.cjs.map +1 -1
- package/dist/components/combobox.d.cts +36 -35
- package/dist/components/combobox.d.ts +36 -35
- package/dist/components/combobox.js +229 -504
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +102 -199
- package/dist/components/command.cjs.map +1 -1
- package/dist/components/command.d.cts +22 -21
- package/dist/components/command.d.ts +22 -21
- package/dist/components/command.js +100 -198
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +110 -402
- package/dist/components/dialog.cjs.map +1 -1
- package/dist/components/dialog.d.cts +27 -26
- package/dist/components/dialog.d.ts +27 -26
- package/dist/components/dialog.js +107 -380
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +80 -111
- package/dist/components/dock.cjs.map +1 -1
- package/dist/components/dock.d.cts +25 -25
- package/dist/components/dock.d.ts +25 -25
- package/dist/components/dock.js +78 -106
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +77 -111
- package/dist/components/drawer.cjs.map +1 -1
- package/dist/components/drawer.d.cts +15 -14
- package/dist/components/drawer.d.ts +15 -14
- package/dist/components/drawer.js +75 -90
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +163 -238
- package/dist/components/dropdown-menu.cjs.map +1 -1
- package/dist/components/dropdown-menu.d.cts +44 -43
- package/dist/components/dropdown-menu.d.ts +44 -43
- package/dist/components/dropdown-menu.js +161 -217
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +51 -85
- package/dist/components/empty.cjs.map +1 -1
- package/dist/components/empty.d.cts +13 -13
- package/dist/components/empty.d.ts +13 -13
- package/dist/components/empty.js +48 -83
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.cjs +150 -259
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.d.cts +39 -39
- package/dist/components/field.d.ts +39 -39
- package/dist/components/field.js +148 -238
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +143 -166
- package/dist/components/flickering-grid.cjs.map +1 -1
- package/dist/components/flickering-grid.d.cts +14 -13
- package/dist/components/flickering-grid.d.ts +14 -13
- package/dist/components/flickering-grid.js +141 -161
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +56 -188
- package/dist/components/flow-zoom-panel.cjs.map +1 -1
- package/dist/components/flow-zoom-panel.d.cts +9 -9
- package/dist/components/flow-zoom-panel.d.ts +9 -9
- package/dist/components/flow-zoom-panel.js +56 -168
- package/dist/components/flow-zoom-panel.js.map +1 -1
- package/dist/components/form-control.cjs +58 -186
- package/dist/components/form-control.cjs.map +1 -1
- package/dist/components/form-control.d.cts +11 -10
- package/dist/components/form-control.d.ts +11 -10
- package/dist/components/form-control.js +56 -165
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +78 -184
- package/dist/components/form.cjs.map +1 -1
- package/dist/components/form.d.cts +2 -36
- package/dist/components/form.d.ts +2 -36
- package/dist/components/form.js +76 -163
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +51 -165
- package/dist/components/input-group.cjs.map +1 -1
- package/dist/components/input-group.d.cts +14 -15
- package/dist/components/input-group.d.ts +14 -15
- package/dist/components/input-group.js +51 -164
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +30 -55
- package/dist/components/input.cjs.map +1 -1
- package/dist/components/input.d.cts +2 -10
- package/dist/components/input.d.ts +2 -10
- package/dist/components/input.js +30 -54
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +133 -337
- package/dist/components/json-input.cjs.map +1 -1
- package/dist/components/json-input.d.cts +20 -19
- package/dist/components/json-input.d.ts +20 -19
- package/dist/components/json-input.js +132 -317
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +19 -21
- package/dist/components/label.cjs.map +1 -1
- package/dist/components/label.d.cts +6 -5
- package/dist/components/label.d.ts +6 -5
- package/dist/components/label.js +17 -20
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +61 -101
- package/dist/components/motion-grid.cjs.map +1 -1
- package/dist/components/motion-grid.d.cts +15 -14
- package/dist/components/motion-grid.d.ts +15 -14
- package/dist/components/motion-grid.js +59 -80
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +563 -786
- package/dist/components/multi-select.cjs.map +1 -1
- package/dist/components/multi-select.d.cts +173 -173
- package/dist/components/multi-select.d.ts +173 -173
- package/dist/components/multi-select.js +561 -765
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +24 -13
- package/dist/components/page-header.cjs.map +1 -1
- package/dist/components/page-header.d.cts +11 -11
- 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 +72 -272
- package/dist/components/pagination.cjs.map +1 -1
- package/dist/components/pagination.d.cts +15 -16
- package/dist/components/pagination.d.ts +15 -16
- package/dist/components/pagination.js +69 -250
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +68 -111
- package/dist/components/popover.cjs.map +1 -1
- package/dist/components/popover.d.cts +31 -30
- package/dist/components/popover.d.ts +31 -30
- package/dist/components/popover.js +66 -90
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +128 -81
- package/dist/components/portal.cjs.map +1 -1
- package/dist/components/portal.d.cts +24 -23
- package/dist/components/portal.d.ts +24 -23
- package/dist/components/portal.js +126 -60
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +23 -24
- package/dist/components/progress.cjs.map +1 -1
- package/dist/components/progress.d.cts +8 -7
- package/dist/components/progress.d.ts +8 -7
- package/dist/components/progress.js +21 -23
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +70 -138
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
- package/dist/components/progressive-blur-scroll-container.d.cts +19 -19
- 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 +40 -64
- package/dist/components/progressive-blur.cjs.map +1 -1
- package/dist/components/progressive-blur.d.cts +15 -14
- 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 +28 -42
- package/dist/components/radio-group.cjs.map +1 -1
- package/dist/components/radio-group.d.cts +8 -8
- package/dist/components/radio-group.d.ts +8 -8
- package/dist/components/radio-group.js +28 -41
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +6 -418
- package/dist/components/record-picker.d.cts +13 -13
- package/dist/components/record-picker.d.ts +13 -13
- package/dist/components/record-picker.js +5 -397
- package/dist/components/resizable.cjs +32 -58
- package/dist/components/resizable.cjs.map +1 -1
- package/dist/components/resizable.d.cts +10 -9
- package/dist/components/resizable.d.ts +10 -9
- package/dist/components/resizable.js +29 -37
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +50 -61
- package/dist/components/responsive-diagram.cjs.map +1 -1
- package/dist/components/responsive-diagram.d.cts +7 -7
- 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 +37 -83
- package/dist/components/scroll-area.cjs.map +1 -1
- package/dist/components/scroll-area.d.cts +9 -8
- package/dist/components/scroll-area.d.ts +9 -8
- package/dist/components/scroll-area.js +35 -62
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +175 -300
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +36 -35
- package/dist/components/select.d.ts +36 -35
- package/dist/components/select.js +172 -278
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +16 -19
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +2 -10
- package/dist/components/separator.d.ts +2 -10
- package/dist/components/separator.js +14 -18
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +17 -487
- package/dist/components/sheet.d.cts +85 -85
- package/dist/components/sheet.d.ts +85 -85
- package/dist/components/sheet.js +3 -453
- package/dist/components/sidebar.cjs +27 -1298
- package/dist/components/sidebar.d.cts +62 -65
- package/dist/components/sidebar.d.ts +62 -65
- package/dist/components/sidebar.js +3 -1254
- package/dist/components/skeleton.cjs +18 -30
- package/dist/components/skeleton.cjs.map +1 -1
- package/dist/components/skeleton.d.cts +6 -5
- package/dist/components/skeleton.d.ts +6 -5
- package/dist/components/skeleton.js +15 -28
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +17 -19
- package/dist/components/sonner.cjs.map +1 -1
- package/dist/components/sonner.d.cts +7 -7
- 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 +43 -1515
- package/dist/components/stack/index.d.cts +2 -672
- package/dist/components/stack/index.d.ts +2 -672
- package/dist/components/stack/index.js +3 -1455
- package/dist/components/stepper.cjs +131 -285
- package/dist/components/stepper.cjs.map +1 -1
- package/dist/components/stepper.d.cts +27 -26
- package/dist/components/stepper.d.ts +27 -26
- package/dist/components/stepper.js +130 -265
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +21 -32
- package/dist/components/switch.cjs.map +1 -1
- package/dist/components/switch.d.cts +7 -6
- package/dist/components/switch.d.ts +7 -6
- package/dist/components/switch.js +19 -31
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +58 -106
- package/dist/components/table.cjs.map +1 -1
- package/dist/components/table.d.cts +17 -16
- package/dist/components/table.d.ts +17 -16
- package/dist/components/table.js +55 -104
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +31 -35
- package/dist/components/tabs.cjs.map +1 -1
- package/dist/components/tabs.d.cts +9 -8
- package/dist/components/tabs.d.ts +9 -8
- package/dist/components/tabs.js +29 -34
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +114 -433
- package/dist/components/tags.cjs.map +1 -1
- package/dist/components/tags.d.cts +24 -28
- package/dist/components/tags.d.ts +24 -28
- package/dist/components/tags.js +114 -413
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +27 -49
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.d.cts +8 -7
- package/dist/components/textarea.d.ts +8 -7
- package/dist/components/textarea.js +27 -48
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +9 -612
- package/dist/components/toast/index.d.cts +2 -52
- package/dist/components/toast/index.d.ts +2 -52
- package/dist/components/toast/index.js +3 -586
- package/dist/components/tooltip.cjs +47 -72
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +2 -28
- package/dist/components/tooltip.d.ts +2 -28
- package/dist/components/tooltip.js +45 -51
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +19 -192
- package/dist/components/unlink-button.cjs.map +1 -1
- package/dist/components/unlink-button.d.cts +11 -11
- package/dist/components/unlink-button.d.ts +11 -11
- package/dist/components/unlink-button.js +18 -170
- 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 -8697
- package/dist/index.d.cts +224 -2136
- package/dist/index.d.ts +224 -2136
- package/dist/index.js +65 -8350
- 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-BavjjJp0.cjs +625 -0
- package/dist/sidebar-BavjjJp0.cjs.map +1 -0
- package/dist/sidebar-DeoL2ttp.js +481 -0
- package/dist/sidebar-DeoL2ttp.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 +5 -5
- package/dist/components/record-picker.cjs.map +0 -1
- package/dist/components/record-picker.js.map +0 -1
- package/dist/components/sheet.cjs.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.cjs.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/stack/index.cjs.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/toast/index.cjs.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,52 +1,53 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Menu } from
|
|
3
|
-
|
|
4
|
-
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof Menu.Root>): React.JSX.Element;
|
|
5
|
-
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof Menu.Portal>): React.JSX.Element;
|
|
6
|
-
type DropdownMenuTriggerProps = React.ComponentProps<typeof Menu.Trigger> & {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Menu } from "@base-ui/react/menu";
|
|
3
|
+
//#region src/components/dropdown-menu.d.ts
|
|
4
|
+
declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof Menu.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof Menu.Portal>): React$1.JSX.Element;
|
|
6
|
+
type DropdownMenuTriggerProps = React$1.ComponentProps<typeof Menu.Trigger> & {
|
|
7
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
8
|
+
asChild?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps): React.JSX.Element;
|
|
11
|
-
type DropdownMenuContentProps = React.ComponentProps<typeof Menu.Popup> & {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
declare function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps): React$1.JSX.Element;
|
|
11
|
+
type DropdownMenuContentProps = React$1.ComponentProps<typeof Menu.Popup> & {
|
|
12
|
+
sideOffset?: number;
|
|
13
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
14
|
+
align?: 'start' | 'center' | 'end';
|
|
15
|
+
/** @deprecated Not supported in Base UI */
|
|
16
|
+
onPointerDown?: (e: React$1.PointerEvent) => void;
|
|
17
|
+
/** @deprecated Not supported in Base UI */
|
|
18
|
+
onPointerDownOutside?: (e: Event) => void;
|
|
19
|
+
/** @deprecated Not supported in Base UI */
|
|
20
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
21
|
+
/** @deprecated Base UI menus mount on open automatically */
|
|
22
|
+
forceMount?: boolean;
|
|
23
23
|
};
|
|
24
|
-
declare function DropdownMenuContent({ className, sideOffset, side, align, onPointerDown: _onPointerDown, onPointerDownOutside: _onPointerDownOutside, onCloseAutoFocus: _onCloseAutoFocus, forceMount: _forceMount, ...props }: DropdownMenuContentProps): React.JSX.Element;
|
|
25
|
-
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof Menu.Group>): React.JSX.Element;
|
|
26
|
-
type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
declare function DropdownMenuContent({ className, sideOffset, side, align, onPointerDown: _onPointerDown, onPointerDownOutside: _onPointerDownOutside, onCloseAutoFocus: _onCloseAutoFocus, forceMount: _forceMount, ...props }: DropdownMenuContentProps): React$1.JSX.Element;
|
|
25
|
+
declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof Menu.Group>): React$1.JSX.Element;
|
|
26
|
+
type DropdownMenuItemProps = React$1.ComponentProps<typeof Menu.Item> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
variant?: 'default' | 'destructive';
|
|
29
|
+
/** When true, merges props onto the child element instead of rendering a div */
|
|
30
|
+
asChild?: boolean;
|
|
31
31
|
};
|
|
32
|
-
declare function DropdownMenuItem({ className, inset, variant, asChild, children, render, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
33
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof Menu.CheckboxItem>): React.JSX.Element;
|
|
34
|
-
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof Menu.RadioGroup>): React.JSX.Element;
|
|
35
|
-
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof Menu.RadioItem>): React.JSX.Element;
|
|
32
|
+
declare function DropdownMenuItem({ className, inset, variant, asChild, children, render, ...props }: DropdownMenuItemProps): React$1.JSX.Element;
|
|
33
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof Menu.CheckboxItem>): React$1.JSX.Element;
|
|
34
|
+
declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof Menu.RadioGroup>): React$1.JSX.Element;
|
|
35
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof Menu.RadioItem>): React$1.JSX.Element;
|
|
36
36
|
/**
|
|
37
37
|
* Uses Base UI's semantic GroupLabel inside DropdownMenuGroup. The standalone
|
|
38
38
|
* div fallback preserves compatibility with earlier Constructive menu markup,
|
|
39
39
|
* where labels were allowed directly inside DropdownMenuContent.
|
|
40
40
|
*/
|
|
41
|
-
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<'div'> & {
|
|
42
|
-
|
|
43
|
-
}): React.JSX.Element;
|
|
44
|
-
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof Menu.Separator>): React.JSX.Element;
|
|
45
|
-
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
46
|
-
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof Menu.SubmenuRoot>): React.JSX.Element;
|
|
47
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
48
|
-
|
|
49
|
-
}): React.JSX.Element;
|
|
50
|
-
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof Menu.Popup>): React.JSX.Element;
|
|
51
|
-
|
|
41
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<'div'> & {
|
|
42
|
+
inset?: boolean;
|
|
43
|
+
}): React$1.JSX.Element;
|
|
44
|
+
declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof Menu.Separator>): React$1.JSX.Element;
|
|
45
|
+
declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
|
|
46
|
+
declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof Menu.SubmenuRoot>): React$1.JSX.Element;
|
|
47
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
48
|
+
inset?: boolean;
|
|
49
|
+
}): React$1.JSX.Element;
|
|
50
|
+
declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof Menu.Popup>): React$1.JSX.Element;
|
|
51
|
+
//#endregion
|
|
52
52
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
53
|
+
//# sourceMappingURL=dropdown-menu.d.cts.map
|
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Menu } from
|
|
3
|
-
|
|
4
|
-
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof Menu.Root>): React.JSX.Element;
|
|
5
|
-
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof Menu.Portal>): React.JSX.Element;
|
|
6
|
-
type DropdownMenuTriggerProps = React.ComponentProps<typeof Menu.Trigger> & {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Menu } from "@base-ui/react/menu";
|
|
3
|
+
//#region src/components/dropdown-menu.d.ts
|
|
4
|
+
declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof Menu.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof Menu.Portal>): React$1.JSX.Element;
|
|
6
|
+
type DropdownMenuTriggerProps = React$1.ComponentProps<typeof Menu.Trigger> & {
|
|
7
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
8
|
+
asChild?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps): React.JSX.Element;
|
|
11
|
-
type DropdownMenuContentProps = React.ComponentProps<typeof Menu.Popup> & {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
declare function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps): React$1.JSX.Element;
|
|
11
|
+
type DropdownMenuContentProps = React$1.ComponentProps<typeof Menu.Popup> & {
|
|
12
|
+
sideOffset?: number;
|
|
13
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
14
|
+
align?: 'start' | 'center' | 'end';
|
|
15
|
+
/** @deprecated Not supported in Base UI */
|
|
16
|
+
onPointerDown?: (e: React$1.PointerEvent) => void;
|
|
17
|
+
/** @deprecated Not supported in Base UI */
|
|
18
|
+
onPointerDownOutside?: (e: Event) => void;
|
|
19
|
+
/** @deprecated Not supported in Base UI */
|
|
20
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
21
|
+
/** @deprecated Base UI menus mount on open automatically */
|
|
22
|
+
forceMount?: boolean;
|
|
23
23
|
};
|
|
24
|
-
declare function DropdownMenuContent({ className, sideOffset, side, align, onPointerDown: _onPointerDown, onPointerDownOutside: _onPointerDownOutside, onCloseAutoFocus: _onCloseAutoFocus, forceMount: _forceMount, ...props }: DropdownMenuContentProps): React.JSX.Element;
|
|
25
|
-
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof Menu.Group>): React.JSX.Element;
|
|
26
|
-
type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
declare function DropdownMenuContent({ className, sideOffset, side, align, onPointerDown: _onPointerDown, onPointerDownOutside: _onPointerDownOutside, onCloseAutoFocus: _onCloseAutoFocus, forceMount: _forceMount, ...props }: DropdownMenuContentProps): React$1.JSX.Element;
|
|
25
|
+
declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof Menu.Group>): React$1.JSX.Element;
|
|
26
|
+
type DropdownMenuItemProps = React$1.ComponentProps<typeof Menu.Item> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
variant?: 'default' | 'destructive';
|
|
29
|
+
/** When true, merges props onto the child element instead of rendering a div */
|
|
30
|
+
asChild?: boolean;
|
|
31
31
|
};
|
|
32
|
-
declare function DropdownMenuItem({ className, inset, variant, asChild, children, render, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
33
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof Menu.CheckboxItem>): React.JSX.Element;
|
|
34
|
-
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof Menu.RadioGroup>): React.JSX.Element;
|
|
35
|
-
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof Menu.RadioItem>): React.JSX.Element;
|
|
32
|
+
declare function DropdownMenuItem({ className, inset, variant, asChild, children, render, ...props }: DropdownMenuItemProps): React$1.JSX.Element;
|
|
33
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React$1.ComponentProps<typeof Menu.CheckboxItem>): React$1.JSX.Element;
|
|
34
|
+
declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof Menu.RadioGroup>): React$1.JSX.Element;
|
|
35
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React$1.ComponentProps<typeof Menu.RadioItem>): React$1.JSX.Element;
|
|
36
36
|
/**
|
|
37
37
|
* Uses Base UI's semantic GroupLabel inside DropdownMenuGroup. The standalone
|
|
38
38
|
* div fallback preserves compatibility with earlier Constructive menu markup,
|
|
39
39
|
* where labels were allowed directly inside DropdownMenuContent.
|
|
40
40
|
*/
|
|
41
|
-
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<'div'> & {
|
|
42
|
-
|
|
43
|
-
}): React.JSX.Element;
|
|
44
|
-
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof Menu.Separator>): React.JSX.Element;
|
|
45
|
-
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
46
|
-
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof Menu.SubmenuRoot>): React.JSX.Element;
|
|
47
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
48
|
-
|
|
49
|
-
}): React.JSX.Element;
|
|
50
|
-
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof Menu.Popup>): React.JSX.Element;
|
|
51
|
-
|
|
41
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<'div'> & {
|
|
42
|
+
inset?: boolean;
|
|
43
|
+
}): React$1.JSX.Element;
|
|
44
|
+
declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof Menu.Separator>): React$1.JSX.Element;
|
|
45
|
+
declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
|
|
46
|
+
declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof Menu.SubmenuRoot>): React$1.JSX.Element;
|
|
47
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof Menu.SubmenuTrigger> & {
|
|
48
|
+
inset?: boolean;
|
|
49
|
+
}): React$1.JSX.Element;
|
|
50
|
+
declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof Menu.Popup>): React$1.JSX.Element;
|
|
51
|
+
//#endregion
|
|
52
52
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
53
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -1,256 +1,200 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Menu } from '@base-ui/react/menu';
|
|
4
|
-
import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
|
-
import { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';
|
|
6
|
-
import { clsx } from 'clsx';
|
|
7
|
-
import { twMerge } from 'tailwind-merge';
|
|
8
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
'use client';
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
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);
|
|
14
12
|
function DropdownMenu({ ...props }) {
|
|
15
|
-
|
|
13
|
+
return /* @__PURE__ */ jsx(Menu.Root, {
|
|
14
|
+
"data-slot": "dropdown-menu",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
16
17
|
}
|
|
17
18
|
function DropdownMenuPortal({ ...props }) {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const { container } = useFloatingOverlayPortalProps();
|
|
20
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
21
|
+
"data-slot": "dropdown-menu-portal",
|
|
22
|
+
container,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
26
|
function DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
onCloseAutoFocus: _onCloseAutoFocus,
|
|
42
|
-
forceMount: _forceMount,
|
|
43
|
-
...props
|
|
44
|
-
}) {
|
|
45
|
-
const { zIndexClass } = useFloatingOverlayPortalProps();
|
|
46
|
-
return /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { side, align, sideOffset, className: zIndexClass, children: /* @__PURE__ */ jsx(
|
|
47
|
-
Menu.Popup,
|
|
48
|
-
{
|
|
49
|
-
"data-slot": "dropdown-menu-content",
|
|
50
|
-
className: cn(
|
|
51
|
-
`bg-popover text-popover-foreground origin-(--transform-origin) min-w-40 overflow-hidden rounded-md border p-1
|
|
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
|
|
52
46
|
shadow-lg transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
53
47
|
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
54
48
|
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
55
49
|
data-[side=left]:data-starting-style:translate-x-2
|
|
56
50
|
data-[side=right]:data-starting-style:-translate-x-2
|
|
57
|
-
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
) }) });
|
|
51
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
52
|
+
...props
|
|
53
|
+
})
|
|
54
|
+
}) });
|
|
63
55
|
}
|
|
64
56
|
function DropdownMenuGroup({ ...props }) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const childRender = render === void 0 && asChild && React.isValidElement(children) ? children : void 0;
|
|
77
|
-
const itemClassName = cn(
|
|
78
|
-
`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
|
|
79
68
|
data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40
|
|
80
69
|
data-[variant=destructive]:data-[highlighted]:text-destructive
|
|
81
70
|
data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11
|
|
82
71
|
rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
|
|
83
|
-
data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
function DropdownMenuCheckboxItem({
|
|
100
|
-
className,
|
|
101
|
-
children,
|
|
102
|
-
checked,
|
|
103
|
-
...props
|
|
104
|
-
}) {
|
|
105
|
-
return /* @__PURE__ */ jsxs(
|
|
106
|
-
Menu.CheckboxItem,
|
|
107
|
-
{
|
|
108
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
109
|
-
className: cn(
|
|
110
|
-
`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
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
|
|
111
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
|
|
112
|
-
[&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
) }),
|
|
126
|
-
children
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
);
|
|
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
|
+
});
|
|
130
100
|
}
|
|
131
101
|
function DropdownMenuRadioGroup({ ...props }) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
{
|
|
142
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
143
|
-
className: cn(
|
|
144
|
-
`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
|
|
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
|
|
145
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
|
|
146
|
-
[&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
className: cn("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8", className),
|
|
174
|
-
...props
|
|
175
|
-
};
|
|
176
|
-
if (isGrouped) {
|
|
177
|
-
return /* @__PURE__ */ jsx(Menu.GroupLabel, { ...labelProps });
|
|
178
|
-
}
|
|
179
|
-
return /* @__PURE__ */ jsx("div", { ...labelProps });
|
|
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 });
|
|
180
139
|
}
|
|
181
140
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
...props
|
|
188
|
-
}
|
|
189
|
-
);
|
|
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
|
+
});
|
|
190
146
|
}
|
|
191
147
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
px-1 font-[inherit] text-[0.625rem] font-medium`,
|
|
199
|
-
className
|
|
200
|
-
),
|
|
201
|
-
...props
|
|
202
|
-
}
|
|
203
|
-
);
|
|
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
|
+
});
|
|
204
154
|
}
|
|
205
155
|
function DropdownMenuSub({ ...props }) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
{
|
|
217
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
218
|
-
"data-inset": inset,
|
|
219
|
-
className: cn(
|
|
220
|
-
`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent
|
|
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
|
|
221
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
|
|
222
|
-
outline-hidden select-none data-[inset]:pl-8`,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
]
|
|
230
|
-
}
|
|
231
|
-
);
|
|
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
|
+
});
|
|
232
174
|
}
|
|
233
175
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
|
241
186
|
shadow-lg transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
242
187
|
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
243
188
|
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
244
189
|
data-[side=left]:data-starting-style:translate-x-2
|
|
245
190
|
data-[side=right]:data-starting-style:-translate-x-2
|
|
246
|
-
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
) }) });
|
|
191
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
192
|
+
...props
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
});
|
|
252
196
|
}
|
|
253
197
|
|
|
198
|
+
//#endregion
|
|
254
199
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
255
|
-
//# sourceMappingURL=dropdown-menu.js.map
|
|
256
200
|
//# sourceMappingURL=dropdown-menu.js.map
|