@constructive-io/ui 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-CPy_fibW.cjs +608 -0
- package/dist/sidebar-CPy_fibW.cjs.map +1 -0
- package/dist/sidebar-Cfax0g0_.js +463 -0
- package/dist/sidebar-Cfax0g0_.js.map +1 -0
- package/dist/slot-C-jEfihz.cjs +122 -0
- package/dist/slot-C-jEfihz.cjs.map +1 -0
- package/dist/slot-EL8zfLG0.js +97 -0
- package/dist/slot-EL8zfLG0.js.map +1 -0
- package/dist/stack-DKdvlOM6.cjs +1771 -0
- package/dist/stack-DKdvlOM6.cjs.map +1 -0
- package/dist/stack-jMdxDrex.js +1531 -0
- package/dist/stack-jMdxDrex.js.map +1 -0
- package/dist/toast-D6MqijT2.cjs +316 -0
- package/dist/toast-D6MqijT2.cjs.map +1 -0
- package/dist/toast-D_BOLzm3.js +287 -0
- package/dist/toast-D_BOLzm3.js.map +1 -0
- package/dist/tooltip-CTRQoN1A.d.cts +29 -0
- package/dist/tooltip-CTRQoN1A.d.ts +29 -0
- package/dist/utils-BkMLyah9.js +12 -0
- package/dist/utils-BkMLyah9.js.map +1 -0
- package/dist/utils-CzTQ3-VI.cjs +17 -0
- package/dist/utils-CzTQ3-VI.cjs.map +1 -0
- package/package.json +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,612 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var tailwindMerge = require('tailwind-merge');
|
|
11
|
-
var dialog = require('@base-ui/react/dialog');
|
|
12
|
-
var portal = require('@constructive-io/ui/portal');
|
|
13
|
-
var scrollArea = require('@base-ui/react/scroll-area');
|
|
14
|
-
|
|
15
|
-
function _interopNamespace(e) {
|
|
16
|
-
if (e && e.__esModule) return e;
|
|
17
|
-
var n = Object.create(null);
|
|
18
|
-
if (e) {
|
|
19
|
-
Object.keys(e).forEach(function (k) {
|
|
20
|
-
if (k !== 'default') {
|
|
21
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return e[k]; }
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
n.default = e;
|
|
30
|
-
return Object.freeze(n);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
|
-
|
|
35
|
-
// src/components/toast/toast-error.tsx
|
|
36
|
-
function composeRefs(...refs) {
|
|
37
|
-
return (node) => {
|
|
38
|
-
refs.forEach((ref) => {
|
|
39
|
-
if (typeof ref === "function") {
|
|
40
|
-
ref(node);
|
|
41
|
-
} else if (ref != null) {
|
|
42
|
-
ref.current = node;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function mergeProps(slotProps, childProps) {
|
|
48
|
-
const overrideProps = { ...childProps };
|
|
49
|
-
for (const propName in childProps) {
|
|
50
|
-
if (propName === "ref") continue;
|
|
51
|
-
const slotPropValue = slotProps[propName];
|
|
52
|
-
const childPropValue = childProps[propName];
|
|
53
|
-
if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
|
|
54
|
-
overrideProps[propName] = (...args) => {
|
|
55
|
-
childPropValue(...args);
|
|
56
|
-
slotPropValue(...args);
|
|
57
|
-
};
|
|
58
|
-
} else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
|
|
59
|
-
overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
|
|
60
|
-
} else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
|
|
61
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return { ...slotProps, ...overrideProps };
|
|
65
|
-
}
|
|
66
|
-
function isSlottable(child) {
|
|
67
|
-
return React__namespace.isValidElement(child);
|
|
68
|
-
}
|
|
69
|
-
var Slot = React__namespace.forwardRef((props, forwardedRef) => {
|
|
70
|
-
const { children, ...slotProps } = props;
|
|
71
|
-
if (isSlottable(children)) {
|
|
72
|
-
const childProps = children.props;
|
|
73
|
-
const childRef = childProps.ref;
|
|
74
|
-
return React__namespace.cloneElement(children, {
|
|
75
|
-
...mergeProps(slotProps, childProps),
|
|
76
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
if (React__namespace.Children.count(children) > 1) {
|
|
80
|
-
const childrenArray = React__namespace.Children.toArray(children);
|
|
81
|
-
const slottableChild = childrenArray.find(
|
|
82
|
-
(child) => React__namespace.isValidElement(child) && child.type === Slottable
|
|
83
|
-
);
|
|
84
|
-
if (slottableChild) {
|
|
85
|
-
const newElement = slottableChild.props.children;
|
|
86
|
-
if (isSlottable(newElement)) {
|
|
87
|
-
const newElementProps = newElement.props;
|
|
88
|
-
const newChildren = childrenArray.map((child) => {
|
|
89
|
-
if (child === slottableChild) {
|
|
90
|
-
return React__namespace.Children.count(newElementProps.children) > 1 ? React__namespace.Children.only(null) : newElementProps.children;
|
|
91
|
-
}
|
|
92
|
-
return child;
|
|
93
|
-
});
|
|
94
|
-
const childRef = newElementProps.ref;
|
|
95
|
-
return React__namespace.cloneElement(newElement, {
|
|
96
|
-
...mergeProps(slotProps, newElementProps),
|
|
97
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
|
|
98
|
-
children: newChildren
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
104
|
-
});
|
|
105
|
-
Slot.displayName = "Slot";
|
|
106
|
-
function Slottable({ children }) {
|
|
107
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
108
|
-
}
|
|
109
|
-
function cn(...inputs) {
|
|
110
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
111
|
-
}
|
|
112
|
-
var buttonVariants = classVarianceAuthority.cva(
|
|
113
|
-
"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
114
|
-
{
|
|
115
|
-
defaultVariants: {
|
|
116
|
-
size: "default",
|
|
117
|
-
static: false,
|
|
118
|
-
variant: "default"
|
|
119
|
-
},
|
|
120
|
-
variants: {
|
|
121
|
-
static: {
|
|
122
|
-
false: "motion-safe:active:not-disabled:scale-[0.96]",
|
|
123
|
-
true: null
|
|
124
|
-
},
|
|
125
|
-
size: {
|
|
126
|
-
default: "h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
127
|
-
icon: "size-10 pointer-coarse:size-11",
|
|
128
|
-
"icon-lg": "size-11",
|
|
129
|
-
"icon-sm": "size-8 pointer-coarse:size-11",
|
|
130
|
-
"icon-xl": 'size-11 [&_svg:not([class*="size-"])]:size-5',
|
|
131
|
-
"icon-xs": 'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*="size-"])]:size-4',
|
|
132
|
-
lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
|
|
133
|
-
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
134
|
-
xl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*="size-"])]:size-5',
|
|
135
|
-
xs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*="size-"])]:size-3.5'
|
|
136
|
-
},
|
|
137
|
-
variant: {
|
|
138
|
-
default: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
139
|
-
destructive: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
140
|
-
"destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8",
|
|
141
|
-
ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
|
|
142
|
-
link: "border-transparent underline-offset-4 hover:underline",
|
|
143
|
-
outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64",
|
|
144
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
var Button = React__namespace.forwardRef(
|
|
150
|
-
({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
|
|
151
|
-
const buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));
|
|
152
|
-
const Comp = asChild ? Slot : "button";
|
|
153
|
-
if (asChild) {
|
|
154
|
-
const SlottedComp = Comp;
|
|
155
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
156
|
-
SlottedComp,
|
|
157
|
-
{
|
|
158
|
-
ref,
|
|
159
|
-
className: buttonClasses,
|
|
160
|
-
"data-slot": "button",
|
|
161
|
-
...props,
|
|
162
|
-
children
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, type, className: buttonClasses, "data-slot": "button", ...props, children });
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
Button.displayName = "Button";
|
|
170
|
-
var ScrollArea = React__namespace.forwardRef(
|
|
171
|
-
({ className, children, scrollFade = false, scrollbarGutter = false, ...props }, ref) => {
|
|
172
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
173
|
-
scrollArea.ScrollArea.Root,
|
|
174
|
-
{
|
|
175
|
-
ref,
|
|
176
|
-
className: cn("size-full min-h-0", className),
|
|
177
|
-
...props,
|
|
178
|
-
children: [
|
|
179
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
180
|
-
scrollArea.ScrollArea.Viewport,
|
|
181
|
-
{
|
|
182
|
-
className: cn(
|
|
183
|
-
"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
|
|
184
|
-
scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
|
|
185
|
-
scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"
|
|
186
|
-
),
|
|
187
|
-
"data-slot": "scroll-area-viewport",
|
|
188
|
-
children
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation: "vertical" }),
|
|
192
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation: "horizontal" }),
|
|
193
|
-
/* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Corner, { "data-slot": "scroll-area-corner" })
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
ScrollArea.displayName = "ScrollArea";
|
|
200
|
-
function ScrollBar({
|
|
201
|
-
className,
|
|
202
|
-
orientation = "vertical",
|
|
203
|
-
...props
|
|
204
|
-
}) {
|
|
205
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
|
-
scrollArea.ScrollArea.Scrollbar,
|
|
207
|
-
{
|
|
208
|
-
className: cn(
|
|
209
|
-
"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",
|
|
210
|
-
className
|
|
211
|
-
),
|
|
212
|
-
"data-slot": "scroll-area-scrollbar",
|
|
213
|
-
orientation,
|
|
214
|
-
...props,
|
|
215
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
216
|
-
scrollArea.ScrollArea.Thumb,
|
|
217
|
-
{
|
|
218
|
-
className: "relative flex-1 rounded-full bg-foreground/20",
|
|
219
|
-
"data-slot": "scroll-area-thumb"
|
|
220
|
-
}
|
|
221
|
-
)
|
|
222
|
-
}
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
var Dialog = dialog.Dialog.Root;
|
|
226
|
-
function DialogPortal({ container: containerProp, ...props }) {
|
|
227
|
-
const rootContainer = portal.useRootPortalContainer();
|
|
228
|
-
const container = containerProp === void 0 ? rootContainer ?? void 0 : containerProp;
|
|
229
|
-
const style = {
|
|
230
|
-
...props.style ?? {},
|
|
231
|
-
// Ensure floating overlays inside dialogs (select/menu/popover/tooltip) stack above the dialog.
|
|
232
|
-
// Nested Base UI portals inherit this var via Base UI portal nesting.
|
|
233
|
-
["--z-layer-floating"]: "var(--z-layer-floating-elevated)"
|
|
234
|
-
};
|
|
235
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { container, ...props, style });
|
|
236
|
-
}
|
|
237
|
-
function DialogClose({ asChild, children, render, nativeButton, ...props }) {
|
|
238
|
-
const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
|
|
239
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
|
-
dialog.Dialog.Close,
|
|
241
|
-
{
|
|
242
|
-
"data-slot": "dialog-close",
|
|
243
|
-
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
244
|
-
render: render ?? childRender,
|
|
245
|
-
...props,
|
|
246
|
-
children: childRender ? void 0 : children
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
function DialogBackdrop({
|
|
251
|
-
className,
|
|
252
|
-
...props
|
|
253
|
-
}) {
|
|
254
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
255
|
-
dialog.Dialog.Backdrop,
|
|
256
|
-
{
|
|
257
|
-
className: cn(
|
|
258
|
-
"fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/32 backdrop-blur-sm transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
259
|
-
className
|
|
260
|
-
),
|
|
261
|
-
"data-slot": "dialog-backdrop",
|
|
262
|
-
...props
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
function DialogViewport({
|
|
267
|
-
className,
|
|
268
|
-
...props
|
|
269
|
-
}) {
|
|
270
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
271
|
-
dialog.Dialog.Viewport,
|
|
272
|
-
{
|
|
273
|
-
className: cn(
|
|
274
|
-
"fixed inset-0 z-[var(--z-layer-modal-content)] grid grid-rows-[1fr_auto_3fr] justify-items-center p-4",
|
|
275
|
-
className
|
|
276
|
-
),
|
|
277
|
-
"data-slot": "dialog-viewport",
|
|
278
|
-
...props
|
|
279
|
-
}
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
function DialogPopup({
|
|
283
|
-
className,
|
|
284
|
-
children,
|
|
285
|
-
showCloseButton = true,
|
|
286
|
-
bottomStickOnMobile = true,
|
|
287
|
-
...props
|
|
288
|
-
}) {
|
|
289
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
290
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogBackdrop, {}),
|
|
291
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
-
DialogViewport,
|
|
293
|
-
{
|
|
294
|
-
className: cn(
|
|
295
|
-
bottomStickOnMobile && "max-sm:grid-rows-[1fr_auto] max-sm:pt-12"
|
|
296
|
-
),
|
|
297
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
298
|
-
dialog.Dialog.Popup,
|
|
299
|
-
{
|
|
300
|
-
className: cn(
|
|
301
|
-
"-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-lg scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border bg-popover bg-clip-padding text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
|
|
302
|
-
bottomStickOnMobile && "max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 max-sm:before:hidden max-sm:before:rounded-none",
|
|
303
|
-
className
|
|
304
|
-
),
|
|
305
|
-
"data-slot": "dialog-popup",
|
|
306
|
-
...props,
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ jsxRuntime.jsx(portal.ModalPortalScope, { children }),
|
|
309
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
-
dialog.Dialog.Close,
|
|
311
|
-
{
|
|
312
|
-
"aria-label": "Close",
|
|
313
|
-
nativeButton: true,
|
|
314
|
-
render: (closeProps) => {
|
|
315
|
-
const { nativeButton: _, ...rest } = closeProps;
|
|
316
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
317
|
-
Button,
|
|
318
|
-
{
|
|
319
|
-
...rest,
|
|
320
|
-
className: "absolute end-2 top-2",
|
|
321
|
-
size: "icon",
|
|
322
|
-
variant: "ghost",
|
|
323
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {})
|
|
324
|
-
}
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
)
|
|
334
|
-
] });
|
|
335
|
-
}
|
|
336
|
-
function DialogHeader({ className, ...props }) {
|
|
337
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
338
|
-
"div",
|
|
339
|
-
{
|
|
340
|
-
className: cn(
|
|
341
|
-
"flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4",
|
|
342
|
-
className
|
|
343
|
-
),
|
|
344
|
-
"data-slot": "dialog-header",
|
|
345
|
-
...props
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
function DialogFooter({
|
|
350
|
-
className,
|
|
351
|
-
variant = "default",
|
|
352
|
-
...props
|
|
353
|
-
}) {
|
|
354
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
355
|
-
"div",
|
|
356
|
-
{
|
|
357
|
-
className: cn(
|
|
358
|
-
"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]",
|
|
359
|
-
variant === "default" && "border-t bg-muted/50 py-4",
|
|
360
|
-
variant === "bare" && "in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6",
|
|
361
|
-
className
|
|
362
|
-
),
|
|
363
|
-
"data-slot": "dialog-footer",
|
|
364
|
-
...props
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
}
|
|
368
|
-
function DialogTitle({ className, ...props }) {
|
|
369
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
370
|
-
dialog.Dialog.Title,
|
|
371
|
-
{
|
|
372
|
-
className: cn("font-heading text-xl leading-none", className),
|
|
373
|
-
"data-slot": "dialog-title",
|
|
374
|
-
...props
|
|
375
|
-
}
|
|
376
|
-
);
|
|
377
|
-
}
|
|
378
|
-
function DialogPanel({ className, ...props }) {
|
|
379
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
380
|
-
"div",
|
|
381
|
-
{
|
|
382
|
-
className: cn(
|
|
383
|
-
"px-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-header]))]:pt-6 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer]))]:pb-6! in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer].border-t))]:pb-1 pb-6",
|
|
384
|
-
className
|
|
385
|
-
),
|
|
386
|
-
"data-slot": "dialog-panel",
|
|
387
|
-
...props
|
|
388
|
-
}
|
|
389
|
-
) });
|
|
390
|
-
}
|
|
391
|
-
var LONG_DESCRIPTION_THRESHOLD = 140;
|
|
392
|
-
function isLongDescription(description) {
|
|
393
|
-
if (!description) return false;
|
|
394
|
-
return description.length > LONG_DESCRIPTION_THRESHOLD || description.includes("\n");
|
|
395
|
-
}
|
|
396
|
-
function ToastErrorContent({
|
|
397
|
-
toastId,
|
|
398
|
-
message,
|
|
399
|
-
description,
|
|
400
|
-
action,
|
|
401
|
-
onDismiss
|
|
402
|
-
}) {
|
|
403
|
-
const [detailsOpen, setDetailsOpen] = React.useState(false);
|
|
404
|
-
const [copied, setCopied] = React.useState(false);
|
|
405
|
-
const showDetails = isLongDescription(description);
|
|
406
|
-
const handleCopy = async () => {
|
|
407
|
-
if (!description) return;
|
|
408
|
-
try {
|
|
409
|
-
await navigator.clipboard.writeText(description);
|
|
410
|
-
setCopied(true);
|
|
411
|
-
setTimeout(() => setCopied(false), 1500);
|
|
412
|
-
} catch {
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
416
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
417
|
-
"div",
|
|
418
|
-
{
|
|
419
|
-
className: "bg-background text-foreground border-destructive/20 w-full rounded-md border px-4 py-3 shadow-lg\n sm:w-[var(--width)]",
|
|
420
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
421
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 grow gap-3", children: [
|
|
422
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "text-destructive mt-0.5 shrink-0", size: 16, "aria-hidden": "true" }),
|
|
423
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 grow flex-col gap-1", children: [
|
|
424
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-destructive text-sm font-medium break-words", children: message }),
|
|
425
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground line-clamp-3 text-sm break-words", children: description }),
|
|
426
|
-
(showDetails || action) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-4 gap-y-1", children: [
|
|
427
|
-
showDetails && /* @__PURE__ */ jsxRuntime.jsx(
|
|
428
|
-
"button",
|
|
429
|
-
{
|
|
430
|
-
className: "text-muted-foreground hover:text-foreground text-xs font-medium underline underline-offset-2 decoration-dotted",
|
|
431
|
-
onClick: () => setDetailsOpen(true),
|
|
432
|
-
children: "View details"
|
|
433
|
-
}
|
|
434
|
-
),
|
|
435
|
-
action && /* @__PURE__ */ jsxRuntime.jsx(
|
|
436
|
-
"button",
|
|
437
|
-
{
|
|
438
|
-
className: "text-destructive text-sm font-medium hover:underline",
|
|
439
|
-
onClick: action.onClick,
|
|
440
|
-
children: action.label
|
|
441
|
-
}
|
|
442
|
-
)
|
|
443
|
-
] })
|
|
444
|
-
] })
|
|
445
|
-
] }),
|
|
446
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
|
-
Button,
|
|
448
|
-
{
|
|
449
|
-
variant: "ghost",
|
|
450
|
-
className: "group -my-1.5 -me-2 size-8 shrink-0 p-0 hover:bg-transparent",
|
|
451
|
-
onClick: () => {
|
|
452
|
-
sonner.toast.dismiss(toastId);
|
|
453
|
-
onDismiss?.();
|
|
454
|
-
},
|
|
455
|
-
"aria-label": "Close error notification",
|
|
456
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { size: 16, className: "opacity-60 transition-opacity group-hover:opacity-100", "aria-hidden": "true" })
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
] })
|
|
460
|
-
}
|
|
461
|
-
),
|
|
462
|
-
showDetails && description && /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: detailsOpen, onOpenChange: setDetailsOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPopup, { className: "max-w-2xl", children: [
|
|
463
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: message }) }),
|
|
464
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogPanel, { children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "bg-muted text-foreground rounded-md p-3 text-xs break-words whitespace-pre-wrap", children: description }) }),
|
|
465
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
|
|
466
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", onClick: handleCopy, children: [
|
|
467
|
-
copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, { size: 14, "aria-hidden": "true" }),
|
|
468
|
-
copied ? "Copied" : "Copy"
|
|
469
|
-
] }),
|
|
470
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "Close" }) })
|
|
471
|
-
] })
|
|
472
|
-
] }) })
|
|
473
|
-
] });
|
|
474
|
-
}
|
|
475
|
-
function showErrorToast(props) {
|
|
476
|
-
return sonner.toast.custom((t) => /* @__PURE__ */ jsxRuntime.jsx(ToastErrorContent, { toastId: t, ...props }), {
|
|
477
|
-
duration: Infinity
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
function showInfoToast(props) {
|
|
481
|
-
const { message, description, action, onDismiss } = props;
|
|
482
|
-
return sonner.toast.custom((t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
483
|
-
"div",
|
|
484
|
-
{
|
|
485
|
-
className: "bg-background text-foreground border-primary/20 w-full rounded-md border px-4 py-3 shadow-lg\n sm:w-[var(--width)]",
|
|
486
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
487
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow gap-3", children: [
|
|
488
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "text-primary mt-0.5 shrink-0", size: 16, "aria-hidden": "true" }),
|
|
489
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow flex-col gap-1", children: [
|
|
490
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-primary text-sm font-medium", children: message }),
|
|
491
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
492
|
-
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: "text-primary text-sm font-medium hover:underline", onClick: action.onClick, children: action.label }) })
|
|
493
|
-
] })
|
|
494
|
-
] }),
|
|
495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
496
|
-
Button,
|
|
497
|
-
{
|
|
498
|
-
variant: "ghost",
|
|
499
|
-
className: "group -my-1.5 -me-2 size-8 shrink-0 p-0 hover:bg-transparent",
|
|
500
|
-
onClick: () => {
|
|
501
|
-
sonner.toast.dismiss(t);
|
|
502
|
-
onDismiss?.();
|
|
503
|
-
},
|
|
504
|
-
"aria-label": "Close info notification",
|
|
505
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { size: 16, className: "opacity-60 transition-opacity group-hover:opacity-100", "aria-hidden": "true" })
|
|
506
|
-
}
|
|
507
|
-
)
|
|
508
|
-
] })
|
|
509
|
-
}
|
|
510
|
-
));
|
|
511
|
-
}
|
|
512
|
-
function showSuccessToast(props) {
|
|
513
|
-
const { message, description, action, onDismiss } = props;
|
|
514
|
-
return sonner.toast.custom((t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
-
"div",
|
|
516
|
-
{
|
|
517
|
-
className: "bg-background text-foreground w-full rounded-md border border-green-200/60 px-4 py-3 shadow-lg\n sm:w-[var(--width)] dark:border-green-800/50",
|
|
518
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
519
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow gap-3", children: [
|
|
520
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
521
|
-
lucideReact.CheckCircleIcon,
|
|
522
|
-
{
|
|
523
|
-
className: "mt-0.5 shrink-0 text-green-600 dark:text-green-500",
|
|
524
|
-
size: 16,
|
|
525
|
-
"aria-hidden": "true"
|
|
526
|
-
}
|
|
527
|
-
),
|
|
528
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow flex-col gap-1", children: [
|
|
529
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-green-700 dark:text-green-400", children: message }),
|
|
530
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
531
|
-
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
-
"button",
|
|
533
|
-
{
|
|
534
|
-
className: "text-sm font-medium text-green-700 hover:underline dark:text-green-400",
|
|
535
|
-
onClick: action.onClick,
|
|
536
|
-
children: action.label
|
|
537
|
-
}
|
|
538
|
-
) })
|
|
539
|
-
] })
|
|
540
|
-
] }),
|
|
541
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
542
|
-
Button,
|
|
543
|
-
{
|
|
544
|
-
variant: "ghost",
|
|
545
|
-
className: "group -my-1.5 -me-2 size-8 shrink-0 p-0 hover:bg-transparent",
|
|
546
|
-
onClick: () => {
|
|
547
|
-
sonner.toast.dismiss(t);
|
|
548
|
-
onDismiss?.();
|
|
549
|
-
},
|
|
550
|
-
"aria-label": "Close success notification",
|
|
551
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { size: 16, className: "opacity-60 transition-opacity group-hover:opacity-100", "aria-hidden": "true" })
|
|
552
|
-
}
|
|
553
|
-
)
|
|
554
|
-
] })
|
|
555
|
-
}
|
|
556
|
-
));
|
|
557
|
-
}
|
|
558
|
-
function showWarningToast(props) {
|
|
559
|
-
const { message, description, action, onDismiss } = props;
|
|
560
|
-
return sonner.toast.custom((t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
-
"div",
|
|
562
|
-
{
|
|
563
|
-
className: "bg-background text-foreground w-full rounded-md border border-amber-200/60 px-4 py-3 shadow-lg\n sm:w-[var(--width)] dark:border-amber-800/50",
|
|
564
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
565
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow gap-3", children: [
|
|
566
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangleIcon, { className: "mt-0.5 shrink-0 text-amber-500", size: 16, "aria-hidden": "true" }),
|
|
567
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex grow flex-col gap-1", children: [
|
|
568
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-amber-700 dark:text-amber-400", children: message }),
|
|
569
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
570
|
-
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
571
|
-
"button",
|
|
572
|
-
{
|
|
573
|
-
className: "text-sm font-medium text-amber-700 hover:underline dark:text-amber-400",
|
|
574
|
-
onClick: action.onClick,
|
|
575
|
-
children: action.label
|
|
576
|
-
}
|
|
577
|
-
) })
|
|
578
|
-
] })
|
|
579
|
-
] }),
|
|
580
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
581
|
-
Button,
|
|
582
|
-
{
|
|
583
|
-
variant: "ghost",
|
|
584
|
-
className: "group -my-1.5 -me-2 size-8 shrink-0 p-0 hover:bg-transparent",
|
|
585
|
-
onClick: () => {
|
|
586
|
-
sonner.toast.dismiss(t);
|
|
587
|
-
onDismiss?.();
|
|
588
|
-
},
|
|
589
|
-
"aria-label": "Close warning notification",
|
|
590
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { size: 16, className: "opacity-60 transition-opacity group-hover:opacity-100", "aria-hidden": "true" })
|
|
591
|
-
}
|
|
592
|
-
)
|
|
593
|
-
] })
|
|
594
|
-
}
|
|
595
|
-
));
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
// src/components/toast/index.ts
|
|
599
|
-
var toast5 = {
|
|
600
|
-
error: showErrorToast,
|
|
601
|
-
info: showInfoToast,
|
|
602
|
-
success: showSuccessToast,
|
|
603
|
-
warning: showWarningToast
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
exports.showErrorToast = showErrorToast;
|
|
607
|
-
exports.showInfoToast = showInfoToast;
|
|
608
|
-
exports.showSuccessToast = showSuccessToast;
|
|
609
|
-
exports.showWarningToast = showWarningToast;
|
|
610
|
-
exports.toast = toast5;
|
|
611
|
-
//# sourceMappingURL=index.cjs.map
|
|
612
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use client';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_toast = require('../../toast-D6MqijT2.cjs');
|
|
4
|
+
|
|
5
|
+
exports.showErrorToast = require_toast.showErrorToast;
|
|
6
|
+
exports.showInfoToast = require_toast.showInfoToast;
|
|
7
|
+
exports.showSuccessToast = require_toast.showSuccessToast;
|
|
8
|
+
exports.showWarningToast = require_toast.showWarningToast;
|
|
9
|
+
exports.toast = require_toast.toast;
|
|
@@ -1,52 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
description?: string;
|
|
4
|
-
action?: {
|
|
5
|
-
label: string;
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
};
|
|
8
|
-
onDismiss?: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare function showErrorToast(props: ToastErrorProps): string | number;
|
|
11
|
-
|
|
12
|
-
interface ToastInfoProps {
|
|
13
|
-
message: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
action?: {
|
|
16
|
-
label: string;
|
|
17
|
-
onClick: () => void;
|
|
18
|
-
};
|
|
19
|
-
onDismiss?: () => void;
|
|
20
|
-
}
|
|
21
|
-
declare function showInfoToast(props: ToastInfoProps): string | number;
|
|
22
|
-
|
|
23
|
-
interface ToastSuccessProps {
|
|
24
|
-
message: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
action?: {
|
|
27
|
-
label: string;
|
|
28
|
-
onClick: () => void;
|
|
29
|
-
};
|
|
30
|
-
onDismiss?: () => void;
|
|
31
|
-
}
|
|
32
|
-
declare function showSuccessToast(props: ToastSuccessProps): string | number;
|
|
33
|
-
|
|
34
|
-
interface ToastWarningProps {
|
|
35
|
-
message: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
action?: {
|
|
38
|
-
label: string;
|
|
39
|
-
onClick: () => void;
|
|
40
|
-
};
|
|
41
|
-
onDismiss?: () => void;
|
|
42
|
-
}
|
|
43
|
-
declare function showWarningToast(props: ToastWarningProps): string | number;
|
|
44
|
-
|
|
45
|
-
declare const toast: {
|
|
46
|
-
error: typeof showErrorToast;
|
|
47
|
-
info: typeof showInfoToast;
|
|
48
|
-
success: typeof showSuccessToast;
|
|
49
|
-
warning: typeof showWarningToast;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, toast };
|
|
1
|
+
import { a as showSuccessToast, c as ToastErrorProps, i as ToastSuccessProps, l as showErrorToast, n as ToastWarningProps, o as ToastInfoProps, r as showWarningToast, s as showInfoToast, t as toast } from "../../index-UnM04j0t.cjs";
|
|
2
|
+
export { type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, toast };
|