@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,37 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import { Radio as Radio$1 } from '@base-ui/react/radio';
|
|
3
|
-
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
4
|
-
import { clsx } from 'clsx';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
'use client';
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Radio as Radio$1 } from "@base-ui/react/radio";
|
|
6
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/radio-group.tsx
|
|
11
9
|
function RadioGroup({ className, ...props }) {
|
|
12
|
-
|
|
10
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
11
|
+
className: cn("flex flex-col gap-3", className),
|
|
12
|
+
"data-slot": "radio-group",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
13
15
|
}
|
|
14
16
|
function Radio({ className, ...props }) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
);
|
|
17
|
+
return /* @__PURE__ */ jsxs(Radio$1.Root, {
|
|
18
|
+
className: cn("relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
|
|
19
|
+
"data-slot": "radio",
|
|
20
|
+
...props,
|
|
21
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
className: "pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border",
|
|
24
|
+
"data-slot": "radio-control"
|
|
25
|
+
}), /* @__PURE__ */ jsx(Radio$1.Indicator, {
|
|
26
|
+
keepMounted: true,
|
|
27
|
+
className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
|
|
28
|
+
"data-slot": "radio-indicator"
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Radio, Radio as RadioGroupItem, RadioGroup };
|
|
37
35
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,oBAACA,cAAD;EAAqB,WAAW,GAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,qBAACC,QAAe,MAAhB;EACC,WAAW,GACV,qyBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,oBAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,oBAACA,QAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
require('./checkbox.cjs');
|
|
5
|
+
require('./input-group.cjs');
|
|
6
|
+
const require_record_picker = require('../record-picker-Bz4FApxD.cjs');
|
|
7
|
+
|
|
8
|
+
exports.RecordPicker = require_record_picker.RecordPicker;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/record-picker.d.ts
|
|
2
|
+
interface RecordPickerProps {
|
|
3
|
+
records: any[];
|
|
4
|
+
linkedRecordIds: Set<string>;
|
|
5
|
+
onLink: (record: any) => void;
|
|
6
|
+
isLinking: boolean;
|
|
7
|
+
getRecordLabel: (record: any) => string;
|
|
8
|
+
getRecordId: (record: any) => string;
|
|
9
|
+
searchFields?: string[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
maxHeight?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function RecordPicker({ records, linkedRecordIds, onLink, isLinking, getRecordLabel, getRecordId, searchFields, placeholder, maxHeight }: RecordPickerProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { RecordPicker };
|
|
16
|
+
//# sourceMappingURL=record-picker.d.cts.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/components/record-picker.d.ts
|
|
3
2
|
interface RecordPickerProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
records: any[];
|
|
4
|
+
linkedRecordIds: Set<string>;
|
|
5
|
+
onLink: (record: any) => void;
|
|
6
|
+
isLinking: boolean;
|
|
7
|
+
getRecordLabel: (record: any) => string;
|
|
8
|
+
getRecordId: (record: any) => string;
|
|
9
|
+
searchFields?: string[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
maxHeight?: string;
|
|
13
12
|
}
|
|
14
|
-
declare function RecordPicker({ records, linkedRecordIds, onLink, isLinking, getRecordLabel, getRecordId, searchFields, placeholder, maxHeight
|
|
15
|
-
|
|
13
|
+
declare function RecordPicker({ records, linkedRecordIds, onLink, isLinking, getRecordLabel, getRecordId, searchFields, placeholder, maxHeight }: RecordPickerProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
16
15
|
export { RecordPicker };
|
|
16
|
+
//# sourceMappingURL=record-picker.d.ts.map
|
|
@@ -1,366 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useState, useMemo, useCallback, useEffect } from 'react';
|
|
4
|
-
import { RiSearchLine, RiLoader4Line, RiCheckLine } from '@remixicon/react';
|
|
5
|
-
import { matchSorter } from 'match-sorter';
|
|
6
|
-
import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
7
|
-
import { clsx } from 'clsx';
|
|
8
|
-
import { twMerge } from 'tailwind-merge';
|
|
9
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
-
import { cva } from 'class-variance-authority';
|
|
11
|
-
import { Input as Input$1 } from '@base-ui/react/input';
|
|
12
|
-
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
1
|
+
'use client';
|
|
13
2
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const handler = setTimeout(() => {
|
|
18
|
-
setDebouncedValue(value);
|
|
19
|
-
}, delay);
|
|
20
|
-
return () => {
|
|
21
|
-
clearTimeout(handler);
|
|
22
|
-
};
|
|
23
|
-
}, [value, delay]);
|
|
24
|
-
return debouncedValue;
|
|
25
|
-
}
|
|
26
|
-
function cn(...inputs) {
|
|
27
|
-
return twMerge(clsx(inputs));
|
|
28
|
-
}
|
|
29
|
-
var Checkbox = React.forwardRef(({ className, ...props }, ref) => {
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
-
Checkbox$1.Root,
|
|
32
|
-
{
|
|
33
|
-
ref,
|
|
34
|
-
className: cn(
|
|
35
|
-
"relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background bg-clip-padding outline-none ring-ring transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:bg-clip-border dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none",
|
|
36
|
-
className
|
|
37
|
-
),
|
|
38
|
-
"data-slot": "checkbox",
|
|
39
|
-
...props,
|
|
40
|
-
children: /* @__PURE__ */ jsx(
|
|
41
|
-
Checkbox$1.Indicator,
|
|
42
|
-
{
|
|
43
|
-
className: "-inset-px absolute flex items-center justify-center rounded-[4px] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground",
|
|
44
|
-
"data-slot": "checkbox-indicator",
|
|
45
|
-
render: (props2, state) => /* @__PURE__ */ jsx("span", { ...props2, children: state.indeterminate ? /* @__PURE__ */ jsx(
|
|
46
|
-
"svg",
|
|
47
|
-
{
|
|
48
|
-
className: "size-3.5 sm:size-3",
|
|
49
|
-
fill: "none",
|
|
50
|
-
height: "24",
|
|
51
|
-
stroke: "currentColor",
|
|
52
|
-
strokeLinecap: "round",
|
|
53
|
-
strokeLinejoin: "round",
|
|
54
|
-
strokeWidth: "3",
|
|
55
|
-
viewBox: "0 0 24 24",
|
|
56
|
-
width: "24",
|
|
57
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
-
children: /* @__PURE__ */ jsx("path", { d: "M5.252 12h13.496" })
|
|
59
|
-
}
|
|
60
|
-
) : /* @__PURE__ */ jsx(
|
|
61
|
-
"svg",
|
|
62
|
-
{
|
|
63
|
-
className: "size-3.5 sm:size-3",
|
|
64
|
-
fill: "none",
|
|
65
|
-
height: "24",
|
|
66
|
-
stroke: "currentColor",
|
|
67
|
-
strokeLinecap: "round",
|
|
68
|
-
strokeLinejoin: "round",
|
|
69
|
-
strokeWidth: "3",
|
|
70
|
-
viewBox: "0 0 24 24",
|
|
71
|
-
width: "24",
|
|
72
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
73
|
-
children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
|
|
74
|
-
}
|
|
75
|
-
) })
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
});
|
|
81
|
-
Checkbox.displayName = "Checkbox";
|
|
82
|
-
function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
83
|
-
const isFloating = props.placeholder === " ";
|
|
84
|
-
return /* @__PURE__ */ jsx(
|
|
85
|
-
"span",
|
|
86
|
-
{
|
|
87
|
-
className: cn(
|
|
88
|
-
!unstyled && [
|
|
89
|
-
// Base layout
|
|
90
|
-
"relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow",
|
|
91
|
-
// Inner shadow highlight
|
|
92
|
-
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]",
|
|
93
|
-
"not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
|
|
94
|
-
// Focus state - use primary brand color
|
|
95
|
-
"has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35",
|
|
96
|
-
// Invalid state
|
|
97
|
-
"has-aria-invalid:border-destructive/36",
|
|
98
|
-
"has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16",
|
|
99
|
-
// Disabled state
|
|
100
|
-
"has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none",
|
|
101
|
-
// Dark mode
|
|
102
|
-
"sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border",
|
|
103
|
-
"dark:has-aria-invalid:ring-destructive/24",
|
|
104
|
-
"dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]"
|
|
105
|
-
],
|
|
106
|
-
className
|
|
107
|
-
) || void 0,
|
|
108
|
-
"data-size": size,
|
|
109
|
-
"data-slot": "input-control",
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
-
Input$1,
|
|
112
|
-
{
|
|
113
|
-
className: cn(
|
|
114
|
-
"w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none",
|
|
115
|
-
isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5",
|
|
116
|
-
size === "sm" && (isFloating ? "h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9" : "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5"),
|
|
117
|
-
size === "lg" && (isFloating ? "h-12 pt-5 pb-1.5 sm:h-11" : "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5"),
|
|
118
|
-
props.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",
|
|
119
|
-
props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"
|
|
120
|
-
),
|
|
121
|
-
"data-slot": "input",
|
|
122
|
-
size: typeof size === "number" ? size : void 0,
|
|
123
|
-
...props
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
function InputGroup({ className, ...props }) {
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
131
|
-
"div",
|
|
132
|
-
{
|
|
133
|
-
className: cn(
|
|
134
|
-
"relative inline-flex w-full min-w-0 items-center rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 has-[textarea]:h-auto has-data-[align=block-end]:h-auto has-data-[align=block-start]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:flex-col has-[input:focus-visible,textarea:focus-visible]:border-primary/60 has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] has-[input:focus-visible,textarea:focus-visible]:ring-primary/35 sm:text-sm dark:bg-input/32 dark:bg-clip-border dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/8%)] has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto has-data-[align=inline-start]:**:[input]:ps-2 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5 **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)]",
|
|
135
|
-
className
|
|
136
|
-
),
|
|
137
|
-
"data-slot": "input-group",
|
|
138
|
-
role: "group",
|
|
139
|
-
...props
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
var inputGroupAddonVariants = cva(
|
|
144
|
-
"[&_svg]:-mx-0.5 flex h-auto cursor-text select-none items-center justify-center gap-2 [&>kbd]:rounded-[calc(var(--radius)-5px)] in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 not-has-[button]:**:[svg:not([class*='opacity-'])]:opacity-80",
|
|
145
|
-
{
|
|
146
|
-
defaultVariants: {
|
|
147
|
-
align: "inline-start"
|
|
148
|
-
},
|
|
149
|
-
variants: {
|
|
150
|
-
align: {
|
|
151
|
-
"block-end": "order-last w-full justify-start px-[calc(--spacing(3)-1px)] pb-[calc(--spacing(3)-1px)] [.border-t]:pt-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]",
|
|
152
|
-
"block-start": "order-first w-full justify-start px-[calc(--spacing(3)-1px)] pt-[calc(--spacing(3)-1px)] [.border-b]:pb-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]",
|
|
153
|
-
"inline-end": "has-[>:last-child[data-slot=badge]]:-me-1.5 has-[>button]:-me-2 order-last pe-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:me-[-0.35rem] [[data-size=sm]+&]:pe-[calc(--spacing(2.5)-1px)]",
|
|
154
|
-
"inline-start": "has-[>:last-child[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 order-first ps-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
function InputGroupAddon({
|
|
160
|
-
className,
|
|
161
|
-
align = "inline-start",
|
|
162
|
-
...props
|
|
163
|
-
}) {
|
|
164
|
-
return /* @__PURE__ */ jsx(
|
|
165
|
-
"div",
|
|
166
|
-
{
|
|
167
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
168
|
-
"data-align": align,
|
|
169
|
-
"data-slot": "input-group-addon",
|
|
170
|
-
onMouseDown: (e) => {
|
|
171
|
-
const target = e.target;
|
|
172
|
-
const isInteractive = target.closest("button, a");
|
|
173
|
-
if (isInteractive) return;
|
|
174
|
-
e.preventDefault();
|
|
175
|
-
const parent = e.currentTarget.parentElement;
|
|
176
|
-
const input = parent?.querySelector("input, textarea");
|
|
177
|
-
if (input && !parent?.querySelector("input:focus, textarea:focus")) {
|
|
178
|
-
input.focus();
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
...props
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
function InputGroupInput({ className, ...props }) {
|
|
186
|
-
return /* @__PURE__ */ jsx(Input, { className, unstyled: true, ...props });
|
|
187
|
-
}
|
|
188
|
-
var ScrollArea = React.forwardRef(
|
|
189
|
-
({ className, children, scrollFade = false, scrollbarGutter = false, ...props }, ref) => {
|
|
190
|
-
return /* @__PURE__ */ jsxs(
|
|
191
|
-
ScrollArea$1.Root,
|
|
192
|
-
{
|
|
193
|
-
ref,
|
|
194
|
-
className: cn("size-full min-h-0", className),
|
|
195
|
-
...props,
|
|
196
|
-
children: [
|
|
197
|
-
/* @__PURE__ */ jsx(
|
|
198
|
-
ScrollArea$1.Viewport,
|
|
199
|
-
{
|
|
200
|
-
className: cn(
|
|
201
|
-
"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
|
|
202
|
-
scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
|
|
203
|
-
scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"
|
|
204
|
-
),
|
|
205
|
-
"data-slot": "scroll-area-viewport",
|
|
206
|
-
children
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
/* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
|
|
210
|
-
/* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
|
|
211
|
-
/* @__PURE__ */ jsx(ScrollArea$1.Corner, { "data-slot": "scroll-area-corner" })
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
ScrollArea.displayName = "ScrollArea";
|
|
218
|
-
function ScrollBar({
|
|
219
|
-
className,
|
|
220
|
-
orientation = "vertical",
|
|
221
|
-
...props
|
|
222
|
-
}) {
|
|
223
|
-
return /* @__PURE__ */ jsx(
|
|
224
|
-
ScrollArea$1.Scrollbar,
|
|
225
|
-
{
|
|
226
|
-
className: cn(
|
|
227
|
-
"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",
|
|
228
|
-
className
|
|
229
|
-
),
|
|
230
|
-
"data-slot": "scroll-area-scrollbar",
|
|
231
|
-
orientation,
|
|
232
|
-
...props,
|
|
233
|
-
children: /* @__PURE__ */ jsx(
|
|
234
|
-
ScrollArea$1.Thumb,
|
|
235
|
-
{
|
|
236
|
-
className: "relative flex-1 rounded-full bg-foreground/20",
|
|
237
|
-
"data-slot": "scroll-area-thumb"
|
|
238
|
-
}
|
|
239
|
-
)
|
|
240
|
-
}
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
function RecordPicker({
|
|
244
|
-
records,
|
|
245
|
-
linkedRecordIds,
|
|
246
|
-
onLink,
|
|
247
|
-
isLinking,
|
|
248
|
-
getRecordLabel,
|
|
249
|
-
getRecordId,
|
|
250
|
-
searchFields = ["name", "title", "label"],
|
|
251
|
-
placeholder = "Search records...",
|
|
252
|
-
maxHeight = "300px"
|
|
253
|
-
}) {
|
|
254
|
-
const [searchQuery, setSearchQuery] = useState("");
|
|
255
|
-
const debouncedSearchQuery = useDebounce(searchQuery, 300);
|
|
256
|
-
const filteredRecords = useMemo(() => {
|
|
257
|
-
if (!debouncedSearchQuery.trim()) {
|
|
258
|
-
return records;
|
|
259
|
-
}
|
|
260
|
-
return matchSorter(records, debouncedSearchQuery, {
|
|
261
|
-
keys: searchFields,
|
|
262
|
-
threshold: matchSorter.rankings.CONTAINS
|
|
263
|
-
});
|
|
264
|
-
}, [records, debouncedSearchQuery, searchFields]);
|
|
265
|
-
const { linkedRecords, unlinkableRecords } = useMemo(() => {
|
|
266
|
-
const linked = [];
|
|
267
|
-
const unlinkable = [];
|
|
268
|
-
filteredRecords.forEach((record) => {
|
|
269
|
-
const recordId = getRecordId(record);
|
|
270
|
-
if (linkedRecordIds.has(recordId)) {
|
|
271
|
-
linked.push(record);
|
|
272
|
-
} else {
|
|
273
|
-
unlinkable.push(record);
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
return { linkedRecords: linked, unlinkableRecords: unlinkable };
|
|
277
|
-
}, [filteredRecords, linkedRecordIds, getRecordId]);
|
|
278
|
-
const handleLinkRecord = useCallback(
|
|
279
|
-
(record) => {
|
|
280
|
-
onLink(record);
|
|
281
|
-
},
|
|
282
|
-
[onLink]
|
|
283
|
-
);
|
|
284
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
285
|
-
/* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
286
|
-
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(RiSearchLine, {}) }),
|
|
287
|
-
/* @__PURE__ */ jsx(
|
|
288
|
-
InputGroupInput,
|
|
289
|
-
{
|
|
290
|
-
placeholder,
|
|
291
|
-
value: searchQuery,
|
|
292
|
-
onChange: (e) => setSearchQuery(e.target.value)
|
|
293
|
-
}
|
|
294
|
-
)
|
|
295
|
-
] }),
|
|
296
|
-
/* @__PURE__ */ jsx(ScrollArea, { style: { maxHeight }, className: "scrollbar-neutral-thin", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2 pr-2", children: [
|
|
297
|
-
unlinkableRecords.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
298
|
-
/* @__PURE__ */ jsxs("h4", { className: "text-muted-foreground text-xs font-medium tracking-wide uppercase", children: [
|
|
299
|
-
"Available Records (",
|
|
300
|
-
unlinkableRecords.length,
|
|
301
|
-
")"
|
|
302
|
-
] }),
|
|
303
|
-
unlinkableRecords.map((record) => {
|
|
304
|
-
const recordId = getRecordId(record);
|
|
305
|
-
const label = getRecordLabel(record);
|
|
306
|
-
return /* @__PURE__ */ jsxs(
|
|
307
|
-
"div",
|
|
308
|
-
{
|
|
309
|
-
className: "hover:bg-muted/50 flex items-center space-x-3 rounded-md p-2 transition-colors",
|
|
310
|
-
children: [
|
|
311
|
-
/* @__PURE__ */ jsx(
|
|
312
|
-
Checkbox,
|
|
313
|
-
{
|
|
314
|
-
id: `record-${recordId}`,
|
|
315
|
-
checked: false,
|
|
316
|
-
onCheckedChange: () => handleLinkRecord(record),
|
|
317
|
-
disabled: isLinking,
|
|
318
|
-
className: "flex-shrink-0"
|
|
319
|
-
}
|
|
320
|
-
),
|
|
321
|
-
/* @__PURE__ */ jsx(
|
|
322
|
-
"label",
|
|
323
|
-
{
|
|
324
|
-
htmlFor: `record-${recordId}`,
|
|
325
|
-
className: "flex-1 cursor-pointer truncate text-sm",
|
|
326
|
-
title: label,
|
|
327
|
-
children: label
|
|
328
|
-
}
|
|
329
|
-
),
|
|
330
|
-
isLinking && /* @__PURE__ */ jsx(RiLoader4Line, { className: "text-muted-foreground h-4 w-4 flex-shrink-0 animate-spin" })
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
|
-
recordId
|
|
334
|
-
);
|
|
335
|
-
})
|
|
336
|
-
] }),
|
|
337
|
-
linkedRecords.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
338
|
-
/* @__PURE__ */ jsxs("h4", { className: "text-muted-foreground text-xs font-medium tracking-wide uppercase", children: [
|
|
339
|
-
"Already Linked (",
|
|
340
|
-
linkedRecords.length,
|
|
341
|
-
")"
|
|
342
|
-
] }),
|
|
343
|
-
linkedRecords.map((record) => {
|
|
344
|
-
const recordId = getRecordId(record);
|
|
345
|
-
const label = getRecordLabel(record);
|
|
346
|
-
return /* @__PURE__ */ jsxs("div", { className: "bg-muted/30 flex items-center space-x-3 rounded-md p-2", children: [
|
|
347
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(RiCheckLine, { className: "h-3 w-3 text-green-600" }) }),
|
|
348
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground flex-1 truncate text-sm", title: label, children: label })
|
|
349
|
-
] }, recordId);
|
|
350
|
-
})
|
|
351
|
-
] }),
|
|
352
|
-
filteredRecords.length === 0 && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground py-8 text-center", children: [
|
|
353
|
-
/* @__PURE__ */ jsx(RiSearchLine, { className: "mx-auto mb-2 h-8 w-8 opacity-50" }),
|
|
354
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm", children: searchQuery ? "No records match your search" : "No records available" })
|
|
355
|
-
] }),
|
|
356
|
-
filteredRecords.length > 0 && unlinkableRecords.length === 0 && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground py-4 text-center", children: [
|
|
357
|
-
/* @__PURE__ */ jsx(RiCheckLine, { className: "mx-auto mb-2 h-6 w-6 opacity-50" }),
|
|
358
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "All matching records are already linked" })
|
|
359
|
-
] })
|
|
360
|
-
] }) })
|
|
361
|
-
] });
|
|
362
|
-
}
|
|
3
|
+
import "./checkbox.js";
|
|
4
|
+
import "./input-group.js";
|
|
5
|
+
import { t as RecordPicker } from "../record-picker-BbxngCeV.js";
|
|
363
6
|
|
|
364
|
-
export { RecordPicker };
|
|
365
|
-
//# sourceMappingURL=record-picker.js.map
|
|
366
|
-
//# sourceMappingURL=record-picker.js.map
|
|
7
|
+
export { RecordPicker };
|
|
@@ -0,0 +1,50 @@
|
|
|
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 lucide_react = require("lucide-react");
|
|
10
|
+
let react_resizable_panels = require("react-resizable-panels");
|
|
11
|
+
react_resizable_panels = require_rolldown_runtime.__toESM(react_resizable_panels, 1);
|
|
12
|
+
|
|
13
|
+
//#region src/components/resizable.tsx
|
|
14
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.PanelGroup, {
|
|
16
|
+
"data-slot": "resizable-panel-group",
|
|
17
|
+
className: require_utils.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function ResizablePanel({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.Panel, {
|
|
23
|
+
"data-slot": "resizable-panel",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.PanelResizeHandle, {
|
|
29
|
+
"data-slot": "resizable-handle",
|
|
30
|
+
className: require_utils.cn(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0
|
|
31
|
+
after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1
|
|
32
|
+
focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px
|
|
33
|
+
data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0
|
|
34
|
+
data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full
|
|
35
|
+
data-[panel-group-direction=vertical]:after:translate-x-0
|
|
36
|
+
data-[panel-group-direction=vertical]:after:-translate-y-1/2
|
|
37
|
+
[&[data-panel-group-direction=vertical]>div]:rotate-90`, className),
|
|
38
|
+
...props,
|
|
39
|
+
children: withHandle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
40
|
+
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.GripVerticalIcon, { className: "size-2.5" })
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.ResizableHandle = ResizableHandle;
|
|
48
|
+
exports.ResizablePanel = ResizablePanel;
|
|
49
|
+
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
50
|
+
//# sourceMappingURL=resizable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,2CAACA,uBAAmB,YAApB;EACC,aAAU;EACV,WAAWC,iBAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,2CAACD,uBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,2CAACA,uBAAmB,mBAApB;EACC,aAAU;EACV,WAAWC,iBACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,2CAAC,OAAD;GAAK,WAAU;aACd,2CAACC,+BAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
+
//#region src/components/resizable.d.ts
|
|
4
|
+
declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React$1.JSX.Element;
|
|
5
|
+
declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): React$1.JSX.Element;
|
|
6
|
+
declare function ResizableHandle({ withHandle, className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
7
|
+
withHandle?: boolean;
|
|
8
|
+
}): React$1.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
11
|
+
//# sourceMappingURL=resizable.d.cts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
+
//#region src/components/resizable.d.ts
|
|
4
|
+
declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): React$1.JSX.Element;
|
|
5
|
+
declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): React$1.JSX.Element;
|
|
6
|
+
declare function ResizableHandle({ withHandle, className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
7
|
+
withHandle?: boolean;
|
|
8
|
+
}): React$1.JSX.Element;
|
|
9
|
+
//#endregion
|
|
11
10
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
11
|
+
//# sourceMappingURL=resizable.d.ts.map
|