@constructive-io/ui 0.4.1 → 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/LICENSE +21 -0
- package/README.md +17 -22
- package/dist/button-D4vqTxhp.d.cts +20 -0
- package/dist/button-D4vqTxhp.d.ts +20 -0
- package/dist/components/alert-dialog.cjs +129 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +33 -0
- package/dist/components/alert-dialog.d.ts +23 -21
- package/dist/components/alert-dialog.js +98 -296
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +62 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +19 -0
- package/dist/components/alert.d.ts +18 -13
- package/dist/components/alert.js +49 -31
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +81 -0
- package/dist/components/app-bar.cjs.map +1 -0
- package/dist/components/app-bar.d.cts +27 -0
- package/dist/components/app-bar.d.ts +27 -0
- package/dist/components/app-bar.js +77 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-shell.cjs +267 -0
- package/dist/components/app-shell.cjs.map +1 -0
- package/dist/components/app-shell.d.cts +98 -0
- package/dist/components/app-shell.d.ts +98 -0
- package/dist/components/app-shell.js +264 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/autocomplete.cjs +167 -0
- package/dist/components/autocomplete.cjs.map +1 -0
- package/dist/components/autocomplete.d.cts +28 -0
- package/dist/components/autocomplete.d.ts +24 -24
- package/dist/components/autocomplete.js +146 -397
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +39 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +13 -0
- package/dist/components/avatar.d.ts +11 -11
- package/dist/components/avatar.js +24 -27
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +48 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +15 -0
- 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 +89 -0
- package/dist/components/breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb.d.cts +15 -0
- package/dist/components/breadcrumb.d.ts +14 -13
- package/dist/components/breadcrumb.js +63 -137
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +75 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +2 -0
- package/dist/components/button.d.ts +2 -17
- package/dist/components/button.js +66 -57
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +72 -0
- package/dist/components/calendar-rac.cjs.map +1 -0
- package/dist/components/calendar-rac.d.cts +13 -0
- 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 +86 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +17 -0
- package/dist/components/card.d.ts +15 -17
- package/dist/components/card.js +58 -57
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +19 -0
- package/dist/components/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group.d.cts +7 -0
- 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 +67 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +8 -0
- package/dist/components/checkbox.d.ts +6 -6
- package/dist/components/checkbox.js +58 -61
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +90 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +45 -0
- package/dist/components/collapsible.d.ts +19 -28
- package/dist/components/collapsible.js +74 -112
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +257 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.d.cts +44 -0
- package/dist/components/combobox.d.ts +36 -36
- package/dist/components/combobox.js +229 -515
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +139 -0
- package/dist/components/command.cjs.map +1 -0
- package/dist/components/command.d.cts +24 -0
- package/dist/components/command.d.ts +22 -22
- package/dist/components/command.js +109 -240
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +139 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +31 -0
- package/dist/components/dialog.d.ts +27 -31
- package/dist/components/dialog.js +112 -429
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +90 -0
- package/dist/components/dock.cjs.map +1 -0
- package/dist/components/dock.d.cts +30 -0
- package/dist/components/dock.d.ts +25 -26
- package/dist/components/dock.js +78 -104
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +115 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +16 -0
- package/dist/components/drawer.d.ts +15 -15
- package/dist/components/drawer.js +77 -121
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +217 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +53 -0
- package/dist/components/dropdown-menu.d.ts +49 -46
- package/dist/components/dropdown-menu.js +177 -357
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +72 -0
- package/dist/components/empty.cjs.map +1 -0
- package/dist/components/empty.d.cts +15 -0
- package/dist/components/empty.d.ts +15 -0
- package/dist/components/empty.js +64 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.cjs +186 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +46 -0
- package/dist/components/field.d.ts +44 -49
- package/dist/components/field.js +166 -108
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +153 -0
- package/dist/components/flickering-grid.cjs.map +1 -0
- package/dist/components/flickering-grid.d.cts +16 -0
- package/dist/components/flickering-grid.d.ts +14 -13
- package/dist/components/flickering-grid.js +144 -141
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +62 -0
- package/dist/components/flow-zoom-panel.cjs.map +1 -0
- package/dist/components/flow-zoom-panel.d.cts +12 -0
- package/dist/components/flow-zoom-panel.d.ts +12 -0
- package/dist/components/flow-zoom-panel.js +61 -0
- package/dist/components/flow-zoom-panel.js.map +1 -0
- package/dist/components/form-control.cjs +65 -0
- package/dist/components/form-control.cjs.map +1 -0
- package/dist/components/form-control.d.cts +15 -0
- package/dist/components/form-control.d.ts +11 -11
- package/dist/components/form-control.js +56 -167
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +102 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +2 -0
- package/dist/components/form.d.ts +2 -37
- package/dist/components/form.js +76 -163
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +70 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +16 -0
- package/dist/components/input-group.d.ts +14 -16
- package/dist/components/input-group.js +51 -163
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +37 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +2 -0
- package/dist/components/input.d.ts +2 -11
- package/dist/components/input.js +30 -54
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +147 -0
- package/dist/components/json-input.cjs.map +1 -0
- package/dist/components/json-input.d.cts +26 -0
- package/dist/components/json-input.d.ts +20 -19
- package/dist/components/json-input.js +132 -340
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +27 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +11 -0
- package/dist/components/label.d.ts +6 -6
- package/dist/components/label.js +17 -20
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +68 -0
- package/dist/components/motion-grid.cjs.map +1 -0
- package/dist/components/motion-grid.d.cts +20 -0
- package/dist/components/motion-grid.d.ts +15 -15
- package/dist/components/motion-grid.js +59 -75
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +573 -0
- package/dist/components/multi-select.cjs.map +1 -0
- package/dist/components/multi-select.d.cts +198 -0
- package/dist/components/multi-select.d.ts +173 -173
- package/dist/components/multi-select.js +562 -874
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +30 -0
- package/dist/components/page-header.cjs.map +1 -0
- package/dist/components/page-header.d.cts +17 -0
- 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 +95 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.d.cts +17 -0
- package/dist/components/pagination.d.ts +15 -17
- package/dist/components/pagination.js +70 -128
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +97 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +40 -0
- package/dist/components/popover.d.ts +33 -28
- package/dist/components/popover.js +78 -178
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +156 -0
- package/dist/components/portal.cjs.map +1 -0
- package/dist/components/portal.d.cts +118 -0
- package/dist/components/portal.d.ts +33 -23
- package/dist/components/portal.js +128 -57
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +30 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +10 -0
- package/dist/components/progress.d.ts +8 -8
- package/dist/components/progress.js +21 -24
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +76 -0
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.cts +25 -0
- 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 +46 -0
- package/dist/components/progressive-blur.cjs.map +1 -0
- package/dist/components/progressive-blur.d.cts +17 -0
- 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 +38 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +10 -0
- package/dist/components/radio-group.d.ts +8 -8
- package/dist/components/radio-group.js +28 -30
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +8 -0
- package/dist/components/record-picker.d.cts +16 -0
- package/dist/components/record-picker.d.ts +13 -13
- package/dist/components/record-picker.js +5 -364
- package/dist/components/resizable.cjs +50 -0
- package/dist/components/resizable.cjs.map +1 -0
- package/dist/components/resizable.d.cts +11 -0
- package/dist/components/resizable.d.ts +10 -10
- package/dist/components/resizable.js +29 -37
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +56 -0
- package/dist/components/responsive-diagram.cjs.map +1 -0
- package/dist/components/responsive-diagram.d.cts +10 -0
- 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 +46 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +12 -0
- package/dist/components/scroll-area.d.ts +11 -11
- package/dist/components/scroll-area.js +35 -62
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +204 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +47 -0
- package/dist/components/select.d.ts +38 -38
- package/dist/components/select.js +172 -269
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +23 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +2 -0
- package/dist/components/separator.d.ts +2 -11
- package/dist/components/separator.js +14 -18
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +19 -0
- package/dist/components/sheet.d.cts +107 -0
- package/dist/components/sheet.d.ts +85 -90
- package/dist/components/sheet.js +3 -598
- package/dist/components/sidebar.cjs +29 -0
- package/dist/components/sidebar.d.cts +67 -0
- package/dist/components/sidebar.d.ts +63 -73
- package/dist/components/sidebar.js +3 -1215
- package/dist/components/skeleton.cjs +24 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +11 -0
- package/dist/components/skeleton.d.ts +10 -6
- package/dist/components/skeleton.js +15 -10
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +23 -0
- package/dist/components/sonner.cjs.map +1 -0
- package/dist/components/sonner.d.cts +10 -0
- 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 +44 -0
- package/dist/components/stack/index.d.cts +2 -0
- package/dist/components/stack/index.d.ts +2 -674
- package/dist/components/stack/index.js +3 -1444
- package/dist/components/stepper.cjs +160 -0
- package/dist/components/stepper.cjs.map +1 -0
- package/dist/components/stepper.d.cts +32 -0
- package/dist/components/stepper.d.ts +27 -25
- package/dist/components/stepper.js +133 -261
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +35 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +8 -0
- package/dist/components/switch.d.ts +7 -7
- package/dist/components/switch.js +26 -34
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +85 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.d.cts +23 -0
- package/dist/components/table.d.ts +23 -15
- package/dist/components/table.js +56 -46
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +49 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +10 -0
- package/dist/components/tabs.d.ts +9 -9
- package/dist/components/tabs.js +31 -36
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +132 -0
- package/dist/components/tags.cjs.map +1 -0
- package/dist/components/tags.d.cts +36 -0
- package/dist/components/tags.d.ts +24 -28
- package/dist/components/tags.js +114 -438
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +34 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +10 -0
- package/dist/components/textarea.d.ts +8 -8
- package/dist/components/textarea.js +27 -48
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +9 -0
- package/dist/components/toast/index.d.cts +2 -0
- package/dist/components/toast/index.d.ts +2 -52
- package/dist/components/toast/index.js +3 -623
- package/dist/components/tooltip.cjs +67 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +2 -0
- package/dist/components/tooltip.d.ts +2 -29
- package/dist/components/tooltip.js +53 -166
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +24 -0
- package/dist/components/unlink-button.cjs.map +1 -0
- package/dist/components/unlink-button.d.cts +14 -0
- package/dist/components/unlink-button.d.ts +11 -11
- package/dist/components/unlink-button.js +18 -86
- 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 -9346
- package/dist/index.d.cts +224 -2548
- package/dist/index.d.ts +224 -2548
- package/dist/index.js +65 -9022
- 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 +288 -47
- package/src/styles/globals.css +155 -203
- package/dist/components/org-chart/index.d.ts +0 -54
- package/dist/components/org-chart/index.js +0 -861
- package/dist/components/org-chart/index.js.map +0 -1
- package/dist/components/record-picker.js.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
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");
|
|
11
|
+
|
|
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;
|
|
22
|
+
};
|
|
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;
|
|
27
|
+
};
|
|
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
|
+
});
|
|
49
|
+
}
|
|
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
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function StepperTrigger({ asChild = false, static: isStatic, className, children, ...props }) {
|
|
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
|
|
76
|
+
duration-150 ease-out outline-none focus-visible:z-10 focus-visible:ring-[3px]
|
|
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
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function StepperIndicator({ asChild = false, className, children, ...props }) {
|
|
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
|
|
102
|
+
data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground relative flex size-6
|
|
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
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function StepperTitle({ className, ...props }) {
|
|
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
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function StepperDescription({ className, ...props }) {
|
|
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
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function StepperSeparator({ className, ...props }) {
|
|
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
|
|
145
|
+
group-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=horizontal]/stepper:w-full
|
|
146
|
+
group-data-[orientation=horizontal]/stepper:flex-1 group-data-[orientation=vertical]/stepper:h-12
|
|
147
|
+
group-data-[orientation=vertical]/stepper:w-0.5`, className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
exports.Stepper = Stepper;
|
|
154
|
+
exports.StepperDescription = StepperDescription;
|
|
155
|
+
exports.StepperIndicator = StepperIndicator;
|
|
156
|
+
exports.StepperItem = StepperItem;
|
|
157
|
+
exports.StepperSeparator = StepperSeparator;
|
|
158
|
+
exports.StepperTitle = StepperTitle;
|
|
159
|
+
exports.StepperTrigger = StepperTrigger;
|
|
160
|
+
//# sourceMappingURL=stepper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
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
|
+
}
|
|
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
|
+
}
|
|
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
|
+
}
|
|
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
|
+
export { Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger };
|
|
32
|
+
//# sourceMappingURL=stepper.d.cts.map
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
orientation?: 'horizontal' | 'vertical';
|
|
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';
|
|
9
8
|
}
|
|
10
|
-
declare function Stepper({ defaultValue, value, onValueChange, orientation, className, ...props }: StepperProps):
|
|
11
|
-
interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
16
15
|
}
|
|
17
|
-
declare function StepperItem({ step, completed, disabled, loading, className, children, ...props }: StepperItemProps):
|
|
18
|
-
interface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
19
|
-
|
|
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;
|
|
20
21
|
}
|
|
21
|
-
declare function StepperTrigger({ asChild, className, children, ...props }: StepperTriggerProps):
|
|
22
|
-
interface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
-
|
|
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;
|
|
24
25
|
}
|
|
25
|
-
declare function StepperIndicator({ asChild, className, children, ...props }: StepperIndicatorProps):
|
|
26
|
-
declare function StepperTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>):
|
|
27
|
-
declare function StepperDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>):
|
|
28
|
-
declare function StepperSeparator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
29
|
-
|
|
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
|
|
30
31
|
export { Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger };
|
|
32
|
+
//# sourceMappingURL=stepper.d.ts.map
|