@atom63/styles 0.1.0-beta.1 → 0.1.0-beta.11
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/LICENSE +21 -0
- package/README.md +22 -13
- package/generated/atom63.figma-sync.json +23277 -0
- package/generated/atom63.tokens.json +19650 -8403
- package/generated/z-layers.d.ts +33 -0
- package/generated/z-layers.js +31 -0
- package/package.json +29 -15
- package/src/compat/a63-from-shadcn.css +281 -0
- package/src/compat/shadcn.browser.test.ts +23 -0
- package/src/compat/shadcn.css +133 -17
- 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 +128 -58
- package/src/contracts/badge.resolver.json +454 -0
- package/src/contracts/choice.css +5 -2
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +54 -57
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +294 -0
- package/src/contracts/environment.css +178 -60
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +1210 -0
- package/src/contracts/field.css +4 -2
- 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 +5 -1
- package/src/contracts/selection.tokens.json +42 -0
- package/src/contracts/skeleton.css +18 -2
- package/src/contracts/skeleton.resolver.json +62 -0
- package/src/contracts/surface.css +17 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +154 -0
- package/src/contracts/toggle.css +27 -3
- package/src/contracts/toggle.resolver.json +129 -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 +76 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1110 -0
- package/src/tailwind/roles.json +189 -0
- package/src/tailwind/theme.css +216 -24
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +126 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1304 -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 +22 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +794 -0
- package/src/themes/terminal.css +164 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +585 -0
- package/src/tokens/brand-action.css +65 -0
- package/src/tokens/brand-action.resolver.json +155 -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/chart-palette.browser.test.ts +188 -0
- package/src/tokens/color-mix-space.browser.test.ts +101 -0
- package/src/tokens/contrast.browser.test.ts +303 -5
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/figma-parity.browser.test.ts +270 -0
- package/src/tokens/font.css +12 -0
- package/src/tokens/font.resolver.json +128 -0
- package/src/tokens/form-factor.browser.test.ts +129 -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 -43
- package/src/tokens/foundation/primitives.tokens.json +3258 -0
- package/src/tokens/foundation/radius.css +11 -9
- package/src/tokens/foundation/radius.tokens.json +108 -0
- package/src/tokens/foundation/typography.css +49 -12
- package/src/tokens/foundation/typography.native.css +21 -0
- package/src/tokens/foundation/typography.resolver.json +1008 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/index.css +1 -0
- 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 +18 -3
- package/src/tokens/plate-scope.browser.test.ts +73 -0
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +716 -41
- package/src/tokens/semantics.resolver.json +1639 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/surface.css +13 -19
- package/src/tokens/surface.resolver.json +706 -0
- package/src/tokens/swift-parity.browser.test.ts +141 -0
- package/src/tokens/type-roles.css +88 -0
- package/src/tokens/type-roles.resolver.json +419 -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 -21664
- package/src/tokens/foundation/aliases.css +0 -28
- package/src/z-layers.ts +0 -40
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/selection.tokens.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
|
* Selection contract — shared value tokens for bistate/selection controls
|
|
3
6
|
* (Switch now; Checkbox + Radio next). The "on" fill is the brand primary, so a
|
|
4
7
|
* checked control follows the brand axis AND each theme's primary for free.
|
|
@@ -10,7 +13,6 @@
|
|
|
10
13
|
* resolve-at-declaration trap, learned on Input). So only the axis-independent
|
|
11
14
|
* defaults live here: the knob colour and the switch geometry driver.
|
|
12
15
|
*/
|
|
13
|
-
|
|
14
16
|
:root {
|
|
15
17
|
/* The knob — always white (an iOS switch thumb is white in light AND dark). */
|
|
16
18
|
--a63-selection-thumb: white;
|
|
@@ -18,4 +20,6 @@
|
|
|
18
20
|
--a63-selection-thumb-fg: color-mix(in oklch, black 78%, transparent);
|
|
19
21
|
/* Drives the switch track geometry; iOS enlarges it in environment.css. */
|
|
20
22
|
--a63-switch-thumb-size: 1rem;
|
|
23
|
+
/* The thumb's width over its height: 1 is a round knob. The track is the thumb plus one thumb height of travel, so a wider thumb lengthens the track. The phone form factor widens it (environment.css). */
|
|
24
|
+
--a63-switch-thumb-aspect: 1;
|
|
21
25
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Selection contract — shared value tokens for bistate/selection controls\n(Switch now; Checkbox + Radio next). The \"on\" fill is the brand primary, so a\nchecked control follows the brand axis AND each theme's primary for free.\n\nThe axis-dependent hooks (--a63-selection-accent / -track-off / -border /\n-focus-ring, which reference mode/theme/brand semantics) are resolved at the\nrecipe USE-SITE via `var(--a63-selection-X, <live semantic>)` — declaring them\nat :root would freeze their var()s to the root's mode/theme (the\nresolve-at-declaration trap, learned on Input). So only the axis-independent\ndefaults live here: the knob colour and the switch geometry driver.",
|
|
3
|
+
"a63": {
|
|
4
|
+
"selection": {
|
|
5
|
+
"thumb": {
|
|
6
|
+
"$root": {
|
|
7
|
+
"$type": "color",
|
|
8
|
+
"$value": "{color.white.100}",
|
|
9
|
+
"$extensions": {
|
|
10
|
+
"io.atom63.derive": "white"
|
|
11
|
+
},
|
|
12
|
+
"$description": "The knob — always white (an iOS switch thumb is white in light AND dark)."
|
|
13
|
+
},
|
|
14
|
+
"fg": {
|
|
15
|
+
"$type": "color",
|
|
16
|
+
"$value": "{color.black.100}",
|
|
17
|
+
"$extensions": {
|
|
18
|
+
"io.atom63.derive": "color-mix(in oklch, black 78%, transparent)"
|
|
19
|
+
},
|
|
20
|
+
"$description": "Ink on the white knob — fixed dark, never mode text (which washes out in dark)."
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"switch": {
|
|
25
|
+
"thumb": {
|
|
26
|
+
"size": {
|
|
27
|
+
"$type": "dimension",
|
|
28
|
+
"$value": {
|
|
29
|
+
"value": 1,
|
|
30
|
+
"unit": "rem"
|
|
31
|
+
},
|
|
32
|
+
"$description": "Drives the switch track geometry; iOS enlarges it in environment.css."
|
|
33
|
+
},
|
|
34
|
+
"aspect": {
|
|
35
|
+
"$type": "number",
|
|
36
|
+
"$value": 1,
|
|
37
|
+
"$description": "The thumb's width over its height: 1 is a round knob. The track is the thumb plus one thumb height of travel, so a wider thumb lengthens the track. The phone form factor widens it (environment.css)."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/skeleton.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
|
* Skeleton appearance contract.
|
|
3
6
|
*
|
|
4
7
|
* Renderers may use different masking primitives, but the base surface and
|
|
5
|
-
* highlight emphasis remain shared design semantics.
|
|
8
|
+
* highlight emphasis remain shared design semantics. Each mode block repeats
|
|
9
|
+
* the base alias so a nested light or dark scope resolves it against its own
|
|
10
|
+
* surface roles.
|
|
6
11
|
*/
|
|
7
|
-
:root
|
|
12
|
+
:root,
|
|
13
|
+
.light,
|
|
14
|
+
[data-a63-mode='light'] {
|
|
8
15
|
--a63-skeleton-base: var(--a63-surface-muted);
|
|
9
16
|
--a63-skeleton-highlight: var(--color-white-60);
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
:is(.dark, [data-a63-mode='dark']) {
|
|
20
|
+
--a63-skeleton-base: var(--a63-surface-muted);
|
|
13
21
|
--a63-skeleton-highlight: var(--color-white-10);
|
|
14
22
|
}
|
|
23
|
+
|
|
24
|
+
[data-a63-brand],
|
|
25
|
+
[data-a63-surface] {
|
|
26
|
+
/* The mode roles again, on scopes that change what they read, keyed to the nearest mode scope. */
|
|
27
|
+
--a63-skeleton-base: var(--a63-surface-muted);
|
|
28
|
+
--a63-skeleton-highlight: var(--a63-if-light, var(--color-white-60))
|
|
29
|
+
var(--a63-if-dark, var(--color-white-10));
|
|
30
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2025.10",
|
|
3
|
+
"description": "Skeleton appearance contract.\n\nRenderers may use different masking primitives, but the base surface and\nhighlight emphasis remain shared design semantics. Each mode block repeats\nthe base alias so a nested light or dark scope resolves it against its own\nsurface roles.",
|
|
4
|
+
"modifiers": {
|
|
5
|
+
"mode": {
|
|
6
|
+
"default": "light",
|
|
7
|
+
"contexts": {
|
|
8
|
+
"light": [
|
|
9
|
+
{
|
|
10
|
+
"a63": {
|
|
11
|
+
"skeleton": {
|
|
12
|
+
"base": {
|
|
13
|
+
"$type": "color",
|
|
14
|
+
"$value": "{a63.surface.muted}"
|
|
15
|
+
},
|
|
16
|
+
"highlight": {
|
|
17
|
+
"$type": "color",
|
|
18
|
+
"$value": "{color.white.60}"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"dark": [
|
|
25
|
+
{
|
|
26
|
+
"a63": {
|
|
27
|
+
"skeleton": {
|
|
28
|
+
"base": {
|
|
29
|
+
"$type": "color",
|
|
30
|
+
"$value": "{a63.surface.muted}"
|
|
31
|
+
},
|
|
32
|
+
"highlight": {
|
|
33
|
+
"$type": "color",
|
|
34
|
+
"$value": "{color.white.10}"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"resolutionOrder": [
|
|
44
|
+
{
|
|
45
|
+
"$ref": "#/modifiers/mode"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"$extensions": {
|
|
49
|
+
"io.atom63.css": {
|
|
50
|
+
"attribute": "data-a63-mode",
|
|
51
|
+
"selectors": {
|
|
52
|
+
"light": ":root,\n.light,\n[data-a63-mode='light']",
|
|
53
|
+
"dark": ":is(.dark, [data-a63-mode='dark'])"
|
|
54
|
+
},
|
|
55
|
+
"rescope": {
|
|
56
|
+
"selector": "[data-a63-brand], [data-a63-surface]",
|
|
57
|
+
"light": "light",
|
|
58
|
+
"dark": "dark"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/surface.tokens.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
|
* Surface contract — the STATIC, in-flow container/panel (cards, panels,
|
|
3
6
|
* frames, sections, accordion containers, windows). The counterpart to OVERLAY:
|
|
4
7
|
* same "grouped surface" idea, but no z-stacking / elevation-above-page — it
|
|
@@ -16,41 +19,31 @@
|
|
|
16
19
|
*
|
|
17
20
|
* The contract now carries the full treatment vocabulary
|
|
18
21
|
* (gloss/highlight/backdrop/border/texture/inner-shadow), not just the shadow.
|
|
22
|
+
*
|
|
23
|
+
* Radius is intentionally NOT defaulted here — recipes read
|
|
24
|
+
* var(--a63-surface-radius, <own default>); a theme sets it to square all
|
|
25
|
+
* surfaces (retro → 0). Declaring it here would flatten per-recipe radii, so
|
|
26
|
+
* it stays unset at :root.
|
|
19
27
|
*/
|
|
28
|
+
@import './surface.native.css';
|
|
20
29
|
|
|
21
30
|
:root {
|
|
22
31
|
/* Outer elevation — flush · bevel · drop · glow (existing lever, unchanged). */
|
|
23
32
|
--a63-surface-shadow:
|
|
24
33
|
0 1px 2px color-mix(in oklch, black 6%, transparent),
|
|
25
34
|
0 1px 1px color-mix(in oklch, black 4%, transparent);
|
|
26
|
-
|
|
27
35
|
/* Recessed/inset treatment (sunken well). `0 0 #0000` = flat.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
NOT `none`: this token is composed into comma-separated box-shadow lists
|
|
37
|
+
(`var(--a63-surface-inner-shadow), var(--a63-surface-shadow)`), and `none`
|
|
38
|
+
is only legal as the sole value — it invalidates the whole declaration and
|
|
39
|
+
silently drops the surface's elevation. */
|
|
32
40
|
--a63-surface-inner-shadow: 0 0 #0000;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/* Rim/edge specular highlight (recipe ::after or an inset shadow layer). */
|
|
38
|
-
--a63-surface-highlight: none;
|
|
41
|
+
/* Soft lift for a borderless surface that sits above its ground: the elevated Card and the raised Button. Themes point it at their own surface treatment. */
|
|
42
|
+
--a63-surface-raised-shadow:
|
|
43
|
+
0 1px 3px color-mix(in oklch, black 8%, transparent),
|
|
44
|
+
0 4px 12px -2px color-mix(in oklch, black 10%, transparent);
|
|
39
45
|
--a63-surface-highlight-opacity: 1;
|
|
40
|
-
|
|
41
|
-
/* backdrop-filter (blur/saturate) for translucent glass. none = opaque. */
|
|
42
|
-
--a63-surface-backdrop: none;
|
|
43
|
-
|
|
44
46
|
/* Bevel controls. */
|
|
45
47
|
--a63-surface-border-style: solid;
|
|
46
48
|
--a63-surface-border-width: 1px;
|
|
47
|
-
|
|
48
|
-
/* Texture layer: an extra background-image (scanline/pinstripe) + its blend. */
|
|
49
|
-
--a63-surface-texture-image: none;
|
|
50
|
-
--a63-surface-texture-blend: normal;
|
|
51
|
-
|
|
52
|
-
/* Radius is intentionally NOT defaulted here — recipes read
|
|
53
|
-
var(--a63-surface-radius, <own default>); a theme sets it to square all
|
|
54
|
-
surfaces (retro → 0). Declaring it here would flatten per-recipe radii, so
|
|
55
|
-
it stays unset at :root. */
|
|
56
49
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CSS-native values of the surface contract: values with no DTCG type. The rest of
|
|
3
|
+
* the contract is generated from surface.tokens.json. Each declaration here is listed
|
|
4
|
+
* in native-values.json; see docs/design-system/token-single-source.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
/* Top-half sheen gradient (background-image layer). none = no sheen. */
|
|
9
|
+
--a63-surface-gloss: none;
|
|
10
|
+
/* Rim/edge specular highlight (recipe ::after or an inset shadow layer). */
|
|
11
|
+
--a63-surface-highlight: none;
|
|
12
|
+
/* backdrop-filter (blur/saturate) for translucent glass. none = opaque. */
|
|
13
|
+
--a63-surface-backdrop: none;
|
|
14
|
+
/* Texture layer: an extra background-image (scanline/pinstripe) + its blend. */
|
|
15
|
+
--a63-surface-texture-image: none;
|
|
16
|
+
--a63-surface-texture-blend: normal;
|
|
17
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Surface contract — the STATIC, in-flow container/panel (cards, panels,\nframes, sections, accordion containers, windows). The counterpart to OVERLAY:\nsame \"grouped surface\" idea, but no z-stacking / elevation-above-page — it\nsits IN the flow.\n\nLean by design (see the taxonomy spec): semantics carry the default look — the\nrecipe reads --a63-surface-panel (bg), --a63-border-subtle (border),\n--radius-* (radius), --a63-text-* (text) at the use-site. The ONE thing themes\nvary distinctly for a static surface is its FLUSH-vs-LIFT-vs-BEVEL treatment,\nso that is the only contract token here.\n\n--a63-surface-shadow is a drop/bevel (mode-independent), so it's safe to\ndefault at :root and let each theme override it on its shell (modern soft-flush,\naqua subtle glassy lift, retro hard Win98 frame bevel, terminal phosphor edge).\n\nThe contract now carries the full treatment vocabulary\n(gloss/highlight/backdrop/border/texture/inner-shadow), not just the shadow.\n\nRadius is intentionally NOT defaulted here — recipes read\n var(--a63-surface-radius, <own default>); a theme sets it to square all\n surfaces (retro → 0). Declaring it here would flatten per-recipe radii, so\n it stays unset at :root.",
|
|
3
|
+
"a63": {
|
|
4
|
+
"surface": {
|
|
5
|
+
"shadow": {
|
|
6
|
+
"$type": "shadow",
|
|
7
|
+
"$value": [
|
|
8
|
+
{
|
|
9
|
+
"color": {
|
|
10
|
+
"colorSpace": "srgb",
|
|
11
|
+
"components": [0, 0, 0],
|
|
12
|
+
"alpha": 0.06
|
|
13
|
+
},
|
|
14
|
+
"offsetX": {
|
|
15
|
+
"value": 0,
|
|
16
|
+
"unit": "px"
|
|
17
|
+
},
|
|
18
|
+
"offsetY": {
|
|
19
|
+
"value": 1,
|
|
20
|
+
"unit": "px"
|
|
21
|
+
},
|
|
22
|
+
"blur": {
|
|
23
|
+
"value": 2,
|
|
24
|
+
"unit": "px"
|
|
25
|
+
},
|
|
26
|
+
"spread": {
|
|
27
|
+
"value": 0,
|
|
28
|
+
"unit": "px"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"color": {
|
|
33
|
+
"colorSpace": "srgb",
|
|
34
|
+
"components": [0, 0, 0],
|
|
35
|
+
"alpha": 0.04
|
|
36
|
+
},
|
|
37
|
+
"offsetX": {
|
|
38
|
+
"value": 0,
|
|
39
|
+
"unit": "px"
|
|
40
|
+
},
|
|
41
|
+
"offsetY": {
|
|
42
|
+
"value": 1,
|
|
43
|
+
"unit": "px"
|
|
44
|
+
},
|
|
45
|
+
"blur": {
|
|
46
|
+
"value": 1,
|
|
47
|
+
"unit": "px"
|
|
48
|
+
},
|
|
49
|
+
"spread": {
|
|
50
|
+
"value": 0,
|
|
51
|
+
"unit": "px"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"$extensions": {
|
|
56
|
+
"io.atom63.derive": "0 1px 2px color-mix(in oklch, black 6%, transparent), 0 1px 1px color-mix(in oklch, black 4%, transparent)"
|
|
57
|
+
},
|
|
58
|
+
"$description": "Outer elevation — flush · bevel · drop · glow (existing lever, unchanged)."
|
|
59
|
+
},
|
|
60
|
+
"inner": {
|
|
61
|
+
"shadow": {
|
|
62
|
+
"$type": "shadow",
|
|
63
|
+
"$value": [],
|
|
64
|
+
"$extensions": {
|
|
65
|
+
"io.atom63.derive": "0 0 #0000"
|
|
66
|
+
},
|
|
67
|
+
"$description": "Recessed/inset treatment (sunken well). `0 0 #0000` = flat.\n NOT `none`: this token is composed into comma-separated box-shadow lists\n (`var(--a63-surface-inner-shadow), var(--a63-surface-shadow)`), and `none`\n is only legal as the sole value — it invalidates the whole declaration and\n silently drops the surface's elevation."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"raised": {
|
|
71
|
+
"shadow": {
|
|
72
|
+
"$type": "shadow",
|
|
73
|
+
"$value": [
|
|
74
|
+
{
|
|
75
|
+
"color": {
|
|
76
|
+
"colorSpace": "srgb",
|
|
77
|
+
"components": [0, 0, 0],
|
|
78
|
+
"alpha": 0.08
|
|
79
|
+
},
|
|
80
|
+
"offsetX": {
|
|
81
|
+
"value": 0,
|
|
82
|
+
"unit": "px"
|
|
83
|
+
},
|
|
84
|
+
"offsetY": {
|
|
85
|
+
"value": 1,
|
|
86
|
+
"unit": "px"
|
|
87
|
+
},
|
|
88
|
+
"blur": {
|
|
89
|
+
"value": 3,
|
|
90
|
+
"unit": "px"
|
|
91
|
+
},
|
|
92
|
+
"spread": {
|
|
93
|
+
"value": 0,
|
|
94
|
+
"unit": "px"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"color": {
|
|
99
|
+
"colorSpace": "srgb",
|
|
100
|
+
"components": [0, 0, 0],
|
|
101
|
+
"alpha": 0.1
|
|
102
|
+
},
|
|
103
|
+
"offsetX": {
|
|
104
|
+
"value": 0,
|
|
105
|
+
"unit": "px"
|
|
106
|
+
},
|
|
107
|
+
"offsetY": {
|
|
108
|
+
"value": 4,
|
|
109
|
+
"unit": "px"
|
|
110
|
+
},
|
|
111
|
+
"blur": {
|
|
112
|
+
"value": 12,
|
|
113
|
+
"unit": "px"
|
|
114
|
+
},
|
|
115
|
+
"spread": {
|
|
116
|
+
"value": -2,
|
|
117
|
+
"unit": "px"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"$extensions": {
|
|
122
|
+
"io.atom63.derive": "0 1px 3px color-mix(in oklch, black 8%, transparent), 0 4px 12px -2px color-mix(in oklch, black 10%, transparent)"
|
|
123
|
+
},
|
|
124
|
+
"$description": "Soft lift for a borderless surface that sits above its ground: the elevated Card and the raised Button. Themes point it at their own surface treatment."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"highlight": {
|
|
128
|
+
"opacity": {
|
|
129
|
+
"$type": "number",
|
|
130
|
+
"$value": 1
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"border": {
|
|
134
|
+
"style": {
|
|
135
|
+
"$type": "strokeStyle",
|
|
136
|
+
"$value": "solid",
|
|
137
|
+
"$description": "Bevel controls."
|
|
138
|
+
},
|
|
139
|
+
"width": {
|
|
140
|
+
"$type": "dimension",
|
|
141
|
+
"$value": {
|
|
142
|
+
"value": 1,
|
|
143
|
+
"unit": "px"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"$extensions": {
|
|
150
|
+
"io.atom63.css": {
|
|
151
|
+
"imports": ["./surface.native.css"]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
package/src/contracts/toggle.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/toggle.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
|
* Toggle contract — persistent on/off controls.
|
|
3
6
|
*
|
|
4
7
|
* Covers standalone Toggle. ToggleGroup is always a joined segmented bar and
|
|
@@ -8,12 +11,14 @@
|
|
|
8
11
|
* --a63-toggle-background -> transparent
|
|
9
12
|
* --a63-toggle-foreground -> var(--a63-text-primary)
|
|
10
13
|
* --a63-toggle-hover-background -> var(--a63-surface-control-hover)
|
|
11
|
-
* --a63-toggle-on-background -> var(--a63-surface-muted)
|
|
12
|
-
* --a63-toggle-on-foreground -> var(--a63-text-primary)
|
|
13
14
|
* --a63-toggle-primary-background -> var(--a63-action-primary)
|
|
14
15
|
* --a63-toggle-primary-foreground -> var(--a63-action-primary-foreground)
|
|
16
|
+
*
|
|
17
|
+
* The pressed neutral fill is a token, so a theme whose neutral solid sits
|
|
18
|
+
* close to its page (terminal) can give a pressed toggle its own fill. Each
|
|
19
|
+
* mode block repeats it so a nested light or dark scope resolves it against
|
|
20
|
+
* its own action roles.
|
|
15
21
|
*/
|
|
16
|
-
|
|
17
22
|
:root {
|
|
18
23
|
--a63-toggle-border-width: var(--a63-segment-border-width);
|
|
19
24
|
--a63-toggle-gap: var(--a63-control-gap);
|
|
@@ -24,3 +29,22 @@
|
|
|
24
29
|
--a63-toggle-text-shadow: none;
|
|
25
30
|
--a63-toggle-disabled-opacity: 0.56;
|
|
26
31
|
}
|
|
32
|
+
|
|
33
|
+
:root,
|
|
34
|
+
.light,
|
|
35
|
+
[data-a63-mode='light'] {
|
|
36
|
+
--a63-toggle-on-background: var(--a63-action-neutral);
|
|
37
|
+
--a63-toggle-on-foreground: var(--a63-action-neutral-foreground);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:is(.dark, [data-a63-mode='dark']) {
|
|
41
|
+
--a63-toggle-on-background: var(--a63-action-neutral);
|
|
42
|
+
--a63-toggle-on-foreground: var(--a63-action-neutral-foreground);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[data-a63-brand],
|
|
46
|
+
[data-a63-surface] {
|
|
47
|
+
/* The mode roles again, on scopes that change what they read, keyed to the nearest mode scope. */
|
|
48
|
+
--a63-toggle-on-background: var(--a63-action-neutral);
|
|
49
|
+
--a63-toggle-on-foreground: var(--a63-action-neutral-foreground);
|
|
50
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2025.10",
|
|
3
|
+
"description": "Toggle contract — persistent on/off controls.\n\nCovers standalone Toggle. ToggleGroup is always a joined segmented bar and\nreads the segment contract for cell chrome; it does not use a layout variant.\n\nColour hooks resolve at recipe use-sites:\n --a63-toggle-background -> transparent\n --a63-toggle-foreground -> var(--a63-text-primary)\n --a63-toggle-hover-background -> var(--a63-surface-control-hover)\n --a63-toggle-primary-background -> var(--a63-action-primary)\n --a63-toggle-primary-foreground -> var(--a63-action-primary-foreground)\n\nThe pressed neutral fill is a token, so a theme whose neutral solid sits\nclose to its page (terminal) can give a pressed toggle its own fill. Each\nmode block repeats it so a nested light or dark scope resolves it against\nits own action roles.",
|
|
4
|
+
"sets": {
|
|
5
|
+
"base": {
|
|
6
|
+
"sources": [
|
|
7
|
+
{
|
|
8
|
+
"a63": {
|
|
9
|
+
"toggle": {
|
|
10
|
+
"border": {
|
|
11
|
+
"width": {
|
|
12
|
+
"$type": "dimension",
|
|
13
|
+
"$value": "{a63.segment.border.width}"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"gap": {
|
|
17
|
+
"$type": "dimension",
|
|
18
|
+
"$value": "{a63.control.gap}"
|
|
19
|
+
},
|
|
20
|
+
"group": {
|
|
21
|
+
"gap": {
|
|
22
|
+
"$type": "dimension",
|
|
23
|
+
"$value": "{a63.segment.gap}"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"radius": {
|
|
27
|
+
"$type": "dimension",
|
|
28
|
+
"$value": "{a63.control.radius}"
|
|
29
|
+
},
|
|
30
|
+
"shadow": {
|
|
31
|
+
"$root": {
|
|
32
|
+
"$type": "shadow",
|
|
33
|
+
"$value": []
|
|
34
|
+
},
|
|
35
|
+
"active": {
|
|
36
|
+
"$type": "shadow",
|
|
37
|
+
"$value": []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"text": {
|
|
41
|
+
"shadow": {
|
|
42
|
+
"$type": "shadow",
|
|
43
|
+
"$value": []
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"disabled": {
|
|
47
|
+
"opacity": {
|
|
48
|
+
"$type": "number",
|
|
49
|
+
"$value": 0.56
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"$extensions": {
|
|
57
|
+
"io.atom63.css": {
|
|
58
|
+
"selector": ":root"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"modifiers": {
|
|
64
|
+
"mode": {
|
|
65
|
+
"default": "light",
|
|
66
|
+
"contexts": {
|
|
67
|
+
"light": [
|
|
68
|
+
{
|
|
69
|
+
"a63": {
|
|
70
|
+
"toggle": {
|
|
71
|
+
"on": {
|
|
72
|
+
"background": {
|
|
73
|
+
"$type": "color",
|
|
74
|
+
"$value": "{a63.action.neutral}"
|
|
75
|
+
},
|
|
76
|
+
"foreground": {
|
|
77
|
+
"$type": "color",
|
|
78
|
+
"$value": "{a63.action.neutral.foreground}"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"dark": [
|
|
86
|
+
{
|
|
87
|
+
"a63": {
|
|
88
|
+
"toggle": {
|
|
89
|
+
"on": {
|
|
90
|
+
"background": {
|
|
91
|
+
"$type": "color",
|
|
92
|
+
"$value": "{a63.action.neutral}"
|
|
93
|
+
},
|
|
94
|
+
"foreground": {
|
|
95
|
+
"$type": "color",
|
|
96
|
+
"$value": "{a63.action.neutral.foreground}"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"resolutionOrder": [
|
|
107
|
+
{
|
|
108
|
+
"$ref": "#/sets/base"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"$ref": "#/modifiers/mode"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"$extensions": {
|
|
115
|
+
"io.atom63.css": {
|
|
116
|
+
"attribute": "data-a63-mode",
|
|
117
|
+
"selectors": {
|
|
118
|
+
"light": ":root,\n.light,\n[data-a63-mode='light']",
|
|
119
|
+
"dark": ":is(.dark, [data-a63-mode='dark'])"
|
|
120
|
+
},
|
|
121
|
+
"rescope": {
|
|
122
|
+
"selector": "[data-a63-brand], [data-a63-surface]",
|
|
123
|
+
"light": "light",
|
|
124
|
+
"dark": "dark",
|
|
125
|
+
"base": "base"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
package/src/contracts/track.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/track.tokens.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
|
* Track contract — the RECESSED rail that holds raised cells/thumbs
|
|
3
6
|
* (segmented-control track, slider rail, tabs list). Distinct from FIELD (holds
|
|
4
7
|
* text, not interactive cells) and from CONTROL (raised). The ACTIVE cell/thumb
|
|
@@ -20,7 +23,6 @@
|
|
|
20
23
|
* valid archetype expressions: recessed-well (SegmentedControl) vs raised-bar
|
|
21
24
|
* (joined ToggleGroup). Only the recessed one is `track`.
|
|
22
25
|
*/
|
|
23
|
-
|
|
24
26
|
:root {
|
|
25
27
|
--a63-track-shadow: inset 0 1px 1px color-mix(in oklch, black 6%, transparent);
|
|
26
28
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Track contract — the RECESSED rail that holds raised cells/thumbs\n(segmented-control track, slider rail, tabs list). Distinct from FIELD (holds\ntext, not interactive cells) and from CONTROL (raised). The ACTIVE cell/thumb\nthat rides in the track reuses the CONTROL contract (e.g. the segmented\nindicator reads --a63-control-shadow); the track itself is the sunken well.\n\nLean by design (see the taxonomy spec): semantics carry the default look — the\nrecipe reads --a63-surface-control (bg), --a63-control-radius (radius) and its\ninset/gap constants at the use-site. The ONE thing themes vary distinctly for a\nrecessed rail is its INSET-WELL depth, so that is the only contract token here.\n\n--a63-track-shadow is a static inset (mode-independent, like --a63-field-shadow),\nso it's safe to default at :root and let each theme override it on its shell\n(modern faint inset, aqua deeper sunken gel, retro Win98 inset well, terminal\nfaint phosphor inset).\n\nNOTE: the joined-ToggleGroup bar is intentionally a RAISED control (it reads the\nCONTROL contract — aqua gel / retro bevel), NOT a track. \"Segmented set\" has two\nvalid archetype expressions: recessed-well (SegmentedControl) vs raised-bar\n(joined ToggleGroup). Only the recessed one is `track`.",
|
|
3
|
+
"a63": {
|
|
4
|
+
"track": {
|
|
5
|
+
"shadow": {
|
|
6
|
+
"$type": "shadow",
|
|
7
|
+
"$value": [
|
|
8
|
+
{
|
|
9
|
+
"color": {
|
|
10
|
+
"colorSpace": "srgb",
|
|
11
|
+
"components": [0, 0, 0],
|
|
12
|
+
"alpha": 0.06
|
|
13
|
+
},
|
|
14
|
+
"offsetX": {
|
|
15
|
+
"value": 0,
|
|
16
|
+
"unit": "px"
|
|
17
|
+
},
|
|
18
|
+
"offsetY": {
|
|
19
|
+
"value": 1,
|
|
20
|
+
"unit": "px"
|
|
21
|
+
},
|
|
22
|
+
"blur": {
|
|
23
|
+
"value": 1,
|
|
24
|
+
"unit": "px"
|
|
25
|
+
},
|
|
26
|
+
"spread": {
|
|
27
|
+
"value": 0,
|
|
28
|
+
"unit": "px"
|
|
29
|
+
},
|
|
30
|
+
"inset": true
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"$extensions": {
|
|
34
|
+
"io.atom63.derive": "inset 0 1px 1px color-mix(in oklch, black 6%, transparent)"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/trigger.tokens.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
|
* Trigger contract — controls whose main job is to open another surface.
|
|
3
6
|
*
|
|
4
7
|
* Covers DropdownMenuTrigger, PopoverTrigger, SelectTrigger, NavigationMenu
|
|
@@ -12,15 +15,15 @@
|
|
|
12
15
|
* --a63-trigger-hover-background -> var(--a63-surface-control-hover)
|
|
13
16
|
* --a63-trigger-open-background -> var(--a63-surface-control-hover)
|
|
14
17
|
*/
|
|
18
|
+
@import './trigger.native.css';
|
|
15
19
|
|
|
16
20
|
:root {
|
|
17
21
|
--a63-trigger-border-width: var(--a63-control-border-width);
|
|
18
22
|
--a63-trigger-focus-ring-width: var(--a63-control-focus-ring-width);
|
|
19
23
|
--a63-trigger-gap: var(--a63-control-gap);
|
|
20
|
-
--a63-trigger-indicator-size: 1em;
|
|
21
24
|
--a63-trigger-radius: var(--a63-control-radius);
|
|
22
25
|
/* `0 0 #0000` not `none` — composed into comma-separated box-shadow lists
|
|
23
|
-
|
|
26
|
+
alongside the focus ring, where `none` invalidates the declaration. */
|
|
24
27
|
--a63-trigger-shadow: 0 0 #0000;
|
|
25
28
|
--a63-trigger-open-shadow: var(--a63-trigger-shadow);
|
|
26
29
|
--a63-trigger-feedback-duration: var(--a63-control-feedback-duration);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CSS-native values of the trigger contract: values with no DTCG type. The rest of
|
|
3
|
+
* the contract is generated from trigger.tokens.json. Each declaration here is listed
|
|
4
|
+
* in native-values.json; see docs/design-system/token-single-source.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--a63-trigger-indicator-size: 1em;
|
|
9
|
+
}
|