@crystal-ui/core 2.1.0 → 2.2.0

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 (37) hide show
  1. package/assets/crystal-theme.css +15 -0
  2. package/assets/crystal.css +300 -5
  3. package/assets/crystal.js +10 -0
  4. package/assets/motion.js +17 -2
  5. package/assets/tokens.js +1 -1
  6. package/docs/accessibility.md +9 -2
  7. package/docs/adoption.md +3 -1
  8. package/docs/catalogue.md +462 -31
  9. package/docs/components.md +26 -9
  10. package/docs/materials.md +12 -4
  11. package/docs/motion-components.md +11 -6
  12. package/docs/motion.md +10 -2
  13. package/docs/tokens.md +1 -1
  14. package/engines.js +13 -2
  15. package/exports/crystal-tokens.kt +1 -1
  16. package/exports/crystal-tokens.swift +1 -1
  17. package/exports/crystal-tokens.ts +1 -1
  18. package/package.json +2 -1
  19. package/tokens/catalogue/01-layout.json +45 -0
  20. package/tokens/catalogue/02-navigation.json +88 -1
  21. package/tokens/catalogue/03-actions.json +41 -0
  22. package/tokens/catalogue/04-inputs.json +366 -5
  23. package/tokens/catalogue/05-data-display.json +187 -1
  24. package/tokens/catalogue/06-feedback.json +78 -6
  25. package/tokens/catalogue/07-overlays.json +50 -3
  26. package/tokens/catalogue/08-typography.json +54 -0
  27. package/tokens/catalogue/09-utility.json +79 -0
  28. package/tokens/catalogue/10-charts.json +89 -1
  29. package/tokens/catalogue/11-media.json +33 -0
  30. package/tokens/catalogue/12-commerce.json +134 -1
  31. package/tokens/catalogue/13-screens.json +77 -0
  32. package/tokens/catalogue/14-blocks.json +101 -0
  33. package/tokens/catalogue.json +1646 -19
  34. package/tokens/crystal.json +1 -1
  35. package/tokens/crystal.tokens.json +2 -2
  36. package/tokens/motion-recipes.json +124 -0
  37. package/tokens/surfaces.json +167 -0
@@ -11,6 +11,9 @@
11
11
  "at-rest"
12
12
  ],
13
13
  "material": "Inherits",
14
+ "surface": [
15
+ "none"
16
+ ],
14
17
  "geometry": "Tabular figures so a column of prices aligns.",
15
18
  "semantics": "The formatted value is the text content; currency is stated, not implied by a symbol alone.",
16
19
  "crystal": "Figure style and step",
@@ -27,6 +30,9 @@
27
30
  "at-rest"
28
31
  ],
29
32
  "material": "Inherits",
33
+ "surface": [
34
+ "none"
35
+ ],
30
36
  "geometry": "Matches price.",
31
37
  "semantics": "Reads as a sentence rather than two numbers with a dash.",
32
38
  "crystal": "Typography",
@@ -43,10 +49,16 @@
43
49
  "at-rest"
44
50
  ],
45
51
  "material": "Haze fill with a status accent",
52
+ "surface": [
53
+ "haze"
54
+ ],
46
55
  "geometry": "Pill.",
47
56
  "semantics": "States what is reduced from what; a percentage alone is not a claim.",
48
57
  "crystal": "Status tokens, pill geometry",
49
58
  "product": "Discount rules and rounding",
59
+ "motion": [
60
+ "attention"
61
+ ],
50
62
  "parity": [
51
63
  "antd:Tag"
52
64
  ]
@@ -63,10 +75,16 @@
63
75
  "disabled"
64
76
  ],
65
77
  "material": "Resin shell with a Haze well",
78
+ "surface": [
79
+ "field"
80
+ ],
66
81
  "geometry": "Pill; both controls reach 44px.",
67
- "semantics": "A spin button: the value is typable, and the bounds are announced when reached.",
82
+ "semantics": "A typable numeric field: the value is read as its text, and the bounds are announced when reached. Not role=spinbutton — a spin button cannot be focused with VoiceOver, so the role would put the control out of some readers' reach.",
68
83
  "crystal": "Materials, press recipe on each control",
69
84
  "product": "Bounds, step, stock rules",
85
+ "motion": [
86
+ "slider-step"
87
+ ],
70
88
  "parity": [
71
89
  "react-aria:NumberField",
72
90
  "primereact:inputnumber"
@@ -83,10 +101,16 @@
83
101
  "focus-visible"
84
102
  ],
85
103
  "material": "Haze option fills",
104
+ "surface": [
105
+ "haze"
106
+ ],
86
107
  "geometry": "Options are pills; swatch variants are circles.",
87
108
  "semantics": "Unavailable options stay perceivable and say why; selection is label weight, never a check mark.",
88
109
  "crystal": "Option material, selection weight, unavailable treatment",
89
110
  "product": "Variant axes and stock",
111
+ "motion": [
112
+ "selection"
113
+ ],
90
114
  "parity": [
91
115
  "mantine:SegmentedControl"
92
116
  ]
@@ -102,6 +126,9 @@
102
126
  "backorder"
103
127
  ],
104
128
  "material": "Inherits",
129
+ "surface": [
130
+ "none"
131
+ ],
105
132
  "geometry": "Inline with the price or the action.",
106
133
  "semantics": "Words carry the state; status colour reinforces it.",
107
134
  "crystal": "Status tokens",
@@ -121,10 +148,17 @@
121
148
  "unavailable"
122
149
  ],
123
150
  "material": "Haze content fill on the surrounding material",
151
+ "surface": [
152
+ "haze"
153
+ ],
124
154
  "geometry": "Content radius; spacing from the scale.",
125
155
  "semantics": "The whole card is not a link; the name is, and the action is a button. One tab stop each.",
126
156
  "crystal": "Material, media aspect, action geometry, hover recipe",
127
157
  "product": "Which attributes appear",
158
+ "motion": [
159
+ "list-in",
160
+ "list-out"
161
+ ],
128
162
  "parity": [
129
163
  "primereact:card",
130
164
  "mantine:Card"
@@ -140,10 +174,18 @@
140
174
  "focus-visible"
141
175
  ],
142
176
  "material": "Haze thumbnails; Mirage scrim when enlarged",
177
+ "surface": [
178
+ "haze",
179
+ "mirage"
180
+ ],
143
181
  "geometry": "Thumbnails keep the content radius; the viewer is full-bleed within the scrim.",
144
182
  "semantics": "Arrow keys move between items with position announced; zoom is keyboard reachable.",
145
183
  "crystal": "Scrim and thumbnail materials, the transition into the viewer",
146
184
  "product": "The media set",
185
+ "motion": [
186
+ "media-in",
187
+ "selection"
188
+ ],
147
189
  "parity": [
148
190
  "primereact:galleria"
149
191
  ]
@@ -159,10 +201,17 @@
159
201
  "focus-visible"
160
202
  ],
161
203
  "material": "Haze content fill on the surrounding material",
204
+ "surface": [
205
+ "haze"
206
+ ],
162
207
  "geometry": "Content radius; spacing from the scale.",
163
208
  "semantics": "Removal is announced and undoable; quantity changes announce the new subtotal.",
164
209
  "crystal": "Material, the update and remove motion",
165
210
  "product": "Pricing and stock rules",
211
+ "motion": [
212
+ "list-in",
213
+ "list-out"
214
+ ],
166
215
  "parity": [
167
216
  "antd:List.Item"
168
217
  ]
@@ -177,6 +226,9 @@
177
226
  "empty"
178
227
  ],
179
228
  "material": "Haze content fill on the surrounding material",
229
+ "surface": [
230
+ "haze"
231
+ ],
180
232
  "geometry": "Content radius; spacing from the scale.",
181
233
  "semantics": "A description list, so each line is a labelled pair; the total is marked as such.",
182
234
  "crystal": "Material, figure alignment, the motion of a changing total",
@@ -197,10 +249,18 @@
197
249
  "invalid"
198
250
  ],
199
251
  "material": "Haze well in a Resin shell",
252
+ "surface": [
253
+ "field"
254
+ ],
200
255
  "geometry": "Field and action share one pill row.",
201
256
  "semantics": "Success and failure are announced; an applied code is removable.",
202
257
  "crystal": "Materials, field-valid and field-invalid recipes",
203
258
  "product": "Validation and stacking rules",
259
+ "motion": [
260
+ "field-focus",
261
+ "field-invalid",
262
+ "field-valid"
263
+ ],
204
264
  "parity": [
205
265
  "antd:Input.Search"
206
266
  ]
@@ -217,10 +277,17 @@
217
277
  "focus-visible"
218
278
  ],
219
279
  "material": "Haze step fills",
280
+ "surface": [
281
+ "haze"
282
+ ],
220
283
  "geometry": "Steps are pills; connectors are hairlines.",
221
284
  "semantics": "The current step is aria-current; completion is stated in words, and a check mark here means validated rather than selected.",
222
285
  "crystal": "Step materials, connector treatment, the advance motion",
223
286
  "product": "The steps and their validation",
287
+ "motion": [
288
+ "selection",
289
+ "page-in"
290
+ ],
224
291
  "parity": [
225
292
  "antd:Steps",
226
293
  "mui:Stepper"
@@ -237,10 +304,16 @@
237
304
  "focus-visible"
238
305
  ],
239
306
  "material": "Haze option fills",
307
+ "surface": [
308
+ "haze"
309
+ ],
240
310
  "geometry": "Options keep the content radius; the selected one carries label weight.",
241
311
  "semantics": "A radio group. Card fields are never reimplemented — the host supplies its provider element.",
242
312
  "crystal": "Option material, selection, focus ring",
243
313
  "product": "The provider, tokenisation, and PCI scope — this component never handles raw card data",
314
+ "motion": [
315
+ "selection"
316
+ ],
244
317
  "parity": [
245
318
  "antd:Radio.Group"
246
319
  ]
@@ -256,10 +329,18 @@
256
329
  "submitting"
257
330
  ],
258
331
  "material": "Haze wells in Resin shells",
332
+ "surface": [
333
+ "field"
334
+ ],
259
335
  "geometry": "Fields follow the input geometry.",
260
336
  "semantics": "Field order, labels and required-ness change by country; postcode validation is per-locale, not one regular expression.",
261
337
  "crystal": "Materials, validation recipes",
262
338
  "product": "Countries supported and their field rules",
339
+ "motion": [
340
+ "field-focus",
341
+ "field-invalid",
342
+ "field-valid"
343
+ ],
263
344
  "parity": [
264
345
  "antd:Form"
265
346
  ]
@@ -275,6 +356,9 @@
275
356
  "cancelled"
276
357
  ],
277
358
  "material": "Haze content fill on the surrounding material",
359
+ "surface": [
360
+ "haze"
361
+ ],
278
362
  "geometry": "Content radius; spacing from the scale.",
279
363
  "semantics": "Status is a word; the status colour reinforces it.",
280
364
  "crystal": "Material, status tokens",
@@ -294,10 +378,16 @@
294
378
  "focus-visible"
295
379
  ],
296
380
  "material": "Haze option fills",
381
+ "surface": [
382
+ "haze"
383
+ ],
297
384
  "geometry": "Options keep the content radius.",
298
385
  "semantics": "A radio group; each option states price and estimate together.",
299
386
  "crystal": "Option material, selection weight",
300
387
  "product": "Rates and estimates",
388
+ "motion": [
389
+ "selection"
390
+ ],
301
391
  "parity": [
302
392
  "antd:Radio.Group"
303
393
  ]
@@ -312,6 +402,9 @@
312
402
  "unavailable"
313
403
  ],
314
404
  "material": "Inherits",
405
+ "surface": [
406
+ "none"
407
+ ],
315
408
  "geometry": "Inline.",
316
409
  "semantics": "An absolute date, not only a relative phrase.",
317
410
  "crystal": "Typography and colour",
@@ -331,10 +424,17 @@
331
424
  "focus-visible"
332
425
  ],
333
426
  "material": "Resin pill or icon button",
427
+ "surface": [
428
+ "control"
429
+ ],
334
430
  "geometry": "Pill; 44px target.",
335
431
  "semantics": "A toggle with a pressed state and a name that says what it will do.",
336
432
  "crystal": "Press recipe, the state-change recipe",
337
433
  "product": "Persistence",
434
+ "motion": [
435
+ "press",
436
+ "selection"
437
+ ],
338
438
  "parity": [
339
439
  "mantine:ActionIcon"
340
440
  ]
@@ -348,10 +448,17 @@
348
448
  "expanded"
349
449
  ],
350
450
  "material": "Haze content fill on the surrounding material",
451
+ "surface": [
452
+ "haze"
453
+ ],
351
454
  "geometry": "Content radius; spacing from the scale.",
352
455
  "semantics": "The rating is text as well as stars.",
353
456
  "crystal": "Material, rating rendering, expansion motion",
354
457
  "product": "Moderation and sorting",
458
+ "motion": [
459
+ "list-in",
460
+ "list-out"
461
+ ],
355
462
  "parity": [
356
463
  "primereact:rating"
357
464
  ]
@@ -365,6 +472,9 @@
365
472
  "empty"
366
473
  ],
367
474
  "material": "Haze distribution bars",
475
+ "surface": [
476
+ "haze"
477
+ ],
368
478
  "geometry": "Content radius; spacing from the scale.",
369
479
  "semantics": "The average and the count are both stated; bars are labelled.",
370
480
  "crystal": "Bar material, figure typography",
@@ -384,6 +494,10 @@
384
494
  "focus-visible"
385
495
  ],
386
496
  "material": "Frost panel with Haze groups",
497
+ "surface": [
498
+ "frost",
499
+ "haze"
500
+ ],
387
501
  "geometry": "Panel radius; controls are pills.",
388
502
  "semantics": "Applied filters are announced and individually removable; counts update politely.",
389
503
  "crystal": "Panel and group materials, the apply and clear motion",
@@ -403,10 +517,20 @@
403
517
  "open"
404
518
  ],
405
519
  "material": "Haze well in a Resin shell",
520
+ "surface": [
521
+ "field"
522
+ ],
406
523
  "geometry": "Pill.",
407
524
  "semantics": "A select whose current ordering is announced on change.",
408
525
  "crystal": "Materials, open motion",
409
526
  "product": "The orderings offered",
527
+ "motion": [
528
+ "field-focus",
529
+ "field-invalid",
530
+ "field-valid",
531
+ "menu-in",
532
+ "menu-out"
533
+ ],
410
534
  "parity": [
411
535
  "antd:Select"
412
536
  ]
@@ -420,6 +544,9 @@
420
544
  "focus-visible"
421
545
  ],
422
546
  "material": "Inherits the table surface",
547
+ "surface": [
548
+ "table"
549
+ ],
423
550
  "geometry": "Sticky first column and header; differences are marked, not only coloured.",
424
551
  "semantics": "A real table with row and column headers; differences are stated in text.",
425
552
  "crystal": "Table surface, sticky treatment, difference marking",
@@ -438,10 +565,16 @@
438
565
  "focus-visible"
439
566
  ],
440
567
  "material": "Inherits from its cards",
568
+ "surface": [
569
+ "none"
570
+ ],
441
571
  "geometry": "Scrolls within its own container; never the page.",
442
572
  "semantics": "A labelled list; the strip is keyboard scrollable.",
443
573
  "crystal": "Scroll surface, edge fade from the surrounding material",
444
574
  "product": "Retention and privacy policy",
575
+ "motion": [
576
+ "list-in"
577
+ ],
445
578
  "parity": [
446
579
  "primereact:carousel"
447
580
  ]
@@ -13,6 +13,10 @@
13
13
  "error"
14
14
  ],
15
15
  "material": "Plastic foundation with Frost chrome",
16
+ "surface": [
17
+ "plastic",
18
+ "frost"
19
+ ],
16
20
  "geometry": "Full-bleed; safe areas respected.",
17
21
  "semantics": "One main per view; the heading is the view name.",
18
22
  "crystal": "Region materials, elevation ordering, safe-area handling",
@@ -31,6 +35,9 @@
31
35
  "condensed"
32
36
  ],
33
37
  "material": "Frost band or inherits",
38
+ "surface": [
39
+ "frost"
40
+ ],
34
41
  "geometry": "Actions are pills.",
35
42
  "semantics": "Contains the h1; breadcrumbs are a navigation landmark.",
36
43
  "crystal": "Material, condense behaviour on scroll",
@@ -50,6 +57,9 @@
50
57
  "popping"
51
58
  ],
52
59
  "material": "Inherits per view",
60
+ "surface": [
61
+ "none"
62
+ ],
53
63
  "geometry": "Views enter and leave along the reading direction.",
54
64
  "semantics": "Focus moves to the new view and returns on pop; the back control is a real button.",
55
65
  "crystal": "Enter and exit recipes, focus management",
@@ -72,10 +82,18 @@
72
82
  "narrow"
73
83
  ],
74
84
  "material": "Frost list pane; Haze detail surface",
85
+ "surface": [
86
+ "frost",
87
+ "haze"
88
+ ],
75
89
  "geometry": "Collapses to a stack below the layout breakpoint.",
76
90
  "semantics": "Selection moves focus to the detail only when the layout has collapsed.",
77
91
  "crystal": "Pane materials, the collapse transition",
78
92
  "product": "The data and routing",
93
+ "motion": [
94
+ "page-in",
95
+ "page-out"
96
+ ],
79
97
  "parity": [
80
98
  "antd:Layout"
81
99
  ]
@@ -91,10 +109,16 @@
91
109
  "focus-visible"
92
110
  ],
93
111
  "material": "Inherits per pane",
112
+ "surface": [
113
+ "none"
114
+ ],
94
115
  "geometry": "The divider is a 44px target.",
95
116
  "semantics": "The divider is a separator with a value, resizable by keyboard.",
96
117
  "crystal": "Divider material, focus ring",
97
118
  "product": "Panes and persistence",
119
+ "motion": [
120
+ "resize-settle"
121
+ ],
98
122
  "parity": [
99
123
  "primereact:splitter",
100
124
  "antd:Splitter"
@@ -110,6 +134,9 @@
110
134
  "overflowing"
111
135
  ],
112
136
  "material": "Resin plane",
137
+ "surface": [
138
+ "resin"
139
+ ],
113
140
  "geometry": "Pill; overflow to a menu.",
114
141
  "semantics": "role=\"toolbar\" with one tab stop.",
115
142
  "crystal": "Material, overflow behaviour, press recipes",
@@ -128,6 +155,9 @@
128
155
  "error"
129
156
  ],
130
157
  "material": "Stone backing",
158
+ "surface": [
159
+ "stone"
160
+ ],
131
161
  "geometry": "Full-bleed; text stays crisp.",
132
162
  "semantics": "role=\"status\"; errors escalate to assertive.",
133
163
  "crystal": "Material, status tokens",
@@ -145,6 +175,10 @@
145
175
  "focus-mode"
146
176
  ],
147
177
  "material": "Plastic foundation with Frost panels",
178
+ "surface": [
179
+ "plastic",
180
+ "frost"
181
+ ],
148
182
  "geometry": "Panels keep panel radius.",
149
183
  "semantics": "Each pane is a labelled region; focus order follows the visual order.",
150
184
  "crystal": "Panel materials, pane transitions",
@@ -163,10 +197,17 @@
163
197
  "transitioning"
164
198
  ],
165
199
  "material": "Inherits",
200
+ "surface": [
201
+ "none"
202
+ ],
166
203
  "geometry": "Chrome leaves along its own edge.",
167
204
  "semantics": "Entering and leaving are announced; nothing becomes unreachable, only hidden.",
168
205
  "crystal": "The enter and exit recipes",
169
206
  "product": "What counts as chrome",
207
+ "motion": [
208
+ "page-in",
209
+ "page-out"
210
+ ],
170
211
  "parity": [
171
212
  "mantine:AppShell"
172
213
  ]
@@ -179,10 +220,16 @@
179
220
  "at-rest"
180
221
  ],
181
222
  "material": "Haze content fill on the surrounding material",
223
+ "surface": [
224
+ "haze"
225
+ ],
182
226
  "geometry": "Content radius; spacing from the scale.",
183
227
  "semantics": "Says what would be here and offers the action that creates it.",
184
228
  "crystal": "Material, illustration treatment",
185
229
  "product": "The copy and the action",
230
+ "motion": [
231
+ "empty-in"
232
+ ],
186
233
  "parity": [
187
234
  "antd:Empty",
188
235
  "mantine:Center"
@@ -196,10 +243,16 @@
196
243
  "at-rest"
197
244
  ],
198
245
  "material": "Haze content fill on the surrounding material",
246
+ "surface": [
247
+ "haze"
248
+ ],
199
249
  "geometry": "Content radius; spacing from the scale.",
200
250
  "semantics": "role=\"alert\"; states what failed and what to try, never only a code.",
201
251
  "crystal": "Material, status tokens",
202
252
  "product": "The error taxonomy",
253
+ "motion": [
254
+ "page-in"
255
+ ],
203
256
  "parity": [
204
257
  "antd:Result"
205
258
  ]
@@ -212,10 +265,16 @@
212
265
  "at-rest"
213
266
  ],
214
267
  "material": "Skeletons on the surrounding material",
268
+ "surface": [
269
+ "none"
270
+ ],
215
271
  "geometry": "Skeletons match the shape of what is coming.",
216
272
  "semantics": "aria-busy on the region; the wait is announced once, not repeatedly.",
217
273
  "crystal": "Skeleton material and the reduced-motion contract",
218
274
  "product": "What is loading",
275
+ "motion": [
276
+ "skeleton-resolve"
277
+ ],
219
278
  "parity": [
220
279
  "antd:Skeleton",
221
280
  "mantine:Skeleton"
@@ -230,10 +289,16 @@
230
289
  "reconnecting"
231
290
  ],
232
291
  "material": "Haze content fill on the surrounding material",
292
+ "surface": [
293
+ "haze"
294
+ ],
233
295
  "geometry": "Content radius; spacing from the scale.",
234
296
  "semantics": "Announced politely; retry is a real button.",
235
297
  "crystal": "Material, status tokens",
236
298
  "product": "What is available offline",
299
+ "motion": [
300
+ "page-in"
301
+ ],
237
302
  "parity": [
238
303
  "antd:Result"
239
304
  ]
@@ -246,10 +311,16 @@
246
311
  "at-rest"
247
312
  ],
248
313
  "material": "Haze content fill on the surrounding material",
314
+ "surface": [
315
+ "haze"
316
+ ],
249
317
  "geometry": "Content radius; spacing from the scale.",
250
318
  "semantics": "States what was not found and offers a route onward.",
251
319
  "crystal": "Material",
252
320
  "product": "The copy and the routes",
321
+ "motion": [
322
+ "page-in"
323
+ ],
253
324
  "parity": [
254
325
  "antd:Result"
255
326
  ]
@@ -263,10 +334,16 @@
263
334
  "requesting"
264
335
  ],
265
336
  "material": "Haze content fill on the surrounding material",
337
+ "surface": [
338
+ "haze"
339
+ ],
266
340
  "geometry": "Content radius; spacing from the scale.",
267
341
  "semantics": "Says which permission and why; the request is a real button.",
268
342
  "crystal": "Material, status tokens",
269
343
  "product": "The permission model",
344
+ "motion": [
345
+ "page-in"
346
+ ],
270
347
  "parity": [
271
348
  "antd:Result"
272
349
  ]