@zyncat/ui 0.15.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -202
- package/dist/alert.css +1 -1
- package/dist/alert.js +18 -10
- package/dist/alert.js.map +1 -1
- package/dist/avatar.css +3 -2
- package/dist/badge.css +1 -1
- package/dist/bloom-HV23M4AW.js +81 -0
- package/dist/bloom-HV23M4AW.js.map +1 -0
- package/dist/button.css +38 -31
- package/dist/button.js +4 -1
- package/dist/checkbox.css +1 -1
- package/dist/{chunk-5W5TKANX.js → chunk-2DNKZ57E.js} +3 -3
- package/dist/{chunk-5W5TKANX.js.map → chunk-2DNKZ57E.js.map} +1 -1
- package/dist/chunk-2YGHPQ66.js +16 -0
- package/dist/chunk-2YGHPQ66.js.map +1 -0
- package/dist/{chunk-N2GJEO5Z.js → chunk-6H3IJ752.js} +24 -9
- package/dist/chunk-6H3IJ752.js.map +1 -0
- package/dist/chunk-7NHY2CRA.js +132 -0
- package/dist/chunk-7NHY2CRA.js.map +1 -0
- package/dist/{chunk-PWQVSVXR.js → chunk-AIAPXRCI.js} +20 -19
- package/dist/chunk-AIAPXRCI.js.map +1 -0
- package/dist/{chunk-K45CWVHS.js → chunk-BRKGYLEQ.js} +12 -9
- package/dist/chunk-BRKGYLEQ.js.map +1 -0
- package/dist/{chunk-MDSRZ4QR.js → chunk-C3D32LE3.js} +6 -5
- package/dist/chunk-C3D32LE3.js.map +1 -0
- package/dist/chunk-F2TB3TT6.js +103 -0
- package/dist/chunk-F2TB3TT6.js.map +1 -0
- package/dist/{chunk-FVPNICF4.js → chunk-F64Z42PJ.js} +6 -6
- package/dist/{chunk-FVPNICF4.js.map → chunk-F64Z42PJ.js.map} +1 -1
- package/dist/{chunk-QGVFFT2B.js → chunk-HBWRKEW4.js} +3 -3
- package/dist/{chunk-QGVFFT2B.js.map → chunk-HBWRKEW4.js.map} +1 -1
- package/dist/{chunk-CAXQJSIE.js → chunk-JINATP4N.js} +13 -13
- package/dist/chunk-JINATP4N.js.map +1 -0
- package/dist/chunk-KSAJ6DED.js +16 -0
- package/dist/chunk-KSAJ6DED.js.map +1 -0
- package/dist/{chunk-BH4JFWXQ.js → chunk-M2KGLH2G.js} +19 -16
- package/dist/chunk-M2KGLH2G.js.map +1 -0
- package/dist/{chunk-6X3G4GIM.js → chunk-N43NDSME.js} +3 -3
- package/dist/{chunk-6X3G4GIM.js.map → chunk-N43NDSME.js.map} +1 -1
- package/dist/chunk-NYQQH4R5.js +40 -0
- package/dist/chunk-NYQQH4R5.js.map +1 -0
- package/dist/{chunk-BTF6DAE3.js → chunk-ODRO3KS6.js} +4 -4
- package/dist/{chunk-BTF6DAE3.js.map → chunk-ODRO3KS6.js.map} +1 -1
- package/dist/chunk-PXQBJMPJ.js +50 -0
- package/dist/chunk-PXQBJMPJ.js.map +1 -0
- package/dist/{chunk-GJTHWB6O.js → chunk-QDAN43B6.js} +3 -3
- package/dist/{chunk-GJTHWB6O.js.map → chunk-QDAN43B6.js.map} +1 -1
- package/dist/{chunk-RBSHRRNO.js → chunk-RJENXXTI.js} +5 -5
- package/dist/{chunk-RBSHRRNO.js.map → chunk-RJENXXTI.js.map} +1 -1
- package/dist/chunk-RLNCRDAL.js +89 -0
- package/dist/chunk-RLNCRDAL.js.map +1 -0
- package/dist/{chunk-GOLSYGRA.js → chunk-TBLPZQSI.js} +84 -48
- package/dist/chunk-TBLPZQSI.js.map +1 -0
- package/dist/{chunk-WZUTBJC4.js → chunk-TDHLZY6I.js} +23 -5
- package/dist/chunk-TDHLZY6I.js.map +1 -0
- package/dist/chunk-TP2AC5MQ.js +13 -0
- package/dist/chunk-TP2AC5MQ.js.map +1 -0
- package/dist/chunk-TRPAKUIB.js +196 -0
- package/dist/chunk-TRPAKUIB.js.map +1 -0
- package/dist/{chunk-5X3MJRIM.js → chunk-UKPX3RIP.js} +3 -3
- package/dist/{chunk-5X3MJRIM.js.map → chunk-UKPX3RIP.js.map} +1 -1
- package/dist/{chunk-5GBV45YD.js → chunk-V6QAAOA5.js} +3 -3
- package/dist/{chunk-5GBV45YD.js.map → chunk-V6QAAOA5.js.map} +1 -1
- package/dist/{chunk-FLQVOSFC.js → chunk-VJXP256V.js} +10 -10
- package/dist/chunk-VJXP256V.js.map +1 -0
- package/dist/{chunk-IUQAUBVM.js → chunk-VQFILXQN.js} +5 -5
- package/dist/chunk-VQFILXQN.js.map +1 -0
- package/dist/{chunk-CFRGQJ23.js → chunk-VZXML7EH.js} +4 -4
- package/dist/{chunk-CFRGQJ23.js.map → chunk-VZXML7EH.js.map} +1 -1
- package/dist/{chunk-FEXUS4SV.js → chunk-XKDR22VE.js} +11 -5
- package/dist/chunk-XKDR22VE.js.map +1 -0
- package/dist/cli.js +262 -45
- package/dist/collapse.css +8 -5
- package/dist/confetti.css +3 -3
- package/dist/confetti.js +2 -2
- package/dist/date-field.js +20 -18
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +168 -43
- package/dist/date-range-field.js +42 -27
- 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 +4 -3
- package/dist/dialog.js +12 -12
- package/dist/dialog.js.map +1 -1
- package/dist/digit-strip.css +1 -1
- package/dist/dropdown.css +1 -1
- package/dist/dropdown.js +16 -16
- package/dist/dropdown.js.map +1 -1
- package/dist/emoji-picker.js +41 -26
- package/dist/emoji-picker.js.map +1 -1
- package/dist/facebook-feed.css +1 -1
- package/dist/flow-field.css +4 -4
- package/dist/flow-field.js +3 -3
- package/dist/flow-field.js.map +1 -1
- package/dist/glide.js +3 -3
- package/dist/icon.css +1 -1
- package/dist/input.css +7 -4
- package/dist/instagram-feed.css +1 -1
- package/dist/instagram-feed.js +2 -2
- package/dist/lens.css +1 -2
- package/dist/lens.js +2 -2
- package/dist/mcp.js +1 -1
- package/dist/menu-surface.css +1 -1
- package/dist/modal.css +1 -1
- package/dist/modal.js +10 -10
- package/dist/modal.js.map +1 -1
- package/dist/morphing-text.css +2 -2
- package/dist/morphing-text.js +2 -2
- package/dist/motion-devtools.css +77 -2
- package/dist/motion-devtools.js +194 -37
- package/dist/motion-devtools.js.map +1 -1
- package/dist/motion-tokens.js +1 -1
- package/dist/multi-select.js +12 -12
- package/dist/number-field.js +3 -3
- package/dist/odometer.css +1 -1
- package/dist/odometer.js +2 -2
- package/dist/overlay.css +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +6 -4
- package/dist/pagination.js.map +1 -1
- package/dist/paint-CJQCM6ZO.js +260 -0
- package/dist/paint-CJQCM6ZO.js.map +1 -0
- package/dist/popover.css +1 -1
- package/dist/popover.js +10 -10
- package/dist/radio-group.css +6 -4
- package/dist/radio-group.js +6 -6
- package/dist/select.css +1 -1
- package/dist/select.js +12 -12
- package/dist/sheet.css +1 -1
- package/dist/sheet.js +9 -9
- package/dist/spinner.css +115 -0
- package/dist/spinner.js +4 -0
- package/dist/spinner.js.map +1 -0
- package/dist/status-badge.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/support-rail.css +76 -238
- package/dist/support-rail.js +99 -107
- package/dist/support-rail.js.map +1 -1
- package/dist/table.css +2 -2
- package/dist/table.js +8 -6
- package/dist/table.js.map +1 -1
- package/dist/tabs.css +10 -14
- package/dist/tabs.js +17 -11
- package/dist/tabs.js.map +1 -1
- package/dist/tag.css +1 -1
- package/dist/tag.js +6 -6
- package/dist/text-field.js +3 -3
- package/dist/textarea.css +1 -1
- package/dist/textarea.js +2 -2
- package/dist/theme-grid.js +11 -0
- package/dist/theme-grid.js.map +1 -0
- package/dist/theme-switcher.css +107 -0
- package/dist/theme-switcher.js +70 -0
- package/dist/theme-switcher.js.map +1 -0
- package/dist/theme-transition-VGLPZDJI.js +346 -0
- package/dist/theme-transition-VGLPZDJI.js.map +1 -0
- package/dist/theme-transition.css +48 -0
- package/dist/theme.js +57 -26
- package/dist/theme.js.map +1 -1
- package/dist/tide-DJZMDAFT.js +57 -0
- package/dist/tide-DJZMDAFT.js.map +1 -0
- package/dist/tiktok.css +2 -3
- package/dist/tiktok.js +2 -2
- package/dist/time-field.js +4 -4
- package/dist/toast.css +2 -14
- package/dist/toast.js +12 -10
- package/dist/toast.js.map +1 -1
- package/dist/toggle-tag.js +2 -2
- package/dist/toggle.css +1 -1
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +25 -22
- package/dist/tooltip.js.map +1 -1
- package/dist/trigger.css +1 -1
- package/dist/types/components/composites/date-picker/month-jump.d.ts +11 -0
- package/dist/types/components/composites/theme-switcher/ThemeGrid.d.ts +20 -0
- package/dist/types/components/composites/theme-switcher/ThemeSwitcher.d.ts +24 -0
- package/dist/types/components/compound/support-rail/SupportRail.d.ts +10 -8
- package/dist/types/components/dev/MotionDevtools.d.ts +10 -5
- package/dist/types/components/expressive/theme-transition/bloom.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/paint.d.ts +2 -0
- package/dist/types/components/expressive/theme-transition/scene.d.ts +24 -0
- package/dist/types/components/expressive/theme-transition/theme-transition.d.ts +19 -0
- package/dist/types/components/expressive/theme-transition/tide.d.ts +2 -0
- package/dist/types/components/internal/hooks/use-press-feedback.d.ts +7 -0
- package/dist/types/components/internal/icon/Icon.d.ts +1 -0
- package/dist/types/components/internal/overlay/layer.d.ts +7 -1
- package/dist/types/components/internal/utils/token-px.d.ts +1 -1
- package/dist/types/components/primitives/button/Button.d.ts +9 -12
- package/dist/types/components/primitives/button/button-style.d.ts +15 -0
- package/dist/types/components/primitives/spinner/Spinner.d.ts +27 -0
- package/dist/types/engine/animate.d.ts +1 -0
- package/dist/types/motion/motion-timing.d.ts +1 -1
- package/dist/types/tokens/component-styles.generated.d.ts +35 -38
- package/dist/types/tokens/motion-tokens.d.ts +5 -3
- package/dist/types/tokens/theme-store.d.ts +47 -0
- package/dist/types/tokens/theme-sync.d.ts +7 -1
- package/dist/types/tokens/theme-tokens.generated.d.ts +125 -115
- package/dist/types/tokens/theme.d.ts +28 -5
- package/dist/typing-lines.css +1 -1
- package/dist/typing-lines.js +2 -2
- package/dist/typing-lines.js.map +1 -1
- package/dist/weight-field.css +2 -2
- package/dist/youtube.css +1 -1
- package/dist/youtube.js +2 -2
- package/package.json +20 -24
- package/skills/zyncat-ui/SKILL.md +1 -1
- package/skills/zyncat-ui/references/components.md +5 -2
- package/skills/zyncat-ui/references/theming.md +31 -23
- package/src/components/composites/alert/Alert.tsx +7 -3
- package/src/components/composites/alert/alert.css +1 -1
- package/src/components/composites/date-picker/calendar-panel.tsx +10 -4
- package/src/components/composites/date-picker/date-picker.css +168 -43
- package/src/components/composites/date-picker/month-jump.tsx +192 -0
- package/src/components/composites/date-picker/range-panel.tsx +20 -5
- package/src/components/composites/dialog/Dialog.tsx +2 -2
- package/src/components/composites/dialog/dialog.css +4 -3
- package/src/components/composites/dropdown/Dropdown.tsx +5 -5
- package/src/components/composites/dropdown/dropdown.css +1 -1
- package/src/components/composites/emoji-picker/react/category-bar.tsx +17 -5
- package/src/components/composites/emoji-picker/scaffold.ts +6 -5
- package/src/components/composites/emoji-picker/styles.css +1 -1
- package/src/components/composites/modal/Modal.tsx +2 -2
- package/src/components/composites/modal/modal.css +1 -1
- package/src/components/composites/pagination/pagination.css +1 -1
- package/src/components/composites/popover/Popover.tsx +5 -5
- package/src/components/composites/popover/popover.css +1 -1
- package/src/components/composites/select/core/menu.tsx +15 -10
- package/src/components/composites/select/select.css +1 -1
- package/src/components/composites/sheet/Sheet.tsx +2 -2
- package/src/components/composites/sheet/sheet.css +1 -1
- package/src/components/composites/table/table.css +2 -2
- package/src/components/composites/tabs/Tabs.tsx +13 -7
- package/src/components/composites/tabs/tabs.css +10 -14
- package/src/components/composites/theme-switcher/ThemeGrid.tsx +133 -0
- package/src/components/composites/theme-switcher/ThemeGrid.usage.md +20 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.tsx +75 -0
- package/src/components/composites/theme-switcher/ThemeSwitcher.usage.md +21 -0
- package/src/components/composites/theme-switcher/theme-switcher.css +107 -0
- package/src/components/composites/toast/Toast.tsx +2 -1
- package/src/components/composites/toast/toast.css +2 -14
- package/src/components/composites/tooltip/tooltip-host.tsx +19 -17
- package/src/components/composites/tooltip/tooltip.css +1 -1
- package/src/components/compound/support-rail/SupportRail.tsx +116 -128
- package/src/components/compound/support-rail/SupportRail.usage.md +7 -6
- package/src/components/compound/support-rail/support-rail.css +76 -238
- package/src/components/dev/MotionDevtools.tsx +252 -42
- package/src/components/dev/MotionDevtools.usage.md +12 -4
- package/src/components/dev/motion-devtools.css +77 -2
- package/src/components/dev/slowmo-engine.ts +1 -1
- package/src/components/expressive/confetti/confetti.css +3 -3
- package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
- package/src/components/expressive/flow-field/FlowField.tsx +1 -1
- package/src/components/expressive/flow-field/flow-field.css +4 -4
- package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
- package/src/components/expressive/lens/lens.css +1 -2
- package/src/components/expressive/morphing-text/morphing-text.css +2 -2
- package/src/components/expressive/odometer/odometer.css +1 -1
- package/src/components/expressive/theme-transition/bloom.ts +88 -0
- package/src/components/expressive/theme-transition/paint.ts +296 -0
- package/src/components/expressive/theme-transition/scene.ts +38 -0
- package/src/components/expressive/theme-transition/theme-transition.css +48 -0
- package/src/components/expressive/theme-transition/theme-transition.ts +423 -0
- package/src/components/expressive/theme-transition/tide.ts +65 -0
- package/src/components/expressive/tiktok/tiktok.css +2 -3
- package/src/components/expressive/typing-lines/TypingLines.tsx +0 -0
- package/src/components/expressive/typing-lines/typing-lines.css +1 -1
- package/src/components/expressive/weight-field/weight-field.css +2 -2
- package/src/components/expressive/youtube/youtube.css +1 -1
- package/src/components/internal/glass/glass.css +1 -1
- package/src/components/internal/hooks/use-press-feedback.ts +52 -0
- package/src/components/internal/icon/Icon.tsx +2 -0
- package/src/components/internal/icon/icon.css +1 -1
- package/src/components/internal/menu/menu-surface.css +1 -1
- package/src/components/internal/overlay/layer.tsx +35 -2
- package/src/components/internal/overlay/overlay.css +1 -1
- package/src/components/internal/overlay/position.ts +2 -2
- package/src/components/internal/overlay/trigger.css +1 -1
- package/src/components/internal/utils/token-px.ts +4 -4
- package/src/components/primitives/avatar/avatar.css +3 -2
- package/src/components/primitives/badge/badge.css +1 -1
- package/src/components/primitives/badge/digit-strip.css +1 -1
- package/src/components/primitives/button/Button.tsx +28 -27
- package/src/components/primitives/button/button-style.ts +28 -0
- package/src/components/primitives/button/button.css +38 -31
- package/src/components/primitives/checkbox/checkbox.css +1 -1
- package/src/components/primitives/collapse/collapse.css +8 -5
- package/src/components/primitives/input/input.css +7 -4
- package/src/components/primitives/radio-group/radio-group.css +6 -4
- package/src/components/primitives/spinner/Spinner.tsx +70 -0
- package/src/components/primitives/spinner/Spinner.usage.md +19 -0
- package/src/components/primitives/spinner/spinner.css +115 -0
- package/src/components/primitives/tag/tag.css +1 -1
- package/src/components/primitives/textarea/textarea.css +1 -1
- package/src/components/primitives/toggle/toggle.css +1 -1
- package/src/engine/animate.ts +10 -2
- package/src/mcp/server.ts +2 -1
- package/src/motion/glide.tsx +9 -6
- package/src/motion/motion-timing.ts +5 -2
- package/src/styles.css +3 -4
- package/src/tokens/base.css +5 -5
- package/src/tokens/color.css +8 -9
- package/src/tokens/component-styles.generated.ts +36 -38
- package/src/tokens/dark.css +8 -13
- package/src/tokens/decisions.css +9 -12
- package/src/tokens/elevation.css +18 -26
- package/src/tokens/glass.css +3 -2
- package/src/tokens/motion-defaults.generated.ts +1 -1
- package/src/tokens/motion-tokens.ts +27 -8
- package/src/tokens/motion.css +9 -9
- package/src/tokens/radius.css +3 -2
- package/src/tokens/reset.css +36 -0
- package/src/tokens/semantic.css +12 -22
- package/src/tokens/spacing.css +1 -1
- package/src/tokens/theme-store.ts +187 -0
- package/src/tokens/theme-sync.tsx +49 -2
- package/src/tokens/theme-tokens.generated.ts +128 -116
- package/src/tokens/theme.tsx +96 -24
- package/src/tokens/theme.usage.md +25 -24
- package/src/tokens/typography.css +4 -3
- package/tailwind.css +8 -14
- package/dist/chunk-6SUHSSOK.js +0 -25
- package/dist/chunk-6SUHSSOK.js.map +0 -1
- package/dist/chunk-BH4JFWXQ.js.map +0 -1
- package/dist/chunk-CAXQJSIE.js.map +0 -1
- package/dist/chunk-FEXUS4SV.js.map +0 -1
- package/dist/chunk-FLQVOSFC.js.map +0 -1
- package/dist/chunk-GOLSYGRA.js.map +0 -1
- package/dist/chunk-IUQAUBVM.js.map +0 -1
- package/dist/chunk-K45CWVHS.js.map +0 -1
- package/dist/chunk-MDSRZ4QR.js.map +0 -1
- package/dist/chunk-N2GJEO5Z.js.map +0 -1
- package/dist/chunk-PWQVSVXR.js.map +0 -1
- package/dist/chunk-UE63OOVG.js +0 -13
- package/dist/chunk-UE63OOVG.js.map +0 -1
- package/dist/chunk-UYSXJ7MH.js +0 -52
- package/dist/chunk-UYSXJ7MH.js.map +0 -1
- package/dist/chunk-WZUTBJC4.js.map +0 -1
- package/src/tokens/fonts.css +0 -1
|
@@ -30,8 +30,14 @@ declare function ovCloneTrigger(trigger: ReactElement | null, { open, onPress, o
|
|
|
30
30
|
triggerRef: RefObject<HTMLElement>;
|
|
31
31
|
activateOn?: ActivateOn;
|
|
32
32
|
}): ReactElement | null;
|
|
33
|
-
|
|
33
|
+
export interface InheritedThemeAttrs {
|
|
34
|
+
'data-theme'?: string;
|
|
35
|
+
'data-polarity'?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function inheritedThemeAttrs(scope: Element | null | undefined): InheritedThemeAttrs;
|
|
38
|
+
declare function OverlayPortal({ container, scope, children, }: {
|
|
34
39
|
container?: HTMLElement | null;
|
|
40
|
+
scope?: Element | null;
|
|
35
41
|
children: ReactNode;
|
|
36
42
|
}): import("react").ReactPortal;
|
|
37
43
|
export { ovIsTop, ovInOverlayAbove, useOverlayEntry, useOutsidePress, ovCloneTrigger, OverlayPortal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function tokenPx(token: string, fallback?: number): number;
|
|
1
|
+
export declare function tokenPx(token: string, fallback?: number, scope?: Element | null): number;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import './button.css';
|
|
2
1
|
import type { ButtonHTMLAttributes, CSSProperties, ReactNode, Ref } from 'react';
|
|
3
2
|
import type { DataAttributes } from '../../../dom-props';
|
|
3
|
+
import { type ButtonSize, type ButtonVariant } from './button-style';
|
|
4
|
+
export { buttonClass } from './button-style';
|
|
5
|
+
export type { ButtonSize, ButtonStyleProps, ButtonVariant } from './button-style';
|
|
4
6
|
interface ButtonOwnProps {
|
|
5
|
-
/** Visual weight / intent.
|
|
6
|
-
|
|
7
|
-
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'link' | 'unstyled';
|
|
7
|
+
/** Visual weight / intent. @default 'primary' */
|
|
8
|
+
variant?: ButtonVariant;
|
|
8
9
|
/** Forwarded to the underlying <button> (React 19 ref-as-prop). */
|
|
9
10
|
ref?: Ref<HTMLButtonElement>;
|
|
10
11
|
/** Control height. sm 28px - md 32px (default) - lg 37px. @default 'md' */
|
|
11
|
-
size?:
|
|
12
|
+
size?: ButtonSize;
|
|
12
13
|
/** `submit` / `reset` / `button`. @default 'button' */
|
|
13
14
|
type?: 'button' | 'submit' | 'reset';
|
|
14
15
|
/** Disable the control (also implied by `loading`). */
|
|
15
16
|
disabled?: boolean;
|
|
16
|
-
/** Loading - swaps
|
|
17
|
+
/** Loading - swaps the label for a spinner and makes the button inert. The label stays
|
|
18
|
+
* mounted but invisible, so the button holds its width. */
|
|
17
19
|
loading?: boolean;
|
|
18
20
|
/** Stretch to fill the container width. */
|
|
19
21
|
fullWidth?: boolean;
|
|
@@ -23,10 +25,6 @@ interface ButtonOwnProps {
|
|
|
23
25
|
style?: CSSProperties;
|
|
24
26
|
/** Button label. */
|
|
25
27
|
children?: ReactNode;
|
|
26
|
-
/** Click handler */
|
|
27
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
28
|
-
/** Pointer handler */
|
|
29
|
-
onPointerDown?: React.PointerEventHandler<HTMLButtonElement>;
|
|
30
28
|
}
|
|
31
29
|
type ButtonRestProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonOwnProps> & DataAttributes;
|
|
32
30
|
export interface ButtonProps extends ButtonOwnProps, ButtonRestProps {
|
|
@@ -34,5 +32,4 @@ export interface ButtonProps extends ButtonOwnProps, ButtonRestProps {
|
|
|
34
32
|
* Bare `<button>` attributes also pass through directly; `htmlProps` wins on conflict. */
|
|
35
33
|
htmlProps?: ButtonRestProps;
|
|
36
34
|
}
|
|
37
|
-
export declare function Button({ variant, size, type, disabled, loading, fullWidth, className, style, children,
|
|
38
|
-
export {};
|
|
35
|
+
export declare function Button({ variant, size, type, disabled, loading, fullWidth, className, style, children, ref, htmlProps, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
|
|
3
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
4
|
+
export interface ButtonStyleProps {
|
|
5
|
+
/** Visual weight / intent. Omit for base chrome only - sizing, focus ring, layout -
|
|
6
|
+
* with no skin, for a local re-skin through `className`. */
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
/** Control height. sm 28px - md 32px (default) - lg 37px. @default 'md' */
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
/** Stretch to fill the container width. */
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
/** Extra class(es) merged onto the result. */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function buttonClass({ variant, size, fullWidth, className }?: ButtonStyleProps): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './spinner.css';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { DataAttributes } from '../../../dom-props';
|
|
4
|
+
export type SpinnerSize = 'inherit' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type SpinnerThickness = 'thin' | 'regular' | 'bold';
|
|
6
|
+
export type SpinnerVariant = 'arc' | 'dots' | 'pulse';
|
|
7
|
+
export interface SpinnerProps {
|
|
8
|
+
/** Diameter. `inherit` tracks the parent's font size at 1em, so a spinner beside a label
|
|
9
|
+
* always matches it; for any other size set `style={{ fontSize }}`. @default 'inherit' */
|
|
10
|
+
size?: SpinnerSize;
|
|
11
|
+
/** Stroke weight, scaled to the diameter so it holds up at every size. @default 'regular' */
|
|
12
|
+
thickness?: SpinnerThickness;
|
|
13
|
+
/** Which loader to draw. @default 'arc' */
|
|
14
|
+
variant?: SpinnerVariant;
|
|
15
|
+
/** What assistive tech announces. Pass `null` when something nearby already announces the
|
|
16
|
+
* wait - a button's `aria-busy`, an enclosing `role="status"` - and the spinner turns
|
|
17
|
+
* decorative rather than announcing it twice. @default 'Loading' */
|
|
18
|
+
label?: string | null;
|
|
19
|
+
/** Hold invisible for a beat before fading in, so work that finishes quickly never flashes
|
|
20
|
+
* a spinner. @default false */
|
|
21
|
+
delay?: boolean;
|
|
22
|
+
/** Extra class(es) merged onto the root. */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Inline styles merged onto the root. */
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
export declare function Spinner({ size, thickness, variant, label, delay, className, style, ...rest }: SpinnerProps & DataAttributes): import("react").JSX.Element;
|
|
@@ -13,4 +13,4 @@ export interface MotionTimings {
|
|
|
13
13
|
open: MotionTransition;
|
|
14
14
|
close: MotionTransition;
|
|
15
15
|
}
|
|
16
|
-
export declare function resolveMotionTiming(animation: DisableableAnimation | undefined, defaults: MotionTimingDefaults): MotionTimings;
|
|
16
|
+
export declare function resolveMotionTiming(animation: DisableableAnimation | undefined, defaults: MotionTimingDefaults, scope?: Element | null): MotionTimings;
|
|
@@ -8,17 +8,17 @@ import type { CSSProperties } from 'react';
|
|
|
8
8
|
* Generated from the token and component CSS by `scripts/gen-theme.mjs` - `pnpm sync` rebuilds it.
|
|
9
9
|
*/
|
|
10
10
|
export interface ConfettiStyle extends CSSProperties {
|
|
11
|
-
/** `--confetti-paper-1` - The five papers a burst draws from
|
|
11
|
+
/** `--confetti-paper-1` - The five papers a burst draws from. Default: `oklch(0.53 0.2 288)`. */
|
|
12
12
|
'--confetti-paper-1'?: string | number;
|
|
13
|
-
/** `--confetti-paper-2` - The five papers a burst draws from
|
|
13
|
+
/** `--confetti-paper-2` - The five papers a burst draws from. Default: `var(--accent)`. */
|
|
14
14
|
'--confetti-paper-2'?: string | number;
|
|
15
|
-
/** `--confetti-paper-3` - The five papers a burst draws from
|
|
15
|
+
/** `--confetti-paper-3` - The five papers a burst draws from. Default: `oklch(0.78 0.115 62)`. */
|
|
16
16
|
'--confetti-paper-3'?: string | number;
|
|
17
|
-
/** `--confetti-paper-4` - The five papers a burst draws from
|
|
17
|
+
/** `--confetti-paper-4` - The five papers a burst draws from. Default: `oklch(0.67 0.18 12)`. */
|
|
18
18
|
'--confetti-paper-4'?: string | number;
|
|
19
|
-
/** `--confetti-paper-5` - The five papers a burst draws from
|
|
19
|
+
/** `--confetti-paper-5` - The five papers a burst draws from. Default: `var(--text-strong)`. */
|
|
20
20
|
'--confetti-paper-5'?: string | number;
|
|
21
|
-
/** `--confetti-weights` - How often each paper appears
|
|
21
|
+
/** `--confetti-weights` - How often each paper appears, in slot order. Default: `1 1 1 1 0.45`. */
|
|
22
22
|
'--confetti-weights'?: string | number;
|
|
23
23
|
/** `--confetti-ink` - What the reverse side of a piece darkens toward. Default: `var(--text-strong)`. */
|
|
24
24
|
'--confetti-ink'?: string | number;
|
|
@@ -33,35 +33,35 @@ export interface ConfettiStyle extends CSSProperties {
|
|
|
33
33
|
}
|
|
34
34
|
/** Inline styles for FlowField, including its `--flow-field-*` knobs. */
|
|
35
35
|
export interface FlowFieldStyle extends CSSProperties {
|
|
36
|
-
/** `--flow-field-ink` - The particle colour at rest
|
|
36
|
+
/** `--flow-field-ink` - The particle colour at rest. Default: `var(--text-subtle)`. */
|
|
37
37
|
'--flow-field-ink'?: string | number;
|
|
38
|
-
/** `--flow-field-accent` - The particle colour at full speed
|
|
38
|
+
/** `--flow-field-accent` - The particle colour at full speed. Default: `var(--accent)`. */
|
|
39
39
|
'--flow-field-accent'?: string | number;
|
|
40
40
|
/** `--flow-field-min-height` - The field's minimum height before content sizes it. Default: `var(--space-10)`. */
|
|
41
41
|
'--flow-field-min-height'?: string | number;
|
|
42
|
-
/** `--flow-field-ramp-0` - The twelve stops from ink to accent,
|
|
42
|
+
/** `--flow-field-ramp-0` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-ink)`. */
|
|
43
43
|
'--flow-field-ramp-0'?: string | number;
|
|
44
|
-
/** `--flow-field-ramp-1` - The twelve stops from ink to accent,
|
|
44
|
+
/** `--flow-field-ramp-1` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 9%, var(--flow-field-ink))`. */
|
|
45
45
|
'--flow-field-ramp-1'?: string | number;
|
|
46
|
-
/** `--flow-field-ramp-2` - The twelve stops from ink to accent,
|
|
46
|
+
/** `--flow-field-ramp-2` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 18%, var(--flow-field-ink))`. */
|
|
47
47
|
'--flow-field-ramp-2'?: string | number;
|
|
48
|
-
/** `--flow-field-ramp-3` - The twelve stops from ink to accent,
|
|
48
|
+
/** `--flow-field-ramp-3` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 27%, var(--flow-field-ink))`. */
|
|
49
49
|
'--flow-field-ramp-3'?: string | number;
|
|
50
|
-
/** `--flow-field-ramp-4` - The twelve stops from ink to accent,
|
|
50
|
+
/** `--flow-field-ramp-4` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 36%, var(--flow-field-ink))`. */
|
|
51
51
|
'--flow-field-ramp-4'?: string | number;
|
|
52
|
-
/** `--flow-field-ramp-5` - The twelve stops from ink to accent,
|
|
52
|
+
/** `--flow-field-ramp-5` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 45%, var(--flow-field-ink))`. */
|
|
53
53
|
'--flow-field-ramp-5'?: string | number;
|
|
54
|
-
/** `--flow-field-ramp-6` - The twelve stops from ink to accent,
|
|
54
|
+
/** `--flow-field-ramp-6` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 55%, var(--flow-field-ink))`. */
|
|
55
55
|
'--flow-field-ramp-6'?: string | number;
|
|
56
|
-
/** `--flow-field-ramp-7` - The twelve stops from ink to accent,
|
|
56
|
+
/** `--flow-field-ramp-7` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 64%, var(--flow-field-ink))`. */
|
|
57
57
|
'--flow-field-ramp-7'?: string | number;
|
|
58
|
-
/** `--flow-field-ramp-8` - The twelve stops from ink to accent,
|
|
58
|
+
/** `--flow-field-ramp-8` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 73%, var(--flow-field-ink))`. */
|
|
59
59
|
'--flow-field-ramp-8'?: string | number;
|
|
60
|
-
/** `--flow-field-ramp-9` - The twelve stops from ink to accent,
|
|
60
|
+
/** `--flow-field-ramp-9` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 82%, var(--flow-field-ink))`. */
|
|
61
61
|
'--flow-field-ramp-9'?: string | number;
|
|
62
|
-
/** `--flow-field-ramp-10` - The twelve stops from ink to accent,
|
|
62
|
+
/** `--flow-field-ramp-10` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `color-mix(in oklab, var(--flow-field-accent) 91%, var(--flow-field-ink))`. */
|
|
63
63
|
'--flow-field-ramp-10'?: string | number;
|
|
64
|
-
/** `--flow-field-ramp-11` - The twelve stops from ink to accent,
|
|
64
|
+
/** `--flow-field-ramp-11` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-accent)`. */
|
|
65
65
|
'--flow-field-ramp-11'?: string | number;
|
|
66
66
|
}
|
|
67
67
|
/** Inline styles for Lens, including its `--lens-*` knobs. */
|
|
@@ -87,7 +87,7 @@ export interface MorphingTextStyle extends CSSProperties {
|
|
|
87
87
|
'--morphing-text-leading'?: string | number;
|
|
88
88
|
/** `--morphing-text-tracking` - Letter spacing. Default: `var(--tracking-display)`. */
|
|
89
89
|
'--morphing-text-tracking'?: string | number;
|
|
90
|
-
/** `--morphing-text-smear` - How much letters blur
|
|
90
|
+
/** `--morphing-text-smear` - How much letters blur between words, 0 cutting clean. Default: `1`. */
|
|
91
91
|
'--morphing-text-smear'?: string | number;
|
|
92
92
|
/** `--morphing-text-rule-ink` - The rule at rest. Default: `var(--text-strong)`. */
|
|
93
93
|
'--morphing-text-rule-ink'?: string | number;
|
|
@@ -113,6 +113,11 @@ export interface OdometerStyle extends CSSProperties {
|
|
|
113
113
|
/** `--odometer-weight` - Digit weight. Default: `var(--weight-medium)`. */
|
|
114
114
|
'--odometer-weight'?: string | number;
|
|
115
115
|
}
|
|
116
|
+
/** Inline styles for ThemeTransition, including its `--theme-transition-*` knobs. */
|
|
117
|
+
export interface ThemeTransitionStyle extends CSSProperties {
|
|
118
|
+
/** `--theme-transition-layer` - The z-index the arriving page paints at, above every panel it covers. Default: `var(--layer-infinity)`. */
|
|
119
|
+
'--theme-transition-layer'?: string | number;
|
|
120
|
+
}
|
|
116
121
|
/** Inline styles for TypingLines, including its `--typing-lines-*` knobs. */
|
|
117
122
|
export interface TypingLinesStyle extends CSSProperties {
|
|
118
123
|
/** `--typing-lines-ink` - Letter ink. Default: `var(--text-strong)`. */
|
|
@@ -154,7 +159,7 @@ export interface WeightFieldStyle extends CSSProperties {
|
|
|
154
159
|
'--weight-field-peak-weight'?: string | number;
|
|
155
160
|
/** `--weight-field-hover-padding` - How much a unit widens under the pointer. Default: `calc(1em / 12)`. */
|
|
156
161
|
'--weight-field-hover-padding'?: string | number;
|
|
157
|
-
/** `--weight-field-stroke` - The text stroke every unit carries
|
|
162
|
+
/** `--weight-field-stroke` - The text stroke every unit carries, doubled on the peak letter. Default: `calc(1em * 125 / 6000)`. */
|
|
158
163
|
'--weight-field-stroke'?: string | number;
|
|
159
164
|
/** `--weight-field-duration` - How long a unit takes to settle at a new weight. Default: `400ms`. */
|
|
160
165
|
'--weight-field-duration'?: string | number;
|
|
@@ -163,28 +168,20 @@ export interface WeightFieldStyle extends CSSProperties {
|
|
|
163
168
|
}
|
|
164
169
|
/** Inline styles for SupportRail, including its `--support-rail-*` knobs. */
|
|
165
170
|
export interface SupportRailStyle extends CSSProperties {
|
|
166
|
-
/** `--support-rail-width` - Panel width
|
|
171
|
+
/** `--support-rail-width` - Panel width, capped by the container. Default: `318px`. */
|
|
167
172
|
'--support-rail-width'?: string | number;
|
|
168
|
-
/** `--support-rail-row-pad-block` - Row padding on the block axis
|
|
173
|
+
/** `--support-rail-row-pad-block` - Row padding on the block axis. Default: `var(--space-3)`. */
|
|
169
174
|
'--support-rail-row-pad-block'?: string | number;
|
|
170
|
-
/** `--support-rail-row-pad-inline` - Row padding on the inline axis
|
|
175
|
+
/** `--support-rail-row-pad-inline` - Row padding on the inline axis. Default: `var(--space-4)`. */
|
|
171
176
|
'--support-rail-row-pad-inline'?: string | number;
|
|
172
|
-
/** `--support-rail-surface` - The
|
|
177
|
+
/** `--support-rail-surface` - The tab, and the panel it morphs into. Default: `var(--bg-subtle)`. */
|
|
173
178
|
'--support-rail-surface'?: string | number;
|
|
174
|
-
/** `--support-rail-surface-raised` - The
|
|
179
|
+
/** `--support-rail-surface-raised` - The tab while hovered. Default: `var(--bg-surface)`. */
|
|
175
180
|
'--support-rail-surface-raised'?: string | number;
|
|
176
|
-
/** `--support-rail-line` - The
|
|
181
|
+
/** `--support-rail-line` - The surface's edge. Default: `var(--border-default)`. */
|
|
177
182
|
'--support-rail-line'?: string | number;
|
|
178
|
-
/** `--support-rail-line-soft` - Row dividers
|
|
183
|
+
/** `--support-rail-line-soft` - Row dividers. Default: `var(--border-subtle)`. */
|
|
179
184
|
'--support-rail-line-soft'?: string | number;
|
|
180
|
-
/** `--support-rail-
|
|
181
|
-
'--support-rail-accent'?: string | number;
|
|
182
|
-
/** `--support-rail-live-color` - The live dot and its pulse. Default: `var(--success)`. */
|
|
183
|
-
'--support-rail-live-color'?: string | number;
|
|
184
|
-
/** `--support-rail-radius` - The needle's outer corners. Default: `var(--radius-2xl)`. */
|
|
185
|
+
/** `--support-rail-radius` - The tab's outer corners. Default: `var(--radius-2xl)`. */
|
|
185
186
|
'--support-rail-radius'?: string | number;
|
|
186
|
-
/** `--support-rail-open-duration` - How long the panel takes to open. Default: `calc(var(--duration-slower) * 1.4)`. */
|
|
187
|
-
'--support-rail-open-duration'?: string | number;
|
|
188
|
-
/** `--support-rail-close-duration` - How long the panel takes to close. Default: `var(--duration-slower)`. */
|
|
189
|
-
'--support-rail-close-duration'?: string | number;
|
|
190
187
|
}
|
|
@@ -26,10 +26,12 @@ export interface MotionTokens {
|
|
|
26
26
|
reduced: boolean;
|
|
27
27
|
}
|
|
28
28
|
export declare const UIMotion: MotionTokens;
|
|
29
|
+
export declare function motionFor(scope?: Element | null): MotionTokens;
|
|
29
30
|
/**
|
|
30
|
-
* Re-reads the motion tokens into `UIMotion` in place
|
|
31
|
-
* a `data-theme`
|
|
32
|
-
* after
|
|
31
|
+
* Re-reads the motion tokens into `UIMotion` in place and drops every scoped read, so every held
|
|
32
|
+
* reference sees the new values. Runs on a `data-theme` or `data-polarity` change, a
|
|
33
|
+
* `prefers-reduced-motion` flip and after `ZyncatTheme` renders; call it yourself after injecting a
|
|
34
|
+
* stylesheet that retimes the `--duration-*` tokens.
|
|
33
35
|
*/
|
|
34
36
|
export declare function refreshMotionTokens(): MotionTokens;
|
|
35
37
|
export default UIMotion;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type Polarity = 'light' | 'dark';
|
|
2
|
+
export type PolarityPreference = Polarity | 'system';
|
|
3
|
+
export interface ThemeState {
|
|
4
|
+
/** The active palette - `default` when no other is named. */
|
|
5
|
+
theme: string;
|
|
6
|
+
/** The stored side, or `system` to follow the OS setting. */
|
|
7
|
+
polarity: PolarityPreference;
|
|
8
|
+
/** The side the page is painted in - `system` resolved through the OS setting. */
|
|
9
|
+
resolvedPolarity: Polarity;
|
|
10
|
+
/** Every palette `ZyncatTheme` declared, `default` first. */
|
|
11
|
+
themes: readonly string[];
|
|
12
|
+
/** Display name per palette - the palette's `name`, else its key title-cased. */
|
|
13
|
+
themeNames: Readonly<Record<string, string>>;
|
|
14
|
+
}
|
|
15
|
+
export interface ThemeControls extends ThemeState {
|
|
16
|
+
/** Switch the palette; the side stays. */
|
|
17
|
+
setTheme(theme: string): void;
|
|
18
|
+
/** Pick a side, or `system` to follow the OS setting. */
|
|
19
|
+
setPolarity(polarity: PolarityPreference): void;
|
|
20
|
+
}
|
|
21
|
+
export type ThemeBootConfig = {
|
|
22
|
+
key: string;
|
|
23
|
+
declared: ThemeState;
|
|
24
|
+
};
|
|
25
|
+
export interface ThemeChange {
|
|
26
|
+
current: ThemeState;
|
|
27
|
+
next: ThemeState;
|
|
28
|
+
origin?: readonly [number, number];
|
|
29
|
+
commit(): void;
|
|
30
|
+
revert(): void;
|
|
31
|
+
}
|
|
32
|
+
export interface ThemePreferenceOptions {
|
|
33
|
+
/** Viewport point the change spreads from - the centre of the pressed control. */
|
|
34
|
+
origin?: readonly [number, number];
|
|
35
|
+
}
|
|
36
|
+
export type ThemeTransitionRunner = (change: ThemeChange) => void;
|
|
37
|
+
export declare const DEFAULT_THEME = "default";
|
|
38
|
+
export declare const THEME_STORAGE_KEY = "zyncat-theme";
|
|
39
|
+
export declare function bootTheme(config: ThemeBootConfig, stored?: unknown): Omit<ThemeState, 'themes' | 'themeNames'>;
|
|
40
|
+
export declare function configureThemeStore(json: string): void;
|
|
41
|
+
export declare function applyTheme(stored?: unknown): void;
|
|
42
|
+
export declare const getThemeSnapshot: () => ThemeState;
|
|
43
|
+
export declare const getThemeTargetSnapshot: () => ThemeState;
|
|
44
|
+
export declare const getServerThemeSnapshot: () => ThemeState;
|
|
45
|
+
export declare function setThemeTransition(runner: ThemeTransitionRunner | null): void;
|
|
46
|
+
export declare function setThemePreference(patch: Partial<Pick<ThemeState, 'theme' | 'polarity'>>, options?: ThemePreferenceOptions): void;
|
|
47
|
+
export declare function subscribeTheme(listener: () => void): () => void;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ThemeTransitionSetting } from '../components/expressive/theme-transition/theme-transition';
|
|
2
|
+
import * as store from './theme-store';
|
|
3
|
+
export declare function useTheme(): store.ThemeControls;
|
|
4
|
+
export declare function useThemeTarget(): store.ThemeState;
|
|
5
|
+
export declare function ThemeSync({ css, config, transition, }: {
|
|
2
6
|
css: string;
|
|
7
|
+
config: string | null;
|
|
8
|
+
transition?: ThemeTransitionSetting;
|
|
3
9
|
}): null;
|