@atom63/styles 0.1.0-beta.4 → 0.1.0-beta.6
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 +14 -8
- package/generated/atom63.figma-sync.json +3764 -1109
- package/generated/atom63.tokens.json +3811 -831
- package/package.json +14 -7
- package/src/compat/a63-from-shadcn.css +10 -0
- package/src/contracts/action.css +4 -3
- package/src/contracts/action.native.css +11 -0
- package/src/contracts/action.tokens.json +66 -0
- package/src/contracts/badge.css +28 -19
- package/src/contracts/badge.resolver.json +366 -0
- package/src/contracts/choice.css +4 -1
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +43 -52
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +245 -0
- package/src/contracts/environment.css +45 -49
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +569 -0
- package/src/contracts/field.css +3 -1
- package/src/contracts/field.tokens.json +40 -0
- package/src/contracts/marker.css +6 -4
- package/src/contracts/marker.tokens.json +15 -0
- package/src/contracts/menu.css +25 -61
- package/src/contracts/menu.native.css +10 -0
- package/src/contracts/menu.resolver.json +122 -0
- package/src/contracts/overlay.css +11 -13
- package/src/contracts/overlay.native.css +13 -0
- package/src/contracts/overlay.tokens.json +103 -0
- package/src/contracts/segment.css +22 -68
- package/src/contracts/segment.tokens.json +19 -0
- package/src/contracts/selection.css +3 -1
- package/src/contracts/selection.tokens.json +37 -0
- package/src/contracts/skeleton.css +3 -0
- package/src/contracts/skeleton.resolver.json +66 -0
- package/src/contracts/surface.css +13 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +97 -0
- package/src/contracts/toggle.css +3 -1
- package/src/contracts/toggle.tokens.json +49 -0
- package/src/contracts/track.css +3 -1
- package/src/contracts/track.tokens.json +39 -0
- package/src/contracts/trigger.css +5 -2
- package/src/contracts/trigger.native.css +9 -0
- package/src/contracts/trigger.tokens.json +58 -0
- package/src/contracts/widget.css +41 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1104 -0
- package/src/tailwind/theme.css +0 -2
- package/src/themes/aqua.css +24 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1292 -0
- package/src/themes/modern.css +10 -14
- package/src/themes/modern.native.css +16 -0
- package/src/themes/modern.resolver.json +350 -0
- package/src/themes/retro.css +21 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +788 -0
- package/src/themes/terminal.css +34 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +517 -0
- package/src/tokens/brand-action.css +50 -0
- package/src/tokens/brand-action.resolver.json +118 -0
- package/src/tokens/brand-ramp.css +108 -0
- package/src/tokens/brand-ramp.resolver.json +418 -0
- package/src/tokens/brand.css +6 -146
- package/src/tokens/color-mix-space.browser.test.ts +79 -0
- package/src/tokens/contrast.browser.test.ts +47 -3
- package/src/tokens/figma-parity.browser.test.ts +257 -0
- package/src/tokens/font.css +6 -0
- package/src/tokens/font.resolver.json +107 -0
- package/src/tokens/foundation/effects.css +13 -13
- package/src/tokens/foundation/effects.resolver.json +433 -0
- package/src/tokens/foundation/fonts.css +11 -5
- package/src/tokens/foundation/fonts.tokens.json +45 -0
- package/src/tokens/foundation/motion.css +3 -0
- package/src/tokens/foundation/motion.tokens.json +53 -0
- package/src/tokens/foundation/palette.css +3 -0
- package/src/tokens/foundation/palette.tokens.json +1743 -0
- package/src/tokens/foundation/primitives.css +20 -13
- package/src/tokens/foundation/primitives.tokens.json +3470 -0
- package/src/tokens/foundation/radius.css +6 -9
- package/src/tokens/foundation/radius.tokens.json +100 -0
- package/src/tokens/foundation/typography.css +25 -12
- package/src/tokens/foundation/typography.native.css +11 -0
- package/src/tokens/foundation/typography.resolver.json +936 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/motion.css +3 -1
- package/src/tokens/motion.resolver.json +135 -0
- package/src/tokens/native-values.json +38 -0
- package/src/tokens/personalization-axes.browser.test.ts +5 -3
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +62 -34
- package/src/tokens/semantics.resolver.json +402 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/surface.css +5 -19
- package/src/tokens/surface.resolver.json +657 -0
- package/src/tokens/swift-parity.browser.test.ts +137 -0
- package/src/tokens/type-scale.css +6 -0
- package/src/tokens/type-scale.resolver.json +67 -0
- package/generated/atom63.figma-tokens.json +0 -21661
- package/src/tokens/foundation/aliases.css +0 -28
package/src/tokens/motion.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/tokens/motion.resolver.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
2
5
|
* Motion contract.
|
|
3
6
|
*
|
|
4
7
|
* The interaction-timing intents the system uses. Raw --duration-* / --ease-*
|
|
5
8
|
* primitives remain available for anything else.
|
|
6
9
|
*/
|
|
7
|
-
|
|
8
10
|
:root {
|
|
9
11
|
--a63-motion-duration-fast: var(--duration-fast);
|
|
10
12
|
--a63-motion-duration-overlay: var(--duration-overlay);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2025.10",
|
|
3
|
+
"description": "Motion contract.\n\nThe interaction-timing intents the system uses. Raw --duration-* / --ease-*\nprimitives remain available for anything else.",
|
|
4
|
+
"sets": {
|
|
5
|
+
"01-root": {
|
|
6
|
+
"sources": [
|
|
7
|
+
{
|
|
8
|
+
"a63": {
|
|
9
|
+
"motion": {
|
|
10
|
+
"duration": {
|
|
11
|
+
"fast": {
|
|
12
|
+
"$type": "duration",
|
|
13
|
+
"$value": "{duration.fast}"
|
|
14
|
+
},
|
|
15
|
+
"overlay": {
|
|
16
|
+
"$type": "duration",
|
|
17
|
+
"$value": "{duration.overlay}"
|
|
18
|
+
},
|
|
19
|
+
"swipe": {
|
|
20
|
+
"dismiss": {
|
|
21
|
+
"$type": "duration",
|
|
22
|
+
"$value": "{duration.swipe.dismiss}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"ease": {
|
|
27
|
+
"overlay": {
|
|
28
|
+
"$type": "cubicBezier",
|
|
29
|
+
"$value": "{ease.overlay}"
|
|
30
|
+
},
|
|
31
|
+
"scrim": {
|
|
32
|
+
"$type": "cubicBezier",
|
|
33
|
+
"$value": "{ease.scrim}"
|
|
34
|
+
},
|
|
35
|
+
"standard": {
|
|
36
|
+
"$type": "cubicBezier",
|
|
37
|
+
"$value": "{ease.standard}"
|
|
38
|
+
},
|
|
39
|
+
"emphasized": {
|
|
40
|
+
"$type": "cubicBezier",
|
|
41
|
+
"$value": "{ease.emphasized}"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"control": {
|
|
45
|
+
"feedback": {
|
|
46
|
+
"duration": {
|
|
47
|
+
"$type": "duration",
|
|
48
|
+
"$value": "{a63.motion.duration.fast}"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"skeleton": {
|
|
53
|
+
"shimmer": {
|
|
54
|
+
"duration": {
|
|
55
|
+
"$type": "duration",
|
|
56
|
+
"$value": "{duration.1500}"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"$extensions": {
|
|
65
|
+
"io.atom63.css": {
|
|
66
|
+
"selector": ":root"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"02-media-prefers-reduced-motion-reduce-root": {
|
|
71
|
+
"sources": [
|
|
72
|
+
{
|
|
73
|
+
"a63": {
|
|
74
|
+
"motion": {
|
|
75
|
+
"control": {
|
|
76
|
+
"feedback": {
|
|
77
|
+
"duration": {
|
|
78
|
+
"$type": "duration",
|
|
79
|
+
"$value": {
|
|
80
|
+
"value": 0,
|
|
81
|
+
"unit": "ms"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"duration": {
|
|
87
|
+
"overlay": {
|
|
88
|
+
"$type": "duration",
|
|
89
|
+
"$value": {
|
|
90
|
+
"value": 0,
|
|
91
|
+
"unit": "ms"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"swipe": {
|
|
95
|
+
"dismiss": {
|
|
96
|
+
"$type": "duration",
|
|
97
|
+
"$value": {
|
|
98
|
+
"value": 0,
|
|
99
|
+
"unit": "ms"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"skeleton": {
|
|
105
|
+
"shimmer": {
|
|
106
|
+
"duration": {
|
|
107
|
+
"$type": "duration",
|
|
108
|
+
"$value": {
|
|
109
|
+
"value": 0,
|
|
110
|
+
"unit": "ms"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"$extensions": {
|
|
120
|
+
"io.atom63.css": {
|
|
121
|
+
"selector": ":root",
|
|
122
|
+
"atRule": "@media (prefers-reduced-motion: reduce)"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"resolutionOrder": [
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/sets/01-root"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"$ref": "#/sets/02-media-prefers-reduced-motion-reduce-root"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "CSS-native token values: values with no DTCG type, declared by hand in *.native.css files. Each entry says why it cannot be a DTCG token. build-css-from-dtcg.mjs --check fails on an unlisted declaration or a stale entry. See docs/design-system/token-single-source.md.",
|
|
3
|
+
"values": {
|
|
4
|
+
"--a63-action-control-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
5
|
+
"--a63-action-control-highlight": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
6
|
+
"--a63-action-control-press-transform": "A CSS transform (translateY / scale); DTCG has no transform type.",
|
|
7
|
+
"--a63-choice-indicator-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
8
|
+
"--a63-control-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
9
|
+
"--a63-control-highlight": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
10
|
+
"--a63-control-press-transform": "A CSS transform (translateY / scale); DTCG has no transform type.",
|
|
11
|
+
"--a63-menu-highlight-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
12
|
+
"--a63-menu-popup-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
13
|
+
"--a63-overlay-backdrop": "A backdrop-filter value (default none, blur in translucent themes); DTCG has no filter type.",
|
|
14
|
+
"--a63-overlay-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
15
|
+
"--a63-overlay-highlight": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
16
|
+
"--a63-overlay-texture-blend": "A mix-blend-mode keyword; DTCG has no blend-mode type.",
|
|
17
|
+
"--a63-overlay-texture-image": "A background-image texture (default none); DTCG has no image type.",
|
|
18
|
+
"--a63-safe-area-bottom": "env(safe-area-inset-*, 0px): a device value only the browser knows; DTCG has no environment-variable value.",
|
|
19
|
+
"--a63-safe-area-left": "env(safe-area-inset-*, 0px): a device value only the browser knows; DTCG has no environment-variable value.",
|
|
20
|
+
"--a63-safe-area-right": "env(safe-area-inset-*, 0px): a device value only the browser knows; DTCG has no environment-variable value.",
|
|
21
|
+
"--a63-safe-area-top": "env(safe-area-inset-*, 0px): a device value only the browser knows; DTCG has no environment-variable value.",
|
|
22
|
+
"--a63-segment-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
23
|
+
"--a63-segment-selected-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
24
|
+
"--a63-segment-track-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
25
|
+
"--a63-surface-backdrop": "A backdrop-filter value (default none, blur in translucent themes); DTCG has no filter type.",
|
|
26
|
+
"--a63-surface-gloss": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
27
|
+
"--a63-surface-highlight": "A background-image layer (default none, a gradient in glossy themes); DTCG has no image or gradient type.",
|
|
28
|
+
"--a63-surface-texture-blend": "A mix-blend-mode keyword; DTCG has no blend-mode type.",
|
|
29
|
+
"--a63-surface-texture-image": "A background-image texture (default none); DTCG has no image type.",
|
|
30
|
+
"--a63-trigger-indicator-size": "Sized in em, relative to the trigger's font size; DTCG dimensions are px or rem only.",
|
|
31
|
+
"--a63-viewport-height": "100vh / 100dvh: viewport units, with dvh behind @supports; DTCG dimensions are px or rem only.",
|
|
32
|
+
"--a63-weather-backdrop": "A backdrop-filter value; DTCG has no filter type.",
|
|
33
|
+
"--a63-weather-background-blend": "A blend-mode keyword; DTCG has no blend-mode type.",
|
|
34
|
+
"--a63-widget-backdrop": "A backdrop-filter value; DTCG has no filter type.",
|
|
35
|
+
"--a63-widget-rim-backdrop": "A backdrop-filter value; DTCG has no filter type.",
|
|
36
|
+
"--a63-widget-rim-image": "A background-image layer; DTCG has no image or gradient type."
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -155,12 +155,14 @@ describe('os axis', () => {
|
|
|
155
155
|
})
|
|
156
156
|
|
|
157
157
|
describe('auto brand ramp', () => {
|
|
158
|
+
// The primary action uses step 600 of the ramp, which keeps white text at
|
|
159
|
+
// WCAG AA contrast (see tokens/brand.css).
|
|
158
160
|
it('falls back to the b1 ramp when no --color-auto-* is set', () => {
|
|
159
161
|
const el = root()
|
|
160
162
|
el.setAttribute('data-a63-brand', 'auto')
|
|
161
|
-
// --a63-action-primary = --a63-brand-
|
|
163
|
+
// --a63-action-primary = --a63-brand-600 = var(--color-auto-600, var(--color-b1-600))
|
|
162
164
|
const primary = cssVar('--a63-action-primary')
|
|
163
|
-
const b1 = getComputedStyle(el).getPropertyValue('--color-b1-
|
|
165
|
+
const b1 = getComputedStyle(el).getPropertyValue('--color-b1-600').trim()
|
|
164
166
|
expect(primary).toBe(b1)
|
|
165
167
|
expect(primary).not.toBe('')
|
|
166
168
|
})
|
|
@@ -168,7 +170,7 @@ describe('auto brand ramp', () => {
|
|
|
168
170
|
it('uses the extracted --color-auto ramp when present', () => {
|
|
169
171
|
const el = root()
|
|
170
172
|
el.setAttribute('data-a63-brand', 'auto')
|
|
171
|
-
el.style.setProperty('--color-auto-
|
|
173
|
+
el.style.setProperty('--color-auto-600', 'rgb(10, 20, 30)')
|
|
172
174
|
expect(cssVar('--a63-action-primary')).toBe('rgb(10, 20, 30)')
|
|
173
175
|
})
|
|
174
176
|
})
|
package/src/tokens/radius.css
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/tokens/radius.resolver.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
2
5
|
* Radius contract.
|
|
3
6
|
*
|
|
4
7
|
* A stable intent name over the radius anchor/multiplier model for executable UI
|
|
5
8
|
* recipes. Raw --radius-* primitives remain available for other needs.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:root {
|
|
9
|
-
--a63-avatar-radius: 50%;
|
|
10
|
-
--a63-radius-control: var(--radius-lg);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/*
|
|
9
|
+
*
|
|
14
10
|
* Radius personalization axis.
|
|
15
11
|
*
|
|
16
12
|
* [data-a63-radius] sets the multiplier the whole --radius-* scale (foundation/
|
|
17
13
|
* radius.css) already multiplies by, so one attribute rescales every corner.
|
|
18
14
|
* `default` = 1 restates the foundation default so a subtree can override back.
|
|
19
15
|
*/
|
|
16
|
+
:root {
|
|
17
|
+
--a63-avatar-radius: 50%;
|
|
18
|
+
--a63-radius-control: var(--radius-lg);
|
|
19
|
+
}
|
|
20
|
+
|
|
20
21
|
[data-a63-radius='none'] {
|
|
21
22
|
--a63-avatar-radius: 0;
|
|
22
23
|
--radius-multiplier: 0;
|
|
23
24
|
}
|
|
25
|
+
|
|
24
26
|
[data-a63-radius='subtle'] {
|
|
25
27
|
--a63-avatar-radius: var(--radius-full);
|
|
26
28
|
--radius-multiplier: 0.5;
|
|
27
29
|
}
|
|
30
|
+
|
|
28
31
|
[data-a63-radius='default'] {
|
|
29
32
|
--a63-avatar-radius: 50%;
|
|
30
33
|
--radius-multiplier: 1;
|
|
31
34
|
}
|
|
35
|
+
|
|
32
36
|
[data-a63-radius='round'] {
|
|
33
37
|
--a63-avatar-radius: 50%;
|
|
34
38
|
--radius-multiplier: 1.5;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2025.10",
|
|
3
|
+
"description": "Radius contract.\n\nA stable intent name over the radius anchor/multiplier model for executable UI\nrecipes. Raw --radius-* primitives remain available for other needs.\n\nRadius personalization axis.\n\n[data-a63-radius] sets the multiplier the whole --radius-* scale (foundation/\nradius.css) already multiplies by, so one attribute rescales every corner.\n`default` = 1 restates the foundation default so a subtree can override back.",
|
|
4
|
+
"sets": {
|
|
5
|
+
"base": {
|
|
6
|
+
"sources": [
|
|
7
|
+
{
|
|
8
|
+
"a63": {
|
|
9
|
+
"avatar": {
|
|
10
|
+
"radius": {
|
|
11
|
+
"$type": "number",
|
|
12
|
+
"$value": 50,
|
|
13
|
+
"$extensions": {
|
|
14
|
+
"io.atom63.derive": "50%"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"radius": {
|
|
19
|
+
"control": {
|
|
20
|
+
"$type": "dimension",
|
|
21
|
+
"$value": "{radius.lg}"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"$extensions": {
|
|
28
|
+
"io.atom63.css": {
|
|
29
|
+
"selector": ":root"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"modifiers": {
|
|
35
|
+
"radius": {
|
|
36
|
+
"default": "default",
|
|
37
|
+
"contexts": {
|
|
38
|
+
"none": [
|
|
39
|
+
{
|
|
40
|
+
"a63": {
|
|
41
|
+
"avatar": {
|
|
42
|
+
"radius": {
|
|
43
|
+
"$type": "number",
|
|
44
|
+
"$value": 0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"radius": {
|
|
49
|
+
"multiplier": {
|
|
50
|
+
"$type": "number",
|
|
51
|
+
"$value": 0
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"subtle": [
|
|
57
|
+
{
|
|
58
|
+
"a63": {
|
|
59
|
+
"avatar": {
|
|
60
|
+
"radius": {
|
|
61
|
+
"$type": "dimension",
|
|
62
|
+
"$value": "{radius.full}"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"radius": {
|
|
67
|
+
"multiplier": {
|
|
68
|
+
"$type": "number",
|
|
69
|
+
"$value": 0.5
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"default": [
|
|
75
|
+
{
|
|
76
|
+
"a63": {
|
|
77
|
+
"avatar": {
|
|
78
|
+
"radius": {
|
|
79
|
+
"$type": "number",
|
|
80
|
+
"$value": 50,
|
|
81
|
+
"$extensions": {
|
|
82
|
+
"io.atom63.derive": "50%"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"radius": {
|
|
88
|
+
"multiplier": {
|
|
89
|
+
"$type": "number",
|
|
90
|
+
"$value": 1
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"round": [
|
|
96
|
+
{
|
|
97
|
+
"a63": {
|
|
98
|
+
"avatar": {
|
|
99
|
+
"radius": {
|
|
100
|
+
"$type": "number",
|
|
101
|
+
"$value": 50,
|
|
102
|
+
"$extensions": {
|
|
103
|
+
"io.atom63.derive": "50%"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"radius": {
|
|
109
|
+
"multiplier": {
|
|
110
|
+
"$type": "number",
|
|
111
|
+
"$value": 1.5
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"resolutionOrder": [
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/sets/base"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"$ref": "#/modifiers/radius"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"$extensions": {
|
|
128
|
+
"io.atom63.css": {
|
|
129
|
+
"attribute": "data-a63-radius",
|
|
130
|
+
"selectors": {
|
|
131
|
+
"none": "[data-a63-radius='none']",
|
|
132
|
+
"subtle": "[data-a63-radius='subtle']",
|
|
133
|
+
"default": "[data-a63-radius='default']",
|
|
134
|
+
"round": "[data-a63-radius='round']"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
package/src/tokens/semantics.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/tokens/semantics.resolver.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
2
5
|
* Canonical semantic layer.
|
|
3
6
|
*
|
|
4
7
|
* This is the single source of semantic truth for the new system. Values are
|
|
@@ -7,6 +10,29 @@
|
|
|
7
10
|
* and Tailwind are opt-in adapters that re-reference THESE names — never the
|
|
8
11
|
* reverse. See packages/styles/README.md (the mirror rule).
|
|
9
12
|
*/
|
|
13
|
+
:root {
|
|
14
|
+
--a63-surface-tint: 0%;
|
|
15
|
+
/* Scrim — the modal/drawer/sheet backdrop veil behind overlays. */
|
|
16
|
+
--a63-scrim: color-mix(in oklch, black 40%, transparent);
|
|
17
|
+
/* Media stage — behind full-screen photos and video: black in every theme, so letterboxing matches the picture. */
|
|
18
|
+
--a63-media-stage: var(--color-black-100);
|
|
19
|
+
/* Media scrim — the dim behind a video dialog; heavier than --a63-scrim because the video is the only thing on screen. */
|
|
20
|
+
--a63-media-scrim: var(--color-black-70);
|
|
21
|
+
/* On media — icons and text on controls that float over photos and video, whose colors are unknowable. */
|
|
22
|
+
--a63-on-media-foreground: var(--color-white-100);
|
|
23
|
+
/* On media — the backplate of a floating control, dark enough that its foreground reads over any picture. */
|
|
24
|
+
--a63-on-media-surface: var(--color-black-60);
|
|
25
|
+
/* On media — the backplate at rest for a primary control (play) and on hover for the others. */
|
|
26
|
+
--a63-on-media-surface-strong: var(--color-black-70);
|
|
27
|
+
/* On media — the hairline that separates a floating control from a dark picture. */
|
|
28
|
+
--a63-on-media-border: var(--color-white-20);
|
|
29
|
+
/* On media — the focus ring for controls over media. */
|
|
30
|
+
--a63-on-media-ring: var(--color-white-90);
|
|
31
|
+
/* On media — a light veil over a poster while it waits. */
|
|
32
|
+
--a63-on-media-veil: var(--color-black-10);
|
|
33
|
+
/* On media — the veil over a poster while a control on it is shown. */
|
|
34
|
+
--a63-on-media-veil-strong: var(--color-black-20);
|
|
35
|
+
}
|
|
10
36
|
|
|
11
37
|
:root,
|
|
12
38
|
.light,
|
|
@@ -14,29 +40,29 @@
|
|
|
14
40
|
/* Surfaces — neutral, optionally bent toward the brand hue by --a63-surface-tint
|
|
15
41
|
(0% = pure neutral). Each mixes with a lightness-matched --a63-brand-* step. */
|
|
16
42
|
--a63-surface-page: color-mix(
|
|
17
|
-
in
|
|
43
|
+
in oklab,
|
|
18
44
|
var(--surface-light-2) calc(100% - var(--a63-surface-tint)),
|
|
19
45
|
var(--a63-brand-100) var(--a63-surface-tint)
|
|
20
46
|
);
|
|
21
47
|
--a63-surface-panel: color-mix(
|
|
22
|
-
in
|
|
48
|
+
in oklab,
|
|
23
49
|
var(--surface-light-1) calc(100% - var(--a63-surface-tint)),
|
|
24
50
|
var(--a63-brand-50) var(--a63-surface-tint)
|
|
25
51
|
);
|
|
26
52
|
--a63-surface-overlay: color-mix(
|
|
27
|
-
in
|
|
53
|
+
in oklab,
|
|
28
54
|
var(--surface-light-1) calc(100% - var(--a63-surface-tint)),
|
|
29
55
|
var(--a63-brand-50) var(--a63-surface-tint)
|
|
30
56
|
);
|
|
31
57
|
--a63-surface-muted: color-mix(
|
|
32
|
-
in
|
|
58
|
+
in oklab,
|
|
33
59
|
var(--surface-light-3) calc(100% - var(--a63-surface-tint)),
|
|
34
60
|
var(--a63-brand-200) var(--a63-surface-tint)
|
|
35
61
|
);
|
|
36
62
|
/* Recessed input surface (the field fill). Brightest surface in light mode so a
|
|
37
63
|
field reads as a clean well recessed into its panel via --a63-field-shadow. */
|
|
38
64
|
--a63-surface-control: color-mix(
|
|
39
|
-
in
|
|
65
|
+
in oklab,
|
|
40
66
|
var(--surface-light-1) calc(100% - var(--a63-surface-tint)),
|
|
41
67
|
var(--a63-brand-50) var(--a63-surface-tint)
|
|
42
68
|
);
|
|
@@ -47,29 +73,32 @@
|
|
|
47
73
|
--a63-surface-control-hover: color-mix(
|
|
48
74
|
in srgb,
|
|
49
75
|
color-mix(
|
|
50
|
-
in
|
|
76
|
+
in oklab,
|
|
51
77
|
var(--surface-light-4) calc(100% - var(--a63-surface-tint)),
|
|
52
78
|
var(--a63-brand-300) var(--a63-surface-tint)
|
|
53
79
|
),
|
|
54
80
|
transparent 20%
|
|
55
81
|
);
|
|
56
|
-
|
|
57
82
|
/* Text */
|
|
58
83
|
--a63-text-primary: var(--surface-light-12);
|
|
59
84
|
--a63-text-secondary: var(--surface-light-11);
|
|
60
|
-
|
|
85
|
+
/* The brand as text (links, accents) on light surfaces; brand.css picks the
|
|
86
|
+
ramp step per brand. Use --a63-action-primary for fills. */
|
|
87
|
+
--a63-text-accent: var(--a63-brand-text);
|
|
88
|
+
/* Danger text: error messages and destructive labels on surfaces. Step 600 on
|
|
89
|
+
light surfaces; --a63-action-danger stays the fill for danger buttons. */
|
|
90
|
+
--a63-text-danger: var(--color-danger-600);
|
|
61
91
|
/* Border */
|
|
62
92
|
--a63-border-subtle: color-mix(
|
|
63
|
-
in
|
|
93
|
+
in oklab,
|
|
64
94
|
var(--surface-light-4) calc(100% - var(--a63-surface-tint)),
|
|
65
95
|
var(--a63-brand-300) var(--a63-surface-tint)
|
|
66
96
|
);
|
|
67
97
|
--a63-border-control: color-mix(
|
|
68
|
-
in
|
|
98
|
+
in oklab,
|
|
69
99
|
var(--surface-light-5) calc(100% - var(--a63-surface-tint)),
|
|
70
100
|
var(--a63-brand-400) var(--a63-surface-tint)
|
|
71
101
|
);
|
|
72
|
-
|
|
73
102
|
/* Action — primary + focus ring live in tokens/brand.css (brand-ramp scoped).
|
|
74
103
|
Neutral = the default variant's fill; sourced from surfaces (NOT --a63-text-*)
|
|
75
104
|
so a theme can recolor text without turning the default button into a fill. */
|
|
@@ -78,50 +107,44 @@
|
|
|
78
107
|
--a63-action-danger: var(--color-danger-600);
|
|
79
108
|
--a63-action-danger-hover: color-mix(in oklch, var(--a63-action-danger) 90%, transparent);
|
|
80
109
|
--a63-action-danger-foreground: white;
|
|
81
|
-
|
|
82
110
|
/* Status (danger's status role is served by --a63-action-danger). The base is
|
|
83
111
|
the accent used for tinted callouts (bg = mix toward transparent, text/border
|
|
84
|
-
= the accent); -foreground is the text/icon color ON a SOLID status fill.
|
|
85
|
-
|
|
112
|
+
= the accent); -foreground is the text/icon color ON a SOLID status fill.
|
|
113
|
+
Step 600 on light surfaces and 500 on dark ones (the .dark block), so icons
|
|
114
|
+
drawn in the accent reach WCAG's 3:1 for graphics in both modes. */
|
|
115
|
+
--a63-status-info: var(--color-info-600);
|
|
86
116
|
--a63-status-info-foreground: white;
|
|
87
|
-
--a63-status-success: var(--color-success-
|
|
117
|
+
--a63-status-success: var(--color-success-600);
|
|
88
118
|
--a63-status-success-foreground: white;
|
|
89
|
-
--a63-status-warning: var(--color-warning-
|
|
119
|
+
--a63-status-warning: var(--color-warning-600);
|
|
90
120
|
--a63-status-warning-foreground: white;
|
|
91
121
|
}
|
|
92
122
|
|
|
93
|
-
/* Mode-agnostic semantics — same veil in light + dark, so declared once at :root
|
|
94
|
-
(the .dark block below never overrides them). */
|
|
95
|
-
:root {
|
|
96
|
-
/* Scrim — the modal/drawer/sheet backdrop veil behind overlays. */
|
|
97
|
-
--a63-scrim: color-mix(in oklch, black 40%, transparent);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
123
|
:is(.dark, [data-a63-mode='dark']) {
|
|
101
124
|
--a63-surface-page: color-mix(
|
|
102
|
-
in
|
|
125
|
+
in oklab,
|
|
103
126
|
var(--surface-dark-1) calc(100% - var(--a63-surface-tint)),
|
|
104
127
|
var(--a63-brand-950) var(--a63-surface-tint)
|
|
105
128
|
);
|
|
106
129
|
--a63-surface-panel: color-mix(
|
|
107
|
-
in
|
|
130
|
+
in oklab,
|
|
108
131
|
var(--surface-dark-2) calc(100% - var(--a63-surface-tint)),
|
|
109
132
|
var(--a63-brand-900) var(--a63-surface-tint)
|
|
110
133
|
);
|
|
111
134
|
--a63-surface-overlay: color-mix(
|
|
112
|
-
in
|
|
135
|
+
in oklab,
|
|
113
136
|
var(--surface-dark-4) calc(100% - var(--a63-surface-tint)),
|
|
114
137
|
var(--a63-brand-800) var(--a63-surface-tint)
|
|
115
138
|
);
|
|
116
139
|
--a63-surface-muted: color-mix(
|
|
117
|
-
in
|
|
140
|
+
in oklab,
|
|
118
141
|
var(--surface-dark-3) calc(100% - var(--a63-surface-tint)),
|
|
119
142
|
var(--a63-brand-800) var(--a63-surface-tint)
|
|
120
143
|
);
|
|
121
144
|
/* Recessed input surface — darkest surface in dark mode, so a field reads as a
|
|
122
145
|
sunken well relative to its panel. */
|
|
123
146
|
--a63-surface-control: color-mix(
|
|
124
|
-
in
|
|
147
|
+
in oklab,
|
|
125
148
|
var(--surface-dark-1) calc(100% - var(--a63-surface-tint)),
|
|
126
149
|
var(--a63-brand-950) var(--a63-surface-tint)
|
|
127
150
|
);
|
|
@@ -130,28 +153,33 @@
|
|
|
130
153
|
--a63-surface-control-hover: color-mix(
|
|
131
154
|
in srgb,
|
|
132
155
|
color-mix(
|
|
133
|
-
in
|
|
156
|
+
in oklab,
|
|
134
157
|
var(--surface-dark-6) calc(100% - var(--a63-surface-tint)),
|
|
135
158
|
var(--a63-brand-600) var(--a63-surface-tint)
|
|
136
159
|
),
|
|
137
160
|
transparent 20%
|
|
138
161
|
);
|
|
139
|
-
|
|
140
162
|
--a63-text-primary: var(--surface-dark-12);
|
|
141
163
|
--a63-text-secondary: var(--surface-dark-11);
|
|
142
|
-
|
|
164
|
+
/* The primary fill is too dark to read as text on dark surfaces. */
|
|
165
|
+
--a63-text-accent: var(--a63-brand-400);
|
|
166
|
+
/* Danger text on dark surfaces: step 400 reaches WCAG AA 4.5:1 on every theme's
|
|
167
|
+
dark page and panel (step 600, the fill, is about 2.7:1 there). */
|
|
168
|
+
--a63-text-danger: var(--color-danger-400);
|
|
143
169
|
--a63-border-subtle: color-mix(
|
|
144
|
-
in
|
|
170
|
+
in oklab,
|
|
145
171
|
var(--surface-dark-6) calc(100% - var(--a63-surface-tint)),
|
|
146
172
|
var(--a63-brand-600) var(--a63-surface-tint)
|
|
147
173
|
);
|
|
148
174
|
--a63-border-control: color-mix(
|
|
149
|
-
in
|
|
175
|
+
in oklab,
|
|
150
176
|
var(--surface-dark-7) calc(100% - var(--a63-surface-tint)),
|
|
151
177
|
var(--a63-brand-500) var(--a63-surface-tint)
|
|
152
178
|
);
|
|
153
|
-
|
|
154
179
|
--a63-action-neutral: var(--surface-dark-12);
|
|
155
180
|
--a63-action-neutral-foreground: var(--surface-dark-1);
|
|
156
181
|
--a63-action-danger-hover: color-mix(in oklch, var(--a63-action-danger) 82%, white 8%);
|
|
182
|
+
--a63-status-info: var(--color-info-500);
|
|
183
|
+
--a63-status-success: var(--color-success-500);
|
|
184
|
+
--a63-status-warning: var(--color-warning-500);
|
|
157
185
|
}
|