@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,308 +1,155 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
1
|
+
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
const require_slot = require('../slot-C-jEfihz.cjs');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
let lucide_react = require("lucide-react");
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
-
|
|
30
|
-
function composeRefs(...refs) {
|
|
31
|
-
return (node) => {
|
|
32
|
-
refs.forEach((ref) => {
|
|
33
|
-
if (typeof ref === "function") {
|
|
34
|
-
ref(node);
|
|
35
|
-
} else if (ref != null) {
|
|
36
|
-
ref.current = node;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function mergeProps(slotProps, childProps) {
|
|
42
|
-
const overrideProps = { ...childProps };
|
|
43
|
-
for (const propName in childProps) {
|
|
44
|
-
if (propName === "ref") continue;
|
|
45
|
-
const slotPropValue = slotProps[propName];
|
|
46
|
-
const childPropValue = childProps[propName];
|
|
47
|
-
if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
|
|
48
|
-
overrideProps[propName] = (...args) => {
|
|
49
|
-
childPropValue(...args);
|
|
50
|
-
slotPropValue(...args);
|
|
51
|
-
};
|
|
52
|
-
} else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
|
|
53
|
-
overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
|
|
54
|
-
} else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
|
|
55
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return { ...slotProps, ...overrideProps };
|
|
59
|
-
}
|
|
60
|
-
function isSlottable(child) {
|
|
61
|
-
return React__namespace.isValidElement(child);
|
|
62
|
-
}
|
|
63
|
-
var Slot = React__namespace.forwardRef((props, forwardedRef) => {
|
|
64
|
-
const { children, ...slotProps } = props;
|
|
65
|
-
if (isSlottable(children)) {
|
|
66
|
-
const childProps = children.props;
|
|
67
|
-
const childRef = childProps.ref;
|
|
68
|
-
return React__namespace.cloneElement(children, {
|
|
69
|
-
...mergeProps(slotProps, childProps),
|
|
70
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (React__namespace.Children.count(children) > 1) {
|
|
74
|
-
const childrenArray = React__namespace.Children.toArray(children);
|
|
75
|
-
const slottableChild = childrenArray.find(
|
|
76
|
-
(child) => React__namespace.isValidElement(child) && child.type === Slottable
|
|
77
|
-
);
|
|
78
|
-
if (slottableChild) {
|
|
79
|
-
const newElement = slottableChild.props.children;
|
|
80
|
-
if (isSlottable(newElement)) {
|
|
81
|
-
const newElementProps = newElement.props;
|
|
82
|
-
const newChildren = childrenArray.map((child) => {
|
|
83
|
-
if (child === slottableChild) {
|
|
84
|
-
return React__namespace.Children.count(newElementProps.children) > 1 ? React__namespace.Children.only(null) : newElementProps.children;
|
|
85
|
-
}
|
|
86
|
-
return child;
|
|
87
|
-
});
|
|
88
|
-
const childRef = newElementProps.ref;
|
|
89
|
-
return React__namespace.cloneElement(newElement, {
|
|
90
|
-
...mergeProps(slotProps, newElementProps),
|
|
91
|
-
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
|
|
92
|
-
children: newChildren
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
98
|
-
});
|
|
99
|
-
Slot.displayName = "Slot";
|
|
100
|
-
function Slottable({ children }) {
|
|
101
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
102
|
-
}
|
|
103
|
-
function cn(...inputs) {
|
|
104
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
105
|
-
}
|
|
106
|
-
var StepperContext = React.createContext(void 0);
|
|
107
|
-
var StepItemContext = React.createContext(void 0);
|
|
108
|
-
var iconSwapClass = "transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none";
|
|
109
|
-
var iconSwapVisible = "scale-100 opacity-100 blur-0";
|
|
110
|
-
var iconSwapHidden = "scale-[0.25] opacity-0 blur-[4px]";
|
|
111
|
-
var useStepper = () => {
|
|
112
|
-
const context = React.useContext(StepperContext);
|
|
113
|
-
if (!context) {
|
|
114
|
-
throw new Error("useStepper must be used within a Stepper");
|
|
115
|
-
}
|
|
116
|
-
return context;
|
|
12
|
+
//#region src/components/stepper.tsx
|
|
13
|
+
const StepperContext = (0, react.createContext)(void 0);
|
|
14
|
+
const StepItemContext = (0, react.createContext)(void 0);
|
|
15
|
+
const iconSwapClass = "transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none";
|
|
16
|
+
const iconSwapVisible = "scale-100 opacity-100 blur-0";
|
|
17
|
+
const iconSwapHidden = "scale-[0.25] opacity-0 blur-[4px]";
|
|
18
|
+
const useStepper = () => {
|
|
19
|
+
const context = (0, react.useContext)(StepperContext);
|
|
20
|
+
if (!context) throw new Error("useStepper must be used within a Stepper");
|
|
21
|
+
return context;
|
|
117
22
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
return context;
|
|
23
|
+
const useStepItem = () => {
|
|
24
|
+
const context = (0, react.useContext)(StepItemContext);
|
|
25
|
+
if (!context) throw new Error("useStepItem must be used within a StepperItem");
|
|
26
|
+
return context;
|
|
124
27
|
};
|
|
125
|
-
function Stepper({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{
|
|
147
|
-
value: {
|
|
148
|
-
activeStep: currentStep,
|
|
149
|
-
setActiveStep,
|
|
150
|
-
orientation
|
|
151
|
-
},
|
|
152
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
-
"div",
|
|
154
|
-
{
|
|
155
|
-
"data-slot": "stepper",
|
|
156
|
-
className: cn(
|
|
157
|
-
`group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row
|
|
158
|
-
data-[orientation=vertical]:flex-col`,
|
|
159
|
-
className
|
|
160
|
-
),
|
|
161
|
-
"data-orientation": orientation,
|
|
162
|
-
...props
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
);
|
|
28
|
+
function Stepper({ defaultValue = 0, value, onValueChange, orientation = "horizontal", className, ...props }) {
|
|
29
|
+
const [activeStep, setInternalStep] = react.useState(defaultValue);
|
|
30
|
+
const setActiveStep = react.useCallback((step) => {
|
|
31
|
+
if (value === void 0) setInternalStep(step);
|
|
32
|
+
onValueChange?.(step);
|
|
33
|
+
}, [value, onValueChange]);
|
|
34
|
+
const currentStep = value ?? activeStep;
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperContext.Provider, {
|
|
36
|
+
value: {
|
|
37
|
+
activeStep: currentStep,
|
|
38
|
+
setActiveStep,
|
|
39
|
+
orientation
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
42
|
+
"data-slot": "stepper",
|
|
43
|
+
className: require_utils.cn(`group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row
|
|
44
|
+
data-[orientation=vertical]:flex-col`, className),
|
|
45
|
+
"data-orientation": orientation,
|
|
46
|
+
...props
|
|
47
|
+
})
|
|
48
|
+
});
|
|
167
49
|
}
|
|
168
|
-
function StepperItem({
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"data-state": state,
|
|
190
|
-
...isLoading ? { "data-loading": true } : {},
|
|
191
|
-
...props,
|
|
192
|
-
children
|
|
193
|
-
}
|
|
194
|
-
) });
|
|
50
|
+
function StepperItem({ step, completed = false, disabled = false, loading = false, className, children, ...props }) {
|
|
51
|
+
const { activeStep } = useStepper();
|
|
52
|
+
const state = completed || step < activeStep ? "completed" : activeStep === step ? "active" : "inactive";
|
|
53
|
+
const isLoading = loading && step === activeStep;
|
|
54
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepItemContext.Provider, {
|
|
55
|
+
value: {
|
|
56
|
+
step,
|
|
57
|
+
state,
|
|
58
|
+
isDisabled: disabled,
|
|
59
|
+
isLoading
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
62
|
+
"data-slot": "stepper-item",
|
|
63
|
+
className: require_utils.cn(`group/step flex items-center group-data-[orientation=horizontal]/stepper:flex-row
|
|
64
|
+
group-data-[orientation=vertical]/stepper:flex-col`, className),
|
|
65
|
+
"data-state": state,
|
|
66
|
+
...isLoading ? { "data-loading": true } : {},
|
|
67
|
+
...props,
|
|
68
|
+
children
|
|
69
|
+
})
|
|
70
|
+
});
|
|
195
71
|
}
|
|
196
72
|
function StepperTrigger({ asChild = false, static: isStatic, className, children, ...props }) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
`focus-visible:border-ring focus-visible:ring-ring/50 inline-flex items-center gap-3 rounded-full transition-transform
|
|
73
|
+
const { setActiveStep } = useStepper();
|
|
74
|
+
const { step, isDisabled } = useStepItem();
|
|
75
|
+
const triggerClassName = require_utils.cn(`focus-visible:border-ring focus-visible:ring-ring/50 inline-flex items-center gap-3 rounded-full transition-transform
|
|
201
76
|
duration-150 ease-out outline-none focus-visible:z-10 focus-visible:ring-[3px]
|
|
202
|
-
disabled:pointer-events-none disabled:opacity-50`,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
220
|
-
"button",
|
|
221
|
-
{
|
|
222
|
-
"data-slot": "stepper-trigger",
|
|
223
|
-
className: triggerClassName,
|
|
224
|
-
onClick: () => setActiveStep(step),
|
|
225
|
-
disabled: isDisabled,
|
|
226
|
-
...props,
|
|
227
|
-
children
|
|
228
|
-
}
|
|
229
|
-
);
|
|
77
|
+
disabled:pointer-events-none disabled:opacity-50`, !isStatic && "motion-safe:hover:scale-105 motion-safe:active:not-disabled:scale-[0.96]", className);
|
|
78
|
+
if (asChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slot.Slot, {
|
|
79
|
+
"data-slot": "stepper-trigger",
|
|
80
|
+
className: triggerClassName,
|
|
81
|
+
onClick: () => setActiveStep(step),
|
|
82
|
+
disabled: isDisabled,
|
|
83
|
+
...props,
|
|
84
|
+
children
|
|
85
|
+
});
|
|
86
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
87
|
+
"data-slot": "stepper-trigger",
|
|
88
|
+
className: triggerClassName,
|
|
89
|
+
onClick: () => setActiveStep(step),
|
|
90
|
+
disabled: isDisabled,
|
|
91
|
+
...props,
|
|
92
|
+
children
|
|
93
|
+
});
|
|
230
94
|
}
|
|
231
95
|
function StepperIndicator({ asChild = false, className, children, ...props }) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"data-slot": "stepper-indicator",
|
|
239
|
-
className: cn(
|
|
240
|
-
`bg-muted text-muted-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary
|
|
96
|
+
const { state, step, isLoading } = useStepItem();
|
|
97
|
+
const showNumber = !isLoading && state !== "completed";
|
|
98
|
+
const showCheck = !isLoading && state === "completed";
|
|
99
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
100
|
+
"data-slot": "stepper-indicator",
|
|
101
|
+
className: require_utils.cn(`bg-muted text-muted-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary
|
|
241
102
|
data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground relative flex size-6
|
|
242
|
-
shrink-0 items-center justify-center rounded-full text-xs font-medium transition-[color,background-color] duration-200 ease-out`,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
] })
|
|
266
|
-
}
|
|
267
|
-
);
|
|
103
|
+
shrink-0 items-center justify-center rounded-full text-xs font-medium transition-[color,background-color] duration-200 ease-out`, className),
|
|
104
|
+
"data-state": state,
|
|
105
|
+
...props,
|
|
106
|
+
children: asChild ? children : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
107
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
108
|
+
className: require_utils.cn("absolute", iconSwapClass, showNumber ? iconSwapVisible : iconSwapHidden),
|
|
109
|
+
children: step
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, {
|
|
112
|
+
className: require_utils.cn("absolute", iconSwapClass, showCheck ? iconSwapVisible : iconSwapHidden),
|
|
113
|
+
size: 16,
|
|
114
|
+
"aria-hidden": "true"
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
117
|
+
className: require_utils.cn("absolute", iconSwapClass, isLoading ? iconSwapVisible : iconSwapHidden),
|
|
118
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LoaderCircleIcon, {
|
|
119
|
+
className: require_utils.cn(isLoading && "motion-safe:animate-spin"),
|
|
120
|
+
size: 14,
|
|
121
|
+
"aria-hidden": "true"
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
] })
|
|
125
|
+
});
|
|
268
126
|
}
|
|
269
127
|
function StepperTitle({ className, ...props }) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
...props
|
|
276
|
-
}
|
|
277
|
-
);
|
|
128
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
129
|
+
"data-slot": "stepper-title",
|
|
130
|
+
className: require_utils.cn("text-sm font-medium transition-colors duration-200 ease-out", className),
|
|
131
|
+
...props
|
|
132
|
+
});
|
|
278
133
|
}
|
|
279
134
|
function StepperDescription({ className, ...props }) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
...props
|
|
286
|
-
}
|
|
287
|
-
);
|
|
135
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
136
|
+
"data-slot": "stepper-description",
|
|
137
|
+
className: require_utils.cn("text-muted-foreground text-sm transition-colors duration-200 ease-out", className),
|
|
138
|
+
...props
|
|
139
|
+
});
|
|
288
140
|
}
|
|
289
141
|
function StepperSeparator({ className, ...props }) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"data-slot": "stepper-separator",
|
|
294
|
-
className: cn(
|
|
295
|
-
`bg-muted group-data-[state=completed]/step:bg-primary m-0.5 transition-colors duration-200 ease-out
|
|
142
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
143
|
+
"data-slot": "stepper-separator",
|
|
144
|
+
className: require_utils.cn(`bg-muted group-data-[state=completed]/step:bg-primary m-0.5 transition-colors duration-200 ease-out
|
|
296
145
|
group-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=horizontal]/stepper:w-full
|
|
297
146
|
group-data-[orientation=horizontal]/stepper:flex-1 group-data-[orientation=vertical]/stepper:h-12
|
|
298
|
-
group-data-[orientation=vertical]/stepper:w-0.5`,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
...props
|
|
302
|
-
}
|
|
303
|
-
);
|
|
147
|
+
group-data-[orientation=vertical]/stepper:w-0.5`, className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
304
150
|
}
|
|
305
151
|
|
|
152
|
+
//#endregion
|
|
306
153
|
exports.Stepper = Stepper;
|
|
307
154
|
exports.StepperDescription = StepperDescription;
|
|
308
155
|
exports.StepperIndicator = StepperIndicator;
|
|
@@ -310,5 +157,4 @@ exports.StepperItem = StepperItem;
|
|
|
310
157
|
exports.StepperSeparator = StepperSeparator;
|
|
311
158
|
exports.StepperTitle = StepperTitle;
|
|
312
159
|
exports.StepperTrigger = StepperTrigger;
|
|
313
|
-
//# sourceMappingURL=stepper.cjs.map
|
|
314
160
|
//# sourceMappingURL=stepper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src/components/stepper.tsx"],"names":["React","twMerge","clsx","createContext","useContext","React2","jsx","jsxs","Fragment","CheckIcon","LoaderCircleIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,eAAkB,IAAA,EAA0D;AACpF,EAAA,OAAO,CAAC,IAAA,KAAS;AAChB,IAAA,IAAA,CAAK,OAAA,CAAQ,CAAC,GAAA,KAAQ;AACrB,MAAA,IAAI,OAAO,QAAQ,UAAA,EAAY;AAC9B,QAAA,GAAA,CAAI,IAAI,CAAA;AAAA,MACT,CAAA,MAAA,IAAW,OAAO,IAAA,EAAM;AACvB,QAAC,IAAyC,OAAA,GAAU,IAAA;AAAA,MACrD;AAAA,IACD,CAAC,CAAA;AAAA,EACF,CAAA;AACD;AAMA,SAAS,UAAA,CACR,WACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,aAAA,GAAyC,EAAE,GAAG,UA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,EAAK,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,aAAA,EAAe,SAAA,GAAY,eAAA,GAAkB,cAAc,CAAA,EAC1F,QAAA,kBAAAA,cAAAA;AAAA,UAACI,4BAAA;AAAA,UAAA;AAAA,YACA,SAAA,EAAW,EAAA,CAAG,SAAA,IAAa,0BAA0B,CAAA;AAAA,YACrD,IAAA,EAAM,EAAA;AAAA,YACN,aAAA,EAAY;AAAA;AAAA,SACb,EACD;AAAA,OAAA,EACD;AAAA;AAAA,GAEF;AAEF;AAGA,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAA6C;AACxF,EAAA,uBACCJ,cAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,eAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,6DAAA,EAA+D,SAAS,CAAA;AAAA,MACrF,GAAG;AAAA;AAAA,GACL;AAEF;AAGA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA+C;AAChG,EAAA,uBACCA,cAAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,uEAAA,EAAyE,SAAS,CAAA;AAAA,MAC/F,GAAG;AAAA;AAAA,GACL;AAEF;AAGA,SAAS,gBAAA,CAAiB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAyC;AACxF,EAAA,uBACCA,cAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,mBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,CAAA;AAAA;AAAA;AAAA,mDAAA,CAAA;AAAA,QAIA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF","file":"stepper.cjs","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { createContext, useContext } from 'react';\nimport { CheckIcon, LoaderCircleIcon } from 'lucide-react';\nimport { Slot } from '../lib/slot';\n\nimport { cn } from '../lib/utils';\n\n// Types\ntype StepperContextValue = {\n\tactiveStep: number;\n\tsetActiveStep: (step: number) => void;\n\torientation: 'horizontal' | 'vertical';\n};\n\ntype StepItemContextValue = {\n\tstep: number;\n\tstate: StepState;\n\tisDisabled: boolean;\n\tisLoading: boolean;\n};\n\ntype StepState = 'active' | 'completed' | 'inactive' | 'loading';\n\n// Contexts\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nconst iconSwapClass =\n\t'transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none';\nconst iconSwapVisible = 'scale-100 opacity-100 blur-0';\nconst iconSwapHidden = 'scale-[0.25] opacity-0 blur-[4px]';\n\nconst useStepper = () => {\n\tconst context = useContext(StepperContext);\n\tif (!context) {\n\t\tthrow new Error('useStepper must be used within a Stepper');\n\t}\n\treturn context;\n};\n\nconst useStepItem = () => {\n\tconst context = useContext(StepItemContext);\n\tif (!context) {\n\t\tthrow new Error('useStepItem must be used within a StepperItem');\n\t}\n\treturn context;\n};\n\n// Components\ninterface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n\tdefaultValue?: number;\n\tvalue?: number;\n\tonValueChange?: (value: number) => void;\n\torientation?: 'horizontal' | 'vertical';\n}\n\nfunction Stepper({\n\tdefaultValue = 0,\n\tvalue,\n\tonValueChange,\n\torientation = 'horizontal',\n\tclassName,\n\t...props\n}: StepperProps) {\n\tconst [activeStep, setInternalStep] = React.useState(defaultValue);\n\n\tconst setActiveStep = React.useCallback(\n\t\t(step: number) => {\n\t\t\tif (value === undefined) {\n\t\t\t\tsetInternalStep(step);\n\t\t\t}\n\t\t\tonValueChange?.(step);\n\t\t},\n\t\t[value, onValueChange],\n\t);\n\n\tconst currentStep = value ?? activeStep;\n\n\treturn (\n\t\t<StepperContext.Provider\n\t\t\tvalue={{\n\t\t\t\tactiveStep: currentStep,\n\t\t\t\tsetActiveStep,\n\t\t\t\torientation,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tdata-slot=\"stepper\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row\n\t\t\t\t\tdata-[orientation=vertical]:flex-col`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-orientation={orientation}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</StepperContext.Provider>\n\t);\n}\n\n// StepperItem\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n\tstep: number;\n\tcompleted?: boolean;\n\tdisabled?: boolean;\n\tloading?: boolean;\n}\n\nfunction StepperItem({\n\tstep,\n\tcompleted = false,\n\tdisabled = false,\n\tloading = false,\n\tclassName,\n\tchildren,\n\t...props\n}: StepperItemProps) {\n\tconst { activeStep } = useStepper();\n\n\tconst state: StepState = completed || step < activeStep ? 'completed' : activeStep === step ? 'active' : 'inactive';\n\n\tconst isLoading = loading && step === activeStep;\n\n\treturn (\n\t\t<StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n\t\t\t<div\n\t\t\t\tdata-slot=\"stepper-item\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`group/step flex items-center group-data-[orientation=horizontal]/stepper:flex-row\n\t\t\t\t\tgroup-data-[orientation=vertical]/stepper:flex-col`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-state={state}\n\t\t\t\t{...(isLoading ? { 'data-loading': true } : {})}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</StepItemContext.Provider>\n\t);\n}\n\n// StepperTrigger\ninterface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tasChild?: boolean;\n\t/** Disables hover and press scaling when motion would distract. */\n\tstatic?: boolean;\n}\n\nfunction StepperTrigger({ asChild = false, static: isStatic, className, children, ...props }: StepperTriggerProps) {\n\tconst { setActiveStep } = useStepper();\n\tconst { step, isDisabled } = useStepItem();\n\n\tconst triggerClassName = cn(\n\t\t`focus-visible:border-ring focus-visible:ring-ring/50 inline-flex items-center gap-3 rounded-full transition-transform\n\t\tduration-150 ease-out outline-none focus-visible:z-10 focus-visible:ring-[3px]\n\t\tdisabled:pointer-events-none disabled:opacity-50`,\n\t\t!isStatic && 'motion-safe:hover:scale-105 motion-safe:active:not-disabled:scale-[0.96]',\n\t\tclassName,\n\t);\n\n\tif (asChild) {\n\t\treturn (\n\t\t\t<Slot\n\t\t\t\tdata-slot=\"stepper-trigger\"\n\t\t\t\tclassName={triggerClassName}\n\t\t\t\tonClick={() => setActiveStep(step)}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\tdata-slot=\"stepper-trigger\"\n\t\t\tclassName={triggerClassName}\n\t\t\tonClick={() => setActiveStep(step)}\n\t\t\tdisabled={isDisabled}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\n// StepperIndicator\ninterface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {\n\tasChild?: boolean;\n}\n\nfunction StepperIndicator({ asChild = false, className, children, ...props }: StepperIndicatorProps) {\n\tconst { state, step, isLoading } = useStepItem();\n\tconst showNumber = !isLoading && state !== 'completed';\n\tconst showCheck = !isLoading && state === 'completed';\n\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"stepper-indicator\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-muted text-muted-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary\n\t\t\t\t\tdata-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground relative flex size-6\n\t\t\t\t\tshrink-0 items-center justify-center rounded-full text-xs font-medium transition-[color,background-color] duration-200 ease-out`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-state={state}\n\t\t\t{...props}\n\t\t>\n\t\t\t{asChild ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className={cn('absolute', iconSwapClass, showNumber ? iconSwapVisible : iconSwapHidden)}>\n\t\t\t\t\t\t{step}\n\t\t\t\t\t</span>\n\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\tclassName={cn('absolute', iconSwapClass, showCheck ? iconSwapVisible : iconSwapHidden)}\n\t\t\t\t\t\tsize={16}\n\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t/>\n\t\t\t\t\t<span className={cn('absolute', iconSwapClass, isLoading ? iconSwapVisible : iconSwapHidden)}>\n\t\t\t\t\t\t<LoaderCircleIcon\n\t\t\t\t\t\t\tclassName={cn(isLoading && 'motion-safe:animate-spin')}\n\t\t\t\t\t\t\tsize={14}\n\t\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</span>\n\t);\n}\n\n// StepperTitle\nfunction StepperTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) {\n\treturn (\n\t\t<h3\n\t\t\tdata-slot=\"stepper-title\"\n\t\t\tclassName={cn('text-sm font-medium transition-colors duration-200 ease-out', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n// StepperDescription\nfunction StepperDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"stepper-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm transition-colors duration-200 ease-out', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n// StepperSeparator\nfunction StepperSeparator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"stepper-separator\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-muted group-data-[state=completed]/step:bg-primary m-0.5 transition-colors duration-200 ease-out\n\t\t\t\tgroup-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=horizontal]/stepper:w-full\n\t\t\t\tgroup-data-[orientation=horizontal]/stepper:flex-1 group-data-[orientation=vertical]/stepper:h-12\n\t\t\t\tgroup-data-[orientation=vertical]/stepper:w-0.5`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger };\n"]}
|
|
1
|
+
{"version":3,"file":"stepper.cjs","names":["React","cn","Slot","CheckIcon","LoaderCircleIcon"],"sources":["../../src/components/stepper.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createContext, useContext } from 'react';\nimport { CheckIcon, LoaderCircleIcon } from 'lucide-react';\nimport { Slot } from '../lib/slot';\n\nimport { cn } from '../lib/utils';\n\n// Types\ntype StepperContextValue = {\n\tactiveStep: number;\n\tsetActiveStep: (step: number) => void;\n\torientation: 'horizontal' | 'vertical';\n};\n\ntype StepItemContextValue = {\n\tstep: number;\n\tstate: StepState;\n\tisDisabled: boolean;\n\tisLoading: boolean;\n};\n\ntype StepState = 'active' | 'completed' | 'inactive' | 'loading';\n\n// Contexts\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nconst iconSwapClass =\n\t'transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none';\nconst iconSwapVisible = 'scale-100 opacity-100 blur-0';\nconst iconSwapHidden = 'scale-[0.25] opacity-0 blur-[4px]';\n\nconst useStepper = () => {\n\tconst context = useContext(StepperContext);\n\tif (!context) {\n\t\tthrow new Error('useStepper must be used within a Stepper');\n\t}\n\treturn context;\n};\n\nconst useStepItem = () => {\n\tconst context = useContext(StepItemContext);\n\tif (!context) {\n\t\tthrow new Error('useStepItem must be used within a StepperItem');\n\t}\n\treturn context;\n};\n\n// Components\ninterface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n\tdefaultValue?: number;\n\tvalue?: number;\n\tonValueChange?: (value: number) => void;\n\torientation?: 'horizontal' | 'vertical';\n}\n\nfunction Stepper({\n\tdefaultValue = 0,\n\tvalue,\n\tonValueChange,\n\torientation = 'horizontal',\n\tclassName,\n\t...props\n}: StepperProps) {\n\tconst [activeStep, setInternalStep] = React.useState(defaultValue);\n\n\tconst setActiveStep = React.useCallback(\n\t\t(step: number) => {\n\t\t\tif (value === undefined) {\n\t\t\t\tsetInternalStep(step);\n\t\t\t}\n\t\t\tonValueChange?.(step);\n\t\t},\n\t\t[value, onValueChange],\n\t);\n\n\tconst currentStep = value ?? activeStep;\n\n\treturn (\n\t\t<StepperContext.Provider\n\t\t\tvalue={{\n\t\t\t\tactiveStep: currentStep,\n\t\t\t\tsetActiveStep,\n\t\t\t\torientation,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tdata-slot=\"stepper\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row\n\t\t\t\t\tdata-[orientation=vertical]:flex-col`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-orientation={orientation}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</StepperContext.Provider>\n\t);\n}\n\n// StepperItem\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n\tstep: number;\n\tcompleted?: boolean;\n\tdisabled?: boolean;\n\tloading?: boolean;\n}\n\nfunction StepperItem({\n\tstep,\n\tcompleted = false,\n\tdisabled = false,\n\tloading = false,\n\tclassName,\n\tchildren,\n\t...props\n}: StepperItemProps) {\n\tconst { activeStep } = useStepper();\n\n\tconst state: StepState = completed || step < activeStep ? 'completed' : activeStep === step ? 'active' : 'inactive';\n\n\tconst isLoading = loading && step === activeStep;\n\n\treturn (\n\t\t<StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n\t\t\t<div\n\t\t\t\tdata-slot=\"stepper-item\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`group/step flex items-center group-data-[orientation=horizontal]/stepper:flex-row\n\t\t\t\t\tgroup-data-[orientation=vertical]/stepper:flex-col`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-state={state}\n\t\t\t\t{...(isLoading ? { 'data-loading': true } : {})}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</StepItemContext.Provider>\n\t);\n}\n\n// StepperTrigger\ninterface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tasChild?: boolean;\n\t/** Disables hover and press scaling when motion would distract. */\n\tstatic?: boolean;\n}\n\nfunction StepperTrigger({ asChild = false, static: isStatic, className, children, ...props }: StepperTriggerProps) {\n\tconst { setActiveStep } = useStepper();\n\tconst { step, isDisabled } = useStepItem();\n\n\tconst triggerClassName = cn(\n\t\t`focus-visible:border-ring focus-visible:ring-ring/50 inline-flex items-center gap-3 rounded-full transition-transform\n\t\tduration-150 ease-out outline-none focus-visible:z-10 focus-visible:ring-[3px]\n\t\tdisabled:pointer-events-none disabled:opacity-50`,\n\t\t!isStatic && 'motion-safe:hover:scale-105 motion-safe:active:not-disabled:scale-[0.96]',\n\t\tclassName,\n\t);\n\n\tif (asChild) {\n\t\treturn (\n\t\t\t<Slot\n\t\t\t\tdata-slot=\"stepper-trigger\"\n\t\t\t\tclassName={triggerClassName}\n\t\t\t\tonClick={() => setActiveStep(step)}\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\tdata-slot=\"stepper-trigger\"\n\t\t\tclassName={triggerClassName}\n\t\t\tonClick={() => setActiveStep(step)}\n\t\t\tdisabled={isDisabled}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\n// StepperIndicator\ninterface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {\n\tasChild?: boolean;\n}\n\nfunction StepperIndicator({ asChild = false, className, children, ...props }: StepperIndicatorProps) {\n\tconst { state, step, isLoading } = useStepItem();\n\tconst showNumber = !isLoading && state !== 'completed';\n\tconst showCheck = !isLoading && state === 'completed';\n\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"stepper-indicator\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-muted text-muted-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary\n\t\t\t\t\tdata-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground relative flex size-6\n\t\t\t\t\tshrink-0 items-center justify-center rounded-full text-xs font-medium transition-[color,background-color] duration-200 ease-out`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-state={state}\n\t\t\t{...props}\n\t\t>\n\t\t\t{asChild ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<span className={cn('absolute', iconSwapClass, showNumber ? iconSwapVisible : iconSwapHidden)}>\n\t\t\t\t\t\t{step}\n\t\t\t\t\t</span>\n\t\t\t\t\t<CheckIcon\n\t\t\t\t\t\tclassName={cn('absolute', iconSwapClass, showCheck ? iconSwapVisible : iconSwapHidden)}\n\t\t\t\t\t\tsize={16}\n\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t/>\n\t\t\t\t\t<span className={cn('absolute', iconSwapClass, isLoading ? iconSwapVisible : iconSwapHidden)}>\n\t\t\t\t\t\t<LoaderCircleIcon\n\t\t\t\t\t\t\tclassName={cn(isLoading && 'motion-safe:animate-spin')}\n\t\t\t\t\t\t\tsize={14}\n\t\t\t\t\t\t\taria-hidden='true'\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</span>\n\t);\n}\n\n// StepperTitle\nfunction StepperTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) {\n\treturn (\n\t\t<h3\n\t\t\tdata-slot=\"stepper-title\"\n\t\t\tclassName={cn('text-sm font-medium transition-colors duration-200 ease-out', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n// StepperDescription\nfunction StepperDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"stepper-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm transition-colors duration-200 ease-out', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n// StepperSeparator\nfunction StepperSeparator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"stepper-separator\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-muted group-data-[state=completed]/step:bg-primary m-0.5 transition-colors duration-200 ease-out\n\t\t\t\tgroup-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=horizontal]/stepper:w-full\n\t\t\t\tgroup-data-[orientation=horizontal]/stepper:flex-1 group-data-[orientation=vertical]/stepper:h-12\n\t\t\t\tgroup-data-[orientation=vertical]/stepper:w-0.5`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger };\n"],"mappings":";;;;;;;;;;;;AA0BA,MAAM,0CAAgE,MAAS;AAC/E,MAAM,2CAAkE,MAAS;AAEjF,MAAM,gBACL;AACD,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AAEvB,MAAM,mBAAmB;CACxB,MAAM,gCAAqB,cAAc;CACzC,IAAI,CAAC,SACJ,MAAM,IAAI,MAAM,0CAA0C;CAE3D,OAAO;AACR;AAEA,MAAM,oBAAoB;CACzB,MAAM,gCAAqB,eAAe;CAC1C,IAAI,CAAC,SACJ,MAAM,IAAI,MAAM,+CAA+C;CAEhE,OAAO;AACR;AAUA,SAAS,QAAQ,EAChB,eAAe,GACf,OACA,eACA,cAAc,cACd,WACA,GAAG,SACa;CAChB,MAAM,CAAC,YAAY,mBAAmBA,MAAM,SAAS,YAAY;CAEjE,MAAM,gBAAgBA,MAAM,aAC1B,SAAiB;EACjB,IAAI,UAAU,QACb,gBAAgB,IAAI;EAErB,gBAAgB,IAAI;CACrB,GACA,CAAC,OAAO,aAAa,CACtB;CAEA,MAAM,cAAc,SAAS;CAE7B,OACC,2CAAC,eA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AD;EACC,aAAU;EACV,WAAWD,iBACV;;uIAGA,SACD;EACA,cAAY;EACZ,GAAI;YAEH,UACA,WAEA;GACC,2CAAC,QAAD;IAAM,WAAWA,iBAAG,YAAY,eAAe,aAAa,kBAAkB,cAAc;cAC1F;GACI;GACN,2CAACE,wBAAD;IACC,WAAWF,iBAAG,YAAY,eAAe,YAAY,kBAAkB,cAAc;IACrF,MAAM;IACN,eAAY;GACZ;GACD,2CAAC,QAAD;IAAM,WAAWA,iBAAG,YAAY,eAAe,YAAY,kBAAkB,cAAc;cAC1F,2CAACG,+BAAD;KACC,WAAWH,iBAAG,aAAa,0BAA0B;KACrD,MAAM;KACN,eAAY;IACZ;GACI;EACL;CAEE;AAER;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAmD;CACxF,OACC,2CAAC,MAAD;EACC,aAAU;EACV,WAAWA,iBAAG,+DAA+D,SAAS;EACtF,GAAI;CACJ;AAEH;AAGA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAqD;CAChG,OACC,2CAAC,KAAD;EACC,aAAU;EACV,WAAWA,iBAAG,yEAAyE,SAAS;EAChG,GAAI;CACJ;AAEH;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAA+C;CACxF,OACC,2CAAC,OAAD;EACC,aAAU;EACV,WAAWA,iBACV;;;sDAIA,SACD;EACA,GAAI;CACJ;AAEH"}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
3
|
-
interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/components/stepper.d.ts
|
|
3
|
+
interface StepperProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
value?: number;
|
|
6
|
+
onValueChange?: (value: number) => void;
|
|
7
|
+
orientation?: 'horizontal' | 'vertical';
|
|
8
8
|
}
|
|
9
|
-
declare function Stepper({ defaultValue, value, onValueChange, orientation, className, ...props }: StepperProps): React.JSX.Element;
|
|
10
|
-
interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
declare function Stepper({ defaultValue, value, onValueChange, orientation, className, ...props }: StepperProps): React$1.JSX.Element;
|
|
10
|
+
interface StepperItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
step: number;
|
|
12
|
+
completed?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function StepperItem({ step, completed, disabled, loading, className, children, ...props }: StepperItemProps): React.JSX.Element;
|
|
17
|
-
interface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
declare function StepperItem({ step, completed, disabled, loading, className, children, ...props }: StepperItemProps): React$1.JSX.Element;
|
|
17
|
+
interface StepperTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
/** Disables hover and press scaling when motion would distract. */
|
|
20
|
+
static?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function StepperTrigger({ asChild, static: isStatic, className, children, ...props }: StepperTriggerProps): React.JSX.Element;
|
|
23
|
-
interface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
-
|
|
22
|
+
declare function StepperTrigger({ asChild, static: isStatic, className, children, ...props }: StepperTriggerProps): React$1.JSX.Element;
|
|
23
|
+
interface StepperIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
asChild?: boolean;
|
|
25
25
|
}
|
|
26
|
-
declare function StepperIndicator({ asChild, className, children, ...props }: StepperIndicatorProps): React.JSX.Element;
|
|
27
|
-
declare function StepperTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.JSX.Element;
|
|
28
|
-
declare function StepperDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
29
|
-
declare function StepperSeparator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
30
|
-
|
|
26
|
+
declare function StepperIndicator({ asChild, className, children, ...props }: StepperIndicatorProps): React$1.JSX.Element;
|
|
27
|
+
declare function StepperTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): React$1.JSX.Element;
|
|
28
|
+
declare function StepperDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): React$1.JSX.Element;
|
|
29
|
+
declare function StepperSeparator({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
31
|
export { Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger };
|
|
32
|
+
//# sourceMappingURL=stepper.d.cts.map
|