@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Choice contract — form controls that expose checked/selected value state.\n\nCovers Checkbox, Radio, and Switch. This is the visual home for indicators,\ndots, thumbs, and on/off tracks. It aliases the older `selection` namespace so\ncurrent recipes keep working while new recipes can use the clearer name.\n\nAxis-dependent colour hooks are resolved at the recipe use-site:\n --a63-choice-accent -> var(--a63-action-primary)\n --a63-choice-border -> var(--a63-border-control)\n --a63-choice-track-off -> var(--a63-surface-control)\n --a63-choice-focus-ring -> var(--a63-focus-ring)\n\nMaterial hooks are axis-independent defaults. Themes override them to express\nglass, bevel, or phosphor treatment without making choice controls inherit the\nfull Button chrome. Switch maps the box shadows to its track and the indicator\ngloss to its checked fill; Checkbox and Radio use the same hooks on their\nboxes and indicators.",
|
|
3
|
+
"a63": {
|
|
4
|
+
"choice": {
|
|
5
|
+
"thumb": {
|
|
6
|
+
"$root": {
|
|
7
|
+
"$type": "color",
|
|
8
|
+
"$value": "{a63.selection.thumb}"
|
|
9
|
+
},
|
|
10
|
+
"fg": {
|
|
11
|
+
"$type": "color",
|
|
12
|
+
"$value": "{a63.selection.thumb.fg}"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"switch": {
|
|
16
|
+
"thumb": {
|
|
17
|
+
"size": {
|
|
18
|
+
"$type": "dimension",
|
|
19
|
+
"$value": "{a63.switch.thumb.size}"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"border": {
|
|
24
|
+
"width": {
|
|
25
|
+
"$type": "dimension",
|
|
26
|
+
"$value": "{a63.control.border.width}"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"focus": {
|
|
30
|
+
"ring": {
|
|
31
|
+
"width": {
|
|
32
|
+
"$type": "dimension",
|
|
33
|
+
"$value": "{a63.control.focus.ring.width}"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"feedback": {
|
|
38
|
+
"duration": {
|
|
39
|
+
"$type": "duration",
|
|
40
|
+
"$value": "{a63.control.feedback.duration}"
|
|
41
|
+
},
|
|
42
|
+
"ease": {
|
|
43
|
+
"$type": "duration",
|
|
44
|
+
"$value": "{a63.control.feedback.ease}"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"box": {
|
|
48
|
+
"shadow": {
|
|
49
|
+
"$root": {
|
|
50
|
+
"$type": "shadow",
|
|
51
|
+
"$value": []
|
|
52
|
+
},
|
|
53
|
+
"checked": {
|
|
54
|
+
"$type": "shadow",
|
|
55
|
+
"$value": []
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$extensions": {
|
|
62
|
+
"io.atom63.css": {
|
|
63
|
+
"imports": ["./choice.native.css"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/control.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
|
* Shared control contracts.
|
|
3
6
|
*
|
|
4
7
|
* Component recipes consume these first and introduce component-specific
|
|
@@ -6,97 +9,85 @@
|
|
|
6
9
|
* sizing/feedback tokens (see contracts/environment.css); recipes never hardcode
|
|
7
10
|
* sizes. Radius comes from the semantic ramp (theme/personalization), not here.
|
|
8
11
|
*/
|
|
12
|
+
@import './control.native.css';
|
|
9
13
|
|
|
10
14
|
:root {
|
|
11
15
|
/* Height ramp (xs..xl) — web defaults (desktop density: 24/28/32/36/40, to
|
|
12
|
-
|
|
16
|
+
match production @atom63/ui). iOS overrides in environment.css. */
|
|
13
17
|
--a63-control-height-xs: calc(var(--a63-space-unit) * 6);
|
|
14
18
|
--a63-control-height-sm: calc(var(--a63-space-unit) * 7);
|
|
15
19
|
--a63-control-height-md: calc(var(--a63-space-unit) * 8);
|
|
16
20
|
--a63-control-height-lg: calc(var(--a63-space-unit) * 9);
|
|
17
21
|
--a63-control-height-xl: calc(var(--a63-space-unit) * 10);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* breaks either the visual or the touch target.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/* Inline padding ramp */
|
|
22
|
+
/* Recipes resolve rendered size at their own use-site:
|
|
23
|
+
max(calc(height * density), size-appropriate min-SIZE)
|
|
24
|
+
Do not cache that formula in a :root custom property. Input, density, and
|
|
25
|
+
design-language axes can be scoped to nested providers; deriving at :root
|
|
26
|
+
would freeze the root values and ignore those local overrides.
|
|
27
|
+
|
|
28
|
+
Floor with --a63-control-min-size (rendered geometry), NOT
|
|
29
|
+
--a63-control-min-target (interaction). The two are separate on purpose —
|
|
30
|
+
see contracts/environment.css. Touch therefore keeps the xs/sm/md ramp
|
|
31
|
+
intact and satisfies the 44px target by expanding the interaction area:
|
|
32
|
+
compact markers (checkbox, radio, switch, slider, badge) via a positioned
|
|
33
|
+
pseudo-element, button-class controls the same way. Square icon buttons are
|
|
34
|
+
NOT an exception — they sit on the rendered ramp like everything else, so a
|
|
35
|
+
32px icon button and a 32px text button line up in the same toolbar row.
|
|
36
|
+
|
|
37
|
+
The button recipe delivers that interaction floor on `::before`. Consumer
|
|
38
|
+
CSS must not paint on, resize, or hide `.a63-Button::before`: it wins the
|
|
39
|
+
cascade at higher specificity than a single consumer class, and silently
|
|
40
|
+
breaks either the visual or the touch target.
|
|
41
|
+
Inline padding ramp */
|
|
42
42
|
--a63-control-padding-inline-xs: var(--a63-space-2);
|
|
43
43
|
--a63-control-padding-inline-sm: var(--a63-space-2_5);
|
|
44
44
|
--a63-control-padding-inline-md: var(--a63-space-3);
|
|
45
45
|
--a63-control-padding-inline-lg: var(--a63-space-3_5);
|
|
46
46
|
--a63-control-padding-inline-xl: var(--a63-space-4);
|
|
47
|
-
|
|
48
47
|
/* Text ramp */
|
|
49
48
|
--a63-control-font-weight: var(--font-weight-medium, 500);
|
|
50
49
|
--a63-control-font-family: var(--font-family-sans);
|
|
51
|
-
--a63-control-text-shadow: none;
|
|
52
50
|
--a63-control-font-size-xs: var(--typography-xs-font-size);
|
|
53
51
|
--a63-control-font-size-sm: var(--typography-xs-font-size);
|
|
54
52
|
--a63-control-font-size-md: var(--typography-sm-font-size);
|
|
55
53
|
--a63-control-font-size-lg: var(--typography-base-font-size);
|
|
56
54
|
--a63-control-font-size-xl: var(--typography-lg-font-size);
|
|
57
|
-
|
|
55
|
+
--a63-control-text-shadow: none;
|
|
58
56
|
/* Icon geometry follows control size, not the compressed text ramp. */
|
|
59
57
|
--a63-control-icon-size-xs: 0.75rem;
|
|
60
58
|
--a63-control-icon-size-sm: 0.875rem;
|
|
61
59
|
--a63-control-icon-size-md: 1rem;
|
|
62
60
|
--a63-control-icon-size-lg: 1.125rem;
|
|
63
61
|
--a63-control-icon-size-xl: 1.25rem;
|
|
64
|
-
|
|
65
62
|
--a63-control-gap: var(--a63-space-2);
|
|
66
63
|
--a63-control-radius: var(--a63-radius-control);
|
|
67
|
-
|
|
68
|
-
/* Row block padding. Rows (Item today; Menu/Command rows are the intended
|
|
69
|
-
next tenants) take their height from content + this padding, floored by the
|
|
70
|
-
control ramp, so a single-line row lands on ~44pt and a two-line row on
|
|
71
|
-
~59pt. Those targets come from our own measurement of shipping iOS apps
|
|
72
|
-
(docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row
|
|
73
|
-
height, so do not cite UIKit cell metrics for them. It lives here rather
|
|
74
|
-
than in the recipe
|
|
75
|
-
because the design-language axis has to retune it (contracts/environment.css)
|
|
76
|
-
and axes own tokens; recipes only read them. */
|
|
77
|
-
--a63-row-padding-block-xs: var(--a63-space-2);
|
|
78
|
-
--a63-row-padding-block-sm: var(--a63-space-3);
|
|
79
|
-
--a63-row-padding-block-md: var(--a63-space-4);
|
|
80
64
|
--a63-control-border-width: 1px;
|
|
81
65
|
/* `0 0 #0000` not `none` — composed into comma-separated box-shadow lists
|
|
82
|
-
|
|
66
|
+
alongside the focus ring, where `none` invalidates the declaration. */
|
|
83
67
|
--a63-control-shadow: 0 0 #0000;
|
|
84
68
|
--a63-control-shadow-active: var(--a63-control-shadow);
|
|
85
69
|
/* Shadow for flat/bordered variants (outline, destructive-outline). Defaults to
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
the regular shadow; a theme can soften it — e.g. aqua drops the bright top rim
|
|
71
|
+
that's too strong on a light fill while keeping a gentle lift. */
|
|
88
72
|
--a63-control-shadow-flat: var(--a63-control-shadow);
|
|
89
73
|
/* How strongly a control's drop shadow is tinted by its own fill colour (0% =
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
neutral shadow). The recipe composes the tinted layer at the button so it
|
|
75
|
+
follows each button's colour; a theme just sets the strength. */
|
|
92
76
|
--a63-control-shadow-tint: 0%;
|
|
93
|
-
--a63-control-gloss: none;
|
|
94
|
-
/* A gloss reflection panel painted in the top of the control (recipe ::after);
|
|
95
|
-
none = no reflection. Themes set a gradient (e.g. aqua's glass highlight). */
|
|
96
|
-
--a63-control-highlight: none;
|
|
97
77
|
--a63-control-focus-ring-width: 3px;
|
|
98
78
|
--a63-control-focus-ring-color: var(--a63-focus-ring);
|
|
99
79
|
--a63-control-feedback-duration: var(--a63-motion-control-feedback-duration);
|
|
100
80
|
--a63-control-feedback-ease: var(--a63-motion-ease-standard);
|
|
101
|
-
|
|
81
|
+
/* Row block padding. Rows (Item today; Menu/Command rows are the intended
|
|
82
|
+
next tenants) take their height from content + this padding, floored by the
|
|
83
|
+
control ramp, so a single-line row lands on ~44pt and a two-line row on
|
|
84
|
+
~59pt. Those targets come from our own measurement of shipping iOS apps
|
|
85
|
+
(docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row
|
|
86
|
+
height, so do not cite UIKit cell metrics for them. It lives here rather
|
|
87
|
+
than in the recipe
|
|
88
|
+
because the design-language axis has to retune it (contracts/environment.css)
|
|
89
|
+
and axes own tokens; recipes only read them. */
|
|
90
|
+
--a63-row-padding-block-xs: var(--a63-space-2);
|
|
91
|
+
--a63-row-padding-block-sm: var(--a63-space-3);
|
|
92
|
+
--a63-row-padding-block-md: var(--a63-space-4);
|
|
102
93
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CSS-native values of the control contract: values with no DTCG type. The rest of
|
|
3
|
+
* the contract is generated from control.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-control-gloss: none;
|
|
9
|
+
/* A gloss reflection panel painted in the top of the control (recipe ::after);
|
|
10
|
+
none = no reflection. Themes set a gradient (e.g. aqua's glass highlight). */
|
|
11
|
+
--a63-control-highlight: none;
|
|
12
|
+
--a63-control-press-transform: translateY(1px);
|
|
13
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Shared control contracts.\n\nComponent recipes consume these first and introduce component-specific\nvariables only for genuinely unique needs. Design language overrides the\nsizing/feedback tokens (see contracts/environment.css); recipes never hardcode\nsizes. Radius comes from the semantic ramp (theme/personalization), not here.",
|
|
3
|
+
"a63": {
|
|
4
|
+
"control": {
|
|
5
|
+
"height": {
|
|
6
|
+
"xs": {
|
|
7
|
+
"$type": "dimension",
|
|
8
|
+
"$value": "{a63.space.unit}",
|
|
9
|
+
"$extensions": {
|
|
10
|
+
"io.atom63.derive": "calc({a63.space.unit} * 6)"
|
|
11
|
+
},
|
|
12
|
+
"$description": "Height ramp (xs..xl) — web defaults (desktop density: 24/28/32/36/40, to\n match production @atom63/ui). iOS overrides in environment.css."
|
|
13
|
+
},
|
|
14
|
+
"sm": {
|
|
15
|
+
"$type": "dimension",
|
|
16
|
+
"$value": "{a63.space.unit}",
|
|
17
|
+
"$extensions": {
|
|
18
|
+
"io.atom63.derive": "calc({a63.space.unit} * 7)"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"md": {
|
|
22
|
+
"$type": "dimension",
|
|
23
|
+
"$value": "{a63.space.unit}",
|
|
24
|
+
"$extensions": {
|
|
25
|
+
"io.atom63.derive": "calc({a63.space.unit} * 8)"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"lg": {
|
|
29
|
+
"$type": "dimension",
|
|
30
|
+
"$value": "{a63.space.unit}",
|
|
31
|
+
"$extensions": {
|
|
32
|
+
"io.atom63.derive": "calc({a63.space.unit} * 9)"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"xl": {
|
|
36
|
+
"$type": "dimension",
|
|
37
|
+
"$value": "{a63.space.unit}",
|
|
38
|
+
"$extensions": {
|
|
39
|
+
"io.atom63.derive": "calc({a63.space.unit} * 10)"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"padding": {
|
|
44
|
+
"inline": {
|
|
45
|
+
"xs": {
|
|
46
|
+
"$type": "dimension",
|
|
47
|
+
"$value": "{a63.space.2}",
|
|
48
|
+
"$description": "Recipes resolve rendered size at their own use-site:\n max(calc(height * density), size-appropriate min-SIZE)\nDo not cache that formula in a :root custom property. Input, density, and\ndesign-language axes can be scoped to nested providers; deriving at :root\nwould freeze the root values and ignore those local overrides.\n\nFloor with --a63-control-min-size (rendered geometry), NOT\n--a63-control-min-target (interaction). The two are separate on purpose —\nsee contracts/environment.css. Touch therefore keeps the xs/sm/md ramp\nintact and satisfies the 44px target by expanding the interaction area:\ncompact markers (checkbox, radio, switch, slider, badge) via a positioned\npseudo-element, button-class controls the same way. Square icon buttons are\nNOT an exception — they sit on the rendered ramp like everything else, so a\n32px icon button and a 32px text button line up in the same toolbar row.\n\nThe button recipe delivers that interaction floor on `::before`. Consumer\nCSS must not paint on, resize, or hide `.a63-Button::before`: it wins the\ncascade at higher specificity than a single consumer class, and silently\nbreaks either the visual or the touch target.\nInline padding ramp"
|
|
49
|
+
},
|
|
50
|
+
"sm": {
|
|
51
|
+
"$type": "dimension",
|
|
52
|
+
"$value": "{a63.space.2_5}"
|
|
53
|
+
},
|
|
54
|
+
"md": {
|
|
55
|
+
"$type": "dimension",
|
|
56
|
+
"$value": "{a63.space.3}"
|
|
57
|
+
},
|
|
58
|
+
"lg": {
|
|
59
|
+
"$type": "dimension",
|
|
60
|
+
"$value": "{a63.space.3_5}"
|
|
61
|
+
},
|
|
62
|
+
"xl": {
|
|
63
|
+
"$type": "dimension",
|
|
64
|
+
"$value": "{a63.space.4}"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"font": {
|
|
69
|
+
"weight": {
|
|
70
|
+
"$type": "dimension",
|
|
71
|
+
"$value": "{font.weight.medium}",
|
|
72
|
+
"$extensions": {
|
|
73
|
+
"io.atom63.derive": "var(--font-weight-medium, 500)"
|
|
74
|
+
},
|
|
75
|
+
"$description": "Text ramp"
|
|
76
|
+
},
|
|
77
|
+
"family": {
|
|
78
|
+
"$type": "dimension",
|
|
79
|
+
"$value": "{font.family.sans}"
|
|
80
|
+
},
|
|
81
|
+
"size": {
|
|
82
|
+
"xs": {
|
|
83
|
+
"$type": "dimension",
|
|
84
|
+
"$value": "{typography.xs.font.size}"
|
|
85
|
+
},
|
|
86
|
+
"sm": {
|
|
87
|
+
"$type": "dimension",
|
|
88
|
+
"$value": "{typography.xs.font.size}"
|
|
89
|
+
},
|
|
90
|
+
"md": {
|
|
91
|
+
"$type": "dimension",
|
|
92
|
+
"$value": "{typography.sm.font.size}"
|
|
93
|
+
},
|
|
94
|
+
"lg": {
|
|
95
|
+
"$type": "dimension",
|
|
96
|
+
"$value": "{typography.base.font.size}"
|
|
97
|
+
},
|
|
98
|
+
"xl": {
|
|
99
|
+
"$type": "dimension",
|
|
100
|
+
"$value": "{typography.lg.font.size}"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"text": {
|
|
105
|
+
"shadow": {
|
|
106
|
+
"$type": "shadow",
|
|
107
|
+
"$value": []
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"icon": {
|
|
111
|
+
"size": {
|
|
112
|
+
"xs": {
|
|
113
|
+
"$type": "dimension",
|
|
114
|
+
"$value": {
|
|
115
|
+
"value": 0.75,
|
|
116
|
+
"unit": "rem"
|
|
117
|
+
},
|
|
118
|
+
"$description": "Icon geometry follows control size, not the compressed text ramp."
|
|
119
|
+
},
|
|
120
|
+
"sm": {
|
|
121
|
+
"$type": "dimension",
|
|
122
|
+
"$value": {
|
|
123
|
+
"value": 0.875,
|
|
124
|
+
"unit": "rem"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"md": {
|
|
128
|
+
"$type": "dimension",
|
|
129
|
+
"$value": {
|
|
130
|
+
"value": 1,
|
|
131
|
+
"unit": "rem"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"lg": {
|
|
135
|
+
"$type": "dimension",
|
|
136
|
+
"$value": {
|
|
137
|
+
"value": 1.125,
|
|
138
|
+
"unit": "rem"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"xl": {
|
|
142
|
+
"$type": "dimension",
|
|
143
|
+
"$value": {
|
|
144
|
+
"value": 1.25,
|
|
145
|
+
"unit": "rem"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"gap": {
|
|
151
|
+
"$type": "dimension",
|
|
152
|
+
"$value": "{a63.space.2}"
|
|
153
|
+
},
|
|
154
|
+
"radius": {
|
|
155
|
+
"$type": "dimension",
|
|
156
|
+
"$value": "{a63.radius.control}"
|
|
157
|
+
},
|
|
158
|
+
"border": {
|
|
159
|
+
"width": {
|
|
160
|
+
"$type": "dimension",
|
|
161
|
+
"$value": {
|
|
162
|
+
"value": 1,
|
|
163
|
+
"unit": "px"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"shadow": {
|
|
168
|
+
"$root": {
|
|
169
|
+
"$type": "shadow",
|
|
170
|
+
"$value": [],
|
|
171
|
+
"$extensions": {
|
|
172
|
+
"io.atom63.derive": "0 0 #0000"
|
|
173
|
+
},
|
|
174
|
+
"$description": "`0 0 #0000` not `none` — composed into comma-separated box-shadow lists\n alongside the focus ring, where `none` invalidates the declaration."
|
|
175
|
+
},
|
|
176
|
+
"active": {
|
|
177
|
+
"$type": "shadow",
|
|
178
|
+
"$value": "{a63.control.shadow}"
|
|
179
|
+
},
|
|
180
|
+
"flat": {
|
|
181
|
+
"$type": "shadow",
|
|
182
|
+
"$value": "{a63.control.shadow}",
|
|
183
|
+
"$description": "Shadow for flat/bordered variants (outline, destructive-outline). Defaults to\n the regular shadow; a theme can soften it — e.g. aqua drops the bright top rim\n that's too strong on a light fill while keeping a gentle lift."
|
|
184
|
+
},
|
|
185
|
+
"tint": {
|
|
186
|
+
"$type": "number",
|
|
187
|
+
"$value": 0,
|
|
188
|
+
"$extensions": {
|
|
189
|
+
"io.atom63.derive": "0%"
|
|
190
|
+
},
|
|
191
|
+
"$description": "How strongly a control's drop shadow is tinted by its own fill colour (0% =\n neutral shadow). The recipe composes the tinted layer at the button so it\n follows each button's colour; a theme just sets the strength."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"focus": {
|
|
195
|
+
"ring": {
|
|
196
|
+
"width": {
|
|
197
|
+
"$type": "dimension",
|
|
198
|
+
"$value": {
|
|
199
|
+
"value": 3,
|
|
200
|
+
"unit": "px"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"color": {
|
|
204
|
+
"$type": "color",
|
|
205
|
+
"$value": "{a63.focus.ring}"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"feedback": {
|
|
210
|
+
"duration": {
|
|
211
|
+
"$type": "duration",
|
|
212
|
+
"$value": "{a63.motion.control.feedback.duration}"
|
|
213
|
+
},
|
|
214
|
+
"ease": {
|
|
215
|
+
"$type": "duration",
|
|
216
|
+
"$value": "{a63.motion.ease.standard}"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"row": {
|
|
221
|
+
"padding": {
|
|
222
|
+
"block": {
|
|
223
|
+
"xs": {
|
|
224
|
+
"$type": "dimension",
|
|
225
|
+
"$value": "{a63.space.2}",
|
|
226
|
+
"$description": "Row block padding. Rows (Item today; Menu/Command rows are the intended\n next tenants) take their height from content + this padding, floored by the\n control ramp, so a single-line row lands on ~44pt and a two-line row on\n ~59pt. Those targets come from our own measurement of shipping iOS apps\n (docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row\n height, so do not cite UIKit cell metrics for them. It lives here rather\n than in the recipe\n because the design-language axis has to retune it (contracts/environment.css)\n and axes own tokens; recipes only read them."
|
|
227
|
+
},
|
|
228
|
+
"sm": {
|
|
229
|
+
"$type": "dimension",
|
|
230
|
+
"$value": "{a63.space.3}"
|
|
231
|
+
},
|
|
232
|
+
"md": {
|
|
233
|
+
"$type": "dimension",
|
|
234
|
+
"$value": "{a63.space.4}"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"$extensions": {
|
|
241
|
+
"io.atom63.css": {
|
|
242
|
+
"imports": ["./control.native.css"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/environment.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
|
* Environment dimensions.
|
|
3
6
|
*
|
|
4
7
|
* Each dimension owns a distinct slice (see packages/styles/README.md — the
|
|
@@ -9,60 +12,66 @@
|
|
|
9
12
|
*
|
|
10
13
|
* Radius, color, and shadow are NOT design-language concerns — they belong to
|
|
11
14
|
* the semantic ramp + theme (personalization). Design language never sets radius.
|
|
15
|
+
*
|
|
16
|
+
* Prevent focus zoom in mobile Safari without inflating non-editable control
|
|
17
|
+
* labels. Editable recipes combine this floor with their normal type token.
|
|
18
|
+
*
|
|
19
|
+
* Density — proportional rhythm
|
|
20
|
+
*
|
|
21
|
+
* Auto-detect coarse pointers. Without this, touch ergonomics only apply when an
|
|
22
|
+
* app explicitly passes `input` to UIProvider — an opt-in almost nothing does, so
|
|
23
|
+
* controls stay at their 24px floor on phones. Declared before the attribute
|
|
24
|
+
* rules below (equal specificity) so an explicit data-a63-input always wins.
|
|
25
|
+
*
|
|
26
|
+
* Input — ergonomics (touch target). Independent of design language.
|
|
27
|
+
*
|
|
28
|
+
* Explicit fine-pointer choices override coarse auto-detection (hybrid devices,
|
|
29
|
+
* or a user who picked "pointer" in the appearance panel on a touchscreen).
|
|
30
|
+
*
|
|
31
|
+
* Design language — component sizing/proportions + interaction feedback only.
|
|
32
|
+
* The base :root (control.css) is the web default; iOS overrides sizing + feel.
|
|
33
|
+
* No radius, color, or touch-target here.
|
|
12
34
|
*/
|
|
35
|
+
@import './environment.native.css';
|
|
13
36
|
|
|
14
37
|
:root {
|
|
15
38
|
--a63-density-scale: 1;
|
|
16
39
|
--a63-editable-font-size-min: 0px;
|
|
17
|
-
--a63-safe-area-top: env(safe-area-inset-top, 0px);
|
|
18
|
-
--a63-safe-area-right: env(safe-area-inset-right, 0px);
|
|
19
|
-
--a63-safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
20
|
-
--a63-safe-area-left: env(safe-area-inset-left, 0px);
|
|
21
|
-
--a63-viewport-height: 100vh;
|
|
22
40
|
/* Two different numbers, deliberately separate:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
- min-size = RENDERED geometry floor. WCAG 2.5.8 pointer minimum (24px).
|
|
42
|
+
Touch raises it only to 32px — the smallest rendered control
|
|
43
|
+
observed in shipping iOS apps (measured 30.6–31.5pt across two
|
|
44
|
+
apps). Apple's Accessibility page publishes an iOS
|
|
45
|
+
minimum control size* of 28x28pt, so a 32pt rendered floor
|
|
46
|
+
sits above the documented minimum and below the 44pt default.
|
|
47
|
+
https://developer.apple.com/design/human-interface-guidelines/accessibility
|
|
48
|
+
- min-target = INTERACTION floor. Touch raises it to 44px per Apple HIG.
|
|
49
|
+
Recipes must floor their height ramp with min-size and expand the touch
|
|
50
|
+
region with min-target. Flooring rendered height with min-target is what
|
|
51
|
+
collapses the xs/sm/md ramp to a single 44px rung on every phone.
|
|
52
|
+
See docs/design-system/web-ios-token-parity.md. */
|
|
35
53
|
--a63-control-min-size: 1.5rem;
|
|
36
54
|
--a63-control-min-size-lg: var(--a63-control-min-size);
|
|
37
55
|
--a63-control-min-size-xl: var(--a63-control-min-size);
|
|
38
56
|
--a63-control-min-target: 1.5rem;
|
|
39
57
|
--a63-control-min-target-lg: var(--a63-control-min-target);
|
|
40
58
|
/* Rendered floor for a full-width ROW (a list/panel row whose whole width is
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
59
|
+
the target), as opposed to a compact control sitting inside one. A row
|
|
60
|
+
cannot borrow the pseudo-element trick: rows live in clipping containers
|
|
61
|
+
(rounded panels, scroll areas) that cut an overhanging pseudo off, so the
|
|
62
|
+
row's own height has to BE the target. 44px on touch — Apple's HIG default,
|
|
63
|
+
and our own measurement of shipping iOS apps put primary rows and
|
|
64
|
+
full-width controls at 42.4-44.1pt (docs/design-system/web-ios-token-parity.md).
|
|
65
|
+
Equal to min-size on fine pointers, so desktop is unchanged. */
|
|
48
66
|
--a63-row-min-size: var(--a63-control-min-size);
|
|
49
67
|
}
|
|
50
68
|
|
|
51
|
-
@supports (height: 100dvh) {
|
|
52
|
-
:root {
|
|
53
|
-
--a63-viewport-height: 100dvh;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Prevent focus zoom in mobile Safari without inflating non-editable control
|
|
58
|
-
labels. Editable recipes combine this floor with their normal type token. */
|
|
59
69
|
@media (max-width: 40rem) {
|
|
60
70
|
:root {
|
|
61
71
|
--a63-editable-font-size-min: 1rem;
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
74
|
|
|
65
|
-
/* Density — proportional rhythm */
|
|
66
75
|
:is([data-a63-density='compact'], [data-density='compact']) {
|
|
67
76
|
--a63-density-scale: 0.9;
|
|
68
77
|
--a63-space-unit: calc(var(--spacing-1) * 0.875);
|
|
@@ -73,10 +82,6 @@
|
|
|
73
82
|
--a63-space-unit: var(--spacing-1);
|
|
74
83
|
}
|
|
75
84
|
|
|
76
|
-
/* Auto-detect coarse pointers. Without this, touch ergonomics only apply when an
|
|
77
|
-
app explicitly passes `input` to UIProvider — an opt-in almost nothing does, so
|
|
78
|
-
controls stay at their 24px floor on phones. Declared before the attribute
|
|
79
|
-
rules below (equal specificity) so an explicit data-a63-input always wins. */
|
|
80
85
|
@media (pointer: coarse) {
|
|
81
86
|
:root {
|
|
82
87
|
--a63-control-min-size: 2rem;
|
|
@@ -89,7 +94,6 @@
|
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
|
|
92
|
-
/* Input — ergonomics (touch target). Independent of design language. */
|
|
93
97
|
:is([data-a63-input='touch'], [data-input='touch']) {
|
|
94
98
|
--a63-control-min-size: 2rem;
|
|
95
99
|
--a63-control-min-size-lg: var(--a63-control-min-size);
|
|
@@ -100,8 +104,6 @@
|
|
|
100
104
|
--a63-row-min-size: 2.75rem;
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
/* Explicit fine-pointer choices override coarse auto-detection (hybrid devices,
|
|
104
|
-
or a user who picked "pointer" in the appearance panel on a touchscreen). */
|
|
105
107
|
:is(
|
|
106
108
|
[data-a63-input='pointer'],
|
|
107
109
|
[data-input='pointer'],
|
|
@@ -117,11 +119,6 @@
|
|
|
117
119
|
--a63-row-min-size: var(--a63-control-min-size);
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
/*
|
|
121
|
-
* Design language — component sizing/proportions + interaction feedback only.
|
|
122
|
-
* The base :root (control.css) is the web default; iOS overrides sizing + feel.
|
|
123
|
-
* No radius, color, or touch-target here.
|
|
124
|
-
*/
|
|
125
122
|
:is([data-a63-design-language='ios'], [data-design-language='ios']) {
|
|
126
123
|
--a63-control-height-xs: calc(var(--a63-space-unit) * 9);
|
|
127
124
|
--a63-control-height-sm: calc(var(--a63-space-unit) * 10);
|
|
@@ -144,12 +141,11 @@
|
|
|
144
141
|
--a63-control-icon-size-md: 1.125rem;
|
|
145
142
|
--a63-control-icon-size-lg: 1.25rem;
|
|
146
143
|
--a63-control-icon-size-xl: 1.375rem;
|
|
147
|
-
--a63-control-press-transform: scale(0.97);
|
|
148
144
|
--a63-control-feedback-ease: var(--a63-motion-ease-emphasized);
|
|
149
145
|
/* Rows stop padding their way to height and let the control ramp floor them,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
so a single-line row lands on 44pt and a two-line row on ~59pt, instead of
|
|
147
|
+
52pt and 75pt. Targets are from our measurement study, not a published
|
|
148
|
+
Apple row height — there isn't one. */
|
|
153
149
|
--a63-row-padding-block-xs: var(--a63-space-1);
|
|
154
150
|
--a63-row-padding-block-sm: var(--a63-space-1_5);
|
|
155
151
|
--a63-row-padding-block-md: var(--a63-space-2);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CSS-native values of the environment contract: values with no DTCG type. The rest of
|
|
3
|
+
* the contract is generated from environment.resolver.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-safe-area-top: env(safe-area-inset-top, 0px);
|
|
9
|
+
--a63-safe-area-right: env(safe-area-inset-right, 0px);
|
|
10
|
+
--a63-safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
11
|
+
--a63-safe-area-left: env(safe-area-inset-left, 0px);
|
|
12
|
+
--a63-viewport-height: 100vh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@supports (height: 100dvh) {
|
|
16
|
+
:root {
|
|
17
|
+
--a63-viewport-height: 100dvh;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:is([data-a63-design-language='ios'], [data-design-language='ios']) {
|
|
22
|
+
--a63-control-press-transform: scale(0.97);
|
|
23
|
+
}
|