@constructive-io/ui 0.12.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.d.cts +2 -2
- package/dist/components/badge.d.ts +2 -2
- 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 +2 -1
- package/dist/components/card.d.ts +2 -1
- 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.d.cts +1 -1
- package/dist/components/stack/index.d.ts +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-BzLmDsId.d.cts → index-B7cT7gZU.d.cts} +3 -3
- package/dist/{index-BzLmDsId.d.ts → index-B7cT7gZU.d.ts} +3 -3
- 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-B0wXxIAb.d.ts → index-CiO-3M_X.d.cts} +334 -18
- package/dist/{index-CyaFaZe2.d.cts → index-z3LqQ5L5.d.ts} +334 -18
- package/dist/index.cjs +107 -17
- package/dist/index.d.cts +64 -14
- package/dist/index.d.ts +64 -14
- 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-Bvh83YGs.d.cts +0 -20
- package/dist/button-Bvh83YGs.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-blur-scroll-container.js","names":[],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for minItemsForBlur check */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount
|
|
1
|
+
{"version":3,"file":"progressive-blur-scroll-container.js","names":[],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for the `minItemsForBlur` check. Leave it out and the threshold is ignored. */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount,\n\tblurProps,\n\tshowBlur = true,\n}: ProgressiveBlurScrollContainerProps) {\n\tconst [hasOverflow, setHasOverflow] = useState(false);\n\tconst [isScrolledFromTop, setIsScrolledFromTop] = useState(false);\n\tconst [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\n\tconst checkScrollPosition = useCallback(() => {\n\t\tif (scrollRef.current) {\n\t\t\tconst el = scrollRef.current;\n\t\t\tconst scrollTop = el.scrollTop;\n\t\t\tconst scrollHeight = el.scrollHeight;\n\t\t\tconst clientHeight = el.clientHeight;\n\n\t\t\t// Show top blur if scrolled more than 10px from top\n\t\t\tsetIsScrolledFromTop(scrollTop > 10);\n\t\t\t// Show bottom blur if not scrolled to bottom (with 10px threshold)\n\t\t\tsetIsScrolledFromBottom(scrollTop + clientHeight < scrollHeight - 10);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst checkOverflow = () => {\n\t\t\tif (scrollRef.current) {\n\t\t\t\tconst el = scrollRef.current;\n\t\t\t\tsetHasOverflow(el.scrollHeight > el.clientHeight);\n\t\t\t\tcheckScrollPosition();\n\t\t\t}\n\t\t};\n\t\tcheckOverflow();\n\t\twindow.addEventListener('resize', checkOverflow);\n\t\treturn () => window.removeEventListener('resize', checkOverflow);\n\t}, [children, checkScrollPosition]);\n\n\t// Listen to scroll events\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (!el) return;\n\n\t\tel.addEventListener('scroll', checkScrollPosition, { passive: true });\n\t\treturn () => el.removeEventListener('scroll', checkScrollPosition);\n\t}, [checkScrollPosition]);\n\n\tconst canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount === undefined || itemCount > minItemsForBlur);\n\n\treturn (\n\t\t<div className={cn('relative min-h-0 flex-1', className)}>\n\t\t\t<div\n\t\t\t\tref={scrollRef}\n\t\t\t\tclassName={cn('absolute inset-0 overflow-y-auto', scrollClassName)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canShowBlur && isScrolledFromTop && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='top'\n\t\t\t\t\theight='48px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.2}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{canShowBlur && isScrolledFromBottom && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='bottom'\n\t\t\t\t\theight='64px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.25}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAgB,+BAA+B,EAC9C,UACA,WACA,iBACA,kBAAkB,GAClB,WACA,WACA,WAAW,QAC4B;CACvC,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;CAChE,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,IAAI;CACrE,MAAM,YAAY,OAAuB,IAAI;CAE7C,MAAM,sBAAsB,kBAAkB;EAC7C,IAAI,UAAU,SAAS;GACtB,MAAM,KAAK,UAAU;GACrB,MAAM,YAAY,GAAG;GACrB,MAAM,eAAe,GAAG;GACxB,MAAM,eAAe,GAAG;GAGxB,qBAAqB,YAAY,EAAE;GAEnC,wBAAwB,YAAY,eAAe,eAAe,EAAE;EACrE;CACD,GAAG,CAAC,CAAC;CAEL,gBAAgB;EACf,MAAM,sBAAsB;GAC3B,IAAI,UAAU,SAAS;IACtB,MAAM,KAAK,UAAU;IACrB,eAAe,GAAG,eAAe,GAAG,YAAY;IAChD,oBAAoB;GACrB;EACD;EACA,cAAc;EACd,OAAO,iBAAiB,UAAU,aAAa;EAC/C,aAAa,OAAO,oBAAoB,UAAU,aAAa;CAChE,GAAG,CAAC,UAAU,mBAAmB,CAAC;CAGlC,gBAAgB;EACf,MAAM,KAAK,UAAU;EACrB,IAAI,CAAC,IAAI;EAET,GAAG,iBAAiB,UAAU,qBAAqB,EAAE,SAAS,KAAK,CAAC;EACpE,aAAa,GAAG,oBAAoB,UAAU,mBAAmB;CAClE,GAAG,CAAC,mBAAmB,CAAC;CAExB,MAAM,cAAc,YAAY,gBAAgB,oBAAoB,KAAK,cAAc,UAAa,YAAY;CAEhH,OACC,qBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,SAAS;YAAvD;GACC,oBAAC,OAAD;IACC,KAAK;IACL,WAAW,GAAG,oCAAoC,eAAe;IAEhE;GACG;GACJ,eAAe,qBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;GAED,eAAe,wBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;EAEE;;AAEP"}
|
|
@@ -12,6 +12,7 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
|
|
|
12
12
|
const isBottom = position === "bottom";
|
|
13
13
|
const isTop = position === "top";
|
|
14
14
|
const clampedIntensity = Math.max(0, Math.min(1, intensity));
|
|
15
|
+
const radius = Math.max(0, blurPx);
|
|
15
16
|
const surfaceVar = surface === "card" ? "--card" : surface === "sidebar" ? "--sidebar" : "--background";
|
|
16
17
|
const mask = isBottom ? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : isTop ? "linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : "linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)";
|
|
17
18
|
const overlayMask = isBottom ? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : isTop ? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;
|
|
@@ -25,8 +26,8 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
|
|
|
25
26
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
26
27
|
className: "absolute inset-0",
|
|
27
28
|
style: {
|
|
28
|
-
backdropFilter: `blur(${
|
|
29
|
-
WebkitBackdropFilter: `blur(${
|
|
29
|
+
backdropFilter: `blur(${radius}px)`,
|
|
30
|
+
WebkitBackdropFilter: `blur(${radius}px)`,
|
|
30
31
|
maskImage: mask,
|
|
31
32
|
WebkitMaskImage: mask
|
|
32
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-blur.cjs","names":["cn"],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${
|
|
1
|
+
{"version":3,"file":"progressive-blur.cjs","names":["cn"],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\t// A negative radius is invalid CSS and would silently turn the blur off.\n\tconst radius = Math.max(0, blurPx);\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAE3D,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM;CACjC,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,4CAAC,OAAD;EACC,WAAWA,iBACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,2CAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,2CAAC,OAAD;GACC,WAAWA,iBAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
|
|
@@ -9,6 +9,7 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
|
|
|
9
9
|
const isBottom = position === "bottom";
|
|
10
10
|
const isTop = position === "top";
|
|
11
11
|
const clampedIntensity = Math.max(0, Math.min(1, intensity));
|
|
12
|
+
const radius = Math.max(0, blurPx);
|
|
12
13
|
const surfaceVar = surface === "card" ? "--card" : surface === "sidebar" ? "--sidebar" : "--background";
|
|
13
14
|
const mask = isBottom ? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : isTop ? "linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : "linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)";
|
|
14
15
|
const overlayMask = isBottom ? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : isTop ? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;
|
|
@@ -22,8 +23,8 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
|
|
|
22
23
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23
24
|
className: "absolute inset-0",
|
|
24
25
|
style: {
|
|
25
|
-
backdropFilter: `blur(${
|
|
26
|
-
WebkitBackdropFilter: `blur(${
|
|
26
|
+
backdropFilter: `blur(${radius}px)`,
|
|
27
|
+
WebkitBackdropFilter: `blur(${radius}px)`,
|
|
27
28
|
maskImage: mask,
|
|
28
29
|
WebkitMaskImage: mask
|
|
29
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-blur.js","names":[],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${
|
|
1
|
+
{"version":3,"file":"progressive-blur.js","names":[],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\t// A negative radius is invalid CSS and would silently turn the blur off.\n\tconst radius = Math.max(0, blurPx);\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAE3D,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM;CACjC,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,qBAAC,OAAD;EACC,WAAW,GACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,oBAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,oBAAC,OAAD;GACC,WAAW,GAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
|
|
@@ -16,7 +16,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
16
16
|
}
|
|
17
17
|
function Radio({ className, ...props }) {
|
|
18
18
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_radio.Radio.Root, {
|
|
19
|
-
className: require_utils.cn("relative inline-flex size-
|
|
19
|
+
className: require_utils.cn("relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[''] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
|
|
20
20
|
"data-slot": "radio",
|
|
21
21
|
...props,
|
|
22
22
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -25,7 +25,7 @@ function Radio({ className, ...props }) {
|
|
|
25
25
|
"data-slot": "radio-control"
|
|
26
26
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_radio.Radio.Indicator, {
|
|
27
27
|
keepMounted: true,
|
|
28
|
-
className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-
|
|
28
|
+
className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
|
|
29
29
|
"data-slot": "radio-indicator"
|
|
30
30
|
})]
|
|
31
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.cjs","names":["RadioGroupPrimitive","cn","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-
|
|
1
|
+
{"version":3,"file":"radio-group.cjs","names":["RadioGroupPrimitive","cn","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[\\'\\'] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,2CAACA,uCAAD;EAAqB,WAAWC,iBAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,4CAACC,2BAAe,MAAhB;EACC,WAAWD,iBACV,wwBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,2CAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,2CAACC,2BAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
|
|
@@ -15,7 +15,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
15
15
|
}
|
|
16
16
|
function Radio({ className, ...props }) {
|
|
17
17
|
return /* @__PURE__ */ jsxs(Radio$1.Root, {
|
|
18
|
-
className: cn("relative inline-flex size-
|
|
18
|
+
className: cn("relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[''] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
|
|
19
19
|
"data-slot": "radio",
|
|
20
20
|
...props,
|
|
21
21
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -24,7 +24,7 @@ function Radio({ className, ...props }) {
|
|
|
24
24
|
"data-slot": "radio-control"
|
|
25
25
|
}), /* @__PURE__ */ jsx(Radio$1.Indicator, {
|
|
26
26
|
keepMounted: true,
|
|
27
|
-
className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-
|
|
27
|
+
className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
|
|
28
28
|
"data-slot": "radio-indicator"
|
|
29
29
|
})]
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[\\'\\'] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,oBAACA,cAAD;EAAqB,WAAW,GAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,qBAACC,QAAe,MAAhB;EACC,WAAW,GACV,wwBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,oBAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,oBAACA,QAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
require('./checkbox.cjs');
|
|
5
5
|
require('./input-group.cjs');
|
|
6
|
-
const require_record_picker = require('../record-picker-
|
|
6
|
+
const require_record_picker = require('../record-picker-BQ1-Vx0g.cjs');
|
|
7
7
|
|
|
8
8
|
exports.RecordPicker = require_record_picker.RecordPicker;
|
|
@@ -28,10 +28,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
28
28
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.PanelResizeHandle, {
|
|
29
29
|
"data-slot": "resizable-handle",
|
|
30
30
|
className: require_utils.cn(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0
|
|
31
|
-
after:left-1/2 after:w-
|
|
31
|
+
after:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50
|
|
32
32
|
focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px
|
|
33
33
|
data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0
|
|
34
|
-
data-[panel-group-direction=vertical]:after:h-
|
|
34
|
+
data-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full
|
|
35
35
|
data-[panel-group-direction=vertical]:after:translate-x-0
|
|
36
36
|
data-[panel-group-direction=vertical]:after:-translate-y-1/2
|
|
37
37
|
[&[data-panel-group-direction=vertical]>div]:rotate-90`, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-
|
|
1
|
+
{"version":3,"file":"resizable.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,2CAACA,uBAAmB,YAApB;EACC,aAAU;EACV,WAAWC,iBAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,2CAACD,uBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,2CAACA,uBAAmB,mBAApB;EACC,aAAU;EACV,WAAWC,iBACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,2CAAC,OAAD;GAAK,WAAU;aACd,2CAACC,+BAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
|
|
@@ -24,10 +24,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
24
24
|
return /* @__PURE__ */ jsx(ResizablePrimitive.PanelResizeHandle, {
|
|
25
25
|
"data-slot": "resizable-handle",
|
|
26
26
|
className: cn(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0
|
|
27
|
-
after:left-1/2 after:w-
|
|
27
|
+
after:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50
|
|
28
28
|
focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px
|
|
29
29
|
data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0
|
|
30
|
-
data-[panel-group-direction=vertical]:after:h-
|
|
30
|
+
data-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full
|
|
31
31
|
data-[panel-group-direction=vertical]:after:translate-x-0
|
|
32
32
|
data-[panel-group-direction=vertical]:after:-translate-y-1/2
|
|
33
33
|
[&[data-panel-group-direction=vertical]>div]:rotate-90`, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-
|
|
1
|
+
{"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,oBAAC,mBAAmB,YAApB;EACC,aAAU;EACV,WAAW,GAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,oBAAC,mBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,oBAAC,mBAAmB,mBAApB;EACC,aAAU;EACV,WAAW,GACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,oBAAC,OAAD;GAAK,WAAU;aACd,oBAAC,kBAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
|
|
@@ -6,22 +6,34 @@ let react = require("react");
|
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
|
|
8
8
|
//#region src/components/responsive-diagram.tsx
|
|
9
|
-
function ResponsiveDiagram({ children, targetRatio = .95, className }) {
|
|
9
|
+
function ResponsiveDiagram({ children, targetRatio = .95, minZoom = .6, className }) {
|
|
10
10
|
const containerRef = (0, react.useRef)(null);
|
|
11
11
|
const contentRef = (0, react.useRef)(null);
|
|
12
|
-
const [
|
|
12
|
+
const [fit, setFit] = (0, react.useState)({
|
|
13
|
+
zoom: 1,
|
|
14
|
+
width: 0,
|
|
15
|
+
height: 0,
|
|
16
|
+
scrollable: false
|
|
17
|
+
});
|
|
13
18
|
const calculateZoom = (0, react.useCallback)(() => {
|
|
14
|
-
|
|
15
|
-
contentRef.current
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const container = containerRef.current;
|
|
20
|
+
const content = contentRef.current;
|
|
21
|
+
if (!container || !content) return;
|
|
22
|
+
const { offsetWidth: width, offsetHeight: height } = content;
|
|
23
|
+
const style = getComputedStyle(container);
|
|
24
|
+
const room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
|
|
25
|
+
const natural = width > 0 && width > room * targetRatio ? room * targetRatio / width : 1;
|
|
26
|
+
const zoom = Math.min(1, Math.max(minZoom, natural));
|
|
27
|
+
setFit((current) => {
|
|
28
|
+
const scrollable = Math.ceil(width * zoom) > room;
|
|
29
|
+
return current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable ? current : {
|
|
30
|
+
zoom,
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
scrollable
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}, [targetRatio, minZoom]);
|
|
25
37
|
(0, react.useLayoutEffect)(() => {
|
|
26
38
|
const rafId = requestAnimationFrame(() => {
|
|
27
39
|
calculateZoom();
|
|
@@ -29,24 +41,34 @@ function ResponsiveDiagram({ children, targetRatio = .95, className }) {
|
|
|
29
41
|
return () => cancelAnimationFrame(rafId);
|
|
30
42
|
}, [calculateZoom, children]);
|
|
31
43
|
(0, react.useEffect)(() => {
|
|
44
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
32
45
|
const resizeObserver = new ResizeObserver(() => {
|
|
33
46
|
calculateZoom();
|
|
34
47
|
});
|
|
35
48
|
if (containerRef.current) resizeObserver.observe(containerRef.current);
|
|
49
|
+
if (contentRef.current) resizeObserver.observe(contentRef.current);
|
|
36
50
|
return () => resizeObserver.disconnect();
|
|
37
51
|
}, [calculateZoom]);
|
|
38
52
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
39
53
|
ref: containerRef,
|
|
40
|
-
|
|
54
|
+
tabIndex: fit.scrollable ? 0 : void 0,
|
|
55
|
+
className: require_utils.cn(`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6
|
|
41
56
|
dark:bg-neutral-900/50`, className),
|
|
42
57
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
className: "m-auto shrink-0",
|
|
59
|
+
style: fit.width > 0 ? {
|
|
60
|
+
width: fit.width * fit.zoom,
|
|
61
|
+
height: fit.height * fit.zoom
|
|
62
|
+
} : void 0,
|
|
63
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
64
|
+
ref: contentRef,
|
|
65
|
+
className: "flex w-max items-center justify-center",
|
|
66
|
+
style: {
|
|
67
|
+
transform: `scale(${fit.zoom})`,
|
|
68
|
+
transformOrigin: "top left"
|
|
69
|
+
},
|
|
70
|
+
children
|
|
71
|
+
})
|
|
50
72
|
})
|
|
51
73
|
});
|
|
52
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-diagram.cjs","names":["cn"],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\ttargetRatio?: number;\n\tclassName?: string;\n}\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [
|
|
1
|
+
{"version":3,"file":"responsive-diagram.cjs","names":["cn"],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\t/** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */\n\ttargetRatio?: number;\n\t/**\n\t * Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways\n\t * instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).\n\t */\n\tminZoom?: number;\n\tclassName?: string;\n}\n\ntype Fit = { zoom: number; width: number; height: number; scrollable: boolean };\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, minZoom = 0.6, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [fit, setFit] = useState<Fit>({ zoom: 1, width: 0, height: 0, scrollable: false });\n\n\tconst calculateZoom = useCallback(() => {\n\t\tconst container = containerRef.current;\n\t\tconst content = contentRef.current;\n\t\tif (!container || !content) return;\n\n\t\t// `offsetWidth` and `offsetHeight` are the diagram's natural size: transforms do not change them.\n\t\tconst { offsetWidth: width, offsetHeight: height } = content;\n\t\tconst style = getComputedStyle(container);\n\t\tconst room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);\n\t\tconst natural = width > 0 && width > room * targetRatio ? (room * targetRatio) / width : 1;\n\t\tconst zoom = Math.min(1, Math.max(minZoom, natural));\n\n\t\tsetFit((current) => {\n\t\t\tconst scrollable = Math.ceil(width * zoom) > room;\n\t\t\treturn current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable\n\t\t\t\t? current\n\t\t\t\t: { zoom, width, height, scrollable };\n\t\t});\n\t}, [targetRatio, minZoom]);\n\n\tuseLayoutEffect(() => {\n\t\t// Defer measurement to next frame to avoid blocking animations\n\t\t// This prevents layout thrashing during Stack card enter/exit\n\t\tconst rafId = requestAnimationFrame(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, [calculateZoom, children]);\n\n\tuseEffect(() => {\n\t\t// ResizeObserver is absent in jsdom and some embedded webviews.\n\t\tif (typeof ResizeObserver === 'undefined') return;\n\t\tconst resizeObserver = new ResizeObserver(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\n\t\tif (containerRef.current) resizeObserver.observe(containerRef.current);\n\t\tif (contentRef.current) resizeObserver.observe(contentRef.current);\n\n\t\treturn () => resizeObserver.disconnect();\n\t}, [calculateZoom]);\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\t// A scroller must be reachable without a pointer.\n\t\t\ttabIndex={fit.scrollable ? 0 : undefined}\n\t\t\tclassName={cn(\n\t\t\t\t`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6\n\t\t\t\tdark:bg-neutral-900/50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* `transform` leaves the unscaled size behind, so this box takes the scaled size: the container then\n\t\t\t gets the right height, and scrolls (rather than clips) when the diagram stops at `minZoom`. */}\n\t\t\t<div\n\t\t\t\tclassName=\"m-auto shrink-0\"\n\t\t\t\tstyle={fit.width > 0 ? { width: fit.width * fit.zoom, height: fit.height * fit.zoom } : undefined}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={contentRef}\n\t\t\t\t\tclassName=\"flex w-max items-center justify-center\"\n\t\t\t\t\tstyle={{ transform: `scale(${fit.zoom})`, transformOrigin: 'top left' }}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAoBA,SAAgB,kBAAkB,EAAE,UAAU,cAAc,KAAM,UAAU,IAAK,aAAqC;CACrH,MAAM,iCAAsC,IAAI;CAChD,MAAM,+BAAoC,IAAI;CAC9C,MAAM,CAAC,KAAK,8BAAwB;EAAE,MAAM;EAAG,OAAO;EAAG,QAAQ;EAAG,YAAY;CAAM,CAAC;CAEvF,MAAM,6CAAkC;EACvC,MAAM,YAAY,aAAa;EAC/B,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,aAAa,CAAC,SAAS;EAG5B,MAAM,EAAE,aAAa,OAAO,cAAc,WAAW;EACrD,MAAM,QAAQ,iBAAiB,SAAS;EACxC,MAAM,OAAO,UAAU,eAAe,WAAW,MAAM,WAAW,KAAK,MAAM,WAAW,MAAM,YAAY,KAAK;EAC/G,MAAM,UAAU,QAAQ,KAAK,QAAQ,OAAO,cAAe,OAAO,cAAe,QAAQ;EACzF,MAAM,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,OAAO,CAAC;EAEnD,QAAQ,YAAY;GACnB,MAAM,aAAa,KAAK,KAAK,QAAQ,IAAI,IAAI;GAC7C,OAAO,QAAQ,SAAS,QAAQ,QAAQ,UAAU,SAAS,QAAQ,WAAW,UAAU,QAAQ,eAAe,aAC5G,UACA;IAAE;IAAM;IAAO;IAAQ;GAAW;EACtC,CAAC;CACF,GAAG,CAAC,aAAa,OAAO,CAAC;CAEzB,iCAAsB;EAGrB,MAAM,QAAQ,4BAA4B;GACzC,cAAc;EACf,CAAC;EACD,aAAa,qBAAqB,KAAK;CACxC,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,2BAAgB;EAEf,IAAI,OAAO,mBAAmB,aAAa;EAC3C,MAAM,iBAAiB,IAAI,qBAAqB;GAC/C,cAAc;EACf,CAAC;EAED,IAAI,aAAa,SAAS,eAAe,QAAQ,aAAa,OAAO;EACrE,IAAI,WAAW,SAAS,eAAe,QAAQ,WAAW,OAAO;EAEjE,aAAa,eAAe,WAAW;CACxC,GAAG,CAAC,aAAa,CAAC;CAElB,OACC,2CAAC,OAAD;EACC,KAAK;EAEL,UAAU,IAAI,aAAa,IAAI;EAC/B,WAAWA,iBACV;6BAEA,SACD;YAIA,2CAAC,OAAD;GACC,WAAU;GACV,OAAO,IAAI,QAAQ,IAAI;IAAE,OAAO,IAAI,QAAQ,IAAI;IAAM,QAAQ,IAAI,SAAS,IAAI;GAAK,IAAI;aAExF,2CAAC,OAAD;IACC,KAAK;IACL,WAAU;IACV,OAAO;KAAE,WAAW,SAAS,IAAI,KAAK;KAAI,iBAAiB;IAAW;IAErE;GACG;EACD;CACD;AAEP"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
//#region src/components/responsive-diagram.d.ts
|
|
2
2
|
interface ResponsiveDiagramProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
/** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */
|
|
4
5
|
targetRatio?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways
|
|
8
|
+
* instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).
|
|
9
|
+
*/
|
|
10
|
+
minZoom?: number;
|
|
5
11
|
className?: string;
|
|
6
12
|
}
|
|
7
|
-
declare function ResponsiveDiagram({ children, targetRatio, className }: ResponsiveDiagramProps): import("react").JSX.Element;
|
|
13
|
+
declare function ResponsiveDiagram({ children, targetRatio, minZoom, className }: ResponsiveDiagramProps): import("react").JSX.Element;
|
|
8
14
|
//#endregion
|
|
9
15
|
export { ResponsiveDiagram };
|
|
10
16
|
//# sourceMappingURL=responsive-diagram.d.cts.map
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
//#region src/components/responsive-diagram.d.ts
|
|
2
2
|
interface ResponsiveDiagramProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
/** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */
|
|
4
5
|
targetRatio?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways
|
|
8
|
+
* instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).
|
|
9
|
+
*/
|
|
10
|
+
minZoom?: number;
|
|
5
11
|
className?: string;
|
|
6
12
|
}
|
|
7
|
-
declare function ResponsiveDiagram({ children, targetRatio, className }: ResponsiveDiagramProps): import("react").JSX.Element;
|
|
13
|
+
declare function ResponsiveDiagram({ children, targetRatio, minZoom, className }: ResponsiveDiagramProps): import("react").JSX.Element;
|
|
8
14
|
//#endregion
|
|
9
15
|
export { ResponsiveDiagram };
|
|
10
16
|
//# sourceMappingURL=responsive-diagram.d.ts.map
|
|
@@ -5,22 +5,34 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/responsive-diagram.tsx
|
|
8
|
-
function ResponsiveDiagram({ children, targetRatio = .95, className }) {
|
|
8
|
+
function ResponsiveDiagram({ children, targetRatio = .95, minZoom = .6, className }) {
|
|
9
9
|
const containerRef = useRef(null);
|
|
10
10
|
const contentRef = useRef(null);
|
|
11
|
-
const [
|
|
11
|
+
const [fit, setFit] = useState({
|
|
12
|
+
zoom: 1,
|
|
13
|
+
width: 0,
|
|
14
|
+
height: 0,
|
|
15
|
+
scrollable: false
|
|
16
|
+
});
|
|
12
17
|
const calculateZoom = useCallback(() => {
|
|
13
|
-
|
|
14
|
-
contentRef.current
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const container = containerRef.current;
|
|
19
|
+
const content = contentRef.current;
|
|
20
|
+
if (!container || !content) return;
|
|
21
|
+
const { offsetWidth: width, offsetHeight: height } = content;
|
|
22
|
+
const style = getComputedStyle(container);
|
|
23
|
+
const room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
|
|
24
|
+
const natural = width > 0 && width > room * targetRatio ? room * targetRatio / width : 1;
|
|
25
|
+
const zoom = Math.min(1, Math.max(minZoom, natural));
|
|
26
|
+
setFit((current) => {
|
|
27
|
+
const scrollable = Math.ceil(width * zoom) > room;
|
|
28
|
+
return current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable ? current : {
|
|
29
|
+
zoom,
|
|
30
|
+
width,
|
|
31
|
+
height,
|
|
32
|
+
scrollable
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
}, [targetRatio, minZoom]);
|
|
24
36
|
useLayoutEffect(() => {
|
|
25
37
|
const rafId = requestAnimationFrame(() => {
|
|
26
38
|
calculateZoom();
|
|
@@ -28,24 +40,34 @@ function ResponsiveDiagram({ children, targetRatio = .95, className }) {
|
|
|
28
40
|
return () => cancelAnimationFrame(rafId);
|
|
29
41
|
}, [calculateZoom, children]);
|
|
30
42
|
useEffect(() => {
|
|
43
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
31
44
|
const resizeObserver = new ResizeObserver(() => {
|
|
32
45
|
calculateZoom();
|
|
33
46
|
});
|
|
34
47
|
if (containerRef.current) resizeObserver.observe(containerRef.current);
|
|
48
|
+
if (contentRef.current) resizeObserver.observe(contentRef.current);
|
|
35
49
|
return () => resizeObserver.disconnect();
|
|
36
50
|
}, [calculateZoom]);
|
|
37
51
|
return /* @__PURE__ */ jsx("div", {
|
|
38
52
|
ref: containerRef,
|
|
39
|
-
|
|
53
|
+
tabIndex: fit.scrollable ? 0 : void 0,
|
|
54
|
+
className: cn(`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6
|
|
40
55
|
dark:bg-neutral-900/50`, className),
|
|
41
56
|
children: /* @__PURE__ */ jsx("div", {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
className: "m-auto shrink-0",
|
|
58
|
+
style: fit.width > 0 ? {
|
|
59
|
+
width: fit.width * fit.zoom,
|
|
60
|
+
height: fit.height * fit.zoom
|
|
61
|
+
} : void 0,
|
|
62
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
63
|
+
ref: contentRef,
|
|
64
|
+
className: "flex w-max items-center justify-center",
|
|
65
|
+
style: {
|
|
66
|
+
transform: `scale(${fit.zoom})`,
|
|
67
|
+
transformOrigin: "top left"
|
|
68
|
+
},
|
|
69
|
+
children
|
|
70
|
+
})
|
|
49
71
|
})
|
|
50
72
|
});
|
|
51
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-diagram.js","names":[],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\ttargetRatio?: number;\n\tclassName?: string;\n}\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [
|
|
1
|
+
{"version":3,"file":"responsive-diagram.js","names":[],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\t/** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */\n\ttargetRatio?: number;\n\t/**\n\t * Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways\n\t * instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).\n\t */\n\tminZoom?: number;\n\tclassName?: string;\n}\n\ntype Fit = { zoom: number; width: number; height: number; scrollable: boolean };\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, minZoom = 0.6, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [fit, setFit] = useState<Fit>({ zoom: 1, width: 0, height: 0, scrollable: false });\n\n\tconst calculateZoom = useCallback(() => {\n\t\tconst container = containerRef.current;\n\t\tconst content = contentRef.current;\n\t\tif (!container || !content) return;\n\n\t\t// `offsetWidth` and `offsetHeight` are the diagram's natural size: transforms do not change them.\n\t\tconst { offsetWidth: width, offsetHeight: height } = content;\n\t\tconst style = getComputedStyle(container);\n\t\tconst room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);\n\t\tconst natural = width > 0 && width > room * targetRatio ? (room * targetRatio) / width : 1;\n\t\tconst zoom = Math.min(1, Math.max(minZoom, natural));\n\n\t\tsetFit((current) => {\n\t\t\tconst scrollable = Math.ceil(width * zoom) > room;\n\t\t\treturn current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable\n\t\t\t\t? current\n\t\t\t\t: { zoom, width, height, scrollable };\n\t\t});\n\t}, [targetRatio, minZoom]);\n\n\tuseLayoutEffect(() => {\n\t\t// Defer measurement to next frame to avoid blocking animations\n\t\t// This prevents layout thrashing during Stack card enter/exit\n\t\tconst rafId = requestAnimationFrame(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, [calculateZoom, children]);\n\n\tuseEffect(() => {\n\t\t// ResizeObserver is absent in jsdom and some embedded webviews.\n\t\tif (typeof ResizeObserver === 'undefined') return;\n\t\tconst resizeObserver = new ResizeObserver(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\n\t\tif (containerRef.current) resizeObserver.observe(containerRef.current);\n\t\tif (contentRef.current) resizeObserver.observe(contentRef.current);\n\n\t\treturn () => resizeObserver.disconnect();\n\t}, [calculateZoom]);\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\t// A scroller must be reachable without a pointer.\n\t\t\ttabIndex={fit.scrollable ? 0 : undefined}\n\t\t\tclassName={cn(\n\t\t\t\t`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6\n\t\t\t\tdark:bg-neutral-900/50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* `transform` leaves the unscaled size behind, so this box takes the scaled size: the container then\n\t\t\t gets the right height, and scrolls (rather than clips) when the diagram stops at `minZoom`. */}\n\t\t\t<div\n\t\t\t\tclassName=\"m-auto shrink-0\"\n\t\t\t\tstyle={fit.width > 0 ? { width: fit.width * fit.zoom, height: fit.height * fit.zoom } : undefined}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={contentRef}\n\t\t\t\t\tclassName=\"flex w-max items-center justify-center\"\n\t\t\t\t\tstyle={{ transform: `scale(${fit.zoom})`, transformOrigin: 'top left' }}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAoBA,SAAgB,kBAAkB,EAAE,UAAU,cAAc,KAAM,UAAU,IAAK,aAAqC;CACrH,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,CAAC,KAAK,UAAU,SAAc;EAAE,MAAM;EAAG,OAAO;EAAG,QAAQ;EAAG,YAAY;CAAM,CAAC;CAEvF,MAAM,gBAAgB,kBAAkB;EACvC,MAAM,YAAY,aAAa;EAC/B,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,aAAa,CAAC,SAAS;EAG5B,MAAM,EAAE,aAAa,OAAO,cAAc,WAAW;EACrD,MAAM,QAAQ,iBAAiB,SAAS;EACxC,MAAM,OAAO,UAAU,eAAe,WAAW,MAAM,WAAW,KAAK,MAAM,WAAW,MAAM,YAAY,KAAK;EAC/G,MAAM,UAAU,QAAQ,KAAK,QAAQ,OAAO,cAAe,OAAO,cAAe,QAAQ;EACzF,MAAM,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,OAAO,CAAC;EAEnD,QAAQ,YAAY;GACnB,MAAM,aAAa,KAAK,KAAK,QAAQ,IAAI,IAAI;GAC7C,OAAO,QAAQ,SAAS,QAAQ,QAAQ,UAAU,SAAS,QAAQ,WAAW,UAAU,QAAQ,eAAe,aAC5G,UACA;IAAE;IAAM;IAAO;IAAQ;GAAW;EACtC,CAAC;CACF,GAAG,CAAC,aAAa,OAAO,CAAC;CAEzB,sBAAsB;EAGrB,MAAM,QAAQ,4BAA4B;GACzC,cAAc;EACf,CAAC;EACD,aAAa,qBAAqB,KAAK;CACxC,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,gBAAgB;EAEf,IAAI,OAAO,mBAAmB,aAAa;EAC3C,MAAM,iBAAiB,IAAI,qBAAqB;GAC/C,cAAc;EACf,CAAC;EAED,IAAI,aAAa,SAAS,eAAe,QAAQ,aAAa,OAAO;EACrE,IAAI,WAAW,SAAS,eAAe,QAAQ,WAAW,OAAO;EAEjE,aAAa,eAAe,WAAW;CACxC,GAAG,CAAC,aAAa,CAAC;CAElB,OACC,oBAAC,OAAD;EACC,KAAK;EAEL,UAAU,IAAI,aAAa,IAAI;EAC/B,WAAW,GACV;6BAEA,SACD;YAIA,oBAAC,OAAD;GACC,WAAU;GACV,OAAO,IAAI,QAAQ,IAAI;IAAE,OAAO,IAAI,QAAQ,IAAI;IAAM,QAAQ,IAAI,SAAS,IAAI;GAAK,IAAI;aAExF,oBAAC,OAAD;IACC,KAAK;IACL,WAAU;IACV,OAAO;KAAE,WAAW,SAAS,IAAI,KAAK;KAAI,iBAAiB;IAAW;IAErE;GACG;EACD;CACD;AAEP"}
|
|
@@ -16,7 +16,7 @@ const ScrollArea = react.forwardRef(({ className, children, scrollFade = false,
|
|
|
16
16
|
...props,
|
|
17
17
|
children: [
|
|
18
18
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_scroll_area.ScrollArea.Viewport, {
|
|
19
|
-
className: require_utils.cn("h-full overscroll-contain rounded-[inherit] outline-none transition-
|
|
19
|
+
className: require_utils.cn("h-full max-h-[inherit] overscroll-contain rounded-[inherit] outline-none transition-shadow focus-visible:ring-[3px] focus-visible:ring-ring/50", scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]", scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"),
|
|
20
20
|
"data-slot": "scroll-area-viewport",
|
|
21
21
|
children
|
|
22
22
|
}),
|
|
@@ -29,7 +29,7 @@ const ScrollArea = react.forwardRef(({ className, children, scrollFade = false,
|
|
|
29
29
|
ScrollArea.displayName = "ScrollArea";
|
|
30
30
|
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
31
31
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_scroll_area.ScrollArea.Scrollbar, {
|
|
32
|
-
className: require_utils.cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-
|
|
32
|
+
className: require_utils.cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-(--duration-fast) data-scrolling:duration-(--duration-fast)", className),
|
|
33
33
|
"data-slot": "scroll-area-scrollbar",
|
|
34
34
|
orientation,
|
|
35
35
|
...props,
|