@atom63/styles 0.1.0-beta.7 → 0.1.0-beta.8

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.
Files changed (47) hide show
  1. package/README.md +5 -2
  2. package/generated/atom63.figma-sync.json +5303 -3801
  3. package/generated/atom63.tokens.json +7298 -4304
  4. package/package.json +3 -3
  5. package/src/compat/a63-from-shadcn.css +5 -1
  6. package/src/compat/shadcn.css +15 -1
  7. package/src/contracts/choice.css +1 -1
  8. package/src/contracts/choice.tokens.json +1 -1
  9. package/src/contracts/control.css +14 -8
  10. package/src/contracts/control.tokens.json +57 -8
  11. package/src/contracts/environment.css +134 -12
  12. package/src/contracts/environment.resolver.json +664 -23
  13. package/src/contracts/field.css +1 -1
  14. package/src/contracts/field.tokens.json +1 -1
  15. package/src/contracts/selection.css +2 -0
  16. package/src/contracts/selection.tokens.json +5 -0
  17. package/src/contracts/surface.css +4 -0
  18. package/src/contracts/surface.tokens.json +57 -0
  19. package/src/tailwind/roles.json +19 -2
  20. package/src/tailwind/theme.css +104 -2
  21. package/src/tailwind/utilities.css +17 -0
  22. package/src/themes/aqua.css +1 -0
  23. package/src/themes/aqua.resolver.json +6 -0
  24. package/src/themes/retro.css +1 -0
  25. package/src/themes/retro.resolver.json +6 -0
  26. package/src/themes/terminal.css +8 -0
  27. package/src/themes/terminal.resolver.json +37 -0
  28. package/src/tokens/brand-action.css +4 -0
  29. package/src/tokens/brand-action.resolver.json +18 -0
  30. package/src/tokens/contrast.browser.test.ts +40 -16
  31. package/src/tokens/density.browser.test.ts +167 -0
  32. package/src/tokens/form-factor.browser.test.ts +129 -0
  33. package/src/tokens/foundation/primitives.css +0 -30
  34. package/src/tokens/foundation/primitives.tokens.json +0 -212
  35. package/src/tokens/foundation/radius.css +5 -0
  36. package/src/tokens/foundation/radius.tokens.json +8 -0
  37. package/src/tokens/foundation/typography.css +24 -0
  38. package/src/tokens/foundation/typography.native.css +12 -2
  39. package/src/tokens/foundation/typography.resolver.json +72 -0
  40. package/src/tokens/index.css +1 -0
  41. package/src/tokens/personalization-axes.browser.test.ts +13 -0
  42. package/src/tokens/semantics.css +104 -5
  43. package/src/tokens/semantics.resolver.json +253 -11
  44. package/src/tokens/surface.css +8 -0
  45. package/src/tokens/surface.resolver.json +49 -0
  46. package/src/tokens/type-roles.css +75 -0
  47. package/src/tokens/type-roles.resolver.json +366 -0
@@ -32,6 +32,9 @@
32
32
  --surface-dark-10: var(--color-n1-dark-10);
33
33
  --surface-dark-11: var(--color-n1-dark-11);
34
34
  --surface-dark-12: var(--color-n1-dark-12);
35
+ /* An opaque dark neutral for media areas (players, lightboxes, posters). It follows the
36
+ surface palette but not the mode: media reads on dark in both. */
37
+ --a63-media-surface: var(--surface-dark-2);
35
38
  }
36
39
 
37
40
  [data-a63-surface='n2'] {
@@ -59,6 +62,7 @@
59
62
  --surface-dark-10: var(--color-n2-dark-10);
60
63
  --surface-dark-11: var(--color-n2-dark-11);
61
64
  --surface-dark-12: var(--color-n2-dark-12);
65
+ --a63-media-surface: var(--surface-dark-2);
62
66
  }
63
67
 
64
68
  [data-a63-surface='n3'] {
@@ -86,6 +90,7 @@
86
90
  --surface-dark-10: var(--color-n3-dark-10);
87
91
  --surface-dark-11: var(--color-n3-dark-11);
88
92
  --surface-dark-12: var(--color-n3-dark-12);
93
+ --a63-media-surface: var(--surface-dark-2);
89
94
  }
90
95
 
91
96
  [data-a63-surface='n4'] {
@@ -113,6 +118,7 @@
113
118
  --surface-dark-10: var(--color-n4-dark-10);
114
119
  --surface-dark-11: var(--color-n4-dark-11);
115
120
  --surface-dark-12: var(--color-n4-dark-12);
121
+ --a63-media-surface: var(--surface-dark-2);
116
122
  }
117
123
 
118
124
  [data-a63-surface='n5'] {
@@ -140,6 +146,7 @@
140
146
  --surface-dark-10: var(--color-n5-dark-10);
141
147
  --surface-dark-11: var(--color-n5-dark-11);
142
148
  --surface-dark-12: var(--color-n5-dark-12);
149
+ --a63-media-surface: var(--surface-dark-2);
143
150
  }
144
151
 
145
152
  [data-a63-surface='n6'] {
@@ -167,4 +174,5 @@
167
174
  --surface-dark-10: var(--color-n6-dark-10);
168
175
  --surface-dark-11: var(--color-n6-dark-11);
169
176
  --surface-dark-12: var(--color-n6-dark-12);
177
+ --a63-media-surface: var(--surface-dark-2);
170
178
  }
@@ -107,6 +107,15 @@
107
107
  "$value": "{color.n1.dark.12}"
108
108
  }
109
109
  }
110
+ },
111
+ "a63": {
112
+ "media": {
113
+ "surface": {
114
+ "$type": "color",
115
+ "$value": "{surface.dark.2}",
116
+ "$description": "An opaque dark neutral for media areas (players, lightboxes, posters). It follows the\nsurface palette but not the mode: media reads on dark in both."
117
+ }
118
+ }
110
119
  }
111
120
  }
112
121
  ],
@@ -213,6 +222,14 @@
213
222
  "$value": "{color.n2.dark.12}"
214
223
  }
215
224
  }
225
+ },
226
+ "a63": {
227
+ "media": {
228
+ "surface": {
229
+ "$type": "color",
230
+ "$value": "{surface.dark.2}"
231
+ }
232
+ }
216
233
  }
217
234
  }
218
235
  ],
@@ -319,6 +336,14 @@
319
336
  "$value": "{color.n3.dark.12}"
320
337
  }
321
338
  }
339
+ },
340
+ "a63": {
341
+ "media": {
342
+ "surface": {
343
+ "$type": "color",
344
+ "$value": "{surface.dark.2}"
345
+ }
346
+ }
322
347
  }
323
348
  }
324
349
  ],
@@ -425,6 +450,14 @@
425
450
  "$value": "{color.n4.dark.12}"
426
451
  }
427
452
  }
453
+ },
454
+ "a63": {
455
+ "media": {
456
+ "surface": {
457
+ "$type": "color",
458
+ "$value": "{surface.dark.2}"
459
+ }
460
+ }
428
461
  }
429
462
  }
430
463
  ],
@@ -531,6 +564,14 @@
531
564
  "$value": "{color.n5.dark.12}"
532
565
  }
533
566
  }
567
+ },
568
+ "a63": {
569
+ "media": {
570
+ "surface": {
571
+ "$type": "color",
572
+ "$value": "{surface.dark.2}"
573
+ }
574
+ }
534
575
  }
535
576
  }
536
577
  ],
@@ -637,6 +678,14 @@
637
678
  "$value": "{color.n6.dark.12}"
638
679
  }
639
680
  }
681
+ },
682
+ "a63": {
683
+ "media": {
684
+ "surface": {
685
+ "$type": "color",
686
+ "$value": "{surface.dark.2}"
687
+ }
688
+ }
640
689
  }
641
690
  }
642
691
  ]
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Generated from src/tokens/type-roles.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
+ *
5
+ * Text roles, named after the Apple HIG text styles so one intent maps to every platform. Each
6
+ * role takes a step of the web type scale (and so follows the window size and type scale) and
7
+ * records its iOS text style in $extensions["io.atom63.platforms"]; on iOS the role uses that
8
+ * Font.TextStyle and Dynamic Type. -strong is the emphasized weight: bold for the display roles and the three
9
+ * largest titles, semibold for the rest. display and display-large sit above Apple's text
10
+ * styles (for balances, prices and hero headlines); iOS draws them at the same size, scaled with
11
+ * Dynamic Type like largeTitle (AtomDisplayRole, AtomAmountText). Web sizes follow web conventions (body is 15px here, 17pt on
12
+ * iOS); the role, not the number, is what stays the same.
13
+ * A phone screen ([data-a63-form-factor='phone'], which AppView layout="phone" stamps) takes the iOS
14
+ * sizes instead: body 17, subhead 15, footnote 13.
15
+ * The roles are declared on :root, on every [data-window-size] scope and on the phone scope, where the
16
+ * steps they read are redeclared, so a role inside an OS window or a phone screen takes its sizes.
17
+ */
18
+ :root,
19
+ [data-window-size],
20
+ [data-a63-form-factor] {
21
+ /* Display numbers and hero headlines: balances, prices, a score. Above Apple's text styles, so iOS draws the same size scaled like largeTitle: AtomDisplayRole.displayLarge. */
22
+ --a63-type-display-large-font-size: var(--typography-11xl-font-size);
23
+ --a63-type-display-large-line-height: var(--typography-11xl-line-height);
24
+ --a63-type-display-large-font-weight: 600;
25
+ --a63-type-display-large-font-weight-strong: 700;
26
+ /* Display numbers and short headlines one step below display-large. iOS draws the same size scaled like largeTitle: AtomDisplayRole.display. */
27
+ --a63-type-display-font-size: var(--typography-10xl-font-size);
28
+ --a63-type-display-line-height: var(--typography-10xl-line-height);
29
+ --a63-type-display-font-weight: 600;
30
+ --a63-type-display-font-weight-strong: 700;
31
+ --a63-type-large-title-font-size: var(--typography-6xl-font-size);
32
+ --a63-type-large-title-line-height: var(--typography-6xl-line-height);
33
+ --a63-type-large-title-font-weight: 400;
34
+ --a63-type-large-title-font-weight-strong: 700;
35
+ --a63-type-title-1-font-size: var(--typography-5xl-font-size);
36
+ --a63-type-title-1-line-height: var(--typography-5xl-line-height);
37
+ --a63-type-title-1-font-weight: 400;
38
+ --a63-type-title-1-font-weight-strong: 700;
39
+ --a63-type-title-2-font-size: var(--typography-3xl-font-size);
40
+ --a63-type-title-2-line-height: var(--typography-3xl-line-height);
41
+ --a63-type-title-2-font-weight: 400;
42
+ --a63-type-title-2-font-weight-strong: 700;
43
+ --a63-type-title-3-font-size: var(--typography-2xl-font-size);
44
+ --a63-type-title-3-line-height: var(--typography-2xl-line-height);
45
+ --a63-type-title-3-font-weight: 400;
46
+ --a63-type-title-3-font-weight-strong: 600;
47
+ --a63-type-headline-font-size: var(--typography-base-font-size);
48
+ --a63-type-headline-line-height: var(--typography-base-line-height);
49
+ --a63-type-headline-font-weight: 600;
50
+ --a63-type-headline-font-weight-strong: 600;
51
+ --a63-type-body-font-size: var(--typography-base-font-size);
52
+ --a63-type-body-line-height: var(--typography-base-line-height);
53
+ --a63-type-body-font-weight: 400;
54
+ --a63-type-body-font-weight-strong: 600;
55
+ --a63-type-callout-font-size: var(--typography-base-font-size);
56
+ --a63-type-callout-line-height: var(--typography-base-line-height);
57
+ --a63-type-callout-font-weight: 400;
58
+ --a63-type-callout-font-weight-strong: 600;
59
+ --a63-type-subhead-font-size: var(--typography-sm-font-size);
60
+ --a63-type-subhead-line-height: var(--typography-sm-line-height);
61
+ --a63-type-subhead-font-weight: 400;
62
+ --a63-type-subhead-font-weight-strong: 600;
63
+ --a63-type-footnote-font-size: var(--typography-xs-font-size);
64
+ --a63-type-footnote-line-height: var(--typography-xs-line-height);
65
+ --a63-type-footnote-font-weight: 400;
66
+ --a63-type-footnote-font-weight-strong: 600;
67
+ --a63-type-caption-1-font-size: var(--typography-xs-font-size);
68
+ --a63-type-caption-1-line-height: var(--typography-xs-line-height);
69
+ --a63-type-caption-1-font-weight: 400;
70
+ --a63-type-caption-1-font-weight-strong: 600;
71
+ --a63-type-caption-2-font-size: var(--typography-2xs-font-size);
72
+ --a63-type-caption-2-line-height: var(--typography-2xs-line-height);
73
+ --a63-type-caption-2-font-weight: 400;
74
+ --a63-type-caption-2-font-weight-strong: 600;
75
+ }
@@ -0,0 +1,366 @@
1
+ {
2
+ "version": "2025.10",
3
+ "description": "Text roles, named after the Apple HIG text styles so one intent maps to every platform. Each\nrole takes a step of the web type scale (and so follows the window size and type scale) and\nrecords its iOS text style in $extensions[\"io.atom63.platforms\"]; on iOS the role uses that\nFont.TextStyle and Dynamic Type. -strong is the emphasized weight: bold for the display roles and the three\nlargest titles, semibold for the rest. display and display-large sit above Apple's text\nstyles (for balances, prices and hero headlines); iOS draws them at the same size, scaled with\nDynamic Type like largeTitle (AtomDisplayRole, AtomAmountText). Web sizes follow web conventions (body is 15px here, 17pt on\niOS); the role, not the number, is what stays the same.\nA phone screen ([data-a63-form-factor='phone'], which AppView layout=\"phone\" stamps) takes the iOS\nsizes instead: body 17, subhead 15, footnote 13.\nThe roles are declared on :root, on every [data-window-size] scope and on the phone scope, where the\nsteps they read are redeclared, so a role inside an OS window or a phone screen takes its sizes.",
4
+ "sets": {
5
+ "base": {
6
+ "sources": [
7
+ {
8
+ "a63": {
9
+ "type": {
10
+ "display-large": {
11
+ "font-size": {
12
+ "$type": "dimension",
13
+ "$value": "{typography.11xl.font.size}",
14
+ "$description": "Display numbers and hero headlines: balances, prices, a score. Above Apple's text styles, so iOS draws the same size scaled like largeTitle: AtomDisplayRole.displayLarge.",
15
+ "$extensions": {
16
+ "io.atom63.platforms": {
17
+ "ios": {
18
+ "textStyle": "largeTitle",
19
+ "dynamicType": "system"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "line-height": {
25
+ "$type": "dimension",
26
+ "$value": "{typography.11xl.line.height}"
27
+ },
28
+ "font-weight": {
29
+ "$type": "fontWeight",
30
+ "$value": 600
31
+ },
32
+ "font-weight-strong": {
33
+ "$type": "fontWeight",
34
+ "$value": 700
35
+ }
36
+ },
37
+ "display": {
38
+ "font-size": {
39
+ "$type": "dimension",
40
+ "$value": "{typography.10xl.font.size}",
41
+ "$description": "Display numbers and short headlines one step below display-large. iOS draws the same size scaled like largeTitle: AtomDisplayRole.display.",
42
+ "$extensions": {
43
+ "io.atom63.platforms": {
44
+ "ios": {
45
+ "textStyle": "largeTitle",
46
+ "dynamicType": "system"
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "line-height": {
52
+ "$type": "dimension",
53
+ "$value": "{typography.10xl.line.height}"
54
+ },
55
+ "font-weight": {
56
+ "$type": "fontWeight",
57
+ "$value": 600
58
+ },
59
+ "font-weight-strong": {
60
+ "$type": "fontWeight",
61
+ "$value": 700
62
+ }
63
+ },
64
+ "large-title": {
65
+ "font-size": {
66
+ "$type": "dimension",
67
+ "$value": "{typography.6xl.font.size}",
68
+ "$extensions": {
69
+ "io.atom63.platforms": {
70
+ "ios": {
71
+ "textStyle": "largeTitle",
72
+ "dynamicType": "system"
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "line-height": {
78
+ "$type": "dimension",
79
+ "$value": "{typography.6xl.line.height}"
80
+ },
81
+ "font-weight": {
82
+ "$type": "fontWeight",
83
+ "$value": 400
84
+ },
85
+ "font-weight-strong": {
86
+ "$type": "fontWeight",
87
+ "$value": 700
88
+ }
89
+ },
90
+ "title-1": {
91
+ "font-size": {
92
+ "$type": "dimension",
93
+ "$value": "{typography.5xl.font.size}",
94
+ "$extensions": {
95
+ "io.atom63.platforms": {
96
+ "ios": {
97
+ "textStyle": "title",
98
+ "dynamicType": "system"
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "line-height": {
104
+ "$type": "dimension",
105
+ "$value": "{typography.5xl.line.height}"
106
+ },
107
+ "font-weight": {
108
+ "$type": "fontWeight",
109
+ "$value": 400
110
+ },
111
+ "font-weight-strong": {
112
+ "$type": "fontWeight",
113
+ "$value": 700
114
+ }
115
+ },
116
+ "title-2": {
117
+ "font-size": {
118
+ "$type": "dimension",
119
+ "$value": "{typography.3xl.font.size}",
120
+ "$extensions": {
121
+ "io.atom63.platforms": {
122
+ "ios": {
123
+ "textStyle": "title2",
124
+ "dynamicType": "system"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "line-height": {
130
+ "$type": "dimension",
131
+ "$value": "{typography.3xl.line.height}"
132
+ },
133
+ "font-weight": {
134
+ "$type": "fontWeight",
135
+ "$value": 400
136
+ },
137
+ "font-weight-strong": {
138
+ "$type": "fontWeight",
139
+ "$value": 700
140
+ }
141
+ },
142
+ "title-3": {
143
+ "font-size": {
144
+ "$type": "dimension",
145
+ "$value": "{typography.2xl.font.size}",
146
+ "$extensions": {
147
+ "io.atom63.platforms": {
148
+ "ios": {
149
+ "textStyle": "title3",
150
+ "dynamicType": "system"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "line-height": {
156
+ "$type": "dimension",
157
+ "$value": "{typography.2xl.line.height}"
158
+ },
159
+ "font-weight": {
160
+ "$type": "fontWeight",
161
+ "$value": 400
162
+ },
163
+ "font-weight-strong": {
164
+ "$type": "fontWeight",
165
+ "$value": 600
166
+ }
167
+ },
168
+ "headline": {
169
+ "font-size": {
170
+ "$type": "dimension",
171
+ "$value": "{typography.base.font.size}",
172
+ "$extensions": {
173
+ "io.atom63.platforms": {
174
+ "ios": {
175
+ "textStyle": "headline",
176
+ "dynamicType": "system"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "line-height": {
182
+ "$type": "dimension",
183
+ "$value": "{typography.base.line.height}"
184
+ },
185
+ "font-weight": {
186
+ "$type": "fontWeight",
187
+ "$value": 600
188
+ },
189
+ "font-weight-strong": {
190
+ "$type": "fontWeight",
191
+ "$value": 600
192
+ }
193
+ },
194
+ "body": {
195
+ "font-size": {
196
+ "$type": "dimension",
197
+ "$value": "{typography.base.font.size}",
198
+ "$extensions": {
199
+ "io.atom63.platforms": {
200
+ "ios": {
201
+ "textStyle": "body",
202
+ "dynamicType": "system"
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "line-height": {
208
+ "$type": "dimension",
209
+ "$value": "{typography.base.line.height}"
210
+ },
211
+ "font-weight": {
212
+ "$type": "fontWeight",
213
+ "$value": 400
214
+ },
215
+ "font-weight-strong": {
216
+ "$type": "fontWeight",
217
+ "$value": 600
218
+ }
219
+ },
220
+ "callout": {
221
+ "font-size": {
222
+ "$type": "dimension",
223
+ "$value": "{typography.base.font.size}",
224
+ "$extensions": {
225
+ "io.atom63.platforms": {
226
+ "ios": {
227
+ "textStyle": "callout",
228
+ "dynamicType": "system"
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "line-height": {
234
+ "$type": "dimension",
235
+ "$value": "{typography.base.line.height}"
236
+ },
237
+ "font-weight": {
238
+ "$type": "fontWeight",
239
+ "$value": 400
240
+ },
241
+ "font-weight-strong": {
242
+ "$type": "fontWeight",
243
+ "$value": 600
244
+ }
245
+ },
246
+ "subhead": {
247
+ "font-size": {
248
+ "$type": "dimension",
249
+ "$value": "{typography.sm.font.size}",
250
+ "$extensions": {
251
+ "io.atom63.platforms": {
252
+ "ios": {
253
+ "textStyle": "subheadline",
254
+ "dynamicType": "system"
255
+ }
256
+ }
257
+ }
258
+ },
259
+ "line-height": {
260
+ "$type": "dimension",
261
+ "$value": "{typography.sm.line.height}"
262
+ },
263
+ "font-weight": {
264
+ "$type": "fontWeight",
265
+ "$value": 400
266
+ },
267
+ "font-weight-strong": {
268
+ "$type": "fontWeight",
269
+ "$value": 600
270
+ }
271
+ },
272
+ "footnote": {
273
+ "font-size": {
274
+ "$type": "dimension",
275
+ "$value": "{typography.xs.font.size}",
276
+ "$extensions": {
277
+ "io.atom63.platforms": {
278
+ "ios": {
279
+ "textStyle": "footnote",
280
+ "dynamicType": "system"
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "line-height": {
286
+ "$type": "dimension",
287
+ "$value": "{typography.xs.line.height}"
288
+ },
289
+ "font-weight": {
290
+ "$type": "fontWeight",
291
+ "$value": 400
292
+ },
293
+ "font-weight-strong": {
294
+ "$type": "fontWeight",
295
+ "$value": 600
296
+ }
297
+ },
298
+ "caption-1": {
299
+ "font-size": {
300
+ "$type": "dimension",
301
+ "$value": "{typography.xs.font.size}",
302
+ "$extensions": {
303
+ "io.atom63.platforms": {
304
+ "ios": {
305
+ "textStyle": "caption",
306
+ "dynamicType": "system"
307
+ }
308
+ }
309
+ }
310
+ },
311
+ "line-height": {
312
+ "$type": "dimension",
313
+ "$value": "{typography.xs.line.height}"
314
+ },
315
+ "font-weight": {
316
+ "$type": "fontWeight",
317
+ "$value": 400
318
+ },
319
+ "font-weight-strong": {
320
+ "$type": "fontWeight",
321
+ "$value": 600
322
+ }
323
+ },
324
+ "caption-2": {
325
+ "font-size": {
326
+ "$type": "dimension",
327
+ "$value": "{typography.2xs.font.size}",
328
+ "$extensions": {
329
+ "io.atom63.platforms": {
330
+ "ios": {
331
+ "textStyle": "caption2",
332
+ "dynamicType": "system"
333
+ }
334
+ }
335
+ }
336
+ },
337
+ "line-height": {
338
+ "$type": "dimension",
339
+ "$value": "{typography.2xs.line.height}"
340
+ },
341
+ "font-weight": {
342
+ "$type": "fontWeight",
343
+ "$value": 400
344
+ },
345
+ "font-weight-strong": {
346
+ "$type": "fontWeight",
347
+ "$value": 600
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ ],
354
+ "$extensions": {
355
+ "io.atom63.css": {
356
+ "selector": ":root,\n[data-window-size],\n[data-a63-form-factor]"
357
+ }
358
+ }
359
+ }
360
+ },
361
+ "resolutionOrder": [
362
+ {
363
+ "$ref": "#/sets/base"
364
+ }
365
+ ]
366
+ }