@constructive-io/ui 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button-D4vqTxhp.d.cts +20 -0
- package/dist/button-D4vqTxhp.d.ts +20 -0
- package/dist/components/alert-dialog.cjs +98 -302
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.d.cts +22 -21
- package/dist/components/alert-dialog.d.ts +22 -21
- package/dist/components/alert-dialog.js +96 -281
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +51 -108
- package/dist/components/alert.cjs.map +1 -1
- package/dist/components/alert.d.cts +13 -13
- package/dist/components/alert.d.ts +13 -13
- package/dist/components/alert.js +49 -87
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +73 -359
- package/dist/components/app-bar.cjs.map +1 -1
- package/dist/components/app-bar.d.cts +21 -20
- package/dist/components/app-bar.d.ts +21 -20
- package/dist/components/app-bar.js +71 -338
- package/dist/components/app-bar.js.map +1 -1
- package/dist/components/app-shell.cjs +252 -1777
- package/dist/components/app-shell.cjs.map +1 -1
- package/dist/components/app-shell.d.cts +77 -85
- package/dist/components/app-shell.d.ts +77 -85
- package/dist/components/app-shell.js +249 -1756
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/autocomplete.cjs +146 -397
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.d.cts +24 -24
- package/dist/components/autocomplete.d.ts +24 -24
- package/dist/components/autocomplete.js +146 -376
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +26 -38
- package/dist/components/avatar.cjs.map +1 -1
- package/dist/components/avatar.d.cts +11 -10
- package/dist/components/avatar.d.ts +11 -10
- package/dist/components/avatar.js +24 -37
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +42 -60
- package/dist/components/badge.cjs.map +1 -1
- package/dist/components/badge.d.cts +13 -13
- package/dist/components/badge.d.ts +13 -13
- package/dist/components/badge.js +39 -38
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +65 -94
- package/dist/components/breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb.d.cts +14 -13
- package/dist/components/breadcrumb.d.ts +14 -13
- package/dist/components/breadcrumb.js +63 -73
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +68 -162
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +2 -20
- package/dist/components/button.d.ts +2 -20
- package/dist/components/button.js +65 -140
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +49 -62
- package/dist/components/calendar-rac.cjs.map +1 -1
- package/dist/components/calendar-rac.d.cts +8 -8
- package/dist/components/calendar-rac.d.ts +8 -8
- package/dist/components/calendar-rac.js +49 -61
- package/dist/components/calendar-rac.js.map +1 -1
- package/dist/components/card.cjs +61 -74
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.d.cts +15 -16
- package/dist/components/card.d.ts +15 -16
- package/dist/components/card.js +58 -72
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +12 -11
- package/dist/components/checkbox-group.cjs.map +1 -1
- package/dist/components/checkbox-group.d.cts +5 -5
- package/dist/components/checkbox-group.d.ts +5 -5
- package/dist/components/checkbox-group.js +12 -10
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.cjs +60 -114
- package/dist/components/checkbox.cjs.map +1 -1
- package/dist/components/checkbox.d.cts +6 -6
- package/dist/components/checkbox.d.ts +6 -6
- package/dist/components/checkbox.js +58 -93
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +76 -113
- package/dist/components/collapsible.cjs.map +1 -1
- package/dist/components/collapsible.d.cts +16 -15
- package/dist/components/collapsible.d.ts +16 -15
- package/dist/components/collapsible.js +74 -92
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +213 -507
- package/dist/components/combobox.cjs.map +1 -1
- package/dist/components/combobox.d.cts +36 -35
- package/dist/components/combobox.d.ts +36 -35
- package/dist/components/combobox.js +229 -504
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +102 -199
- package/dist/components/command.cjs.map +1 -1
- package/dist/components/command.d.cts +22 -21
- package/dist/components/command.d.ts +22 -21
- package/dist/components/command.js +100 -198
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +110 -402
- package/dist/components/dialog.cjs.map +1 -1
- package/dist/components/dialog.d.cts +27 -26
- package/dist/components/dialog.d.ts +27 -26
- package/dist/components/dialog.js +107 -380
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +80 -111
- package/dist/components/dock.cjs.map +1 -1
- package/dist/components/dock.d.cts +25 -25
- package/dist/components/dock.d.ts +25 -25
- package/dist/components/dock.js +78 -106
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +77 -111
- package/dist/components/drawer.cjs.map +1 -1
- package/dist/components/drawer.d.cts +15 -14
- package/dist/components/drawer.d.ts +15 -14
- package/dist/components/drawer.js +75 -90
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +163 -238
- package/dist/components/dropdown-menu.cjs.map +1 -1
- package/dist/components/dropdown-menu.d.cts +44 -43
- package/dist/components/dropdown-menu.d.ts +44 -43
- package/dist/components/dropdown-menu.js +161 -217
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +51 -85
- package/dist/components/empty.cjs.map +1 -1
- package/dist/components/empty.d.cts +13 -13
- package/dist/components/empty.d.ts +13 -13
- package/dist/components/empty.js +48 -83
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.cjs +150 -259
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.d.cts +39 -39
- package/dist/components/field.d.ts +39 -39
- package/dist/components/field.js +148 -238
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +143 -166
- package/dist/components/flickering-grid.cjs.map +1 -1
- package/dist/components/flickering-grid.d.cts +14 -13
- package/dist/components/flickering-grid.d.ts +14 -13
- package/dist/components/flickering-grid.js +141 -161
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +56 -188
- package/dist/components/flow-zoom-panel.cjs.map +1 -1
- package/dist/components/flow-zoom-panel.d.cts +9 -9
- package/dist/components/flow-zoom-panel.d.ts +9 -9
- package/dist/components/flow-zoom-panel.js +56 -168
- package/dist/components/flow-zoom-panel.js.map +1 -1
- package/dist/components/form-control.cjs +58 -186
- package/dist/components/form-control.cjs.map +1 -1
- package/dist/components/form-control.d.cts +11 -10
- package/dist/components/form-control.d.ts +11 -10
- package/dist/components/form-control.js +56 -165
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +78 -184
- package/dist/components/form.cjs.map +1 -1
- package/dist/components/form.d.cts +2 -36
- package/dist/components/form.d.ts +2 -36
- package/dist/components/form.js +76 -163
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +51 -165
- package/dist/components/input-group.cjs.map +1 -1
- package/dist/components/input-group.d.cts +14 -15
- package/dist/components/input-group.d.ts +14 -15
- package/dist/components/input-group.js +51 -164
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +30 -55
- package/dist/components/input.cjs.map +1 -1
- package/dist/components/input.d.cts +2 -10
- package/dist/components/input.d.ts +2 -10
- package/dist/components/input.js +30 -54
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +133 -337
- package/dist/components/json-input.cjs.map +1 -1
- package/dist/components/json-input.d.cts +20 -19
- package/dist/components/json-input.d.ts +20 -19
- package/dist/components/json-input.js +132 -317
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +19 -21
- package/dist/components/label.cjs.map +1 -1
- package/dist/components/label.d.cts +6 -5
- package/dist/components/label.d.ts +6 -5
- package/dist/components/label.js +17 -20
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +61 -101
- package/dist/components/motion-grid.cjs.map +1 -1
- package/dist/components/motion-grid.d.cts +15 -14
- package/dist/components/motion-grid.d.ts +15 -14
- package/dist/components/motion-grid.js +59 -80
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +563 -786
- package/dist/components/multi-select.cjs.map +1 -1
- package/dist/components/multi-select.d.cts +173 -173
- package/dist/components/multi-select.d.ts +173 -173
- package/dist/components/multi-select.js +561 -765
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +24 -13
- package/dist/components/page-header.cjs.map +1 -1
- package/dist/components/page-header.d.cts +11 -11
- package/dist/components/page-header.d.ts +11 -11
- package/dist/components/page-header.js +23 -11
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.cjs +72 -272
- package/dist/components/pagination.cjs.map +1 -1
- package/dist/components/pagination.d.cts +15 -16
- package/dist/components/pagination.d.ts +15 -16
- package/dist/components/pagination.js +69 -250
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +68 -111
- package/dist/components/popover.cjs.map +1 -1
- package/dist/components/popover.d.cts +31 -30
- package/dist/components/popover.d.ts +31 -30
- package/dist/components/popover.js +66 -90
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +128 -81
- package/dist/components/portal.cjs.map +1 -1
- package/dist/components/portal.d.cts +24 -23
- package/dist/components/portal.d.ts +24 -23
- package/dist/components/portal.js +126 -60
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +23 -24
- package/dist/components/progress.cjs.map +1 -1
- package/dist/components/progress.d.cts +8 -7
- package/dist/components/progress.d.ts +8 -7
- package/dist/components/progress.js +21 -23
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +70 -138
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
- package/dist/components/progressive-blur-scroll-container.d.cts +19 -19
- package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
- package/dist/components/progressive-blur-scroll-container.js +70 -137
- package/dist/components/progressive-blur-scroll-container.js.map +1 -1
- package/dist/components/progressive-blur.cjs +40 -64
- package/dist/components/progressive-blur.cjs.map +1 -1
- package/dist/components/progressive-blur.d.cts +15 -14
- package/dist/components/progressive-blur.d.ts +15 -14
- package/dist/components/progressive-blur.js +38 -63
- package/dist/components/progressive-blur.js.map +1 -1
- package/dist/components/radio-group.cjs +28 -42
- package/dist/components/radio-group.cjs.map +1 -1
- package/dist/components/radio-group.d.cts +8 -8
- package/dist/components/radio-group.d.ts +8 -8
- package/dist/components/radio-group.js +28 -41
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +6 -418
- package/dist/components/record-picker.d.cts +13 -13
- package/dist/components/record-picker.d.ts +13 -13
- package/dist/components/record-picker.js +5 -397
- package/dist/components/resizable.cjs +32 -58
- package/dist/components/resizable.cjs.map +1 -1
- package/dist/components/resizable.d.cts +10 -9
- package/dist/components/resizable.d.ts +10 -9
- package/dist/components/resizable.js +29 -37
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +50 -61
- package/dist/components/responsive-diagram.cjs.map +1 -1
- package/dist/components/responsive-diagram.d.cts +7 -7
- package/dist/components/responsive-diagram.d.ts +7 -7
- package/dist/components/responsive-diagram.js +50 -60
- package/dist/components/responsive-diagram.js.map +1 -1
- package/dist/components/scroll-area.cjs +37 -83
- package/dist/components/scroll-area.cjs.map +1 -1
- package/dist/components/scroll-area.d.cts +9 -8
- package/dist/components/scroll-area.d.ts +9 -8
- package/dist/components/scroll-area.js +35 -62
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +175 -300
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +36 -35
- package/dist/components/select.d.ts +36 -35
- package/dist/components/select.js +172 -278
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +16 -19
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +2 -10
- package/dist/components/separator.d.ts +2 -10
- package/dist/components/separator.js +14 -18
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +17 -487
- package/dist/components/sheet.d.cts +85 -85
- package/dist/components/sheet.d.ts +85 -85
- package/dist/components/sheet.js +3 -453
- package/dist/components/sidebar.cjs +27 -1298
- package/dist/components/sidebar.d.cts +62 -65
- package/dist/components/sidebar.d.ts +62 -65
- package/dist/components/sidebar.js +3 -1254
- package/dist/components/skeleton.cjs +18 -30
- package/dist/components/skeleton.cjs.map +1 -1
- package/dist/components/skeleton.d.cts +6 -5
- package/dist/components/skeleton.d.ts +6 -5
- package/dist/components/skeleton.js +15 -28
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +17 -19
- package/dist/components/sonner.cjs.map +1 -1
- package/dist/components/sonner.d.cts +7 -7
- package/dist/components/sonner.d.ts +7 -7
- package/dist/components/sonner.js +17 -18
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/stack/index.cjs +43 -1515
- package/dist/components/stack/index.d.cts +2 -672
- package/dist/components/stack/index.d.ts +2 -672
- package/dist/components/stack/index.js +3 -1455
- package/dist/components/stepper.cjs +131 -285
- package/dist/components/stepper.cjs.map +1 -1
- package/dist/components/stepper.d.cts +27 -26
- package/dist/components/stepper.d.ts +27 -26
- package/dist/components/stepper.js +130 -265
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +21 -32
- package/dist/components/switch.cjs.map +1 -1
- package/dist/components/switch.d.cts +7 -6
- package/dist/components/switch.d.ts +7 -6
- package/dist/components/switch.js +19 -31
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +58 -106
- package/dist/components/table.cjs.map +1 -1
- package/dist/components/table.d.cts +17 -16
- package/dist/components/table.d.ts +17 -16
- package/dist/components/table.js +55 -104
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +31 -35
- package/dist/components/tabs.cjs.map +1 -1
- package/dist/components/tabs.d.cts +9 -8
- package/dist/components/tabs.d.ts +9 -8
- package/dist/components/tabs.js +29 -34
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +114 -433
- package/dist/components/tags.cjs.map +1 -1
- package/dist/components/tags.d.cts +24 -28
- package/dist/components/tags.d.ts +24 -28
- package/dist/components/tags.js +114 -413
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +27 -49
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.d.cts +8 -7
- package/dist/components/textarea.d.ts +8 -7
- package/dist/components/textarea.js +27 -48
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +9 -612
- package/dist/components/toast/index.d.cts +2 -52
- package/dist/components/toast/index.d.ts +2 -52
- package/dist/components/toast/index.js +3 -586
- package/dist/components/tooltip.cjs +47 -72
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +2 -28
- package/dist/components/tooltip.d.ts +2 -28
- package/dist/components/tooltip.js +45 -51
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +19 -192
- package/dist/components/unlink-button.cjs.map +1 -1
- package/dist/components/unlink-button.d.cts +11 -11
- package/dist/components/unlink-button.d.ts +11 -11
- package/dist/components/unlink-button.js +18 -170
- package/dist/components/unlink-button.js.map +1 -1
- package/dist/form-DgRTv7O7.d.ts +54 -0
- package/dist/form-DoZEWSzb.d.cts +54 -0
- package/dist/index-CjA4CENl.d.cts +684 -0
- package/dist/index-CjA4CENl.d.ts +684 -0
- package/dist/index-UnM04j0t.d.cts +58 -0
- package/dist/index-UnM04j0t.d.ts +58 -0
- package/dist/index.cjs +408 -8697
- package/dist/index.d.cts +224 -2136
- package/dist/index.d.ts +224 -2136
- package/dist/index.js +65 -8350
- package/dist/input-CBrCuMH8.d.cts +11 -0
- package/dist/input-CBrCuMH8.d.ts +11 -0
- package/dist/motion-config-COCFHq1L.cjs +271 -0
- package/dist/motion-config-COCFHq1L.cjs.map +1 -0
- package/dist/motion-config-COsZ6azM.js +241 -0
- package/dist/motion-config-COsZ6azM.js.map +1 -0
- package/dist/record-picker-BbxngCeV.js +162 -0
- package/dist/record-picker-BbxngCeV.js.map +1 -0
- package/dist/record-picker-Bz4FApxD.cjs +167 -0
- package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
- package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
- package/dist/separator-BQEsr0Rc.d.cts +11 -0
- package/dist/separator-BQEsr0Rc.d.ts +11 -0
- package/dist/sheet-BLHnhLRH.js +425 -0
- package/dist/sheet-BLHnhLRH.js.map +1 -0
- package/dist/sheet-BdA0rfIz.cjs +515 -0
- package/dist/sheet-BdA0rfIz.cjs.map +1 -0
- package/dist/sidebar-BavjjJp0.cjs +625 -0
- package/dist/sidebar-BavjjJp0.cjs.map +1 -0
- package/dist/sidebar-DeoL2ttp.js +481 -0
- package/dist/sidebar-DeoL2ttp.js.map +1 -0
- package/dist/slot-C-jEfihz.cjs +122 -0
- package/dist/slot-C-jEfihz.cjs.map +1 -0
- package/dist/slot-EL8zfLG0.js +97 -0
- package/dist/slot-EL8zfLG0.js.map +1 -0
- package/dist/stack-DKdvlOM6.cjs +1771 -0
- package/dist/stack-DKdvlOM6.cjs.map +1 -0
- package/dist/stack-jMdxDrex.js +1531 -0
- package/dist/stack-jMdxDrex.js.map +1 -0
- package/dist/toast-D6MqijT2.cjs +316 -0
- package/dist/toast-D6MqijT2.cjs.map +1 -0
- package/dist/toast-D_BOLzm3.js +287 -0
- package/dist/toast-D_BOLzm3.js.map +1 -0
- package/dist/tooltip-CTRQoN1A.d.cts +29 -0
- package/dist/tooltip-CTRQoN1A.d.ts +29 -0
- package/dist/utils-BkMLyah9.js +12 -0
- package/dist/utils-BkMLyah9.js.map +1 -0
- package/dist/utils-CzTQ3-VI.cjs +17 -0
- package/dist/utils-CzTQ3-VI.cjs.map +1 -0
- package/package.json +5 -5
- package/dist/components/record-picker.cjs.map +0 -1
- package/dist/components/record-picker.js.map +0 -1
- package/dist/components/sheet.cjs.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.cjs.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/stack/index.cjs.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/toast/index.cjs.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,92 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
1
|
+
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
|
|
5
|
+
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _constructive_io_ui_portal = require("@constructive-io/ui/portal");
|
|
10
|
+
let _base_ui_react_tooltip = require("@base-ui/react/tooltip");
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
-
|
|
31
|
-
function cn(...inputs) {
|
|
32
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
|
-
}
|
|
12
|
+
//#region src/components/tooltip.tsx
|
|
34
13
|
function TooltipProvider({ delay = 0, delayDuration, ...props }) {
|
|
35
|
-
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Provider, {
|
|
15
|
+
"data-slot": "tooltip-provider",
|
|
16
|
+
delay: delayDuration ?? delay,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
36
19
|
}
|
|
37
20
|
function Tooltip({ delayDuration: _delayDuration, ...props }) {
|
|
38
|
-
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Root, {
|
|
22
|
+
"data-slot": "tooltip",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
39
25
|
}
|
|
40
26
|
function TooltipTrigger({ delay = 0, asChild, children, render, ...props }) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
children: childRender ? void 0 : children
|
|
50
|
-
}
|
|
51
|
-
);
|
|
27
|
+
const childRender = render === void 0 && asChild && react.isValidElement(children) ? children : void 0;
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Trigger, {
|
|
29
|
+
"data-slot": "tooltip-trigger",
|
|
30
|
+
delay,
|
|
31
|
+
render: render ?? childRender,
|
|
32
|
+
...props,
|
|
33
|
+
children: childRender ? void 0 : children
|
|
34
|
+
});
|
|
52
35
|
}
|
|
53
|
-
function TooltipContent({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
"data-slot": "tooltip-content",
|
|
67
|
-
className: cn(
|
|
68
|
-
`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1
|
|
36
|
+
function TooltipContent({ className, sideOffset = 4, showArrow = false, side = "top", align = "center", children, ...props }) {
|
|
37
|
+
const { container, zIndexClass } = (0, _constructive_io_ui_portal.useFloatingOverlayPortalProps)();
|
|
38
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Portal, {
|
|
39
|
+
container,
|
|
40
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Positioner, {
|
|
41
|
+
side,
|
|
42
|
+
align,
|
|
43
|
+
sideOffset,
|
|
44
|
+
className: zIndexClass,
|
|
45
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_tooltip.Tooltip.Popup, {
|
|
46
|
+
"data-slot": "tooltip-content",
|
|
47
|
+
className: require_utils.cn(`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1
|
|
69
48
|
text-xs transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
70
49
|
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
71
50
|
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
72
51
|
data-[side=left]:data-starting-style:translate-x-2
|
|
73
52
|
data-[side=right]:data-starting-style:-translate-x-2
|
|
74
|
-
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Arrow, { className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]" })
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
) }) });
|
|
53
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
54
|
+
...props,
|
|
55
|
+
role: "tooltip",
|
|
56
|
+
children: [children, showArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Arrow, { className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]" })]
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
85
60
|
}
|
|
86
61
|
|
|
62
|
+
//#endregion
|
|
87
63
|
exports.Tooltip = Tooltip;
|
|
88
64
|
exports.TooltipContent = TooltipContent;
|
|
89
65
|
exports.TooltipProvider = TooltipProvider;
|
|
90
66
|
exports.TooltipTrigger = TooltipTrigger;
|
|
91
|
-
//# sourceMappingURL=tooltip.cjs.map
|
|
92
67
|
//# sourceMappingURL=tooltip.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"tooltip.cjs","names":["TooltipPrimitive","React","cn"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';\n\nimport { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';\nimport { cn } from '../lib/utils';\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider> & {\n\t/** @deprecated Use delay instead */\n\tdelayDuration?: number;\n};\n\nfunction TooltipProvider({ delay = 0, delayDuration, ...props }: TooltipProviderProps) {\n\treturn <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delay={delayDuration ?? delay} {...props} />;\n}\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root> & {\n\t/** @deprecated Use delay on Trigger instead */\n\tdelayDuration?: number;\n};\n\nfunction Tooltip({ delayDuration: _delayDuration, ...props }: TooltipProps) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\ntype TooltipTriggerProps = React.ComponentProps<typeof TooltipPrimitive.Trigger> & {\n\tdelay?: number;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction TooltipTrigger({ delay = 0, asChild, children, render, ...props }: TooltipTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<TooltipPrimitive.Trigger\n\t\t\tdata-slot=\"tooltip-trigger\"\n\t\t\tdelay={delay}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</TooltipPrimitive.Trigger>\n\t);\n}\n\ntype TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Popup> & {\n\tsideOffset?: number;\n\tshowArrow?: boolean;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\talign?: 'start' | 'center' | 'end';\n};\n\nfunction TooltipContent({\n\tclassName,\n\tsideOffset = 4,\n\tshowArrow = false,\n\tside = 'top',\n\talign = 'center',\n\tchildren,\n\t...props\n}: TooltipContentProps) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<TooltipPrimitive.Portal container={container}>\n\t\t\t<TooltipPrimitive.Positioner side={side} align={align} sideOffset={sideOffset} className={zIndexClass}>\n\t\t\t\t<TooltipPrimitive.Popup\n\t\t\t\t\tdata-slot=\"tooltip-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1\n\t\t\t\t\t\ttext-xs transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t\trole=\"tooltip\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t<TooltipPrimitive.Arrow className='fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]' />\n\t\t\t\t\t)}\n\t\t\t\t</TooltipPrimitive.Popup>\n\t\t\t</TooltipPrimitive.Positioner>\n\t\t</TooltipPrimitive.Portal>\n\t);\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":";;;;;;;;;;;;AAaA,SAAS,gBAAgB,EAAE,QAAQ,GAAG,eAAe,GAAG,SAA+B;CACtF,OAAO,2CAACA,+BAAiB,UAAlB;EAA2B,aAAU;EAAmB,OAAO,iBAAiB;EAAO,GAAI;CAAQ;AAC3G;AAOA,SAAS,QAAQ,EAAE,eAAe,gBAAgB,GAAG,SAAuB;CAC3E,OAAO,2CAACA,+BAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ;AAC/D;AAQA,SAAS,eAAe,EAAE,QAAQ,GAAG,SAAS,UAAU,QAAQ,GAAG,SAA8B;CAChG,MAAM,cAAc,WAAW,UAAa,WAAWC,MAAM,eAAe,QAAQ,IAAI,WAAW;CAEnG,OACC,2CAACD,+BAAiB,SAAlB;EACC,aAAU;EACH;EACP,QAAQ,UAAU;EAClB,GAAI;YAEH,cAAc,SAAY;CACF;AAE5B;AASA,SAAS,eAAe,EACvB,WACA,aAAa,GACb,YAAY,OACZ,OAAO,OACP,QAAQ,UACR,UACA,GAAG,SACoB;CACvB,MAAM,EAAE,WAAW,8EAA8C;CAEjE,OACC,2CAACA,+BAAiB,QAAlB;EAAoC;YACnC,2CAACA,+BAAiB,YAAlB;GAAmC;GAAa;GAAmB;GAAY,WAAW;aACzF,4CAACA,+BAAiB,OAAlB;IACC,aAAU;IACV,WAAWE,iBACV;;;;;;wFAOA,SACD;IACA,GAAI;IACJ,MAAK;cAbN,CAeE,UACA,aACA,2CAACF,+BAAiB,OAAlB,EAAwB,WAAU,+DAAgE,EAE5E;;EACI;CACL;AAE3B"}
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type TooltipProviderProps = React.ComponentProps<typeof Tooltip$1.Provider> & {
|
|
5
|
-
/** @deprecated Use delay instead */
|
|
6
|
-
delayDuration?: number;
|
|
7
|
-
};
|
|
8
|
-
declare function TooltipProvider({ delay, delayDuration, ...props }: TooltipProviderProps): React.JSX.Element;
|
|
9
|
-
type TooltipProps = React.ComponentProps<typeof Tooltip$1.Root> & {
|
|
10
|
-
/** @deprecated Use delay on Trigger instead */
|
|
11
|
-
delayDuration?: number;
|
|
12
|
-
};
|
|
13
|
-
declare function Tooltip({ delayDuration: _delayDuration, ...props }: TooltipProps): React.JSX.Element;
|
|
14
|
-
type TooltipTriggerProps = React.ComponentProps<typeof Tooltip$1.Trigger> & {
|
|
15
|
-
delay?: number;
|
|
16
|
-
/** When true, merges props onto the child element instead of rendering a button */
|
|
17
|
-
asChild?: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare function TooltipTrigger({ delay, asChild, children, render, ...props }: TooltipTriggerProps): React.JSX.Element;
|
|
20
|
-
type TooltipContentProps = React.ComponentProps<typeof Tooltip$1.Popup> & {
|
|
21
|
-
sideOffset?: number;
|
|
22
|
-
showArrow?: boolean;
|
|
23
|
-
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
24
|
-
align?: 'start' | 'center' | 'end';
|
|
25
|
-
};
|
|
26
|
-
declare function TooltipContent({ className, sideOffset, showArrow, side, align, children, ...props }: TooltipContentProps): React.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
1
|
+
import { i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "../tooltip-CTRQoN1A.cjs";
|
|
2
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type TooltipProviderProps = React.ComponentProps<typeof Tooltip$1.Provider> & {
|
|
5
|
-
/** @deprecated Use delay instead */
|
|
6
|
-
delayDuration?: number;
|
|
7
|
-
};
|
|
8
|
-
declare function TooltipProvider({ delay, delayDuration, ...props }: TooltipProviderProps): React.JSX.Element;
|
|
9
|
-
type TooltipProps = React.ComponentProps<typeof Tooltip$1.Root> & {
|
|
10
|
-
/** @deprecated Use delay on Trigger instead */
|
|
11
|
-
delayDuration?: number;
|
|
12
|
-
};
|
|
13
|
-
declare function Tooltip({ delayDuration: _delayDuration, ...props }: TooltipProps): React.JSX.Element;
|
|
14
|
-
type TooltipTriggerProps = React.ComponentProps<typeof Tooltip$1.Trigger> & {
|
|
15
|
-
delay?: number;
|
|
16
|
-
/** When true, merges props onto the child element instead of rendering a button */
|
|
17
|
-
asChild?: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare function TooltipTrigger({ delay, asChild, children, render, ...props }: TooltipTriggerProps): React.JSX.Element;
|
|
20
|
-
type TooltipContentProps = React.ComponentProps<typeof Tooltip$1.Popup> & {
|
|
21
|
-
sideOffset?: number;
|
|
22
|
-
showArrow?: boolean;
|
|
23
|
-
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
24
|
-
align?: 'start' | 'center' | 'end';
|
|
25
|
-
};
|
|
26
|
-
declare function TooltipContent({ className, sideOffset, showArrow, side, align, children, ...props }: TooltipContentProps): React.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
1
|
+
import { i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "../tooltip-CTRQoN1A.js";
|
|
2
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,67 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
4
|
-
import { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';
|
|
5
|
-
import { clsx } from 'clsx';
|
|
6
|
-
import { twMerge } from 'tailwind-merge';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
'use client';
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
3
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useFloatingOverlayPortalProps } from "@constructive-io/ui/portal";
|
|
7
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
8
|
+
|
|
9
|
+
//#region src/components/tooltip.tsx
|
|
12
10
|
function TooltipProvider({ delay = 0, delayDuration, ...props }) {
|
|
13
|
-
|
|
11
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
12
|
+
"data-slot": "tooltip-provider",
|
|
13
|
+
delay: delayDuration ?? delay,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
14
16
|
}
|
|
15
17
|
function Tooltip({ delayDuration: _delayDuration, ...props }) {
|
|
16
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Root, {
|
|
19
|
+
"data-slot": "tooltip",
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
17
22
|
}
|
|
18
23
|
function TooltipTrigger({ delay = 0, asChild, children, render, ...props }) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: childRender ? void 0 : children
|
|
28
|
-
}
|
|
29
|
-
);
|
|
24
|
+
const childRender = render === void 0 && asChild && React$1.isValidElement(children) ? children : void 0;
|
|
25
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
|
|
26
|
+
"data-slot": "tooltip-trigger",
|
|
27
|
+
delay,
|
|
28
|
+
render: render ?? childRender,
|
|
29
|
+
...props,
|
|
30
|
+
children: childRender ? void 0 : children
|
|
31
|
+
});
|
|
30
32
|
}
|
|
31
|
-
function TooltipContent({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
"data-slot": "tooltip-content",
|
|
45
|
-
className: cn(
|
|
46
|
-
`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1
|
|
33
|
+
function TooltipContent({ className, sideOffset = 4, showArrow = false, side = "top", align = "center", children, ...props }) {
|
|
34
|
+
const { container, zIndexClass } = useFloatingOverlayPortalProps();
|
|
35
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
36
|
+
container,
|
|
37
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
38
|
+
side,
|
|
39
|
+
align,
|
|
40
|
+
sideOffset,
|
|
41
|
+
className: zIndexClass,
|
|
42
|
+
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
43
|
+
"data-slot": "tooltip-content",
|
|
44
|
+
className: cn(`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1
|
|
47
45
|
text-xs transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
48
46
|
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
49
47
|
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
50
48
|
data-[side=left]:data-starting-style:translate-x-2
|
|
51
49
|
data-[side=right]:data-starting-style:-translate-x-2
|
|
52
|
-
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
showArrow && /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]" })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
) }) });
|
|
50
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
51
|
+
...props,
|
|
52
|
+
role: "tooltip",
|
|
53
|
+
children: [children, showArrow && /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]" })]
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
});
|
|
63
57
|
}
|
|
64
58
|
|
|
59
|
+
//#endregion
|
|
65
60
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
66
|
-
//# sourceMappingURL=tooltip.js.map
|
|
67
61
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":["TooltipPrimitive","React"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';\n\nimport { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';\nimport { cn } from '../lib/utils';\n\ntype TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider> & {\n\t/** @deprecated Use delay instead */\n\tdelayDuration?: number;\n};\n\nfunction TooltipProvider({ delay = 0, delayDuration, ...props }: TooltipProviderProps) {\n\treturn <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delay={delayDuration ?? delay} {...props} />;\n}\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root> & {\n\t/** @deprecated Use delay on Trigger instead */\n\tdelayDuration?: number;\n};\n\nfunction Tooltip({ delayDuration: _delayDuration, ...props }: TooltipProps) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\ntype TooltipTriggerProps = React.ComponentProps<typeof TooltipPrimitive.Trigger> & {\n\tdelay?: number;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction TooltipTrigger({ delay = 0, asChild, children, render, ...props }: TooltipTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<TooltipPrimitive.Trigger\n\t\t\tdata-slot=\"tooltip-trigger\"\n\t\t\tdelay={delay}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</TooltipPrimitive.Trigger>\n\t);\n}\n\ntype TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Popup> & {\n\tsideOffset?: number;\n\tshowArrow?: boolean;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\talign?: 'start' | 'center' | 'end';\n};\n\nfunction TooltipContent({\n\tclassName,\n\tsideOffset = 4,\n\tshowArrow = false,\n\tside = 'top',\n\talign = 'center',\n\tchildren,\n\t...props\n}: TooltipContentProps) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<TooltipPrimitive.Portal container={container}>\n\t\t\t<TooltipPrimitive.Positioner side={side} align={align} sideOffset={sideOffset} className={zIndexClass}>\n\t\t\t\t<TooltipPrimitive.Popup\n\t\t\t\t\tdata-slot=\"tooltip-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground origin-(--transform-origin) relative max-w-70 rounded-md border px-2 py-1\n\t\t\t\t\t\ttext-xs transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t\trole=\"tooltip\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t<TooltipPrimitive.Arrow className='fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]' />\n\t\t\t\t\t)}\n\t\t\t\t</TooltipPrimitive.Popup>\n\t\t\t</TooltipPrimitive.Positioner>\n\t\t</TooltipPrimitive.Portal>\n\t);\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":";;;;;;;;;AAaA,SAAS,gBAAgB,EAAE,QAAQ,GAAG,eAAe,GAAG,SAA+B;CACtF,OAAO,oBAACA,UAAiB,UAAlB;EAA2B,aAAU;EAAmB,OAAO,iBAAiB;EAAO,GAAI;CAAQ;AAC3G;AAOA,SAAS,QAAQ,EAAE,eAAe,gBAAgB,GAAG,SAAuB;CAC3E,OAAO,oBAACA,UAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ;AAC/D;AAQA,SAAS,eAAe,EAAE,QAAQ,GAAG,SAAS,UAAU,QAAQ,GAAG,SAA8B;CAChG,MAAM,cAAc,WAAW,UAAa,WAAWC,QAAM,eAAe,QAAQ,IAAI,WAAW;CAEnG,OACC,oBAACD,UAAiB,SAAlB;EACC,aAAU;EACH;EACP,QAAQ,UAAU;EAClB,GAAI;YAEH,cAAc,SAAY;CACF;AAE5B;AASA,SAAS,eAAe,EACvB,WACA,aAAa,GACb,YAAY,OACZ,OAAO,OACP,QAAQ,UACR,UACA,GAAG,SACoB;CACvB,MAAM,EAAE,WAAW,gBAAgB,8BAA8B;CAEjE,OACC,oBAACA,UAAiB,QAAlB;EAAoC;YACnC,oBAACA,UAAiB,YAAlB;GAAmC;GAAa;GAAmB;GAAY,WAAW;aACzF,qBAACA,UAAiB,OAAlB;IACC,aAAU;IACV,WAAW,GACV;;;;;;wFAOA,SACD;IACA,GAAI;IACJ,MAAK;cAbN,CAeE,UACA,aACA,oBAACA,UAAiB,OAAlB,EAAwB,WAAU,+DAAgE,EAE5E;;EACI;CACL;AAE3B"}
|
|
@@ -1,197 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
'
|
|
1
|
+
'use client';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
4
|
+
const require_components_button = require('./button.cjs');
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let _remixicon_react = require("@remixicon/react");
|
|
3
7
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
-
|
|
31
|
-
// src/components/unlink-button.tsx
|
|
32
|
-
function cn(...inputs) {
|
|
33
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
|
-
}
|
|
35
|
-
function composeRefs(...refs) {
|
|
36
|
-
return (node) => {
|
|
37
|
-
refs.forEach((ref) => {
|
|
38
|
-
if (typeof ref === "function") {
|
|
39
|
-
ref(node);
|
|
40
|
-
} else if (ref != null) {
|
|
41
|
-
ref.current = node;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function mergeProps(slotProps, childProps) {
|
|
47
|
-
const overrideProps = { ...childProps };
|
|
48
|
-
for (const propName in childProps) {
|
|
49
|
-
if (propName === "ref") continue;
|
|
50
|
-
const slotPropValue = slotProps[propName];
|
|
51
|
-
const childPropValue = childProps[propName];
|
|
52
|
-
if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
|
|
53
|
-
overrideProps[propName] = (...args) => {
|
|
54
|
-
childPropValue(...args);
|
|
55
|
-
slotPropValue(...args);
|
|
56
|
-
};
|
|
57
|
-
} else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
|
|
58
|
-
overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
|
|
59
|
-
} else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
|
|
60
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return { ...slotProps, ...overrideProps };
|
|
64
|
-
}
|
|
65
|
-
function isSlottable(child) {
|
|
66
|
-
return React__namespace.isValidElement(child);
|
|
67
|
-
}
|
|
68
|
-
var Slot = React__namespace.forwardRef((props, forwardedRef) => {
|
|
69
|
-
const { children, ...slotProps } = props;
|
|
70
|
-
if (isSlottable(children)) {
|
|
71
|
-
const childProps = children.props;
|
|
72
|
-
const childRef = childProps.ref;
|
|
73
|
-
return React__namespace.cloneElement(children, {
|
|
74
|
-
...mergeProps(slotProps, childProps),
|
|
75
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
if (React__namespace.Children.count(children) > 1) {
|
|
79
|
-
const childrenArray = React__namespace.Children.toArray(children);
|
|
80
|
-
const slottableChild = childrenArray.find(
|
|
81
|
-
(child) => React__namespace.isValidElement(child) && child.type === Slottable
|
|
82
|
-
);
|
|
83
|
-
if (slottableChild) {
|
|
84
|
-
const newElement = slottableChild.props.children;
|
|
85
|
-
if (isSlottable(newElement)) {
|
|
86
|
-
const newElementProps = newElement.props;
|
|
87
|
-
const newChildren = childrenArray.map((child) => {
|
|
88
|
-
if (child === slottableChild) {
|
|
89
|
-
return React__namespace.Children.count(newElementProps.children) > 1 ? React__namespace.Children.only(null) : newElementProps.children;
|
|
90
|
-
}
|
|
91
|
-
return child;
|
|
92
|
-
});
|
|
93
|
-
const childRef = newElementProps.ref;
|
|
94
|
-
return React__namespace.cloneElement(newElement, {
|
|
95
|
-
...mergeProps(slotProps, newElementProps),
|
|
96
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
|
|
97
|
-
children: newChildren
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
103
|
-
});
|
|
104
|
-
Slot.displayName = "Slot";
|
|
105
|
-
function Slottable({ children }) {
|
|
106
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
107
|
-
}
|
|
108
|
-
var buttonVariants = classVarianceAuthority.cva(
|
|
109
|
-
"[&_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",
|
|
110
|
-
{
|
|
111
|
-
defaultVariants: {
|
|
112
|
-
size: "default",
|
|
113
|
-
static: false,
|
|
114
|
-
variant: "default"
|
|
115
|
-
},
|
|
116
|
-
variants: {
|
|
117
|
-
static: {
|
|
118
|
-
false: "motion-safe:active:not-disabled:scale-[0.96]",
|
|
119
|
-
true: null
|
|
120
|
-
},
|
|
121
|
-
size: {
|
|
122
|
-
default: "h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
123
|
-
icon: "size-10 pointer-coarse:size-11",
|
|
124
|
-
"icon-lg": "size-11",
|
|
125
|
-
"icon-sm": "size-8 pointer-coarse:size-11",
|
|
126
|
-
"icon-xl": 'size-11 [&_svg:not([class*="size-"])]:size-5',
|
|
127
|
-
"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',
|
|
128
|
-
lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
|
|
129
|
-
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
130
|
-
xl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*="size-"])]:size-5',
|
|
131
|
-
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'
|
|
132
|
-
},
|
|
133
|
-
variant: {
|
|
134
|
-
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",
|
|
135
|
-
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",
|
|
136
|
-
"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",
|
|
137
|
-
ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
|
|
138
|
-
link: "border-transparent underline-offset-4 hover:underline",
|
|
139
|
-
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",
|
|
140
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
var Button = React__namespace.forwardRef(
|
|
146
|
-
({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
|
|
147
|
-
const buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));
|
|
148
|
-
const Comp = asChild ? Slot : "button";
|
|
149
|
-
if (asChild) {
|
|
150
|
-
const SlottedComp = Comp;
|
|
151
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
-
SlottedComp,
|
|
153
|
-
{
|
|
154
|
-
ref,
|
|
155
|
-
className: buttonClasses,
|
|
156
|
-
"data-slot": "button",
|
|
157
|
-
...props,
|
|
158
|
-
children
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, type, className: buttonClasses, "data-slot": "button", ...props, children });
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
Button.displayName = "Button";
|
|
166
|
-
function UnlinkButton({
|
|
167
|
-
onUnlink,
|
|
168
|
-
isUnlinking = false,
|
|
169
|
-
disabled = false,
|
|
170
|
-
size = "xs",
|
|
171
|
-
variant = "ghost",
|
|
172
|
-
className,
|
|
173
|
-
"aria-label": ariaLabel = "Unlink record"
|
|
174
|
-
}) {
|
|
175
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
176
|
-
Button,
|
|
177
|
-
{
|
|
178
|
-
variant,
|
|
179
|
-
size,
|
|
180
|
-
onClick: onUnlink,
|
|
181
|
-
disabled: disabled || isUnlinking,
|
|
182
|
-
className: cn(
|
|
183
|
-
"hover:bg-destructive/10 hover:text-destructive h-5 w-5 p-0",
|
|
184
|
-
"focus:ring-destructive/20 focus:ring-2 focus:ring-offset-1",
|
|
185
|
-
isUnlinking && "cursor-not-allowed opacity-50",
|
|
186
|
-
className
|
|
187
|
-
),
|
|
188
|
-
"aria-label": ariaLabel,
|
|
189
|
-
title: isUnlinking ? "Unlinking..." : "Unlink record",
|
|
190
|
-
children: isUnlinking ? /* @__PURE__ */ jsxRuntime.jsx(react.RiLoader4Line, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(react.RiCloseLine, { className: "h-3 w-3" })
|
|
191
|
-
}
|
|
192
|
-
);
|
|
8
|
+
//#region src/components/unlink-button.tsx
|
|
9
|
+
function UnlinkButton({ onUnlink, isUnlinking = false, disabled = false, size = "xs", variant = "ghost", className, "aria-label": ariaLabel = "Unlink record" }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_button.Button, {
|
|
11
|
+
variant,
|
|
12
|
+
size,
|
|
13
|
+
onClick: onUnlink,
|
|
14
|
+
disabled: disabled || isUnlinking,
|
|
15
|
+
className: require_utils.cn("hover:bg-destructive/10 hover:text-destructive h-5 w-5 p-0", "focus:ring-destructive/20 focus:ring-2 focus:ring-offset-1", isUnlinking && "cursor-not-allowed opacity-50", className),
|
|
16
|
+
"aria-label": ariaLabel,
|
|
17
|
+
title: isUnlinking ? "Unlinking..." : "Unlink record",
|
|
18
|
+
children: isUnlinking ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_remixicon_react.RiLoader4Line, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_remixicon_react.RiCloseLine, { className: "h-3 w-3" })
|
|
19
|
+
});
|
|
193
20
|
}
|
|
194
21
|
|
|
22
|
+
//#endregion
|
|
195
23
|
exports.UnlinkButton = UnlinkButton;
|
|
196
|
-
//# sourceMappingURL=unlink-button.cjs.map
|
|
197
24
|
//# sourceMappingURL=unlink-button.cjs.map
|