@zyncat/ui 0.21.0 → 0.22.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/dist/alert.js +10 -9
- package/dist/alert.js.map +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/badge.js +5 -100
- package/dist/badge.js.map +1 -1
- package/dist/button.css +24 -27
- package/dist/button.js +3 -3
- package/dist/checkbox.css +0 -1
- package/dist/chunk-2EPNCOLN.js +177 -0
- package/dist/chunk-2EPNCOLN.js.map +1 -0
- package/dist/{chunk-3HE7N3UK.js → chunk-2GYZ3HP3.js} +3 -3
- package/dist/chunk-2GYZ3HP3.js.map +1 -0
- package/dist/{chunk-ODRO3KS6.js → chunk-7GTACTZD.js} +8 -6
- package/dist/chunk-7GTACTZD.js.map +1 -0
- package/dist/{chunk-BWGK3OD6.js → chunk-AK2AXGEC.js} +33 -6
- package/dist/chunk-AK2AXGEC.js.map +1 -0
- package/dist/{chunk-5VC3TUZ2.js → chunk-BA4ALXQW.js} +2 -2
- package/dist/{chunk-5VC3TUZ2.js.map → chunk-BA4ALXQW.js.map} +1 -1
- package/dist/{chunk-AXZBD7LY.js → chunk-CF6ZFXRV.js} +16 -11
- package/dist/chunk-CF6ZFXRV.js.map +1 -0
- package/dist/{chunk-AQMR7ZYO.js → chunk-DOAR4PJ3.js} +4 -4
- package/dist/{chunk-AQMR7ZYO.js.map → chunk-DOAR4PJ3.js.map} +1 -1
- package/dist/chunk-EUAXI6OF.js +16 -0
- package/dist/chunk-EUAXI6OF.js.map +1 -0
- package/dist/{chunk-AOEO2LCZ.js → chunk-G2TOUG2A.js} +6 -5
- package/dist/chunk-G2TOUG2A.js.map +1 -0
- package/dist/{chunk-CYZKPUCG.js → chunk-HRP4UFWN.js} +3 -3
- package/dist/chunk-HRP4UFWN.js.map +1 -0
- package/dist/chunk-INK2GJTA.js +102 -0
- package/dist/chunk-INK2GJTA.js.map +1 -0
- package/dist/{chunk-GM7IPTTT.js → chunk-JJHEVW4M.js} +5 -5
- package/dist/{chunk-GM7IPTTT.js.map → chunk-JJHEVW4M.js.map} +1 -1
- package/dist/{chunk-7NHY2CRA.js → chunk-JUC35N3C.js} +2 -2
- package/dist/chunk-JUC35N3C.js.map +1 -0
- package/dist/{chunk-LC6NQQER.js → chunk-LFJ4C7ZP.js} +7 -7
- package/dist/chunk-LFJ4C7ZP.js.map +1 -0
- package/dist/{chunk-JQZ3FTHP.js → chunk-MCOIR3CK.js} +3 -3
- package/dist/{chunk-JQZ3FTHP.js.map → chunk-MCOIR3CK.js.map} +1 -1
- package/dist/{chunk-TXJQUN7C.js → chunk-NATK4DDW.js} +15 -15
- package/dist/{chunk-TXJQUN7C.js.map → chunk-NATK4DDW.js.map} +1 -1
- package/dist/{chunk-BIDVNLJO.js → chunk-O3RMSMBP.js} +8 -3
- package/dist/{chunk-BIDVNLJO.js.map → chunk-O3RMSMBP.js.map} +1 -1
- package/dist/{chunk-47OMFFIB.js → chunk-ODO2TCTS.js} +27 -13
- package/dist/chunk-ODO2TCTS.js.map +1 -0
- package/dist/{chunk-LV442ZOR.js → chunk-P3QSWNED.js} +11 -11
- package/dist/{chunk-LV442ZOR.js.map → chunk-P3QSWNED.js.map} +1 -1
- package/dist/{chunk-QDAN43B6.js → chunk-Q4K337QY.js} +6 -6
- package/dist/chunk-Q4K337QY.js.map +1 -0
- package/dist/{chunk-ZSP4ZTII.js → chunk-RLRZJAF7.js} +20 -8
- package/dist/chunk-RLRZJAF7.js.map +1 -0
- package/dist/{chunk-V4ZN5RD4.js → chunk-SY5UA6WS.js} +29 -9
- package/dist/chunk-SY5UA6WS.js.map +1 -0
- package/dist/{chunk-SPFHWHJ6.js → chunk-TFC5SCAB.js} +32 -13
- package/dist/chunk-TFC5SCAB.js.map +1 -0
- package/dist/{chunk-HBWRKEW4.js → chunk-VBALIMST.js} +3 -3
- package/dist/{chunk-HBWRKEW4.js.map → chunk-VBALIMST.js.map} +1 -1
- package/dist/{chunk-2W7FOMWE.js → chunk-VXQ7A6ZI.js} +8 -8
- package/dist/{chunk-2W7FOMWE.js.map → chunk-VXQ7A6ZI.js.map} +1 -1
- package/dist/{chunk-TBLPZQSI.js → chunk-W7CHDHRV.js} +114 -42
- package/dist/chunk-W7CHDHRV.js.map +1 -0
- package/dist/{chunk-DEZIQTBW.js → chunk-WBWVOOKM.js} +58 -53
- package/dist/chunk-WBWVOOKM.js.map +1 -0
- package/dist/{chunk-6H3IJ752.js → chunk-WJEZWKEY.js} +20 -10
- package/dist/chunk-WJEZWKEY.js.map +1 -0
- package/dist/{chunk-TBIY5YR5.js → chunk-WMTOAYGP.js} +9 -9
- package/dist/{chunk-TBIY5YR5.js.map → chunk-WMTOAYGP.js.map} +1 -1
- package/dist/{chunk-C3D32LE3.js → chunk-WTHIUPVJ.js} +3 -3
- package/dist/{chunk-C3D32LE3.js.map → chunk-WTHIUPVJ.js.map} +1 -1
- package/dist/{chunk-PNFFK5HY.js → chunk-XCTMTOGT.js} +5 -5
- package/dist/{chunk-PNFFK5HY.js.map → chunk-XCTMTOGT.js.map} +1 -1
- package/dist/chunk-XMJ343KF.js +18 -0
- package/dist/chunk-XMJ343KF.js.map +1 -0
- package/dist/collapse.js +1 -1
- package/dist/combobox.css +7 -0
- package/dist/combobox.js +183 -0
- package/dist/combobox.js.map +1 -0
- package/dist/confetti.js +2 -2
- package/dist/{crossfade-XFZLFLT7.js → crossfade-UHUQBUVG.js} +53 -11
- package/dist/crossfade-UHUQBUVG.js.map +1 -0
- package/dist/date-field.js +23 -20
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +25 -40
- package/dist/date-range-field.js +458 -276
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +24 -21
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog-sheet.css +31 -0
- package/dist/dialog.css +3 -0
- package/dist/dialog.js +42 -40
- package/dist/dialog.js.map +1 -1
- package/dist/dropdown.css +2 -2
- package/dist/dropdown.js +56 -31
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +20 -19
- package/dist/emoji-picker.js.map +1 -1
- package/dist/flow-field.js +2 -2
- package/dist/glide.js +3 -3
- package/dist/input.css +54 -34
- package/dist/instagram-feed.js +3 -3
- package/dist/lens.js +184 -160
- package/dist/lens.js.map +1 -1
- package/dist/mcp.js +29 -22
- package/dist/modal.js +10 -9
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.js +2 -2
- package/dist/motion-devtools.css +6 -5
- package/dist/motion-devtools.js +6 -6
- package/dist/motion-tokens.js +1 -1
- package/dist/motion.js +6 -5
- package/dist/multi-select.js +41 -20
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +121 -74
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +12 -7
- package/dist/odometer.js +158 -39
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +32 -3
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +1 -0
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +6 -6
- package/dist/popover.js +11 -10
- package/dist/radio-group.css +1 -2
- package/dist/radio-group.js +9 -8
- package/dist/radio-group.js.map +1 -1
- package/dist/range-sheet-days.css +35 -0
- package/dist/range-sheet.css +80 -0
- package/dist/range-summary.css +67 -0
- package/dist/scroll-area.css +150 -0
- package/dist/scroll-area.js +85 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.css +22 -1
- package/dist/select.js +15 -14
- package/dist/select.js.map +1 -1
- package/dist/sheet.js +11 -10
- package/dist/support-rail.css +2 -2
- package/dist/support-rail.js +15 -13
- package/dist/support-rail.js.map +1 -1
- package/dist/table-detail.css +27 -0
- package/dist/table.css +35 -13
- package/dist/table.js +341 -172
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +16 -11
- package/dist/tabs.js +68 -56
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +2 -4
- package/dist/tag.js +8 -7
- package/dist/tag.js.map +1 -1
- package/dist/text-field.js +4 -4
- package/dist/textarea.css +15 -42
- package/dist/textarea.js +24 -26
- package/dist/textarea.js.map +1 -1
- package/dist/theme-grid.js +8 -7
- package/dist/theme-switcher.js +17 -16
- package/dist/theme-switcher.js.map +1 -1
- package/dist/{theme-transition-FDF2REFD.js → theme-transition-F3CBENM5.js} +5 -5
- package/dist/{theme-transition-FDF2REFD.js.map → theme-transition-F3CBENM5.js.map} +1 -1
- package/dist/theme.js +5 -4
- package/dist/theme.js.map +1 -1
- package/dist/tiktok.js +3 -3
- package/dist/time-field.js +13 -8
- package/dist/time-field.js.map +1 -1
- package/dist/toast.css +1 -1
- package/dist/toast.js +11 -10
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +0 -1
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +21 -15
- package/dist/tooltip.js.map +1 -1
- package/dist/types/components/composites/combobox/Combobox.d.ts +51 -0
- package/dist/types/components/composites/combobox/caret.d.ts +8 -0
- package/dist/types/components/composites/combobox/use-combobox.d.ts +52 -0
- package/dist/types/components/composites/date-picker/DateField.d.ts +1 -1
- package/dist/types/components/composites/date-picker/DateRangeField.d.ts +6 -3
- package/dist/types/components/composites/date-picker/DateTimeField.d.ts +1 -1
- package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -1
- package/dist/types/components/composites/date-picker/date-utils.d.ts +2 -0
- package/dist/types/components/composites/date-picker/field-shell.d.ts +4 -1
- package/dist/types/components/composites/date-picker/month-swipe.d.ts +3 -0
- package/dist/types/components/composites/date-picker/range-day.d.ts +11 -0
- package/dist/types/components/composites/date-picker/range-month.d.ts +14 -0
- package/dist/types/components/composites/date-picker/range-panel.d.ts +4 -18
- package/dist/types/components/composites/date-picker/range-presets.d.ts +24 -0
- package/dist/types/components/composites/date-picker/range-sheet.d.ts +12 -0
- package/dist/types/components/composites/date-picker/range-summary.d.ts +9 -0
- package/dist/types/components/composites/date-picker/typed-key.d.ts +3 -0
- package/dist/types/components/composites/date-picker/use-month-view.d.ts +14 -0
- package/dist/types/components/composites/date-picker/use-range-panel.d.ts +44 -0
- package/dist/types/components/composites/dialog/Dialog.d.ts +3 -2
- package/dist/types/components/composites/dialog/surface.d.ts +17 -0
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +9 -3
- package/dist/types/components/composites/dropdown/types.d.ts +4 -1
- package/dist/types/components/composites/scroll-area/ScrollArea.d.ts +29 -0
- package/dist/types/components/composites/select/MultiSelect.d.ts +9 -3
- package/dist/types/components/composites/select/core/menu.d.ts +3 -1
- package/dist/types/components/composites/select/core/panel.d.ts +4 -3
- package/dist/types/components/composites/select/core/use-listbox.d.ts +5 -5
- package/dist/types/components/composites/select/presets.d.ts +17 -0
- package/dist/types/components/composites/table/Table.d.ts +3 -74
- package/dist/types/components/composites/table/body.d.ts +15 -0
- package/dist/types/components/composites/table/detail.d.ts +24 -0
- package/dist/types/components/composites/table/head.d.ts +16 -0
- package/dist/types/components/composites/table/types.d.ts +86 -0
- package/dist/types/components/composites/table/use-scroller.d.ts +12 -0
- package/dist/types/components/composites/table/use-table-state.d.ts +16 -0
- package/dist/types/components/composites/tabs/Tabs.d.ts +3 -71
- package/dist/types/components/composites/tabs/tab-panel.d.ts +26 -0
- package/dist/types/components/composites/tabs/types.d.ts +48 -0
- package/dist/types/components/composites/tabs/use-ink.d.ts +5 -0
- package/dist/types/components/composites/tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +1 -1
- package/dist/types/components/expressive/lens/Lens.d.ts +1 -1
- package/dist/types/components/expressive/lens/input.d.ts +2 -0
- package/dist/types/components/expressive/lens/optics.d.ts +37 -0
- package/dist/types/components/expressive/lens/paint.d.ts +2 -0
- package/dist/types/components/expressive/lens/use-lens.d.ts +10 -0
- package/dist/types/components/expressive/odometer/roll.d.ts +9 -11
- package/dist/types/components/expressive/odometer/spring.d.ts +11 -0
- package/dist/types/components/internal/hooks/use-hold-repeat.d.ts +8 -0
- package/dist/types/components/internal/icon/Icon.d.ts +2 -0
- package/dist/types/components/internal/support/types.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +4 -8
- package/dist/types/components/primitives/button/button-style.d.ts +8 -4
- package/dist/types/components/primitives/collapse/Collapse.d.ts +3 -2
- package/dist/types/components/primitives/input/NumberField.d.ts +1 -1
- package/dist/types/components/primitives/input/OtpField.d.ts +5 -1
- package/dist/types/components/primitives/input/TextField.d.ts +1 -1
- package/dist/types/components/primitives/input/field-chrome.d.ts +2 -1
- package/dist/types/components/primitives/input/use-number-value.d.ts +16 -0
- package/dist/types/components/primitives/tag/Tag.d.ts +1 -1
- package/dist/types/components/primitives/tag/ToggleTag.d.ts +2 -2
- package/dist/types/components/primitives/textarea/Textarea.d.ts +3 -1
- package/dist/types/engine/flip.d.ts +3 -1
- package/dist/types/engine/index.d.ts +2 -2
- package/dist/types/engine/loop.d.ts +5 -2
- package/dist/types/motion/before-paint.d.ts +4 -0
- package/dist/types/motion/crossfade.d.ts +2 -1
- package/dist/types/motion/element.d.ts +14 -5
- package/dist/types/motion/flip.d.ts +6 -3
- package/dist/types/motion/holders.d.ts +4 -0
- package/dist/types/motion/use-motion.d.ts +3 -1
- package/dist/types/tokens/motion-defaults.generated.d.ts +2 -0
- package/dist/types/tokens/motion-scale.d.ts +18 -15
- package/dist/types/tokens/motion-tokens.d.ts +1 -1
- package/dist/types/tokens/theme-store.d.ts +4 -4
- package/dist/types/tokens/theme-tokens.generated.d.ts +43 -31
- package/dist/types/tokens/theme.d.ts +1 -1
- package/dist/typing-lines.js +2 -2
- package/dist/youtube.js +3 -3
- package/package.json +11 -1
- package/skills/zyncat-ui/SKILL.md +6 -6
- package/skills/zyncat-ui/references/components.md +4 -2
- package/skills/zyncat-ui/references/recipes.md +1 -1
- package/src/components/composites/combobox/Combobox.tsx +100 -0
- package/src/components/composites/combobox/Combobox.usage.md +32 -0
- package/src/components/composites/combobox/caret.ts +41 -0
- package/src/components/composites/combobox/combobox.css +7 -0
- package/src/components/composites/combobox/use-combobox.ts +112 -0
- package/src/components/composites/date-picker/DateField.tsx +2 -0
- package/src/components/composites/date-picker/DateRangeField.tsx +13 -18
- package/src/components/composites/date-picker/DateTimeField.tsx +2 -0
- package/src/components/composites/date-picker/TimeField.tsx +10 -4
- package/src/components/composites/date-picker/date-picker.css +25 -40
- package/src/components/composites/date-picker/date-utils.ts +4 -0
- package/src/components/composites/date-picker/field-shell.tsx +31 -7
- package/src/components/composites/date-picker/month-swipe.ts +41 -0
- package/src/components/composites/date-picker/range-day.tsx +112 -0
- package/src/components/composites/date-picker/range-month.tsx +79 -0
- package/src/components/composites/date-picker/range-panel.tsx +30 -356
- package/src/components/composites/date-picker/range-presets.tsx +104 -0
- package/src/components/composites/date-picker/range-sheet-days.css +35 -0
- package/src/components/composites/date-picker/range-sheet.css +80 -0
- package/src/components/composites/date-picker/range-sheet.tsx +72 -0
- package/src/components/composites/date-picker/range-summary.css +67 -0
- package/src/components/composites/date-picker/range-summary.tsx +69 -0
- package/src/components/composites/date-picker/time-core.tsx +23 -17
- package/src/components/composites/date-picker/typed-key.ts +9 -0
- package/src/components/composites/date-picker/use-month-view.ts +32 -0
- package/src/components/composites/date-picker/use-range-panel.ts +145 -0
- package/src/components/composites/dialog/Dialog.tsx +28 -110
- package/src/components/composites/dialog/dialog-sheet.css +31 -0
- package/src/components/composites/dialog/dialog.css +3 -0
- package/src/components/composites/dialog/surface.tsx +93 -0
- package/src/components/composites/dropdown/Dropdown.tsx +31 -6
- package/src/components/composites/dropdown/dropdown.css +2 -2
- package/src/components/composites/dropdown/menu-panel.tsx +22 -14
- package/src/components/composites/dropdown/types.ts +4 -1
- package/src/components/composites/pagination/pagination.css +1 -1
- package/src/components/composites/scroll-area/ScrollArea.tsx +114 -0
- package/src/components/composites/scroll-area/ScrollArea.usage.md +28 -0
- package/src/components/composites/scroll-area/scroll-area.css +150 -0
- package/src/components/composites/select/MultiSelect.tsx +15 -7
- package/src/components/composites/select/core/menu.tsx +6 -2
- package/src/components/composites/select/core/panel.tsx +9 -7
- package/src/components/composites/select/core/trigger.tsx +1 -3
- package/src/components/composites/select/core/use-listbox.ts +35 -28
- package/src/components/composites/select/presets.tsx +47 -0
- package/src/components/composites/select/select.css +22 -1
- package/src/components/composites/sheet/use-sheet-drag.ts +13 -0
- package/src/components/composites/table/Table.tsx +65 -305
- package/src/components/composites/table/Table.usage.md +19 -2
- package/src/components/composites/table/body.tsx +147 -0
- package/src/components/composites/table/detail.tsx +76 -0
- package/src/components/composites/table/head.tsx +90 -0
- package/src/components/composites/table/table-detail.css +27 -0
- package/src/components/composites/table/table.css +35 -13
- package/src/components/composites/table/types.ts +97 -0
- package/src/components/composites/table/use-scroller.ts +53 -0
- package/src/components/composites/table/use-table-state.ts +98 -0
- package/src/components/composites/tabs/Tabs.tsx +21 -191
- package/src/components/composites/tabs/tab-panel.tsx +63 -0
- package/src/components/composites/tabs/tabs.css +16 -11
- package/src/components/composites/tabs/types.ts +51 -0
- package/src/components/composites/tabs/use-ink.ts +87 -0
- package/src/components/composites/toast/toast.css +1 -1
- package/src/components/composites/tooltip/Tooltip.tsx +6 -5
- package/src/components/composites/tooltip/tooltip-host.tsx +9 -5
- package/src/components/composites/tooltip/tooltip.css +1 -1
- package/src/components/compound/support-rail/SupportRail.tsx +3 -2
- package/src/components/compound/support-rail/support-rail.css +2 -2
- package/src/components/dev/motion-devtools.css +6 -5
- package/src/components/expressive/lens/Lens.tsx +11 -368
- package/src/components/expressive/lens/input.ts +91 -0
- package/src/components/expressive/lens/optics.ts +119 -0
- package/src/components/expressive/lens/paint.ts +60 -0
- package/src/components/expressive/lens/use-lens.ts +121 -0
- package/src/components/expressive/odometer/Odometer.tsx +38 -12
- package/src/components/expressive/odometer/odometer.css +12 -7
- package/src/components/expressive/odometer/roll.ts +85 -40
- package/src/components/expressive/odometer/spring.ts +86 -0
- package/src/components/internal/hooks/use-hold-repeat.ts +43 -0
- package/src/components/internal/hooks/use-scroll-edges.ts +6 -1
- package/src/components/internal/icon/Icon.tsx +4 -0
- package/src/components/internal/overlay/overlay.css +1 -0
- package/src/components/internal/overlay/track-anchor.ts +1 -1
- package/src/components/internal/support/types.ts +1 -1
- package/src/components/internal/utils/activation.ts +2 -2
- package/src/components/primitives/avatar/avatar.css +1 -1
- package/src/components/primitives/badge/badge.css +1 -1
- package/src/components/primitives/button/Button.tsx +5 -8
- package/src/components/primitives/button/Button.usage.md +5 -4
- package/src/components/primitives/button/button-style.ts +11 -5
- package/src/components/primitives/button/button.css +24 -27
- package/src/components/primitives/checkbox/checkbox.css +0 -1
- package/src/components/primitives/collapse/Collapse.tsx +3 -2
- package/src/components/primitives/input/NumberField.tsx +38 -46
- package/src/components/primitives/input/OtpField.tsx +35 -2
- package/src/components/primitives/input/OtpField.usage.md +2 -1
- package/src/components/primitives/input/TextField.tsx +5 -3
- package/src/components/primitives/input/field-chrome.tsx +3 -2
- package/src/components/primitives/input/input.css +54 -34
- package/src/components/primitives/input/use-number-value.ts +38 -0
- package/src/components/primitives/radio-group/radio-group.css +1 -2
- package/src/components/primitives/tag/Tag.tsx +1 -1
- package/src/components/primitives/tag/ToggleTag.tsx +2 -2
- package/src/components/primitives/tag/tag.css +2 -4
- package/src/components/primitives/textarea/Textarea.tsx +24 -6
- package/src/components/primitives/textarea/char-meter.tsx +1 -16
- package/src/components/primitives/textarea/textarea.css +15 -42
- package/src/components/primitives/toggle/toggle.css +0 -1
- package/src/engine/animate.ts +5 -3
- package/src/engine/flip.ts +23 -3
- package/src/engine/index.ts +2 -2
- package/src/engine/loop.ts +17 -6
- package/src/mcp/server.ts +30 -20
- package/src/motion/before-paint.ts +15 -0
- package/src/motion/crossfade.ts +54 -8
- package/src/motion/element.tsx +22 -4
- package/src/motion/flip.ts +69 -37
- package/src/motion/holders.ts +10 -0
- package/src/motion/presence.tsx +18 -9
- package/src/motion/use-motion.ts +38 -4
- package/src/tokens/base.css +0 -5
- package/src/tokens/dark.css +5 -5
- package/src/tokens/motion-defaults.generated.ts +15 -8
- package/src/tokens/motion-scale.ts +18 -15
- package/src/tokens/motion-tokens.ts +4 -4
- package/src/tokens/motion.css +19 -11
- package/src/tokens/reset.css +1 -0
- package/src/tokens/semantic.css +8 -8
- package/src/tokens/spacing.css +5 -3
- package/src/tokens/theme-store.ts +4 -4
- package/src/tokens/theme-sync.tsx +4 -2
- package/src/tokens/theme-tokens.generated.ts +44 -31
- package/src/tokens/theme.tsx +1 -1
- package/tailwind.css +4 -0
- package/dist/chunk-3HE7N3UK.js.map +0 -1
- package/dist/chunk-47OMFFIB.js.map +0 -1
- package/dist/chunk-6BY5G7BI.js +0 -122
- package/dist/chunk-6BY5G7BI.js.map +0 -1
- package/dist/chunk-6H3IJ752.js.map +0 -1
- package/dist/chunk-7NHY2CRA.js.map +0 -1
- package/dist/chunk-AOEO2LCZ.js.map +0 -1
- package/dist/chunk-AXZBD7LY.js.map +0 -1
- package/dist/chunk-BWGK3OD6.js.map +0 -1
- package/dist/chunk-CYZKPUCG.js.map +0 -1
- package/dist/chunk-DEZIQTBW.js.map +0 -1
- package/dist/chunk-KSAJ6DED.js +0 -16
- package/dist/chunk-KSAJ6DED.js.map +0 -1
- package/dist/chunk-LC6NQQER.js.map +0 -1
- package/dist/chunk-ODRO3KS6.js.map +0 -1
- package/dist/chunk-QDAN43B6.js.map +0 -1
- package/dist/chunk-SPFHWHJ6.js.map +0 -1
- package/dist/chunk-TBLPZQSI.js.map +0 -1
- package/dist/chunk-V4ZN5RD4.js.map +0 -1
- package/dist/chunk-ZSP4ZTII.js.map +0 -1
- package/dist/crossfade-XFZLFLT7.js.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
4
|
+
export type TableAlign = 'start' | 'end' | 'center';
|
|
5
|
+
export type TableHideBelow = 'sm' | 'md';
|
|
6
|
+
export interface TableColumn<Row = any> {
|
|
7
|
+
/** Unique column id; also the default data accessor (row[key]). */
|
|
8
|
+
key: string;
|
|
9
|
+
/** Header cell content; omit for a header-less column (e.g. an actions column). */
|
|
10
|
+
label?: ReactNode;
|
|
11
|
+
/** Cell + header alignment. Default 'start'. */
|
|
12
|
+
align?: TableAlign;
|
|
13
|
+
/** Mono + tabular numerals (timestamps, counts, IDs - section E). */
|
|
14
|
+
mono?: boolean;
|
|
15
|
+
/** Identity emphasis: strong text, medium weight. */
|
|
16
|
+
strong?: boolean;
|
|
17
|
+
/** The one greedy column - absorbs slack width. Others size to content. */
|
|
18
|
+
grow?: boolean;
|
|
19
|
+
/** Share of the table's width this column takes, e.g. '30%'. A grow column takes what the shares leave;
|
|
20
|
+
* when the table is too narrow, the cells' content widths win. */
|
|
21
|
+
width?: `${number}%`;
|
|
22
|
+
/** Header becomes a sort control. Sort is local; asc - desc, no third state. */
|
|
23
|
+
sortable?: boolean;
|
|
24
|
+
/** Sort accessor: a row property name, or a function. Defaults to row[key]. */
|
|
25
|
+
sortBy?: string | ((row: Row) => unknown);
|
|
26
|
+
/** Collapse this column below a container breakpoint (30rem / 42rem). */
|
|
27
|
+
hideBelow?: TableHideBelow;
|
|
28
|
+
/** Custom cell renderer. Defaults to row[key]. */
|
|
29
|
+
render?: (row: Row) => ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export interface TableSort {
|
|
32
|
+
/** `key` of the column being sorted by. */
|
|
33
|
+
key: string;
|
|
34
|
+
/** Sort direction - `asc` or `desc`. */
|
|
35
|
+
dir: 'asc' | 'desc';
|
|
36
|
+
}
|
|
37
|
+
export interface TableProps<Row = any> {
|
|
38
|
+
/** Column defs, rendered left to right. */
|
|
39
|
+
columns: TableColumn<Row>[];
|
|
40
|
+
/** The row data; sorted locally per the active sort before render. */
|
|
41
|
+
rows: Row[];
|
|
42
|
+
/** Row identity property. Default 'id'. Must be unique and stable. */
|
|
43
|
+
rowKey?: string;
|
|
44
|
+
/** Accessible name for the <table>. */
|
|
45
|
+
ariaLabel?: string;
|
|
46
|
+
/** Checkbox column + bulk bar. Selection is a Set of row keys, owned here. */
|
|
47
|
+
selectable?: boolean;
|
|
48
|
+
/** Fires with the selected row keys after every selection change. */
|
|
49
|
+
onSelectionChange?: (keys: Array<string | number>) => void;
|
|
50
|
+
/** Rendered in the bulk bar between the count and the built-in Clear. */
|
|
51
|
+
bulkActions?: (keys: Array<string | number>, clear: () => void) => ReactNode;
|
|
52
|
+
/** Per-row checkbox aria-label. Default 'Select row'. */
|
|
53
|
+
selectionLabel?: (row: Row) => string;
|
|
54
|
+
/** Initial sort; sorting stays local and uncontrolled after that. */
|
|
55
|
+
defaultSort?: TableSort | null;
|
|
56
|
+
/** Notification only - fires after the local sort updates. */
|
|
57
|
+
onSortChange?: (sort: TableSort) => void;
|
|
58
|
+
/** A row's details, unfolding full width under it from its disclosure button or a click on the
|
|
59
|
+
* row. A falsy return leaves that row without details. */
|
|
60
|
+
renderDetail?: (row: Row) => ReactNode;
|
|
61
|
+
/** Keys of the rows whose details are open. Omit to let the table own it. */
|
|
62
|
+
expanded?: Array<string | number>;
|
|
63
|
+
/** Fires with the open row keys after every toggle. */
|
|
64
|
+
onExpandedChange?: (keys: Array<string | number>) => void;
|
|
65
|
+
/** `single` closes the open row as another opens. Default 'multiple'. */
|
|
66
|
+
expandMode?: 'single' | 'multiple';
|
|
67
|
+
/** Row rhythm. Default 'cozy' (46px rows); 'compact' is 38px. */
|
|
68
|
+
density?: 'cozy' | 'compact';
|
|
69
|
+
/** Pin checkbox + first column under horizontal overflow. Default true. */
|
|
70
|
+
pinFirst?: boolean;
|
|
71
|
+
/** Rows recede and go inert (list-fetch convention). */
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
/** Shown when rows is empty and not loading. Default 'Nothing to show'. */
|
|
74
|
+
empty?: ReactNode;
|
|
75
|
+
/** Footer strip - pagination, summaries. */
|
|
76
|
+
footer?: ReactNode;
|
|
77
|
+
/** Makes rows clickable. A click on the checkbox cell, or on a link, button, field or label in a
|
|
78
|
+
* cell, stays with it. */
|
|
79
|
+
onRowClick?: (row: Row) => void;
|
|
80
|
+
/** Whether a sortable header fires on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
81
|
+
activateOn?: ActivateOn;
|
|
82
|
+
/** Size the table here - the internal scroller absorbs the constraint. */
|
|
83
|
+
className?: string;
|
|
84
|
+
/** Standard <div> attributes (style, data-*, aria-*, ...) forwarded to the table wrapper. */
|
|
85
|
+
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, 'className'> & DataAttributes;
|
|
86
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export declare function useRowGlide(scrollRef: RefObject<HTMLDivElement | null>): {
|
|
3
|
+
tableRef: RefObject<HTMLTableElement>;
|
|
4
|
+
glide: {
|
|
5
|
+
ref: RefObject<HTMLSpanElement>;
|
|
6
|
+
enter: (target: HTMLElement | null) => void;
|
|
7
|
+
leave: () => void;
|
|
8
|
+
};
|
|
9
|
+
hoverRow: (row: Element | null) => void;
|
|
10
|
+
leaveRows: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function useEdgeAttributes(scrollRef: RefObject<HTMLDivElement | null>, wrapRef: RefObject<HTMLDivElement | null>): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TableColumn, TableSort } from './types';
|
|
2
|
+
export declare function useSort<Row>(rows: Row[], columns: TableColumn<Row>[], defaultSort: TableSort | null, onSortChange?: (sort: TableSort) => void): {
|
|
3
|
+
sort: TableSort;
|
|
4
|
+
sortedRows: Row[];
|
|
5
|
+
cycleSort: (col: TableColumn<Row>) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function useSelection<Row>(rows: Row[], keyOf: (row: Row) => string | number, onSelectionChange?: (keys: Array<string | number>) => void): {
|
|
8
|
+
selected: Set<string | number>;
|
|
9
|
+
allSelected: boolean;
|
|
10
|
+
someSelected: boolean;
|
|
11
|
+
shiftRef: import("react").RefObject<boolean>;
|
|
12
|
+
clearSelection: () => void;
|
|
13
|
+
toggleAll: () => void;
|
|
14
|
+
toggleRow: (idx: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export type Selection = ReturnType<typeof useSelection>;
|
|
@@ -1,73 +1,5 @@
|
|
|
1
1
|
import './tabs.css';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type ActivateOn } from '../../internal/utils/activation';
|
|
6
|
-
/** One tab in the row. */
|
|
7
|
-
export interface TabItem {
|
|
8
|
-
/** Stable identity - also used in the tab/panel id pair. */
|
|
9
|
-
value: string;
|
|
10
|
-
/** Visible tab text. */
|
|
11
|
-
label: ReactNode;
|
|
12
|
-
/** Leading icon - your own node. */
|
|
13
|
-
icon?: ReactNode;
|
|
14
|
-
/** Rendered mono + tabular. Pass a number or a preformatted string. */
|
|
15
|
-
count?: number | string;
|
|
16
|
-
/** Dims the tab, blocks selection, and skips it during arrow-key travel. */
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface TabsOwnProps {
|
|
20
|
-
/** The tab row, in order. @default [] */
|
|
21
|
-
items: TabItem[];
|
|
22
|
-
/** Controlled - the value of the active tab (null/undefined hides the ink). */
|
|
23
|
-
value: string | null | undefined;
|
|
24
|
-
/** Fires on click and on arrow-key travel. `dir` is the direction of travel (+1 right, -1 left);
|
|
25
|
-
* hand it to TabPanel so content enters from that side. */
|
|
26
|
-
onChange?: (value: string, dir: 1 | -1) => void;
|
|
27
|
-
/** Shared id prefix wiring tab and panel aria. Give Tabs and its TabPanel the same `name`;
|
|
28
|
-
* omit it when the tabs have no managed panel. */
|
|
29
|
-
name?: string;
|
|
30
|
-
/** Accessible name for the tablist (e.g. "Section views"). */
|
|
31
|
-
ariaLabel?: string;
|
|
32
|
-
/** Whether a tab switches on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
33
|
-
activateOn?: ActivateOn;
|
|
34
|
-
/** Skin: an underline that reaches across (default), or a segmented pill riding an inset track. */
|
|
35
|
-
variant?: 'underline' | 'pill';
|
|
36
|
-
/** Tab height, type and padding. `'md'` and `'lg'` match `Button`'s steps; the default row sits
|
|
37
|
-
* just under them. @default 'sm' */
|
|
38
|
-
size?: 'sm' | 'md' | 'lg';
|
|
39
|
-
/** Stretch the row to its container and split it evenly between the tabs. */
|
|
40
|
-
fill?: boolean;
|
|
41
|
-
/** Extra class(es) merged onto the root. */
|
|
42
|
-
className?: string;
|
|
43
|
-
/** Inline styles merged onto the root. */
|
|
44
|
-
style?: CSSProperties;
|
|
45
|
-
}
|
|
46
|
-
export interface TabsProps extends TabsOwnProps {
|
|
47
|
-
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
48
|
-
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabsOwnProps> & DataAttributes;
|
|
49
|
-
}
|
|
2
|
+
import type { TabsProps } from './types';
|
|
3
|
+
export type { TabItem, TabsProps } from './types';
|
|
4
|
+
export { TabPanel, type TabPanelProps } from './tab-panel';
|
|
50
5
|
export declare function Tabs({ items, value, onChange, name, ariaLabel, activateOn, variant, size, fill, className, style, htmlProps, }: TabsProps): import("react").JSX.Element;
|
|
51
|
-
interface TabPanelOwnProps {
|
|
52
|
-
/** The active tab's value - changing it cuts to the new content. */
|
|
53
|
-
tab: string;
|
|
54
|
-
/** Same `name` as the paired Tabs - wires role/id/aria-labelledby. */
|
|
55
|
-
name?: string;
|
|
56
|
-
/** Direction of travel from Tabs' onChange; 0 = plain fade. */
|
|
57
|
-
dir?: -1 | 0 | 1;
|
|
58
|
-
/** Panel content - only this inner node animates in on `tab` change; the root chrome stays static. */
|
|
59
|
-
children?: ReactNode;
|
|
60
|
-
/** Entrance timing for the inner content - motion tokens only, or `null` to disable.
|
|
61
|
-
* @default duration 'base' + ease 'entrance' */
|
|
62
|
-
animation?: DisableableAnimation;
|
|
63
|
-
/** Extra class(es) merged onto the root. */
|
|
64
|
-
className?: string;
|
|
65
|
-
/** Inline styles merged onto the root. */
|
|
66
|
-
style?: CSSProperties;
|
|
67
|
-
}
|
|
68
|
-
export interface TabPanelProps extends TabPanelOwnProps {
|
|
69
|
-
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
70
|
-
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabPanelOwnProps> & DataAttributes;
|
|
71
|
-
}
|
|
72
|
-
export declare function TabPanel({ tab, name, dir, className, style, children, animation, htmlProps }: TabPanelProps): import("react").JSX.Element;
|
|
73
|
-
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
import { type DisableableAnimation } from '../../../motion/timing';
|
|
4
|
+
interface TabPanelOwnProps {
|
|
5
|
+
/** The active tab's value - changing it cuts to the new content. */
|
|
6
|
+
tab: string;
|
|
7
|
+
/** Same `name` as the paired Tabs - wires role/id/aria-labelledby. */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Direction of travel from Tabs' onChange; 0 = plain fade. */
|
|
10
|
+
dir?: -1 | 0 | 1;
|
|
11
|
+
/** Panel content - only this inner node animates in on `tab` change; the root chrome stays static. */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Entrance timing for the inner content - motion tokens only, or `null` to disable.
|
|
14
|
+
* @default duration 'base' + ease 'entrance' */
|
|
15
|
+
animation?: DisableableAnimation;
|
|
16
|
+
/** Extra class(es) merged onto the root. */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Inline styles merged onto the root. */
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export interface TabPanelProps extends TabPanelOwnProps {
|
|
22
|
+
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
23
|
+
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabPanelOwnProps> & DataAttributes;
|
|
24
|
+
}
|
|
25
|
+
export declare function TabPanel({ tab, name, dir, className, style, children, animation, htmlProps }: TabPanelProps): import("react").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
4
|
+
/** One tab in the row. */
|
|
5
|
+
export interface TabItem {
|
|
6
|
+
/** Stable identity - also used in the tab/panel id pair. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Visible tab text. */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Leading icon - your own node. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Rendered with tabular figures. Pass a number or a preformatted string. */
|
|
13
|
+
count?: number | string;
|
|
14
|
+
/** Dims the tab, blocks selection, and skips it during arrow-key travel. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface TabsOwnProps {
|
|
18
|
+
/** The tab row, in order. @default [] */
|
|
19
|
+
items: TabItem[];
|
|
20
|
+
/** Controlled - the value of the active tab (null/undefined hides the ink). */
|
|
21
|
+
value: string | null | undefined;
|
|
22
|
+
/** Fires on click and on arrow-key travel. `dir` is the direction of travel (+1 right, -1 left);
|
|
23
|
+
* hand it to TabPanel so content enters from that side. */
|
|
24
|
+
onChange?: (value: string, dir: 1 | -1) => void;
|
|
25
|
+
/** Shared id prefix wiring tab and panel aria. Give Tabs and its TabPanel the same `name`;
|
|
26
|
+
* omit it when the tabs have no managed panel. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** Accessible name for the tablist (e.g. "Section views"). */
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
/** Whether a tab switches on `pointerdown` (snappier) or waits for `click`. @default 'pointerdown' */
|
|
31
|
+
activateOn?: ActivateOn;
|
|
32
|
+
/** Skin: an underline that reaches across (default), or a segmented pill riding an inset track. */
|
|
33
|
+
variant?: 'underline' | 'pill';
|
|
34
|
+
/** Tab height, type and padding. `'md'` and `'lg'` match `Button`'s steps; the default row sits
|
|
35
|
+
* just under them. @default 'sm' */
|
|
36
|
+
size?: 'sm' | 'md' | 'lg';
|
|
37
|
+
/** Stretch the row to its container and split it evenly between the tabs. */
|
|
38
|
+
fill?: boolean;
|
|
39
|
+
/** Extra class(es) merged onto the root. */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Inline styles merged onto the root. */
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
export interface TabsProps extends TabsOwnProps {
|
|
45
|
+
/** Standard <div> attributes (data-*, aria-*, ...) forwarded to the root. */
|
|
46
|
+
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof TabsOwnProps> & DataAttributes;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import { type Placement } from './tooltip-store';
|
|
|
5
5
|
export interface TooltipProps {
|
|
6
6
|
/** The hint - a string or small node; never interactive content. */
|
|
7
7
|
content: ReactNode;
|
|
8
|
-
/** Optional keyboard hint, rendered as
|
|
8
|
+
/** Optional keyboard hint, rendered as small metadata ("⌘↩", "S"). */
|
|
9
9
|
shortcut?: string | null;
|
|
10
10
|
/** Preferred side; flips automatically when out of viewport room. */
|
|
11
11
|
placement?: Placement;
|
|
@@ -10,7 +10,7 @@ export interface SupportRailOwnProps {
|
|
|
10
10
|
actions: SupportAction[];
|
|
11
11
|
/** Panel heading, and the panel's accessible name. @default 'Talk to us' */
|
|
12
12
|
title?: string;
|
|
13
|
-
/** Small
|
|
13
|
+
/** Small line under the heading - opening hours, queue depth, a shift note. */
|
|
14
14
|
status?: string;
|
|
15
15
|
/** Container edge the rail pins to. Flips the tab, the morph origin and the panel's border. @default 'right' */
|
|
16
16
|
side?: 'right' | 'left';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './lens.css';
|
|
2
|
-
import {
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
4
|
import type { LensStyle } from '../../../tokens/component-styles.generated';
|
|
5
5
|
export interface LensOwnProps {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const clamp: (v: number, min: number, max: number) => number;
|
|
2
|
+
export interface Optics {
|
|
3
|
+
pointerX: number;
|
|
4
|
+
pointerY: number;
|
|
5
|
+
centreX: number;
|
|
6
|
+
centreY: number;
|
|
7
|
+
magnification: number;
|
|
8
|
+
opacity: number;
|
|
9
|
+
engaged: number;
|
|
10
|
+
pressed: number;
|
|
11
|
+
press: number;
|
|
12
|
+
speed: number;
|
|
13
|
+
angle: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
offsetX: number;
|
|
17
|
+
offsetY: number;
|
|
18
|
+
acquired: boolean;
|
|
19
|
+
dirty: boolean;
|
|
20
|
+
sinceClone: number;
|
|
21
|
+
}
|
|
22
|
+
export interface Parts {
|
|
23
|
+
stage: HTMLElement;
|
|
24
|
+
content: HTMLElement;
|
|
25
|
+
glass: HTMLElement;
|
|
26
|
+
core: HTMLElement;
|
|
27
|
+
rim: HTMLElement;
|
|
28
|
+
fringe: HTMLElement;
|
|
29
|
+
specular: HTMLElement;
|
|
30
|
+
ring: HTMLElement;
|
|
31
|
+
}
|
|
32
|
+
export declare const createOptics: () => Optics;
|
|
33
|
+
export declare function cloneInto(host: HTMLElement, content: HTMLElement, width: number, height: number): void;
|
|
34
|
+
export declare function measure(parts: Parts, optics: Optics): void;
|
|
35
|
+
export declare function advance(optics: Optics, k: number, magnification: number): void;
|
|
36
|
+
export declare const atRest: (optics: Optics) => boolean;
|
|
37
|
+
export declare function settle(optics: Optics, magnification: number): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useLens(magnification: number, radius: number, chromatic: boolean): {
|
|
2
|
+
stageRef: import("react").RefObject<HTMLDivElement>;
|
|
3
|
+
contentRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
+
glassRef: import("react").RefObject<HTMLDivElement>;
|
|
5
|
+
coreRef: import("react").RefObject<HTMLDivElement>;
|
|
6
|
+
rimRef: import("react").RefObject<HTMLDivElement>;
|
|
7
|
+
fringeRef: import("react").RefObject<HTMLDivElement>;
|
|
8
|
+
specularRef: import("react").RefObject<HTMLDivElement>;
|
|
9
|
+
ringRef: import("react").RefObject<HTMLDivElement>;
|
|
10
|
+
};
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
+
import { type Spring } from './spring';
|
|
1
2
|
export declare const MIN_ROLL = 0.08;
|
|
2
3
|
export declare const DIGIT: RegExp;
|
|
3
|
-
export declare const
|
|
4
|
+
export declare const RUN_TEXT: string;
|
|
4
5
|
export type Slot = (HTMLElement | null)[];
|
|
5
|
-
export interface Place {
|
|
6
|
-
at: number;
|
|
7
|
-
rate: number;
|
|
8
|
-
to: number;
|
|
6
|
+
export interface Place extends Spring {
|
|
9
7
|
digit: number;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
omega: number;
|
|
14
|
-
settled: boolean;
|
|
8
|
+
roll: Animation | null;
|
|
9
|
+
gate: Spring;
|
|
10
|
+
reveal: Animation | null;
|
|
15
11
|
}
|
|
16
12
|
export declare const charAt: (core: string, i: number) => string;
|
|
17
13
|
export declare function parts(text: string): [string, string, string];
|
|
14
|
+
export declare const motions: (places: Place[]) => Animation[];
|
|
18
15
|
export declare function aim(places: Place[], grid: string, core: string, zero: number, seconds: number, dir: number): void;
|
|
19
|
-
export declare function
|
|
16
|
+
export declare function launch(places: Place[], strips: Slot, cols: Slot, rate: number, paused: boolean): void;
|
|
17
|
+
export declare function hold(places: Place[], paused: boolean): void;
|
|
20
18
|
export declare function snap(places: Place[], cols: Slot, strips: Slot): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Spring {
|
|
2
|
+
at: number;
|
|
3
|
+
rate: number;
|
|
4
|
+
to: number;
|
|
5
|
+
omega: number;
|
|
6
|
+
zeta: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function sample(s: Spring, t: number): [at: number, rate: number];
|
|
9
|
+
export declare function settleSeconds(s: Spring, rest: number): number;
|
|
10
|
+
export declare function clampedCurve(s: Spring, seconds: number): string;
|
|
11
|
+
export declare function wrappedCurve(s: Spring, seconds: number, run: number): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PointerEvent } from 'react';
|
|
2
|
+
export declare function useHoldRepeat(onStep: (direction: 1 | -1) => boolean): (direction: 1 | -1) => {
|
|
3
|
+
onPointerDown: (e: PointerEvent) => void;
|
|
4
|
+
onPointerUp: () => void;
|
|
5
|
+
onPointerLeave: () => void;
|
|
6
|
+
onPointerCancel: () => void;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
@@ -11,6 +11,8 @@ declare const REGISTRY: {
|
|
|
11
11
|
'caret-left': import("@phosphor-icons/react").Icon;
|
|
12
12
|
'caret-right': import("@phosphor-icons/react").Icon;
|
|
13
13
|
'magnifying-glass': import("@phosphor-icons/react").Icon;
|
|
14
|
+
minus: import("@phosphor-icons/react").Icon;
|
|
15
|
+
plus: import("@phosphor-icons/react").Icon;
|
|
14
16
|
calendar: import("@phosphor-icons/react").Icon;
|
|
15
17
|
'calendar-dot': import("@phosphor-icons/react").Icon;
|
|
16
18
|
clock: import("@phosphor-icons/react").Icon;
|
|
@@ -6,7 +6,7 @@ export interface SupportAction {
|
|
|
6
6
|
label: string;
|
|
7
7
|
/** Leading glyph. Any node; the widget sizes the box it sits in. */
|
|
8
8
|
icon?: ReactNode;
|
|
9
|
-
/** Trailing metadata - a wait time, a slot, a ticket number. Set in
|
|
9
|
+
/** Trailing metadata - a wait time, a slot, a ticket number. Set in tabular figures. */
|
|
10
10
|
meta?: string;
|
|
11
11
|
/** Second line under the label. The rail shows it; the fan puts it in the caption. */
|
|
12
12
|
description?: string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, CSSProperties, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ButtonStyleProps, type ButtonVariant } from './button-style';
|
|
4
4
|
export { buttonClass } from './button-style';
|
|
5
5
|
export type { ButtonSize, ButtonStyleProps, ButtonVariant } from './button-style';
|
|
6
|
-
interface ButtonOwnProps {
|
|
6
|
+
interface ButtonOwnProps extends Pick<ButtonStyleProps, 'size' | 'iconOnly' | 'fullWidth'> {
|
|
7
7
|
/** Visual weight / intent. @default 'primary' */
|
|
8
8
|
variant?: ButtonVariant;
|
|
9
9
|
/** Forwarded to the underlying <button> (React 19 ref-as-prop). */
|
|
10
10
|
ref?: Ref<HTMLButtonElement>;
|
|
11
|
-
/** Control height. sm 28px - md 32px (default) - lg 37px. @default 'md' */
|
|
12
|
-
size?: ButtonSize;
|
|
13
11
|
/** `submit` / `reset` / `button`. @default 'button' */
|
|
14
12
|
type?: 'button' | 'submit' | 'reset';
|
|
15
13
|
/** Disable the control (also implied by `loading`). */
|
|
@@ -17,13 +15,11 @@ interface ButtonOwnProps {
|
|
|
17
15
|
/** Loading - swaps the label for a spinner and makes the button inert. The label stays
|
|
18
16
|
* mounted but invisible, so the button holds its width. */
|
|
19
17
|
loading?: boolean;
|
|
20
|
-
/** Stretch to fill the container width. */
|
|
21
|
-
fullWidth?: boolean;
|
|
22
18
|
/** Extra class(es) merged onto the button. */
|
|
23
19
|
className?: string;
|
|
24
20
|
/** Inline styles merged onto the button. */
|
|
25
21
|
style?: CSSProperties;
|
|
26
|
-
/** Button label. */
|
|
22
|
+
/** Button label. An svg child takes the size's glyph; a class or style of your own on it wins. */
|
|
27
23
|
children?: ReactNode;
|
|
28
24
|
}
|
|
29
25
|
type ButtonRestProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonOwnProps> & DataAttributes;
|
|
@@ -32,4 +28,4 @@ export interface ButtonProps extends ButtonOwnProps, ButtonRestProps {
|
|
|
32
28
|
* Bare `<button>` attributes also pass through directly; `htmlProps` wins on conflict. */
|
|
33
29
|
htmlProps?: ButtonRestProps;
|
|
34
30
|
}
|
|
35
|
-
export declare function Button({ variant, size, type, disabled, loading, fullWidth, className, style, children, ref, htmlProps, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
31
|
+
export declare function Button({ variant, size, iconOnly, type, disabled, loading, fullWidth, className, style, children, ref, htmlProps, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import './button.css';
|
|
2
2
|
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
|
|
3
|
-
export type ButtonSize = 'sm' | 'md' | 'lg' | '
|
|
3
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export interface ButtonStyleProps {
|
|
5
5
|
/** Visual weight / intent. Omit for base chrome only - sizing, focus ring, layout -
|
|
6
6
|
* with no skin, for a local re-skin through `className`. */
|
|
7
7
|
variant?: ButtonVariant;
|
|
8
|
-
/** Control height
|
|
9
|
-
|
|
8
|
+
/** Control height: the `--control-height-*` step, so it lines up with a field of the same size.
|
|
9
|
+
* Type, padding and glyph step with it. `'icon'` is deprecated: it is `size="sm" iconOnly`.
|
|
10
|
+
* @default 'md' */
|
|
11
|
+
size?: ButtonSize | 'icon';
|
|
12
|
+
/** A square of the control height for one glyph. Name it with `aria-label`. @default false */
|
|
13
|
+
iconOnly?: boolean;
|
|
10
14
|
/** Stretch to fill the container width. */
|
|
11
15
|
fullWidth?: boolean;
|
|
12
16
|
/** Extra class(es) merged onto the result. */
|
|
13
17
|
className?: string;
|
|
14
18
|
}
|
|
15
|
-
export declare function buttonClass({ variant, size, fullWidth, className }?: ButtonStyleProps): string;
|
|
19
|
+
export declare function buttonClass({ variant, size, iconOnly, fullWidth, className }?: ButtonStyleProps): string;
|
|
@@ -20,8 +20,9 @@ interface CollapseOwnProps extends TimingProps {
|
|
|
20
20
|
axis?: 'height' | 'width';
|
|
21
21
|
/** Also cross-fade contents while resizing; follows `duration` / `ease`. */
|
|
22
22
|
fade?: boolean;
|
|
23
|
-
/** Class applied to the inner
|
|
24
|
-
*
|
|
23
|
+
/** Class applied to the inner wrapper - the clipping element (`overflow: clip` on the animated
|
|
24
|
+
* axis). Its padding stays while closed, so content whose focus ring sits flush to the clipped
|
|
25
|
+
* edge gets its room as `var(--ring-gutter)` of padding on a child. */
|
|
25
26
|
innerClassName?: string;
|
|
26
27
|
/** Size (and fade) transition timing - motion tokens only, each field one token or
|
|
27
28
|
* `{ open, close }`, e.g. `{ duration: { close: 'fast' }, ease: { close: 'exit' } }`.
|
|
@@ -9,7 +9,7 @@ interface NumberFieldOwnProps extends FieldIdProps, FieldCoreMessagingProps {
|
|
|
9
9
|
min?: number;
|
|
10
10
|
/** Maximum value - steps and committed typing clamp down to this; the increase stepper disables here. @default Infinity */
|
|
11
11
|
max?: number;
|
|
12
|
-
/** Amount added/removed per ArrowUp/ArrowDown press and per
|
|
12
|
+
/** Amount added/removed per ArrowUp/ArrowDown press and per minus/plus click; holding a button repeats it. Decimals work. @default 1 */
|
|
13
13
|
step?: number;
|
|
14
14
|
/** Controlled numeric value. Omit for uncontrolled (use `defaultValue`). */
|
|
15
15
|
value?: number | string;
|
|
@@ -12,6 +12,10 @@ interface OtpFieldOwnProps {
|
|
|
12
12
|
group?: number;
|
|
13
13
|
/** Error state (red slots + ring). */
|
|
14
14
|
error?: boolean;
|
|
15
|
+
/** Accepted state: the slots take the accent, and a ripple runs across them as it turns on. */
|
|
16
|
+
success?: boolean;
|
|
17
|
+
/** Keep the digits on show but refuse edits - while the code is being checked. */
|
|
18
|
+
readOnly?: boolean;
|
|
15
19
|
/** Disable every slot. */
|
|
16
20
|
disabled?: boolean;
|
|
17
21
|
/** Slot width, height and digit type. @default 'md' */
|
|
@@ -25,5 +29,5 @@ export interface OtpFieldProps extends OtpFieldOwnProps {
|
|
|
25
29
|
/** Standard <div> attributes (aria-*, data-*, ...) forwarded to the root wrapper. */
|
|
26
30
|
htmlProps?: Omit<HTMLAttributes<HTMLDivElement>, keyof OtpFieldOwnProps> & DataAttributes;
|
|
27
31
|
}
|
|
28
|
-
export declare function OtpField({ length, value, onChange, group, error, disabled, size, className, style, htmlProps, }: OtpFieldProps): import("react").JSX.Element;
|
|
32
|
+
export declare function OtpField({ length, value, onChange, group, error, success, readOnly, disabled, size, className, style, htmlProps, }: OtpFieldProps): import("react").JSX.Element;
|
|
29
33
|
export {};
|
|
@@ -8,7 +8,7 @@ interface TextFieldOwnProps extends FieldMessagingProps, TextFieldNative {
|
|
|
8
8
|
leadingIcon?: ReactNode;
|
|
9
9
|
/** Show a clear button when there's a value. */
|
|
10
10
|
clearable?: boolean;
|
|
11
|
-
/** Control height:
|
|
11
|
+
/** Control height: the `--control-height-*` step of the same name, md by default. */
|
|
12
12
|
size?: 'sm' | 'md' | 'lg';
|
|
13
13
|
/** Extra class(es) merged onto the field root. */
|
|
14
14
|
className?: string;
|
|
@@ -28,8 +28,9 @@ export interface FieldMessagingProps extends FieldIdProps, FieldRequirementProps
|
|
|
28
28
|
export interface FieldLabelProps extends FieldIdProps, FieldRequirementProps {
|
|
29
29
|
/** Label text (sentence case). */
|
|
30
30
|
label?: ReactNode;
|
|
31
|
+
labelId?: string;
|
|
31
32
|
}
|
|
32
|
-
export declare function FieldLabel({ id, label, required, optional }: FieldLabelProps): import("react").JSX.Element;
|
|
33
|
+
export declare function FieldLabel({ id, labelId, label, required, optional }: FieldLabelProps): import("react").JSX.Element;
|
|
33
34
|
export interface FieldMessageProps {
|
|
34
35
|
id?: string;
|
|
35
36
|
message?: ReactNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface NumberValueOptions {
|
|
2
|
+
value?: number | string;
|
|
3
|
+
defaultValue: number;
|
|
4
|
+
onChange?: (value: number) => void;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useNumberValue({ value, defaultValue, onChange, min, max, step }: NumberValueOptions): {
|
|
10
|
+
v: number;
|
|
11
|
+
text: string;
|
|
12
|
+
commit: (n: number) => void;
|
|
13
|
+
stepBy: (direction: 1 | -1) => boolean;
|
|
14
|
+
type: (raw: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -11,7 +11,7 @@ interface TagOwnProps {
|
|
|
11
11
|
onRemove?: (() => void) | null;
|
|
12
12
|
/** Accessible label for the remove button. Defaults to "Remove {label}" for string labels. */
|
|
13
13
|
removeLabel?: string;
|
|
14
|
-
/** 'md'
|
|
14
|
+
/** 'md' sits on `--control-height-sm`; 'sm' is 24px, for dense rows. @default 'md' */
|
|
15
15
|
size?: 'md' | 'sm';
|
|
16
16
|
/** Set `data-disabled` on the tag and disable its remove button. @default false */
|
|
17
17
|
disabled?: boolean;
|
|
@@ -13,9 +13,9 @@ interface ToggleTagOwnProps {
|
|
|
13
13
|
onChange?: (selected: boolean) => void;
|
|
14
14
|
/** Your own icon node; replaces the tick. Selected state reads from the wash. */
|
|
15
15
|
icon?: ReactNode | null;
|
|
16
|
-
/** Optional result count - rendered
|
|
16
|
+
/** Optional result count - rendered with tabular figures. */
|
|
17
17
|
count?: ReactNode;
|
|
18
|
-
/** 'md'
|
|
18
|
+
/** 'md' sits on `--control-height-sm`; 'sm' is 24px, for dense rows. @default 'md' */
|
|
19
19
|
size?: 'md' | 'sm';
|
|
20
20
|
/** Disable the button, blocking toggles. @default false */
|
|
21
21
|
disabled?: boolean;
|
|
@@ -12,6 +12,8 @@ interface TextareaOwnProps extends FieldMessagingProps, TextareaNative {
|
|
|
12
12
|
onSubmit?: (value: string) => void;
|
|
13
13
|
/** Soft char limit: shows the meter + over-limit highlight. Does NOT truncate (use native maxLength for a hard stop). */
|
|
14
14
|
max?: number;
|
|
15
|
+
/** How much one character (a code point) counts toward `max`, e.g. its UTF-8 byte length. @default its UTF-16 length */
|
|
16
|
+
charWeight?: (char: string) => number;
|
|
15
17
|
/** Rows shown before auto-grow kicks in. @default 3 */
|
|
16
18
|
minRows?: number;
|
|
17
19
|
/** Row cap - grows up to this, then the box scrolls. @default 10 */
|
|
@@ -31,5 +33,5 @@ export interface TextareaProps extends TextareaOwnProps {
|
|
|
31
33
|
/** Standard <textarea> attributes (name, maxLength, aria-*, onKeyDown, ...) forwarded to the textarea. */
|
|
32
34
|
htmlProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, keyof TextareaOwnProps | 'rows'> & DataAttributes;
|
|
33
35
|
}
|
|
34
|
-
export declare function Textarea({ id, label, required, optional, placeholder, helper, error, warning, success, value, onChange, onKeyDown, onSubmit, max, minRows, maxRows, warnAt, hint, size, disabled, readOnly, className, style, htmlProps, }: TextareaProps): import("react").JSX.Element;
|
|
36
|
+
export declare function Textarea({ id, label, required, optional, placeholder, helper, error, warning, success, value, onChange, onKeyDown, onSubmit, max, charWeight, minRows, maxRows, warnAt, hint, size, disabled, readOnly, className, style, htmlProps, }: TextareaProps): import("react").JSX.Element;
|
|
35
37
|
export {};
|