@zyncat/ui 0.15.0 → 0.17.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 +21 -24
- package/dist/button.js +3 -1
- package/dist/checkbox.css +1 -1
- package/dist/chunk-2YGHPQ66.js +16 -0
- package/dist/chunk-2YGHPQ66.js.map +1 -0
- package/dist/{chunk-K45CWVHS.js → chunk-3MLUH2QL.js} +4 -4
- package/dist/{chunk-K45CWVHS.js.map → chunk-3MLUH2QL.js.map} +1 -1
- package/dist/{chunk-FVPNICF4.js → chunk-4PQDVK23.js} +4 -4
- package/dist/{chunk-FVPNICF4.js.map → chunk-4PQDVK23.js.map} +1 -1
- package/dist/{chunk-FLQVOSFC.js → chunk-6IXLW7QA.js} +7 -7
- package/dist/{chunk-FLQVOSFC.js.map → chunk-6IXLW7QA.js.map} +1 -1
- package/dist/chunk-7NHY2CRA.js +132 -0
- package/dist/chunk-7NHY2CRA.js.map +1 -0
- package/dist/{chunk-BH4JFWXQ.js → chunk-7VTWJL72.js} +19 -16
- package/dist/chunk-7VTWJL72.js.map +1 -0
- package/dist/chunk-7ZSIUUC3.js +50 -0
- package/dist/chunk-7ZSIUUC3.js.map +1 -0
- package/dist/{chunk-6X3G4GIM.js → chunk-DH7DT6EO.js} +3 -3
- package/dist/{chunk-6X3G4GIM.js.map → chunk-DH7DT6EO.js.map} +1 -1
- package/dist/{chunk-QGVFFT2B.js → chunk-EOWWVFBF.js} +3 -3
- package/dist/{chunk-QGVFFT2B.js.map → chunk-EOWWVFBF.js.map} +1 -1
- package/dist/{chunk-RBSHRRNO.js → chunk-FLDIRXFU.js} +5 -5
- package/dist/{chunk-RBSHRRNO.js.map → chunk-FLDIRXFU.js.map} +1 -1
- package/dist/{chunk-5GBV45YD.js → chunk-GWCBTD63.js} +3 -3
- package/dist/{chunk-5GBV45YD.js.map → chunk-GWCBTD63.js.map} +1 -1
- package/dist/chunk-GZ6UMHCK.js +103 -0
- package/dist/chunk-GZ6UMHCK.js.map +1 -0
- package/dist/{chunk-FEXUS4SV.js → chunk-HWDIVGME.js} +11 -5
- package/dist/chunk-HWDIVGME.js.map +1 -0
- package/dist/chunk-KSAJ6DED.js +16 -0
- package/dist/chunk-KSAJ6DED.js.map +1 -0
- package/dist/{chunk-UYSXJ7MH.js → chunk-LH2UIEKN.js} +7 -17
- package/dist/chunk-LH2UIEKN.js.map +1 -0
- package/dist/{chunk-CAXQJSIE.js → chunk-M2A6PZ7J.js} +6 -6
- package/dist/{chunk-CAXQJSIE.js.map → chunk-M2A6PZ7J.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-GJTHWB6O.js → chunk-QDAN43B6.js} +3 -3
- package/dist/{chunk-GJTHWB6O.js.map → chunk-QDAN43B6.js.map} +1 -1
- package/dist/{chunk-MDSRZ4QR.js → chunk-RY35IU3G.js} +3 -3
- package/dist/{chunk-MDSRZ4QR.js.map → chunk-RY35IU3G.js.map} +1 -1
- package/dist/{chunk-GOLSYGRA.js → chunk-TBLPZQSI.js} +84 -48
- package/dist/chunk-TBLPZQSI.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-CFRGQJ23.js → chunk-VZXML7EH.js} +4 -4
- package/dist/{chunk-CFRGQJ23.js.map → chunk-VZXML7EH.js.map} +1 -1
- package/dist/{chunk-PWQVSVXR.js → chunk-WC45VSST.js} +8 -8
- package/dist/{chunk-PWQVSVXR.js.map → chunk-WC45VSST.js.map} +1 -1
- package/dist/chunk-WQKWPI6V.js +196 -0
- package/dist/chunk-WQKWPI6V.js.map +1 -0
- package/dist/{chunk-N2GJEO5Z.js → chunk-ZHMOH62S.js} +4 -4
- package/dist/chunk-ZHMOH62S.js.map +1 -0
- package/dist/cli.js +259 -43
- package/dist/collapse.css +8 -5
- package/dist/confetti.css +3 -3
- package/dist/confetti.js +2 -2
- package/dist/date-field.js +16 -14
- package/dist/date-field.js.map +1 -1
- package/dist/date-picker.css +168 -43
- package/dist/date-range-field.js +38 -23
- package/dist/date-range-field.js.map +1 -1
- package/dist/datetime-field.js +17 -15
- package/dist/datetime-field.js.map +1 -1
- package/dist/dialog.css +4 -3
- package/dist/dialog.js +8 -8
- package/dist/digit-strip.css +1 -1
- package/dist/dropdown.css +1 -1
- package/dist/dropdown.js +8 -8
- package/dist/emoji-picker.js +14 -14
- 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 +6 -6
- 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 +9 -9
- 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 +6 -6
- package/dist/radio-group.css +6 -4
- package/dist/radio-group.js +6 -6
- package/dist/select.css +1 -1
- package/dist/select.js +9 -9
- package/dist/sheet.css +1 -1
- package/dist/sheet.js +7 -7
- 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 +97 -105
- 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 +6 -6
- 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-LLC644ZR.js +346 -0
- package/dist/theme-transition-LLC644ZR.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 +11 -9
- 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 +5 -5
- 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/icon/Icon.d.ts +1 -0
- 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/tokens/component-styles.generated.d.ts +35 -38
- package/dist/types/tokens/motion-tokens.d.ts +2 -2
- 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 +121 -109
- 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/weight-field.css +2 -2
- package/dist/youtube.css +1 -1
- package/dist/youtube.js +2 -2
- package/package.json +25 -31
- package/skills/zyncat-ui/references/components.md +5 -2
- 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.css +4 -3
- package/src/components/composites/dropdown/dropdown.css +1 -1
- 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/select.css +1 -1
- package/src/components/composites/sheet/sheet.css +1 -1
- package/src/components/composites/table/table.css +2 -2
- 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.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/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/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/overlay.css +1 -1
- package/src/components/internal/overlay/trigger.css +1 -1
- 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 +12 -26
- package/src/components/primitives/button/button-style.ts +28 -0
- package/src/components/primitives/button/button.css +21 -24
- 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/styles.css +3 -3
- 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 +5 -8
- 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 +3 -3
- 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 +10 -18
- 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 +124 -110
- 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 +7 -13
- 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-FEXUS4SV.js.map +0 -1
- package/dist/chunk-GOLSYGRA.js.map +0 -1
- package/dist/chunk-N2GJEO5Z.js.map +0 -1
- package/dist/chunk-UYSXJ7MH.js.map +0 -1
package/src/tokens/color.css
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
the mid steps, so chrome, fills and text share the accent's temperature, and lightness is the
|
|
3
|
-
contrast spine. The ramp is a material: the dark theme derives its roles from --neutral. */
|
|
4
|
-
|
|
5
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
6
2
|
|
|
7
3
|
@layer zyncat.tokens {
|
|
8
|
-
:root
|
|
9
|
-
|
|
4
|
+
:root,
|
|
5
|
+
[data-theme],
|
|
6
|
+
[data-polarity] {
|
|
7
|
+
/* The top of the ramp, not pure white: it carries --neutral like every rung below it. */
|
|
8
|
+
--gray-0: oklch(from var(--neutral) 0.995 0.002 h);
|
|
10
9
|
--gray-50: oklch(from var(--neutral) 0.984 0.003 h);
|
|
11
10
|
--gray-100: oklch(from var(--neutral) 0.97 0.004 h);
|
|
12
11
|
--gray-150: oklch(from var(--neutral) 0.954 0.005 h);
|
|
@@ -22,8 +21,8 @@
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
:root,
|
|
25
|
-
[data-
|
|
26
|
-
/* Cool near-black
|
|
24
|
+
[data-polarity='light'] {
|
|
25
|
+
/* Cool near-black on the white canvas. */
|
|
27
26
|
--shadow-rgb: 15 22 25;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
@@ -9,17 +9,17 @@ import type { CSSProperties } from 'react';
|
|
|
9
9
|
* Generated from the token and component CSS by `scripts/gen-theme.mjs` - `pnpm sync` rebuilds it.
|
|
10
10
|
*/
|
|
11
11
|
export interface ConfettiStyle extends CSSProperties {
|
|
12
|
-
/** `--confetti-paper-1` - The five papers a burst draws from
|
|
12
|
+
/** `--confetti-paper-1` - The five papers a burst draws from. Default: `oklch(0.53 0.2 288)`. */
|
|
13
13
|
'--confetti-paper-1'?: string | number;
|
|
14
|
-
/** `--confetti-paper-2` - The five papers a burst draws from
|
|
14
|
+
/** `--confetti-paper-2` - The five papers a burst draws from. Default: `var(--accent)`. */
|
|
15
15
|
'--confetti-paper-2'?: string | number;
|
|
16
|
-
/** `--confetti-paper-3` - The five papers a burst draws from
|
|
16
|
+
/** `--confetti-paper-3` - The five papers a burst draws from. Default: `oklch(0.78 0.115 62)`. */
|
|
17
17
|
'--confetti-paper-3'?: string | number;
|
|
18
|
-
/** `--confetti-paper-4` - The five papers a burst draws from
|
|
18
|
+
/** `--confetti-paper-4` - The five papers a burst draws from. Default: `oklch(0.67 0.18 12)`. */
|
|
19
19
|
'--confetti-paper-4'?: string | number;
|
|
20
|
-
/** `--confetti-paper-5` - The five papers a burst draws from
|
|
20
|
+
/** `--confetti-paper-5` - The five papers a burst draws from. Default: `var(--text-strong)`. */
|
|
21
21
|
'--confetti-paper-5'?: string | number;
|
|
22
|
-
/** `--confetti-weights` - How often each paper appears
|
|
22
|
+
/** `--confetti-weights` - How often each paper appears, in slot order. Default: `1 1 1 1 0.45`. */
|
|
23
23
|
'--confetti-weights'?: string | number;
|
|
24
24
|
/** `--confetti-ink` - What the reverse side of a piece darkens toward. Default: `var(--text-strong)`. */
|
|
25
25
|
'--confetti-ink'?: string | number;
|
|
@@ -35,35 +35,35 @@ export interface ConfettiStyle extends CSSProperties {
|
|
|
35
35
|
|
|
36
36
|
/** Inline styles for FlowField, including its `--flow-field-*` knobs. */
|
|
37
37
|
export interface FlowFieldStyle extends CSSProperties {
|
|
38
|
-
/** `--flow-field-ink` - The particle colour at rest
|
|
38
|
+
/** `--flow-field-ink` - The particle colour at rest. Default: `var(--text-subtle)`. */
|
|
39
39
|
'--flow-field-ink'?: string | number;
|
|
40
|
-
/** `--flow-field-accent` - The particle colour at full speed
|
|
40
|
+
/** `--flow-field-accent` - The particle colour at full speed. Default: `var(--accent)`. */
|
|
41
41
|
'--flow-field-accent'?: string | number;
|
|
42
42
|
/** `--flow-field-min-height` - The field's minimum height before content sizes it. Default: `var(--space-10)`. */
|
|
43
43
|
'--flow-field-min-height'?: string | number;
|
|
44
|
-
/** `--flow-field-ramp-0` - The twelve stops from ink to accent,
|
|
44
|
+
/** `--flow-field-ramp-0` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-ink)`. */
|
|
45
45
|
'--flow-field-ramp-0'?: string | number;
|
|
46
|
-
/** `--flow-field-ramp-1` - The twelve stops from ink to accent,
|
|
46
|
+
/** `--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))`. */
|
|
47
47
|
'--flow-field-ramp-1'?: string | number;
|
|
48
|
-
/** `--flow-field-ramp-2` - The twelve stops from ink to accent,
|
|
48
|
+
/** `--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))`. */
|
|
49
49
|
'--flow-field-ramp-2'?: string | number;
|
|
50
|
-
/** `--flow-field-ramp-3` - The twelve stops from ink to accent,
|
|
50
|
+
/** `--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))`. */
|
|
51
51
|
'--flow-field-ramp-3'?: string | number;
|
|
52
|
-
/** `--flow-field-ramp-4` - The twelve stops from ink to accent,
|
|
52
|
+
/** `--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))`. */
|
|
53
53
|
'--flow-field-ramp-4'?: string | number;
|
|
54
|
-
/** `--flow-field-ramp-5` - The twelve stops from ink to accent,
|
|
54
|
+
/** `--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))`. */
|
|
55
55
|
'--flow-field-ramp-5'?: string | number;
|
|
56
|
-
/** `--flow-field-ramp-6` - The twelve stops from ink to accent,
|
|
56
|
+
/** `--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))`. */
|
|
57
57
|
'--flow-field-ramp-6'?: string | number;
|
|
58
|
-
/** `--flow-field-ramp-7` - The twelve stops from ink to accent,
|
|
58
|
+
/** `--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))`. */
|
|
59
59
|
'--flow-field-ramp-7'?: string | number;
|
|
60
|
-
/** `--flow-field-ramp-8` - The twelve stops from ink to accent,
|
|
60
|
+
/** `--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))`. */
|
|
61
61
|
'--flow-field-ramp-8'?: string | number;
|
|
62
|
-
/** `--flow-field-ramp-9` - The twelve stops from ink to accent,
|
|
62
|
+
/** `--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))`. */
|
|
63
63
|
'--flow-field-ramp-9'?: string | number;
|
|
64
|
-
/** `--flow-field-ramp-10` - The twelve stops from ink to accent,
|
|
64
|
+
/** `--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))`. */
|
|
65
65
|
'--flow-field-ramp-10'?: string | number;
|
|
66
|
-
/** `--flow-field-ramp-11` - The twelve stops from ink to accent,
|
|
66
|
+
/** `--flow-field-ramp-11` - The twelve stops from ink to accent, set together for a ramp of your own. Default: `var(--flow-field-accent)`. */
|
|
67
67
|
'--flow-field-ramp-11'?: string | number;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -91,7 +91,7 @@ export interface MorphingTextStyle extends CSSProperties {
|
|
|
91
91
|
'--morphing-text-leading'?: string | number;
|
|
92
92
|
/** `--morphing-text-tracking` - Letter spacing. Default: `var(--tracking-display)`. */
|
|
93
93
|
'--morphing-text-tracking'?: string | number;
|
|
94
|
-
/** `--morphing-text-smear` - How much letters blur
|
|
94
|
+
/** `--morphing-text-smear` - How much letters blur between words, 0 cutting clean. Default: `1`. */
|
|
95
95
|
'--morphing-text-smear'?: string | number;
|
|
96
96
|
/** `--morphing-text-rule-ink` - The rule at rest. Default: `var(--text-strong)`. */
|
|
97
97
|
'--morphing-text-rule-ink'?: string | number;
|
|
@@ -119,6 +119,12 @@ export interface OdometerStyle extends CSSProperties {
|
|
|
119
119
|
'--odometer-weight'?: string | number;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/** Inline styles for ThemeTransition, including its `--theme-transition-*` knobs. */
|
|
123
|
+
export interface ThemeTransitionStyle extends CSSProperties {
|
|
124
|
+
/** `--theme-transition-layer` - The z-index the arriving page paints at, above every panel it covers. Default: `var(--layer-infinity)`. */
|
|
125
|
+
'--theme-transition-layer'?: string | number;
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
/** Inline styles for TypingLines, including its `--typing-lines-*` knobs. */
|
|
123
129
|
export interface TypingLinesStyle extends CSSProperties {
|
|
124
130
|
/** `--typing-lines-ink` - Letter ink. Default: `var(--text-strong)`. */
|
|
@@ -161,7 +167,7 @@ export interface WeightFieldStyle extends CSSProperties {
|
|
|
161
167
|
'--weight-field-peak-weight'?: string | number;
|
|
162
168
|
/** `--weight-field-hover-padding` - How much a unit widens under the pointer. Default: `calc(1em / 12)`. */
|
|
163
169
|
'--weight-field-hover-padding'?: string | number;
|
|
164
|
-
/** `--weight-field-stroke` - The text stroke every unit carries
|
|
170
|
+
/** `--weight-field-stroke` - The text stroke every unit carries, doubled on the peak letter. Default: `calc(1em * 125 / 6000)`. */
|
|
165
171
|
'--weight-field-stroke'?: string | number;
|
|
166
172
|
/** `--weight-field-duration` - How long a unit takes to settle at a new weight. Default: `400ms`. */
|
|
167
173
|
'--weight-field-duration'?: string | number;
|
|
@@ -171,28 +177,20 @@ export interface WeightFieldStyle extends CSSProperties {
|
|
|
171
177
|
|
|
172
178
|
/** Inline styles for SupportRail, including its `--support-rail-*` knobs. */
|
|
173
179
|
export interface SupportRailStyle extends CSSProperties {
|
|
174
|
-
/** `--support-rail-width` - Panel width
|
|
180
|
+
/** `--support-rail-width` - Panel width, capped by the container. Default: `318px`. */
|
|
175
181
|
'--support-rail-width'?: string | number;
|
|
176
|
-
/** `--support-rail-row-pad-block` - Row padding on the block axis
|
|
182
|
+
/** `--support-rail-row-pad-block` - Row padding on the block axis. Default: `var(--space-3)`. */
|
|
177
183
|
'--support-rail-row-pad-block'?: string | number;
|
|
178
|
-
/** `--support-rail-row-pad-inline` - Row padding on the inline axis
|
|
184
|
+
/** `--support-rail-row-pad-inline` - Row padding on the inline axis. Default: `var(--space-4)`. */
|
|
179
185
|
'--support-rail-row-pad-inline'?: string | number;
|
|
180
|
-
/** `--support-rail-surface` - The
|
|
186
|
+
/** `--support-rail-surface` - The tab, and the panel it morphs into. Default: `var(--bg-subtle)`. */
|
|
181
187
|
'--support-rail-surface'?: string | number;
|
|
182
|
-
/** `--support-rail-surface-raised` - The
|
|
188
|
+
/** `--support-rail-surface-raised` - The tab while hovered. Default: `var(--bg-surface)`. */
|
|
183
189
|
'--support-rail-surface-raised'?: string | number;
|
|
184
|
-
/** `--support-rail-line` - The
|
|
190
|
+
/** `--support-rail-line` - The surface's edge. Default: `var(--border-default)`. */
|
|
185
191
|
'--support-rail-line'?: string | number;
|
|
186
|
-
/** `--support-rail-line-soft` - Row dividers
|
|
192
|
+
/** `--support-rail-line-soft` - Row dividers. Default: `var(--border-subtle)`. */
|
|
187
193
|
'--support-rail-line-soft'?: string | number;
|
|
188
|
-
/** `--support-rail-
|
|
189
|
-
'--support-rail-accent'?: string | number;
|
|
190
|
-
/** `--support-rail-live-color` - The live dot and its pulse. Default: `var(--success)`. */
|
|
191
|
-
'--support-rail-live-color'?: string | number;
|
|
192
|
-
/** `--support-rail-radius` - The needle's outer corners. Default: `var(--radius-2xl)`. */
|
|
194
|
+
/** `--support-rail-radius` - The tab's outer corners. Default: `var(--radius-2xl)`. */
|
|
193
195
|
'--support-rail-radius'?: string | number;
|
|
194
|
-
/** `--support-rail-open-duration` - How long the panel takes to open. Default: `calc(var(--duration-slower) * 1.4)`. */
|
|
195
|
-
'--support-rail-open-duration'?: string | number;
|
|
196
|
-
/** `--support-rail-close-duration` - How long the panel takes to close. Default: `var(--duration-slower)`. */
|
|
197
|
-
'--support-rail-close-duration'?: string | number;
|
|
198
196
|
}
|
package/src/tokens/dark.css
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
light island inside it. Every value here is a polarity with a light twin, and gen-theme holds
|
|
3
|
-
the two sides together. Surfaces step lighter as they rise; ink steps down from near-white. */
|
|
4
|
-
|
|
5
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
6
2
|
|
|
7
3
|
@layer zyncat.tokens {
|
|
8
|
-
[data-
|
|
4
|
+
[data-polarity='dark'] {
|
|
9
5
|
color-scheme: dark;
|
|
10
6
|
|
|
11
7
|
--bg-app: oklch(from var(--neutral) 0.165 0.006 h);
|
|
12
|
-
--bg-surface: oklch(from var(--neutral) 0.
|
|
13
|
-
--bg-surface-raised: oklch(from var(--neutral) 0.
|
|
14
|
-
--bg-subtle: oklch(from var(--neutral) 0.
|
|
15
|
-
--bg-muted: oklch(from var(--neutral) 0.
|
|
16
|
-
--bg-inset: oklch(from var(--neutral) 0.
|
|
8
|
+
--bg-surface: oklch(from var(--neutral) 0.165 0.006 h);
|
|
9
|
+
--bg-surface-raised: oklch(from var(--neutral) 0.195 0.007 h);
|
|
10
|
+
--bg-subtle: oklch(from var(--neutral) 0.154 0.006 h);
|
|
11
|
+
--bg-muted: oklch(from var(--neutral) 0.14 0.007 h);
|
|
12
|
+
--bg-inset: oklch(from var(--neutral) 0.124 0.007 h);
|
|
17
13
|
--bg-overlay: oklch(from var(--neutral) 0.06 0.004 h / 0.64);
|
|
18
14
|
|
|
19
15
|
--text-strong: oklch(from var(--neutral) 0.975 0.003 h);
|
|
@@ -33,8 +29,7 @@
|
|
|
33
29
|
--sheen-strength: 0.2;
|
|
34
30
|
--glow-strength: 1;
|
|
35
31
|
|
|
36
|
-
/*
|
|
37
|
-
rise to stays put. The steps the light side pins near white re-derive from their decision. */
|
|
32
|
+
/* A light face reads as a light source on dark, so the fills drop a step while the lift stays put. */
|
|
38
33
|
--accent-fill: oklch(from var(--accent) calc(l - 0.06) calc(c - 0.01) h);
|
|
39
34
|
--accent-subtle: oklch(from var(--accent) 0.27 0.045 h);
|
|
40
35
|
--accent-border: oklch(from var(--accent) 0.45 0.09 h);
|
package/src/tokens/decisions.css
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
:root block below, comments included, into the project as zyncat.theme.css. */
|
|
3
|
-
|
|
4
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
5
2
|
|
|
6
3
|
@layer zyncat.tokens {
|
|
7
|
-
:root
|
|
4
|
+
:root,
|
|
5
|
+
[data-theme='default'] {
|
|
8
6
|
/* The brand hue - hover, active, lift, subtle, border, wash, the focus ring and info follow. */
|
|
9
7
|
--accent: oklch(0.63 0.118 198);
|
|
10
8
|
/* Positive status - its subtle, text and wash follow. */
|
|
@@ -13,10 +11,9 @@
|
|
|
13
11
|
--warning: oklch(0.7 0.142 75);
|
|
14
12
|
/* Destructive actions and errors - the danger button ladder, ring, subtle, text and wash follow. */
|
|
15
13
|
--danger: oklch(0.545 0.196 27);
|
|
16
|
-
/* The gray ramp's hue - the accent by default, so chrome shares its temperature.
|
|
17
|
-
cuts the grays loose. Read on :root only: a themed subtree inherits the ramp. */
|
|
14
|
+
/* The gray ramp's hue - the accent by default, so chrome shares its temperature. */
|
|
18
15
|
--neutral: var(--accent);
|
|
19
|
-
/* Roundness - every --radius-<step> is a fixed ratio of it
|
|
16
|
+
/* Roundness - every --radius-<step> is a fixed ratio of it, 0 squaring every corner. */
|
|
20
17
|
--radius: 0.5rem;
|
|
21
18
|
/* The body face - every --type-* bundle follows. */
|
|
22
19
|
--font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
package/src/tokens/elevation.css
CHANGED
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
Three strengths scale the lighting per polarity: every shadow, white highlight and cast-light
|
|
3
|
-
alpha is a multiple of --shadow-strength, --sheen-strength or --glow-strength. */
|
|
4
|
-
|
|
5
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
6
2
|
|
|
7
3
|
@layer zyncat.tokens {
|
|
8
4
|
:root {
|
|
9
|
-
/* Border widths - weight comes from the colour, not the thickness. */
|
|
10
5
|
--border-hairline: 1px;
|
|
11
6
|
--border-emphasis: 1.5px;
|
|
12
7
|
|
|
13
|
-
/* How far every focus ring reaches past the border box
|
|
14
|
-
ancestor reserves so a ring is never cut. */
|
|
8
|
+
/* How far every focus ring reaches past the border box. */
|
|
15
9
|
--ring-width: 3px;
|
|
16
10
|
|
|
17
|
-
--layer-overlay: 1000; /* a band - each overlay adds its stack depth
|
|
11
|
+
--layer-overlay: 1000; /* a band - each overlay adds its stack depth on top */
|
|
18
12
|
--layer-toast: 1050;
|
|
19
13
|
--layer-tooltip: 1100;
|
|
14
|
+
--layer-infinity: 2147483647;
|
|
20
15
|
}
|
|
21
16
|
|
|
22
17
|
:root,
|
|
23
|
-
[data-
|
|
24
|
-
/* Multiplies every shadow alpha -
|
|
18
|
+
[data-polarity='light'] {
|
|
19
|
+
/* Multiplies every shadow alpha - 3-4x on dark. */
|
|
25
20
|
--shadow-strength: 1;
|
|
26
|
-
/* Multiplies every white top-light highlight
|
|
21
|
+
/* Multiplies every white top-light highlight. */
|
|
27
22
|
--sheen-strength: 1;
|
|
28
|
-
/* Multiplies the light a lifted hue fill casts around it - off on the white canvas
|
|
23
|
+
/* Multiplies the light a lifted hue fill casts around it - off on the white canvas. */
|
|
29
24
|
--glow-strength: 0;
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
:root,
|
|
33
|
-
[data-theme]
|
|
28
|
+
[data-theme],
|
|
29
|
+
[data-polarity] {
|
|
34
30
|
--shadow-xs: 0 1px 1px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength)));
|
|
35
31
|
--shadow-sm:
|
|
36
32
|
0 1px 2px rgb(var(--shadow-rgb) / calc(0.05 * var(--shadow-strength))),
|
|
@@ -38,8 +34,6 @@
|
|
|
38
34
|
--shadow-md:
|
|
39
35
|
0 2px 4px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength))),
|
|
40
36
|
0 6px 12px rgb(var(--shadow-rgb) / calc(0.07 * var(--shadow-strength)));
|
|
41
|
-
/* The floating steps are three layers: a tight contact shadow, a mid layer for form, a wide
|
|
42
|
-
ambient one. Without the contact layer the panel reads soft and unanchored. */
|
|
43
37
|
--shadow-lg:
|
|
44
38
|
0 1px 2px rgb(var(--shadow-rgb) / calc(0.06 * var(--shadow-strength))),
|
|
45
39
|
0 4px 8px rgb(var(--shadow-rgb) / calc(0.04 * var(--shadow-strength))),
|
|
@@ -49,34 +43,32 @@
|
|
|
49
43
|
0 8px 16px rgb(var(--shadow-rgb) / calc(0.06 * var(--shadow-strength))),
|
|
50
44
|
0 24px 48px rgb(var(--shadow-rgb) / calc(0.14 * var(--shadow-strength)));
|
|
51
45
|
|
|
52
|
-
/*
|
|
53
|
-
lighter face the destructive button rests on. */
|
|
46
|
+
/* Danger rings on its fill tone, the lighter face the destructive button rests on. */
|
|
54
47
|
--ring-color-accent: color-mix(in oklab, var(--accent) 32%, transparent);
|
|
55
48
|
--ring-color-danger: oklch(from var(--danger) 0.602 0.196 h / 0.3);
|
|
56
49
|
--ring-color-warning: color-mix(in oklab, var(--warning) 30%, transparent);
|
|
57
50
|
--ring-color-success: color-mix(in oklab, var(--success) 30%, transparent);
|
|
58
51
|
|
|
59
|
-
/*
|
|
60
|
-
clipping ancestor can reserve exactly --ring-width. Outlines follow border-radius everywhere
|
|
61
|
-
this library supports. --ring-rest is the resting ring a control fades in from; --ring-inset
|
|
62
|
-
is the offset that turns a ring inward, for a control flush with a clipping edge. */
|
|
52
|
+
/* Outlines, not box-shadow, so a ring never collides with elevation and still follows border-radius. */
|
|
63
53
|
--ring-rest: var(--ring-width) solid transparent;
|
|
64
54
|
--ring-inset: calc(var(--ring-width) * -1);
|
|
55
|
+
/* The room a clipping container holds open for a child's ring. */
|
|
56
|
+
--ring-gutter: var(--ring-width);
|
|
65
57
|
--ring-accent: var(--ring-width) solid var(--ring-color-accent);
|
|
66
58
|
--ring-danger: var(--ring-width) solid var(--ring-color-danger);
|
|
67
59
|
--ring-warning: var(--ring-width) solid var(--ring-color-warning);
|
|
68
60
|
--ring-success: var(--ring-width) solid var(--ring-color-success);
|
|
69
61
|
|
|
70
|
-
/* Cast light - the hover of the primary and destructive buttons; each tracks its ring's hue. */
|
|
71
62
|
--glow-accent: 0 4px 16px oklch(from var(--accent) l c h / calc(0.4 * var(--glow-strength)));
|
|
72
63
|
--glow-danger: 0 4px 16px oklch(from var(--danger) 0.602 0.196 h / calc(0.4 * var(--glow-strength)));
|
|
73
64
|
}
|
|
74
65
|
|
|
75
|
-
/* Forced colours repaint every outline-color, transparent included
|
|
76
|
-
|
|
66
|
+
/* Forced colours repaint every outline-color, transparent included - the resting ring would sit
|
|
67
|
+
on every control as a permanent border. */
|
|
77
68
|
@media (forced-colors: active) {
|
|
78
69
|
:root,
|
|
79
|
-
[data-theme]
|
|
70
|
+
[data-theme],
|
|
71
|
+
[data-polarity] {
|
|
80
72
|
--ring-rest: none;
|
|
81
73
|
}
|
|
82
74
|
}
|
package/src/tokens/glass.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.tokens {
|
|
4
4
|
:root {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:root,
|
|
14
|
-
[data-theme]
|
|
14
|
+
[data-theme],
|
|
15
|
+
[data-polarity] {
|
|
15
16
|
--glass-sheen: linear-gradient(
|
|
16
17
|
145deg,
|
|
17
18
|
rgb(255 255 255 / calc(0.55 * var(--sheen-strength))) 0%,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Generated from the token and component CSS by `scripts/gen-theme.mjs` - `pnpm sync` rebuilds it.
|
|
6
6
|
*/
|
|
7
7
|
export const motionDefaults = {
|
|
8
|
-
duration: { fast: 140, base: 200, slow: 300, slower: 450, slowest: 900, spin:
|
|
8
|
+
duration: { fast: 140, base: 200, slow: 300, slower: 450, slowest: 900, spin: 1000, pulse: 1600 } satisfies Record<
|
|
9
9
|
string,
|
|
10
10
|
number
|
|
11
11
|
>,
|
|
@@ -124,8 +124,8 @@ export const UIMotion: MotionTokens = hasDom ? readFromDom() : build(DEFAULTS);
|
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Re-reads the motion tokens into `UIMotion` in place, so every held reference sees the new values. Runs on
|
|
127
|
-
* a `data-theme` change, a `prefers-reduced-motion` flip and after `ZyncatTheme`
|
|
128
|
-
* after injecting a stylesheet that retimes the `--duration-*` tokens.
|
|
127
|
+
* a `data-theme` or `data-polarity` change, a `prefers-reduced-motion` flip and after `ZyncatTheme`
|
|
128
|
+
* renders; call it yourself after injecting a stylesheet that retimes the `--duration-*` tokens.
|
|
129
129
|
*/
|
|
130
130
|
export function refreshMotionTokens(): MotionTokens {
|
|
131
131
|
if (hasDom)
|
|
@@ -139,7 +139,7 @@ if (hasDom) {
|
|
|
139
139
|
if (typeof MutationObserver === 'function')
|
|
140
140
|
new MutationObserver(() => refreshMotionTokens()).observe(document.documentElement, {
|
|
141
141
|
attributes: true,
|
|
142
|
-
attributeFilter: ['data-theme'],
|
|
142
|
+
attributeFilter: ['data-theme', 'data-polarity'],
|
|
143
143
|
subtree: true,
|
|
144
144
|
});
|
|
145
145
|
}
|
package/src/tokens/motion.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.tokens {
|
|
4
4
|
:root {
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
--duration-base: 200ms; /* standard element transitions - fades, toggles, badge morphs */
|
|
7
7
|
--duration-slow: 300ms; /* layout-scale movement - Collapse, panel resizes, reordering */
|
|
8
8
|
--duration-slower: 450ms; /* large-surface movement - dialog, sheet, page-scale reveals */
|
|
9
|
-
--duration-slowest: 900ms; /* hero-scale movement - card expansion, container transforms
|
|
10
|
-
--duration-spin:
|
|
11
|
-
--duration-pulse: 1600ms; /* ambient
|
|
9
|
+
--duration-slowest: 900ms; /* hero-scale movement - card expansion, container transforms */
|
|
10
|
+
--duration-spin: 1000ms; /* continuous loaders only, outside the UI-transition scale */
|
|
11
|
+
--duration-pulse: 1600ms; /* ambient breathing, not collapsed under reduced motion */
|
|
12
12
|
|
|
13
13
|
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
14
14
|
--ease-entrance: cubic-bezier(0.25, 1, 0.4, 1);
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
1
|
|
22
22
|
); /* fast out, soft landing - a persistent element moving to a new target, never enter/exit */
|
|
23
23
|
|
|
24
|
-
--distance-sm: 0.5rem; /* 8px - settling into place
|
|
24
|
+
--distance-sm: 0.5rem; /* 8px - settling into place */
|
|
25
25
|
--distance-md: 1rem; /* 16px - arriving from an adjacent position - page turns, tab panels, paged ranges */
|
|
26
26
|
--distance-lg: 1.5rem; /* 24px - arriving from outside the surface - a toast joining its stack */
|
|
27
27
|
|
|
28
|
-
/* Rest scale -
|
|
29
|
-
surface, so a dialog takes a smaller one than a tag to land at the same perceived distance. */
|
|
28
|
+
/* Rest scale - the same ratio reads as more movement the wider the surface. */
|
|
30
29
|
--scale-panel: 0.98; /* full-width surfaces - dialog, modal, sheet */
|
|
31
30
|
--scale-floating: 0.96; /* floating surfaces - popover, tooltip, menu, toast, alert */
|
|
32
31
|
--scale-chip: 0.9; /* small inline elements - tag, badge, count */
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
:root,
|
|
36
|
-
[data-theme]
|
|
35
|
+
[data-theme],
|
|
36
|
+
[data-polarity] {
|
|
37
37
|
--transition-control:
|
|
38
38
|
color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard),
|
|
39
39
|
border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard),
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
--duration-slow: 1ms;
|
|
52
52
|
--duration-slower: 1ms;
|
|
53
53
|
--duration-slowest: 1ms;
|
|
54
|
-
--duration-spin:
|
|
54
|
+
--duration-spin: 2000ms; /* slow the loader, never freeze it (1ms = blur) */
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
package/src/tokens/radius.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
2
|
|
|
3
3
|
@layer zyncat.tokens {
|
|
4
4
|
:root {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:root,
|
|
9
|
-
[data-theme]
|
|
9
|
+
[data-theme],
|
|
10
|
+
[data-polarity] {
|
|
10
11
|
--radius-sm: calc(var(--radius) * 0.5);
|
|
11
12
|
--radius-md: calc(var(--radius) * 0.75);
|
|
12
13
|
--radius-lg: var(--radius);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
2
|
+
|
|
3
|
+
@layer zyncat.reset {
|
|
4
|
+
/* Not the default: iOS Safari inflates text in landscape without it. */
|
|
5
|
+
html {
|
|
6
|
+
-webkit-text-size-adjust: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*::before,
|
|
11
|
+
*::after {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* The font shorthand resets every font longhand, the two settings ones included, and Safari
|
|
20
|
+
withholds letter-spacing from controls; each is restated so the control keeps inheriting. */
|
|
21
|
+
button,
|
|
22
|
+
input,
|
|
23
|
+
optgroup,
|
|
24
|
+
select,
|
|
25
|
+
textarea {
|
|
26
|
+
font: inherit;
|
|
27
|
+
font-feature-settings: inherit;
|
|
28
|
+
font-variation-settings: inherit;
|
|
29
|
+
letter-spacing: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Firefox's UA sheet dims placeholders to 0.54. */
|
|
33
|
+
::placeholder {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/tokens/semantic.css
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Neutral roles are a polarity: light values on `:root, [data-theme='light']`, dark ones in dark.css.
|
|
3
|
-
Derived roles sit on every theme root, so a subtree that repoints a decision re-derives them. */
|
|
4
|
-
|
|
5
|
-
@layer zyncat.tokens, zyncat.components;
|
|
1
|
+
@layer zyncat.reset, zyncat.tokens, zyncat.components;
|
|
6
2
|
|
|
7
3
|
@layer zyncat.tokens {
|
|
8
4
|
:root {
|
|
9
|
-
/* The ink on a hue fill -
|
|
5
|
+
/* The ink on a hue fill - the ramp's lightest rung in either polarity. */
|
|
10
6
|
--text-on-accent: var(--gray-0);
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
:root,
|
|
14
|
-
[data-
|
|
10
|
+
[data-polarity='light'] {
|
|
15
11
|
color-scheme: light;
|
|
16
12
|
|
|
17
|
-
/*
|
|
18
|
-
way print separates with rules rather than tint; subtle < muted < inset step one ramp stop apart. */
|
|
13
|
+
/* Canvas, cards and panels share the top of the ramp, separated by hairlines rather than tint. */
|
|
19
14
|
--bg-app: var(--gray-0);
|
|
20
15
|
--bg-surface: var(--gray-0);
|
|
21
16
|
--bg-surface-raised: var(--gray-0);
|
|
@@ -39,9 +34,9 @@
|
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
:root,
|
|
42
|
-
[data-theme]
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
[data-theme],
|
|
38
|
+
[data-polarity] {
|
|
39
|
+
/* The resting face of a filled control. */
|
|
45
40
|
--accent-fill: var(--accent);
|
|
46
41
|
--accent-lift: oklch(from var(--accent) calc(l + 0.075) calc(c - 0.006) h);
|
|
47
42
|
--accent-hover: oklch(from var(--accent) calc(l - 0.07) calc(c - 0.004) h);
|
|
@@ -52,12 +47,11 @@
|
|
|
52
47
|
--accent-wash: oklch(from var(--accent) l c h / 0.08);
|
|
53
48
|
--text-accent: var(--accent-active);
|
|
54
49
|
|
|
55
|
-
/*
|
|
56
|
-
patch vanishes on a tinted surface, and a dark theme's light ink washes light by itself. */
|
|
50
|
+
/* Translucent washes of the ink, never opaque near-whites. */
|
|
57
51
|
--neutral-wash: color-mix(in oklab, var(--text-secondary) 6%, transparent);
|
|
58
52
|
--neutral-wash-press: color-mix(in oklab, var(--text-secondary) 10%, transparent);
|
|
59
53
|
|
|
60
|
-
/*
|
|
54
|
+
/* The accent's hue one step down - repoint it for a hue of its own. */
|
|
61
55
|
--info: var(--accent-hover);
|
|
62
56
|
--info-subtle: oklch(from var(--info) 0.972 0.02 h);
|
|
63
57
|
--info-text: oklch(from var(--info) calc(l - 0.082) calc(c - 0.014) h);
|
|
@@ -71,8 +65,7 @@
|
|
|
71
65
|
--warning-text: oklch(from var(--warning) calc(l - 0.14) calc(c - 0.024) h);
|
|
72
66
|
--warning-wash: oklch(from var(--warning) 0.76 0.14 h / 0.12);
|
|
73
67
|
|
|
74
|
-
/*
|
|
75
|
-
lighter than the --danger ink so white text sits on it; lift is the hover face above that. */
|
|
68
|
+
/* The destructive button's hover face, above --danger-fill. */
|
|
76
69
|
--danger-lift: oklch(from var(--danger) 0.64 0.2 h);
|
|
77
70
|
--danger-fill: oklch(from var(--danger) 0.602 0.196 h);
|
|
78
71
|
--danger-active: oklch(from var(--danger) calc(l - 0.067) calc(c - 0.024) h);
|
|
@@ -81,7 +74,6 @@
|
|
|
81
74
|
--danger-disabled: oklch(from var(--danger) 0.8 0.09 h);
|
|
82
75
|
--danger-wash: oklch(from var(--danger) 0.602 0.196 h / 0.1);
|
|
83
76
|
|
|
84
|
-
/* Per-tone glass tints - alpha kept low so the frost reads through. */
|
|
85
77
|
--glass-tint-neutral: color-mix(in oklab, var(--text-muted) 13%, transparent);
|
|
86
78
|
--glass-tint-info: color-mix(in oklab, var(--info) 17%, transparent);
|
|
87
79
|
--glass-tint-success: color-mix(in oklab, var(--success) 17%, transparent);
|
package/src/tokens/spacing.css
CHANGED