@atom63/styles 0.1.0-beta.7 → 0.1.0-beta.9
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 +6 -3
- package/generated/atom63.figma-sync.json +5506 -3844
- package/generated/atom63.tokens.json +7536 -4284
- package/package.json +6 -6
- package/src/compat/a63-from-shadcn.css +265 -1
- package/src/compat/shadcn.css +15 -1
- package/src/contracts/choice.css +1 -1
- package/src/contracts/choice.tokens.json +1 -1
- package/src/contracts/control.css +14 -8
- package/src/contracts/control.tokens.json +57 -8
- package/src/contracts/environment.css +134 -12
- package/src/contracts/environment.resolver.json +664 -23
- package/src/contracts/field.css +1 -1
- package/src/contracts/field.tokens.json +1 -1
- package/src/contracts/selection.css +2 -0
- package/src/contracts/selection.tokens.json +5 -0
- package/src/contracts/skeleton.css +7 -2
- package/src/contracts/skeleton.resolver.json +21 -30
- package/src/contracts/surface.css +4 -0
- package/src/contracts/surface.tokens.json +57 -0
- package/src/contracts/toggle.css +18 -3
- package/src/contracts/toggle.resolver.json +123 -0
- package/src/tailwind/roles.json +19 -2
- package/src/tailwind/theme.css +104 -2
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +1 -0
- package/src/themes/aqua.resolver.json +6 -0
- package/src/themes/retro.css +1 -0
- package/src/themes/retro.resolver.json +6 -0
- package/src/themes/terminal.css +13 -0
- package/src/themes/terminal.resolver.json +62 -0
- package/src/tokens/brand-action.css +4 -0
- package/src/tokens/brand-action.resolver.json +18 -0
- package/src/tokens/contrast.browser.test.ts +92 -18
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/form-factor.browser.test.ts +129 -0
- package/src/tokens/foundation/primitives.css +0 -30
- package/src/tokens/foundation/primitives.tokens.json +0 -212
- package/src/tokens/foundation/radius.css +5 -0
- package/src/tokens/foundation/radius.tokens.json +8 -0
- package/src/tokens/foundation/typography.css +24 -0
- package/src/tokens/foundation/typography.native.css +12 -2
- package/src/tokens/foundation/typography.resolver.json +72 -0
- package/src/tokens/index.css +1 -0
- package/src/tokens/personalization-axes.browser.test.ts +13 -0
- package/src/tokens/semantics.css +120 -6
- package/src/tokens/semantics.resolver.json +301 -12
- package/src/tokens/surface.css +8 -0
- package/src/tokens/surface.resolver.json +49 -0
- package/src/tokens/type-roles.css +75 -0
- package/src/tokens/type-roles.resolver.json +366 -0
- package/src/contracts/toggle.tokens.json +0 -49
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* Prevent focus zoom in mobile Safari without inflating non-editable control
|
|
17
17
|
* labels. Editable recipes combine this floor with their normal type token.
|
|
18
18
|
*
|
|
19
|
-
* Density — proportional rhythm
|
|
19
|
+
* Density — proportional rhythm. A density scope sets --a63-space-unit, and every :root token
|
|
20
|
+
* built on it (the space steps, control heights and paddings, row padding, gaps) is declared
|
|
21
|
+
* again on [data-a63-density], so a nested scope recomputes them once, the same as the root.
|
|
22
|
+
* The design-language and phone scopes are also declared on a density scope inside them, so
|
|
23
|
+
* it keeps their sizes.
|
|
20
24
|
*
|
|
21
25
|
* Auto-detect coarse pointers. Without this, touch ergonomics only apply when an
|
|
22
26
|
* app explicitly passes `input` to UIProvider — an opt-in almost nothing does, so
|
|
@@ -31,10 +35,16 @@
|
|
|
31
35
|
* Design language — component sizing/proportions + interaction feedback only.
|
|
32
36
|
* The base :root (control.css) is the web default; iOS overrides sizing + feel.
|
|
33
37
|
* No radius, color, or touch-target here.
|
|
38
|
+
*
|
|
39
|
+
* Form factor — a phone screen. [data-a63-form-factor='phone'] sets the type steps and the
|
|
40
|
+
* control sizing of a phone (iOS text sizes: body 17, subheadline 15, footnote 13). Viewport
|
|
41
|
+
* width does not apply it; a phone layout stamps it (AppView layout="phone"). The type roles
|
|
42
|
+
* are redeclared on the same scope (type-roles.css), so text-body and the other roles follow it.
|
|
34
43
|
*/
|
|
35
44
|
@import './environment.native.css';
|
|
36
45
|
|
|
37
46
|
:root {
|
|
47
|
+
/* An extra multiplier recipes apply to control heights. It stays 1 in every density: density reaches sizes through --a63-space-unit, which the control heights are built on, so scaling them again would shrink controls twice. */
|
|
38
48
|
--a63-density-scale: 1;
|
|
39
49
|
--a63-editable-font-size-min: 0px;
|
|
40
50
|
/* Two different numbers, deliberately separate:
|
|
@@ -73,15 +83,48 @@
|
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
:is([data-a63-density='compact'], [data-density='compact']) {
|
|
76
|
-
--a63-density-scale: 0.9;
|
|
77
86
|
--a63-space-unit: calc(var(--spacing-1) * 0.875);
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
:is([data-a63-density='comfortable'], [data-density='comfortable']) {
|
|
81
|
-
--a63-density-scale: 1;
|
|
82
90
|
--a63-space-unit: var(--spacing-1);
|
|
83
91
|
}
|
|
84
92
|
|
|
93
|
+
:is([data-a63-density], [data-density]) {
|
|
94
|
+
--a63-space-1: var(--a63-space-unit);
|
|
95
|
+
--a63-space-2: calc(var(--a63-space-unit) * 2);
|
|
96
|
+
--a63-space-3: calc(var(--a63-space-unit) * 3);
|
|
97
|
+
--a63-space-4: calc(var(--a63-space-unit) * 4);
|
|
98
|
+
--a63-space-5: calc(var(--a63-space-unit) * 5);
|
|
99
|
+
--a63-space-6: calc(var(--a63-space-unit) * 6);
|
|
100
|
+
--a63-space-0_5: calc(var(--a63-space-unit) * 0.5);
|
|
101
|
+
--a63-space-1_5: calc(var(--a63-space-unit) * 1.5);
|
|
102
|
+
--a63-space-2_5: calc(var(--a63-space-unit) * 2.5);
|
|
103
|
+
--a63-space-3_5: calc(var(--a63-space-unit) * 3.5);
|
|
104
|
+
--a63-action-control-gap: var(--a63-control-gap);
|
|
105
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 6), 1px);
|
|
106
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 7), 1px);
|
|
107
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 8), 1px);
|
|
108
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
109
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
110
|
+
--a63-control-padding-inline-xs: var(--a63-space-2);
|
|
111
|
+
--a63-control-padding-inline-sm: var(--a63-space-2_5);
|
|
112
|
+
--a63-control-padding-inline-md: var(--a63-space-3);
|
|
113
|
+
--a63-control-padding-inline-lg: var(--a63-space-3_5);
|
|
114
|
+
--a63-control-padding-inline-xl: var(--a63-space-4);
|
|
115
|
+
--a63-control-gap: var(--a63-space-2);
|
|
116
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-2), 1px);
|
|
117
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-3), 1px);
|
|
118
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-4), 1px);
|
|
119
|
+
--a63-menu-popup-padding: var(--a63-space-1);
|
|
120
|
+
--a63-menu-item-padding-block: var(--a63-space-1_5);
|
|
121
|
+
--a63-menu-item-padding-inline: var(--a63-space-2);
|
|
122
|
+
--a63-menu-item-gap: var(--a63-space-2);
|
|
123
|
+
--a63-menu-gap: var(--a63-space-0_5);
|
|
124
|
+
--a63-toggle-gap: var(--a63-control-gap);
|
|
125
|
+
--a63-trigger-gap: var(--a63-control-gap);
|
|
126
|
+
}
|
|
127
|
+
|
|
85
128
|
@media (pointer: coarse) {
|
|
86
129
|
:root {
|
|
87
130
|
--a63-control-min-size: 2rem;
|
|
@@ -119,12 +162,14 @@
|
|
|
119
162
|
--a63-row-min-size: var(--a63-control-min-size);
|
|
120
163
|
}
|
|
121
164
|
|
|
122
|
-
:is([data-a63-design-language='ios'], [data-design-language='ios'])
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--a63-control-height-
|
|
126
|
-
--a63-control-height-
|
|
127
|
-
--a63-control-height-
|
|
165
|
+
:is([data-a63-design-language='ios'], [data-design-language='ios']),
|
|
166
|
+
:is([data-a63-design-language='ios'], [data-design-language='ios'])
|
|
167
|
+
:is([data-a63-density], [data-density]) {
|
|
168
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
169
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
170
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 11), 1px);
|
|
171
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 12), 1px);
|
|
172
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
128
173
|
--a63-control-padding-inline-xs: var(--a63-space-3);
|
|
129
174
|
--a63-control-padding-inline-sm: var(--a63-space-3_5);
|
|
130
175
|
--a63-control-padding-inline-md: var(--a63-space-4);
|
|
@@ -146,9 +191,86 @@
|
|
|
146
191
|
so a single-line row lands on 44pt and a two-line row on ~59pt, instead of
|
|
147
192
|
52pt and 75pt. Targets are from our measurement study, not a published
|
|
148
193
|
Apple row height — there isn't one. */
|
|
149
|
-
--a63-row-padding-block-xs: var(--a63-space-1);
|
|
150
|
-
--a63-row-padding-block-sm: var(--a63-space-1_5);
|
|
151
|
-
--a63-row-padding-block-md: var(--a63-space-2);
|
|
194
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-1), 1px);
|
|
195
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-1_5), 1px);
|
|
196
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-2), 1px);
|
|
152
197
|
/* Larger, iconic iOS pill switch (web default is 1rem in selection.css). */
|
|
153
198
|
--a63-switch-thumb-size: 1.375rem;
|
|
154
199
|
}
|
|
200
|
+
|
|
201
|
+
[data-a63-form-factor='phone'],
|
|
202
|
+
[data-a63-form-factor='phone'] :is([data-a63-density], [data-density]) {
|
|
203
|
+
/* The type steps of a phone screen, after the iOS text styles at the default Dynamic Type size:
|
|
204
|
+
body 17 (base), subheadline 15 (sm), footnote 13 (xs), caption2 11 (2xs), title3 20 (2xl),
|
|
205
|
+
title2 22 (3xl), title1 28 (5xl), largeTitle 34 (6xl). Steps without an iOS style keep the
|
|
206
|
+
scale in order. Complete, so the phone scope wins over the viewport and window steps. */
|
|
207
|
+
--typography-2xs-font-size: calc(11px * var(--typography-scale, 1));
|
|
208
|
+
--typography-2xs-line-height: calc(13px * var(--typography-scale, 1));
|
|
209
|
+
--typography-xs-font-size: calc(13px * var(--typography-scale, 1));
|
|
210
|
+
--typography-xs-line-height: calc(18px * var(--typography-scale, 1));
|
|
211
|
+
--typography-sm-font-size: calc(15px * var(--typography-scale, 1));
|
|
212
|
+
--typography-sm-line-height: calc(20px * var(--typography-scale, 1));
|
|
213
|
+
--typography-base-font-size: calc(17px * var(--typography-scale, 1));
|
|
214
|
+
--typography-base-line-height: calc(22px * var(--typography-scale, 1));
|
|
215
|
+
--typography-lg-font-size: calc(18px * var(--typography-scale, 1));
|
|
216
|
+
--typography-lg-line-height: calc(24px * var(--typography-scale, 1));
|
|
217
|
+
--typography-xl-font-size: calc(19px * var(--typography-scale, 1));
|
|
218
|
+
--typography-xl-line-height: calc(24px * var(--typography-scale, 1));
|
|
219
|
+
--typography-2xl-font-size: calc(20px * var(--typography-scale, 1));
|
|
220
|
+
--typography-2xl-line-height: calc(25px * var(--typography-scale, 1));
|
|
221
|
+
--typography-3xl-font-size: calc(22px * var(--typography-scale, 1));
|
|
222
|
+
--typography-3xl-line-height: calc(28px * var(--typography-scale, 1));
|
|
223
|
+
--typography-4xl-font-size: calc(25px * var(--typography-scale, 1));
|
|
224
|
+
--typography-4xl-line-height: calc(31px * var(--typography-scale, 1));
|
|
225
|
+
--typography-5xl-font-size: calc(28px * var(--typography-scale, 1));
|
|
226
|
+
--typography-5xl-line-height: calc(34px * var(--typography-scale, 1));
|
|
227
|
+
--typography-6xl-font-size: calc(34px * var(--typography-scale, 1));
|
|
228
|
+
--typography-6xl-line-height: calc(41px * var(--typography-scale, 1));
|
|
229
|
+
--typography-7xl-font-size: calc(36px * var(--typography-scale, 1));
|
|
230
|
+
--typography-7xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
231
|
+
--typography-8xl-font-size: calc(39px * var(--typography-scale, 1));
|
|
232
|
+
--typography-8xl-line-height: calc(49px * var(--typography-scale, 1));
|
|
233
|
+
--typography-9xl-font-size: calc(44px * var(--typography-scale, 1));
|
|
234
|
+
--typography-9xl-line-height: calc(55px * var(--typography-scale, 1));
|
|
235
|
+
--typography-10xl-font-size: calc(40px * var(--typography-scale, 1));
|
|
236
|
+
--typography-10xl-line-height: calc(44px * var(--typography-scale, 1));
|
|
237
|
+
--typography-11xl-font-size: calc(56px * var(--typography-scale, 1));
|
|
238
|
+
--typography-11xl-line-height: calc(60px * var(--typography-scale, 1));
|
|
239
|
+
/* Controls on a phone: the iOS height ramp (36/40/44/48/52), and every standard control label
|
|
240
|
+
at body size (17), as iOS sets buttons, rows, fields and menus. xs stays at footnote size
|
|
241
|
+
for badges, shortcuts and initials. Weight and press feedback stay with the design language. */
|
|
242
|
+
--a63-control-height-xs: round(nearest, calc(var(--a63-space-unit) * 9), 1px);
|
|
243
|
+
--a63-control-height-sm: round(nearest, calc(var(--a63-space-unit) * 10), 1px);
|
|
244
|
+
--a63-control-height-md: round(nearest, calc(var(--a63-space-unit) * 11), 1px);
|
|
245
|
+
--a63-control-height-lg: round(nearest, calc(var(--a63-space-unit) * 12), 1px);
|
|
246
|
+
--a63-control-height-xl: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
247
|
+
--a63-control-padding-inline-xs: var(--a63-space-3);
|
|
248
|
+
--a63-control-padding-inline-sm: var(--a63-space-3_5);
|
|
249
|
+
--a63-control-padding-inline-md: var(--a63-space-4);
|
|
250
|
+
--a63-control-padding-inline-lg: var(--a63-space-5);
|
|
251
|
+
--a63-control-padding-inline-xl: var(--a63-space-6);
|
|
252
|
+
--a63-control-font-size-xs: var(--typography-xs-font-size);
|
|
253
|
+
--a63-control-font-size-sm: var(--typography-base-font-size);
|
|
254
|
+
--a63-control-font-size-md: var(--typography-base-font-size);
|
|
255
|
+
--a63-control-font-size-lg: var(--typography-base-font-size);
|
|
256
|
+
--a63-control-font-size-xl: var(--typography-lg-font-size);
|
|
257
|
+
/* The secondary line under a title or label (an Item, Field or Form description, a Frame or
|
|
258
|
+
ConnectedPanel description): subheadline size (15), so it stays below the 17px title. Declared
|
|
259
|
+
only here; recipes fall back to --a63-control-font-size-sm, so other scopes are unchanged. */
|
|
260
|
+
--a63-control-font-size-secondary: var(--typography-sm-font-size);
|
|
261
|
+
--a63-control-icon-size-xs: 0.875rem;
|
|
262
|
+
--a63-control-icon-size-sm: 1rem;
|
|
263
|
+
--a63-control-icon-size-md: 1.125rem;
|
|
264
|
+
--a63-control-icon-size-lg: 1.25rem;
|
|
265
|
+
--a63-control-icon-size-xl: 1.375rem;
|
|
266
|
+
--a63-row-padding-block-xs: round(nearest, var(--a63-space-1), 1px);
|
|
267
|
+
--a63-row-padding-block-sm: round(nearest, var(--a63-space-1_5), 1px);
|
|
268
|
+
--a63-row-padding-block-md: round(nearest, var(--a63-space-2), 1px);
|
|
269
|
+
/* The switch of a phone (iOS 26): a 22px-tall pill knob 1.6 times as wide, on a track of about 63 by 28, as measured on a 3x iPhone screenshot. The height matches the iOS design language; the wide thumb is the phone's own. */
|
|
270
|
+
--a63-switch-thumb-size: 1.375rem;
|
|
271
|
+
--a63-switch-thumb-aspect: 1.6;
|
|
272
|
+
/* The row of a phone's grouped list (ItemGroup variant="inset", default and sm rows): 52px tall, as iOS 26 Settings and a 3x reference capture both measure (51-52pt). Declared only here; the Item recipe falls back to its control-height floor elsewhere. */
|
|
273
|
+
--a63-inset-row-min-size: round(nearest, calc(var(--a63-space-unit) * 13), 1px);
|
|
274
|
+
/* The corner of a phone's grouped-list card (ItemGroup variant="inset"): the 2xl step (18px at defaults), after a 3x reference capture that fits a 19pt corner. Follows the radius axis. Declared only here; the Item recipe falls back to --radius-lg elsewhere. */
|
|
275
|
+
--a63-inset-group-radius: var(--radius-2xl);
|
|
276
|
+
}
|