@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
@@ -15,6 +15,9 @@
15
15
  "external"
16
16
  ],
17
17
  "material": "None; inherits reading surface",
18
+ "surface": [
19
+ "none"
20
+ ],
18
21
  "geometry": "Underline offset 4px",
19
22
  "semantics": "Native anchor with an href. A link that acts is a button, not a link.",
20
23
  "crystal": "Colour, underline offset, focus ring",
@@ -36,7 +39,10 @@
36
39
  "current",
37
40
  "disabled"
38
41
  ],
39
- "material": "Resin shell with Haze fill",
42
+ "material": "None of its own: a navigation entry is furniture on the panel beneath it. Selection is label weight alone; hover and the current entry take the surface-alt fill",
43
+ "surface": [
44
+ "nav-item"
45
+ ],
40
46
  "geometry": "Pill; minimum 44px target",
41
47
  "semantics": "aria-current=\"page\" for the active destination, never aria-selected",
42
48
  "crystal": "Material, pill geometry, current-location dot, focus ring",
@@ -61,10 +67,18 @@
61
67
  "narrow"
62
68
  ],
63
69
  "material": "Frost panel, Resin active destination",
70
+ "surface": [
71
+ "frost",
72
+ "nav-item"
73
+ ],
64
74
  "geometry": "Panel radius = content radius + 6px",
65
75
  "semantics": "nav landmark with an accessible name; collapsed items keep accessible names",
66
76
  "crystal": "Panel material, collapse geometry, active treatment",
67
77
  "product": "Destination list, routing, collapse persistence",
78
+ "motion": [
79
+ "selection",
80
+ "page-in"
81
+ ],
68
82
  "parity": [
69
83
  "mantine:NavLink",
70
84
  "mui:Drawer",
@@ -82,6 +96,9 @@
82
96
  "focus"
83
97
  ],
84
98
  "material": "Resin plane, Stone label backing, primary fill on the selected destination",
99
+ "surface": [
100
+ "dock"
101
+ ],
85
102
  "geometry": "Pill; 52px minimum destination height",
86
103
  "semantics": "nav landmark; aria-pressed or aria-current on the destination",
87
104
  "crystal": "The single shared plane, label weight for the current entry, elevation",
@@ -107,6 +124,9 @@
107
124
  "current"
108
125
  ],
109
126
  "material": "None; sits on the reading surface",
127
+ "surface": [
128
+ "none"
129
+ ],
110
130
  "geometry": "Separator from the icon set; 44px targets on touch",
111
131
  "semantics": "nav landmark with an ordered list; aria-current=\"page\" on the final crumb",
112
132
  "crystal": "Separator, collapse behaviour, current treatment",
@@ -132,6 +152,9 @@
132
152
  "disabled"
133
153
  ],
134
154
  "material": "Resin strip, primary fill on the selected tab",
155
+ "surface": [
156
+ "resin"
157
+ ],
135
158
  "geometry": "Pill tabs inside a pill strip; 44px minimum",
136
159
  "semantics": "role=tablist/tab/tabpanel with arrow-key, Home and End navigation and aria-selected",
137
160
  "crystal": "Strip material, label weight for the selected tab, focus ring",
@@ -157,10 +180,16 @@
157
180
  "focus"
158
181
  ],
159
182
  "material": "Resin shells with Haze fill",
183
+ "surface": [
184
+ "control"
185
+ ],
160
186
  "geometry": "Pill; 44px minimum target",
161
187
  "semantics": "nav landmark with an accessible name; aria-current=\"page\" on the active page",
162
188
  "crystal": "Pill geometry, current treatment, elision rules",
163
189
  "product": "Page count, routing and the data fetch",
190
+ "motion": [
191
+ "selection"
192
+ ],
164
193
  "parity": [
165
194
  "mantine:Pagination",
166
195
  "mui:Pagination",
@@ -179,10 +208,18 @@
179
208
  "disabled"
180
209
  ],
181
210
  "material": "Resin step markers on a Haze track",
211
+ "surface": [
212
+ "control",
213
+ "haze"
214
+ ],
182
215
  "geometry": "Circular markers; connector 2px",
183
216
  "semantics": "Ordered list; the current step carries aria-current=\"step\"; state is announced in text, not by colour",
184
217
  "crystal": "Marker geometry, connector, state treatment",
185
218
  "product": "Step validation and whether steps are navigable",
219
+ "motion": [
220
+ "selection",
221
+ "page-in"
222
+ ],
186
223
  "parity": [
187
224
  "mantine:Stepper",
188
225
  "mui:Stepper",
@@ -201,6 +238,9 @@
201
238
  "focus"
202
239
  ],
203
240
  "material": "Resin shell",
241
+ "surface": [
242
+ "control"
243
+ ],
204
244
  "geometry": "Pill or circle; 44px minimum",
205
245
  "semantics": "button with aria-expanded and aria-controls, and a real accessible name",
206
246
  "crystal": "Material, geometry, the open/closed icon transition",
@@ -226,6 +266,11 @@
226
266
  "loading"
227
267
  ],
228
268
  "material": "Mirage scrim, Haze decision surface, Resin field shell",
269
+ "surface": [
270
+ "mirage",
271
+ "dialog",
272
+ "field"
273
+ ],
229
274
  "geometry": "Content radius; results list inset 8px",
230
275
  "semantics": "Modal dialog with a combobox; aria-activedescendant for the highlighted result",
231
276
  "crystal": "Overlay material, result row treatment, keyboard hint styling",
@@ -253,6 +298,9 @@
253
298
  "loading"
254
299
  ],
255
300
  "material": "Haze rows on the surrounding surface",
301
+ "surface": [
302
+ "haze"
303
+ ],
256
304
  "geometry": "Indent step 20px; guides use the edge token",
257
305
  "semantics": "role=treegrid/row/gridcell with aria-expanded, aria-level, aria-posinset, aria-setsize and full arrow-key navigation. Not role=tree: a treeitem is a single navigable unit, so it cannot contain the expand control this anatomy requires — treegrid is the pattern ARIA provides for a row that holds its own control. See M-3.",
258
306
  "crystal": "Row treatment, indentation guides, label weight for the selected row",
@@ -276,6 +324,9 @@
276
324
  "pinned"
277
325
  ],
278
326
  "material": "Resin once pinned, to separate it from the content it floats over",
327
+ "surface": [
328
+ "resin"
329
+ ],
279
330
  "geometry": "Inherits the pinned element's geometry",
280
331
  "semantics": "Must not cover the focused element or the final content",
281
332
  "crystal": "The material change on pin and the elevation it takes",
@@ -297,10 +348,17 @@
297
348
  "focus-visible"
298
349
  ],
299
350
  "material": "Resin plane holding Haze label fills",
351
+ "surface": [
352
+ "dock"
353
+ ],
300
354
  "geometry": "Pill; targets at least 44px; respects the safe area.",
301
355
  "semantics": "role=\"navigation\"; the current destination carries aria-current=\"page\".",
302
356
  "crystal": "Material, geometry, selection by label weight, safe-area inset",
303
357
  "product": "Destinations and routing",
358
+ "motion": [
359
+ "selection",
360
+ "page-in"
361
+ ],
304
362
  "parity": [
305
363
  "mui:BottomNavigation"
306
364
  ]
@@ -315,10 +373,18 @@
315
373
  "focus-visible"
316
374
  ],
317
375
  "material": "Trigger inherits; panel is Frost",
376
+ "surface": [
377
+ "none",
378
+ "frost"
379
+ ],
318
380
  "geometry": "Panel radius = content radius + 6px.",
319
381
  "semantics": "Menubar semantics; arrow keys move between triggers, Escape closes.",
320
382
  "crystal": "Panel material, motion, focus handling",
321
383
  "product": "Menu structure and content",
384
+ "motion": [
385
+ "menu-in",
386
+ "menu-out"
387
+ ],
322
388
  "parity": [
323
389
  "primereact:navigationmenu",
324
390
  "antd:Menu"
@@ -334,10 +400,16 @@
334
400
  "focus-visible"
335
401
  ],
336
402
  "material": "Haze content fill",
403
+ "surface": [
404
+ "haze"
405
+ ],
337
406
  "geometry": "Indentation follows heading depth; label weight marks the active entry.",
338
407
  "semantics": "role=\"navigation\" with an accessible name; the active entry uses aria-current=\"location\".",
339
408
  "crystal": "Active marking by label weight, spacing",
340
409
  "product": "Which headings are collected, scroll spy thresholds",
410
+ "motion": [
411
+ "selection"
412
+ ],
341
413
  "parity": [
342
414
  "mantine:TableOfContents"
343
415
  ]
@@ -352,10 +424,18 @@
352
424
  "focus-visible"
353
425
  ],
354
426
  "material": "Bar inherits; menus are Frost",
427
+ "surface": [
428
+ "none",
429
+ "frost"
430
+ ],
355
431
  "geometry": "Triggers are pills; menus keep panel radius.",
356
432
  "semantics": "Menubar semantics: arrows move between triggers, Home and End jump, typeahead selects.",
357
433
  "crystal": "Materials, open and close motion, focus handling",
358
434
  "product": "Menu structure and actions",
435
+ "motion": [
436
+ "menu-in",
437
+ "menu-out"
438
+ ],
359
439
  "parity": [
360
440
  "react-aria:Menu",
361
441
  "primereact:menubar",
@@ -372,10 +452,17 @@
372
452
  "focus-visible"
373
453
  ],
374
454
  "material": "Frost panel",
455
+ "surface": [
456
+ "frost"
457
+ ],
375
458
  "geometry": "Offset from its parent item; flips at the viewport edge.",
376
459
  "semantics": "The parent item carries aria-haspopup and aria-expanded; the submenu is reachable by arrow key and closes with Escape without closing its parent.",
377
460
  "crystal": "Panel material, stagger, edge flipping",
378
461
  "product": "Nesting depth and content",
462
+ "motion": [
463
+ "menu-in",
464
+ "menu-out"
465
+ ],
379
466
  "parity": [
380
467
  "react-aria:SubmenuTrigger",
381
468
  "primereact:tieredmenu"
@@ -16,6 +16,9 @@
16
16
  "loading"
17
17
  ],
18
18
  "material": "Resin shell with Haze fill; the fill is neutral by default, the primary colour on .primary, and absent on .quiet. A danger boundary on .danger",
19
+ "surface": [
20
+ "control"
21
+ ],
19
22
  "geometry": "Pill (999px); 48px height; 15px/24px padding; 44px minimum target",
20
23
  "semantics": "Native button. A disabled button must not be the only explanation of unavailability.",
21
24
  "crystal": "Material, pill geometry, optical pressure, focus ring, variant hierarchy",
@@ -43,6 +46,9 @@
43
46
  "toggled"
44
47
  ],
45
48
  "material": "Resin shell with Haze fill",
49
+ "surface": [
50
+ "control"
51
+ ],
46
52
  "geometry": "Pill or circle; 44px minimum target regardless of icon size",
47
53
  "semantics": "Requires an accessible name; the icon itself is aria-hidden. Toggles use aria-pressed.",
48
54
  "crystal": "Material, geometry, target floor, focus ring",
@@ -68,10 +74,16 @@
68
74
  "disabled"
69
75
  ],
70
76
  "material": "One shared Resin plane, not one plane per button",
77
+ "surface": [
78
+ "resin"
79
+ ],
71
80
  "geometry": "Pill outer geometry; interior corners square against neighbours",
72
81
  "semantics": "group role with an accessible name when the buttons are related",
73
82
  "crystal": "The shared plane and interior separation",
74
83
  "product": "Which actions are grouped",
84
+ "motion": [
85
+ "press"
86
+ ],
75
87
  "parity": [
76
88
  "mantine:Button.Group",
77
89
  "mui:ButtonGroup",
@@ -90,6 +102,9 @@
90
102
  "disabled"
91
103
  ],
92
104
  "material": "Shared Resin plane with a hairline between the two targets",
105
+ "surface": [
106
+ "resin"
107
+ ],
93
108
  "geometry": "Pill outer geometry; both halves meet the 44px floor independently",
94
109
  "semantics": "Two buttons; the disclosure carries aria-expanded and aria-haspopup=\"menu\"",
95
110
  "crystal": "Shared plane, separation, menu material",
@@ -116,6 +131,9 @@
116
131
  "extended"
117
132
  ],
118
133
  "material": "Resin with the clearest floating shadow",
134
+ "surface": [
135
+ "control"
136
+ ],
119
137
  "geometry": "Circle, or pill when extended with a label",
120
138
  "semantics": "Requires an accessible name; must not cover the final content or the focused element",
121
139
  "crystal": "Material, elevation, extend behaviour, safe-area offset",
@@ -142,6 +160,9 @@
142
160
  "error"
143
161
  ],
144
162
  "material": "Resin shell; the confirmation is a transient label change",
163
+ "surface": [
164
+ "control"
165
+ ],
145
166
  "geometry": "Pill; 44px minimum",
146
167
  "semantics": "The confirmation must reach assistive technology through a live region, not colour alone",
147
168
  "crystal": "Material, the confirmation transition and its timing",
@@ -167,10 +188,16 @@
167
188
  "pressed"
168
189
  ],
169
190
  "material": "Resin shell, quiet variant",
191
+ "surface": [
192
+ "control"
193
+ ],
170
194
  "geometry": "Pill or circle; 44px minimum target",
171
195
  "semantics": "Accessible name naming what closes, not just \"Close\"; Escape must do the same thing",
172
196
  "crystal": "Material, geometry, placement within overlays",
173
197
  "product": "What dismissal does and whether it is destructive",
198
+ "motion": [
199
+ "press"
200
+ ],
174
201
  "parity": [
175
202
  "mantine:CloseButton",
176
203
  "mui:IconButton",
@@ -187,10 +214,16 @@
187
214
  "focus-visible"
188
215
  ],
189
216
  "material": "Resin plane",
217
+ "surface": [
218
+ "resin"
219
+ ],
190
220
  "geometry": "Pill; floats above content with the floating elevation.",
191
221
  "semantics": "role=\"toolbar\"; announces how many items are selected.",
192
222
  "crystal": "Material, entry and exit motion, elevation",
193
223
  "product": "Which actions apply to a selection",
224
+ "motion": [
225
+ "press"
226
+ ],
194
227
  "parity": [
195
228
  "mantine:ActionBar"
196
229
  ]
@@ -206,10 +239,18 @@
206
239
  "focus-visible"
207
240
  ],
208
241
  "material": "Resin trigger and Resin action pills",
242
+ "surface": [
243
+ "control"
244
+ ],
209
245
  "geometry": "Circular trigger; actions are pills; 44px minimum throughout.",
210
246
  "semantics": "The trigger is a button with aria-expanded; actions are labelled, never icon-only without a name.",
211
247
  "crystal": "Material, stagger on expansion, geometry",
212
248
  "product": "Which actions appear and what they do",
249
+ "motion": [
250
+ "press",
251
+ "menu-in",
252
+ "menu-out"
253
+ ],
213
254
  "parity": [
214
255
  "mui:SpeedDial",
215
256
  "primereact:speeddial",