@crystal-ui/core 2.1.0 → 2.3.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.
- package/assets/crystal-theme.css +15 -0
- package/assets/crystal.css +652 -12
- package/assets/crystal.js +10 -0
- package/assets/motion.css +3 -3
- package/assets/motion.js +17 -2
- package/assets/tokens.js +1 -1
- package/docs/accessibility.md +19 -3
- package/docs/adoption.md +3 -1
- package/docs/catalogue.md +467 -53
- package/docs/components.md +36 -9
- package/docs/materials.md +12 -4
- package/docs/motion-components.md +11 -8
- package/docs/motion.md +10 -4
- package/docs/tokens.md +3 -2
- package/engines.js +13 -2
- package/exports/crystal-tokens.kt +2 -1
- package/exports/crystal-tokens.swift +2 -1
- package/exports/crystal-tokens.ts +2 -1
- package/package.json +2 -1
- package/tokens/catalogue/01-layout.json +45 -0
- package/tokens/catalogue/02-navigation.json +88 -6
- package/tokens/catalogue/03-actions.json +42 -2
- package/tokens/catalogue/04-inputs.json +359 -5
- package/tokens/catalogue/05-data-display.json +185 -21
- package/tokens/catalogue/06-feedback.json +75 -6
- package/tokens/catalogue/07-overlays.json +52 -5
- package/tokens/catalogue/08-typography.json +54 -0
- package/tokens/catalogue/09-utility.json +79 -0
- package/tokens/catalogue/10-charts.json +89 -1
- package/tokens/catalogue/11-media.json +33 -0
- package/tokens/catalogue/12-commerce.json +133 -1
- package/tokens/catalogue/13-screens.json +77 -0
- package/tokens/catalogue/14-blocks.json +101 -0
- package/tokens/catalogue.json +1656 -48
- package/tokens/crystal.json +3 -2
- package/tokens/crystal.tokens.json +7 -2
- package/tokens/motion-recipes.json +124 -96
- package/tokens/surfaces.json +177 -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,14 +39,16 @@
|
|
|
36
39
|
"current",
|
|
37
40
|
"disabled"
|
|
38
41
|
],
|
|
39
|
-
"material": "
|
|
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",
|
|
43
49
|
"product": "Routing and which destination is current",
|
|
44
50
|
"motion": [
|
|
45
|
-
"
|
|
46
|
-
"page-out"
|
|
51
|
+
"selection"
|
|
47
52
|
],
|
|
48
53
|
"parity": [
|
|
49
54
|
"mantine:NavLink",
|
|
@@ -60,11 +65,18 @@
|
|
|
60
65
|
"collapsed",
|
|
61
66
|
"narrow"
|
|
62
67
|
],
|
|
63
|
-
"material": "Frost panel,
|
|
68
|
+
"material": "Frost panel; its destinations are navigation entries, the current one at weight 800 on the surface-alt fill with the location dot",
|
|
69
|
+
"surface": [
|
|
70
|
+
"frost",
|
|
71
|
+
"nav-item"
|
|
72
|
+
],
|
|
64
73
|
"geometry": "Panel radius = content radius + 6px",
|
|
65
74
|
"semantics": "nav landmark with an accessible name; collapsed items keep accessible names",
|
|
66
75
|
"crystal": "Panel material, collapse geometry, active treatment",
|
|
67
76
|
"product": "Destination list, routing, collapse persistence",
|
|
77
|
+
"motion": [
|
|
78
|
+
"selection"
|
|
79
|
+
],
|
|
68
80
|
"parity": [
|
|
69
81
|
"mantine:NavLink",
|
|
70
82
|
"mui:Drawer",
|
|
@@ -82,13 +94,15 @@
|
|
|
82
94
|
"focus"
|
|
83
95
|
],
|
|
84
96
|
"material": "Resin plane, Stone label backing, primary fill on the selected destination",
|
|
97
|
+
"surface": [
|
|
98
|
+
"dock"
|
|
99
|
+
],
|
|
85
100
|
"geometry": "Pill; 52px minimum destination height",
|
|
86
101
|
"semantics": "nav landmark; aria-pressed or aria-current on the destination",
|
|
87
102
|
"crystal": "The single shared plane, label weight for the current entry, elevation",
|
|
88
103
|
"product": "Destinations and routing",
|
|
89
104
|
"motion": [
|
|
90
|
-
"selection"
|
|
91
|
-
"page-in"
|
|
105
|
+
"selection"
|
|
92
106
|
],
|
|
93
107
|
"parity": [
|
|
94
108
|
"mui:BottomNavigation",
|
|
@@ -107,6 +121,9 @@
|
|
|
107
121
|
"current"
|
|
108
122
|
],
|
|
109
123
|
"material": "None; sits on the reading surface",
|
|
124
|
+
"surface": [
|
|
125
|
+
"none"
|
|
126
|
+
],
|
|
110
127
|
"geometry": "Separator from the icon set; 44px targets on touch",
|
|
111
128
|
"semantics": "nav landmark with an ordered list; aria-current=\"page\" on the final crumb",
|
|
112
129
|
"crystal": "Separator, collapse behaviour, current treatment",
|
|
@@ -132,6 +149,9 @@
|
|
|
132
149
|
"disabled"
|
|
133
150
|
],
|
|
134
151
|
"material": "Resin strip, primary fill on the selected tab",
|
|
152
|
+
"surface": [
|
|
153
|
+
"dock"
|
|
154
|
+
],
|
|
135
155
|
"geometry": "Pill tabs inside a pill strip; 44px minimum",
|
|
136
156
|
"semantics": "role=tablist/tab/tabpanel with arrow-key, Home and End navigation and aria-selected",
|
|
137
157
|
"crystal": "Strip material, label weight for the selected tab, focus ring",
|
|
@@ -157,10 +177,16 @@
|
|
|
157
177
|
"focus"
|
|
158
178
|
],
|
|
159
179
|
"material": "Resin shells with Haze fill",
|
|
180
|
+
"surface": [
|
|
181
|
+
"control"
|
|
182
|
+
],
|
|
160
183
|
"geometry": "Pill; 44px minimum target",
|
|
161
184
|
"semantics": "nav landmark with an accessible name; aria-current=\"page\" on the active page",
|
|
162
185
|
"crystal": "Pill geometry, current treatment, elision rules",
|
|
163
186
|
"product": "Page count, routing and the data fetch",
|
|
187
|
+
"motion": [
|
|
188
|
+
"selection"
|
|
189
|
+
],
|
|
164
190
|
"parity": [
|
|
165
191
|
"mantine:Pagination",
|
|
166
192
|
"mui:Pagination",
|
|
@@ -179,10 +205,17 @@
|
|
|
179
205
|
"disabled"
|
|
180
206
|
],
|
|
181
207
|
"material": "Resin step markers on a Haze track",
|
|
208
|
+
"surface": [
|
|
209
|
+
"control",
|
|
210
|
+
"haze"
|
|
211
|
+
],
|
|
182
212
|
"geometry": "Circular markers; connector 2px",
|
|
183
213
|
"semantics": "Ordered list; the current step carries aria-current=\"step\"; state is announced in text, not by colour",
|
|
184
214
|
"crystal": "Marker geometry, connector, state treatment",
|
|
185
215
|
"product": "Step validation and whether steps are navigable",
|
|
216
|
+
"motion": [
|
|
217
|
+
"selection"
|
|
218
|
+
],
|
|
186
219
|
"parity": [
|
|
187
220
|
"mantine:Stepper",
|
|
188
221
|
"mui:Stepper",
|
|
@@ -201,6 +234,9 @@
|
|
|
201
234
|
"focus"
|
|
202
235
|
],
|
|
203
236
|
"material": "Resin shell",
|
|
237
|
+
"surface": [
|
|
238
|
+
"control"
|
|
239
|
+
],
|
|
204
240
|
"geometry": "Pill or circle; 44px minimum",
|
|
205
241
|
"semantics": "button with aria-expanded and aria-controls, and a real accessible name",
|
|
206
242
|
"crystal": "Material, geometry, the open/closed icon transition",
|
|
@@ -226,6 +262,11 @@
|
|
|
226
262
|
"loading"
|
|
227
263
|
],
|
|
228
264
|
"material": "Mirage scrim, Haze decision surface, Resin field shell",
|
|
265
|
+
"surface": [
|
|
266
|
+
"mirage",
|
|
267
|
+
"dialog",
|
|
268
|
+
"field"
|
|
269
|
+
],
|
|
229
270
|
"geometry": "Content radius; results list inset 8px",
|
|
230
271
|
"semantics": "Modal dialog with a combobox; aria-activedescendant for the highlighted result",
|
|
231
272
|
"crystal": "Overlay material, result row treatment, keyboard hint styling",
|
|
@@ -253,6 +294,9 @@
|
|
|
253
294
|
"loading"
|
|
254
295
|
],
|
|
255
296
|
"material": "Haze rows on the surrounding surface",
|
|
297
|
+
"surface": [
|
|
298
|
+
"haze"
|
|
299
|
+
],
|
|
256
300
|
"geometry": "Indent step 20px; guides use the edge token",
|
|
257
301
|
"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
302
|
"crystal": "Row treatment, indentation guides, label weight for the selected row",
|
|
@@ -276,6 +320,9 @@
|
|
|
276
320
|
"pinned"
|
|
277
321
|
],
|
|
278
322
|
"material": "Resin once pinned, to separate it from the content it floats over",
|
|
323
|
+
"surface": [
|
|
324
|
+
"resin"
|
|
325
|
+
],
|
|
279
326
|
"geometry": "Inherits the pinned element's geometry",
|
|
280
327
|
"semantics": "Must not cover the focused element or the final content",
|
|
281
328
|
"crystal": "The material change on pin and the elevation it takes",
|
|
@@ -297,10 +344,16 @@
|
|
|
297
344
|
"focus-visible"
|
|
298
345
|
],
|
|
299
346
|
"material": "Resin plane holding Haze label fills",
|
|
347
|
+
"surface": [
|
|
348
|
+
"dock"
|
|
349
|
+
],
|
|
300
350
|
"geometry": "Pill; targets at least 44px; respects the safe area.",
|
|
301
351
|
"semantics": "role=\"navigation\"; the current destination carries aria-current=\"page\".",
|
|
302
352
|
"crystal": "Material, geometry, selection by label weight, safe-area inset",
|
|
303
353
|
"product": "Destinations and routing",
|
|
354
|
+
"motion": [
|
|
355
|
+
"selection"
|
|
356
|
+
],
|
|
304
357
|
"parity": [
|
|
305
358
|
"mui:BottomNavigation"
|
|
306
359
|
]
|
|
@@ -315,10 +368,18 @@
|
|
|
315
368
|
"focus-visible"
|
|
316
369
|
],
|
|
317
370
|
"material": "Trigger inherits; panel is Frost",
|
|
371
|
+
"surface": [
|
|
372
|
+
"none",
|
|
373
|
+
"frost"
|
|
374
|
+
],
|
|
318
375
|
"geometry": "Panel radius = content radius + 6px.",
|
|
319
376
|
"semantics": "Menubar semantics; arrow keys move between triggers, Escape closes.",
|
|
320
377
|
"crystal": "Panel material, motion, focus handling",
|
|
321
378
|
"product": "Menu structure and content",
|
|
379
|
+
"motion": [
|
|
380
|
+
"menu-in",
|
|
381
|
+
"menu-out"
|
|
382
|
+
],
|
|
322
383
|
"parity": [
|
|
323
384
|
"primereact:navigationmenu",
|
|
324
385
|
"antd:Menu"
|
|
@@ -334,10 +395,16 @@
|
|
|
334
395
|
"focus-visible"
|
|
335
396
|
],
|
|
336
397
|
"material": "Haze content fill",
|
|
398
|
+
"surface": [
|
|
399
|
+
"haze"
|
|
400
|
+
],
|
|
337
401
|
"geometry": "Indentation follows heading depth; label weight marks the active entry.",
|
|
338
402
|
"semantics": "role=\"navigation\" with an accessible name; the active entry uses aria-current=\"location\".",
|
|
339
403
|
"crystal": "Active marking by label weight, spacing",
|
|
340
404
|
"product": "Which headings are collected, scroll spy thresholds",
|
|
405
|
+
"motion": [
|
|
406
|
+
"selection"
|
|
407
|
+
],
|
|
341
408
|
"parity": [
|
|
342
409
|
"mantine:TableOfContents"
|
|
343
410
|
]
|
|
@@ -352,10 +419,18 @@
|
|
|
352
419
|
"focus-visible"
|
|
353
420
|
],
|
|
354
421
|
"material": "Bar inherits; menus are Frost",
|
|
422
|
+
"surface": [
|
|
423
|
+
"none",
|
|
424
|
+
"frost"
|
|
425
|
+
],
|
|
355
426
|
"geometry": "Triggers are pills; menus keep panel radius.",
|
|
356
427
|
"semantics": "Menubar semantics: arrows move between triggers, Home and End jump, typeahead selects.",
|
|
357
428
|
"crystal": "Materials, open and close motion, focus handling",
|
|
358
429
|
"product": "Menu structure and actions",
|
|
430
|
+
"motion": [
|
|
431
|
+
"menu-in",
|
|
432
|
+
"menu-out"
|
|
433
|
+
],
|
|
359
434
|
"parity": [
|
|
360
435
|
"react-aria:Menu",
|
|
361
436
|
"primereact:menubar",
|
|
@@ -372,10 +447,17 @@
|
|
|
372
447
|
"focus-visible"
|
|
373
448
|
],
|
|
374
449
|
"material": "Frost panel",
|
|
450
|
+
"surface": [
|
|
451
|
+
"frost"
|
|
452
|
+
],
|
|
375
453
|
"geometry": "Offset from its parent item; flips at the viewport edge.",
|
|
376
454
|
"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
455
|
"crystal": "Panel material, stagger, edge flipping",
|
|
378
456
|
"product": "Nesting depth and content",
|
|
457
|
+
"motion": [
|
|
458
|
+
"menu-in",
|
|
459
|
+
"menu-out"
|
|
460
|
+
],
|
|
379
461
|
"parity": [
|
|
380
462
|
"react-aria:SubmenuTrigger",
|
|
381
463
|
"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
|
+
"group"
|
|
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
|
+
"group"
|
|
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,13 +131,15 @@
|
|
|
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",
|
|
122
140
|
"product": "The action and when it is present",
|
|
123
141
|
"motion": [
|
|
124
|
-
"press"
|
|
125
|
-
"resin-confluence"
|
|
142
|
+
"press"
|
|
126
143
|
],
|
|
127
144
|
"parity": [
|
|
128
145
|
"mui:Fab",
|
|
@@ -142,6 +159,9 @@
|
|
|
142
159
|
"error"
|
|
143
160
|
],
|
|
144
161
|
"material": "Resin shell; the confirmation is a transient label change",
|
|
162
|
+
"surface": [
|
|
163
|
+
"control"
|
|
164
|
+
],
|
|
145
165
|
"geometry": "Pill; 44px minimum",
|
|
146
166
|
"semantics": "The confirmation must reach assistive technology through a live region, not colour alone",
|
|
147
167
|
"crystal": "Material, the confirmation transition and its timing",
|
|
@@ -167,10 +187,16 @@
|
|
|
167
187
|
"pressed"
|
|
168
188
|
],
|
|
169
189
|
"material": "Resin shell, quiet variant",
|
|
190
|
+
"surface": [
|
|
191
|
+
"control"
|
|
192
|
+
],
|
|
170
193
|
"geometry": "Pill or circle; 44px minimum target",
|
|
171
194
|
"semantics": "Accessible name naming what closes, not just \"Close\"; Escape must do the same thing",
|
|
172
195
|
"crystal": "Material, geometry, placement within overlays",
|
|
173
196
|
"product": "What dismissal does and whether it is destructive",
|
|
197
|
+
"motion": [
|
|
198
|
+
"press"
|
|
199
|
+
],
|
|
174
200
|
"parity": [
|
|
175
201
|
"mantine:CloseButton",
|
|
176
202
|
"mui:IconButton",
|
|
@@ -187,10 +213,16 @@
|
|
|
187
213
|
"focus-visible"
|
|
188
214
|
],
|
|
189
215
|
"material": "Resin plane",
|
|
216
|
+
"surface": [
|
|
217
|
+
"dock"
|
|
218
|
+
],
|
|
190
219
|
"geometry": "Pill; floats above content with the floating elevation.",
|
|
191
220
|
"semantics": "role=\"toolbar\"; announces how many items are selected.",
|
|
192
221
|
"crystal": "Material, entry and exit motion, elevation",
|
|
193
222
|
"product": "Which actions apply to a selection",
|
|
223
|
+
"motion": [
|
|
224
|
+
"press"
|
|
225
|
+
],
|
|
194
226
|
"parity": [
|
|
195
227
|
"mantine:ActionBar"
|
|
196
228
|
]
|
|
@@ -206,10 +238,18 @@
|
|
|
206
238
|
"focus-visible"
|
|
207
239
|
],
|
|
208
240
|
"material": "Resin trigger and Resin action pills",
|
|
241
|
+
"surface": [
|
|
242
|
+
"control"
|
|
243
|
+
],
|
|
209
244
|
"geometry": "Circular trigger; actions are pills; 44px minimum throughout.",
|
|
210
245
|
"semantics": "The trigger is a button with aria-expanded; actions are labelled, never icon-only without a name.",
|
|
211
246
|
"crystal": "Material, stagger on expansion, geometry",
|
|
212
247
|
"product": "Which actions appear and what they do",
|
|
248
|
+
"motion": [
|
|
249
|
+
"press",
|
|
250
|
+
"menu-in",
|
|
251
|
+
"menu-out"
|
|
252
|
+
],
|
|
213
253
|
"parity": [
|
|
214
254
|
"mui:SpeedDial",
|
|
215
255
|
"primereact:speeddial",
|