@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
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
const require_rolldown_runtime = require('./rolldown-runtime-D_qnwXdH.cjs');
|
|
3
|
+
const require_utils = require('./utils-CzTQ3-VI.cjs');
|
|
4
|
+
const require_motion_config = require('./motion-config-COCFHq1L.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let class_variance_authority = require("class-variance-authority");
|
|
9
|
+
let lucide_react = require("lucide-react");
|
|
10
|
+
let _constructive_io_ui_portal = require("@constructive-io/ui/portal");
|
|
11
|
+
let _base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
12
|
+
let motion_react = require("motion/react");
|
|
13
|
+
|
|
14
|
+
//#region src/lib/use-controllable-state.ts
|
|
15
|
+
/**
|
|
16
|
+
* Hook for managing controlled/uncontrolled state.
|
|
17
|
+
* Supports both controlled (prop-driven) and uncontrolled (internal state) patterns.
|
|
18
|
+
*/
|
|
19
|
+
function useControllableState({ prop, defaultProp, onChange }) {
|
|
20
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, react.useState)(defaultProp);
|
|
21
|
+
const isControlled = prop !== void 0;
|
|
22
|
+
const value = isControlled ? prop : uncontrolledValue;
|
|
23
|
+
const onChangeRef = (0, react.useRef)(onChange);
|
|
24
|
+
(0, react.useEffect)(() => {
|
|
25
|
+
onChangeRef.current = onChange;
|
|
26
|
+
}, [onChange]);
|
|
27
|
+
return [value, (0, react.useCallback)((newValue) => {
|
|
28
|
+
if (!isControlled) setUncontrolledValue(newValue);
|
|
29
|
+
onChangeRef.current?.(newValue);
|
|
30
|
+
}, [isControlled])];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/sheet.tsx
|
|
35
|
+
const SheetStackContext = react.createContext(void 0);
|
|
36
|
+
const SHEET_INDENT = 24;
|
|
37
|
+
function SheetStackProvider({ children, stackMode = "cascade" }) {
|
|
38
|
+
const [sheets, setSheets] = react.useState([]);
|
|
39
|
+
const [sheetSizes, setSheetSizes] = react.useState({});
|
|
40
|
+
const registerSheet = react.useCallback((info) => {
|
|
41
|
+
setSheets((prev) => {
|
|
42
|
+
if (prev.some((s) => s.id === info.id)) return prev;
|
|
43
|
+
const newSheets = [...prev, info];
|
|
44
|
+
newSheets.sort((a, b) => a.depth - b.depth);
|
|
45
|
+
return newSheets;
|
|
46
|
+
});
|
|
47
|
+
}, []);
|
|
48
|
+
const unregisterSheet = react.useCallback((id) => {
|
|
49
|
+
setSheets((prev) => prev.filter((s) => s.id !== id));
|
|
50
|
+
setSheetSizes((prev) => {
|
|
51
|
+
if (!prev[id]) return prev;
|
|
52
|
+
const next = { ...prev };
|
|
53
|
+
delete next[id];
|
|
54
|
+
return next;
|
|
55
|
+
});
|
|
56
|
+
}, []);
|
|
57
|
+
const setSheetSize = react.useCallback((id, size) => {
|
|
58
|
+
setSheetSizes((prev) => {
|
|
59
|
+
const current = prev[id];
|
|
60
|
+
if (current && current.width === size.width && current.height === size.height) return prev;
|
|
61
|
+
return {
|
|
62
|
+
...prev,
|
|
63
|
+
[id]: size
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
const getSheetSize = react.useCallback((id) => sheetSizes[id], [sheetSizes]);
|
|
68
|
+
const isTopSheet = react.useCallback((id) => {
|
|
69
|
+
if (sheets.length === 0) return false;
|
|
70
|
+
return sheets[sheets.length - 1]?.id === id;
|
|
71
|
+
}, [sheets]);
|
|
72
|
+
const getSheetsAbove = react.useCallback((id) => {
|
|
73
|
+
const index = sheets.findIndex((s) => s.id === id);
|
|
74
|
+
if (index === -1) return 0;
|
|
75
|
+
return sheets.length - index - 1;
|
|
76
|
+
}, [sheets]);
|
|
77
|
+
const value = react.useMemo(() => ({
|
|
78
|
+
sheets,
|
|
79
|
+
sheetSizes,
|
|
80
|
+
stackMode,
|
|
81
|
+
registerSheet,
|
|
82
|
+
unregisterSheet,
|
|
83
|
+
setSheetSize,
|
|
84
|
+
getSheetSize,
|
|
85
|
+
isTopSheet,
|
|
86
|
+
getSheetsAbove
|
|
87
|
+
}), [
|
|
88
|
+
sheets,
|
|
89
|
+
sheetSizes,
|
|
90
|
+
stackMode,
|
|
91
|
+
registerSheet,
|
|
92
|
+
unregisterSheet,
|
|
93
|
+
setSheetSize,
|
|
94
|
+
getSheetSize,
|
|
95
|
+
isTopSheet,
|
|
96
|
+
getSheetsAbove
|
|
97
|
+
]);
|
|
98
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetStackContext.Provider, {
|
|
99
|
+
value,
|
|
100
|
+
children
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const useSheetStack = () => {
|
|
104
|
+
return react.useContext(SheetStackContext);
|
|
105
|
+
};
|
|
106
|
+
const SheetNestingContext = react.createContext({
|
|
107
|
+
level: 0,
|
|
108
|
+
parentSheetId: null
|
|
109
|
+
});
|
|
110
|
+
const useSheetNesting = () => react.useContext(SheetNestingContext);
|
|
111
|
+
const SheetContext = react.createContext(void 0);
|
|
112
|
+
const useSheet = () => {
|
|
113
|
+
const context = react.useContext(SheetContext);
|
|
114
|
+
if (!context) throw new Error("useSheet must be used within a Sheet");
|
|
115
|
+
return context;
|
|
116
|
+
};
|
|
117
|
+
function Sheet({ children, sheetId: providedId, open: openProp, defaultOpen = false, onOpenChange, modal, ...props }) {
|
|
118
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
119
|
+
prop: openProp,
|
|
120
|
+
defaultProp: defaultOpen,
|
|
121
|
+
onChange: onOpenChange
|
|
122
|
+
});
|
|
123
|
+
const sheetStack = useSheetStack();
|
|
124
|
+
const nesting = useSheetNesting();
|
|
125
|
+
const generatedId = react.useId();
|
|
126
|
+
const sheetId = providedId ?? `sheet-${generatedId.replace(/:/g, "")}`;
|
|
127
|
+
const depth = nesting.level;
|
|
128
|
+
const close = react.useCallback(() => {
|
|
129
|
+
setIsOpen(false);
|
|
130
|
+
}, [setIsOpen]);
|
|
131
|
+
const registerSheet = sheetStack?.registerSheet;
|
|
132
|
+
const unregisterSheet = sheetStack?.unregisterSheet;
|
|
133
|
+
react.useEffect(() => {
|
|
134
|
+
if (registerSheet && isOpen) {
|
|
135
|
+
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
136
|
+
registerSheet({
|
|
137
|
+
id: sheetId,
|
|
138
|
+
depth,
|
|
139
|
+
close
|
|
140
|
+
});
|
|
141
|
+
return () => unregisterSheet?.(sheetId);
|
|
142
|
+
}
|
|
143
|
+
}, [
|
|
144
|
+
isOpen,
|
|
145
|
+
sheetId,
|
|
146
|
+
depth,
|
|
147
|
+
close,
|
|
148
|
+
registerSheet,
|
|
149
|
+
unregisterSheet
|
|
150
|
+
]);
|
|
151
|
+
const handleOpenChange = react.useCallback((open, _eventDetails) => {
|
|
152
|
+
setIsOpen(open);
|
|
153
|
+
}, [setIsOpen]);
|
|
154
|
+
const sheetsAbove = sheetStack?.getSheetsAbove(sheetId) ?? 0;
|
|
155
|
+
const isTopSheet = sheetStack?.isTopSheet(sheetId) ?? true;
|
|
156
|
+
const isNested = depth > 0;
|
|
157
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetNestingContext.Provider, {
|
|
158
|
+
value: {
|
|
159
|
+
level: depth + 1,
|
|
160
|
+
parentSheetId: sheetId
|
|
161
|
+
},
|
|
162
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetContext.Provider, {
|
|
163
|
+
value: {
|
|
164
|
+
isOpen,
|
|
165
|
+
sheetId,
|
|
166
|
+
depth,
|
|
167
|
+
sheetsAbove,
|
|
168
|
+
isTopSheet,
|
|
169
|
+
close
|
|
170
|
+
},
|
|
171
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Root, {
|
|
172
|
+
"data-slot": "sheet",
|
|
173
|
+
...props,
|
|
174
|
+
open: isOpen,
|
|
175
|
+
modal: isNested ? false : modal,
|
|
176
|
+
onOpenChange: handleOpenChange,
|
|
177
|
+
children
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function SheetTrigger({ asChild, children, render, nativeButton, ...props }) {
|
|
183
|
+
const childRender = render === void 0 && asChild && react.isValidElement(children) ? children : void 0;
|
|
184
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Trigger, {
|
|
185
|
+
"data-slot": "sheet-trigger",
|
|
186
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
187
|
+
render: render ?? childRender,
|
|
188
|
+
...props,
|
|
189
|
+
children: childRender ? void 0 : children
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function SheetClose({ asChild, children, render, nativeButton, ...props }) {
|
|
193
|
+
const childRender = render === void 0 && asChild && react.isValidElement(children) ? children : void 0;
|
|
194
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Close, {
|
|
195
|
+
"data-slot": "sheet-close",
|
|
196
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
197
|
+
render: render ?? childRender,
|
|
198
|
+
...props,
|
|
199
|
+
children: childRender ? void 0 : children
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function SheetPortal({ forceMount: _forceMount, container: containerProp, ...props }) {
|
|
203
|
+
const rootContainer = (0, _constructive_io_ui_portal.useRootPortalContainer)();
|
|
204
|
+
const container = containerProp === void 0 ? rootContainer ?? void 0 : containerProp;
|
|
205
|
+
const style = {
|
|
206
|
+
...props.style ?? {},
|
|
207
|
+
["--z-layer-floating"]: "var(--z-layer-floating-elevated)"
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Portal, {
|
|
210
|
+
"data-slot": "sheet-portal",
|
|
211
|
+
container,
|
|
212
|
+
...props,
|
|
213
|
+
style
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function SheetOverlay({ className, asChild: _asChild, forceMount: _forceMount, ...props }) {
|
|
217
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, {
|
|
218
|
+
"data-slot": "sheet-overlay",
|
|
219
|
+
className: require_utils.cn("fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80", className),
|
|
220
|
+
...props
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const sheetVariants = (0, class_variance_authority.cva)("fixed flex flex-col gap-3 bg-background p-4 shadow-lg", {
|
|
224
|
+
variants: { side: {
|
|
225
|
+
top: "inset-x-0 top-0 border-b",
|
|
226
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
227
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
228
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
|
|
229
|
+
} },
|
|
230
|
+
defaultVariants: { side: "right" }
|
|
231
|
+
});
|
|
232
|
+
const NESTED_SHEET_WIDTH = 448;
|
|
233
|
+
const SHEET_STACK_GAP = 0;
|
|
234
|
+
/**
|
|
235
|
+
* Calculate the push offset based on side, number of sheets above, and stack mode.
|
|
236
|
+
* - 'cascade': Each sheet is incrementally indented by SHEET_INDENT per layer above
|
|
237
|
+
* - 'collapse': Bottom sheets are pushed to opposite side to make room for top sheet
|
|
238
|
+
*/
|
|
239
|
+
function getPushOffset(side, sheetsAbove, stackMode = "cascade", collapseBaseSize = NESTED_SHEET_WIDTH) {
|
|
240
|
+
if (sheetsAbove === 0) return {
|
|
241
|
+
x: 0,
|
|
242
|
+
y: 0
|
|
243
|
+
};
|
|
244
|
+
if (stackMode === "collapse") {
|
|
245
|
+
const offset = collapseBaseSize + SHEET_STACK_GAP + (sheetsAbove - 1) * 24;
|
|
246
|
+
switch (side) {
|
|
247
|
+
case "right": return { x: -offset };
|
|
248
|
+
case "left": return { x: offset };
|
|
249
|
+
case "top": return { y: offset };
|
|
250
|
+
case "bottom": return { y: -offset };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
const offset = sheetsAbove * 24;
|
|
254
|
+
switch (side) {
|
|
255
|
+
case "right": return { x: -offset };
|
|
256
|
+
case "left": return { x: offset };
|
|
257
|
+
case "top": return { y: offset };
|
|
258
|
+
case "bottom": return { y: -offset };
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Get the initial position for sheet animation based on side.
|
|
263
|
+
* Pure transform animation for GPU acceleration - no opacity/scale changes.
|
|
264
|
+
*/
|
|
265
|
+
function getInitialPosition(side) {
|
|
266
|
+
switch (side) {
|
|
267
|
+
case "right": return { x: "100%" };
|
|
268
|
+
case "left": return { x: "-100%" };
|
|
269
|
+
case "top": return { y: "-100%" };
|
|
270
|
+
case "bottom": return { y: "100%" };
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Get the exit position for sheet animation based on side.
|
|
275
|
+
* Pure transform for smooth GPU-accelerated exit.
|
|
276
|
+
*/
|
|
277
|
+
function getExitPosition(side) {
|
|
278
|
+
switch (side) {
|
|
279
|
+
case "right": return { x: "100%" };
|
|
280
|
+
case "left": return { x: "-100%" };
|
|
281
|
+
case "top": return { y: "-100%" };
|
|
282
|
+
case "bottom": return { y: "100%" };
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const defaultSheetTransition = {
|
|
286
|
+
type: "tween",
|
|
287
|
+
duration: require_motion_config.durations.normal,
|
|
288
|
+
ease: [
|
|
289
|
+
.32,
|
|
290
|
+
.72,
|
|
291
|
+
0,
|
|
292
|
+
1
|
|
293
|
+
]
|
|
294
|
+
};
|
|
295
|
+
function SheetContent({ side = "right", className, transition = defaultSheetTransition, overlay = true, showClose = true, children, forceMount: _forceMount, onInteractOutside: _onInteractOutside, onPointerDownOutside: _onPointerDownOutside, onEscapeKeyDown: _onEscapeKeyDown, onFocusOutside: _onFocusOutside, ...props }) {
|
|
296
|
+
const { isOpen, depth, sheetId } = useSheet();
|
|
297
|
+
const sheetStack = useSheetStack();
|
|
298
|
+
const sheetsAbove = sheetStack?.getSheetsAbove(sheetId) ?? 0;
|
|
299
|
+
const stackMode = sheetStack?.stackMode ?? "cascade";
|
|
300
|
+
const resolvedSide = side ?? "right";
|
|
301
|
+
const zIndex = `calc(var(--z-layer-modal-content) + ${depth * 10})`;
|
|
302
|
+
const topSheetId = sheetStack?.sheets[sheetStack.sheets.length - 1]?.id;
|
|
303
|
+
const topSheetSize = topSheetId ? sheetStack?.getSheetSize(topSheetId) : void 0;
|
|
304
|
+
const pushOffset = getPushOffset(resolvedSide, sheetsAbove, stackMode, (topSheetSize ? resolvedSide === "left" || resolvedSide === "right" ? topSheetSize.width : topSheetSize.height : void 0) ?? NESTED_SHEET_WIDTH);
|
|
305
|
+
const contentRef = react.useRef(null);
|
|
306
|
+
react.useLayoutEffect(() => {
|
|
307
|
+
if (!isOpen) return;
|
|
308
|
+
if (!sheetStack) return;
|
|
309
|
+
const el = contentRef.current;
|
|
310
|
+
if (!el) return;
|
|
311
|
+
let rafId = 0;
|
|
312
|
+
const update = () => {
|
|
313
|
+
const rect = el.getBoundingClientRect();
|
|
314
|
+
sheetStack.setSheetSize(sheetId, {
|
|
315
|
+
width: rect.width,
|
|
316
|
+
height: rect.height
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
update();
|
|
320
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
321
|
+
const ro = new ResizeObserver(() => {
|
|
322
|
+
cancelAnimationFrame(rafId);
|
|
323
|
+
rafId = requestAnimationFrame(update);
|
|
324
|
+
});
|
|
325
|
+
ro.observe(el);
|
|
326
|
+
return () => {
|
|
327
|
+
cancelAnimationFrame(rafId);
|
|
328
|
+
ro.disconnect();
|
|
329
|
+
};
|
|
330
|
+
}, [
|
|
331
|
+
isOpen,
|
|
332
|
+
sheetId,
|
|
333
|
+
sheetStack
|
|
334
|
+
]);
|
|
335
|
+
const animatePosition = {
|
|
336
|
+
x: pushOffset.x ?? 0,
|
|
337
|
+
y: pushOffset.y ?? 0
|
|
338
|
+
};
|
|
339
|
+
const exitTransition = {
|
|
340
|
+
type: "tween",
|
|
341
|
+
duration: require_motion_config.durations.normal,
|
|
342
|
+
ease: require_motion_config.easings.physicalExit
|
|
343
|
+
};
|
|
344
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, {
|
|
345
|
+
initial: false,
|
|
346
|
+
children: isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, {
|
|
347
|
+
"data-slot": "sheet-portal",
|
|
348
|
+
children: [overlay && depth === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, {
|
|
349
|
+
"data-slot": "sheet-overlay",
|
|
350
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
351
|
+
className: "fixed inset-0 bg-black/80",
|
|
352
|
+
initial: { opacity: 0 },
|
|
353
|
+
animate: { opacity: 1 },
|
|
354
|
+
exit: { opacity: 0 },
|
|
355
|
+
transition: {
|
|
356
|
+
duration: require_motion_config.durations.fast,
|
|
357
|
+
ease: "easeOut"
|
|
358
|
+
},
|
|
359
|
+
style: { zIndex: "var(--z-layer-modal-backdrop)" }
|
|
360
|
+
}, "sheet-overlay")
|
|
361
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Popup, {
|
|
362
|
+
"data-slot": "sheet-content",
|
|
363
|
+
"data-sheet-depth": depth,
|
|
364
|
+
"data-sheet-id": sheetId,
|
|
365
|
+
...props,
|
|
366
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
367
|
+
ref: contentRef,
|
|
368
|
+
variants: {
|
|
369
|
+
initial: getInitialPosition(resolvedSide),
|
|
370
|
+
animate: animatePosition,
|
|
371
|
+
exit: {
|
|
372
|
+
...getExitPosition(resolvedSide),
|
|
373
|
+
transition: exitTransition
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
initial: "initial",
|
|
377
|
+
animate: "animate",
|
|
378
|
+
exit: "exit",
|
|
379
|
+
transition,
|
|
380
|
+
style: { zIndex },
|
|
381
|
+
className: require_utils.cn(sheetVariants({ side: resolvedSide }), className)
|
|
382
|
+
}, `sheet-content-${sheetId}`),
|
|
383
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_portal.ModalPortalScope, { children }), showClose && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Close, {
|
|
384
|
+
"data-slot": "sheet-close",
|
|
385
|
+
className: "ring-offset-background focus:ring-ring data-[open]:bg-secondary absolute top-4 right-4\n rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2\n focus:outline-none disabled:pointer-events-none",
|
|
386
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "h-4 w-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
387
|
+
className: "sr-only",
|
|
388
|
+
children: "Close"
|
|
389
|
+
})]
|
|
390
|
+
})]
|
|
391
|
+
})]
|
|
392
|
+
})
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function SheetHeader({ className, ...props }) {
|
|
396
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
397
|
+
"data-slot": "sheet-header",
|
|
398
|
+
className: require_utils.cn("flex flex-col space-y-2 pb-4 text-center sm:text-left", className),
|
|
399
|
+
...props
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
function SheetFooter({ className, ...props }) {
|
|
403
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
404
|
+
"data-slot": "sheet-footer",
|
|
405
|
+
className: require_utils.cn("flex flex-col-reverse pt-4 sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
406
|
+
...props
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
function SheetTitle({ className, ...props }) {
|
|
410
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Title, {
|
|
411
|
+
"data-slot": "sheet-title",
|
|
412
|
+
className: require_utils.cn("text-foreground text-lg font-semibold", className),
|
|
413
|
+
...props
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
function SheetDescription({ className, ...props }) {
|
|
417
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Description, {
|
|
418
|
+
"data-slot": "sheet-description",
|
|
419
|
+
className: require_utils.cn("text-muted-foreground text-sm", className),
|
|
420
|
+
...props
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
//#endregion
|
|
425
|
+
Object.defineProperty(exports, 'SHEET_INDENT', {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
get: function () {
|
|
428
|
+
return SHEET_INDENT;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
Object.defineProperty(exports, 'Sheet', {
|
|
432
|
+
enumerable: true,
|
|
433
|
+
get: function () {
|
|
434
|
+
return Sheet;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
Object.defineProperty(exports, 'SheetClose', {
|
|
438
|
+
enumerable: true,
|
|
439
|
+
get: function () {
|
|
440
|
+
return SheetClose;
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperty(exports, 'SheetContent', {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function () {
|
|
446
|
+
return SheetContent;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(exports, 'SheetDescription', {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
get: function () {
|
|
452
|
+
return SheetDescription;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, 'SheetFooter', {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function () {
|
|
458
|
+
return SheetFooter;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
Object.defineProperty(exports, 'SheetHeader', {
|
|
462
|
+
enumerable: true,
|
|
463
|
+
get: function () {
|
|
464
|
+
return SheetHeader;
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
Object.defineProperty(exports, 'SheetOverlay', {
|
|
468
|
+
enumerable: true,
|
|
469
|
+
get: function () {
|
|
470
|
+
return SheetOverlay;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
Object.defineProperty(exports, 'SheetPortal', {
|
|
474
|
+
enumerable: true,
|
|
475
|
+
get: function () {
|
|
476
|
+
return SheetPortal;
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
Object.defineProperty(exports, 'SheetStackProvider', {
|
|
480
|
+
enumerable: true,
|
|
481
|
+
get: function () {
|
|
482
|
+
return SheetStackProvider;
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
Object.defineProperty(exports, 'SheetTitle', {
|
|
486
|
+
enumerable: true,
|
|
487
|
+
get: function () {
|
|
488
|
+
return SheetTitle;
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
Object.defineProperty(exports, 'SheetTrigger', {
|
|
492
|
+
enumerable: true,
|
|
493
|
+
get: function () {
|
|
494
|
+
return SheetTrigger;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
Object.defineProperty(exports, 'useControllableState', {
|
|
498
|
+
enumerable: true,
|
|
499
|
+
get: function () {
|
|
500
|
+
return useControllableState;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
Object.defineProperty(exports, 'useSheet', {
|
|
504
|
+
enumerable: true,
|
|
505
|
+
get: function () {
|
|
506
|
+
return useSheet;
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
Object.defineProperty(exports, 'useSheetStack', {
|
|
510
|
+
enumerable: true,
|
|
511
|
+
get: function () {
|
|
512
|
+
return useSheetStack;
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
//# sourceMappingURL=sheet-BdA0rfIz.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet-BdA0rfIz.cjs","names":["React","SheetPrimitive","cn","durations","easings","AnimatePresence","motion","ModalPortalScope","X"],"sources":["../src/lib/use-controllable-state.ts","../src/components/sheet.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\ntype UseControllableStateParams<T> = {\n\tprop?: T;\n\tdefaultProp?: T;\n\tonChange?: (value: T) => void;\n};\n\n/**\n * Hook for managing controlled/uncontrolled state.\n * Supports both controlled (prop-driven) and uncontrolled (internal state) patterns.\n */\nexport function useControllableState<T>({\n\tprop,\n\tdefaultProp,\n\tonChange,\n}: UseControllableStateParams<T>): [T, (value: T) => void] {\n\tconst [uncontrolledValue, setUncontrolledValue] = useState<T>(defaultProp as T);\n\tconst isControlled = prop !== undefined;\n\tconst value = isControlled ? prop : uncontrolledValue;\n\n\t// Store onChange in ref to keep callback stable\n\tconst onChangeRef = useRef(onChange);\n\tuseEffect(() => {\n\t\tonChangeRef.current = onChange;\n\t}, [onChange]);\n\n\tconst setValue = useCallback(\n\t\t(newValue: T) => {\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledValue(newValue);\n\t\t\t}\n\t\t\tonChangeRef.current?.(newValue);\n\t\t},\n\t\t[isControlled],\n\t);\n\n\treturn [value, setValue];\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Dialog as SheetPrimitive } from '@base-ui/react/dialog';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport { AnimatePresence, motion, type HTMLMotionProps, type Transition } from 'motion/react';\n\nimport { durations, easings } from '../lib/motion/motion-config';\nimport { useControllableState } from '../lib/use-controllable-state';\nimport { ModalPortalScope, useRootPortalContainer } from '@constructive-io/ui/portal';\nimport { cn } from '../lib/utils';\n\n// ============================================================================\n// Sheet Stack Context - Manages nested/stacked sheets\n// ============================================================================\n\ntype SheetInfo = {\n\tid: string;\n\tdepth: number;\n\tclose: () => void;\n};\n\ntype SheetSize = {\n\twidth: number;\n\theight: number;\n};\n\ntype StackMode = 'cascade' | 'collapse';\n\ntype SheetStackContextType = {\n\tsheets: SheetInfo[];\n\tsheetSizes: Record<string, SheetSize | undefined>;\n\tstackMode: StackMode;\n\tregisterSheet: (info: SheetInfo) => void;\n\tunregisterSheet: (id: string) => void;\n\tsetSheetSize: (id: string, size: SheetSize) => void;\n\tgetSheetSize: (id: string) => SheetSize | undefined;\n\tisTopSheet: (id: string) => boolean;\n\tgetSheetsAbove: (id: string) => number;\n};\n\nconst SheetStackContext = React.createContext<SheetStackContextType | undefined>(undefined);\n\nconst SHEET_INDENT = 24; // pixels to push outer sheets when inner opens\n\ntype SheetStackProviderProps = {\n\tchildren: React.ReactNode;\n\t/** Controls how sheets are pushed when stacking.\n\t * - 'cascade' (default): Each sheet is incrementally indented by SHEET_INDENT\n\t * - 'collapse': Only the sheet directly below the top gets full-width push, others cascade relative to it\n\t */\n\tstackMode?: StackMode;\n};\n\nfunction SheetStackProvider({ children, stackMode = 'cascade' }: SheetStackProviderProps) {\n\tconst [sheets, setSheets] = React.useState<SheetInfo[]>([]);\n\tconst [sheetSizes, setSheetSizes] = React.useState<Record<string, SheetSize | undefined>>({});\n\n\t// Register sheet - insert sorted by depth (lower depth = earlier in array)\n\t// This ensures sheets are ordered correctly regardless of registration timing\n\tconst registerSheet = React.useCallback((info: SheetInfo) => {\n\t\tsetSheets((prev) => {\n\t\t\tif (prev.some((s) => s.id === info.id)) return prev;\n\t\t\t// Insert in sorted order by depth\n\t\t\tconst newSheets = [...prev, info];\n\t\t\tnewSheets.sort((a, b) => a.depth - b.depth);\n\t\t\treturn newSheets;\n\t\t});\n\t}, []);\n\n\tconst unregisterSheet = React.useCallback((id: string) => {\n\t\tsetSheets((prev) => prev.filter((s) => s.id !== id));\n\t\tsetSheetSizes((prev) => {\n\t\t\tif (!prev[id]) return prev;\n\t\t\tconst next = { ...prev };\n\t\t\tdelete next[id];\n\t\t\treturn next;\n\t\t});\n\t}, []);\n\n\tconst setSheetSize = React.useCallback((id: string, size: SheetSize) => {\n\t\tsetSheetSizes((prev) => {\n\t\t\tconst current = prev[id];\n\t\t\tif (current && current.width === size.width && current.height === size.height) return prev;\n\t\t\treturn { ...prev, [id]: size };\n\t\t});\n\t}, []);\n\n\tconst getSheetSize = React.useCallback((id: string) => sheetSizes[id], [sheetSizes]);\n\n\t// Topmost sheet = highest depth = last in sorted array\n\tconst isTopSheet = React.useCallback((id: string) => {\n\t\tif (sheets.length === 0) return false;\n\t\treturn sheets[sheets.length - 1]?.id === id;\n\t}, [sheets]);\n\n\t// Sheets above = sheets with higher depth than this one\n\tconst getSheetsAbove = React.useCallback((id: string) => {\n\t\tconst index = sheets.findIndex((s) => s.id === id);\n\t\tif (index === -1) return 0;\n\t\t// Sheets after this index have higher depth (are on top)\n\t\treturn sheets.length - index - 1;\n\t}, [sheets]);\n\n\t// Memoize value - callbacks are stable, only sheets changes\n\tconst value = React.useMemo(\n\t\t() => ({\n\t\t\tsheets,\n\t\t\tsheetSizes,\n\t\t\tstackMode,\n\t\t\tregisterSheet,\n\t\t\tunregisterSheet,\n\t\t\tsetSheetSize,\n\t\t\tgetSheetSize,\n\t\t\tisTopSheet,\n\t\t\tgetSheetsAbove,\n\t\t}),\n\t\t[sheets, sheetSizes, stackMode, registerSheet, unregisterSheet, setSheetSize, getSheetSize, isTopSheet, getSheetsAbove],\n\t);\n\n\treturn <SheetStackContext.Provider value={value}>{children}</SheetStackContext.Provider>;\n}\n\nconst useSheetStack = (): SheetStackContextType | undefined => {\n\treturn React.useContext(SheetStackContext);\n};\n\n// ============================================================================\n// Sheet Nesting Context - Tracks nesting level via React tree\n// ============================================================================\n\ntype SheetNestingContextType = {\n\tlevel: number;\n\tparentSheetId: string | null;\n};\n\nconst SheetNestingContext = React.createContext<SheetNestingContextType>({\n\tlevel: 0,\n\tparentSheetId: null,\n});\n\nconst useSheetNesting = () => React.useContext(SheetNestingContext);\n\n// ============================================================================\n// Individual Sheet Context\n// ============================================================================\n\ntype SheetContextType = {\n\tisOpen: boolean;\n\tsheetId: string;\n\tdepth: number;\n\tsheetsAbove: number;\n\tisTopSheet: boolean;\n\tclose: () => void;\n};\n\nconst SheetContext = React.createContext<SheetContextType | undefined>(undefined);\n\nconst useSheet = (): SheetContextType => {\n\tconst context = React.useContext(SheetContext);\n\tif (!context) {\n\t\tthrow new Error('useSheet must be used within a Sheet');\n\t}\n\treturn context;\n};\n\ntype DialogChangeEventDetails = Parameters<NonNullable<React.ComponentProps<typeof SheetPrimitive.Root>['onOpenChange']>>[1];\n\ntype SheetProps = Omit<React.ComponentProps<typeof SheetPrimitive.Root>, 'onOpenChange'> & {\n\t/** Unique identifier for this sheet in a stack. Auto-generated if not provided. */\n\tsheetId?: string;\n\t/** Callback when open state changes - simplified to just boolean for backwards compatibility */\n\tonOpenChange?: (open: boolean) => void;\n};\n\nfunction Sheet({\n\tchildren,\n\tsheetId: providedId,\n\topen: openProp,\n\tdefaultOpen = false,\n\tonOpenChange,\n\tmodal,\n\t...props\n}: SheetProps) {\n\tconst [isOpen, setIsOpen] = useControllableState({\n\t\tprop: openProp,\n\t\tdefaultProp: defaultOpen,\n\t\tonChange: onOpenChange,\n\t});\n\tconst sheetStack = useSheetStack();\n\tconst nesting = useSheetNesting();\n\tconst generatedId = React.useId();\n\tconst sheetId = providedId ?? `sheet-${generatedId.replace(/:/g, '')}`;\n\n\t// Depth is determined by nesting level in React tree\n\tconst depth = nesting.level;\n\n\tconst close = React.useCallback(() => {\n\t\tsetIsOpen(false);\n\t}, [setIsOpen]);\n\n\tconst registerSheet = sheetStack?.registerSheet;\n\tconst unregisterSheet = sheetStack?.unregisterSheet;\n\n\t// Register/unregister with stack when open state changes\n\tReact.useEffect(() => {\n\t\tif (registerSheet && isOpen) {\n\t\t\t// Close any open dropdowns/popovers by blurring active element\n\t\t\t// This ensures selects close before the sheet stacks on top\n\t\t\tif (document.activeElement instanceof HTMLElement) {\n\t\t\t\tdocument.activeElement.blur();\n\t\t\t}\n\t\t\tregisterSheet({ id: sheetId, depth, close });\n\t\t\treturn () => unregisterSheet?.(sheetId);\n\t\t}\n\t}, [isOpen, sheetId, depth, close, registerSheet, unregisterSheet]);\n\n\t// Base UI owns dismissal details; this adapter preserves the package's boolean callback.\n\tconst handleOpenChange = React.useCallback((open: boolean, _eventDetails: DialogChangeEventDetails) => {\n\t\tsetIsOpen(open);\n\t}, [setIsOpen]);\n\n\t// Calculate sheets above and whether this is the top sheet\n\tconst sheetsAbove = sheetStack?.getSheetsAbove(sheetId) ?? 0;\n\tconst isTopSheet = sheetStack?.isTopSheet(sheetId) ?? true;\n\n\t// Nested sheets must be non-modal to prevent Base UI from closing parent on interaction\n\tconst isNested = depth > 0;\n\n\treturn (\n\t\t<SheetNestingContext.Provider value={{ level: depth + 1, parentSheetId: sheetId }}>\n\t\t\t<SheetContext.Provider value={{ isOpen, sheetId, depth, sheetsAbove, isTopSheet, close }}>\n\t\t\t\t<SheetPrimitive.Root\n\t\t\t\t\tdata-slot=\"sheet\"\n\t\t\t\t\t{...props}\n\t\t\t\t\topen={isOpen}\n\t\t\t\t\tmodal={isNested ? false : modal}\n\t\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SheetPrimitive.Root>\n\t\t\t</SheetContext.Provider>\n\t\t</SheetNestingContext.Provider>\n\t);\n}\n\ntype SheetTriggerProps = React.ComponentProps<typeof SheetPrimitive.Trigger> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction SheetTrigger({ asChild, children, render, nativeButton, ...props }: SheetTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<SheetPrimitive.Trigger\n\t\t\tdata-slot=\"sheet-trigger\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</SheetPrimitive.Trigger>\n\t);\n}\n\ntype SheetCloseProps = React.ComponentProps<typeof SheetPrimitive.Close> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction SheetClose({ asChild, children, render, nativeButton, ...props }: SheetCloseProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<SheetPrimitive.Close\n\t\t\tdata-slot=\"sheet-close\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</SheetPrimitive.Close>\n\t);\n}\n\ntype SheetPortalProps = React.ComponentProps<typeof SheetPrimitive.Portal> & {\n\t/** @deprecated Base UI manages mounting automatically */\n\tforceMount?: boolean;\n};\n\nfunction SheetPortal({ forceMount: _forceMount, container: containerProp, ...props }: SheetPortalProps) {\n\tconst rootContainer = useRootPortalContainer();\n\tconst container = containerProp === undefined ? (rootContainer ?? undefined) : containerProp;\n\n\tconst style = {\n\t\t...(props.style ?? {}),\n\t\t['--z-layer-floating' as any]: 'var(--z-layer-floating-elevated)',\n\t} satisfies React.CSSProperties;\n\n\treturn <SheetPrimitive.Portal data-slot=\"sheet-portal\" container={container} {...props} style={style} />;\n}\n\ntype SheetOverlayProps = React.HTMLAttributes<HTMLDivElement> & {\n\t/** @deprecated Base UI Backdrop handles child elements natively */\n\tasChild?: boolean;\n\t/** @deprecated Base UI manages mounting automatically */\n\tforceMount?: boolean;\n};\n\nfunction SheetOverlay({ className, asChild: _asChild, forceMount: _forceMount, ...props }: SheetOverlayProps) {\n\treturn (\n\t\t<SheetPrimitive.Backdrop\n\t\t\tdata-slot=\"sheet-overlay\"\n\t\t\tclassName={cn('fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/80', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst sheetVariants = cva('fixed flex flex-col gap-3 bg-background p-4 shadow-lg', {\n\tvariants: {\n\t\tside: {\n\t\t\ttop: 'inset-x-0 top-0 border-b',\n\t\t\tbottom: 'inset-x-0 bottom-0 border-t',\n\t\t\tleft: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n\t\t\tright: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tside: 'right',\n\t},\n});\n\ntype SheetContentProps = Omit<React.ComponentProps<typeof SheetPrimitive.Popup>, 'children'> &\n\tVariantProps<typeof sheetVariants> &\n\tHTMLMotionProps<'div'> & {\n\t\ttransition?: Transition;\n\t\toverlay?: boolean;\n\t\t/** Whether to show the close button. Defaults to true. */\n\t\tshowClose?: boolean;\n\t\tchildren?: React.ReactNode;\n\t\t/** @deprecated Base UI manages mounting automatically */\n\t\tforceMount?: boolean;\n\t\t/** @deprecated Use onOpenChange on Root instead */\n\t\tonInteractOutside?: (e: Event) => void;\n\t\t/** @deprecated Use onOpenChange on Root instead */\n\t\tonPointerDownOutside?: (e: Event) => void;\n\t\t/** @deprecated Use onOpenChange on Root instead */\n\t\tonEscapeKeyDown?: (e: KeyboardEvent) => void;\n\t\t/** @deprecated Use onOpenChange on Root instead */\n\t\tonFocusOutside?: (e: Event) => void;\n\t};\n\n// Default width for nested sheets (used for collapse mode calculations)\n// Using max-w-md (28rem = 448px) as the typical nested sheet width\nconst NESTED_SHEET_WIDTH = 448;\n\n// Gap between the top two visible sheets in collapse mode\nconst SHEET_STACK_GAP = 0;\n\n/**\n * Calculate the push offset based on side, number of sheets above, and stack mode.\n * - 'cascade': Each sheet is incrementally indented by SHEET_INDENT per layer above\n * - 'collapse': Bottom sheets are pushed to opposite side to make room for top sheet\n */\nfunction getPushOffset(\n\tside: 'top' | 'bottom' | 'left' | 'right',\n\tsheetsAbove: number,\n\tstackMode: StackMode = 'cascade',\n\tcollapseBaseSize: number = NESTED_SHEET_WIDTH,\n): { x?: number | string; y?: number | string } {\n\tif (sheetsAbove === 0) {\n\t\treturn { x: 0, y: 0 };\n\t}\n\n\tif (stackMode === 'collapse') {\n\t\t// Keep the top 2 sheets visible:\n\t\t// - The sheet directly under the top is pushed by (top sheet width + small gap)\n\t\t// - Deeper sheets cascade under that with a small indent per extra layer\n\t\tconst baseOffset = collapseBaseSize + SHEET_STACK_GAP;\n\t\tconst offset = baseOffset + (sheetsAbove - 1) * SHEET_INDENT;\n\n\t\tswitch (side) {\n\t\t\tcase 'right':\n\t\t\t\treturn { x: -offset };\n\t\t\tcase 'left':\n\t\t\t\treturn { x: offset };\n\t\t\tcase 'top':\n\t\t\t\treturn { y: offset };\n\t\t\tcase 'bottom':\n\t\t\t\treturn { y: -offset };\n\t\t}\n\t}\n\n\t// Cascade mode: incremental indent\n\tconst offset = sheetsAbove * SHEET_INDENT;\n\n\tswitch (side) {\n\t\tcase 'right':\n\t\t\treturn { x: -offset };\n\t\tcase 'left':\n\t\t\treturn { x: offset };\n\t\tcase 'top':\n\t\t\treturn { y: offset };\n\t\tcase 'bottom':\n\t\t\treturn { y: -offset };\n\t}\n}\n\n/**\n * Get the initial position for sheet animation based on side.\n * Pure transform animation for GPU acceleration - no opacity/scale changes.\n */\nfunction getInitialPosition(side: 'top' | 'bottom' | 'left' | 'right') {\n\tswitch (side) {\n\t\tcase 'right':\n\t\t\treturn { x: '100%' };\n\t\tcase 'left':\n\t\t\treturn { x: '-100%' };\n\t\tcase 'top':\n\t\t\treturn { y: '-100%' };\n\t\tcase 'bottom':\n\t\t\treturn { y: '100%' };\n\t}\n}\n\n/**\n * Get the exit position for sheet animation based on side.\n * Pure transform for smooth GPU-accelerated exit.\n */\nfunction getExitPosition(side: 'top' | 'bottom' | 'left' | 'right') {\n\tswitch (side) {\n\t\tcase 'right':\n\t\t\treturn { x: '100%' };\n\t\tcase 'left':\n\t\t\treturn { x: '-100%' };\n\t\tcase 'top':\n\t\t\treturn { y: '-100%' };\n\t\tcase 'bottom':\n\t\t\treturn { y: '100%' };\n\t}\n}\n\n// Default sheet transition - fast tween for snappy, jank-free animation\nconst defaultSheetTransition: Transition = {\n\ttype: 'tween',\n\tduration: durations.normal,\n\tease: [0.32, 0.72, 0, 1], // Custom ease-out for snappy feel\n};\n\nfunction SheetContent({\n\tside = 'right',\n\tclassName,\n\ttransition = defaultSheetTransition,\n\toverlay = true,\n\tshowClose = true,\n\tchildren,\n\tforceMount: _forceMount,\n\tonInteractOutside: _onInteractOutside,\n\tonPointerDownOutside: _onPointerDownOutside,\n\tonEscapeKeyDown: _onEscapeKeyDown,\n\tonFocusOutside: _onFocusOutside,\n\t...props\n}: SheetContentProps) {\n\tconst { isOpen, depth, sheetId } = useSheet();\n\tconst sheetStack = useSheetStack();\n\n\t// Calculate sheetsAbove directly from stack to ensure it's always current\n\t// sheetsAbove = number of sheets with higher depth (on top of this one)\n\tconst sheetsAbove = sheetStack?.getSheetsAbove(sheetId) ?? 0;\n\tconst stackMode = sheetStack?.stackMode ?? 'cascade';\n\n\t// Ensure side is never null (default already handles undefined, but TS needs explicit assertion)\n\tconst resolvedSide = side ?? 'right';\n\n\t// Calculate z-index based on depth (base modal content z-index + depth * 10)\n\t// We use a calc() string to reference the CSS variable\n\tconst zIndex = `calc(var(--z-layer-modal-content) + ${depth * 10})`;\n\n\t// Push offset for when sheets are stacked above this one\n\t// sheetsAbove > 0 means there are sheets on top, so this sheet should be pushed back\n\tconst topSheetId = sheetStack?.sheets[sheetStack.sheets.length - 1]?.id;\n\tconst topSheetSize = topSheetId ? sheetStack?.getSheetSize(topSheetId) : undefined;\n\tconst collapseBaseSize = topSheetSize\n\t\t? resolvedSide === 'left' || resolvedSide === 'right'\n\t\t\t? topSheetSize.width\n\t\t\t: topSheetSize.height\n\t\t: undefined;\n\n\tconst pushOffset = getPushOffset(resolvedSide, sheetsAbove, stackMode, collapseBaseSize ?? NESTED_SHEET_WIDTH);\n\n\tconst contentRef = React.useRef<HTMLDivElement>(null);\n\tReact.useLayoutEffect(() => {\n\t\tif (!isOpen) return;\n\t\tif (!sheetStack) return;\n\t\tconst el = contentRef.current;\n\t\tif (!el) return;\n\t\tlet rafId = 0;\n\t\tconst update = () => {\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tsheetStack.setSheetSize(sheetId, { width: rect.width, height: rect.height });\n\t\t};\n\t\tupdate();\n\t\tif (typeof ResizeObserver === 'undefined') return;\n\t\tconst ro = new ResizeObserver(() => {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\trafId = requestAnimationFrame(update);\n\t\t});\n\t\tro.observe(el);\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\tro.disconnect();\n\t\t};\n\t}, [isOpen, sheetId, sheetStack]);\n\n\t// Animate position includes base position (0) plus any push offset\n\t// Only transform properties for GPU acceleration\n\tconst animatePosition = {\n\t\tx: pushOffset.x ?? 0,\n\t\ty: pushOffset.y ?? 0,\n\t};\n\n\t// Exit transition - slightly faster and snappier for physical feel\n\tconst exitTransition: Transition = {\n\t\ttype: 'tween',\n\t\tduration: durations.normal,\n\t\tease: easings.physicalExit,\n\t};\n\n\treturn (\n\t\t<AnimatePresence initial={false}>\n\t\t\t{isOpen && (\n\t\t\t\t<SheetPortal data-slot='sheet-portal'>\n\t\t\t\t\t{/* Only show overlay for the first (bottom-most) sheet in stack */}\n\t\t\t\t\t{overlay && depth === 0 && (\n\t\t\t\t\t\t<SheetPrimitive.Backdrop\n\t\t\t\t\t\t\tdata-slot=\"sheet-overlay\"\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tkey='sheet-overlay'\n\t\t\t\t\t\t\t\t\tclassName='fixed inset-0 bg-black/80'\n\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\texit={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\ttransition={{ duration: durations.fast, ease: 'easeOut' }}\n\t\t\t\t\t\t\t\t\tstyle={{ zIndex: 'var(--z-layer-modal-backdrop)' }}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<SheetPrimitive.Popup\n\t\t\t\t\t\tdata-slot=\"sheet-content\"\n\t\t\t\t\t\tdata-sheet-depth={depth}\n\t\t\t\t\t\tdata-sheet-id={sheetId}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tkey={`sheet-content-${sheetId}`}\n\t\t\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\t\t\tinitial: getInitialPosition(resolvedSide),\n\t\t\t\t\t\t\t\t\tanimate: animatePosition,\n\t\t\t\t\t\t\t\t\texit: {\n\t\t\t\t\t\t\t\t\t\t...getExitPosition(resolvedSide),\n\t\t\t\t\t\t\t\t\t\ttransition: exitTransition,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tinitial='initial'\n\t\t\t\t\t\t\t\tanimate='animate'\n\t\t\t\t\t\t\t\texit='exit'\n\t\t\t\t\t\t\t\ttransition={transition}\n\t\t\t\t\t\t\t\tstyle={{ zIndex }}\n\t\t\t\t\t\t\t\tclassName={cn(sheetVariants({ side: resolvedSide }), className)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* ModalPortalScope creates a scoped portal container for floating elements inside */}\n\t\t\t\t\t\t<ModalPortalScope>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</ModalPortalScope>\n\t\t\t\t\t\t{showClose && (\n\t\t\t\t\t\t\t<SheetPrimitive.Close\n\t\t\t\t\t\t\t\tdata-slot=\"sheet-close\"\n\t\t\t\t\t\t\t\tclassName='ring-offset-background focus:ring-ring data-[open]:bg-secondary absolute top-4 right-4\n\t\t\t\t\t\t\t\t\trounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2\n\t\t\t\t\t\t\t\t\tfocus:outline-none disabled:pointer-events-none'\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className='h-4 w-4' />\n\t\t\t\t\t\t\t\t<span className='sr-only'>Close</span>\n\t\t\t\t\t\t\t</SheetPrimitive.Close>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</SheetPrimitive.Popup>\n\t\t\t\t</SheetPortal>\n\t\t\t)}\n\t\t</AnimatePresence>\n\t);\n}\n\ntype SheetHeaderProps = React.ComponentProps<'div'>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sheet-header\"\n\t\t\tclassName={cn('flex flex-col space-y-2 pb-4 text-center sm:text-left', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype SheetFooterProps = React.ComponentProps<'div'>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"sheet-footer\"\n\t\t\tclassName={cn('flex flex-col-reverse pt-4 sm:flex-row sm:justify-end sm:space-x-2', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype SheetTitleProps = React.ComponentProps<typeof SheetPrimitive.Title>;\n\nfunction SheetTitle({ className, ...props }: SheetTitleProps) {\n\treturn (\n\t\t<SheetPrimitive.Title\n\t\t\tdata-slot=\"sheet-title\"\n\t\t\tclassName={cn('text-foreground text-lg font-semibold', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype SheetDescriptionProps = React.ComponentProps<typeof SheetPrimitive.Description>;\n\nfunction SheetDescription({ className, ...props }: SheetDescriptionProps) {\n\treturn (\n\t\t<SheetPrimitive.Description\n\t\t\tdata-slot=\"sheet-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\t// Stack provider for nested sheets\n\tSheetStackProvider,\n\tuseSheetStack,\n\t// Individual sheet hooks\n\tuseSheet,\n\t// Components\n\tSheet,\n\tSheetPortal,\n\tSheetOverlay,\n\tSheetTrigger,\n\tSheetClose,\n\tSheetContent,\n\tSheetHeader,\n\tSheetFooter,\n\tSheetTitle,\n\tSheetDescription,\n\t// Constants\n\tSHEET_INDENT,\n\t// Types\n\ttype StackMode,\n\ttype SheetStackProviderProps,\n\ttype SheetProps,\n\ttype SheetPortalProps,\n\ttype SheetOverlayProps,\n\ttype SheetTriggerProps,\n\ttype SheetCloseProps,\n\ttype SheetContentProps,\n\ttype SheetHeaderProps,\n\ttype SheetFooterProps,\n\ttype SheetTitleProps,\n\ttype SheetDescriptionProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,SAAgB,qBAAwB,EACvC,MACA,aACA,YAC0D;CAC1D,MAAM,CAAC,mBAAmB,4CAAoC,WAAgB;CAC9E,MAAM,eAAe,SAAS;CAC9B,MAAM,QAAQ,eAAe,OAAO;CAGpC,MAAM,gCAAqB,QAAQ;CACnC,2BAAgB;EACf,YAAY,UAAU;CACvB,GAAG,CAAC,QAAQ,CAAC;CAYb,OAAO,CAAC,+BATN,aAAgB;EAChB,IAAI,CAAC,cACJ,qBAAqB,QA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