@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
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as React from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): react_jsx_runtime.JSX.Element;
|
|
8
|
-
declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): react_jsx_runtime.JSX.Element;
|
|
9
|
-
declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): react_jsx_runtime.JSX.Element;
|
|
1
|
+
import { t as Button } from "../button-D4vqTxhp.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
//#region src/components/pagination.d.ts
|
|
4
|
+
declare function Pagination({ className, ...props }: React$1.ComponentProps<'nav'>): React$1.JSX.Element;
|
|
5
|
+
declare function PaginationContent({ className, ...props }: React$1.ComponentProps<'ul'>): React$1.JSX.Element;
|
|
6
|
+
declare function PaginationItem({ className, ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
|
|
10
7
|
type PaginationLinkProps = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
|
|
14
|
-
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps):
|
|
15
|
-
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>):
|
|
16
|
-
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>):
|
|
17
|
-
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>):
|
|
18
|
-
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
} & Pick<React$1.ComponentProps<typeof Button>, 'size'> & React$1.ComponentProps<'a'>;
|
|
11
|
+
declare function PaginationLink({ className, isActive, isDisabled, size, ...props }: PaginationLinkProps): React$1.JSX.Element;
|
|
12
|
+
declare function PaginationPrevious({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): React$1.JSX.Element;
|
|
13
|
+
declare function PaginationNext({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): React$1.JSX.Element;
|
|
14
|
+
declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
|
|
15
|
+
//#endregion
|
|
19
16
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
17
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1,144 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
3
|
+
import { buttonVariants } from "./button.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
function cn(...inputs) {
|
|
11
|
-
return twMerge(clsx(inputs));
|
|
12
|
-
}
|
|
13
|
-
var buttonVariants = cva(
|
|
14
|
-
"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
15
|
-
{
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
size: "default",
|
|
18
|
-
variant: "default"
|
|
19
|
-
},
|
|
20
|
-
variants: {
|
|
21
|
-
size: {
|
|
22
|
-
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
23
|
-
icon: "size-9 sm:size-8",
|
|
24
|
-
"icon-lg": "size-10 sm:size-9",
|
|
25
|
-
"icon-sm": "size-8 sm:size-7",
|
|
26
|
-
"icon-xl": 'size-11 sm:size-10 [&_svg:not([class*="size-"])]:size-5 sm:[&_svg:not([class*="size-"])]:size-4.5',
|
|
27
|
-
"icon-xs": 'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*="size-"])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*="size-"])]:size-3.5',
|
|
28
|
-
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
29
|
-
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7",
|
|
30
|
-
xl: 'h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*="size-"])]:size-5 sm:[&_svg:not([class*="size-"])]:size-4.5',
|
|
31
|
-
xs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*="size-"])]:size-4 sm:[&_svg:not([class*="size-"])]:size-3.5'
|
|
32
|
-
},
|
|
33
|
-
variant: {
|
|
34
|
-
default: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
35
|
-
destructive: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
36
|
-
"destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8",
|
|
37
|
-
ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
|
|
38
|
-
link: "border-transparent underline-offset-4 hover:underline",
|
|
39
|
-
outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64",
|
|
40
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
var Button = React.forwardRef(
|
|
46
|
-
({ className, variant, size, asChild, children, type = "button", ...props }, ref) => {
|
|
47
|
-
const buttonClasses = cn(buttonVariants({ className, size, variant }));
|
|
48
|
-
if (asChild && React.isValidElement(children)) {
|
|
49
|
-
const childProps = children.props;
|
|
50
|
-
return React.cloneElement(children, {
|
|
51
|
-
...props,
|
|
52
|
-
className: cn(buttonClasses, childProps.className),
|
|
53
|
-
"data-slot": "button"
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return /* @__PURE__ */ jsx("button", { ref, type, className: buttonClasses, "data-slot": "button", ...props, children });
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
Button.displayName = "Button";
|
|
8
|
+
//#region src/components/pagination.tsx
|
|
60
9
|
function Pagination({ className, ...props }) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
...props
|
|
69
|
-
}
|
|
70
|
-
);
|
|
10
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
11
|
+
role: "navigation",
|
|
12
|
+
"aria-label": "pagination",
|
|
13
|
+
"data-slot": "pagination",
|
|
14
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
71
17
|
}
|
|
72
18
|
function PaginationContent({ className, ...props }) {
|
|
73
|
-
|
|
19
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
20
|
+
"data-slot": "pagination-content",
|
|
21
|
+
className: cn("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
74
24
|
}
|
|
75
|
-
function PaginationItem({ ...props }) {
|
|
76
|
-
|
|
25
|
+
function PaginationItem({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("li", {
|
|
27
|
+
"data-slot": "pagination-item",
|
|
28
|
+
className: cn("inline-flex", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
77
31
|
}
|
|
78
|
-
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
...props
|
|
93
|
-
}
|
|
94
|
-
);
|
|
32
|
+
function PaginationLink({ className, isActive, isDisabled, size = "icon", ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("a", {
|
|
34
|
+
"aria-current": isActive ? "page" : void 0,
|
|
35
|
+
"aria-disabled": isDisabled || void 0,
|
|
36
|
+
"data-slot": "pagination-link",
|
|
37
|
+
"data-active": isActive || void 0,
|
|
38
|
+
"data-disabled": isDisabled || void 0,
|
|
39
|
+
tabIndex: isDisabled ? -1 : props.tabIndex,
|
|
40
|
+
className: cn(buttonVariants({
|
|
41
|
+
variant: isActive ? "outline" : "ghost",
|
|
42
|
+
size
|
|
43
|
+
}), "tabular-nums", isDisabled && "pointer-events-none opacity-50", size === "icon" && "size-8 sm:size-10", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
95
46
|
}
|
|
96
47
|
function PaginationPrevious({ className, ...props }) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
);
|
|
48
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
49
|
+
"aria-label": "Go to previous page",
|
|
50
|
+
size: "default",
|
|
51
|
+
className: cn("h-8 gap-1 px-2.5 sm:h-10 sm:pe-4", "min-w-8 sm:min-w-10", className),
|
|
52
|
+
...props,
|
|
53
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16 }), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "hidden sm:inline",
|
|
55
|
+
children: "Previous"
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
110
58
|
}
|
|
111
59
|
function PaginationNext({ className, ...props }) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
60
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
61
|
+
"aria-label": "Go to next page",
|
|
62
|
+
size: "default",
|
|
63
|
+
className: cn("h-8 gap-1 px-2.5 sm:h-10 sm:ps-4 min-w-8 sm:min-w-10", className),
|
|
64
|
+
...props,
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "hidden sm:inline",
|
|
67
|
+
children: "Next"
|
|
68
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })]
|
|
69
|
+
});
|
|
125
70
|
}
|
|
126
71
|
function PaginationEllipsis({ className, ...props }) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
);
|
|
72
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
73
|
+
"aria-hidden": true,
|
|
74
|
+
"data-slot": "pagination-ellipsis",
|
|
75
|
+
className: cn("flex size-8 items-center justify-center text-muted-foreground sm:size-10", className),
|
|
76
|
+
...props,
|
|
77
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { size: 16 }), /* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: "sr-only",
|
|
79
|
+
children: "More pages"
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
140
82
|
}
|
|
141
83
|
|
|
84
|
+
//#endregion
|
|
142
85
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
143
|
-
//# sourceMappingURL=pagination.js.map
|
|
144
86
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/pagination.tsx"],"names":["jsx"],"mappings":"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","file":"pagination.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-9 px-[calc(--spacing(3)-1px)] sm:h-8',\n\t\t\t\ticon: 'size-9 sm:size-8',\n\t\t\t\t'icon-lg': 'size-10 sm:size-9',\n\t\t\t\t'icon-sm': 'size-8 sm:size-7',\n\t\t\t\t'icon-xl': 'size-11 sm:size-10 [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t\tlg: 'h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9',\n\t\t\t\tsm: 'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7',\n\t\t\t\txl: 'h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*=\"size-\"])]:size-5 sm:[&_svg:not([class*=\"size-\"])]:size-4.5',\n\t\t\t\txs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*=\"size-\"])]:size-4 sm:[&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, variant }));\n\n\t\t// If asChild, render children with merged props (for wrapping Links, etc.)\n\t\tif (asChild && React.isValidElement(children)) {\n\t\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t\treturn React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t...props,\n\t\t\t\tclassName: cn(buttonClasses, childProps.className as string | undefined),\n\t\t\t\t'data-slot': 'button',\n\t\t\t});\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\nimport { Button, buttonVariants } from './button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n\treturn (\n\t\t<nav\n\t\t\trole='navigation'\n\t\t\taria-label='pagination'\n\t\t\tdata-slot=\"pagination\"\n\t\t\tclassName={cn('mx-auto flex w-full justify-center', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n\treturn <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n\treturn <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n\tisDisabled?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n\tReact.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', ...props }: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? 'page' : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({\n\t\t\t\t\tvariant: isActive ? 'outline' : 'ghost',\n\t\t\t\t\tsize,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label='Go to previous page'\n\t\t\tsize='default'\n\t\t\tclassName={cn('gap-1 px-2.5 sm:pe-4', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t<span className='hidden sm:inline'>Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label='Go to next page'\n\t\t\tsize='default'\n\t\t\tclassName={cn('gap-1 px-2.5 sm:ps-4', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='hidden sm:inline'>Next</span>\n\t\t\t<ChevronRightIcon size={16} />\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\tclassName={cn('flex size-9 items-center justify-center', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon size={16} />\n\t\t\t<span className='sr-only'>More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '../lib/utils';\nimport { Button, buttonVariants } from './button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n\treturn (\n\t\t<nav\n\t\t\trole=\"navigation\"\n\t\t\taria-label=\"pagination\"\n\t\t\tdata-slot=\"pagination\"\n\t\t\tclassName={cn('mx-auto flex w-full justify-center', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n\treturn (\n\t\t<ul\n\t\t\tdata-slot=\"pagination-content\"\n\t\t\tclassName={cn(\n\t\t\t\t// flex-wrap keeps the row usable on narrow viewports instead of overflowing\n\t\t\t\t'flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationItem({ className, ...props }: React.ComponentProps<'li'>) {\n\treturn (\n\t\t<li\n\t\t\tdata-slot=\"pagination-item\"\n\t\t\t// inline-flex: one control per item; never stack ellipsis + page vertically\n\t\t\tclassName={cn('inline-flex', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n\tisDisabled?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n\tReact.ComponentProps<'a'>;\n\nfunction PaginationLink({\n\tclassName,\n\tisActive,\n\tisDisabled,\n\tsize = 'icon',\n\t...props\n}: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? 'page' : undefined}\n\t\t\taria-disabled={isDisabled || undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={isActive || undefined}\n\t\t\tdata-disabled={isDisabled || undefined}\n\t\t\ttabIndex={isDisabled ? -1 : props.tabIndex}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({\n\t\t\t\t\tvariant: isActive ? 'outline' : 'ghost',\n\t\t\t\t\tsize,\n\t\t\t\t}),\n\t\t\t\t'tabular-nums',\n\t\t\t\tisDisabled && 'pointer-events-none opacity-50',\n\t\t\t\t// Slightly denser on small screens; full hit target from button variants\n\t\t\t\tsize === 'icon' && 'size-8 sm:size-10',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to previous page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\n\t\t\t\t'h-8 gap-1 px-2.5 sm:h-10 sm:pe-4',\n\t\t\t\t// Icon-only on the narrowest widths; label from sm up\n\t\t\t\t'min-w-8 sm:min-w-10',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t<span className=\"hidden sm:inline\">Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to next page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn('h-8 gap-1 px-2.5 sm:h-10 sm:ps-4 min-w-8 sm:min-w-10', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"hidden sm:inline\">Next</span>\n\t\t\t<ChevronRightIcon size={16} />\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\tclassName={cn(\n\t\t\t\t'flex size-8 items-center justify-center text-muted-foreground sm:size-10',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon size={16} />\n\t\t\t<span className=\"sr-only\">More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n};\n"],"mappings":";;;;;;;;AAMA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACzE,OACC,oBAAC,OAAD;EACC,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACJ;AAEH;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAqC;CAC/E,OACC,oBAAC,MAAD;EACC,aAAU;EACV,WAAW,GAEV,wEACA,SACD;EACA,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAqC;CAC5E,OACC,oBAAC,MAAD;EACC,aAAU;EAEV,WAAW,GAAG,eAAe,SAAS;EACtC,GAAI;CACJ;AAEH;AAQA,SAAS,eAAe,EACvB,WACA,UACA,YACA,OAAO,QACP,GAAG,SACoB;CACvB,OACC,oBAAC,KAAD;EACC,gBAAc,WAAW,SAAS;EAClC,iBAAe,cAAc;EAC7B,aAAU;EACV,eAAa,YAAY;EACzB,iBAAe,cAAc;EAC7B,UAAU,aAAa,KAAK,MAAM;EAClC,WAAW,GACV,eAAe;GACd,SAAS,WAAW,YAAY;GAChC;EACD,CAAC,GACD,gBACA,cAAc,kCAEd,SAAS,UAAU,qBACnB,SACD;EACA,GAAI;CACJ;AAEH;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAsD;CACjG,OACC,qBAAC,gBAAD;EACC,cAAW;EACX,MAAK;EACL,WAAW,GACV,oCAEA,uBACA,SACD;EACA,GAAI;YATL,CAWC,oBAAC,iBAAD,EAAiB,MAAM,GAAK,IAC5B,oBAAC,QAAD;GAAM,WAAU;aAAmB;EAAc,EAClC;;AAElB;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsD;CAC7F,OACC,qBAAC,gBAAD;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAJL,CAMC,oBAAC,QAAD;GAAM,WAAU;aAAmB;EAAU,IAC7C,oBAAC,kBAAD,EAAkB,MAAM,GAAK,EACd;;AAElB;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAuC;CAClF,OACC,qBAAC,QAAD;EACC;EACA,aAAU;EACV,WAAW,GACV,4EACA,SACD;EACA,GAAI;YAPL,CASC,oBAAC,oBAAD,EAAoB,MAAM,GAAK,IAC/B,oBAAC,QAAD;GAAM,WAAU;aAAU;EAAgB,EACrC;;AAER"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _constructive_io_ui_portal = require("@constructive-io/ui/portal");
|
|
10
|
+
let _base_ui_react_popover = require("@base-ui/react/popover");
|
|
11
|
+
|
|
12
|
+
//#region src/components/popover.tsx
|
|
13
|
+
function Popover({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Root, {
|
|
15
|
+
"data-slot": "popover",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function PopoverTrigger({ asChild, children, render, nativeButton, ...props }) {
|
|
20
|
+
const childRender = render === void 0 && asChild && react.isValidElement(children) ? children : void 0;
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Trigger, {
|
|
22
|
+
"data-slot": "popover-trigger",
|
|
23
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
24
|
+
render: render ?? childRender,
|
|
25
|
+
...props,
|
|
26
|
+
children: childRender ? void 0 : children
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function PopoverClose({ asChild, children, render, nativeButton, ...props }) {
|
|
30
|
+
const childRender = render === void 0 && asChild && react.isValidElement(children) ? children : void 0;
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Close, {
|
|
32
|
+
"data-slot": "popover-close",
|
|
33
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
34
|
+
render: render ?? childRender,
|
|
35
|
+
...props,
|
|
36
|
+
children: childRender ? void 0 : children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, showArrow = false, side = "bottom", children, onOpenAutoFocus: _onOpenAutoFocus, onCloseAutoFocus: _onCloseAutoFocus, onFocusOutside: _onFocusOutside, onEscapeKeyDown: _onEscapeKeyDown, ...props }) {
|
|
40
|
+
const { container, zIndexClass } = (0, _constructive_io_ui_portal.useFloatingOverlayPortalProps)();
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Portal, {
|
|
42
|
+
container,
|
|
43
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Positioner, {
|
|
44
|
+
side,
|
|
45
|
+
align,
|
|
46
|
+
sideOffset,
|
|
47
|
+
className: zIndexClass,
|
|
48
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_popover.Popover.Popup, {
|
|
49
|
+
"data-slot": "popover-content",
|
|
50
|
+
className: require_utils.cn(`bg-popover text-popover-foreground origin-(--transform-origin) w-72 rounded-md border p-4 shadow-md outline-hidden
|
|
51
|
+
transition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95
|
|
52
|
+
data-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0
|
|
53
|
+
data-[side=bottom]:data-starting-style:-translate-y-2
|
|
54
|
+
data-[side=left]:data-starting-style:translate-x-2
|
|
55
|
+
data-[side=right]:data-starting-style:-translate-x-2
|
|
56
|
+
data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
|
|
57
|
+
...props,
|
|
58
|
+
children: [children, showArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Arrow, { className: "fill-popover -my-px drop-shadow-[0_1px_0_var(--border)]" })]
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* PopoverAnchor - placeholder for positioning anchor.
|
|
65
|
+
* @deprecated Base UI Popover positions relative to Trigger by default.
|
|
66
|
+
* For custom anchoring, use Popover.Positioner with anchor prop.
|
|
67
|
+
*/
|
|
68
|
+
function PopoverAnchor({ ...props }) {
|
|
69
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
70
|
+
"data-slot": "popover-anchor",
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function PopoverTitle({ className, ...props }) {
|
|
75
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Title, {
|
|
76
|
+
"data-slot": "popover-title",
|
|
77
|
+
className: require_utils.cn("font-medium leading-none", className),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function PopoverDescription({ className, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Description, {
|
|
83
|
+
"data-slot": "popover-description",
|
|
84
|
+
className: require_utils.cn("text-muted-foreground text-sm", className),
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
exports.Popover = Popover;
|
|
91
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
92
|
+
exports.PopoverClose = PopoverClose;
|
|
93
|
+
exports.PopoverContent = PopoverContent;
|
|
94
|
+
exports.PopoverDescription = PopoverDescription;
|
|
95
|
+
exports.PopoverTitle = PopoverTitle;
|
|
96
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
97
|
+
//# sourceMappingURL=popover.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.cjs","names":["PopoverPrimitive","React","cn"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover';\n\nimport { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';\nimport { cn } from '../lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\ntype PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction PopoverTrigger({ asChild, children, render, nativeButton, ...props }: PopoverTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<PopoverPrimitive.Trigger\n\t\t\tdata-slot=\"popover-trigger\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</PopoverPrimitive.Trigger>\n\t);\n}\n\ntype PopoverCloseProps = React.ComponentProps<typeof PopoverPrimitive.Close> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction PopoverClose({ asChild, children, render, nativeButton, ...props }: PopoverCloseProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<PopoverPrimitive.Close\n\t\t\tdata-slot=\"popover-close\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</PopoverPrimitive.Close>\n\t);\n}\n\ntype PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Popup> & {\n\talign?: 'start' | 'center' | 'end';\n\tsideOffset?: number;\n\tshowArrow?: boolean;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\t/** @deprecated Base UI uses different focus management */\n\tonOpenAutoFocus?: (e: Event) => void;\n\t/** @deprecated Base UI uses different focus management */\n\tonCloseAutoFocus?: (e: Event) => void;\n\t/** @deprecated Use onOpenChange on Root instead */\n\tonFocusOutside?: (e: Event) => void;\n\t/** @deprecated Use onOpenChange on Root instead */\n\tonEscapeKeyDown?: () => void;\n};\n\nfunction PopoverContent({\n\tclassName,\n\talign = 'center',\n\tsideOffset = 4,\n\tshowArrow = false,\n\tside = 'bottom',\n\tchildren,\n\tonOpenAutoFocus: _onOpenAutoFocus,\n\tonCloseAutoFocus: _onCloseAutoFocus,\n\tonFocusOutside: _onFocusOutside,\n\tonEscapeKeyDown: _onEscapeKeyDown,\n\t...props\n}: PopoverContentProps) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<PopoverPrimitive.Portal container={container}>\n\t\t\t<PopoverPrimitive.Positioner\n\t\t\t\tside={side}\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={zIndexClass}\n\t\t\t>\n\t\t\t\t<PopoverPrimitive.Popup\n\t\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground origin-(--transform-origin) w-72 rounded-md border p-4 shadow-md outline-hidden\n\t\t\t\t\t\ttransition-[scale,opacity,translate] duration-150 ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t\t{showArrow && (\n\t\t\t\t\t\t<PopoverPrimitive.Arrow className='fill-popover -my-px drop-shadow-[0_1px_0_var(--border)]' />\n\t\t\t\t\t)}\n\t\t\t\t</PopoverPrimitive.Popup>\n\t\t\t</PopoverPrimitive.Positioner>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\n/**\n * PopoverAnchor - placeholder for positioning anchor.\n * @deprecated Base UI Popover positions relative to Trigger by default.\n * For custom anchoring, use Popover.Positioner with anchor prop.\n */\nfunction PopoverAnchor({ ...props }: React.HTMLAttributes<HTMLDivElement>) {\n\treturn <div data-slot=\"popover-anchor\" {...props} />;\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<typeof PopoverPrimitive.Title>) {\n\treturn (\n\t\t<PopoverPrimitive.Title\n\t\t\tdata-slot=\"popover-title\"\n\t\t\tclassName={cn('font-medium leading-none', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverDescription({ className, ...props }: React.ComponentProps<typeof PopoverPrimitive.Description>) {\n\treturn (\n\t\t<PopoverPrimitive.Description\n\t\t\tdata-slot=\"popover-description\"\n\t\t\tclassName={cn('text-muted-foreground text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverClose,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverTitle,\n\tPopoverTrigger,\n};\n"],"mappings":";;;;;;;;;;;;AAQA,SAAS,QAAQ,EAAE,GAAG,SAA6D;CAClF,OAAO,2CAACA,+BAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ;AAC/D;AAOA,SAAS,eAAe,EAAE,SAAS,UAAU,QAAQ,cAAc,GAAG,SAA8B;CACnG,MAAM,cAAc,WAAW,UAAa,WAAWC,MAAM,eAAe,QAAQ,IAAI,WAAW;CAEnG,OACC,2CAACD,+BAAiB,SAAlB;EACC,aAAU;EACV,cAAc,iBAAiB,cAAc,OAAO;EACpD,QAAQ,UAAU;EAClB,GAAI;YAEH,cAAc,SAAY;CACF;AAE5B;AAOA,SAAS,aAAa,EAAE,SAAS,UAAU,QAAQ,cAAc,GAAG,SAA4B;CAC/F,MAAM,cAAc,WAAW,UAAa,WAAWC,MAAM,eAAe,QAAQ,IAAI,WAAW;CAEnG,OACC,2CAACD,+BAAiB,OAAlB;EACC,aAAU;EACV,cAAc,iBAAiB,cAAc,OAAO;EACpD,QAAQ,UAAU;EAClB,GAAI;YAEH,cAAc,SAAY;CACJ;AAE1B;AAiBA,SAAS,eAAe,EACvB,WACA,QAAQ,UACR,aAAa,GACb,YAAY,OACZ,OAAO,UACP,UACA,iBAAiB,kBACjB,kBAAkB,mBAClB,gBAAgB,iBAChB,iBAAiB,kBACjB,GAAG,SACoB;CACvB,MAAM,EAAE,WAAW,8EAA8C;CAEjE,OACC,2CAACA,+BAAiB,QAAlB;EAAoC;YACnC,2CAACA,+BAAiB,YAAlB;GACO;GACC;GACK;GACZ,WAAW;aAEX,4CAACA,+BAAiB,OAAlB;IACC,aAAU;IACV,WAAWE,iBACV;;;;;;wFAOA,SACD;IACA,GAAI;cAZL,CAcE,UACA,aACA,2CAACF,+BAAiB,OAAlB,EAAwB,WAAU,0DAA2D,EAEvE;;EACI;CACL;AAE3B;;;;;;AAOA,SAAS,cAAc,EAAE,GAAG,SAA+C;CAC1E,OAAO,2CAAC,OAAD;EAAK,aAAU;EAAiB,GAAI;CAAQ;AACpD;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA8D;CACnG,OACC,2CAACA,+BAAiB,OAAlB;EACC,aAAU;EACV,WAAWE,iBAAG,4BAA4B,SAAS;EACnD,GAAI;CACJ;AAEH;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAoE;CAC/G,OACC,2CAACF,+BAAiB,aAAlB;EACC,aAAU;EACV,WAAWE,iBAAG,iCAAiC,SAAS;EACxD,GAAI;CACJ;AAEH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/components/popover.d.ts
|
|
4
|
+
declare function Popover({ ...props }: React$1.ComponentProps<typeof Popover$1.Root>): React$1.JSX.Element;
|
|
5
|
+
type PopoverTriggerProps = React$1.ComponentProps<typeof Popover$1.Trigger> & {
|
|
6
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare function PopoverTrigger({ asChild, children, render, nativeButton, ...props }: PopoverTriggerProps): React$1.JSX.Element;
|
|
10
|
+
type PopoverCloseProps = React$1.ComponentProps<typeof Popover$1.Close> & {
|
|
11
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare function PopoverClose({ asChild, children, render, nativeButton, ...props }: PopoverCloseProps): React$1.JSX.Element;
|
|
15
|
+
type PopoverContentProps = React$1.ComponentProps<typeof Popover$1.Popup> & {
|
|
16
|
+
align?: 'start' | 'center' | 'end';
|
|
17
|
+
sideOffset?: number;
|
|
18
|
+
showArrow?: boolean;
|
|
19
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
20
|
+
/** @deprecated Base UI uses different focus management */
|
|
21
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
22
|
+
/** @deprecated Base UI uses different focus management */
|
|
23
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
24
|
+
/** @deprecated Use onOpenChange on Root instead */
|
|
25
|
+
onFocusOutside?: (e: Event) => void;
|
|
26
|
+
/** @deprecated Use onOpenChange on Root instead */
|
|
27
|
+
onEscapeKeyDown?: () => void;
|
|
28
|
+
};
|
|
29
|
+
declare function PopoverContent({ className, align, sideOffset, showArrow, side, children, onOpenAutoFocus: _onOpenAutoFocus, onCloseAutoFocus: _onCloseAutoFocus, onFocusOutside: _onFocusOutside, onEscapeKeyDown: _onEscapeKeyDown, ...props }: PopoverContentProps): React$1.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* PopoverAnchor - placeholder for positioning anchor.
|
|
32
|
+
* @deprecated Base UI Popover positions relative to Trigger by default.
|
|
33
|
+
* For custom anchoring, use Popover.Positioner with anchor prop.
|
|
34
|
+
*/
|
|
35
|
+
declare function PopoverAnchor({ ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
36
|
+
declare function PopoverTitle({ className, ...props }: React$1.ComponentProps<typeof Popover$1.Title>): React$1.JSX.Element;
|
|
37
|
+
declare function PopoverDescription({ className, ...props }: React$1.ComponentProps<typeof Popover$1.Description>): React$1.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger };
|
|
40
|
+
//# sourceMappingURL=popover.d.cts.map
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
/** Whether the child renders a native button. Defaults to true when asChild is used. */
|
|
10
|
-
nativeButton?: boolean;
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/components/popover.d.ts
|
|
4
|
+
declare function Popover({ ...props }: React$1.ComponentProps<typeof Popover$1.Root>): React$1.JSX.Element;
|
|
5
|
+
type PopoverTriggerProps = React$1.ComponentProps<typeof Popover$1.Trigger> & {
|
|
6
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
7
|
+
asChild?: boolean;
|
|
11
8
|
};
|
|
12
|
-
declare function PopoverTrigger({ asChild,
|
|
13
|
-
type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
showArrow?: boolean;
|
|
17
|
-
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
18
|
-
/** @deprecated Base UI uses different focus management */
|
|
19
|
-
onOpenAutoFocus?: (e: Event) => void;
|
|
20
|
-
/** @deprecated Base UI uses different focus management */
|
|
21
|
-
onCloseAutoFocus?: (e: Event) => void;
|
|
22
|
-
/** @deprecated Use onOpenChange on Root instead */
|
|
23
|
-
onFocusOutside?: (e: Event) => void;
|
|
24
|
-
/** @deprecated Use onOpenChange on Root instead */
|
|
25
|
-
onEscapeKeyDown?: () => void;
|
|
9
|
+
declare function PopoverTrigger({ asChild, children, render, nativeButton, ...props }: PopoverTriggerProps): React$1.JSX.Element;
|
|
10
|
+
type PopoverCloseProps = React$1.ComponentProps<typeof Popover$1.Close> & {
|
|
11
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
12
|
+
asChild?: boolean;
|
|
26
13
|
};
|
|
27
|
-
declare function
|
|
14
|
+
declare function PopoverClose({ asChild, children, render, nativeButton, ...props }: PopoverCloseProps): React$1.JSX.Element;
|
|
15
|
+
type PopoverContentProps = React$1.ComponentProps<typeof Popover$1.Popup> & {
|
|
16
|
+
align?: 'start' | 'center' | 'end';
|
|
17
|
+
sideOffset?: number;
|
|
18
|
+
showArrow?: boolean;
|
|
19
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
20
|
+
/** @deprecated Base UI uses different focus management */
|
|
21
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
22
|
+
/** @deprecated Base UI uses different focus management */
|
|
23
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
24
|
+
/** @deprecated Use onOpenChange on Root instead */
|
|
25
|
+
onFocusOutside?: (e: Event) => void;
|
|
26
|
+
/** @deprecated Use onOpenChange on Root instead */
|
|
27
|
+
onEscapeKeyDown?: () => void;
|
|
28
|
+
};
|
|
29
|
+
declare function PopoverContent({ className, align, sideOffset, showArrow, side, children, onOpenAutoFocus: _onOpenAutoFocus, onCloseAutoFocus: _onCloseAutoFocus, onFocusOutside: _onFocusOutside, onEscapeKeyDown: _onEscapeKeyDown, ...props }: PopoverContentProps): React$1.JSX.Element;
|
|
28
30
|
/**
|
|
29
31
|
* PopoverAnchor - placeholder for positioning anchor.
|
|
30
32
|
* @deprecated Base UI Popover positions relative to Trigger by default.
|
|
31
33
|
* For custom anchoring, use Popover.Positioner with anchor prop.
|
|
32
34
|
*/
|
|
33
|
-
declare function PopoverAnchor({ ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
declare function PopoverAnchor({ ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
36
|
+
declare function PopoverTitle({ className, ...props }: React$1.ComponentProps<typeof Popover$1.Title>): React$1.JSX.Element;
|
|
37
|
+
declare function PopoverDescription({ className, ...props }: React$1.ComponentProps<typeof Popover$1.Description>): React$1.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger };
|
|
40
|
+
//# sourceMappingURL=popover.d.ts.map
|