@constructive-io/ui 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{ai-CiaH2sfF.js → ai-B7XNnqYL.js} +1674 -228
- package/dist/ai-B7XNnqYL.js.map +1 -0
- package/dist/{ai-lAkichk8.cjs → ai-DJ-YPj8c.cjs} +1768 -226
- package/dist/ai-DJ-YPj8c.cjs.map +1 -0
- package/dist/{alert-BXuP0ayz.d.ts → alert-CJ4Qyk6W.d.cts} +4 -2
- package/dist/{alert-BXuP0ayz.d.cts → alert-CJ4Qyk6W.d.ts} +4 -2
- package/dist/components/accordion.cjs +60 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.d.cts +14 -0
- package/dist/components/accordion.d.ts +14 -0
- package/dist/components/accordion.js +54 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/ai/index.cjs +17 -1
- package/dist/components/ai/index.d.cts +2 -2
- package/dist/components/ai/index.d.ts +2 -2
- package/dist/components/ai/index.js +2 -2
- package/dist/components/alert-dialog.cjs +17 -8
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.d.cts +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +17 -8
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +18 -8
- package/dist/components/alert.cjs.map +1 -1
- package/dist/components/alert.d.cts +2 -2
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/alert.js +18 -9
- package/dist/components/alert.js.map +1 -1
- package/dist/components/autocomplete.cjs +9 -5
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.js +9 -5
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +9 -3
- package/dist/components/avatar.cjs.map +1 -1
- package/dist/components/avatar.d.cts +6 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.js +9 -3
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +25 -18
- package/dist/components/badge.cjs.map +1 -1
- package/dist/components/badge.js +25 -18
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +9 -6
- package/dist/components/breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb.js +9 -6
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.cjs +57 -0
- package/dist/components/button-group.cjs.map +1 -0
- package/dist/components/button-group.d.cts +16 -0
- package/dist/components/button-group.d.ts +16 -0
- package/dist/components/button-group.js +51 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.cjs +59 -15
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +32 -2
- package/dist/components/button.d.ts +32 -2
- package/dist/components/button.js +59 -15
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +14 -8
- package/dist/components/calendar-rac.cjs.map +1 -1
- package/dist/components/calendar-rac.js +14 -8
- package/dist/components/calendar-rac.js.map +1 -1
- package/dist/components/card.cjs +35 -23
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.d.cts +3 -2
- package/dist/components/card.d.ts +3 -2
- package/dist/components/card.js +35 -23
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.cjs +5 -5
- package/dist/components/checkbox.cjs.map +1 -1
- package/dist/components/checkbox.js +5 -5
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +3 -3
- package/dist/components/collapsible.cjs.map +1 -1
- package/dist/components/collapsible.js +3 -3
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +24 -12
- package/dist/components/combobox.cjs.map +1 -1
- package/dist/components/combobox.d.cts +2 -1
- package/dist/components/combobox.d.ts +2 -1
- package/dist/components/combobox.js +24 -12
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +25 -14
- package/dist/components/command.cjs.map +1 -1
- package/dist/components/command.d.cts +6 -2
- package/dist/components/command.d.ts +6 -2
- package/dist/components/command.js +25 -14
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +22 -12
- package/dist/components/dialog.cjs.map +1 -1
- package/dist/components/dialog.d.cts +5 -2
- package/dist/components/dialog.d.ts +5 -2
- package/dist/components/dialog.js +22 -12
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +50 -27
- package/dist/components/dock.cjs.map +1 -1
- package/dist/components/dock.d.cts +1 -1
- package/dist/components/dock.d.ts +1 -1
- package/dist/components/dock.js +51 -28
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +22 -14
- package/dist/components/drawer.cjs.map +1 -1
- package/dist/components/drawer.js +22 -14
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +34 -28
- package/dist/components/dropdown-menu.cjs.map +1 -1
- package/dist/components/dropdown-menu.d.cts +2 -2
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +52 -46
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +4 -4
- package/dist/components/empty.cjs.map +1 -1
- package/dist/components/empty.js +4 -4
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.cjs +33 -33
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.d.cts +1 -1
- package/dist/components/field.d.ts +1 -1
- package/dist/components/field.js +34 -34
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +1 -1
- package/dist/components/flickering-grid.cjs.map +1 -1
- package/dist/components/flickering-grid.js +1 -1
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +10 -5
- package/dist/components/flow-zoom-panel.cjs.map +1 -1
- package/dist/components/flow-zoom-panel.d.cts +8 -1
- package/dist/components/flow-zoom-panel.d.ts +8 -1
- package/dist/components/flow-zoom-panel.js +10 -5
- package/dist/components/flow-zoom-panel.js.map +1 -1
- package/dist/components/form-control.cjs +12 -8
- package/dist/components/form-control.cjs.map +1 -1
- package/dist/components/form-control.js +12 -8
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +5 -5
- package/dist/components/form.cjs.map +1 -1
- package/dist/components/form.js +5 -5
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +13 -7
- package/dist/components/input-group.cjs.map +1 -1
- package/dist/components/input-group.d.cts +2 -2
- package/dist/components/input-group.d.ts +2 -2
- package/dist/components/input-group.js +11 -7
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.cjs +252 -0
- package/dist/components/input-otp.cjs.map +1 -0
- package/dist/components/input-otp.d.cts +44 -0
- package/dist/components/input-otp.d.ts +44 -0
- package/dist/components/input-otp.js +251 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.cjs +10 -4
- package/dist/components/input.cjs.map +1 -1
- package/dist/components/input.d.cts +11 -2
- package/dist/components/input.d.ts +11 -2
- package/dist/components/input.js +10 -4
- package/dist/components/input.js.map +1 -1
- package/dist/components/item.cjs +151 -0
- package/dist/components/item.cjs.map +1 -0
- package/dist/components/item.d.cts +37 -0
- package/dist/components/item.d.ts +37 -0
- package/dist/components/item.js +137 -0
- package/dist/components/item.js.map +1 -0
- package/dist/components/json-input.cjs +4 -143
- package/dist/components/json-input.d.cts +6 -4
- package/dist/components/json-input.d.ts +6 -4
- package/dist/components/json-input.js +2 -140
- package/dist/components/kbd.cjs +35 -0
- package/dist/components/kbd.cjs.map +1 -0
- package/dist/components/kbd.d.cts +16 -0
- package/dist/components/kbd.d.ts +16 -0
- package/dist/components/kbd.js +31 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.cjs +3 -3
- package/dist/components/label.cjs.map +1 -1
- package/dist/components/label.js +3 -3
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +20 -8
- package/dist/components/motion-grid.cjs.map +1 -1
- package/dist/components/motion-grid.js +20 -8
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +77 -67
- package/dist/components/multi-select.cjs.map +1 -1
- package/dist/components/multi-select.js +77 -67
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +12 -9
- package/dist/components/page-header.cjs.map +1 -1
- package/dist/components/page-header.js +12 -9
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.cjs +10 -4
- package/dist/components/pagination.cjs.map +1 -1
- package/dist/components/pagination.d.cts +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +10 -4
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.cjs +228 -0
- package/dist/components/phone-input.cjs.map +1 -0
- package/dist/components/phone-input.d.cts +42 -0
- package/dist/components/phone-input.d.ts +42 -0
- package/dist/components/phone-input.js +220 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/popover.cjs +5 -4
- package/dist/components/popover.cjs.map +1 -1
- package/dist/components/popover.js +5 -4
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.cjs +20 -3
- package/dist/components/progress.cjs.map +1 -1
- package/dist/components/progress.d.cts +1 -1
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +20 -3
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +2 -2
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
- package/dist/components/progressive-blur-scroll-container.d.cts +1 -1
- package/dist/components/progressive-blur-scroll-container.d.ts +1 -1
- package/dist/components/progressive-blur-scroll-container.js +2 -2
- package/dist/components/progressive-blur-scroll-container.js.map +1 -1
- package/dist/components/progressive-blur.cjs +3 -2
- package/dist/components/progressive-blur.cjs.map +1 -1
- package/dist/components/progressive-blur.js +3 -2
- package/dist/components/progressive-blur.js.map +1 -1
- package/dist/components/radio-group.cjs +2 -2
- package/dist/components/radio-group.cjs.map +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +1 -1
- package/dist/components/record-picker.js +1 -1
- package/dist/components/resizable.cjs +2 -2
- package/dist/components/resizable.cjs.map +1 -1
- package/dist/components/resizable.js +2 -2
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +43 -21
- package/dist/components/responsive-diagram.cjs.map +1 -1
- package/dist/components/responsive-diagram.d.cts +7 -1
- package/dist/components/responsive-diagram.d.ts +7 -1
- package/dist/components/responsive-diagram.js +43 -21
- package/dist/components/responsive-diagram.js.map +1 -1
- package/dist/components/scroll-area.cjs +2 -2
- package/dist/components/scroll-area.cjs.map +1 -1
- package/dist/components/scroll-area.js +2 -2
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +84 -20
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +12 -7
- package/dist/components/select.d.ts +12 -7
- package/dist/components/select.js +84 -20
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +11 -2
- package/dist/components/separator.d.ts +11 -2
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.d.cts +11 -5
- package/dist/components/sheet.d.ts +12 -6
- package/dist/components/sheet.js +1 -1
- package/dist/components/sidebar.cjs +2 -1
- package/dist/components/sidebar.d.cts +7 -6
- package/dist/components/sidebar.d.ts +7 -6
- package/dist/components/sidebar.js +2 -1
- package/dist/components/slider.cjs +47 -0
- package/dist/components/slider.cjs.map +1 -0
- package/dist/components/slider.d.cts +8 -0
- package/dist/components/slider.d.ts +8 -0
- package/dist/components/slider.js +44 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.cjs +15 -4
- package/dist/components/sonner.cjs.map +1 -1
- package/dist/components/sonner.d.cts +10 -1
- package/dist/components/sonner.d.ts +10 -1
- package/dist/components/sonner.js +16 -5
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.cjs +25 -0
- package/dist/components/spinner.cjs.map +1 -0
- package/dist/components/spinner.d.cts +16 -0
- package/dist/components/spinner.d.ts +16 -0
- package/dist/components/spinner.js +22 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stack/index.cjs +1 -1
- package/dist/components/stack/index.js +1 -1
- package/dist/components/stepper.cjs +23 -17
- package/dist/components/stepper.cjs.map +1 -1
- package/dist/components/stepper.d.cts +2 -2
- package/dist/components/stepper.d.ts +2 -2
- package/dist/components/stepper.js +23 -17
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +5 -5
- package/dist/components/switch.cjs.map +1 -1
- package/dist/components/switch.js +5 -5
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +26 -7
- package/dist/components/table.cjs.map +1 -1
- package/dist/components/table.d.cts +20 -2
- package/dist/components/table.d.ts +20 -2
- package/dist/components/table.js +26 -8
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +61 -8
- package/dist/components/tabs.cjs.map +1 -1
- package/dist/components/tabs.d.cts +13 -2
- package/dist/components/tabs.d.ts +13 -2
- package/dist/components/tabs.js +63 -11
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +10 -5
- package/dist/components/tags.cjs.map +1 -1
- package/dist/components/tags.d.cts +1 -1
- package/dist/components/tags.d.ts +1 -1
- package/dist/components/tags.js +10 -5
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +5 -4
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.js +5 -4
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.d.cts +2 -2
- package/dist/components/toast/index.d.ts +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toggle-group.cjs +69 -0
- package/dist/components/toggle-group.cjs.map +1 -0
- package/dist/components/toggle-group.d.cts +27 -0
- package/dist/components/toggle-group.d.ts +27 -0
- package/dist/components/toggle-group.js +65 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.cjs +54 -0
- package/dist/components/toggle.cjs.map +1 -0
- package/dist/components/toggle.d.cts +13 -0
- package/dist/components/toggle.d.ts +13 -0
- package/dist/components/toggle.js +50 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.cjs +18 -6
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +18 -6
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +2 -2
- package/dist/components/unlink-button.cjs.map +1 -1
- package/dist/components/unlink-button.d.cts +1 -0
- package/dist/components/unlink-button.d.ts +1 -0
- package/dist/components/unlink-button.js +2 -2
- package/dist/components/unlink-button.js.map +1 -1
- package/dist/components/workspace-kit/index.cjs +1477 -0
- package/dist/components/workspace-kit/index.cjs.map +1 -0
- package/dist/components/workspace-kit/index.d.cts +716 -0
- package/dist/components/workspace-kit/index.d.ts +716 -0
- package/dist/components/workspace-kit/index.js +1410 -0
- package/dist/components/workspace-kit/index.js.map +1 -0
- package/dist/compose-refs-Mbma1O3M.js +47 -0
- package/dist/compose-refs-Mbma1O3M.js.map +1 -0
- package/dist/compose-refs-uPrvNoiU.cjs +52 -0
- package/dist/compose-refs-uPrvNoiU.cjs.map +1 -0
- package/dist/fluid-highlight-AW-OITqJ.cjs +124 -0
- package/dist/fluid-highlight-AW-OITqJ.cjs.map +1 -0
- package/dist/fluid-highlight-DxWeZ7iu.js +119 -0
- package/dist/fluid-highlight-DxWeZ7iu.js.map +1 -0
- package/dist/{index-UnM04j0t.d.ts → index-BQZxmMpw.d.cts} +11 -31
- package/dist/{index-UnM04j0t.d.cts → index-BQZxmMpw.d.ts} +11 -31
- package/dist/{index-CyaFaZe2.d.cts → index-CiO-3M_X.d.cts} +334 -18
- package/dist/{index-B0wXxIAb.d.ts → index-z3LqQ5L5.d.ts} +334 -18
- package/dist/index.cjs +107 -17
- package/dist/index.d.cts +63 -13
- package/dist/index.d.ts +63 -13
- package/dist/index.js +27 -14
- package/dist/initial-focus-B8RLtyOZ.cjs +67 -0
- package/dist/initial-focus-B8RLtyOZ.cjs.map +1 -0
- package/dist/initial-focus-j2E0EnIx.js +61 -0
- package/dist/initial-focus-j2E0EnIx.js.map +1 -0
- package/dist/initials-DSkWTOb0.cjs +127 -0
- package/dist/initials-DSkWTOb0.cjs.map +1 -0
- package/dist/initials-kCcHgrSy.js +97 -0
- package/dist/initials-kCcHgrSy.js.map +1 -0
- package/dist/json-input-CH5aEmoA.js +293 -0
- package/dist/json-input-CH5aEmoA.js.map +1 -0
- package/dist/json-input-D8yM578l.cjs +311 -0
- package/dist/json-input-D8yM578l.cjs.map +1 -0
- package/dist/{motion-config-COCFHq1L.cjs → motion-config-DZ7w5Uhq.cjs} +32 -2
- package/dist/motion-config-DZ7w5Uhq.cjs.map +1 -0
- package/dist/{motion-config-COsZ6azM.js → motion-config-DoFp4I8f.js} +21 -3
- package/dist/motion-config-DoFp4I8f.js.map +1 -0
- package/dist/{record-picker-Bz4FApxD.cjs → record-picker-BQ1-Vx0g.cjs} +23 -8
- package/dist/record-picker-BQ1-Vx0g.cjs.map +1 -0
- package/dist/{record-picker-BbxngCeV.js → record-picker-DSRo4RXV.js} +23 -8
- package/dist/record-picker-DSRo4RXV.js.map +1 -0
- package/dist/{sheet-BdA0rfIz.cjs → sheet-OxWlnT_G.cjs} +25 -32
- package/dist/sheet-OxWlnT_G.cjs.map +1 -0
- package/dist/{sheet-BLHnhLRH.js → sheet-wPF_l9Cn.js} +25 -32
- package/dist/sheet-wPF_l9Cn.js.map +1 -0
- package/dist/{sidebar-BavjjJp0.cjs → sidebar-BEEWmJwC.cjs} +74 -57
- package/dist/sidebar-BEEWmJwC.cjs.map +1 -0
- package/dist/{sidebar-DeoL2ttp.js → sidebar-DWl1Azyv.js} +74 -57
- package/dist/sidebar-DWl1Azyv.js.map +1 -0
- package/dist/{stack-ci2lkfkr.cjs → stack-CEvmUSwF.cjs} +12 -10
- package/dist/stack-CEvmUSwF.cjs.map +1 -0
- package/dist/{stack-C9GROTGA.js → stack-Kqu7YaR0.js} +12 -10
- package/dist/stack-Kqu7YaR0.js.map +1 -0
- package/dist/text-runs-CdmlS5C7.cjs +52 -0
- package/dist/text-runs-CdmlS5C7.cjs.map +1 -0
- package/dist/text-runs-DqcEO8L_.js +45 -0
- package/dist/text-runs-DqcEO8L_.js.map +1 -0
- package/dist/theme-DTTTlylA.d.cts +520 -0
- package/dist/theme-DTTTlylA.d.ts +520 -0
- package/dist/theme-dials-config.cjs +273 -0
- package/dist/theme-dials-config.cjs.map +1 -0
- package/dist/theme-dials-config.d.cts +95 -0
- package/dist/theme-dials-config.d.ts +95 -0
- package/dist/theme-dials-config.js +269 -0
- package/dist/theme-dials-config.js.map +1 -0
- package/dist/theme-presets.cjs +922 -0
- package/dist/theme-presets.cjs.map +1 -0
- package/dist/theme-presets.d.cts +89 -0
- package/dist/theme-presets.d.ts +89 -0
- package/dist/theme-presets.js +912 -0
- package/dist/theme-presets.js.map +1 -0
- package/dist/theme-tuning-DjgDvV8V.d.ts +158 -0
- package/dist/theme-tuning-TJ76tnxZ.d.cts +158 -0
- package/dist/theme-tuning.cjs +349 -0
- package/dist/theme-tuning.cjs.map +1 -0
- package/dist/theme-tuning.d.cts +2 -0
- package/dist/theme-tuning.d.ts +2 -0
- package/dist/theme-tuning.js +333 -0
- package/dist/theme-tuning.js.map +1 -0
- package/dist/theme.cjs +432 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +2 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +430 -0
- package/dist/theme.js.map +1 -0
- package/dist/toast-08jF1DBQ.cjs +193 -0
- package/dist/toast-08jF1DBQ.cjs.map +1 -0
- package/dist/toast-CVW5XY4u.js +164 -0
- package/dist/toast-CVW5XY4u.js.map +1 -0
- package/dist/toast-details-BdxxSLlN.cjs +209 -0
- package/dist/toast-details-BdxxSLlN.cjs.map +1 -0
- package/dist/toast-details-CfsB1Vxb.js +198 -0
- package/dist/toast-details-CfsB1Vxb.js.map +1 -0
- package/dist/{tooltip-CTRQoN1A.d.ts → tooltip-Fqb4JK-g.d.cts} +2 -2
- package/dist/{tooltip-CTRQoN1A.d.cts → tooltip-Fqb4JK-g.d.ts} +2 -2
- package/dist/tuning-BKVFsxLr.js +48 -0
- package/dist/tuning-BKVFsxLr.js.map +1 -0
- package/dist/tuning-BRPG7U1U.cjs +71 -0
- package/dist/tuning-BRPG7U1U.cjs.map +1 -0
- package/dist/use-document-theme-BSEuNsEE.cjs +43 -0
- package/dist/use-document-theme-BSEuNsEE.cjs.map +1 -0
- package/dist/use-document-theme-Ch_PqxZz.js +38 -0
- package/dist/use-document-theme-Ch_PqxZz.js.map +1 -0
- package/dist/use-scroll-fade-CaHp52u4.cjs +79 -0
- package/dist/use-scroll-fade-CaHp52u4.cjs.map +1 -0
- package/dist/use-scroll-fade-ilq-o00-.js +72 -0
- package/dist/use-scroll-fade-ilq-o00-.js.map +1 -0
- package/package.json +163 -27
- package/src/styles/globals.css +176 -97
- package/dist/ai-CiaH2sfF.js.map +0 -1
- package/dist/ai-lAkichk8.cjs.map +0 -1
- package/dist/button-DBRYW_AI.d.cts +0 -20
- package/dist/button-DBRYW_AI.d.ts +0 -20
- package/dist/components/app-bar.cjs +0 -81
- package/dist/components/app-bar.cjs.map +0 -1
- package/dist/components/app-bar.d.cts +0 -27
- package/dist/components/app-bar.d.ts +0 -27
- package/dist/components/app-bar.js +0 -77
- package/dist/components/app-bar.js.map +0 -1
- package/dist/components/app-shell.cjs +0 -267
- package/dist/components/app-shell.cjs.map +0 -1
- package/dist/components/app-shell.d.cts +0 -98
- package/dist/components/app-shell.d.ts +0 -98
- package/dist/components/app-shell.js +0 -264
- package/dist/components/app-shell.js.map +0 -1
- package/dist/components/json-input.cjs.map +0 -1
- package/dist/components/json-input.js.map +0 -1
- package/dist/input-CBrCuMH8.d.cts +0 -11
- package/dist/input-CBrCuMH8.d.ts +0 -11
- package/dist/motion-config-COCFHq1L.cjs.map +0 -1
- package/dist/motion-config-COsZ6azM.js.map +0 -1
- package/dist/record-picker-BbxngCeV.js.map +0 -1
- package/dist/record-picker-Bz4FApxD.cjs.map +0 -1
- package/dist/separator-BQEsr0Rc.d.cts +0 -11
- package/dist/separator-BQEsr0Rc.d.ts +0 -11
- package/dist/sheet-BLHnhLRH.js.map +0 -1
- package/dist/sheet-BdA0rfIz.cjs.map +0 -1
- package/dist/sidebar-BavjjJp0.cjs.map +0 -1
- package/dist/sidebar-DeoL2ttp.js.map +0 -1
- package/dist/stack-C9GROTGA.js.map +0 -1
- package/dist/stack-ci2lkfkr.cjs.map +0 -1
- package/dist/toast-D6MqijT2.cjs +0 -316
- package/dist/toast-D6MqijT2.cjs.map +0 -1
- package/dist/toast-D_BOLzm3.js +0 -287
- package/dist/toast-D_BOLzm3.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/components/kbd.d.ts
|
|
3
|
+
type KbdProps = React$1.ComponentProps<'kbd'>;
|
|
4
|
+
/**
|
|
5
|
+
* Keycap for a single key. Its fill, edge, and bottom lip are mixed from the
|
|
6
|
+
* inherited text color instead of a fixed surface token, so the key always
|
|
7
|
+
* sits one step off whatever it is placed on: a card, a muted row, a tinted
|
|
8
|
+
* tray, a tooltip, or a primary button. Set the parent's text color (or
|
|
9
|
+
* `className="text-…"`) to change its tone.
|
|
10
|
+
*/
|
|
11
|
+
declare function Kbd({ className, ...props }: KbdProps): React$1.JSX.Element;
|
|
12
|
+
type KbdGroupProps = React$1.ComponentProps<'kbd'>;
|
|
13
|
+
declare function KbdGroup({ className, ...props }: KbdGroupProps): React$1.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Kbd, KbdGroup, type KbdGroupProps, type KbdProps };
|
|
16
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/kbd.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Keycap for a single key. Its fill, edge, and bottom lip are mixed from the
|
|
9
|
+
* inherited text color instead of a fixed surface token, so the key always
|
|
10
|
+
* sits one step off whatever it is placed on: a card, a muted row, a tinted
|
|
11
|
+
* tray, a tooltip, or a primary button. Set the parent's text color (or
|
|
12
|
+
* `className="text-…"`) to change its tone.
|
|
13
|
+
*/
|
|
14
|
+
function Kbd({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
16
|
+
"data-slot": "kbd",
|
|
17
|
+
className: cn("pointer-events-none inline-flex h-5 min-w-5 shrink-0 select-none items-center justify-center gap-0.5 rounded-[5px] px-1 align-middle font-sans text-[0.6875rem] font-medium leading-none whitespace-nowrap tabular-nums [&_svg]:size-3", "bg-[color-mix(in_oklab,currentColor_9%,transparent)]", "shadow-[inset_0_0_0_1px_color-mix(in_oklab,currentColor_16%,transparent),inset_0_-1px_0_color-mix(in_oklab,currentColor_18%,transparent)]", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function KbdGroup({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
23
|
+
"data-slot": "kbd-group",
|
|
24
|
+
className: cn("inline-flex items-center gap-1 align-middle", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Kbd, KbdGroup };
|
|
31
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype KbdProps = React.ComponentProps<'kbd'>;\n\n/**\n * Keycap for a single key. Its fill, edge, and bottom lip are mixed from the\n * inherited text color instead of a fixed surface token, so the key always\n * sits one step off whatever it is placed on: a card, a muted row, a tinted\n * tray, a tooltip, or a primary button. Set the parent's text color (or\n * `className=\"text-…\"`) to change its tone.\n */\nfunction Kbd({ className, ...props }: KbdProps) {\n\treturn (\n\t\t<kbd\n\t\t\tdata-slot=\"kbd\"\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none inline-flex h-5 min-w-5 shrink-0 select-none items-center justify-center gap-0.5 rounded-[5px] px-1 align-middle font-sans text-[0.6875rem] font-medium leading-none whitespace-nowrap tabular-nums [&_svg]:size-3',\n\t\t\t\t'bg-[color-mix(in_oklab,currentColor_9%,transparent)]',\n\t\t\t\t'shadow-[inset_0_0_0_1px_color-mix(in_oklab,currentColor_16%,transparent),inset_0_-1px_0_color-mix(in_oklab,currentColor_18%,transparent)]',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype KbdGroupProps = React.ComponentProps<'kbd'>;\n\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n\treturn (\n\t\t<kbd\n\t\t\tdata-slot=\"kbd-group\"\n\t\t\tclassName={cn('inline-flex items-center gap-1 align-middle', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Kbd, KbdGroup };\nexport type { KbdProps, KbdGroupProps };\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,IAAI,EAAE,WAAW,GAAG,SAAmB;CAC/C,OACC,oBAAC,OAAD;EACC,aAAU;EACV,WAAW,GACV,0OACA,wDACA,6IACA,SACD;EACA,GAAI;CACJ;AAEH;AAIA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;CACzD,OACC,oBAAC,OAAD;EACC,aAAU;EACV,WAAW,GAAG,+CAA+C,SAAS;EACtE,GAAI;CACJ;AAEH"}
|
|
@@ -15,9 +15,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
15
15
|
function Label({ className, ...props }) {
|
|
16
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
17
17
|
"data-slot": "label",
|
|
18
|
-
className: require_utils.cn(`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none
|
|
19
|
-
group-data-[disabled=true]:opacity-
|
|
20
|
-
data-[disabled]:pointer-events-none data-[disabled]:opacity-
|
|
18
|
+
className: require_utils.cn(`text-foreground text-sm leading-4 font-medium select-none [overflow-wrap:anywhere] group-data-[disabled=true]:pointer-events-none
|
|
19
|
+
group-data-[disabled=true]:opacity-64 peer-disabled:cursor-not-allowed peer-disabled:opacity-64
|
|
20
|
+
data-[disabled]:pointer-events-none data-[disabled]:opacity-64`, className),
|
|
21
21
|
...props
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.cjs","names":["cn"],"sources":["../../src/components/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-
|
|
1
|
+
{"version":3,"file":"label.cjs","names":["cn"],"sources":["../../src/components/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none [overflow-wrap:anywhere] group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-64 peer-disabled:cursor-not-allowed peer-disabled:opacity-64\n\t\t\t\tdata-[disabled]:pointer-events-none data-[disabled]:opacity-64`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\nexport type { LabelProps };\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,2CAAC,SAAD;EACC,aAAU;EACV,WAAWA,iBACV;;qEAGA,SACD;EACA,GAAI;CACJ;AAEH"}
|
package/dist/components/label.js
CHANGED
|
@@ -12,9 +12,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
12
12
|
function Label({ className, ...props }) {
|
|
13
13
|
return /* @__PURE__ */ jsx("label", {
|
|
14
14
|
"data-slot": "label",
|
|
15
|
-
className: cn(`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none
|
|
16
|
-
group-data-[disabled=true]:opacity-
|
|
17
|
-
data-[disabled]:pointer-events-none data-[disabled]:opacity-
|
|
15
|
+
className: cn(`text-foreground text-sm leading-4 font-medium select-none [overflow-wrap:anywhere] group-data-[disabled=true]:pointer-events-none
|
|
16
|
+
group-data-[disabled=true]:opacity-64 peer-disabled:cursor-not-allowed peer-disabled:opacity-64
|
|
17
|
+
data-[disabled]:pointer-events-none data-[disabled]:opacity-64`, className),
|
|
18
18
|
...props
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":[],"sources":["../../src/components/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-
|
|
1
|
+
{"version":3,"file":"label.js","names":[],"sources":["../../src/components/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none [overflow-wrap:anywhere] group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-64 peer-disabled:cursor-not-allowed peer-disabled:opacity-64\n\t\t\t\tdata-[disabled]:pointer-events-none data-[disabled]:opacity-64`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\nexport type { LabelProps };\n"],"mappings":";;;;;;;;;;;AAYA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,oBAAC,SAAD;EACC,aAAU;EACV,WAAW,GACV;;qEAGA,SACD;EACA,GAAI;CACJ;AAEH"}
|
|
@@ -3,13 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
|
|
5
5
|
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
6
|
-
const require_motion_config = require('../motion-config-
|
|
6
|
+
const require_motion_config = require('../motion-config-DZ7w5Uhq.cjs');
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_rolldown_runtime.__toESM(react, 1);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let motion_react = require("motion/react");
|
|
11
11
|
|
|
12
12
|
//#region src/components/motion-grid.tsx
|
|
13
|
+
/** One dot. Memoised so a frame re-renders only the dots that switch, not every dot in the grid. */
|
|
14
|
+
const MotionGridCell = react.memo(function MotionGridCell({ active, className, activeClassName, inactiveClassName, cellProps, transition }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
16
|
+
className: require_utils.cn("aspect-square size-3 rounded-full", active ? require_utils.cn("bg-primary scale-110", activeClassName) : require_utils.cn("bg-muted scale-100", inactiveClassName), className),
|
|
17
|
+
...cellProps,
|
|
18
|
+
transition
|
|
19
|
+
});
|
|
20
|
+
});
|
|
13
21
|
const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }) => {
|
|
14
22
|
const [cols, rows] = gridSize;
|
|
15
23
|
const frames = useLoadingFrames(cols, rows);
|
|
@@ -30,6 +38,10 @@ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, c
|
|
|
30
38
|
shouldAnimate
|
|
31
39
|
]);
|
|
32
40
|
const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
|
|
41
|
+
const transition = react.useMemo(() => prefersReducedMotion ? { duration: 0 } : {
|
|
42
|
+
duration: duration / 1e3,
|
|
43
|
+
ease: require_motion_config.easings.easeInOut
|
|
44
|
+
}, [prefersReducedMotion, duration]);
|
|
33
45
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
34
46
|
className: require_utils.cn("grid w-fit gap-0.5", className),
|
|
35
47
|
style: {
|
|
@@ -38,13 +50,13 @@ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, c
|
|
|
38
50
|
gridAutoRows: "1fr"
|
|
39
51
|
},
|
|
40
52
|
...props,
|
|
41
|
-
children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MotionGridCell, {
|
|
54
|
+
active: active.has(i),
|
|
55
|
+
className: cellClassName,
|
|
56
|
+
activeClassName: cellActiveClassName,
|
|
57
|
+
inactiveClassName: cellInactiveClassName,
|
|
58
|
+
cellProps,
|
|
59
|
+
transition
|
|
48
60
|
}, i))
|
|
49
61
|
});
|
|
50
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-grid.cjs","names":["React","
|
|
1
|
+
{"version":3,"file":"motion-grid.cjs","names":["React","motion","cn","easings"],"sources":["../../src/components/motion-grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, type Transition, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\ntype MotionGridCellProps = {\n\tactive: boolean;\n\tclassName?: string;\n\tactiveClassName?: string;\n\tinactiveClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\ttransition: Transition;\n};\n\n/** One dot. Memoised so a frame re-renders only the dots that switch, not every dot in the grid. */\nconst MotionGridCell = React.memo(function MotionGridCell({ active, className, activeClassName, inactiveClassName, cellProps, transition }: MotionGridCellProps) {\n\treturn (\n\t\t<motion.div\n\t\t\tclassName={cn(\n\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\tactive ? cn('bg-primary scale-110', activeClassName) : cn('bg-muted scale-100', inactiveClassName),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...cellProps}\n\t\t\ttransition={transition}\n\t\t/>\n\t);\n});\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\t// Convert ms to seconds for motion library\n\tconst transition = React.useMemo<Transition>(\n\t\t() => (prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }),\n\t\t[prefersReducedMotion, duration],\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<MotionGridCell\n\t\t\t\t\tkey={i}\n\t\t\t\t\tactive={active.has(i)}\n\t\t\t\t\tclassName={cellClassName}\n\t\t\t\t\tactiveClassName={cellActiveClassName}\n\t\t\t\t\tinactiveClassName={cellInactiveClassName}\n\t\t\t\t\tcellProps={cellProps}\n\t\t\t\t\ttransition={transition}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,iBAAiBA,MAAM,KAAK,SAAS,eAAe,EAAE,QAAQ,WAAW,iBAAiB,mBAAmB,WAAW,cAAmC;CAChK,OACC,2CAACC,oBAAO,KAAR;EACC,WAAWC,iBACV,qCACA,SAASA,iBAAG,wBAAwB,eAAe,IAAIA,iBAAG,sBAAsB,iBAAiB,GACjG,SACD;EACA,GAAI;EACQ;CACZ;AAEH,CAAC;AAED,MAAM,cAAc,EACnB,UACA,WAAW,KACX,UAAU,MACV,eACA,WACA,qBACA,uBACA,WACA,OACA,GAAG,YACmB;CACtB,MAAM,CAAC,MAAM,QAAQ;CACrB,MAAM,SAAS,iBAAiB,MAAM,IAAI;CAC1C,MAAM,CAAC,OAAO,YAAYF,MAAM,SAAS,CAAC;CAC1C,MAAM,cAAcA,MAAM,OAA8B,IAAI;CAC5D,MAAM,0DAAwC;CAC9C,MAAM,gBAAgB,WAAW,CAAC;CAElC,MAAM,gBAAgB;EACrB,IAAI,CAAC,iBAAiB,OAAO,WAAW,GAAG;GAC1C,SAAS,CAAC;GACV;EACD;EACA,YAAY,UAAU,kBAAkB,UAAU,OAAO,IAAI,KAAK,OAAO,MAAM,GAAG,QAAQ;EAC1F,aAAa,cAAc,YAAY,OAAQ;CAChD,GAAG;EAAC,OAAO;EAAQ;EAAU;CAAa,CAAC;CAE3C,MAAM,SAAS,IAAI,IAAY,OAAO,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;CAEjF,MAAM,aAAaA,MAAM,cACjB,uBAAuB,EAAE,UAAU,EAAE,IAAI;EAAE,UAAU,WAAW;EAAM,MAAMG,8BAAQ;CAAU,GACrG,CAAC,sBAAsB,QAAQ,CAChC;CAEA,OACC,2CAAC,OAAD;EACC,WAAWD,iBAAG,sBAAsB,SAAS;EAC7C,OAAO;GACN,GAAG;GACH,qBAAqB,UAAU,KAAK;GACpC,cAAc;EACf;EACA,GAAI;YAEH,MAAM,KAAK,EAAE,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAC5C,2CAAC,gBAAD;GAEC,QAAQ,OAAO,IAAI,CAAC;GACpB,WAAW;GACX,iBAAiB;GACjB,mBAAmB;GACR;GACC;EACZ,GAPK,CAOL,CACD;CACG;AAEP;AAEA,MAAM,oBAAoB,OAAe,GAAG,OAAe,MAAM;CAehE,OAbsBF,MAAM,cAAsB;EACjD,MAAM,SAAiB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,KAAK;GACrC,MAAM,OAA2B,CAAC;GAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,KAAK;IAC9B,MAAM,IAAI,IAAI;IACd,IAAI,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC;GACzC;GACA,OAAO,KAAK,IAAI;EACjB;EACA,OAAO;CACR,GAAG,CAAC,MAAM,IAAI,CAEK;AACpB"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { t as cn } from "../utils-BkMLyah9.js";
|
|
4
|
-
import { n as easings } from "../motion-config-
|
|
4
|
+
import { n as easings } from "../motion-config-DoFp4I8f.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { motion, useReducedMotion } from "motion/react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/motion-grid.tsx
|
|
10
|
+
/** One dot. Memoised so a frame re-renders only the dots that switch, not every dot in the grid. */
|
|
11
|
+
const MotionGridCell = React$1.memo(function MotionGridCell({ active, className, activeClassName, inactiveClassName, cellProps, transition }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(motion.div, {
|
|
13
|
+
className: cn("aspect-square size-3 rounded-full", active ? cn("bg-primary scale-110", activeClassName) : cn("bg-muted scale-100", inactiveClassName), className),
|
|
14
|
+
...cellProps,
|
|
15
|
+
transition
|
|
16
|
+
});
|
|
17
|
+
});
|
|
10
18
|
const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }) => {
|
|
11
19
|
const [cols, rows] = gridSize;
|
|
12
20
|
const frames = useLoadingFrames(cols, rows);
|
|
@@ -27,6 +35,10 @@ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, c
|
|
|
27
35
|
shouldAnimate
|
|
28
36
|
]);
|
|
29
37
|
const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
|
|
38
|
+
const transition = React$1.useMemo(() => prefersReducedMotion ? { duration: 0 } : {
|
|
39
|
+
duration: duration / 1e3,
|
|
40
|
+
ease: easings.easeInOut
|
|
41
|
+
}, [prefersReducedMotion, duration]);
|
|
30
42
|
return /* @__PURE__ */ jsx("div", {
|
|
31
43
|
className: cn("grid w-fit gap-0.5", className),
|
|
32
44
|
style: {
|
|
@@ -35,13 +47,13 @@ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, c
|
|
|
35
47
|
gridAutoRows: "1fr"
|
|
36
48
|
},
|
|
37
49
|
...props,
|
|
38
|
-
children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ jsx(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ jsx(MotionGridCell, {
|
|
51
|
+
active: active.has(i),
|
|
52
|
+
className: cellClassName,
|
|
53
|
+
activeClassName: cellActiveClassName,
|
|
54
|
+
inactiveClassName: cellInactiveClassName,
|
|
55
|
+
cellProps,
|
|
56
|
+
transition
|
|
45
57
|
}, i))
|
|
46
58
|
});
|
|
47
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-grid.js","names":["React"],"sources":["../../src/components/motion-grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<
|
|
1
|
+
{"version":3,"file":"motion-grid.js","names":["React"],"sources":["../../src/components/motion-grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, type Transition, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\ntype MotionGridCellProps = {\n\tactive: boolean;\n\tclassName?: string;\n\tactiveClassName?: string;\n\tinactiveClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\ttransition: Transition;\n};\n\n/** One dot. Memoised so a frame re-renders only the dots that switch, not every dot in the grid. */\nconst MotionGridCell = React.memo(function MotionGridCell({ active, className, activeClassName, inactiveClassName, cellProps, transition }: MotionGridCellProps) {\n\treturn (\n\t\t<motion.div\n\t\t\tclassName={cn(\n\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\tactive ? cn('bg-primary scale-110', activeClassName) : cn('bg-muted scale-100', inactiveClassName),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...cellProps}\n\t\t\ttransition={transition}\n\t\t/>\n\t);\n});\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\t// Convert ms to seconds for motion library\n\tconst transition = React.useMemo<Transition>(\n\t\t() => (prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }),\n\t\t[prefersReducedMotion, duration],\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<MotionGridCell\n\t\t\t\t\tkey={i}\n\t\t\t\t\tactive={active.has(i)}\n\t\t\t\t\tclassName={cellClassName}\n\t\t\t\t\tactiveClassName={cellActiveClassName}\n\t\t\t\t\tinactiveClassName={cellInactiveClassName}\n\t\t\t\t\tcellProps={cellProps}\n\t\t\t\t\ttransition={transition}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"],"mappings":";;;;;;;;;;AAiCA,MAAM,iBAAiBA,QAAM,KAAK,SAAS,eAAe,EAAE,QAAQ,WAAW,iBAAiB,mBAAmB,WAAW,cAAmC;CAChK,OACC,oBAAC,OAAO,KAAR;EACC,WAAW,GACV,qCACA,SAAS,GAAG,wBAAwB,eAAe,IAAI,GAAG,sBAAsB,iBAAiB,GACjG,SACD;EACA,GAAI;EACQ;CACZ;AAEH,CAAC;AAED,MAAM,cAAc,EACnB,UACA,WAAW,KACX,UAAU,MACV,eACA,WACA,qBACA,uBACA,WACA,OACA,GAAG,YACmB;CACtB,MAAM,CAAC,MAAM,QAAQ;CACrB,MAAM,SAAS,iBAAiB,MAAM,IAAI;CAC1C,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAS,CAAC;CAC1C,MAAM,cAAcA,QAAM,OAA8B,IAAI;CAC5D,MAAM,uBAAuB,iBAAiB;CAC9C,MAAM,gBAAgB,WAAW,CAAC;CAElC,QAAM,gBAAgB;EACrB,IAAI,CAAC,iBAAiB,OAAO,WAAW,GAAG;GAC1C,SAAS,CAAC;GACV;EACD;EACA,YAAY,UAAU,kBAAkB,UAAU,OAAO,IAAI,KAAK,OAAO,MAAM,GAAG,QAAQ;EAC1F,aAAa,cAAc,YAAY,OAAQ;CAChD,GAAG;EAAC,OAAO;EAAQ;EAAU;CAAa,CAAC;CAE3C,MAAM,SAAS,IAAI,IAAY,OAAO,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;CAEjF,MAAM,aAAaA,QAAM,cACjB,uBAAuB,EAAE,UAAU,EAAE,IAAI;EAAE,UAAU,WAAW;EAAM,MAAM,QAAQ;CAAU,GACrG,CAAC,sBAAsB,QAAQ,CAChC;CAEA,OACC,oBAAC,OAAD;EACC,WAAW,GAAG,sBAAsB,SAAS;EAC7C,OAAO;GACN,GAAG;GACH,qBAAqB,UAAU,KAAK;GACpC,cAAc;EACf;EACA,GAAI;YAEH,MAAM,KAAK,EAAE,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAC5C,oBAAC,gBAAD;GAEC,QAAQ,OAAO,IAAI,CAAC;GACpB,WAAW;GACX,iBAAiB;GACjB,mBAAmB;GACR;GACC;EACZ,GAPK,CAOL,CACD;CACG;AAEP;AAEA,MAAM,oBAAoB,OAAe,GAAG,OAAe,MAAM;CAehE,OAbsBA,QAAM,cAAsB;EACjD,MAAM,SAAiB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,KAAK;GACrC,MAAM,OAA2B,CAAC;GAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,KAAK;IAC9B,MAAM,IAAI,IAAI;IACd,IAAI,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC;GACzC;GACA,OAAO,KAAK,IAAI;EACjB;EACA,OAAO;CACR,GAAG,CAAC,MAAM,IAAI,CAEK;AACpB"}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
|
|
5
5
|
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
6
|
-
const require_components_badge = require('./badge.cjs');
|
|
7
6
|
const require_components_separator = require('./separator.cjs');
|
|
7
|
+
const require_components_badge = require('./badge.cjs');
|
|
8
|
+
const require_fluid_highlight = require('../fluid-highlight-AW-OITqJ.cjs');
|
|
8
9
|
const require_components_popover = require('./popover.cjs');
|
|
9
10
|
let react = require("react");
|
|
10
11
|
react = require_rolldown_runtime.__toESM(react, 1);
|
|
@@ -26,6 +27,8 @@ const multiSelectVariants = (0, class_variance_authority.cva)("m-0.5 inline-flex
|
|
|
26
27
|
} },
|
|
27
28
|
defaultVariants: { variant: "default" }
|
|
28
29
|
});
|
|
30
|
+
/** How many selected labels the live region reads out; the rest are summarised as a count. */
|
|
31
|
+
const ANNOUNCED_LABELS = 5;
|
|
29
32
|
/**
|
|
30
33
|
* Individual option item component
|
|
31
34
|
*/
|
|
@@ -36,30 +39,37 @@ function OptionItem({ option, isSelected, onSelect, highlightedIndex, index, set
|
|
|
36
39
|
"aria-selected": isSelected,
|
|
37
40
|
"aria-disabled": option.disabled,
|
|
38
41
|
"data-highlighted": isHighlighted,
|
|
39
|
-
"data-
|
|
42
|
+
"data-checked": isSelected,
|
|
40
43
|
"data-disabled": option.disabled,
|
|
41
44
|
tabIndex: -1,
|
|
42
|
-
className: require_utils.cn("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none", "data-[highlighted=true]:
|
|
45
|
+
className: require_utils.cn("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none", "data-[highlighted=true]:text-accent-foreground", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-64"),
|
|
43
46
|
onClick: (e) => {
|
|
44
47
|
e.preventDefault();
|
|
45
48
|
e.stopPropagation();
|
|
46
49
|
if (!option.disabled) onSelect();
|
|
47
50
|
},
|
|
48
|
-
|
|
51
|
+
onMouseMove: (event) => {
|
|
52
|
+
if ((event.movementX !== 0 || event.movementY !== 0) && !isHighlighted) setHighlightedIndex(index);
|
|
53
|
+
},
|
|
49
54
|
children: [
|
|
50
55
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51
|
-
className: require_utils.cn("border-primary
|
|
56
|
+
className: require_utils.cn("border-primary me-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border", isSelected ? "bg-primary text-primary-foreground" : "opacity-60 [&_svg]:invisible"),
|
|
52
57
|
"aria-hidden": "true",
|
|
53
58
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "h-4 w-4" })
|
|
54
59
|
}),
|
|
55
60
|
option.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(option.icon, {
|
|
56
|
-
className: "text-muted-foreground
|
|
61
|
+
className: "text-muted-foreground me-2 h-4 w-4 shrink-0",
|
|
57
62
|
"aria-hidden": "true"
|
|
58
63
|
}),
|
|
59
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
65
|
+
className: "flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2",
|
|
66
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
67
|
+
className: "min-w-0 [overflow-wrap:anywhere]",
|
|
68
|
+
children: option.label
|
|
69
|
+
}), option.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
70
|
+
className: "text-muted-foreground min-w-0 text-xs [overflow-wrap:anywhere]",
|
|
71
|
+
children: option.description
|
|
72
|
+
})]
|
|
63
73
|
})
|
|
64
74
|
]
|
|
65
75
|
});
|
|
@@ -247,23 +257,24 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
247
257
|
if (disabled) return;
|
|
248
258
|
setIsPopoverOpen((prev) => !prev);
|
|
249
259
|
};
|
|
250
|
-
const clearExtraOptions = () => {
|
|
251
|
-
if (disabled) return;
|
|
252
|
-
const newSelectedValues = selectedValues.slice(0, responsiveSettings.maxCount);
|
|
253
|
-
setSelectedValues(newSelectedValues);
|
|
254
|
-
onValueChange(newSelectedValues);
|
|
255
|
-
};
|
|
256
260
|
const handleKeyDown = react.useCallback((event) => {
|
|
261
|
+
if (event.target instanceof Element && event.target.closest("[data-slot=\"multi-select-footer\"]")) return;
|
|
257
262
|
const optionsCount = flatFilteredOptions.length;
|
|
258
263
|
if (optionsCount === 0) return;
|
|
264
|
+
const moveHighlight = (next) => {
|
|
265
|
+
setHighlightedIndex(next);
|
|
266
|
+
requestAnimationFrame(() => {
|
|
267
|
+
listRef.current?.querySelectorAll("[role=\"option\"]")[next]?.scrollIntoView({ block: "nearest" });
|
|
268
|
+
});
|
|
269
|
+
};
|
|
259
270
|
switch (event.key) {
|
|
260
271
|
case "ArrowDown":
|
|
261
272
|
event.preventDefault();
|
|
262
|
-
|
|
273
|
+
moveHighlight(highlightedIndex < optionsCount - 1 ? highlightedIndex + 1 : 0);
|
|
263
274
|
break;
|
|
264
275
|
case "ArrowUp":
|
|
265
276
|
event.preventDefault();
|
|
266
|
-
|
|
277
|
+
moveHighlight(highlightedIndex > 0 ? highlightedIndex - 1 : optionsCount - 1);
|
|
267
278
|
break;
|
|
268
279
|
case "Enter":
|
|
269
280
|
event.preventDefault();
|
|
@@ -307,9 +318,12 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
307
318
|
resetOnDefaultValueChange
|
|
308
319
|
]);
|
|
309
320
|
const getWidthConstraints = () => {
|
|
321
|
+
const effectiveMinWidth = minWidth || (screenSize === "mobile" ? "0px" : "200px");
|
|
322
|
+
const effectiveMaxWidth = maxWidth || "100%";
|
|
310
323
|
return {
|
|
311
|
-
minWidth:
|
|
312
|
-
|
|
324
|
+
minWidth: `min(${effectiveMinWidth}, 100%)`,
|
|
325
|
+
popupMinWidth: `min(${effectiveMinWidth}, var(--available-width, 100vw))`,
|
|
326
|
+
maxWidth: effectiveMaxWidth,
|
|
313
327
|
width: autoSize ? "auto" : "100%"
|
|
314
328
|
};
|
|
315
329
|
};
|
|
@@ -347,13 +361,15 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
347
361
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
348
362
|
id: triggerDescriptionId,
|
|
349
363
|
className: "sr-only",
|
|
364
|
+
style: { width: 1 },
|
|
350
365
|
children: "Multi-select dropdown. Use arrow keys to navigate, Enter to select, and Escape to close."
|
|
351
366
|
}),
|
|
352
367
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
353
368
|
id: selectedCountId,
|
|
354
369
|
className: "sr-only",
|
|
355
370
|
"aria-live": "polite",
|
|
356
|
-
|
|
371
|
+
style: { width: 1 },
|
|
372
|
+
children: selectedValues.length === 0 ? "No options selected" : `${selectedValues.length} option${selectedValues.length === 1 ? "" : "s"} selected: ${selectedValues.slice(0, ANNOUNCED_LABELS).map((value) => getOptionByValue(value)?.label).filter(Boolean).join(", ")}${selectedValues.length > ANNOUNCED_LABELS ? ` and ${selectedValues.length - ANNOUNCED_LABELS} more` : ""}`
|
|
357
373
|
}),
|
|
358
374
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_popover.PopoverTrigger, {
|
|
359
375
|
asChild: true,
|
|
@@ -372,20 +388,20 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
372
388
|
"aria-haspopup": "listbox",
|
|
373
389
|
"aria-controls": isPopoverOpen ? listboxId : void 0,
|
|
374
390
|
"aria-describedby": `${triggerDescriptionId} ${selectedCountId}`,
|
|
375
|
-
"aria-label": `Multi-select: ${selectedValues.length} of ${getAllOptions().length}
|
|
376
|
-
className: require_utils.cn(`border-input/70 focus-visible:border-
|
|
377
|
-
justify-between rounded-md border bg-transparent
|
|
378
|
-
duration-
|
|
379
|
-
motion-reduce:transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-
|
|
391
|
+
"aria-label": `Multi-select: ${selectedValues.length} of ${getAllOptions().length} option${getAllOptions().length === 1 ? "" : "s"} selected. ${placeholder}`,
|
|
392
|
+
className: require_utils.cn(`border-input/70 focus-visible:border-ring/60 focus-visible:ring-ring/35 flex items-center
|
|
393
|
+
justify-between rounded-md border bg-transparent pe-1 ps-2 shadow-xs transition-[color,box-shadow,scale]
|
|
394
|
+
duration-(--duration-moderate) ease-out outline-none focus-visible:ring-[3px] motion-safe:active:not-disabled:scale-[0.96]
|
|
395
|
+
motion-reduce:transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-64`, singleLine ? "h-8 min-h-8 py-0.5 text-xs" : "h-auto min-h-10 py-2 text-sm", autoSize && "w-auto", !autoSize && "w-full", responsiveSettings.compactMode && "min-h-9 py-1.5 text-xs", className),
|
|
380
396
|
style: {
|
|
381
397
|
minWidth: widthConstraints.minWidth,
|
|
382
398
|
maxWidth: widthConstraints.maxWidth,
|
|
383
399
|
width: widthConstraints.width
|
|
384
400
|
},
|
|
385
401
|
children: selectedValues.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
386
|
-
className: "flex w-full items-center justify-between",
|
|
402
|
+
className: "flex w-full min-w-0 items-center justify-between",
|
|
387
403
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
388
|
-
className: require_utils.cn("flex items-center gap-1", singleLine ? "multiselect-singleline-scroll overflow-x-auto" : "flex-wrap", responsiveSettings.compactMode && "gap-0.5"),
|
|
404
|
+
className: require_utils.cn("flex min-w-0 items-center gap-1", singleLine ? "multiselect-singleline-scroll overflow-x-auto" : "max-h-32 flex-wrap overflow-y-auto", responsiveSettings.compactMode && "gap-0.5"),
|
|
389
405
|
children: [selectedValues.slice(0, responsiveSettings.maxCount).map((value) => {
|
|
390
406
|
const option = getOptionByValue(value);
|
|
391
407
|
const IconComponent = option?.icon;
|
|
@@ -399,15 +415,17 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
399
415
|
}
|
|
400
416
|
};
|
|
401
417
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_badge.Badge, {
|
|
402
|
-
|
|
418
|
+
title: option.label,
|
|
419
|
+
className: require_utils.cn(multiSelectVariants({ variant }), customStyle?.gradient && "border-transparent text-white", responsiveSettings.compactMode && "px-1.5 py-0.5 text-xs", singleLine && "py-0.5", "max-w-full min-w-0", singleLine ? "shrink-0 whitespace-nowrap" : "shrink", "[&>svg]:pointer-events-auto"),
|
|
403
420
|
style: badgeStyle,
|
|
404
421
|
children: [
|
|
405
422
|
IconComponent && !responsiveSettings.hideIcons && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconComponent, {
|
|
406
|
-
className: require_utils.cn("
|
|
423
|
+
className: require_utils.cn("me-2 h-4 w-4 shrink-0", responsiveSettings.compactMode && "me-1 h-3 w-3", customStyle?.iconColor && "text-current"),
|
|
407
424
|
...customStyle?.iconColor && { style: { color: customStyle.iconColor } }
|
|
408
425
|
}),
|
|
409
426
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
410
|
-
className:
|
|
427
|
+
className: "min-w-0 truncate",
|
|
428
|
+
dir: "auto",
|
|
411
429
|
children: option.label
|
|
412
430
|
}),
|
|
413
431
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -425,34 +443,20 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
425
443
|
}
|
|
426
444
|
},
|
|
427
445
|
"aria-label": `Remove ${option.label} from selection`,
|
|
428
|
-
className: "-
|
|
446
|
+
className: "relative -my-1.5 -me-1.5 ms-1 flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-sm p-2 pointer-coarse:after:absolute pointer-coarse:after:-inset-1 pointer-coarse:after:content-[''] hover:bg-white/20 focus-visible:ring-[3px] focus-visible:ring-white/50 focus-visible:outline-none",
|
|
429
447
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XCircle, { className: require_utils.cn("h-3 w-3", responsiveSettings.compactMode && "h-2.5 w-2.5") })
|
|
430
448
|
})
|
|
431
449
|
]
|
|
432
450
|
}, value);
|
|
433
|
-
}).filter(Boolean), selectedValues.length > responsiveSettings.maxCount && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
434
|
-
className: require_utils.cn("text-foreground border-foreground/10 bg-transparent", multiSelectVariants({ variant }), responsiveSettings.compactMode && "px-1.5 py-0.5 text-xs", singleLine && "
|
|
435
|
-
children:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
event.stopPropagation();
|
|
440
|
-
clearExtraOptions();
|
|
441
|
-
},
|
|
442
|
-
onKeyDown: (event) => {
|
|
443
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
444
|
-
event.preventDefault();
|
|
445
|
-
event.stopPropagation();
|
|
446
|
-
clearExtraOptions();
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
"aria-label": "Clear extra selected options",
|
|
450
|
-
className: "-m-0.5 ml-2 h-4 w-4 cursor-pointer rounded-sm p-0.5 hover:bg-white/20 focus:ring-1\n focus:ring-white/50 focus:outline-none",
|
|
451
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XCircle, { className: require_utils.cn("h-3 w-3", responsiveSettings.compactMode && "h-2.5 w-2.5") })
|
|
452
|
-
})]
|
|
451
|
+
}).filter(Boolean), selectedValues.length > responsiveSettings.maxCount && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_badge.Badge, {
|
|
452
|
+
className: require_utils.cn("text-foreground border-foreground/10 bg-transparent", multiSelectVariants({ variant }), responsiveSettings.compactMode && "px-1.5 py-0.5 text-xs", singleLine && "shrink-0 whitespace-nowrap", "[&>svg]:pointer-events-auto"),
|
|
453
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
454
|
+
dir: "ltr",
|
|
455
|
+
children: `+ ${selectedValues.length - responsiveSettings.maxCount} more`
|
|
456
|
+
})
|
|
453
457
|
})]
|
|
454
458
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
455
|
-
className: "flex items-center justify-between",
|
|
459
|
+
className: "flex shrink-0 items-center justify-between",
|
|
456
460
|
children: [
|
|
457
461
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
458
462
|
role: "button",
|
|
@@ -468,8 +472,8 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
468
472
|
handleClear();
|
|
469
473
|
}
|
|
470
474
|
},
|
|
471
|
-
"aria-label": `Clear all ${selectedValues.length} selected
|
|
472
|
-
className: "text-muted-foreground hover:text-foreground
|
|
475
|
+
"aria-label": `Clear all ${selectedValues.length} selected option${selectedValues.length === 1 ? "" : "s"}`,
|
|
476
|
+
className: "text-muted-foreground hover:text-foreground relative mx-1 -my-1.5 flex h-7 w-7\n cursor-pointer items-center justify-center rounded-sm pointer-coarse:after:absolute pointer-coarse:after:-inset-1 pointer-coarse:after:content-[''] focus-visible:ring-[3px] focus-visible:ring-ring/50\n focus-visible:outline-none",
|
|
473
477
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "h-4 w-4" })
|
|
474
478
|
}),
|
|
475
479
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_separator.Separator, {
|
|
@@ -480,11 +484,11 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
480
484
|
]
|
|
481
485
|
})]
|
|
482
486
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
483
|
-
className: "mx-auto flex w-full items-center justify-between",
|
|
487
|
+
className: "mx-auto flex w-full min-w-0 items-center justify-between",
|
|
484
488
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
485
|
-
className: "text-
|
|
489
|
+
className: "text-subtle-foreground mx-1 min-w-0 truncate text-sm",
|
|
486
490
|
children: placeholder
|
|
487
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "text-muted-foreground mx-1 h-4 cursor-pointer" })]
|
|
491
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "text-muted-foreground mx-1 h-4 shrink-0 cursor-pointer" })]
|
|
488
492
|
})
|
|
489
493
|
})
|
|
490
494
|
}),
|
|
@@ -493,7 +497,7 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
493
497
|
"aria-label": "Available options",
|
|
494
498
|
className: require_utils.cn("w-(--anchor-width) overflow-hidden p-0", popoverClassName),
|
|
495
499
|
style: {
|
|
496
|
-
minWidth: widthConstraints.
|
|
500
|
+
minWidth: widthConstraints.popupMinWidth,
|
|
497
501
|
maxWidth: widthConstraints.maxWidth,
|
|
498
502
|
width: widthConstraints.width === "auto" ? "auto" : void 0,
|
|
499
503
|
maxHeight: effectiveDropdownMaxHeight,
|
|
@@ -507,7 +511,7 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
507
511
|
children: [
|
|
508
512
|
searchable && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
509
513
|
className: "flex items-center border-b px-3",
|
|
510
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, { className: "text-muted-foreground
|
|
514
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, { className: "text-muted-foreground me-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
511
515
|
ref: searchInputRef,
|
|
512
516
|
id: searchInputId,
|
|
513
517
|
type: "text",
|
|
@@ -515,15 +519,15 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
515
519
|
value: searchValue,
|
|
516
520
|
onChange: (e) => setSearchValue(e.target.value),
|
|
517
521
|
"aria-label": "Search through available options",
|
|
518
|
-
className: "placeholder:text-
|
|
522
|
+
className: "placeholder:text-subtle-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-64"
|
|
519
523
|
})]
|
|
520
524
|
}),
|
|
521
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
525
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
522
526
|
ref: listRef,
|
|
523
527
|
role: "listbox",
|
|
524
528
|
"aria-multiselectable": "true",
|
|
525
|
-
className: "multiselect-scrollbar scrollbar-neutral-thin
|
|
526
|
-
children: totalFilteredCount === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
529
|
+
className: "multiselect-scrollbar scrollbar-neutral-thin relative min-h-0 flex-1 scroll-py-1 overflow-y-auto overscroll-contain p-1",
|
|
530
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_highlight.FluidHighlight, {}), totalFilteredCount === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
527
531
|
className: "text-muted-foreground py-6 text-center text-sm",
|
|
528
532
|
children: emptyIndicator || "No results found."
|
|
529
533
|
}) : isGroupedOptions(filteredOptions) ? filteredOptions.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -554,11 +558,17 @@ const MultiSelect = react.forwardRef(({ options, onValueChange, variant, default
|
|
|
554
558
|
index: currentIndex,
|
|
555
559
|
setHighlightedIndex
|
|
556
560
|
}, option.value);
|
|
557
|
-
})
|
|
561
|
+
})]
|
|
558
562
|
}),
|
|
559
|
-
footerContent && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
563
|
+
(selectedValues.length > 0 || footerContent) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
560
564
|
className: "border-t p-1",
|
|
561
|
-
|
|
565
|
+
"data-slot": "multi-select-footer",
|
|
566
|
+
children: [selectedValues.length > 0 && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
567
|
+
type: "button",
|
|
568
|
+
className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring/50 w-full rounded-sm px-2 py-1.5 text-start text-sm outline-none focus-visible:ring-[3px]",
|
|
569
|
+
onClick: handleClear,
|
|
570
|
+
children: `Clear selection (${selectedValues.length})`
|
|
571
|
+
}), footerContent]
|
|
562
572
|
})
|
|
563
573
|
]
|
|
564
574
|
})
|