@zyncat/ui 0.19.0 → 0.21.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.css +1 -2
- package/dist/alert.js +6 -6
- package/dist/avatar.css +1 -1
- package/dist/badge.css +21 -12
- package/dist/badge.js +100 -2
- package/dist/badge.js.map +1 -1
- package/dist/{bloom-HV23M4AW.js → bloom-5MZXLNKG.js} +23 -5
- package/dist/bloom-5MZXLNKG.js.map +1 -0
- package/dist/button.css +1 -2
- package/dist/button.js +2 -2
- package/dist/checkbox.css +1 -1
- package/dist/{chunk-JINATP4N.js → chunk-2W7FOMWE.js} +7 -8
- package/dist/chunk-2W7FOMWE.js.map +1 -0
- package/dist/{chunk-LNAV5E7S.js → chunk-3HE7N3UK.js} +7 -3
- package/dist/chunk-3HE7N3UK.js.map +1 -0
- package/dist/{chunk-UKPX3RIP.js → chunk-47OMFFIB.js} +3 -3
- package/dist/{chunk-UKPX3RIP.js.map → chunk-47OMFFIB.js.map} +1 -1
- package/dist/chunk-4M5FMCFJ.js +16 -0
- package/dist/chunk-4M5FMCFJ.js.map +1 -0
- package/dist/chunk-6BY5G7BI.js +122 -0
- package/dist/chunk-6BY5G7BI.js.map +1 -0
- package/dist/{chunk-RLNCRDAL.js → chunk-AOEO2LCZ.js} +4 -4
- package/dist/{chunk-RLNCRDAL.js.map → chunk-AOEO2LCZ.js.map} +1 -1
- package/dist/{chunk-BRKGYLEQ.js → chunk-AQMR7ZYO.js} +8 -3
- package/dist/chunk-AQMR7ZYO.js.map +1 -0
- package/dist/{chunk-N43NDSME.js → chunk-AXZBD7LY.js} +6 -3
- package/dist/chunk-AXZBD7LY.js.map +1 -0
- package/dist/{chunk-V6QAAOA5.js → chunk-BWGK3OD6.js} +9 -6
- package/dist/chunk-BWGK3OD6.js.map +1 -0
- package/dist/{chunk-VQFILXQN.js → chunk-CYZKPUCG.js} +70 -8
- package/dist/chunk-CYZKPUCG.js.map +1 -0
- package/dist/{chunk-AIAPXRCI.js → chunk-DEZIQTBW.js} +176 -103
- package/dist/chunk-DEZIQTBW.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-F64Z42PJ.js → chunk-GM7IPTTT.js} +5 -6
- package/dist/chunk-GM7IPTTT.js.map +1 -0
- package/dist/chunk-ITW5UCVU.js +24 -0
- package/dist/chunk-ITW5UCVU.js.map +1 -0
- package/dist/{chunk-TDHLZY6I.js → chunk-JQZ3FTHP.js} +77 -18
- package/dist/chunk-JQZ3FTHP.js.map +1 -0
- package/dist/{chunk-PXQBJMPJ.js → chunk-LC6NQQER.js} +3 -3
- package/dist/{chunk-PXQBJMPJ.js.map → chunk-LC6NQQER.js.map} +1 -1
- package/dist/{chunk-M2KGLH2G.js → chunk-LV442ZOR.js} +10 -10
- package/dist/{chunk-M2KGLH2G.js.map → chunk-LV442ZOR.js.map} +1 -1
- package/dist/{chunk-F2TB3TT6.js → chunk-PNFFK5HY.js} +4 -4
- package/dist/{chunk-F2TB3TT6.js.map → chunk-PNFFK5HY.js.map} +1 -1
- 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-XKDR22VE.js → chunk-SPFHWHJ6.js} +8 -4
- package/dist/chunk-SPFHWHJ6.js.map +1 -0
- package/dist/{chunk-TRPAKUIB.js → chunk-TBIY5YR5.js} +8 -8
- package/dist/{chunk-TRPAKUIB.js.map → chunk-TBIY5YR5.js.map} +1 -1
- package/dist/chunk-TXJQUN7C.js +108 -0
- package/dist/chunk-TXJQUN7C.js.map +1 -0
- package/dist/{chunk-VZXML7EH.js → chunk-V4ZN5RD4.js} +12 -3
- package/dist/chunk-V4ZN5RD4.js.map +1 -0
- package/dist/{chunk-VJXP256V.js → chunk-ZSP4ZTII.js} +7 -7
- package/dist/{chunk-VJXP256V.js.map → chunk-ZSP4ZTII.js.map} +1 -1
- package/dist/collapse.css +1 -1
- package/dist/confetti.css +1 -1
- package/dist/confetti.js +1 -1
- package/dist/crossfade-XFZLFLT7.js +91 -0
- package/dist/crossfade-XFZLFLT7.js.map +1 -0
- package/dist/date-field.js +20 -18
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +7 -8
- package/dist/date-range-field.js +22 -20
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +21 -19
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +1 -2
- package/dist/dialog.js +9 -9
- package/dist/digit-strip.css +1 -1
- package/dist/dropdown.css +13 -10
- package/dist/dropdown.js +37 -20
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +14 -14
- package/dist/facebook-feed.css +1 -1
- package/dist/flow-field.css +1 -1
- package/dist/flow-field.js +1 -1
- package/dist/glide.js +2 -2
- package/dist/icon.css +1 -1
- package/dist/input.css +1 -4
- package/dist/instagram-feed.css +1 -1
- package/dist/instagram-feed.js +2 -2
- package/dist/lens.css +1 -1
- package/dist/lens.js +1 -1
- package/dist/menu-surface.css +82 -8
- package/dist/modal.css +1 -1
- package/dist/modal.js +8 -8
- package/dist/morphing-text.css +1 -1
- package/dist/morphing-text.js +1 -1
- package/dist/motion-devtools.css +1 -1
- package/dist/motion-devtools.js +3 -3
- package/dist/motion.js +9 -0
- package/dist/motion.js.map +1 -0
- package/dist/multi-select.js +34 -16
- package/dist/multi-select.js.map +1 -1
- package/dist/number-field.js +2 -2
- package/dist/odometer.css +17 -11
- package/dist/odometer.js +105 -72
- package/dist/odometer.js.map +1 -1
- package/dist/otp-field.js +17 -9
- package/dist/otp-field.js.map +1 -1
- package/dist/overlay.css +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +4 -4
- package/dist/{paint-CJQCM6ZO.js → paint-NLTI6TEF.js} +5 -3
- package/dist/paint-NLTI6TEF.js.map +1 -0
- package/dist/popover.css +1 -1
- package/dist/popover.js +9 -9
- package/dist/radio-group.css +11 -5
- package/dist/radio-group.js +5 -5
- package/dist/select.css +34 -8
- package/dist/select.js +25 -12
- package/dist/select.js.map +1 -1
- package/dist/sheet.css +1 -1
- package/dist/sheet.js +9 -9
- package/dist/spinner.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/support-rail.css +7 -2
- package/dist/support-rail.js +11 -11
- package/dist/table.css +10 -5
- package/dist/table.js +7 -7
- package/dist/tabs.css +32 -7
- package/dist/tabs.js +55 -44
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +1 -1
- package/dist/tag.js +4 -4
- package/dist/textarea.css +14 -2
- package/dist/textarea.js +36 -23
- package/dist/textarea.js.map +1 -1
- package/dist/theme-grid.js +5 -5
- package/dist/theme-switcher.css +1 -2
- package/dist/theme-switcher.js +14 -14
- package/dist/{theme-transition-VGLPZDJI.js → theme-transition-FDF2REFD.js} +27 -7
- package/dist/theme-transition-FDF2REFD.js.map +1 -0
- package/dist/theme-transition.css +50 -1
- package/dist/theme.js +2 -2
- 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.css +1 -1
- package/dist/tiktok.js +2 -2
- package/dist/time-field.js +5 -3
- package/dist/time-field.js.map +1 -1
- package/dist/toast.css +1 -1
- package/dist/toast.js +7 -7
- package/dist/toggle-tag.js +2 -2
- package/dist/toggle.css +1 -1
- package/dist/toggle.js +4 -15
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +6 -7
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +1 -2
- package/dist/types/components/composites/date-picker/DateField.d.ts +1 -1
- package/dist/types/components/composites/date-picker/DateRangeField.d.ts +1 -1
- 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/field-shell.d.ts +5 -1
- package/dist/types/components/composites/dropdown/Dropdown.d.ts +13 -2
- package/dist/types/components/composites/dropdown/types.d.ts +5 -2
- package/dist/types/components/composites/select/MultiSelect.d.ts +23 -3
- 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 +8 -5
- package/dist/types/components/composites/select/core/panel.d.ts +6 -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 +5 -3
- package/dist/types/components/composites/tabs/Tabs.d.ts +6 -1
- package/dist/types/components/expressive/odometer/Odometer.d.ts +1 -1
- package/dist/types/components/expressive/odometer/roll.d.ts +20 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +3 -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/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/input/OtpField.d.ts +2 -2
- package/dist/types/components/primitives/textarea/Textarea.d.ts +2 -2
- 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/motion/crossfade.d.ts +3 -0
- package/dist/types/motion/element.d.ts +6 -3
- package/dist/types/motion/flip.d.ts +8 -2
- package/dist/types/motion/motion.d.ts +7 -0
- package/dist/types/theme-scope.d.ts +5 -0
- package/dist/types/tokens/component-styles.generated.d.ts +0 -2
- package/dist/types/tokens/theme-tokens.generated.d.ts +38 -32
- package/dist/typing-lines.css +1 -1
- package/dist/typing-lines.js +1 -1
- package/dist/weight-field.css +1 -1
- package/dist/youtube.css +1 -1
- package/dist/youtube.js +2 -2
- package/package.json +6 -11
- package/skills/zyncat-ui/SKILL.md +2 -2
- package/skills/zyncat-ui/references/components.md +3 -4
- package/skills/zyncat-ui/references/theming.md +3 -3
- package/src/components/composites/alert/alert.css +1 -2
- package/src/components/composites/date-picker/DateField.tsx +2 -0
- package/src/components/composites/date-picker/DateRangeField.tsx +2 -0
- package/src/components/composites/date-picker/DateTimeField.tsx +2 -0
- package/src/components/composites/date-picker/TimeField.tsx +2 -0
- package/src/components/composites/date-picker/date-picker.css +7 -8
- package/src/components/composites/date-picker/field-shell.tsx +14 -1
- package/src/components/composites/dialog/dialog.css +1 -2
- package/src/components/composites/dropdown/Dropdown.tsx +20 -3
- package/src/components/composites/dropdown/Dropdown.usage.md +2 -0
- package/src/components/composites/dropdown/dropdown.css +13 -10
- package/src/components/composites/dropdown/menu-panel.tsx +28 -13
- package/src/components/composites/dropdown/types.ts +5 -2
- package/src/components/composites/emoji-picker/styles.css +1 -1
- package/src/components/composites/modal/modal.css +1 -1
- package/src/components/composites/pagination/pagination.css +1 -1
- package/src/components/composites/popover/popover.css +1 -1
- package/src/components/composites/select/MultiSelect.tsx +56 -5
- 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 +28 -15
- package/src/components/composites/select/core/panel.tsx +57 -52
- package/src/components/composites/select/core/trigger.tsx +44 -11
- package/src/components/composites/select/core/types.ts +10 -0
- package/src/components/composites/select/core/use-listbox.ts +77 -31
- package/src/components/composites/select/select.css +34 -8
- package/src/components/composites/sheet/sheet.css +1 -1
- package/src/components/composites/table/table.css +10 -5
- package/src/components/composites/tabs/Tabs.tsx +13 -1
- package/src/components/composites/tabs/tabs.css +32 -7
- package/src/components/composites/theme-switcher/theme-switcher.css +1 -2
- package/src/components/composites/toast/toast.css +1 -1
- package/src/components/composites/tooltip/tooltip-host.tsx +1 -1
- package/src/components/composites/tooltip/tooltip.css +1 -1
- package/src/components/compound/support-rail/support-rail.css +7 -2
- package/src/components/dev/motion-devtools.css +1 -1
- package/src/components/expressive/confetti/confetti.css +1 -1
- package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
- package/src/components/expressive/flow-field/flow-field.css +1 -1
- package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
- package/src/components/expressive/lens/lens.css +1 -1
- package/src/components/expressive/morphing-text/morphing-text.css +1 -1
- package/src/components/expressive/odometer/Odometer.tsx +45 -92
- package/src/components/expressive/odometer/Odometer.usage.md +2 -2
- package/src/components/expressive/odometer/odometer.css +17 -11
- package/src/components/expressive/odometer/roll.ts +94 -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 +50 -1
- package/src/components/expressive/theme-transition/theme-transition.ts +21 -1
- package/src/components/expressive/theme-transition/tide.ts +15 -10
- package/src/components/expressive/tiktok/tiktok.css +1 -1
- package/src/components/expressive/typing-lines/typing-lines.css +1 -1
- package/src/components/expressive/weight-field/weight-field.css +1 -1
- package/src/components/expressive/youtube/youtube.css +1 -1
- package/src/components/internal/glass/glass.css +1 -1
- package/src/components/internal/icon/icon.css +1 -1
- 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 +82 -8
- 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 -1
- 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 +1 -2
- package/src/components/internal/utils/activation.ts +5 -0
- 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 +21 -12
- package/src/components/primitives/badge/digit-strip.css +1 -1
- 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.css +1 -2
- package/src/components/primitives/checkbox/checkbox.css +1 -1
- package/src/components/primitives/collapse/collapse.css +1 -1
- package/src/components/primitives/input/OtpField.tsx +17 -9
- package/src/components/primitives/input/input.css +1 -4
- package/src/components/primitives/radio-group/radio-group.css +11 -5
- package/src/components/primitives/spinner/spinner.css +1 -1
- package/src/components/primitives/tag/tag.css +1 -1
- package/src/components/primitives/textarea/Textarea.tsx +20 -24
- package/src/components/primitives/textarea/char-meter.tsx +34 -0
- package/src/components/primitives/textarea/textarea.css +14 -2
- 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 +1 -1
- package/src/engine/flip.ts +5 -1
- package/src/motion/crossfade.ts +97 -0
- package/src/motion/element.tsx +10 -7
- package/src/motion/flip.ts +62 -23
- package/src/motion/glide.tsx +5 -0
- package/src/motion/motion.ts +7 -0
- package/src/motion/motion.usage.md +34 -0
- package/src/motion/presence.tsx +4 -0
- package/src/motion/use-motion.ts +8 -3
- package/src/styles.css +1 -1
- package/src/theme-scope.ts +19 -0
- package/src/tokens/base.css +62 -13
- package/src/tokens/color.css +18 -16
- package/src/tokens/component-styles.generated.ts +0 -2
- package/src/tokens/dark.css +4 -1
- package/src/tokens/decisions.css +6 -4
- package/src/tokens/elevation.css +1 -1
- package/src/tokens/glass.css +1 -1
- package/src/tokens/motion.css +4 -4
- package/src/tokens/radius.css +1 -1
- package/src/tokens/reset.css +17 -45
- package/src/tokens/semantic.css +13 -7
- package/src/tokens/spacing.css +4 -4
- package/src/tokens/theme-tokens.generated.ts +38 -32
- package/src/tokens/typography.css +1 -1
- package/tailwind.css +3 -1
- 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-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-LNAV5E7S.js.map +0 -1
- package/dist/chunk-N43NDSME.js.map +0 -1
- package/dist/chunk-RJENXXTI.js +0 -93
- package/dist/chunk-RJENXXTI.js.map +0 -1
- package/dist/chunk-RW2A4M2Q.js +0 -57
- package/dist/chunk-RW2A4M2Q.js.map +0 -1
- package/dist/chunk-TDHLZY6I.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-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,5 +1,5 @@
|
|
|
1
1
|
import './trigger.css';
|
|
2
|
-
import { type ReactElement, type KeyboardEvent as ReactKeyboardEvent, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type ReactElement, type KeyboardEvent as ReactKeyboardEvent, type MouseEvent as ReactMouseEvent, type ReactNode, type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
3
3
|
import { type ActivateOn } from '../utils/activation';
|
|
4
4
|
interface OverlayEntry {
|
|
5
5
|
contains: (t: EventTarget | null) => boolean;
|
|
@@ -21,20 +21,17 @@ declare function useOutsidePress({ entry, refs, enabled, onPress, }: {
|
|
|
21
21
|
enabled: boolean;
|
|
22
22
|
onPress: () => void;
|
|
23
23
|
}): void;
|
|
24
|
-
declare function ovCloneTrigger(trigger: ReactElement | null, { open, onPress, onKeyDown, panelId, haspopup, triggerRef, activateOn, }: {
|
|
24
|
+
declare function ovCloneTrigger(trigger: ReactElement | null, { open, onPress, onKeyDown, panelId, haspopup, triggerRef, activateOn, holdFocus, attrs, }: {
|
|
25
25
|
open: boolean;
|
|
26
|
-
onPress: () => void;
|
|
26
|
+
onPress: (e: ReactPointerEvent<HTMLElement> | ReactMouseEvent<HTMLElement>) => void;
|
|
27
27
|
onKeyDown?: (e: ReactKeyboardEvent<HTMLElement>) => void;
|
|
28
28
|
panelId: string;
|
|
29
29
|
haspopup: string;
|
|
30
30
|
triggerRef: RefObject<HTMLElement>;
|
|
31
31
|
activateOn?: ActivateOn;
|
|
32
|
+
holdFocus?: boolean;
|
|
33
|
+
attrs?: Record<string, unknown>;
|
|
32
34
|
}): ReactElement | null;
|
|
33
|
-
export interface InheritedThemeAttrs {
|
|
34
|
-
'data-theme'?: string;
|
|
35
|
-
'data-polarity'?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare function inheritedThemeAttrs(scope: Element | null | undefined): InheritedThemeAttrs;
|
|
38
35
|
declare function OverlayPortal({ container, scope, children, }: {
|
|
39
36
|
container?: HTMLElement | null;
|
|
40
37
|
scope?: Element | null;
|
|
@@ -5,6 +5,7 @@ type AnyPointerEvent = ReactPointerEvent<Element> | PointerEvent;
|
|
|
5
5
|
type AnyMouseEvent = ReactMouseEvent<Element> | MouseEvent;
|
|
6
6
|
export declare function pointerDownActivates(e: AnyPointerEvent, holdFocus?: boolean): boolean;
|
|
7
7
|
export declare function declinePointerDown(): void;
|
|
8
|
+
export declare function pressedByKeyboard(e: AnyPointerEvent | AnyMouseEvent): boolean;
|
|
8
9
|
export declare function clickActivates(e: AnyMouseEvent): boolean;
|
|
9
10
|
export interface ActivationOptions<E extends Element> {
|
|
10
11
|
on?: ActivateOn;
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import './badge.css';
|
|
2
|
-
import type
|
|
2
|
+
import { type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';
|
|
3
3
|
import type { DataAttributes } from '../../../dom-props';
|
|
4
4
|
export type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
5
|
+
export type BadgeAnimation = 'auto' | 'roll' | 'morph' | 'none';
|
|
5
6
|
interface BadgeOwnProps {
|
|
7
|
+
/** The chip's content. Changing it animates in place. */
|
|
8
|
+
value: string | number;
|
|
9
|
+
/**
|
|
10
|
+
* How a `value` change animates: `roll` spins each digit, `morph` re-letters the word.
|
|
11
|
+
* `auto` rolls numbers and morphs text - name one to override a formatted figure like "1,024".
|
|
12
|
+
* @default 'auto'
|
|
13
|
+
*/
|
|
14
|
+
animate?: BadgeAnimation;
|
|
6
15
|
/** Status hue. @default 'neutral' */
|
|
7
16
|
tone?: BadgeTone;
|
|
8
|
-
/** Surface. @default '
|
|
9
|
-
variant?: 'glass' | 'outline';
|
|
10
|
-
/** Chip density - `sm`
|
|
17
|
+
/** Surface: a flat toned fill, the frosted chip, or a hairline outline. @default 'soft' */
|
|
18
|
+
variant?: 'soft' | 'glass' | 'outline';
|
|
19
|
+
/** Chip density - `sm` is 20px for table rows and inline use. @default 'md' */
|
|
11
20
|
size?: 'sm' | 'md';
|
|
21
|
+
/** Sweep a sheen across the chip when `value` changes - for a state that has landed. */
|
|
22
|
+
glint?: boolean;
|
|
12
23
|
/** Leading status dot. */
|
|
13
24
|
dot?: boolean;
|
|
14
25
|
/** Dot pulses (implies dot) - for in-progress status. */
|
|
@@ -21,12 +32,10 @@ interface BadgeOwnProps {
|
|
|
21
32
|
className?: string;
|
|
22
33
|
/** Inline styles merged onto the chip. */
|
|
23
34
|
style?: CSSProperties;
|
|
24
|
-
/** Chip label. */
|
|
25
|
-
children?: ReactNode;
|
|
26
35
|
}
|
|
27
36
|
export interface BadgeProps extends BadgeOwnProps {
|
|
28
37
|
/** Standard <span> attributes (aria-*, data-*, title, ...) forwarded to the chip. */
|
|
29
|
-
htmlProps?: Omit<HTMLAttributes<HTMLSpanElement>, keyof BadgeOwnProps> & DataAttributes;
|
|
38
|
+
htmlProps?: Omit<HTMLAttributes<HTMLSpanElement>, keyof BadgeOwnProps | 'children'> & DataAttributes;
|
|
30
39
|
}
|
|
31
|
-
export declare function Badge({ tone, variant, size, dot, live, pill, icon, className, style,
|
|
40
|
+
export declare function Badge({ value, animate, tone, variant, size, glint, dot, live, pill, icon, className, style, htmlProps, }: BadgeProps): import("react").JSX.Element;
|
|
32
41
|
export {};
|
|
@@ -14,8 +14,8 @@ interface OtpFieldOwnProps {
|
|
|
14
14
|
error?: boolean;
|
|
15
15
|
/** Disable every slot. */
|
|
16
16
|
disabled?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
size?: 'sm';
|
|
17
|
+
/** Slot width, height and digit type. @default 'md' */
|
|
18
|
+
size?: 'sm' | 'md';
|
|
19
19
|
/** Extra class(es) appended to the root wrapper. */
|
|
20
20
|
className?: string;
|
|
21
21
|
/** Inline styles merged onto the root wrapper. */
|
|
@@ -20,8 +20,8 @@ interface TextareaOwnProps extends FieldMessagingProps, TextareaNative {
|
|
|
20
20
|
warnAt?: number;
|
|
21
21
|
/** Footer hint, left of the meter - e.g. a ⌘↵ affordance. */
|
|
22
22
|
hint?: ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
size?: 'md' | 'lg';
|
|
23
|
+
/** Field type and padding: `sm` for a dense form row, `lg` for a prominent composer. @default 'md' */
|
|
24
|
+
size?: 'sm' | 'md' | 'lg';
|
|
25
25
|
/** Extra class(es) merged onto the field root. */
|
|
26
26
|
className?: string;
|
|
27
27
|
/** Inline styles merged onto the field root. */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './toggle.css';
|
|
2
|
+
import { type InputHTMLAttributes } from 'react';
|
|
3
|
+
export interface SwitchGlyphProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
pressed?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function SwitchGlyph({ pressed, ...inputProps }: SwitchGlyphProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type Box, type FlipOptions, type Playback } from '../engine';
|
|
2
|
+
export declare function keep(id: string, el: HTMLElement, box: Box, { timing }: FlipOptions): void;
|
|
3
|
+
export declare function play(id: string, el: HTMLElement, from: Box, { timing }: FlipOptions): Playback | undefined;
|
|
@@ -4,9 +4,9 @@ import { type MotionSpecs } from './use-motion';
|
|
|
4
4
|
export interface MotionProps extends MotionSpecs {
|
|
5
5
|
/** Tag for the element this renders. @default 'div' */
|
|
6
6
|
as?: string;
|
|
7
|
-
/** FLIP this element from its previous box
|
|
7
|
+
/** FLIP this element from its previous box whenever a render moves it. */
|
|
8
8
|
layout?: boolean;
|
|
9
|
-
/** FLIP from whatever element last held this id, so the box travels between nodes. */
|
|
9
|
+
/** FLIP from whatever element last held this id, so the box travels between nodes. Add `layout` to FLIP its own moves too. */
|
|
10
10
|
layoutId?: string;
|
|
11
11
|
/** Tunes whichever layout animation is active; ignored without `layout` or `layoutId`. */
|
|
12
12
|
layoutTransition?: FlipTuning;
|
|
@@ -14,4 +14,7 @@ export interface MotionProps extends MotionSpecs {
|
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
[prop: string]: unknown;
|
|
16
16
|
}
|
|
17
|
-
export declare function Motion({ as, animate, exit, initial, deps, layout, layoutId, layoutTransition, ref, children, ...rest }: MotionProps): import("react").
|
|
17
|
+
export declare function Motion({ as, animate, exit, initial, deps, layout, layoutId, layoutTransition, ref, children, ...rest }: MotionProps): import("react").ReactElement<{
|
|
18
|
+
'data-exiting': string;
|
|
19
|
+
ref: (el: HTMLElement | null) => void;
|
|
20
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { type FlipOptions } from '../engine';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface FlipTuning extends FlipOptions {
|
|
4
|
+
/** Keep the element that last held the `layoutId` on screen through the handoff: a copy of it takes the same path and fades out while this one fades in. */
|
|
5
|
+
crossfade?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function useFlip<T extends HTMLElement>(sharedId: string | null, tuning: FlipTuning, inPlace: boolean): {
|
|
8
|
+
ref: RefObject<T | null>;
|
|
9
|
+
play: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { Layer, Playback } from '../engine';
|
|
2
|
+
export { Motion, type MotionProps } from './element';
|
|
3
|
+
export type { FlipTuning } from './flip';
|
|
4
|
+
export { usePresence, type PresenceState } from './presence-context';
|
|
5
|
+
export { Presence, type PresenceProps } from './presence';
|
|
6
|
+
export { popIn, popOut, slideIn } from './presets';
|
|
7
|
+
export { useMotion, type MotionSpec, type MotionSpecs, type Plays } from './use-motion';
|
|
@@ -104,8 +104,6 @@ export interface OdometerStyle extends CSSProperties {
|
|
|
104
104
|
'--odometer-gap'?: string | number;
|
|
105
105
|
/** `--odometer-ink` - Digit ink. Default: `var(--text-strong)`. */
|
|
106
106
|
'--odometer-ink'?: string | number;
|
|
107
|
-
/** `--odometer-accent` - The tint digits take while they roll fast. Default: `var(--accent)`. */
|
|
108
|
-
'--odometer-accent'?: string | number;
|
|
109
107
|
/** `--odometer-separator-ink` - The thousands separator. Default: `var(--text-muted)`. */
|
|
110
108
|
'--odometer-separator-ink'?: string | number;
|
|
111
109
|
/** `--odometer-size` - Digit size. Default: `var(--size-display)`. */
|
|
@@ -24,6 +24,10 @@ export interface ColorBgTokens {
|
|
|
24
24
|
inset?: string | number;
|
|
25
25
|
/** `--bg-overlay`. Default: `color-mix(in oklab, var(--gray-900) 44%, transparent)`. Dark: `oklch(from var(--neutral) 0.06 0.004 h / 0.64)`. */
|
|
26
26
|
overlay?: string | number;
|
|
27
|
+
/** `--bg-hover` - Stripe's slate rung at the alpha that lands its hover face exactly on the canvas: translucent, so a tinted surface still shows through instead of being covered. Held at the ramp's distance from --neutral, so a retint carries the hover with it. Default: `oklch(from var(--neutral) 0.896 0.0186 calc(h - 9.7) / 0.246)`. Dark: `color-mix(in oklab, var(--text-secondary) 6%, transparent)`. */
|
|
28
|
+
hover?: string | number;
|
|
29
|
+
/** `--bg-press`. Default: `oklch(from var(--neutral) 0.896 0.0186 calc(h - 9.7) / 0.291)`. Dark: `color-mix(in oklab, var(--text-secondary) 10%, transparent)`. */
|
|
30
|
+
press?: string | number;
|
|
27
31
|
}
|
|
28
32
|
/** Ink, from strong to disabled, and the faces on a fill. */
|
|
29
33
|
export interface ColorTextTokens {
|
|
@@ -44,18 +48,18 @@ export interface ColorTextTokens {
|
|
|
44
48
|
}
|
|
45
49
|
/** Hairlines, from subtle to strong. */
|
|
46
50
|
export interface ColorBorderTokens {
|
|
47
|
-
/** `--border-subtle
|
|
51
|
+
/** `--border-subtle` - One rung lighter than the ink roles: Stripe hangs its hairline on gray-150, not gray-200. Default: `var(--gray-100)`. Dark: `oklch(from var(--neutral) 0.265 0.008 h)`. */
|
|
48
52
|
subtle?: string | number;
|
|
49
|
-
/** `--border-default`. Default: `var(--gray-
|
|
53
|
+
/** `--border-default`. Default: `var(--gray-150)`. Dark: `oklch(from var(--neutral) 0.315 0.009 h)`. */
|
|
50
54
|
default?: string | number;
|
|
51
|
-
/** `--border-strong`. Default: `var(--gray-
|
|
55
|
+
/** `--border-strong`. Default: `var(--gray-200)`. Dark: `oklch(from var(--neutral) 0.4 0.011 h)`. */
|
|
52
56
|
strong?: string | number;
|
|
53
57
|
}
|
|
54
58
|
/** The hues, and the neutral roles a light or dark theme sets directly. */
|
|
55
59
|
export interface ColorTokens {
|
|
56
|
-
/** `--accent` - The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. Default: `oklch(0.
|
|
60
|
+
/** `--accent` - The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. Default: `oklch(0.7 0.118 198)`. */
|
|
57
61
|
accent?: string | number;
|
|
58
|
-
/** `--neutral` - The gray ramp's
|
|
62
|
+
/** `--neutral` - The middle of the gray ramp - every rung holds its hue distance from this one, so moving it retints the whole ramp. Stripe's gray-500 lightness and chroma over the accent's hue, so the grays carry the brand temperature; give it a literal hue for a ramp that does not follow. Default: `oklch(from var(--accent) 0.553 0.031 h)`. */
|
|
59
63
|
neutral?: string | number;
|
|
60
64
|
/** `--success` - Positive status - its subtle, text and wash follow. Default: `oklch(0.548 0.122 152)`. */
|
|
61
65
|
success?: string | number;
|
|
@@ -264,8 +268,6 @@ export interface OdometerTokens {
|
|
|
264
268
|
gap?: string | number;
|
|
265
269
|
/** `--odometer-ink` - Digit ink. Default: `var(--text-strong)`. */
|
|
266
270
|
ink?: string | number;
|
|
267
|
-
/** `--odometer-accent` - The tint digits take while they roll fast. Default: `var(--accent)`. */
|
|
268
|
-
accent?: string | number;
|
|
269
271
|
/** `--odometer-separator-ink` - The thousands separator. Default: `var(--text-muted)`. */
|
|
270
272
|
separatorInk?: string | number;
|
|
271
273
|
/** `--odometer-size` - Digit size. Default: `var(--size-display)`. */
|
|
@@ -381,7 +383,7 @@ export interface ComponentTokens {
|
|
|
381
383
|
* `custom` in a theme and behind the `style` prop of every component.
|
|
382
384
|
*/
|
|
383
385
|
export interface TokenProperties {
|
|
384
|
-
/** `--accent` - The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. Default: `oklch(0.
|
|
386
|
+
/** `--accent` - The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. Default: `oklch(0.7 0.118 198)`. */
|
|
385
387
|
'--accent'?: string | number;
|
|
386
388
|
/** `--success` - Positive status - its subtle, text and wash follow. Default: `oklch(0.548 0.122 152)`. */
|
|
387
389
|
'--success'?: string | number;
|
|
@@ -389,7 +391,7 @@ export interface TokenProperties {
|
|
|
389
391
|
'--warning'?: string | number;
|
|
390
392
|
/** `--danger` - Destructive actions and errors - the danger button ladder, ring, subtle, text and wash follow. Default: `oklch(0.545 0.196 27)`. */
|
|
391
393
|
'--danger'?: string | number;
|
|
392
|
-
/** `--neutral` - The gray ramp's
|
|
394
|
+
/** `--neutral` - The middle of the gray ramp - every rung holds its hue distance from this one, so moving it retints the whole ramp. Stripe's gray-500 lightness and chroma over the accent's hue, so the grays carry the brand temperature; give it a literal hue for a ramp that does not follow. Default: `oklch(from var(--accent) 0.553 0.031 h)`. */
|
|
393
395
|
'--neutral'?: string | number;
|
|
394
396
|
/** `--radius` - Roundness - every --radius-<step> is a fixed ratio of it, 0 squaring every corner. Default: `0.5rem`. */
|
|
395
397
|
'--radius'?: string | number;
|
|
@@ -397,33 +399,33 @@ export interface TokenProperties {
|
|
|
397
399
|
'--font-body'?: string | number;
|
|
398
400
|
/** `--font-code` - The code face - --type-code follows. The package loads no webfont; point this at yours. Default: `ui-monospace, 'SF Mono', 'Menlo', monospace`. */
|
|
399
401
|
'--font-code'?: string | number;
|
|
400
|
-
/** `--gray-0` -
|
|
402
|
+
/** `--gray-0` - Stripe's neutral ramp, rung for rung: --neutral is its midpoint, and every step holds that hue's distance from it, so a new --neutral carries the whole ramp with it. The top rung is pure white - the only rung Stripe leaves untinted. Default: `oklch(from var(--neutral) 1 0 h)`. Re-derived on every theme root. */
|
|
401
403
|
'--gray-0'?: string | number;
|
|
402
|
-
/** `--gray-50`. Default: `oklch(from var(--neutral) 0.
|
|
404
|
+
/** `--gray-50`. Default: `oklch(from var(--neutral) 0.978 0.0034 calc(h - 12.4))`. Re-derived on every theme root. */
|
|
403
405
|
'--gray-50'?: string | number;
|
|
404
|
-
/** `--gray-100`. Default: `oklch(from var(--neutral) 0.
|
|
406
|
+
/** `--gray-100`. Default: `oklch(from var(--neutral) 0.948 0.0052 calc(h - 12.4))`. Re-derived on every theme root. */
|
|
405
407
|
'--gray-100'?: string | number;
|
|
406
|
-
/** `--gray-150`. Default: `oklch(from var(--neutral) 0.
|
|
408
|
+
/** `--gray-150`. Default: `oklch(from var(--neutral) 0.889 0.0105 calc(h - 12.3))`. Re-derived on every theme root. */
|
|
407
409
|
'--gray-150'?: string | number;
|
|
408
|
-
/** `--gray-200`. Default: `oklch(from var(--neutral) 0.
|
|
410
|
+
/** `--gray-200`. Default: `oklch(from var(--neutral) 0.83 0.0165 calc(h - 6.4))`. Re-derived on every theme root. */
|
|
409
411
|
'--gray-200'?: string | number;
|
|
410
|
-
/** `--gray-300`. Default: `oklch(from var(--neutral) 0.
|
|
412
|
+
/** `--gray-300`. Default: `oklch(from var(--neutral) 0.742 0.0226 calc(h - 1.1))`. Re-derived on every theme root. */
|
|
411
413
|
'--gray-300'?: string | number;
|
|
412
|
-
/** `--gray-400`. Default: `oklch(from var(--neutral) 0.
|
|
414
|
+
/** `--gray-400`. Default: `oklch(from var(--neutral) 0.651 0.0247 calc(h + 0.4))`. Re-derived on every theme root. */
|
|
413
415
|
'--gray-400'?: string | number;
|
|
414
|
-
/** `--gray-500`. Default: `oklch(from var(--neutral) 0.
|
|
416
|
+
/** `--gray-500`. Default: `oklch(from var(--neutral) 0.553 0.031 h)`. Re-derived on every theme root. */
|
|
415
417
|
'--gray-500'?: string | number;
|
|
416
|
-
/** `--gray-600`. Default: `oklch(from var(--neutral) 0.
|
|
418
|
+
/** `--gray-600`. Default: `oklch(from var(--neutral) 0.466 0.0267 calc(h + 11.4))`. Re-derived on every theme root. */
|
|
417
419
|
'--gray-600'?: string | number;
|
|
418
|
-
/** `--gray-700`. Default: `oklch(from var(--neutral) 0.
|
|
420
|
+
/** `--gray-700`. Default: `oklch(from var(--neutral) 0.392 0.0226 calc(h + 11.6))`. Re-derived on every theme root. */
|
|
419
421
|
'--gray-700'?: string | number;
|
|
420
|
-
/** `--gray-800`. Default: `oklch(from var(--neutral) 0.
|
|
422
|
+
/** `--gray-800`. Default: `oklch(from var(--neutral) 0.317 0.0214 calc(h + 21.1))`. Re-derived on every theme root. */
|
|
421
423
|
'--gray-800'?: string | number;
|
|
422
|
-
/** `--gray-900`. Default: `oklch(from var(--neutral) 0.
|
|
424
|
+
/** `--gray-900`. Default: `oklch(from var(--neutral) 0.226 0.0194 calc(h + 20))`. Re-derived on every theme root. */
|
|
423
425
|
'--gray-900'?: string | number;
|
|
424
|
-
/** `--gray-950`. Default: `oklch(from var(--neutral) 0.
|
|
426
|
+
/** `--gray-950`. Default: `oklch(from var(--neutral) 0.181 0.0185 calc(h + 19.2))`. Re-derived on every theme root. */
|
|
425
427
|
'--gray-950'?: string | number;
|
|
426
|
-
/** `--shadow-rgb` - Cool near-black on the white canvas. Default: `
|
|
428
|
+
/** `--shadow-rgb` - Cool near-black on the white canvas. Default: `16 17 26`. Dark: `0 0 0`. */
|
|
427
429
|
'--shadow-rgb'?: string | number;
|
|
428
430
|
/** `--weight-regular`. Default: `400`. */
|
|
429
431
|
'--weight-regular'?: string | number;
|
|
@@ -523,11 +525,11 @@ export interface TokenProperties {
|
|
|
523
525
|
'--space-10'?: string | number;
|
|
524
526
|
/** `--measure-prose`. Default: `38rem`. */
|
|
525
527
|
'--measure-prose'?: string | number;
|
|
526
|
-
/** `--control-height-sm`. Default: `1.
|
|
528
|
+
/** `--control-height-sm`. Default: `1.85rem`. */
|
|
527
529
|
'--control-height-sm'?: string | number;
|
|
528
|
-
/** `--control-height`. Default: `
|
|
530
|
+
/** `--control-height`. Default: `2.25rem`. */
|
|
529
531
|
'--control-height'?: string | number;
|
|
530
|
-
/** `--control-height-lg`. Default: `2.
|
|
532
|
+
/** `--control-height-lg`. Default: `2.5rem`. */
|
|
531
533
|
'--control-height-lg'?: string | number;
|
|
532
534
|
/** `--control-box`. Default: `1.125rem`. */
|
|
533
535
|
'--control-box'?: string | number;
|
|
@@ -643,7 +645,7 @@ export interface TokenProperties {
|
|
|
643
645
|
'--scale-floating'?: string | number;
|
|
644
646
|
/** `--scale-chip` - small inline elements - tag, badge, count. Default: `0.9`. */
|
|
645
647
|
'--scale-chip'?: string | number;
|
|
646
|
-
/** `--transition-control`. Default: `color var(--duration-
|
|
648
|
+
/** `--transition-control`. Default: `color var(--duration-base) var(--ease-standard), background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), outline-color var(--duration-base) var(--ease-standard)`. Re-derived on every theme root. */
|
|
647
649
|
'--transition-control'?: string | number;
|
|
648
650
|
/** `--transition-colors`. Default: `color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard)`. Re-derived on every theme root. */
|
|
649
651
|
'--transition-colors'?: string | number;
|
|
@@ -695,12 +697,16 @@ export interface TokenProperties {
|
|
|
695
697
|
'--text-disabled'?: string | number;
|
|
696
698
|
/** `--text-inverse` - The ink on a strong-ink fill - the canvas colour in either polarity. Default: `var(--gray-0)`. Dark: `oklch(from var(--neutral) 0.165 0.006 h)`. */
|
|
697
699
|
'--text-inverse'?: string | number;
|
|
698
|
-
/** `--border-subtle
|
|
700
|
+
/** `--border-subtle` - One rung lighter than the ink roles: Stripe hangs its hairline on gray-150, not gray-200. Default: `var(--gray-100)`. Dark: `oklch(from var(--neutral) 0.265 0.008 h)`. */
|
|
699
701
|
'--border-subtle'?: string | number;
|
|
700
|
-
/** `--border-default`. Default: `var(--gray-
|
|
702
|
+
/** `--border-default`. Default: `var(--gray-150)`. Dark: `oklch(from var(--neutral) 0.315 0.009 h)`. */
|
|
701
703
|
'--border-default'?: string | number;
|
|
702
|
-
/** `--border-strong`. Default: `var(--gray-
|
|
704
|
+
/** `--border-strong`. Default: `var(--gray-200)`. Dark: `oklch(from var(--neutral) 0.4 0.011 h)`. */
|
|
703
705
|
'--border-strong'?: string | number;
|
|
706
|
+
/** `--bg-hover` - Stripe's slate rung at the alpha that lands its hover face exactly on the canvas: translucent, so a tinted surface still shows through instead of being covered. Held at the ramp's distance from --neutral, so a retint carries the hover with it. Default: `oklch(from var(--neutral) 0.896 0.0186 calc(h - 9.7) / 0.246)`. Dark: `color-mix(in oklab, var(--text-secondary) 6%, transparent)`. */
|
|
707
|
+
'--bg-hover'?: string | number;
|
|
708
|
+
/** `--bg-press`. Default: `oklch(from var(--neutral) 0.896 0.0186 calc(h - 9.7) / 0.291)`. Dark: `color-mix(in oklab, var(--text-secondary) 10%, transparent)`. */
|
|
709
|
+
'--bg-press'?: string | number;
|
|
704
710
|
/** `--accent-fill` - The resting face of a filled control. Default: `var(--accent)`. Dark: `oklch(from var(--accent) calc(l - 0.06) calc(c - 0.01) h)`. Re-derived on every theme root. */
|
|
705
711
|
'--accent-fill'?: string | number;
|
|
706
712
|
/** `--accent-lift`. Default: `oklch(from var(--accent) calc(l + 0.075) calc(c - 0.006) h)`. Re-derived on every theme root. */
|
|
@@ -721,9 +727,9 @@ export interface TokenProperties {
|
|
|
721
727
|
'--text-accent'?: string | number;
|
|
722
728
|
/** `--text-on-accent` - The ink on a hue fill - the ramp's lightest rung in either polarity. Default: `var(--gray-0)`. Re-derived on every theme root. */
|
|
723
729
|
'--text-on-accent'?: string | number;
|
|
724
|
-
/** `--neutral-wash
|
|
730
|
+
/** `--neutral-wash`. Default: `var(--bg-hover)`. Re-derived on every theme root. */
|
|
725
731
|
'--neutral-wash'?: string | number;
|
|
726
|
-
/** `--neutral-wash-press`. Default: `
|
|
732
|
+
/** `--neutral-wash-press`. Default: `var(--bg-press)`. Re-derived on every theme root. */
|
|
727
733
|
'--neutral-wash-press'?: string | number;
|
|
728
734
|
/** `--info` - The accent's hue one step down - repoint it for a hue of its own. Default: `var(--accent-hover)`. Re-derived on every theme root. */
|
|
729
735
|
'--info'?: string | number;
|
package/dist/typing-lines.css
CHANGED
package/dist/typing-lines.js
CHANGED
package/dist/weight-field.css
CHANGED
package/dist/youtube.css
CHANGED
package/dist/youtube.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use client';import { startDrag } from './chunk-
|
|
1
|
+
'use client';import { startDrag } from './chunk-SPFHWHJ6.js';
|
|
2
2
|
import './chunk-VNVVG47J.js';
|
|
3
|
-
import { useControllable } from './chunk-MMRIQNEN.js';
|
|
4
3
|
import './chunk-6H3IJ752.js';
|
|
4
|
+
import { useControllable } from './chunk-MMRIQNEN.js';
|
|
5
5
|
import { cx } from './chunk-QGNC7LH5.js';
|
|
6
6
|
import './youtube.css';
|
|
7
7
|
import { useRef, useEffect } from 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyncat/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "A React 19 design system: accessible, animated UI components built on a small, closed CSS design-token vocabulary. No Tailwind, no CSS-in-JS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -57,16 +57,6 @@
|
|
|
57
57
|
"types": "./dist/types/components/primitives/badge/Badge.d.ts",
|
|
58
58
|
"import": "./dist/badge.js"
|
|
59
59
|
},
|
|
60
|
-
"./status-badge": {
|
|
61
|
-
"source": "./src/components/primitives/badge/StatusBadge.tsx",
|
|
62
|
-
"types": "./dist/types/components/primitives/badge/StatusBadge.d.ts",
|
|
63
|
-
"import": "./dist/status-badge.js"
|
|
64
|
-
},
|
|
65
|
-
"./count-badge": {
|
|
66
|
-
"source": "./src/components/primitives/badge/CountBadge.tsx",
|
|
67
|
-
"types": "./dist/types/components/primitives/badge/CountBadge.d.ts",
|
|
68
|
-
"import": "./dist/count-badge.js"
|
|
69
|
-
},
|
|
70
60
|
"./avatar": {
|
|
71
61
|
"source": "./src/components/primitives/avatar/Avatar.tsx",
|
|
72
62
|
"types": "./dist/types/components/primitives/avatar/Avatar.d.ts",
|
|
@@ -312,6 +302,11 @@
|
|
|
312
302
|
"types": "./dist/types/components/primitives/spinner/Spinner.d.ts",
|
|
313
303
|
"import": "./dist/spinner.js"
|
|
314
304
|
},
|
|
305
|
+
"./motion": {
|
|
306
|
+
"source": "./src/motion/motion.ts",
|
|
307
|
+
"types": "./dist/types/motion/motion.d.ts",
|
|
308
|
+
"import": "./dist/motion.js"
|
|
309
|
+
},
|
|
315
310
|
"./styles.css": "./src/styles.css",
|
|
316
311
|
"./tailwind.css": "./tailwind.css",
|
|
317
312
|
"./next": {
|
|
@@ -61,9 +61,9 @@ overlays & feedback, expressive, compound, replicas, dev tools. The full index i
|
|
|
61
61
|
| Transient hint on hover/focus | **Tooltip** |
|
|
62
62
|
| Persistent in-flow status | **Alert** |
|
|
63
63
|
| Transient notification | **toast()** - needs `<Toaster />` mounted once |
|
|
64
|
-
| Ambient status chip | **Badge**
|
|
64
|
+
| Ambient status chip | **Badge** - one `value`, animated whenever it changes |
|
|
65
65
|
| User-owned removable label | **Tag** |
|
|
66
|
-
| Rolling number | **
|
|
66
|
+
| Rolling number | **Badge** with a numeric `value` (inline) / **Odometer** (display size) |
|
|
67
67
|
| Persistent support entry point | **SupportRail** (edge tab) |
|
|
68
68
|
| Social post mock | **InstagramFeed / FacebookFeed / TikTok / YouTube** - pixel-pinned replicas, unthemeable by design |
|
|
69
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zyncat/ui component index
|
|
2
2
|
|
|
3
|
-
Generated from @zyncat/ui v0.
|
|
3
|
+
Generated from @zyncat/ui v0.21.0 by `pnpm sync skill` - do not edit by hand.
|
|
4
4
|
If node_modules/@zyncat/ui/package.json shows a DIFFERENT version, this index is stale:
|
|
5
5
|
trust the get_component MCP tool and re-run `npx zyncat-ui init` to refresh the skill.
|
|
6
6
|
|
|
@@ -10,11 +10,10 @@ Call get_component (it accepts a list) before writing any JSX.
|
|
|
10
10
|
== Primitives ==
|
|
11
11
|
Button - @zyncat/ui/button - One control for every click; exactly one primary per view.
|
|
12
12
|
Collapse - @zyncat/ui/collapse - Layout-transition primitive; eases height open/closed, never teleports.
|
|
13
|
-
Badge - @zyncat/ui/badge -
|
|
14
|
-
StatusBadge - @zyncat/ui/status-badge - Canonical post status - tone + one-word label.
|
|
15
|
-
CountBadge - @zyncat/ui/count-badge - Mono tabular count; `roll` animates digits like an odometer.
|
|
13
|
+
Badge - @zyncat/ui/badge - Soft, glass or outline chip for ambient status - a label, a status or a count.
|
|
16
14
|
Glide / GlidePill - @zyncat/ui/glide - A persistent background pill that glides smoothly between hovered/active elements.
|
|
17
15
|
Spinner - @zyncat/ui/spinner - Indeterminate loader; three looks, no JavaScript, no layout of its own.
|
|
16
|
+
Motion / Presence - @zyncat/ui/motion - The React layer over the engine: animate an element you render, and hold a leaving one mounted until its exit finishes.
|
|
18
17
|
|
|
19
18
|
== Forms ==
|
|
20
19
|
Every form field takes label, helper/error/warning/success, size sm|md|lg, disabled.
|
|
@@ -72,7 +72,7 @@ import { defineTheme, ZyncatTheme } from '@zyncat/ui/theme';
|
|
|
72
72
|
const light = defineTheme({
|
|
73
73
|
color: { accent: 'oklch(0.58 0.19 292)' },
|
|
74
74
|
shape: { radius: '0.75rem' },
|
|
75
|
-
components: { odometer: {
|
|
75
|
+
components: { odometer: { ink: 'var(--warning)' } },
|
|
76
76
|
});
|
|
77
77
|
const dark = defineTheme({ color: { accent: 'oklch(0.72 0.14 292)' }, custom: { '--shadow-strength': 2.5 } });
|
|
78
78
|
|
|
@@ -102,14 +102,14 @@ your own scrollers `scroll-padding: var(--ring-width)` and anything flush with a
|
|
|
102
102
|
## Level 2 - retune one component
|
|
103
103
|
|
|
104
104
|
Expressive and compound components publish scoped `--<component>-<name>` properties as their public
|
|
105
|
-
contract, each with a doc line: `--odometer-size/-
|
|
105
|
+
contract, each with a doc line: `--odometer-size/-ink/-gap`, `--typing-lines-caret-ink/-blink`,
|
|
106
106
|
`--lens-surface/-fringe-warm`, `--morphing-text-size/-smear`, `--weight-field-peak-weight/-hover-padding`,
|
|
107
107
|
`--flow-field-ramp-0..11`, `--confetti-paper-1..5`, `--support-rail-width/-accent/-row-pad-block`. Set
|
|
108
108
|
them on any ancestor or inline via `style`. The canvas simulations sample theirs at their next measure -
|
|
109
109
|
FlowField on resize and on a theme attribute change, Confetti on the next `fire()`.
|
|
110
110
|
|
|
111
111
|
Both reaches are typed. In a theme they are `components`, grouped like the theme:
|
|
112
|
-
`components.odometer.
|
|
112
|
+
`components.odometer.ink` is `--odometer-ink`, `components.typingLines.caret.ink` is
|
|
113
113
|
`--typing-lines-caret-ink`, `components.confetti.paper[3]` is `--confetti-paper-3`. On one instance
|
|
114
114
|
they are the component's own `style` prop, which accepts the design tokens plus that component's knobs
|
|
115
115
|
and nothing from another component - `<Odometer style={{ '--odometer-size': '3rem' }} />`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.components {
|
|
4
4
|
.zc-alert-shell {
|
|
@@ -115,7 +115,6 @@
|
|
|
115
115
|
color: color-mix(in oklab, var(--alert-fg) 64%, transparent);
|
|
116
116
|
cursor: pointer;
|
|
117
117
|
transition: var(--transition-control);
|
|
118
|
-
outline: var(--ring-rest);
|
|
119
118
|
}
|
|
120
119
|
.zc-alert__close:hover {
|
|
121
120
|
background: color-mix(in oklab, var(--alert-fg) 9%, transparent);
|
|
@@ -40,6 +40,7 @@ export function DateField({
|
|
|
40
40
|
invalid = false,
|
|
41
41
|
message,
|
|
42
42
|
disabled = false,
|
|
43
|
+
size = 'md',
|
|
43
44
|
className = '',
|
|
44
45
|
htmlProps,
|
|
45
46
|
activateOn = 'pointerdown',
|
|
@@ -57,6 +58,7 @@ export function DateField({
|
|
|
57
58
|
invalid={invalid}
|
|
58
59
|
message={message}
|
|
59
60
|
icon="calendar"
|
|
61
|
+
size={size}
|
|
60
62
|
className={className}
|
|
61
63
|
htmlProps={htmlProps}
|
|
62
64
|
>
|
|
@@ -45,6 +45,7 @@ export function DateRangeField({
|
|
|
45
45
|
invalid = false,
|
|
46
46
|
message,
|
|
47
47
|
disabled = false,
|
|
48
|
+
size = 'md',
|
|
48
49
|
className = '',
|
|
49
50
|
htmlProps,
|
|
50
51
|
activateOn = 'pointerdown',
|
|
@@ -80,6 +81,7 @@ export function DateRangeField({
|
|
|
80
81
|
invalid={invalid}
|
|
81
82
|
message={message}
|
|
82
83
|
icon="calendar"
|
|
84
|
+
size={size}
|
|
83
85
|
className={className}
|
|
84
86
|
htmlProps={htmlProps}
|
|
85
87
|
>
|
|
@@ -64,6 +64,7 @@ export function DateTimeField({
|
|
|
64
64
|
invalid = false,
|
|
65
65
|
message,
|
|
66
66
|
disabled = false,
|
|
67
|
+
size = 'md',
|
|
67
68
|
className = '',
|
|
68
69
|
htmlProps,
|
|
69
70
|
activateOn = 'pointerdown',
|
|
@@ -121,6 +122,7 @@ export function DateTimeField({
|
|
|
121
122
|
invalid={invalid}
|
|
122
123
|
message={message}
|
|
123
124
|
icon="calendar"
|
|
125
|
+
size={size}
|
|
124
126
|
className={className}
|
|
125
127
|
htmlProps={htmlProps}
|
|
126
128
|
>
|
|
@@ -40,6 +40,7 @@ export function TimeField({
|
|
|
40
40
|
invalid = false,
|
|
41
41
|
message,
|
|
42
42
|
disabled = false,
|
|
43
|
+
size = 'md',
|
|
43
44
|
className = '',
|
|
44
45
|
htmlProps,
|
|
45
46
|
}: TimeFieldProps) {
|
|
@@ -60,6 +61,7 @@ export function TimeField({
|
|
|
60
61
|
invalid={invalid}
|
|
61
62
|
message={message}
|
|
62
63
|
icon="clock"
|
|
64
|
+
size={size}
|
|
63
65
|
className={className}
|
|
64
66
|
htmlProps={htmlProps}
|
|
65
67
|
>
|