@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,251 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { t as cn } from "../utils-BkMLyah9.js";
|
|
4
|
+
import { t as FluidHighlight } from "../fluid-highlight-DxWeZ7iu.js";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { motion, useAnimate, useReducedMotion } from "motion/react";
|
|
8
|
+
|
|
9
|
+
//#region src/components/input-otp.tsx
|
|
10
|
+
const DIGITS_ONLY = /\D/g;
|
|
11
|
+
const NON_ASCII_DIGITS = /[\u0660-\u0669\u06F0-\u06F9\u0966-\u096F\u09E6-\u09EF\u0E50-\u0E59\uFF10-\uFF19]/g;
|
|
12
|
+
const ZERO_CODE_POINTS = [
|
|
13
|
+
1632,
|
|
14
|
+
1776,
|
|
15
|
+
2406,
|
|
16
|
+
2534,
|
|
17
|
+
3664,
|
|
18
|
+
65296
|
|
19
|
+
];
|
|
20
|
+
const toAsciiDigits = (raw) => raw.replace(NON_ASCII_DIGITS, (char) => {
|
|
21
|
+
const code = char.charCodeAt(0);
|
|
22
|
+
const zero = ZERO_CODE_POINTS.find((start) => code >= start && code <= start + 9);
|
|
23
|
+
return String(code - zero);
|
|
24
|
+
});
|
|
25
|
+
const RESYNC_DELAYS = [
|
|
26
|
+
0,
|
|
27
|
+
10,
|
|
28
|
+
50
|
|
29
|
+
];
|
|
30
|
+
const CARET_BLINK = { opacity: [
|
|
31
|
+
1,
|
|
32
|
+
1,
|
|
33
|
+
0,
|
|
34
|
+
0
|
|
35
|
+
] };
|
|
36
|
+
const CARET_TIMING = {
|
|
37
|
+
duration: 1,
|
|
38
|
+
times: [
|
|
39
|
+
0,
|
|
40
|
+
.5,
|
|
41
|
+
.5,
|
|
42
|
+
1
|
|
43
|
+
],
|
|
44
|
+
ease: "linear",
|
|
45
|
+
repeat: Infinity
|
|
46
|
+
};
|
|
47
|
+
const toCode = (raw, length) => toAsciiDigits(raw).replace(DIGITS_ONLY, "").slice(0, length);
|
|
48
|
+
function InputOtp({ length = 6, value, defaultValue = "", onChange, onComplete, isDisabled = false, isInvalid = false, groupEvery, size = "default", "aria-label": ariaLabel = "One-time code", "aria-describedby": ariaDescribedBy, className, ref }) {
|
|
49
|
+
const inputRef = useRef(null);
|
|
50
|
+
const previousSelection = useRef([
|
|
51
|
+
null,
|
|
52
|
+
null,
|
|
53
|
+
"none"
|
|
54
|
+
]);
|
|
55
|
+
const wasInvalid = useRef(isInvalid);
|
|
56
|
+
const [rowRef, animate] = useAnimate();
|
|
57
|
+
const reduceMotion = useReducedMotion();
|
|
58
|
+
const [internal, setInternal] = useState(() => toCode(defaultValue, length));
|
|
59
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
60
|
+
const [selection, setSelection] = useState(null);
|
|
61
|
+
const controlled = value !== void 0;
|
|
62
|
+
const code = toCode(controlled ? value : internal, length);
|
|
63
|
+
const mirror = (start, end) => setSelection((current) => current?.start === start && current.end === end ? current : {
|
|
64
|
+
start,
|
|
65
|
+
end
|
|
66
|
+
});
|
|
67
|
+
const commit = (next) => {
|
|
68
|
+
if (next === code) return;
|
|
69
|
+
if (!controlled) setInternal(next);
|
|
70
|
+
onChange?.(next);
|
|
71
|
+
if (next.length === length) onComplete?.(next);
|
|
72
|
+
};
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const input = inputRef.current;
|
|
75
|
+
if (!input) return;
|
|
76
|
+
const syncSelection = () => {
|
|
77
|
+
if (document.activeElement !== input) {
|
|
78
|
+
setSelection(null);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const { selectionStart, selectionEnd, selectionDirection, maxLength, value: current } = input;
|
|
82
|
+
const [, previousEnd] = previousSelection.current;
|
|
83
|
+
let start = -1;
|
|
84
|
+
let end = -1;
|
|
85
|
+
let direction;
|
|
86
|
+
if (current.length !== 0 && selectionStart !== null && selectionEnd !== null) {
|
|
87
|
+
const isCaret = selectionStart === selectionEnd;
|
|
88
|
+
const isAppending = selectionStart === current.length && current.length < maxLength;
|
|
89
|
+
if (isCaret && !isAppending) {
|
|
90
|
+
const caret = selectionStart;
|
|
91
|
+
if (caret === 0) [start, end, direction] = [
|
|
92
|
+
0,
|
|
93
|
+
1,
|
|
94
|
+
"forward"
|
|
95
|
+
];
|
|
96
|
+
else if (caret === maxLength) [start, end, direction] = [
|
|
97
|
+
caret - 1,
|
|
98
|
+
caret,
|
|
99
|
+
"backward"
|
|
100
|
+
];
|
|
101
|
+
else if (maxLength > 1 && current.length > 1) {
|
|
102
|
+
let offset = 0;
|
|
103
|
+
const [previousStart] = previousSelection.current;
|
|
104
|
+
if (previousStart !== null && previousEnd !== null) {
|
|
105
|
+
direction = caret < previousEnd ? "backward" : "forward";
|
|
106
|
+
if (direction === "backward" && !(previousStart === previousEnd && previousStart < maxLength)) offset = -1;
|
|
107
|
+
}
|
|
108
|
+
start = caret + offset;
|
|
109
|
+
end = caret + offset + 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (start !== -1 && end !== -1 && start !== end) input.setSelectionRange(start, end, direction);
|
|
113
|
+
}
|
|
114
|
+
const nextStart = start !== -1 ? start : selectionStart ?? 0;
|
|
115
|
+
const nextEnd = end !== -1 ? end : selectionEnd ?? 0;
|
|
116
|
+
mirror(nextStart, nextEnd);
|
|
117
|
+
previousSelection.current = [
|
|
118
|
+
nextStart,
|
|
119
|
+
nextEnd,
|
|
120
|
+
direction ?? selectionDirection ?? "none"
|
|
121
|
+
];
|
|
122
|
+
};
|
|
123
|
+
document.addEventListener("selectionchange", syncSelection, { capture: true });
|
|
124
|
+
syncSelection();
|
|
125
|
+
if (document.activeElement === input) setIsFocused(true);
|
|
126
|
+
return () => document.removeEventListener("selectionchange", syncSelection, { capture: true });
|
|
127
|
+
}, []);
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
const timeouts = RESYNC_DELAYS.map((delay) => setTimeout(() => {
|
|
130
|
+
const input = inputRef.current;
|
|
131
|
+
if (!input) return;
|
|
132
|
+
input.dispatchEvent(new Event("input"));
|
|
133
|
+
if (document.activeElement !== input || input.selectionStart === null || input.selectionEnd === null) return;
|
|
134
|
+
mirror(input.selectionStart, input.selectionEnd);
|
|
135
|
+
previousSelection.current = [
|
|
136
|
+
input.selectionStart,
|
|
137
|
+
input.selectionEnd,
|
|
138
|
+
input.selectionDirection ?? "none"
|
|
139
|
+
];
|
|
140
|
+
}, delay));
|
|
141
|
+
return () => timeouts.forEach(clearTimeout);
|
|
142
|
+
}, [code, isFocused]);
|
|
143
|
+
useEffect(() => {
|
|
144
|
+
const turnedInvalid = isInvalid && !wasInvalid.current;
|
|
145
|
+
wasInvalid.current = isInvalid;
|
|
146
|
+
if (!turnedInvalid || reduceMotion || !rowRef.current) return;
|
|
147
|
+
animate(rowRef.current, { x: [
|
|
148
|
+
0,
|
|
149
|
+
-6,
|
|
150
|
+
6,
|
|
151
|
+
-4,
|
|
152
|
+
4,
|
|
153
|
+
-2,
|
|
154
|
+
0
|
|
155
|
+
] }, {
|
|
156
|
+
duration: .4,
|
|
157
|
+
ease: "easeInOut"
|
|
158
|
+
});
|
|
159
|
+
}, [
|
|
160
|
+
isInvalid,
|
|
161
|
+
reduceMotion,
|
|
162
|
+
animate,
|
|
163
|
+
rowRef
|
|
164
|
+
]);
|
|
165
|
+
const onInputChange = (event) => {
|
|
166
|
+
const next = toCode(event.target.value, length);
|
|
167
|
+
if (next.length < code.length) document.dispatchEvent(new Event("selectionchange"));
|
|
168
|
+
commit(next);
|
|
169
|
+
};
|
|
170
|
+
const onPaste = (event) => {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
const input = event.currentTarget;
|
|
173
|
+
const pasted = toAsciiDigits(event.clipboardData.getData("text/plain")).replace(DIGITS_ONLY, "");
|
|
174
|
+
if (pasted === "") return;
|
|
175
|
+
const start = input.selectionStart ?? code.length;
|
|
176
|
+
const end = input.selectionEnd ?? start;
|
|
177
|
+
const next = pasted.length >= length ? pasted.slice(0, length) : (code.slice(0, start) + pasted + code.slice(end)).slice(0, length);
|
|
178
|
+
input.value = next;
|
|
179
|
+
commit(next);
|
|
180
|
+
const caret = Math.min(next.length, length - 1);
|
|
181
|
+
input.setSelectionRange(caret, next.length);
|
|
182
|
+
mirror(caret, next.length);
|
|
183
|
+
};
|
|
184
|
+
const onFocus = (event) => {
|
|
185
|
+
const input = event.currentTarget;
|
|
186
|
+
const start = Math.min(input.value.length, length - 1);
|
|
187
|
+
input.setSelectionRange(start, input.value.length);
|
|
188
|
+
mirror(start, input.value.length);
|
|
189
|
+
setIsFocused(true);
|
|
190
|
+
};
|
|
191
|
+
const isSlotActive = (index) => isFocused && selection !== null && (selection.start === selection.end ? index === selection.start : index >= selection.start && index < selection.end);
|
|
192
|
+
const isRange = selection !== null && selection.end - selection.start > 1;
|
|
193
|
+
return /* @__PURE__ */ jsx("div", {
|
|
194
|
+
ref,
|
|
195
|
+
"data-slot": "input-otp",
|
|
196
|
+
"data-size": size,
|
|
197
|
+
translate: "no",
|
|
198
|
+
dir: "ltr",
|
|
199
|
+
className: cn("w-full", size === "sm" ? "max-w-[15.5rem]" : "max-w-[21rem]", className),
|
|
200
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
201
|
+
ref: rowRef,
|
|
202
|
+
className: cn("group/otp relative flex w-full items-center", size === "sm" ? "gap-[min(0.375rem,2.5%)]" : "gap-[min(0.25rem,2.5%)] sm:gap-[min(0.5rem,2.5%)]"),
|
|
203
|
+
children: [
|
|
204
|
+
Array.from({ length }, (_, index) => {
|
|
205
|
+
const digit = code[index];
|
|
206
|
+
const isActive = isSlotActive(index);
|
|
207
|
+
const gapBefore = groupEvery !== void 0 && index > 0 && index % groupEvery === 0;
|
|
208
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
209
|
+
"aria-hidden": true,
|
|
210
|
+
"data-slot": "input-otp-slot",
|
|
211
|
+
"data-active": isActive || void 0,
|
|
212
|
+
"data-highlighted": isActive && !isRange || void 0,
|
|
213
|
+
className: cn("relative flex min-w-0 flex-1 items-center justify-center overflow-hidden font-mono tabular-nums", size === "sm" ? "h-9 max-w-9 rounded-md text-base" : "h-11 max-w-10 rounded-lg text-lg sm:h-12 sm:max-w-12", gapBefore && (size === "sm" ? "ms-[min(0.375rem,2.5%)]" : "ms-[min(0.25rem,2.5%)] sm:ms-[min(0.5rem,2.5%)]"), "border border-input bg-background text-foreground shadow-xs dark:bg-input/32", "transition-[background-color,border-color] duration-150 ease-out motion-reduce:transition-none", !isDisabled && "group-hover/otp:border-ring/50", isActive && isRange && "bg-accent", isInvalid && "border-destructive bg-destructive/5 text-destructive group-hover/otp:border-destructive", isDisabled && "bg-muted text-muted-foreground shadow-none"),
|
|
214
|
+
children: [digit !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
215
|
+
className: "inline-block transition-[translate,opacity] duration-150 ease-out starting:translate-y-2 starting:opacity-0 motion-reduce:transition-none",
|
|
216
|
+
children: digit
|
|
217
|
+
}, digit), isActive && digit === void 0 && /* @__PURE__ */ jsx(motion.span, {
|
|
218
|
+
className: cn("pointer-events-none absolute w-px bg-foreground", size === "sm" ? "h-4" : "h-5"),
|
|
219
|
+
animate: reduceMotion ? void 0 : CARET_BLINK,
|
|
220
|
+
transition: CARET_TIMING
|
|
221
|
+
})]
|
|
222
|
+
}, index);
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ jsx(FluidHighlight, { className: cn("z-10 border bg-transparent", size === "sm" ? "rounded-md" : "rounded-lg", isInvalid ? "border-destructive ring-[3px] ring-destructive/25" : "border-ring/60 ring-[3px] ring-ring/35") }),
|
|
225
|
+
/* @__PURE__ */ jsx("input", {
|
|
226
|
+
ref: inputRef,
|
|
227
|
+
type: "text",
|
|
228
|
+
inputMode: "numeric",
|
|
229
|
+
autoComplete: "one-time-code",
|
|
230
|
+
spellCheck: false,
|
|
231
|
+
maxLength: length,
|
|
232
|
+
disabled: isDisabled,
|
|
233
|
+
"aria-label": ariaLabel,
|
|
234
|
+
"aria-describedby": ariaDescribedBy,
|
|
235
|
+
"aria-invalid": isInvalid || void 0,
|
|
236
|
+
"data-slot": "input-otp-input",
|
|
237
|
+
value: code,
|
|
238
|
+
onChange: onInputChange,
|
|
239
|
+
onPaste,
|
|
240
|
+
onFocus,
|
|
241
|
+
onBlur: () => setIsFocused(false),
|
|
242
|
+
className: cn("absolute inset-0 z-20 size-full cursor-text appearance-none border-0 bg-transparent p-0 font-mono leading-none", "text-transparent caret-transparent tracking-[-0.5em] tabular-nums shadow-none outline-none", size === "sm" ? "text-[36px]" : "text-[44px] sm:text-[48px]", "selection:bg-transparent selection:text-transparent", "autofill:opacity-0! autofill:shadow-none! autofill:[-webkit-text-fill-color:transparent]!", "supports-[-webkit-touch-callout:none]:-left-px supports-[-webkit-touch-callout:none]:right-px", "supports-[-webkit-touch-callout:none]:font-thin supports-[-webkit-touch-callout:none]:tracking-[-0.6em]", "disabled:cursor-not-allowed")
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
})
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
//#endregion
|
|
250
|
+
export { InputOtp };
|
|
251
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":[],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState, type ChangeEvent, type ClipboardEvent, type FocusEvent, type Ref } from 'react';\nimport { motion, useAnimate, useReducedMotion, type Transition } from 'motion/react';\n\nimport { FluidHighlight } from '../lib/motion/fluid-highlight';\nimport { cn } from '../lib/utils';\n\n/**\n * One-time-code input: one slot per digit, side by side.\n *\n * The slots are drawn, not typed into. A single transparent `<input>` lies over the whole row and owns the value,\n * the caret, and the selection; the slots mirror it. That one-field model is what makes the code behave like text:\n *\n * type fills the selected slot and moves on\n * Backspace deletes like any text field; later digits close the gap\n * ⌘A / Shift selects across slots, so cut, copy, and paste work on the whole code or a slice of it\n * paste strips separators and inserts at the caret; a complete code replaces the value outright\n * autofill the OS hands the whole code to the one field, which is all `autoComplete=\"one-time-code\"` needs\n *\n * It also means one tab stop and one labelled field for assistive tech, rather than six \"digit N\" boxes.\n *\n * Because the real glyphs and caret are transparent, the slots can animate what the user sees: digits rise into\n * place, a drawn caret blinks in the empty active slot, the focus ring glides between slots, and the row shakes\n * once when the code turns invalid. All of it stands still under reduced motion.\n */\ninterface InputOtpProps {\n\t/** Number of digit slots. */\n\tlength?: number;\n\t/** Controlled value. Non-digits are dropped and longer strings are truncated to `length`. */\n\tvalue?: string;\n\tdefaultValue?: string;\n\tonChange?: (value: string) => void;\n\t/** Fires when an edit leaves every slot filled with a code that differs from the previous one. */\n\tonComplete?: (value: string) => void;\n\tisDisabled?: boolean;\n\tisInvalid?: boolean;\n\t/** Renders a gap between groups, e.g. `3` gives 000 000. */\n\tgroupEvery?: number;\n\t/** `sm` fits the code into an inline row (e.g. a settings list) instead of a dialog. */\n\tsize?: 'default' | 'sm';\n\t'aria-label'?: string;\n\t'aria-describedby'?: string;\n\tclassName?: string;\n\tref?: Ref<HTMLDivElement>;\n}\n\ninterface SlotSelection {\n\tstart: number;\n\tend: number;\n}\n\ntype SelectionDirection = 'forward' | 'backward' | 'none';\n\nconst DIGITS_ONLY = /\\D/g;\n// Arabic-Indic, Persian, Devanagari, Bengali, Thai and full-width digits come from native numeric keyboards and IMEs.\n// They map to ASCII before everything else is dropped, so a code typed or pasted in them is not silently discarded.\nconst NON_ASCII_DIGITS = /[\\u0660-\\u0669\\u06F0-\\u06F9\\u0966-\\u096F\\u09E6-\\u09EF\\u0E50-\\u0E59\\uFF10-\\uFF19]/g;\nconst ZERO_CODE_POINTS = [0x0660, 0x06f0, 0x0966, 0x09e6, 0x0e50, 0xff10];\nconst toAsciiDigits = (raw: string) =>\n\traw.replace(NON_ASCII_DIGITS, (char) => {\n\t\tconst code = char.charCodeAt(0);\n\t\tconst zero = ZERO_CODE_POINTS.find((start) => code >= start && code <= start + 9)!;\n\t\treturn String(code - zero);\n\t});\n// Chrome restores autofill styling and the caret position a beat after a value change, so the mirror re-reads them.\nconst RESYNC_DELAYS = [0, 10, 50];\n// A hard on/off blink, like a text caret, rather than a fade.\nconst CARET_BLINK = { opacity: [1, 1, 0, 0] };\nconst CARET_TIMING: Transition = { duration: 1, times: [0, 0.5, 0.5, 1], ease: 'linear', repeat: Infinity };\n\nconst toCode = (raw: string, length: number) => toAsciiDigits(raw).replace(DIGITS_ONLY, '').slice(0, length);\n\nfunction InputOtp({\n\tlength = 6,\n\tvalue,\n\tdefaultValue = '',\n\tonChange,\n\tonComplete,\n\tisDisabled = false,\n\tisInvalid = false,\n\tgroupEvery,\n\tsize = 'default',\n\t'aria-label': ariaLabel = 'One-time code',\n\t'aria-describedby': ariaDescribedBy,\n\tclassName,\n\tref,\n}: InputOtpProps) {\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst previousSelection = useRef<[number | null, number | null, SelectionDirection]>([null, null, 'none']);\n\tconst wasInvalid = useRef(isInvalid);\n\tconst [rowRef, animate] = useAnimate<HTMLDivElement>();\n\tconst reduceMotion = useReducedMotion();\n\tconst [internal, setInternal] = useState(() => toCode(defaultValue, length));\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [selection, setSelection] = useState<SlotSelection | null>(null);\n\n\tconst controlled = value !== undefined;\n\tconst code = toCode(controlled ? value : internal, length);\n\n\tconst mirror = (start: number, end: number) =>\n\t\tsetSelection((current) => (current?.start === start && current.end === end ? current : { start, end }));\n\n\tconst commit = (next: string) => {\n\t\tif (next === code) return;\n\t\tif (!controlled) setInternal(next);\n\t\tonChange?.(next);\n\t\t// Comparing against the previous code keeps a re-render or an identical paste from verifying twice, while\n\t\t// correcting one digit of a full code still counts as a new attempt.\n\t\tif (next.length === length) onComplete?.(next);\n\t};\n\n\tuseEffect(() => {\n\t\tconst input = inputRef.current;\n\t\tif (!input) return;\n\n\t\t// The native caret only ever sits between characters. Over a slot, that reads as nothing being selected, so\n\t\t// a collapsed caret inside a full run is widened to select the digit after it (or before it, when moving left).\n\t\tconst syncSelection = () => {\n\t\t\tif (document.activeElement !== input) {\n\t\t\t\tsetSelection(null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { selectionStart, selectionEnd, selectionDirection, maxLength, value: current } = input;\n\t\t\tconst [, previousEnd] = previousSelection.current;\n\t\t\tlet start = -1;\n\t\t\tlet end = -1;\n\t\t\tlet direction: SelectionDirection | undefined;\n\n\t\t\tif (current.length !== 0 && selectionStart !== null && selectionEnd !== null) {\n\t\t\t\tconst isCaret = selectionStart === selectionEnd;\n\t\t\t\tconst isAppending = selectionStart === current.length && current.length < maxLength;\n\t\t\t\tif (isCaret && !isAppending) {\n\t\t\t\t\tconst caret = selectionStart;\n\t\t\t\t\tif (caret === 0) {\n\t\t\t\t\t\t[start, end, direction] = [0, 1, 'forward'];\n\t\t\t\t\t} else if (caret === maxLength) {\n\t\t\t\t\t\t[start, end, direction] = [caret - 1, caret, 'backward'];\n\t\t\t\t\t} else if (maxLength > 1 && current.length > 1) {\n\t\t\t\t\t\tlet offset = 0;\n\t\t\t\t\t\tconst [previousStart] = previousSelection.current;\n\t\t\t\t\t\tif (previousStart !== null && previousEnd !== null) {\n\t\t\t\t\t\t\tdirection = caret < previousEnd ? 'backward' : 'forward';\n\t\t\t\t\t\t\tconst wasAppending = previousStart === previousEnd && previousStart < maxLength;\n\t\t\t\t\t\t\tif (direction === 'backward' && !wasAppending) offset = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstart = caret + offset;\n\t\t\t\t\t\tend = caret + offset + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (start !== -1 && end !== -1 && start !== end) input.setSelectionRange(start, end, direction);\n\t\t\t}\n\n\t\t\tconst nextStart = start !== -1 ? start : (selectionStart ?? 0);\n\t\t\tconst nextEnd = end !== -1 ? end : (selectionEnd ?? 0);\n\t\t\tmirror(nextStart, nextEnd);\n\t\t\tpreviousSelection.current = [nextStart, nextEnd, direction ?? selectionDirection ?? 'none'];\n\t\t};\n\n\t\tdocument.addEventListener('selectionchange', syncSelection, { capture: true });\n\t\tsyncSelection();\n\t\tif (document.activeElement === input) setIsFocused(true);\n\t\treturn () => document.removeEventListener('selectionchange', syncSelection, { capture: true });\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst timeouts = RESYNC_DELAYS.map((delay) =>\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst input = inputRef.current;\n\t\t\t\tif (!input) return;\n\t\t\t\t// A non-bubbling `input` event clears Chrome's `:autofill` state without reaching React's onChange.\n\t\t\t\tinput.dispatchEvent(new Event('input'));\n\t\t\t\tif (document.activeElement !== input || input.selectionStart === null || input.selectionEnd === null) return;\n\t\t\t\tmirror(input.selectionStart, input.selectionEnd);\n\t\t\t\tpreviousSelection.current = [input.selectionStart, input.selectionEnd, input.selectionDirection ?? 'none'];\n\t\t\t}, delay),\n\t\t);\n\t\treturn () => timeouts.forEach(clearTimeout);\n\t}, [code, isFocused]);\n\n\tuseEffect(() => {\n\t\tconst turnedInvalid = isInvalid && !wasInvalid.current;\n\t\twasInvalid.current = isInvalid;\n\t\tif (!turnedInvalid || reduceMotion || !rowRef.current) return;\n\t\tanimate(rowRef.current, { x: [0, -6, 6, -4, 4, -2, 0] }, { duration: 0.4, ease: 'easeInOut' });\n\t}, [isInvalid, reduceMotion, animate, rowRef]);\n\n\tconst onInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\tconst next = toCode(event.target.value, length);\n\t\t// Deleting doesn't fire `selectionchange`, so the mirror is nudged by hand.\n\t\tif (next.length < code.length) document.dispatchEvent(new Event('selectionchange'));\n\t\tcommit(next);\n\t};\n\n\tconst onPaste = (event: ClipboardEvent<HTMLInputElement>) => {\n\t\t// Always handled here: a native paste of \"123 456\" would be cut to `maxLength` before the spaces were dropped,\n\t\t// and iOS pastes over the whole field rather than at the caret.\n\t\tevent.preventDefault();\n\t\tconst input = event.currentTarget;\n\t\tconst pasted = toAsciiDigits(event.clipboardData.getData('text/plain')).replace(DIGITS_ONLY, '');\n\t\tif (pasted === '') return;\n\t\tconst start = input.selectionStart ?? code.length;\n\t\tconst end = input.selectionEnd ?? start;\n\t\t// A complete code replaces the value even when the caret is mid-way; it's an autofill or a copied message.\n\t\tconst next =\n\t\t\tpasted.length >= length ? pasted.slice(0, length) : (code.slice(0, start) + pasted + code.slice(end)).slice(0, length);\n\t\tinput.value = next;\n\t\tcommit(next);\n\t\tconst caret = Math.min(next.length, length - 1);\n\t\tinput.setSelectionRange(caret, next.length);\n\t\tmirror(caret, next.length);\n\t};\n\n\tconst onFocus = (event: FocusEvent<HTMLInputElement>) => {\n\t\t// Focus lands on the first empty slot, or selects the last digit of a full code so typing replaces it.\n\t\tconst input = event.currentTarget;\n\t\tconst start = Math.min(input.value.length, length - 1);\n\t\tinput.setSelectionRange(start, input.value.length);\n\t\tmirror(start, input.value.length);\n\t\tsetIsFocused(true);\n\t};\n\n\tconst isSlotActive = (index: number) =>\n\t\tisFocused &&\n\t\tselection !== null &&\n\t\t(selection.start === selection.end ? index === selection.start : index >= selection.start && index < selection.end);\n\tconst isRange = selection !== null && selection.end - selection.start > 1;\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"input-otp\"\n\t\t\tdata-size={size}\n\t\t\t// Chrome Translate wraps text nodes in <font>, which breaks React's next update; a code is never translatable.\n\t\t\ttranslate=\"no\"\n\t\t\t// Digits read left to right in every script, so the row, the caret mirror, and the slot order stay LTR in RTL pages.\n\t\t\tdir=\"ltr\"\n\t\t\tclassName={cn('w-full', size === 'sm' ? 'max-w-[15.5rem]' : 'max-w-[21rem]', className)}\n\t\t>\n\t\t\t<div\n\t\t\t\tref={rowRef}\n\t\t\t\t// Gaps are a share of the row, not rem, so they cannot eat the slots when the root font size is raised.\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'group/otp relative flex w-full items-center',\n\t\t\t\t\tsize === 'sm' ? 'gap-[min(0.375rem,2.5%)]' : 'gap-[min(0.25rem,2.5%)] sm:gap-[min(0.5rem,2.5%)]',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{Array.from({ length }, (_, index) => {\n\t\t\t\t\tconst digit = code[index];\n\t\t\t\t\tconst isActive = isSlotActive(index);\n\t\t\t\t\tconst gapBefore = groupEvery !== undefined && index > 0 && index % groupEvery === 0;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tdata-slot=\"input-otp-slot\"\n\t\t\t\t\t\t\tdata-active={isActive || undefined}\n\t\t\t\t\t\t\t// The single active slot is what the gliding ring tracks; a range is shown by the slots themselves.\n\t\t\t\t\t\t\tdata-highlighted={(isActive && !isRange) || undefined}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'relative flex min-w-0 flex-1 items-center justify-center overflow-hidden font-mono tabular-nums',\n\t\t\t\t\t\t\t\tsize === 'sm' ? 'h-9 max-w-9 rounded-md text-base' : 'h-11 max-w-10 rounded-lg text-lg sm:h-12 sm:max-w-12',\n\t\t\t\t\t\t\t\tgapBefore &&\n\t\t\t\t\t\t\t\t\t(size === 'sm' ? 'ms-[min(0.375rem,2.5%)]' : 'ms-[min(0.25rem,2.5%)] sm:ms-[min(0.5rem,2.5%)]'),\n\t\t\t\t\t\t\t\t'border border-input bg-background text-foreground shadow-xs dark:bg-input/32',\n\t\t\t\t\t\t\t\t'transition-[background-color,border-color] duration-150 ease-out motion-reduce:transition-none',\n\t\t\t\t\t\t\t\t!isDisabled && 'group-hover/otp:border-ring/50',\n\t\t\t\t\t\t\t\tisActive && isRange && 'bg-accent',\n\t\t\t\t\t\t\t\t// Keep the invalid state visible without relying on tint alone.\n\t\t\t\t\t\t\t\tisInvalid && 'border-destructive bg-destructive/5 text-destructive group-hover/otp:border-destructive',\n\t\t\t\t\t\t\t\tisDisabled && 'bg-muted text-muted-foreground shadow-none',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{digit !== undefined && (\n\t\t\t\t\t\t\t\t// Keyed on the digit so each new one replays the rise, including a correction in place.\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tkey={digit}\n\t\t\t\t\t\t\t\t\tclassName=\"inline-block transition-[translate,opacity] duration-150 ease-out starting:translate-y-2 starting:opacity-0 motion-reduce:transition-none\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{digit}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{isActive && digit === undefined && (\n\t\t\t\t\t\t\t\t// The real caret is transparent, so the empty active slot draws its own.\n\t\t\t\t\t\t\t\t<motion.span\n\t\t\t\t\t\t\t\t\tclassName={cn('pointer-events-none absolute w-px bg-foreground', size === 'sm' ? 'h-4' : 'h-5')}\n\t\t\t\t\t\t\t\t\tanimate={reduceMotion ? undefined : CARET_BLINK}\n\t\t\t\t\t\t\t\t\ttransition={CARET_TIMING}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t<FluidHighlight\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'z-10 border bg-transparent',\n\t\t\t\t\t\tsize === 'sm' ? 'rounded-md' : 'rounded-lg',\n\t\t\t\t\t\tisInvalid ? 'border-destructive ring-[3px] ring-destructive/25' : 'border-ring/60 ring-[3px] ring-ring/35',\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t\t<input\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\t// `text` with a numeric mode rather than `number`: a number input brings spinners, accepts `e`\n\t\t\t\t\t// and `-`, and reports an empty value for anything it considers malformed.\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tinputMode=\"numeric\"\n\t\t\t\t\tautoComplete=\"one-time-code\"\n\t\t\t\t\tspellCheck={false}\n\t\t\t\t\tmaxLength={length}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\t\taria-invalid={isInvalid || undefined}\n\t\t\t\t\tdata-slot=\"input-otp-input\"\n\t\t\t\t\tvalue={code}\n\t\t\t\t\tonChange={onInputChange}\n\t\t\t\t\tonPaste={onPaste}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonBlur={() => setIsFocused(false)}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t// Present and hit-testable over the whole row, but invisible: transparent ink rather than opacity,\n\t\t\t\t\t\t// because iOS only offers paste on a press-and-hold over a visible field.\n\t\t\t\t\t\t'absolute inset-0 z-20 size-full cursor-text appearance-none border-0 bg-transparent p-0 font-mono leading-none',\n\t\t\t\t\t\t'text-transparent caret-transparent tracking-[-0.5em] tabular-nums shadow-none outline-none',\n\t\t\t\t\t\t// A font as tall as the row keeps every glyph under the slots, so a tap anywhere lands in the field.\n\t\t\t\t\t\tsize === 'sm' ? 'text-[36px]' : 'text-[44px] sm:text-[48px]',\n\t\t\t\t\t\t'selection:bg-transparent selection:text-transparent',\n\t\t\t\t\t\t'autofill:opacity-0! autofill:shadow-none! autofill:[-webkit-text-fill-color:transparent]!',\n\t\t\t\t\t\t// iOS lays the glyphs out wider and leaks the caret at the edge; squeeze them back under the slots.\n\t\t\t\t\t\t'supports-[-webkit-touch-callout:none]:-left-px supports-[-webkit-touch-callout:none]:right-px',\n\t\t\t\t\t\t'supports-[-webkit-touch-callout:none]:font-thin supports-[-webkit-touch-callout:none]:tracking-[-0.6em]',\n\t\t\t\t\t\t'disabled:cursor-not-allowed',\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport { InputOtp };\nexport type { InputOtpProps };\n"],"mappings":";;;;;;;;;AAsDA,MAAM,cAAc;AAGpB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;CAAC;CAAQ;CAAQ;CAAQ;CAAQ;CAAQ;AAAM;AACxE,MAAM,iBAAiB,QACtB,IAAI,QAAQ,mBAAmB,SAAS;CACvC,MAAM,OAAO,KAAK,WAAW,CAAC;CAC9B,MAAM,OAAO,iBAAiB,MAAM,UAAU,QAAQ,SAAS,QAAQ,QAAQ,CAAC;CAChF,OAAO,OAAO,OAAO,IAAI;AAC1B,CAAC;AAEF,MAAM,gBAAgB;CAAC;CAAG;CAAI;AAAE;AAEhC,MAAM,cAAc,EAAE,SAAS;CAAC;CAAG;CAAG;CAAG;AAAC,EAAE;AAC5C,MAAM,eAA2B;CAAE,UAAU;CAAG,OAAO;EAAC;EAAG;EAAK;EAAK;CAAC;CAAG,MAAM;CAAU,QAAQ;AAAS;AAE1G,MAAM,UAAU,KAAa,WAAmB,cAAc,GAAG,CAAC,CAAC,QAAQ,aAAa,EAAE,CAAC,CAAC,MAAM,GAAG,MAAM;AAE3G,SAAS,SAAS,EACjB,SAAS,GACT,OACA,eAAe,IACf,UACA,YACA,aAAa,OACb,YAAY,OACZ,Y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AW,GACV,8BACA,SAAS,OAAO,eAAe,cAC/B,YAAY,sDAAsD,wCACnE,EACA;IACD,oBAAC,SAAD;KACC,KAAK;KAGL,MAAK;KACL,WAAU;KACV,cAAa;KACb,YAAY;KACZ,WAAW;KACX,UAAU;KACV,cAAY;KACZ,oBAAkB;KAClB,gBAAc,aAAa;KAC3B,aAAU;KACV,OAAO;KACP,UAAU;KACD;KACA;KACT,cAAc,aAAa,KAAK;KAChC,WAAW,GAGV,kHACA,8FAEA,SAAS,OAAO,gBAAgB,8BAChC,uDACA,6FAEA,iGACA,2GACA,6BACD;IACA;GACG;;CACD;AAEP"}
|
|
@@ -6,14 +6,19 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
6
6
|
let _base_ui_react_input = require("@base-ui/react/input");
|
|
7
7
|
|
|
8
8
|
//#region src/components/input.tsx
|
|
9
|
+
const LEFT_TO_RIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
10
|
+
"email",
|
|
11
|
+
"url",
|
|
12
|
+
"tel"
|
|
13
|
+
]);
|
|
9
14
|
function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
10
15
|
const isFloating = props.placeholder === " ";
|
|
11
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12
17
|
className: require_utils.cn(!unstyled && [
|
|
13
|
-
"relative inline-flex w-full rounded-
|
|
14
|
-
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-
|
|
18
|
+
"relative inline-flex w-full rounded-md border border-input bg-background bg-clip-padding text-base transition-shadow",
|
|
19
|
+
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)]",
|
|
15
20
|
"not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
|
|
16
|
-
"has-focus-visible:border-
|
|
21
|
+
"has-focus-visible:border-ring/60 has-focus-visible:ring-[3px] has-focus-visible:ring-ring/35",
|
|
17
22
|
"has-aria-invalid:border-destructive/36",
|
|
18
23
|
"has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16",
|
|
19
24
|
"has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none",
|
|
@@ -24,8 +29,9 @@ function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
|
24
29
|
"data-size": size,
|
|
25
30
|
"data-slot": "input-control",
|
|
26
31
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_input.Input, {
|
|
27
|
-
className: require_utils.cn("w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11", isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-
|
|
32
|
+
className: require_utils.cn("w-full min-w-0 text-ellipsis rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11", isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-subtle-foreground sm:h-7.5 sm:leading-7.5", 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"), 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"), 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", props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"),
|
|
28
33
|
"data-slot": "input",
|
|
34
|
+
dir: LEFT_TO_RIGHT_TYPES.has(props.type ?? "") ? "ltr" : void 0,
|
|
29
35
|
size: typeof size === "number" ? size : void 0,
|
|
30
36
|
...props
|
|
31
37
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","names":["cn","InputPrimitive"],"sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-
|
|
1
|
+
{"version":3,"file":"input.cjs","names":["cn","InputPrimitive"],"sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\n// Emails, URLs and phone numbers read left to right in every script. On a right-to-left page they would otherwise be\n// right-aligned and clip their start, which is the part that identifies them.\nconst LEFT_TO_RIGHT_TYPES = new Set(['email', 'url', 'tel']);\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-md border border-input bg-background bg-clip-padding text-base transition-shadow',\n\t\t\t\t\t\t// Inner shadow highlight\n\t\t\t\t\t\t'before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)]',\n\t\t\t\t\t\t'not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]',\n\t\t\t\t\t\t// Focus state - use primary brand color\n\t\t\t\t\t\t'has-focus-visible:border-ring/60 has-focus-visible:ring-[3px] has-focus-visible:ring-ring/35',\n\t\t\t\t\t\t// Invalid state\n\t\t\t\t\t\t'has-aria-invalid:border-destructive/36',\n\t\t\t\t\t\t'has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16',\n\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t'has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none',\n\t\t\t\t\t\t// Dark mode\n\t\t\t\t\t\t'sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border',\n\t\t\t\t\t\t'dark:has-aria-invalid:ring-destructive/24',\n\t\t\t\t\t\t'dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName,\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"input-control\"\n\t\t>\n\t\t\t<InputPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'w-full min-w-0 text-ellipsis rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11',\n\t\t\t\t\tisFloating\n\t\t\t\t\t\t? 'h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10'\n\t\t\t\t\t\t: 'h-8.5 leading-8.5 placeholder:text-subtle-foreground sm:h-7.5 sm:leading-7.5',\n\t\t\t\t\tsize === 'sm' &&\n\t\t\t\t\t\t(isFloating\n\t\t\t\t\t\t\t? 'h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9'\n\t\t\t\t\t\t\t: 'h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5'),\n\t\t\t\t\tsize === 'lg' &&\n\t\t\t\t\t\t(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'),\n\t\t\t\t\tprops.type === 'search' &&\n\t\t\t\t\t\t'[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none',\n\t\t\t\t\tprops.type === 'file' &&\n\t\t\t\t\t\t'text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm',\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"input\"\n\t\t\t\tdir={LEFT_TO_RIGHT_TYPES.has(props.type ?? '') ? 'ltr' : undefined}\n\t\t\t\tsize={typeof size === 'number' ? size : undefined}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport { Input };\nexport type { InputProps };\n"],"mappings":";;;;;;;;AASA,MAAM,sCAAsB,IAAI,IAAI;CAAC;CAAS;CAAO;AAAK,CAAC;AAO3D,SAAS,MAAM,EAAE,WAAW,OAAO,WAAW,WAAW,OAAO,GAAG,SAAqB;CACvF,MAAM,aAAa,MAAM,gBAAgB;CAEzC,OACC,2CAAC,QAAD;EACC,WACCA,iBACC,CAAC,YAAY;GAEZ;GAEA;GACA;GAEA;GAEA;GACA;GAEA;GAEA;GACA;GACA;EACD,GACA,SACD,KAAK;EAEN,aAAW;EACX,aAAU;YAEV,2CAACC,4BAAD;GACC,WAAWD,iBACV,kIACA,aACG,uEACA,gFACH,SAAS,SACP,aACE,wDACA,4EACJ,SAAS,SACP,aAAa,6BAA6B,8CAC5C,MAAM,SAAS,YACd,8MACD,MAAM,SAAS,UACd,wGACF;GACA,aAAU;GACV,KAAK,oBAAoB,IAAI,MAAM,QAAQ,EAAE,IAAI,QAAQ;GACzD,MAAM,OAAO,SAAS,WAAW,OAAO;GACxC,GAAI;EACJ;CACI;AAER"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
3
|
+
//#region src/components/input.d.ts
|
|
4
|
+
type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>, 'size'> & {
|
|
5
|
+
size?: 'sm' | 'default' | 'lg' | number;
|
|
6
|
+
unstyled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function Input({ className, size, unstyled, ...props }: InputProps): React$1.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Input, type InputProps };
|
|
11
|
+
//# sourceMappingURL=input.d.cts.map
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
3
|
+
//#region src/components/input.d.ts
|
|
4
|
+
type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>, 'size'> & {
|
|
5
|
+
size?: 'sm' | 'default' | 'lg' | number;
|
|
6
|
+
unstyled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function Input({ className, size, unstyled, ...props }: InputProps): React$1.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Input, type InputProps };
|
|
11
|
+
//# sourceMappingURL=input.d.ts.map
|
package/dist/components/input.js
CHANGED
|
@@ -5,14 +5,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
6
6
|
|
|
7
7
|
//#region src/components/input.tsx
|
|
8
|
+
const LEFT_TO_RIGHT_TYPES = /* @__PURE__ */ new Set([
|
|
9
|
+
"email",
|
|
10
|
+
"url",
|
|
11
|
+
"tel"
|
|
12
|
+
]);
|
|
8
13
|
function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
9
14
|
const isFloating = props.placeholder === " ";
|
|
10
15
|
return /* @__PURE__ */ jsx("span", {
|
|
11
16
|
className: cn(!unstyled && [
|
|
12
|
-
"relative inline-flex w-full rounded-
|
|
13
|
-
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-
|
|
17
|
+
"relative inline-flex w-full rounded-md border border-input bg-background bg-clip-padding text-base transition-shadow",
|
|
18
|
+
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)]",
|
|
14
19
|
"not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
|
|
15
|
-
"has-focus-visible:border-
|
|
20
|
+
"has-focus-visible:border-ring/60 has-focus-visible:ring-[3px] has-focus-visible:ring-ring/35",
|
|
16
21
|
"has-aria-invalid:border-destructive/36",
|
|
17
22
|
"has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16",
|
|
18
23
|
"has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none",
|
|
@@ -23,8 +28,9 @@ function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
|
23
28
|
"data-size": size,
|
|
24
29
|
"data-slot": "input-control",
|
|
25
30
|
children: /* @__PURE__ */ jsx(Input$1, {
|
|
26
|
-
className: cn("w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11", isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-
|
|
31
|
+
className: cn("w-full min-w-0 text-ellipsis rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11", isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-subtle-foreground sm:h-7.5 sm:leading-7.5", 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"), 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"), 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", props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"),
|
|
27
32
|
"data-slot": "input",
|
|
33
|
+
dir: LEFT_TO_RIGHT_TYPES.has(props.type ?? "") ? "ltr" : void 0,
|
|
28
34
|
size: typeof size === "number" ? size : void 0,
|
|
29
35
|
...props
|
|
30
36
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":["InputPrimitive"],"sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-
|
|
1
|
+
{"version":3,"file":"input.js","names":["InputPrimitive"],"sources":["../../src/components/input.tsx"],"sourcesContent":["'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\n// Emails, URLs and phone numbers read left to right in every script. On a right-to-left page they would otherwise be\n// right-aligned and clip their start, which is the part that identifies them.\nconst LEFT_TO_RIGHT_TYPES = new Set(['email', 'url', 'tel']);\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-md border border-input bg-background bg-clip-padding text-base transition-shadow',\n\t\t\t\t\t\t// Inner shadow highlight\n\t\t\t\t\t\t'before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)]',\n\t\t\t\t\t\t'not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]',\n\t\t\t\t\t\t// Focus state - use primary brand color\n\t\t\t\t\t\t'has-focus-visible:border-ring/60 has-focus-visible:ring-[3px] has-focus-visible:ring-ring/35',\n\t\t\t\t\t\t// Invalid state\n\t\t\t\t\t\t'has-aria-invalid:border-destructive/36',\n\t\t\t\t\t\t'has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16',\n\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t'has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none',\n\t\t\t\t\t\t// Dark mode\n\t\t\t\t\t\t'sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border',\n\t\t\t\t\t\t'dark:has-aria-invalid:ring-destructive/24',\n\t\t\t\t\t\t'dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName,\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"input-control\"\n\t\t>\n\t\t\t<InputPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'w-full min-w-0 text-ellipsis rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11',\n\t\t\t\t\tisFloating\n\t\t\t\t\t\t? 'h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10'\n\t\t\t\t\t\t: 'h-8.5 leading-8.5 placeholder:text-subtle-foreground sm:h-7.5 sm:leading-7.5',\n\t\t\t\t\tsize === 'sm' &&\n\t\t\t\t\t\t(isFloating\n\t\t\t\t\t\t\t? 'h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9'\n\t\t\t\t\t\t\t: 'h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5'),\n\t\t\t\t\tsize === 'lg' &&\n\t\t\t\t\t\t(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'),\n\t\t\t\t\tprops.type === 'search' &&\n\t\t\t\t\t\t'[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none',\n\t\t\t\t\tprops.type === 'file' &&\n\t\t\t\t\t\t'text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm',\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"input\"\n\t\t\t\tdir={LEFT_TO_RIGHT_TYPES.has(props.type ?? '') ? 'ltr' : undefined}\n\t\t\t\tsize={typeof size === 'number' ? size : undefined}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport { Input };\nexport type { InputProps };\n"],"mappings":";;;;;;;AASA,MAAM,sCAAsB,IAAI,IAAI;CAAC;CAAS;CAAO;AAAK,CAAC;AAO3D,SAAS,MAAM,EAAE,WAAW,OAAO,WAAW,WAAW,OAAO,GAAG,SAAqB;CACvF,MAAM,aAAa,MAAM,gBAAgB;CAEzC,OACC,oBAAC,QAAD;EACC,WACC,GACC,CAAC,YAAY;GAEZ;GAEA;GACA;GAEA;GAEA;GACA;GAEA;GAEA;GACA;GACA;EACD,GACA,SACD,KAAK;EAEN,aAAW;EACX,aAAU;YAEV,oBAACA,SAAD;GACC,WAAW,GACV,kIACA,aACG,uEACA,gFACH,SAAS,SACP,aACE,wDACA,4EACJ,SAAS,SACP,aAAa,6BAA6B,8CAC5C,MAAM,SAAS,YACd,8MACD,MAAM,SAAS,UACd,wGACF;GACA,aAAU;GACV,KAAK,oBAAoB,IAAI,MAAM,QAAQ,EAAE,IAAI,QAAQ;GACzD,MAAM,OAAO,SAAS,WAAW,OAAO;GACxC,GAAI;EACJ;CACI;AAER"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
|
|
4
|
+
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
5
|
+
const require_slot = require('../slot-C-jEfihz.cjs');
|
|
6
|
+
const require_components_separator = require('./separator.cjs');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
let class_variance_authority = require("class-variance-authority");
|
|
11
|
+
|
|
12
|
+
//#region src/components/item.tsx
|
|
13
|
+
function ItemGroup({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15
|
+
role: "list",
|
|
16
|
+
"data-slot": "item-group",
|
|
17
|
+
className: require_utils.cn("group/item-group flex w-full flex-col gap-2", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function ItemSeparator({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_separator.Separator, {
|
|
23
|
+
"data-slot": "item-separator",
|
|
24
|
+
orientation: "horizontal",
|
|
25
|
+
className: require_utils.cn("bg-border/60", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const itemVariants = (0, class_variance_authority.cva)(`group/item flex w-full flex-wrap items-center gap-3 rounded-md outline-none
|
|
30
|
+
transition-[box-shadow] duration-(--duration-moderate) ease-out
|
|
31
|
+
focus-visible:ring-[3px] focus-visible:ring-ring/50`, {
|
|
32
|
+
variants: {
|
|
33
|
+
variant: {
|
|
34
|
+
default: "",
|
|
35
|
+
outline: "border border-border bg-clip-padding",
|
|
36
|
+
muted: "bg-muted/60"
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
default: "p-3",
|
|
40
|
+
sm: "gap-2.5 px-3 py-2.5 text-[0.8125rem]",
|
|
41
|
+
xs: "gap-2 px-2.5 py-2 text-[0.75rem]"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
variant: "default",
|
|
46
|
+
size: "default"
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const Item = react.forwardRef(({ className, variant, size, asChild, children, ...props }, ref) => {
|
|
50
|
+
const classes = require_utils.cn(itemVariants({
|
|
51
|
+
variant,
|
|
52
|
+
size,
|
|
53
|
+
className
|
|
54
|
+
}));
|
|
55
|
+
if (asChild && react.isValidElement(children)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slot.Slot, {
|
|
56
|
+
ref,
|
|
57
|
+
className: classes,
|
|
58
|
+
"data-slot": "item",
|
|
59
|
+
...props,
|
|
60
|
+
children
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
63
|
+
ref,
|
|
64
|
+
"data-slot": "item",
|
|
65
|
+
role: "listitem",
|
|
66
|
+
className: classes,
|
|
67
|
+
...props,
|
|
68
|
+
children
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
Item.displayName = "Item";
|
|
72
|
+
const itemMediaVariants = (0, class_variance_authority.cva)("flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
73
|
+
variants: { variant: {
|
|
74
|
+
default: "",
|
|
75
|
+
icon: "size-8 rounded-sm bg-muted text-muted-foreground [&_svg]:size-4",
|
|
76
|
+
image: "size-10 overflow-hidden rounded-sm outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10 [&_img]:size-full [&_img]:object-cover"
|
|
77
|
+
} },
|
|
78
|
+
defaultVariants: { variant: "default" }
|
|
79
|
+
});
|
|
80
|
+
function ItemMedia({ className, variant, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
82
|
+
"data-slot": "item-media",
|
|
83
|
+
"data-variant": variant,
|
|
84
|
+
className: require_utils.cn(itemMediaVariants({
|
|
85
|
+
variant,
|
|
86
|
+
className
|
|
87
|
+
})),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function ItemContent({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
93
|
+
"data-slot": "item-content",
|
|
94
|
+
className: require_utils.cn("flex min-w-0 flex-1 basis-32 flex-col gap-0.5 [&+[data-slot=item-content]]:max-w-full [&+[data-slot=item-content]]:flex-none", className),
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function ItemTitle({ className, children, ...props }) {
|
|
99
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
100
|
+
"data-slot": "item-title",
|
|
101
|
+
title: typeof children === "string" ? children : void 0,
|
|
102
|
+
className: require_utils.cn("flex w-fit max-w-full items-center gap-1.5 text-[0.8125rem] font-medium text-pretty [overflow-wrap:anywhere] [&:not(:has(>*))]:line-clamp-2", className),
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function ItemDescription({ className, children, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
109
|
+
"data-slot": "item-description",
|
|
110
|
+
title: typeof children === "string" ? children : void 0,
|
|
111
|
+
className: require_utils.cn("line-clamp-2 text-pretty text-[0.75rem] leading-5 text-muted-foreground [overflow-wrap:anywhere] [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-link", className),
|
|
112
|
+
...props,
|
|
113
|
+
children
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function ItemActions({ className, ...props }) {
|
|
117
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
118
|
+
"data-slot": "item-actions",
|
|
119
|
+
className: require_utils.cn("flex max-w-full flex-wrap items-center justify-end gap-2 ms-auto", className),
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function ItemHeader({ className, ...props }) {
|
|
124
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
125
|
+
"data-slot": "item-header",
|
|
126
|
+
className: require_utils.cn("flex min-w-0 basis-full items-center justify-between gap-2", className),
|
|
127
|
+
...props
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function ItemFooter({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
132
|
+
"data-slot": "item-footer",
|
|
133
|
+
className: require_utils.cn("flex min-w-0 basis-full items-center justify-between gap-2", className),
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.Item = Item;
|
|
140
|
+
exports.ItemActions = ItemActions;
|
|
141
|
+
exports.ItemContent = ItemContent;
|
|
142
|
+
exports.ItemDescription = ItemDescription;
|
|
143
|
+
exports.ItemFooter = ItemFooter;
|
|
144
|
+
exports.ItemGroup = ItemGroup;
|
|
145
|
+
exports.ItemHeader = ItemHeader;
|
|
146
|
+
exports.ItemMedia = ItemMedia;
|
|
147
|
+
exports.ItemSeparator = ItemSeparator;
|
|
148
|
+
exports.ItemTitle = ItemTitle;
|
|
149
|
+
exports.itemMediaVariants = itemMediaVariants;
|
|
150
|
+
exports.itemVariants = itemVariants;
|
|
151
|
+
//# sourceMappingURL=item.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.cjs","names":["cn","Separator","React","Slot"],"sources":["../../src/components/item.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Separator } from './separator';\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\ntype ItemGroupProps = React.ComponentProps<'div'>;\n\nfunction ItemGroup({ className, ...props }: ItemGroupProps) {\n\treturn (\n\t\t<div\n\t\t\trole=\"list\"\n\t\t\tdata-slot=\"item-group\"\n\t\t\tclassName={cn('group/item-group flex w-full flex-col gap-2', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ItemSeparatorProps = React.ComponentProps<typeof Separator>;\n\nfunction ItemSeparator({ className, ...props }: ItemSeparatorProps) {\n\treturn (\n\t\t<Separator\n\t\t\tdata-slot=\"item-separator\"\n\t\t\torientation=\"horizontal\"\n\t\t\tclassName={cn('bg-border/60', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst itemVariants = cva(\n\t`group/item flex w-full flex-wrap items-center gap-3 rounded-md outline-none\n\t\ttransition-[box-shadow] duration-(--duration-moderate) ease-out\n\t\tfocus-visible:ring-[3px] focus-visible:ring-ring/50`,\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: '',\n\t\t\t\toutline: 'border border-border bg-clip-padding',\n\t\t\t\tmuted: 'bg-muted/60',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'p-3',\n\t\t\t\tsm: 'gap-2.5 px-3 py-2.5 text-[0.8125rem]',\n\t\t\t\txs: 'gap-2 px-2.5 py-2 text-[0.75rem]',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'default',\n\t\t},\n\t},\n);\n\ninterface ItemProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof itemVariants> {\n\t/** When true, merges props onto the child element instead of rendering a div. */\n\tasChild?: boolean;\n}\n\nconst Item = React.forwardRef<HTMLDivElement, ItemProps>(\n\t({ className, variant, size, asChild, children, ...props }, ref) => {\n\t\tconst classes = cn(itemVariants({ variant, size, className }));\n\t\tif (asChild && React.isValidElement(children)) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref} className={classes} data-slot=\"item\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<div ref={ref} data-slot=\"item\" role=\"listitem\" className={classes} {...props}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t},\n);\nItem.displayName = 'Item';\n\nconst itemMediaVariants = cva(\n\t'flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: '',\n\t\t\t\ticon: 'size-8 rounded-sm bg-muted text-muted-foreground [&_svg]:size-4',\n\t\t\t\timage:\n\t\t\t\t\t'size-10 overflow-hidden rounded-sm outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10 [&_img]:size-full [&_img]:object-cover',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t},\n\t},\n);\n\ninterface ItemMediaProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof itemMediaVariants> {}\n\nfunction ItemMedia({ className, variant, ...props }: ItemMediaProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-media\"\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(itemMediaVariants({ variant, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ItemContentProps = React.ComponentProps<'div'>;\n\nfunction ItemContent({ className, ...props }: ItemContentProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-content\"\n\t\t\t// `basis-32` is the floor: when the actions would squeeze the text below it, the\n\t\t\t// Item wraps them onto their own line instead of crushing the column.\n\t\t\tclassName={cn('flex min-w-0 flex-1 basis-32 flex-col gap-0.5 [&+[data-slot=item-content]]:max-w-full [&+[data-slot=item-content]]:flex-none', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ItemTitleProps = React.ComponentProps<'div'>;\n\nfunction ItemTitle({ className, children, ...props }: ItemTitleProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-title\"\n\t\t\ttitle={typeof children === 'string' ? children : undefined}\n\t\t\t// Text-only titles clamp to two lines with an ellipsis. `line-clamp` needs\n\t\t\t// `display: -webkit-box`, which would stack inline children such as a Badge, so\n\t\t\t// titles that hold elements stay a flex row (their text still wraps).\n\t\t\tclassName={cn(\n\t\t\t\t'flex w-fit max-w-full items-center gap-1.5 text-[0.8125rem] font-medium text-pretty [overflow-wrap:anywhere] [&:not(:has(>*))]:line-clamp-2',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\ntype ItemDescriptionProps = React.ComponentProps<'p'>;\n\nfunction ItemDescription({ className, children, ...props }: ItemDescriptionProps) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot=\"item-description\"\n\t\t\ttitle={typeof children === 'string' ? children : undefined}\n\t\t\tclassName={cn(\n\t\t\t\t'line-clamp-2 text-pretty text-[0.75rem] leading-5 text-muted-foreground [overflow-wrap:anywhere] [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-link',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</p>\n\t);\n}\n\ntype ItemActionsProps = React.ComponentProps<'div'>;\n\nfunction ItemActions({ className, ...props }: ItemActionsProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-actions\"\n\t\t\tclassName={cn('flex max-w-full flex-wrap items-center justify-end gap-2 ms-auto', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ItemHeaderProps = React.ComponentProps<'div'>;\n\nfunction ItemHeader({ className, ...props }: ItemHeaderProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-header\"\n\t\t\tclassName={cn('flex min-w-0 basis-full items-center justify-between gap-2', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\ntype ItemFooterProps = React.ComponentProps<'div'>;\n\nfunction ItemFooter({ className, ...props }: ItemFooterProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"item-footer\"\n\t\t\tclassName={cn('flex min-w-0 basis-full items-center justify-between gap-2', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tItem,\n\tItemMedia,\n\tItemContent,\n\tItemActions,\n\tItemGroup,\n\tItemSeparator,\n\tItemTitle,\n\tItemDescription,\n\tItemHeader,\n\tItemFooter,\n\titemVariants,\n\titemMediaVariants,\n};\nexport type {\n\tItemProps,\n\tItemMediaProps,\n\tItemContentProps,\n\tItemActionsProps,\n\tItemGroupProps,\n\tItemSeparatorProps,\n\tItemTitleProps,\n\tItemDescriptionProps,\n\tItemHeaderProps,\n\tItemFooterProps,\n};\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAyB;CAC3D,OACC,2CAAC,OAAD;EACC,MAAK;EACL,aAAU;EACV,WAAWA,iBAAG,+CAA+C,SAAS;EACtE,GAAI;C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