@zyncat/ui 0.20.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 +11 -10
- package/dist/alert.js.map +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +20 -11
- package/dist/badge.js +4 -1
- package/dist/{bloom-HV23M4AW.js → bloom-5MZXLNKG.js} +23 -5
- package/dist/bloom-5MZXLNKG.js.map +1 -0
- 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-LNAV5E7S.js → chunk-2GYZ3HP3.js} +8 -4
- package/dist/chunk-2GYZ3HP3.js.map +1 -0
- package/dist/chunk-4M5FMCFJ.js +16 -0
- package/dist/chunk-4M5FMCFJ.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-V6QAAOA5.js → chunk-AK2AXGEC.js} +38 -8
- 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-N43NDSME.js → chunk-CF6ZFXRV.js} +19 -11
- package/dist/chunk-CF6ZFXRV.js.map +1 -0
- package/dist/{chunk-BRKGYLEQ.js → chunk-DOAR4PJ3.js} +9 -4
- package/dist/chunk-DOAR4PJ3.js.map +1 -0
- package/dist/{tide-DJZMDAFT.js → chunk-DVLKB3CZ.js} +15 -12
- package/dist/chunk-DVLKB3CZ.js.map +1 -0
- package/dist/chunk-EUAXI6OF.js +16 -0
- package/dist/chunk-EUAXI6OF.js.map +1 -0
- package/dist/{chunk-RLNCRDAL.js → chunk-G2TOUG2A.js} +7 -6
- package/dist/chunk-G2TOUG2A.js.map +1 -0
- package/dist/{chunk-VQFILXQN.js → chunk-HRP4UFWN.js} +70 -8
- 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-ITW5UCVU.js +24 -0
- package/dist/chunk-ITW5UCVU.js.map +1 -0
- package/dist/{chunk-F64Z42PJ.js → chunk-JJHEVW4M.js} +5 -6
- package/dist/chunk-JJHEVW4M.js.map +1 -0
- package/dist/{chunk-7NHY2CRA.js → chunk-JUC35N3C.js} +2 -2
- package/dist/chunk-JUC35N3C.js.map +1 -0
- package/dist/{chunk-PXQBJMPJ.js → chunk-LFJ4C7ZP.js} +7 -7
- package/dist/chunk-LFJ4C7ZP.js.map +1 -0
- package/dist/{chunk-TDHLZY6I.js → chunk-MCOIR3CK.js} +77 -18
- package/dist/chunk-MCOIR3CK.js.map +1 -0
- package/dist/chunk-NATK4DDW.js +108 -0
- package/dist/chunk-NATK4DDW.js.map +1 -0
- 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-UKPX3RIP.js → chunk-ODO2TCTS.js} +27 -13
- package/dist/chunk-ODO2TCTS.js.map +1 -0
- package/dist/{chunk-M2KGLH2G.js → chunk-P3QSWNED.js} +11 -11
- package/dist/{chunk-M2KGLH2G.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-2YGHPQ66.js → chunk-Q5N24VII.js} +2 -2
- package/dist/{chunk-2YGHPQ66.js.map → chunk-Q5N24VII.js.map} +1 -1
- package/dist/{chunk-VJXP256V.js → chunk-RLRZJAF7.js} +20 -8
- package/dist/chunk-RLRZJAF7.js.map +1 -0
- package/dist/{chunk-VZXML7EH.js → chunk-SY5UA6WS.js} +39 -10
- package/dist/chunk-SY5UA6WS.js.map +1 -0
- package/dist/{chunk-XKDR22VE.js → chunk-TFC5SCAB.js} +37 -14
- 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-JINATP4N.js → chunk-VXQ7A6ZI.js} +8 -9
- package/dist/chunk-VXQ7A6ZI.js.map +1 -0
- package/dist/{chunk-TBLPZQSI.js → chunk-W7CHDHRV.js} +114 -42
- package/dist/chunk-W7CHDHRV.js.map +1 -0
- package/dist/{chunk-AIAPXRCI.js → chunk-WBWVOOKM.js} +201 -123
- 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-TRPAKUIB.js → chunk-WMTOAYGP.js} +9 -9
- package/dist/{chunk-TRPAKUIB.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-F2TB3TT6.js → chunk-XCTMTOGT.js} +5 -5
- package/dist/{chunk-F2TB3TT6.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-UHUQBUVG.js +133 -0
- package/dist/crossfade-UHUQBUVG.js.map +1 -0
- package/dist/date-field.js +27 -22
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +25 -41
- package/dist/date-range-field.js +463 -279
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +28 -23
- 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 +44 -42
- package/dist/dialog.js.map +1 -1
- package/dist/dropdown.css +14 -11
- package/dist/dropdown.js +79 -37
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +22 -21
- 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/menu-surface.css +81 -7
- package/dist/modal.js +11 -10
- 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 +10 -0
- package/dist/motion.js.map +1 -0
- package/dist/multi-select.js +63 -24
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +122 -75
- package/dist/number-field.js.map +1 -1
- package/dist/odometer.css +27 -16
- package/dist/odometer.js +225 -73
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +49 -12
- 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/{paint-CJQCM6ZO.js → paint-NLTI6TEF.js} +5 -3
- package/dist/paint-NLTI6TEF.js.map +1 -0
- package/dist/popover.js +12 -11
- package/dist/radio-group.css +9 -6
- 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 +55 -7
- package/dist/select.js +29 -15
- package/dist/select.js.map +1 -1
- package/dist/sheet.js +12 -11
- package/dist/support-rail.css +2 -2
- package/dist/support-rail.js +17 -15
- package/dist/support-rail.js.map +1 -1
- package/dist/table-detail.css +27 -0
- package/dist/table.css +41 -14
- package/dist/table.js +341 -172
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +32 -13
- package/dist/tabs.js +69 -55
- 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 +26 -41
- package/dist/textarea.js +43 -32
- package/dist/textarea.js.map +1 -1
- package/dist/theme-grid.js +8 -7
- package/dist/theme-switcher.js +19 -18
- package/dist/theme-switcher.js.map +1 -1
- package/dist/{theme-transition-VGLPZDJI.js → theme-transition-F3CBENM5.js} +29 -9
- package/dist/theme-transition-F3CBENM5.js.map +1 -0
- package/dist/theme-transition.css +49 -0
- package/dist/theme.js +5 -4
- package/dist/theme.js.map +1 -1
- package/dist/tide-AGGMQEJV.js +4 -0
- package/dist/tide-AGGMQEJV.js.map +1 -0
- package/dist/tiktok.js +3 -3
- package/dist/time-field.js +15 -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 +2 -2
- package/dist/toggle-tag.js.map +1 -1
- package/dist/toggle.css +0 -1
- package/dist/toggle.js +4 -15
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +22 -17
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +0 -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 +8 -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 +21 -4
- package/dist/types/components/composites/dropdown/types.d.ts +9 -3
- package/dist/types/components/composites/scroll-area/ScrollArea.d.ts +29 -0
- package/dist/types/components/composites/select/MultiSelect.d.ts +31 -5
- package/dist/types/components/composites/select/Select.d.ts +20 -4
- package/dist/types/components/composites/select/core/index.d.ts +2 -1
- package/dist/types/components/composites/select/core/menu.d.ts +10 -5
- package/dist/types/components/composites/select/core/panel.d.ts +7 -4
- package/dist/types/components/composites/select/core/trigger.d.ts +7 -2
- package/dist/types/components/composites/select/core/types.d.ts +9 -0
- package/dist/types/components/composites/select/core/use-listbox.d.ts +8 -6
- 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 +4 -69
- 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/Odometer.d.ts +1 -1
- package/dist/types/components/expressive/odometer/roll.d.ts +18 -0
- package/dist/types/components/expressive/odometer/spring.d.ts +11 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +3 -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/menu/highlight.d.ts +9 -1
- package/dist/types/components/internal/menu/menu-row.d.ts +4 -0
- package/dist/types/components/internal/menu/use-anchor-width.d.ts +2 -0
- package/dist/types/components/internal/overlay/layer.d.ts +5 -8
- package/dist/types/components/internal/overlay/track-anchor.d.ts +5 -0
- package/dist/types/components/internal/support/types.d.ts +1 -1
- package/dist/types/components/internal/utils/activation.d.ts +1 -0
- package/dist/types/components/primitives/badge/Badge.d.ts +17 -8
- package/dist/types/components/primitives/badge/morph-label.d.ts +3 -0
- package/dist/types/components/primitives/badge/use-glint-on-change.d.ts +2 -0
- 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 +7 -3
- 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 +5 -3
- package/dist/types/components/primitives/textarea/char-meter.d.ts +6 -0
- package/dist/types/components/primitives/toggle/switch-glyph.d.ts +6 -0
- 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 +4 -0
- package/dist/types/motion/element.d.ts +16 -4
- package/dist/types/motion/flip.d.ts +12 -3
- package/dist/types/motion/holders.d.ts +4 -0
- package/dist/types/motion/motion.d.ts +7 -0
- package/dist/types/motion/use-motion.d.ts +3 -1
- package/dist/types/theme-scope.d.ts +5 -0
- package/dist/types/tokens/component-styles.generated.d.ts +0 -2
- 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 +77 -59
- 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 +16 -11
- package/skills/zyncat-ui/SKILL.md +8 -8
- package/skills/zyncat-ui/references/components.md +6 -5
- package/skills/zyncat-ui/references/recipes.md +1 -1
- package/skills/zyncat-ui/references/theming.md +3 -3
- 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 +4 -0
- package/src/components/composites/date-picker/DateRangeField.tsx +15 -18
- package/src/components/composites/date-picker/DateTimeField.tsx +4 -0
- package/src/components/composites/date-picker/TimeField.tsx +12 -4
- package/src/components/composites/date-picker/date-picker.css +25 -41
- package/src/components/composites/date-picker/date-utils.ts +4 -0
- package/src/components/composites/date-picker/field-shell.tsx +45 -8
- 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 +49 -7
- package/src/components/composites/dropdown/Dropdown.usage.md +2 -0
- package/src/components/composites/dropdown/dropdown.css +14 -11
- package/src/components/composites/dropdown/menu-panel.tsx +49 -26
- package/src/components/composites/dropdown/types.ts +9 -3
- 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 +71 -12
- package/src/components/composites/select/MultiSelect.usage.md +10 -0
- package/src/components/composites/select/Select.tsx +32 -2
- package/src/components/composites/select/Select.usage.md +13 -1
- package/src/components/composites/select/core/index.ts +2 -1
- package/src/components/composites/select/core/menu.tsx +34 -17
- package/src/components/composites/select/core/panel.tsx +62 -55
- package/src/components/composites/select/core/trigger.tsx +44 -13
- package/src/components/composites/select/core/types.ts +10 -0
- package/src/components/composites/select/core/use-listbox.ts +91 -38
- package/src/components/composites/select/presets.tsx +47 -0
- package/src/components/composites/select/select.css +55 -7
- 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 +41 -14
- 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 +23 -188
- package/src/components/composites/tabs/tab-panel.tsx +63 -0
- package/src/components/composites/tabs/tabs.css +32 -13
- 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 +10 -6
- 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 +78 -99
- package/src/components/expressive/odometer/Odometer.usage.md +2 -2
- package/src/components/expressive/odometer/odometer.css +27 -16
- package/src/components/expressive/odometer/roll.ts +139 -0
- package/src/components/expressive/odometer/spring.ts +86 -0
- package/src/components/expressive/theme-transition/bloom.ts +22 -2
- package/src/components/expressive/theme-transition/paint.ts +2 -0
- package/src/components/expressive/theme-transition/scene.ts +3 -0
- package/src/components/expressive/theme-transition/theme-transition.css +49 -0
- package/src/components/expressive/theme-transition/theme-transition.ts +21 -1
- package/src/components/expressive/theme-transition/tide.ts +15 -10
- 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/menu/highlight.ts +20 -2
- package/src/components/internal/menu/menu-row.tsx +36 -8
- package/src/components/internal/menu/menu-surface.css +81 -7
- package/src/components/internal/menu/use-anchor-width.ts +26 -0
- package/src/components/internal/overlay/layer.tsx +11 -23
- package/src/components/internal/overlay/overlay.css +1 -0
- package/src/components/internal/overlay/position.ts +17 -6
- package/src/components/internal/overlay/track-anchor.ts +69 -0
- package/src/components/internal/overlay/trigger.css +0 -1
- package/src/components/internal/support/types.ts +1 -1
- package/src/components/internal/utils/activation.ts +7 -2
- package/src/components/primitives/avatar/avatar.css +1 -1
- package/src/components/primitives/badge/Badge.tsx +38 -15
- package/src/components/primitives/badge/Badge.usage.md +12 -5
- package/src/components/primitives/badge/badge.css +20 -11
- package/src/components/primitives/badge/morph-label.tsx +71 -0
- package/src/components/primitives/badge/use-glint-on-change.ts +16 -0
- 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 +52 -11
- 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 +9 -6
- 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 +44 -30
- package/src/components/primitives/textarea/char-meter.tsx +19 -0
- package/src/components/primitives/textarea/textarea.css +26 -41
- package/src/components/primitives/toggle/Toggle.tsx +3 -12
- package/src/components/primitives/toggle/switch-glyph.tsx +25 -0
- package/src/components/primitives/toggle/toggle.css +0 -1
- package/src/engine/animate.ts +5 -3
- package/src/engine/flip.ts +28 -4
- 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 +143 -0
- package/src/motion/element.tsx +29 -8
- package/src/motion/flip.ts +102 -31
- package/src/motion/glide.tsx +5 -0
- package/src/motion/holders.ts +10 -0
- package/src/motion/motion.ts +7 -0
- package/src/motion/motion.usage.md +34 -0
- package/src/motion/presence.tsx +22 -9
- package/src/motion/use-motion.ts +45 -6
- package/src/theme-scope.ts +19 -0
- package/src/tokens/base.css +7 -5
- package/src/tokens/color.css +17 -15
- package/src/tokens/component-styles.generated.ts +0 -2
- package/src/tokens/dark.css +8 -5
- package/src/tokens/decisions.css +5 -3
- 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 +20 -14
- 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 +78 -59
- package/src/tokens/theme.tsx +1 -1
- package/tailwind.css +6 -0
- package/dist/bloom-HV23M4AW.js.map +0 -1
- package/dist/chunk-2DNKZ57E.js +0 -72
- package/dist/chunk-2DNKZ57E.js.map +0 -1
- package/dist/chunk-6H3IJ752.js.map +0 -1
- package/dist/chunk-7NHY2CRA.js.map +0 -1
- package/dist/chunk-AIAPXRCI.js.map +0 -1
- package/dist/chunk-BRKGYLEQ.js.map +0 -1
- package/dist/chunk-F64Z42PJ.js.map +0 -1
- package/dist/chunk-JINATP4N.js.map +0 -1
- package/dist/chunk-KSAJ6DED.js +0 -16
- package/dist/chunk-KSAJ6DED.js.map +0 -1
- package/dist/chunk-LNAV5E7S.js.map +0 -1
- package/dist/chunk-N43NDSME.js.map +0 -1
- package/dist/chunk-ODRO3KS6.js.map +0 -1
- package/dist/chunk-PXQBJMPJ.js.map +0 -1
- package/dist/chunk-QDAN43B6.js.map +0 -1
- package/dist/chunk-RJENXXTI.js +0 -93
- package/dist/chunk-RJENXXTI.js.map +0 -1
- package/dist/chunk-RLNCRDAL.js.map +0 -1
- package/dist/chunk-RW2A4M2Q.js +0 -57
- package/dist/chunk-RW2A4M2Q.js.map +0 -1
- package/dist/chunk-TBLPZQSI.js.map +0 -1
- package/dist/chunk-TDHLZY6I.js.map +0 -1
- package/dist/chunk-UKPX3RIP.js.map +0 -1
- package/dist/chunk-V6QAAOA5.js.map +0 -1
- package/dist/chunk-VDOBLABP.js +0 -38
- package/dist/chunk-VDOBLABP.js.map +0 -1
- package/dist/chunk-VJXP256V.js.map +0 -1
- package/dist/chunk-VQFILXQN.js.map +0 -1
- package/dist/chunk-VZXML7EH.js.map +0 -1
- package/dist/chunk-XKDR22VE.js.map +0 -1
- package/dist/count-badge.js +0 -13
- package/dist/count-badge.js.map +0 -1
- package/dist/paint-CJQCM6ZO.js.map +0 -1
- package/dist/status-badge.js +0 -72
- package/dist/status-badge.js.map +0 -1
- package/dist/theme-transition-VGLPZDJI.js.map +0 -1
- package/dist/tide-DJZMDAFT.js.map +0 -1
- package/dist/types/components/primitives/badge/CountBadge.d.ts +0 -8
- package/dist/types/components/primitives/badge/StatusBadge.d.ts +0 -15
- package/src/components/primitives/badge/CountBadge.tsx +0 -20
- package/src/components/primitives/badge/CountBadge.usage.md +0 -13
- package/src/components/primitives/badge/StatusBadge.tsx +0 -113
- package/src/components/primitives/badge/StatusBadge.usage.md +0 -14
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import './date-picker.css';
|
|
2
2
|
import { type DateFieldBaseProps } from './field-shell';
|
|
3
|
-
import { type DateRange } from './range-
|
|
3
|
+
import { type DateRange } from './range-presets';
|
|
4
4
|
export type { DateRange };
|
|
5
5
|
export interface DateRangeFieldProps extends DateFieldBaseProps {
|
|
6
6
|
/** Controlled value - both endpoints, or null when empty. */
|
|
7
7
|
value?: DateRange | null;
|
|
8
8
|
/** Uncontrolled initial range. Use instead of `value`. @default null */
|
|
9
9
|
defaultValue?: DateRange | null;
|
|
10
|
-
/** Fires
|
|
10
|
+
/** Fires on Done with the range the panel shows, when it differs from the current one.
|
|
11
|
+
* Closing the panel any other way discards the pick. */
|
|
11
12
|
onChange?: (value: DateRange) => void;
|
|
12
13
|
/** Trigger text shown when no range is picked. @default 'Pick a date range' */
|
|
13
14
|
placeholder?: string;
|
|
@@ -17,5 +18,7 @@ export interface DateRangeFieldProps extends DateFieldBaseProps {
|
|
|
17
18
|
min?: string;
|
|
18
19
|
/** Latest pickable date, 'YYYY-MM-DD', inclusive. */
|
|
19
20
|
max?: string;
|
|
21
|
+
/** Longest pickable range in days, inclusive. After the first day pick, days further away disable, and so do quick picks that run longer. */
|
|
22
|
+
maxDays?: number;
|
|
20
23
|
}
|
|
21
|
-
export declare function DateRangeField({ value, defaultValue, onChange, label, placeholder, timezone, min, max, required, invalid, message, disabled, className, htmlProps, activateOn, animation, }: DateRangeFieldProps): import("react").JSX.Element;
|
|
24
|
+
export declare function DateRangeField({ value, defaultValue, onChange, label, ariaLabel, placeholder, timezone, min, max, maxDays, required, invalid, message, disabled, size, className, htmlProps, activateOn, animation, }: DateRangeFieldProps): import("react").JSX.Element;
|
|
@@ -20,4 +20,4 @@ export interface DateTimeFieldProps extends DateFieldBaseProps {
|
|
|
20
20
|
/** ↑/↓ step granularity in minutes (typing is exact). Default 5. */
|
|
21
21
|
minuteStep?: number;
|
|
22
22
|
}
|
|
23
|
-
export declare function DateTimeField({ value, defaultValue, onChange, label, placeholder, timezone, min, max, format, minuteStep, required, invalid, message, disabled, className, htmlProps, activateOn, animation, }: DateTimeFieldProps): import("react").JSX.Element;
|
|
23
|
+
export declare function DateTimeField({ value, defaultValue, onChange, label, ariaLabel, placeholder, timezone, min, max, format, minuteStep, required, invalid, message, disabled, size, className, htmlProps, activateOn, animation, }: DateTimeFieldProps): import("react").JSX.Element;
|
|
@@ -18,4 +18,4 @@ export interface TimeFieldProps extends DateFieldBaseProps {
|
|
|
18
18
|
/** Upper bound 'HH:mm' - saturates, never errors. */
|
|
19
19
|
max?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare function TimeField({ value, defaultValue, onChange, label, format, minuteStep, min, max, required, invalid, message, disabled, className, htmlProps, }: TimeFieldProps): import("react").JSX.Element;
|
|
21
|
+
export declare function TimeField({ value, defaultValue, onChange, label, ariaLabel, format, minuteStep, min, max, required, invalid, message, disabled, size, className, htmlProps, }: TimeFieldProps): import("react").JSX.Element;
|
|
@@ -7,6 +7,8 @@ export declare const today: () => string;
|
|
|
7
7
|
export declare const add: (k: string, days: number) => string;
|
|
8
8
|
export declare const col: (d: Date) => number;
|
|
9
9
|
export declare const within: (k: string, min?: string, max?: string) => boolean;
|
|
10
|
+
export declare const canTurn: (y: number, m: number, dir: number, min?: string, max?: string) => boolean;
|
|
11
|
+
export declare const clampKey: (k: string, min?: string, max?: string) => string;
|
|
10
12
|
export declare function displayDay(k: string | null): string | null;
|
|
11
13
|
export declare function grid(y: number, m: number): Date[];
|
|
12
14
|
export declare function tzLabel(tz: string, dateKey?: string): string;
|
|
@@ -7,6 +7,8 @@ import type { ActivateOn } from '../../internal/utils/activation';
|
|
|
7
7
|
export interface DateFieldBaseProps {
|
|
8
8
|
/** Field label rendered above the trigger. */
|
|
9
9
|
label?: string;
|
|
10
|
+
/** Accessible name for a field with no visible `label`. */
|
|
11
|
+
ariaLabel?: string;
|
|
10
12
|
/** Asterisk on the label. @default false */
|
|
11
13
|
required?: boolean;
|
|
12
14
|
/** Danger border + message color (.zc-fld.zc-is-error). @default false */
|
|
@@ -15,6 +17,9 @@ export interface DateFieldBaseProps {
|
|
|
15
17
|
message?: string;
|
|
16
18
|
/** Disable the field. @default false */
|
|
17
19
|
disabled?: boolean;
|
|
20
|
+
/** Control height, type and padding - the same scale as `TextField`, so a form row can hold one
|
|
21
|
+
* size throughout. @default 'md' */
|
|
22
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
23
|
/** Extra class on the field shell root. */
|
|
19
24
|
className?: string;
|
|
20
25
|
/** Standard <div> attributes (style, data-*, aria-*, ...) forwarded to the field shell root. */
|
|
@@ -27,7 +32,9 @@ export interface DateFieldBaseProps {
|
|
|
27
32
|
}
|
|
28
33
|
export interface FieldShellProps {
|
|
29
34
|
variant: string;
|
|
35
|
+
size?: 'sm' | 'md' | 'lg';
|
|
30
36
|
label?: string;
|
|
37
|
+
ariaLabel?: string;
|
|
31
38
|
required?: boolean;
|
|
32
39
|
invalid?: boolean;
|
|
33
40
|
message?: ReactNode;
|
|
@@ -36,7 +43,7 @@ export interface FieldShellProps {
|
|
|
36
43
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
37
44
|
children?: ReactNode;
|
|
38
45
|
}
|
|
39
|
-
export declare function FieldShell({ variant, label, required, invalid, message, icon, className, htmlProps, children, }: FieldShellProps): import("react").JSX.Element;
|
|
46
|
+
export declare function FieldShell({ variant, size, label, ariaLabel, required, invalid, message, icon, className, htmlProps, children, }: FieldShellProps): import("react").JSX.Element;
|
|
40
47
|
export declare function FieldTrigger({ display, placeholder, disabled, ...rest }: {
|
|
41
48
|
display: string | null;
|
|
42
49
|
placeholder: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
2
|
+
import type { RangePanel } from './use-range-panel';
|
|
3
|
+
interface RangeDayProps {
|
|
4
|
+
panel: RangePanel;
|
|
5
|
+
d: Date;
|
|
6
|
+
viewMonth: number;
|
|
7
|
+
months: number;
|
|
8
|
+
activateOn?: ActivateOn;
|
|
9
|
+
}
|
|
10
|
+
export declare function RangeDay({ panel, d, viewMonth, months, activateOn }: RangeDayProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
2
|
+
import type { RangePanel } from './use-range-panel';
|
|
3
|
+
interface RangeMonthProps {
|
|
4
|
+
panel: RangePanel;
|
|
5
|
+
offset: number;
|
|
6
|
+
withPrev: boolean;
|
|
7
|
+
withNext: boolean;
|
|
8
|
+
min?: string;
|
|
9
|
+
max?: string;
|
|
10
|
+
months: number;
|
|
11
|
+
activateOn?: ActivateOn;
|
|
12
|
+
}
|
|
13
|
+
export declare function RangeMonth({ panel, offset, withPrev, withNext, min, max, months, activateOn }: RangeMonthProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import './date-picker.css';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** Range start, inclusive - `'YYYY-MM-DD'`. */
|
|
6
|
-
start: string;
|
|
7
|
-
/** Range end, inclusive - `'YYYY-MM-DD'`. Never before `start`. */
|
|
8
|
-
end: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function drpRangeText(start: string, end: string): string;
|
|
11
|
-
interface DrpPanelProps {
|
|
12
|
-
value: DateRange | null;
|
|
13
|
-
commit: (value: DateRange) => void;
|
|
14
|
-
close: () => void;
|
|
15
|
-
min?: string;
|
|
16
|
-
max?: string;
|
|
2
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
3
|
+
import { type RangeOptions } from './use-range-panel';
|
|
4
|
+
interface DrpPanelProps extends Omit<RangeOptions, 'months'> {
|
|
17
5
|
timezone?: string;
|
|
18
6
|
label?: string;
|
|
19
|
-
months: number;
|
|
20
|
-
layout: 'popover' | 'sheet';
|
|
21
7
|
activateOn?: ActivateOn;
|
|
22
8
|
}
|
|
23
|
-
export declare function DrpPanel({ value, commit, close, min, max, timezone, label,
|
|
9
|
+
export declare function DrpPanel({ value, commit, close, min, max, maxDays, timezone, label, activateOn }: DrpPanelProps): import("react").JSX.Element;
|
|
24
10
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
2
|
+
/** A date range as wall-clock 'YYYY-MM-DD' endpoints, inclusive. */
|
|
3
|
+
export interface DateRange {
|
|
4
|
+
/** Range start, inclusive - `'YYYY-MM-DD'`. */
|
|
5
|
+
start: string;
|
|
6
|
+
/** Range end, inclusive - `'YYYY-MM-DD'`. Never before `start`. */
|
|
7
|
+
end: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DrpPreset {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
start: string;
|
|
13
|
+
end: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function drpRangeText(start: string, end: string): string;
|
|
16
|
+
export declare const drpDays: (start: string, end: string) => number;
|
|
17
|
+
interface RangePresetsProps {
|
|
18
|
+
draft: DateRange | null;
|
|
19
|
+
fits: (p: DrpPreset) => boolean;
|
|
20
|
+
onPick: (p: DrpPreset) => void;
|
|
21
|
+
activateOn?: ActivateOn;
|
|
22
|
+
}
|
|
23
|
+
export declare function RangePresets({ draft, fits, onPick, activateOn }: RangePresetsProps): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './date-picker.css';
|
|
2
|
+
import './range-sheet.css';
|
|
3
|
+
import './range-sheet-days.css';
|
|
4
|
+
import type { ActivateOn } from '../../internal/utils/activation';
|
|
5
|
+
import { type RangeOptions } from './use-range-panel';
|
|
6
|
+
interface DrpSheetProps extends Omit<RangeOptions, 'months'> {
|
|
7
|
+
title: string;
|
|
8
|
+
timezone?: string;
|
|
9
|
+
activateOn?: ActivateOn;
|
|
10
|
+
}
|
|
11
|
+
export declare function DrpSheet({ value, commit, close, min, max, maxDays, title, timezone, activateOn }: DrpSheetProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './range-summary.css';
|
|
2
|
+
import type { RangePanel } from './use-range-panel';
|
|
3
|
+
interface RangeSummaryProps {
|
|
4
|
+
panel: RangePanel;
|
|
5
|
+
title: string;
|
|
6
|
+
timezone?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function RangeSummary({ panel, title, timezone }: RangeSummaryProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function useMonthView(seed: Date): {
|
|
2
|
+
view: {
|
|
3
|
+
y: number;
|
|
4
|
+
m: number;
|
|
5
|
+
};
|
|
6
|
+
setView: import("react").Dispatch<import("react").SetStateAction<{
|
|
7
|
+
y: number;
|
|
8
|
+
m: number;
|
|
9
|
+
}>>;
|
|
10
|
+
viewIdx: number;
|
|
11
|
+
nav: (dir: number) => void;
|
|
12
|
+
navDir: number;
|
|
13
|
+
jumpToMonth: (y: number, m: number, offset: number) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
import { type DateRange, type DrpPreset } from './range-presets';
|
|
3
|
+
export interface RangeOptions {
|
|
4
|
+
value: DateRange | null;
|
|
5
|
+
commit: (value: DateRange) => void;
|
|
6
|
+
close: () => void;
|
|
7
|
+
min?: string;
|
|
8
|
+
max?: string;
|
|
9
|
+
maxDays?: number;
|
|
10
|
+
months: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function useRangePanel({ value, commit, close, min, max, maxDays, months }: RangeOptions): {
|
|
13
|
+
view: {
|
|
14
|
+
y: number;
|
|
15
|
+
m: number;
|
|
16
|
+
};
|
|
17
|
+
viewIdx: number;
|
|
18
|
+
navDir: number;
|
|
19
|
+
nav: (dir: number) => void;
|
|
20
|
+
jumpToMonth: (y: number, m: number, offset: number) => void;
|
|
21
|
+
draft: DateRange;
|
|
22
|
+
anchor: string;
|
|
23
|
+
focusKey: string;
|
|
24
|
+
setHoverKey: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
25
|
+
daysRef: import("react").RefObject<HTMLDivElement>;
|
|
26
|
+
gridGlide: {
|
|
27
|
+
ref: import("react").RefObject<HTMLSpanElement>;
|
|
28
|
+
enter: (target: HTMLElement | null) => void;
|
|
29
|
+
leave: () => void;
|
|
30
|
+
};
|
|
31
|
+
capLoId: string;
|
|
32
|
+
capHiId: string;
|
|
33
|
+
inBounds: (key: string) => boolean;
|
|
34
|
+
fits: (p: DrpPreset) => boolean;
|
|
35
|
+
lo: string;
|
|
36
|
+
hi: string;
|
|
37
|
+
provisional: boolean;
|
|
38
|
+
pickDay: (key: string) => void;
|
|
39
|
+
applyPreset: (p: DrpPreset) => void;
|
|
40
|
+
done: () => void;
|
|
41
|
+
onGridKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
|
|
42
|
+
todayKey: string;
|
|
43
|
+
};
|
|
44
|
+
export type RangePanel = ReturnType<typeof useRangePanel>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './dialog.css';
|
|
2
|
+
import './dialog-sheet.css';
|
|
2
3
|
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
4
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
5
|
import type { DisableableAnimation } from '../../../motion/timing';
|
|
@@ -18,7 +19,7 @@ export interface DialogProps {
|
|
|
18
19
|
title?: ReactNode;
|
|
19
20
|
/** Subtext under the title - wired to `aria-describedby`. @default null */
|
|
20
21
|
description?: ReactNode;
|
|
21
|
-
/** Panel width. @default 'md' */
|
|
22
|
+
/** Panel width. Below 40rem the dialog opens as a bottom sheet, and 'lg' fills its height. @default 'md' */
|
|
22
23
|
size?: 'sm' | 'md' | 'lg';
|
|
23
24
|
/** 'danger' tints the header icon badge + is the convention for destructive confirms. */
|
|
24
25
|
tone?: 'default' | 'danger';
|
|
@@ -41,4 +42,4 @@ export interface DialogProps {
|
|
|
41
42
|
/** Open/close timing - motion tokens only, or `null` to disable. @default open 'slow'/'entrance', close 'base'/'standard' */
|
|
42
43
|
animation?: DisableableAnimation;
|
|
43
44
|
}
|
|
44
|
-
export declare function Dialog({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn,
|
|
45
|
+
export declare function Dialog({ open: controlledOpen, defaultOpen, onOpenChange, trigger, activateOn, dismissible, container, id, animation, ...surfaceProps }: DialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
interface DialogSurfaceProps {
|
|
4
|
+
panelId: string;
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
tone?: 'default' | 'danger';
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
dismissible: boolean;
|
|
11
|
+
footer?: ReactNode | ((close: () => void) => ReactNode);
|
|
12
|
+
requestClose: () => void;
|
|
13
|
+
htmlProps?: HTMLAttributes<HTMLElement> & DataAttributes;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function DialogSurface({ panelId, size, tone, icon, title, description, dismissible, footer, requestClose, htmlProps, children, }: DialogSurfaceProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -2,15 +2,22 @@ import './dropdown.css';
|
|
|
2
2
|
import { type HTMLAttributes, type ReactElement } from 'react';
|
|
3
3
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
4
|
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
-
import type {
|
|
5
|
+
import type { MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
|
|
6
|
+
import type { VirtualAnchor } from '../../internal/overlay/position';
|
|
7
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
6
8
|
import { type DropdownItem, type DropdownItems } from './types';
|
|
7
9
|
export type { DropdownItem, DropdownGroup } from './types';
|
|
8
10
|
export interface DropdownProps {
|
|
9
11
|
/** The rows - a flat `DropdownItem[]`, or `DropdownGroup[]` to render divided sections.
|
|
10
12
|
* A row with its own `items` opens a submenu instead of committing. @default [] */
|
|
11
13
|
items: DropdownItems;
|
|
12
|
-
/** Cloned to toggle the menu, and used as the anchor
|
|
13
|
-
|
|
14
|
+
/** Cloned to toggle the menu, and used as the anchor unless `anchor` is set. Gets the
|
|
15
|
+
* `aria-haspopup="menu"` wiring. */
|
|
16
|
+
trigger?: ReactElement | null;
|
|
17
|
+
/** Anchor to an arbitrary rect instead of the trigger - any `{ getBoundingClientRect() }`, which an element
|
|
18
|
+
* also satisfies. Drive `open` yourself, name the menu with `ariaLabel` when there is no trigger, and pass
|
|
19
|
+
* a new object to re-place a moving anchor. Submenus always anchor to their row. */
|
|
20
|
+
anchor?: VirtualAnchor | null;
|
|
14
21
|
/** Whether the trigger and the rows fire on `pointerdown` (snappier) or wait for `click`. @default 'pointerdown' */
|
|
15
22
|
activateOn?: ActivateOn;
|
|
16
23
|
/** Controlled open state. Omit to stay uncontrolled. */
|
|
@@ -31,6 +38,16 @@ export interface DropdownProps {
|
|
|
31
38
|
/** Hue of the highlight that travels between rows: the neutral wash, or the accent wash with accent
|
|
32
39
|
* ink on the active row. @default 'neutral' */
|
|
33
40
|
highlight?: 'neutral' | 'accent';
|
|
41
|
+
/** Menu density - row type and padding on every row, submenus included; a row carrying a
|
|
42
|
+
* description sits one step taller than a plain one. The trigger is your own node, so this
|
|
43
|
+
* never touches it. @default 'md' */
|
|
44
|
+
size?: MenuSize;
|
|
45
|
+
/** Weight of every row label. @default 'medium' */
|
|
46
|
+
weight?: MenuWeight;
|
|
47
|
+
/** Width of the top-level menu. `auto` fits the rows, `trigger` is never narrower than the trigger,
|
|
48
|
+
* and `sm` | `md` | `lg` are fixed steps with long labels ellipsizing. Submenus always fit their
|
|
49
|
+
* rows. @default 'auto' */
|
|
50
|
+
width?: MenuWidth;
|
|
34
51
|
/** Short accent bar on the leading edge of the highlight, marking the active row. @default false */
|
|
35
52
|
rail?: boolean;
|
|
36
53
|
/** Base id for the menu and its rows; drives the trigger's `aria-controls`. Auto-generated when omitted. */
|
|
@@ -42,4 +59,4 @@ export interface DropdownProps {
|
|
|
42
59
|
/** Open/close timing - motion tokens only, or `null` to disable. @default open 'base'/'entrance', close 'fast'/'exit' */
|
|
43
60
|
animation?: DisableableAnimation;
|
|
44
61
|
}
|
|
45
|
-
export declare function Dropdown({ items, trigger, activateOn, open: controlledOpen, defaultOpen, onOpenChange, onSelect, returnFocus, side, align, highlight, rail, id, ariaLabel, htmlProps, animation, }: DropdownProps): import("react").JSX.Element;
|
|
62
|
+
export declare function Dropdown({ items, trigger, anchor, activateOn, open: controlledOpen, defaultOpen, onOpenChange, onSelect, returnFocus, side, align, highlight, rail, size, weight, width, id, ariaLabel, htmlProps, animation, }: DropdownProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
2
|
import type { DataAttributes } from '../../../dom-props';
|
|
3
3
|
import { type NormalizedGroup } from '../../internal/collection/collection';
|
|
4
|
-
import type { MenuHighlight } from '../../internal/menu/highlight';
|
|
4
|
+
import type { MenuHighlight, MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
|
|
5
|
+
import type { VirtualAnchor } from '../../internal/overlay/position';
|
|
5
6
|
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
7
|
export interface DropdownItem {
|
|
7
8
|
/** Unique id - what `onSelect` receives, and what identifies this row's open submenu. */
|
|
@@ -12,7 +13,7 @@ export interface DropdownItem {
|
|
|
12
13
|
description?: string;
|
|
13
14
|
/** Your own icon node shown before the label. */
|
|
14
15
|
icon?: ReactNode;
|
|
15
|
-
/** Keyboard hint shown at the trailing edge
|
|
16
|
+
/** Keyboard hint shown at the trailing edge. Display only - you still bind the key. */
|
|
16
17
|
shortcut?: string;
|
|
17
18
|
/** Destructive action - the row reads in the danger hue. @default false */
|
|
18
19
|
danger?: boolean;
|
|
@@ -58,15 +59,20 @@ export interface Level {
|
|
|
58
59
|
ownerIdx: number;
|
|
59
60
|
}
|
|
60
61
|
export declare function resolveLevels(items: DropdownItems, path: string[]): Level[];
|
|
61
|
-
export type SeedFocus = 'first' | 'last' | 'none';
|
|
62
|
+
export type SeedFocus = 'first' | 'last' | 'selected' | 'none';
|
|
62
63
|
export interface MenuChain {
|
|
63
64
|
levels: Level[];
|
|
64
65
|
menuId: string;
|
|
66
|
+
triggerId: string;
|
|
67
|
+
anchor?: VirtualAnchor | null;
|
|
65
68
|
activateOn?: ActivateOn;
|
|
66
69
|
side: 'top' | 'bottom' | 'left' | 'right';
|
|
67
70
|
align: 'start' | 'center' | 'end';
|
|
68
71
|
highlight: MenuHighlight;
|
|
69
72
|
rail: boolean;
|
|
73
|
+
size: MenuSize;
|
|
74
|
+
weight: MenuWeight;
|
|
75
|
+
width: MenuWidth;
|
|
70
76
|
ariaLabel?: string;
|
|
71
77
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
72
78
|
seed: {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './scroll-area.css';
|
|
2
|
+
import { type CSSProperties, type ReactNode, type Ref } from 'react';
|
|
3
|
+
import { type ActivateOn } from '../../internal/utils/activation';
|
|
4
|
+
export interface ScrollAreaProps {
|
|
5
|
+
/** Scroll direction. `'x'` lays the children out as a rail, one item each, with a paging door
|
|
6
|
+
* on each faded edge for a mouse. @default 'y' */
|
|
7
|
+
axis?: 'x' | 'y';
|
|
8
|
+
/** `'fade'` fades an edge while content hides past it. `'depth'` also shrinks each child as it
|
|
9
|
+
* crosses a faded edge; pass the items as direct children. @default 'fade' */
|
|
10
|
+
variant?: 'fade' | 'depth';
|
|
11
|
+
/** With `axis="x"`, sizes the row to the scroller instead of to its items: `flex: 1` children
|
|
12
|
+
* share its width down to their `min-width` and then scroll, and every child fills its height.
|
|
13
|
+
* For a board or a toolbar. @default false */
|
|
14
|
+
fill?: boolean;
|
|
15
|
+
/** Names the scroller as a region landmark. Omit for an unnamed scroller. */
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
/** The element that scrolls: a virtualizer's `getScrollElement`, an IntersectionObserver's
|
|
18
|
+
* `root`, or `scrollTo` for a jump. */
|
|
19
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
|
+
/** When a rail's edge door pages: on `pointerdown` (snappier) or on `click`. @default 'pointerdown' */
|
|
21
|
+
activateOn?: ActivateOn;
|
|
22
|
+
/** Extra class(es) merged onto the root. */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Inline styles merged onto the root. A `'y'` scroller takes its height or max-height here. */
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
/** The scrolled content. */
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare function ScrollArea({ axis, variant, fill, ariaLabel, ref, activateOn, className, style, children, }: ScrollAreaProps): import("react").JSX.Element;
|
|
@@ -2,9 +2,12 @@ import './select.css';
|
|
|
2
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
4
|
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import type { MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
|
|
5
6
|
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
|
-
import { type SelectGroup, type SelectOption } from './core';
|
|
7
|
+
import { type CustomTrigger, type SelectGroup, type SelectMenuHtmlProps, type SelectOption } from './core';
|
|
8
|
+
import { type MultiSelectPreset } from './presets';
|
|
7
9
|
export type { SelectOption, SelectGroup } from './core';
|
|
10
|
+
export type { MultiSelectPreset } from './presets';
|
|
8
11
|
export interface MultiSelectProps {
|
|
9
12
|
/** The choices - a flat `SelectOption[]`, or `SelectGroup[]` to render labeled sections. @default [] */
|
|
10
13
|
options: SelectOption[] | SelectGroup[];
|
|
@@ -12,12 +15,28 @@ export interface MultiSelectProps {
|
|
|
12
15
|
value?: string[];
|
|
13
16
|
/** Initial selection when uncontrolled. @default [] */
|
|
14
17
|
defaultValue?: string[];
|
|
15
|
-
/** Fires with the NEXT array and the option that was toggled
|
|
16
|
-
|
|
18
|
+
/** Fires with the NEXT array and the option that was toggled, or no option when a preset replaced
|
|
19
|
+
* the selection. Committing keeps the menu open. */
|
|
20
|
+
onChange?: (value: string[], toggled?: SelectOption) => void;
|
|
21
|
+
/** One-press selections, shown as chips between the filter field and the list. A press replaces
|
|
22
|
+
* the selection with the preset's `value` as given and keeps the menu open. @default [] */
|
|
23
|
+
presets?: MultiSelectPreset[];
|
|
17
24
|
/** Trigger text when nothing is selected. @default 'Select options' */
|
|
18
25
|
placeholder?: string;
|
|
19
|
-
/**
|
|
26
|
+
/** Trigger height, type and padding. The menu follows it unless `menuSize` overrides. @default 'md' */
|
|
20
27
|
size?: 'sm' | 'md' | 'lg';
|
|
28
|
+
/** Menu density on its own - row type, row padding, the filter field and the row checkbox. A row
|
|
29
|
+
* carrying a description sits one step taller than a plain one at every step. @default the `size` value */
|
|
30
|
+
menuSize?: MenuSize;
|
|
31
|
+
/** Weight of every option label in the menu. @default 'medium' */
|
|
32
|
+
weight?: MenuWeight;
|
|
33
|
+
/** Glyph mirroring each option's selected state at the trailing edge: a checkbox, or a switch for a
|
|
34
|
+
* settings-style menu where every option is an independent on/off. Decoration only - the option
|
|
35
|
+
* semantics are the same either way. @default 'checkbox' */
|
|
36
|
+
marker?: 'checkbox' | 'switch';
|
|
37
|
+
/** Menu width. `trigger` is never narrower than the trigger, `auto` fits the options, and
|
|
38
|
+
* `sm` | `md` | `lg` are fixed steps with long labels ellipsizing. @default 'trigger' */
|
|
39
|
+
width?: MenuWidth;
|
|
21
40
|
/** Disabled - trigger is inert and the menu cannot open. @default false */
|
|
22
41
|
disabled?: boolean;
|
|
23
42
|
/** Danger ring + border. @default false */
|
|
@@ -41,10 +60,17 @@ export interface MultiSelectProps {
|
|
|
41
60
|
ariaLabel?: string;
|
|
42
61
|
/** Standard <div> attributes (className, style, data-*, ...) forwarded to the select root. */
|
|
43
62
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
63
|
+
/** Standard attributes (className, style, data-*, ...) forwarded to the menu panel, which portals
|
|
64
|
+
* to <body> and inherits nothing from the root. */
|
|
65
|
+
menuProps?: SelectMenuHtmlProps;
|
|
44
66
|
/** Whether the trigger and the options fire on `pointerdown` (snappier) or wait for `click`.
|
|
45
67
|
* @default 'pointerdown' */
|
|
46
68
|
activateOn?: ActivateOn;
|
|
47
69
|
/** Menu open/close timing - motion tokens only, or `null` to disable. @default duration 'base' + ease 'entrance'/'exit' */
|
|
48
70
|
animation?: DisableableAnimation;
|
|
71
|
+
/** Your own element in place of the built-in trigger. It is cloned with the combobox wiring - role,
|
|
72
|
+
* aria, open/close, arrow keys, and the anchor the menu measures - so it must render one focusable
|
|
73
|
+
* element that forwards its props and ref. Pass a function to read `{ open, selected }`. */
|
|
74
|
+
trigger?: CustomTrigger<SelectOption[]>;
|
|
49
75
|
}
|
|
50
|
-
export declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, highlight, rail, leadingIcon, id, ariaLabel, htmlProps, activateOn, animation, }: MultiSelectProps): import("react").JSX.Element;
|
|
76
|
+
export declare function MultiSelect({ options, value: controlledValue, defaultValue, onChange, presets, placeholder, size, menuSize, disabled, invalid, loading, searchable, searchPlaceholder, highlight, rail, weight, marker, width, leadingIcon, id, ariaLabel, htmlProps, menuProps, activateOn, animation, trigger, }: MultiSelectProps): import("react").JSX.Element;
|
|
@@ -2,8 +2,9 @@ import './select.css';
|
|
|
2
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
4
|
import type { DisableableAnimation } from '../../../motion/timing';
|
|
5
|
+
import type { MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
|
|
5
6
|
import type { ActivateOn } from '../../internal/utils/activation';
|
|
6
|
-
import { type SelectGroup, type SelectOption, type SelectTriggerHtmlProps } from './core';
|
|
7
|
+
import { type CustomTrigger, type SelectGroup, type SelectMenuHtmlProps, type SelectOption, type SelectTriggerHtmlProps } from './core';
|
|
7
8
|
export type { SelectOption, SelectGroup } from './core';
|
|
8
9
|
export interface SelectProps {
|
|
9
10
|
/** The choices - a flat `SelectOption[]`, or `SelectGroup[]` to render labeled sections. @default [] */
|
|
@@ -16,8 +17,16 @@ export interface SelectProps {
|
|
|
16
17
|
onChange?: (value: string, option: SelectOption) => void;
|
|
17
18
|
/** Trigger text when nothing is selected. @default 'Select an option' */
|
|
18
19
|
placeholder?: string;
|
|
19
|
-
/**
|
|
20
|
+
/** Trigger height, type and padding. The menu follows it unless `menuSize` overrides. @default 'md' */
|
|
20
21
|
size?: 'sm' | 'md' | 'lg';
|
|
22
|
+
/** Menu density on its own - row type, row padding and the filter field. A row carrying a
|
|
23
|
+
* description sits one step taller than a plain one at every step. @default the `size` value */
|
|
24
|
+
menuSize?: MenuSize;
|
|
25
|
+
/** Weight of every option label in the menu. @default 'medium' */
|
|
26
|
+
weight?: MenuWeight;
|
|
27
|
+
/** Menu width. `trigger` is never narrower than the trigger, `auto` fits the options, and
|
|
28
|
+
* `sm` | `md` | `lg` are fixed steps with long labels ellipsizing. @default 'trigger' */
|
|
29
|
+
width?: MenuWidth;
|
|
21
30
|
/** Disabled - trigger is inert and the menu cannot open. @default false */
|
|
22
31
|
disabled?: boolean;
|
|
23
32
|
/** Danger ring + border. @default false */
|
|
@@ -41,6 +50,9 @@ export interface SelectProps {
|
|
|
41
50
|
ariaLabel?: string;
|
|
42
51
|
/** Standard <div> attributes (className, style, data-*, ...) forwarded to the select root. */
|
|
43
52
|
htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
53
|
+
/** Standard attributes (className, style, data-*, ...) forwarded to the menu panel, which portals
|
|
54
|
+
* to <body> and inherits nothing from the root. */
|
|
55
|
+
menuProps?: SelectMenuHtmlProps;
|
|
44
56
|
/** Whether the trigger and the options fire on `pointerdown` (snappier) or wait for `click`.
|
|
45
57
|
* @default 'pointerdown' */
|
|
46
58
|
activateOn?: ActivateOn;
|
|
@@ -48,9 +60,13 @@ export interface SelectProps {
|
|
|
48
60
|
animation?: DisableableAnimation;
|
|
49
61
|
/** Standard <button> attributes (className, style, aria-*, data-*, ...) merged onto the trigger.
|
|
50
62
|
* `onClick` and `onKeyDown` run before the built-in open/close and arrow-key handling, which
|
|
51
|
-
* cannot be replaced - the trigger is the combobox. */
|
|
63
|
+
* cannot be replaced - the trigger is the combobox. Ignored when `trigger` replaces it. */
|
|
52
64
|
triggerProps?: SelectTriggerHtmlProps;
|
|
65
|
+
/** Your own element in place of the built-in trigger. It is cloned with the combobox wiring - role,
|
|
66
|
+
* aria, open/close, arrow keys, and the anchor the menu measures - so it must render one focusable
|
|
67
|
+
* element that forwards its props and ref. Pass a function to read `{ open, selected }`. */
|
|
68
|
+
trigger?: CustomTrigger<SelectOption | null>;
|
|
53
69
|
/** Show check icon on selected value */
|
|
54
70
|
showCheck?: boolean;
|
|
55
71
|
}
|
|
56
|
-
export declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, size, disabled, invalid, loading, searchable, searchPlaceholder, highlight, rail, leadingIcon, id, ariaLabel, htmlProps, activateOn, animation, triggerProps, showCheck, }: SelectProps): import("react").JSX.Element;
|
|
72
|
+
export declare function Select({ options, value: controlledValue, defaultValue, onChange, placeholder, size, menuSize, disabled, invalid, loading, searchable, searchPlaceholder, highlight, rail, weight, width, leadingIcon, id, ariaLabel, htmlProps, menuProps, activateOn, animation, triggerProps, trigger, showCheck, }: SelectProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useListbox } from './use-listbox';
|
|
2
|
-
export { SelectTrigger, type SelectTriggerHtmlProps } from './trigger';
|
|
2
|
+
export { SelectTrigger, type CustomTrigger, type SelectTriggerHtmlProps } from './trigger';
|
|
3
3
|
export { ListboxPanel } from './panel';
|
|
4
|
+
export type { SelectMenuHtmlProps } from './menu';
|
|
4
5
|
export type { SelectOption, SelectGroup } from './types';
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
1
|
+
import { type HTMLAttributes, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import type { DataAttributes } from '../../../../dom-props';
|
|
2
3
|
import type { DisableableAnimation } from '../../../../motion/timing';
|
|
3
|
-
import { type
|
|
4
|
-
|
|
4
|
+
import { type MenuSurfaceProps } from '../../../internal/menu/highlight';
|
|
5
|
+
import { type VirtualAnchor } from '../../../internal/overlay/position';
|
|
6
|
+
export type SelectMenuHtmlProps = HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
7
|
+
export interface SelectMenuProps extends MenuSurfaceProps {
|
|
5
8
|
open: boolean;
|
|
6
9
|
menuId: string;
|
|
7
10
|
requestClose: () => void;
|
|
8
|
-
triggerRef: RefObject<
|
|
11
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
12
|
+
anchor?: VirtualAnchor | null;
|
|
9
13
|
multiple?: boolean;
|
|
10
14
|
animation?: DisableableAnimation;
|
|
15
|
+
menuProps?: SelectMenuHtmlProps;
|
|
11
16
|
children?: ReactNode;
|
|
12
17
|
}
|
|
13
|
-
export declare function SelectMenu({ open, menuId, requestClose, triggerRef, multiple, highlight, rail, animation, children, }: SelectMenuProps): import("react").JSX.Element;
|
|
18
|
+
export declare function SelectMenu({ open, menuId, requestClose, triggerRef, anchor, multiple, highlight, rail, size, weight, width, animation, menuProps, children, }: SelectMenuProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import '../../../internal/menu/menu-surface.css';
|
|
2
|
-
import {
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
import type { DisableableAnimation } from '../../../../motion/timing';
|
|
4
|
-
import type {
|
|
4
|
+
import type { MenuSurfaceProps } from '../../../internal/menu/highlight';
|
|
5
5
|
import { type ActivateOn } from '../../../internal/utils/activation';
|
|
6
|
+
import { type SelectMenuHtmlProps, type SelectMenuProps } from './menu';
|
|
6
7
|
import type { ListboxState } from './use-listbox';
|
|
7
|
-
export interface ListboxPanelProps extends
|
|
8
|
+
export interface ListboxPanelProps extends MenuSurfaceProps, Pick<SelectMenuProps, 'anchor'> {
|
|
8
9
|
lb: ListboxState;
|
|
9
10
|
loading: boolean;
|
|
10
11
|
searchable: boolean;
|
|
@@ -13,6 +14,8 @@ export interface ListboxPanelProps extends MenuHighlightProps {
|
|
|
13
14
|
multiple?: boolean;
|
|
14
15
|
activateOn?: ActivateOn;
|
|
15
16
|
animation?: DisableableAnimation;
|
|
17
|
+
menuProps?: SelectMenuHtmlProps;
|
|
16
18
|
check?: (selected: boolean) => ReactNode;
|
|
19
|
+
presets?: ReactNode;
|
|
17
20
|
}
|
|
18
|
-
export declare function ListboxPanel({ lb, loading, searchable, searchPlaceholder, ariaLabel, multiple, highlight, rail, activateOn, animation, check, }: ListboxPanelProps): import("react").JSX.Element;
|
|
21
|
+
export declare function ListboxPanel({ lb, anchor, loading, searchable, searchPlaceholder, ariaLabel, multiple, highlight, rail, size, weight, width, activateOn, animation, menuProps, check, presets, }: ListboxPanelProps): import("react").JSX.Element;
|