@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.
Files changed (38) hide show
  1. package/assets/crystal-theme.css +15 -0
  2. package/assets/crystal.css +652 -12
  3. package/assets/crystal.js +10 -0
  4. package/assets/motion.css +3 -3
  5. package/assets/motion.js +17 -2
  6. package/assets/tokens.js +1 -1
  7. package/docs/accessibility.md +19 -3
  8. package/docs/adoption.md +3 -1
  9. package/docs/catalogue.md +467 -53
  10. package/docs/components.md +36 -9
  11. package/docs/materials.md +12 -4
  12. package/docs/motion-components.md +11 -8
  13. package/docs/motion.md +10 -4
  14. package/docs/tokens.md +3 -2
  15. package/engines.js +13 -2
  16. package/exports/crystal-tokens.kt +2 -1
  17. package/exports/crystal-tokens.swift +2 -1
  18. package/exports/crystal-tokens.ts +2 -1
  19. package/package.json +2 -1
  20. package/tokens/catalogue/01-layout.json +45 -0
  21. package/tokens/catalogue/02-navigation.json +88 -6
  22. package/tokens/catalogue/03-actions.json +42 -2
  23. package/tokens/catalogue/04-inputs.json +359 -5
  24. package/tokens/catalogue/05-data-display.json +185 -21
  25. package/tokens/catalogue/06-feedback.json +75 -6
  26. package/tokens/catalogue/07-overlays.json +52 -5
  27. package/tokens/catalogue/08-typography.json +54 -0
  28. package/tokens/catalogue/09-utility.json +79 -0
  29. package/tokens/catalogue/10-charts.json +89 -1
  30. package/tokens/catalogue/11-media.json +33 -0
  31. package/tokens/catalogue/12-commerce.json +133 -1
  32. package/tokens/catalogue/13-screens.json +77 -0
  33. package/tokens/catalogue/14-blocks.json +101 -0
  34. package/tokens/catalogue.json +1656 -48
  35. package/tokens/crystal.json +3 -2
  36. package/tokens/crystal.tokens.json +7 -2
  37. package/tokens/motion-recipes.json +124 -96
  38. package/tokens/surfaces.json +177 -0
@@ -16,10 +16,17 @@
16
16
  "disabled"
17
17
  ],
18
18
  "material": "Haze, 80% fill with a 1.95px feathered perimeter",
19
+ "surface": [
20
+ "haze"
21
+ ],
19
22
  "geometry": "Content radius; at least 12px between content and the feathered edge",
20
23
  "semantics": "An article when it is content, a button when the whole card acts. Never both.",
21
24
  "crystal": "Fill, feather, elevation, interactive treatment",
22
25
  "product": "Content and what an interactive card does",
26
+ "motion": [
27
+ "list-in",
28
+ "list-out"
29
+ ],
23
30
  "parity": [
24
31
  "mantine:Card",
25
32
  "mui:Card",
@@ -39,10 +46,18 @@
39
46
  "loading"
40
47
  ],
41
48
  "material": "Resin shell, Haze fill, primary-soft header",
49
+ "surface": [
50
+ "table"
51
+ ],
42
52
  "geometry": "Content radius shell; header corners inset 8px; 14px/18px cells",
43
53
  "semantics": "Real table semantics with header associations; sort controls are buttons carrying aria-sort",
44
54
  "crystal": "Shell, header band, separators, sticky behaviour, reduced-effect fallbacks",
45
55
  "product": "Data, sorting, pagination and selection behaviour",
56
+ "motion": [
57
+ "list-in",
58
+ "list-out",
59
+ "highlight"
60
+ ],
46
61
  "parity": [
47
62
  "mantine:Table",
48
63
  "mui:Table",
@@ -63,10 +78,18 @@
63
78
  "error"
64
79
  ],
65
80
  "material": "Shared with Table; selection uses label weight, not a check badge on the row",
81
+ "surface": [
82
+ "table"
83
+ ],
66
84
  "geometry": "Shared with Table",
67
85
  "semantics": "aria-sort on sorted headers; row selection through real checkboxes with names",
68
86
  "crystal": "All Table treatment plus sort, filter and selection appearance",
69
87
  "product": "The data layer, virtualisation, and the sorting and filtering implementation",
88
+ "motion": [
89
+ "list-in",
90
+ "list-out",
91
+ "highlight"
92
+ ],
70
93
  "parity": [
71
94
  "mui:DataGrid",
72
95
  "antd:Table",
@@ -85,6 +108,9 @@
85
108
  "empty"
86
109
  ],
87
110
  "material": "Haze rows on the surrounding surface",
111
+ "surface": [
112
+ "haze"
113
+ ],
88
114
  "geometry": "Content radius on rows; separators are hairlines",
89
115
  "semantics": "Real list semantics; interactive rows are buttons or links, not clickable divs",
90
116
  "crystal": "Row treatment, separators, label weight for the selected row",
@@ -109,6 +135,9 @@
109
135
  "empty"
110
136
  ],
111
137
  "material": "Haze panel when grouped",
138
+ "surface": [
139
+ "haze"
140
+ ],
112
141
  "geometry": "Content radius; term column aligned to the 4px rhythm",
113
142
  "semantics": "Real definition-list semantics so term and value stay associated",
114
143
  "crystal": "Pair rhythm and panel treatment",
@@ -131,6 +160,9 @@
131
160
  "error"
132
161
  ],
133
162
  "material": "Surface-alt fill behind initials; 2px surface ring for separation",
163
+ "surface": [
164
+ "none"
165
+ ],
134
166
  "geometry": "Always circular; sizes on the 4px rhythm",
135
167
  "semantics": "Decorative avatars are aria-hidden; identifying avatars carry the person's name",
136
168
  "crystal": "Shape, ring, fallback treatment",
@@ -150,6 +182,9 @@
150
182
  "overflowing"
151
183
  ],
152
184
  "material": "Shared with Avatar",
185
+ "surface": [
186
+ "none"
187
+ ],
153
188
  "geometry": "-7px overlap; overflow chip matches avatar size",
154
189
  "semantics": "The group has one accessible name; the overflow count is announced, not implied",
155
190
  "crystal": "Overlap, stacking order, overflow treatment",
@@ -172,10 +207,17 @@
172
207
  "hidden"
173
208
  ],
174
209
  "material": "Resin shell with Haze fill; status badges use their semantic ink pair",
210
+ "surface": [
211
+ "compact"
212
+ ],
175
213
  "geometry": "Pill or circle; never smaller than legible",
176
214
  "semantics": "The count reaches assistive technology through the host's accessible name or a live region",
177
215
  "crystal": "Shell, placement, overflow formatting",
178
216
  "product": "The count and when it is meaningful",
217
+ "motion": [
218
+ "highlight",
219
+ "attention"
220
+ ],
179
221
  "parity": [
180
222
  "mantine:Indicator",
181
223
  "mui:Badge",
@@ -194,6 +236,9 @@
194
236
  "neutral"
195
237
  ],
196
238
  "material": "Tested semantic ink and surface pair behind the symbol; never a coloured perimeter stroke",
239
+ "surface": [
240
+ "status"
241
+ ],
197
242
  "geometry": "Pill; 24px symbol well; 36px minimum height",
198
243
  "semantics": "The word carries the meaning. Symbol and colour are reinforcement, never the only signal.",
199
244
  "crystal": "Symbol vocabulary, tested colour pairs, geometry",
@@ -222,7 +267,10 @@
222
267
  "required",
223
268
  "invalid"
224
269
  ],
225
- "material": "Resin shell with a 3px-inset Haze fill and a 1px feather on that fill",
270
+ "material": "Haze: a 20px circle painting the Haze fill on an isolated layer with a 1px feather; no Resin, because it sits on surfaces that are often already translucent",
271
+ "surface": [
272
+ "indicator"
273
+ ],
226
274
  "geometry": "20px, or 24px on fields; never a click target",
227
275
  "semantics": "aria-hidden. The real control supplies the state; the mark only shows it.",
228
276
  "crystal": "The complete mark vocabulary and its precedence",
@@ -244,6 +292,9 @@
244
292
  "error"
245
293
  ],
246
294
  "material": "Haze placeholder while loading",
295
+ "surface": [
296
+ "haze"
297
+ ],
247
298
  "geometry": "Content radius when clipped; never distorts aspect",
248
299
  "semantics": "Meaningful images carry alt text; decorative images carry empty alt",
249
300
  "crystal": "Placeholder, fallback and radius treatment",
@@ -268,10 +319,17 @@
268
319
  "error"
269
320
  ],
270
321
  "material": "Resin markers on a Haze connector",
322
+ "surface": [
323
+ "indicator",
324
+ "haze"
325
+ ],
271
326
  "geometry": "Circular markers; 2px connector",
272
327
  "semantics": "Ordered list; the current item carries aria-current",
273
328
  "crystal": "Marker and connector treatment, state appearance",
274
329
  "product": "Events and their ordering",
330
+ "motion": [
331
+ "list-in"
332
+ ],
275
333
  "parity": [
276
334
  "mantine:Timeline",
277
335
  "mui:Timeline",
@@ -290,6 +348,9 @@
290
348
  "disabled"
291
349
  ],
292
350
  "material": "Haze rows; expanded content shares the row surface",
351
+ "surface": [
352
+ "haze"
353
+ ],
293
354
  "geometry": "Content radius; header meets 44px",
294
355
  "semantics": "Header is a button with aria-expanded and aria-controls; content is not hidden from search when collapsed unless intended",
295
356
  "crystal": "Row treatment, chevron rotation, expansion appearance",
@@ -314,6 +375,9 @@
314
375
  "transitioning"
315
376
  ],
316
377
  "material": "Inherits",
378
+ "surface": [
379
+ "none"
380
+ ],
317
381
  "geometry": "Inherits",
318
382
  "semantics": "The trigger carries aria-expanded; hidden content is genuinely hidden from assistive technology",
319
383
  "crystal": "Transition timing and reduced-motion behaviour",
@@ -337,10 +401,17 @@
337
401
  "expanded"
338
402
  ],
339
403
  "material": "Edge fade drawn from the surrounding material",
404
+ "surface": [
405
+ "none"
406
+ ],
340
407
  "geometry": "Fade depth 24px",
341
408
  "semantics": "The control carries aria-expanded; truncated text remains in the accessibility tree",
342
409
  "crystal": "Fade and control treatment",
343
410
  "product": "Threshold and content",
411
+ "motion": [
412
+ "accordion-in",
413
+ "accordion-out"
414
+ ],
344
415
  "parity": [
345
416
  "mantine:Spoiler",
346
417
  "mui:—",
@@ -358,6 +429,10 @@
358
429
  "single-slide"
359
430
  ],
360
431
  "material": "Resin controls floating over Haze slides",
432
+ "surface": [
433
+ "control",
434
+ "haze"
435
+ ],
361
436
  "geometry": "Content radius slides; pill controls meeting 44px",
362
437
  "semantics": "role=group with an accessible name; indicators are buttons; never autoplay without a pause control",
363
438
  "crystal": "Slide and control treatment, indicator appearance",
@@ -383,10 +458,16 @@
383
458
  "loading"
384
459
  ],
385
460
  "material": "Haze panel when grouped into a row",
461
+ "surface": [
462
+ "haze"
463
+ ],
386
464
  "geometry": "Content radius; tabular figures",
387
465
  "semantics": "Trend direction is stated in text, not by colour or arrow alone",
388
466
  "crystal": "Value typography, trend treatment",
389
467
  "product": "The value, formatting and what the trend compares",
468
+ "motion": [
469
+ "highlight"
470
+ ],
390
471
  "parity": [
391
472
  "antd:Statistic",
392
473
  "mantine:—",
@@ -403,6 +484,9 @@
403
484
  "with-copy"
404
485
  ],
405
486
  "material": "Canvas fill with an edge rim; never feathered, as code must stay exact",
487
+ "surface": [
488
+ "none"
489
+ ],
406
490
  "geometry": "14px radius inline, content radius for blocks",
407
491
  "semantics": "Real code and pre elements; blocks are focusable when scrollable",
408
492
  "crystal": "Surface, rhythm and copy-action placement",
@@ -421,6 +505,9 @@
421
505
  "default"
422
506
  ],
423
507
  "material": "Resin cap with a defined lower rim",
508
+ "surface": [
509
+ "compact"
510
+ ],
424
511
  "geometry": "8px radius; compact but legible",
425
512
  "semantics": "Real kbd element; key names are spelled, not drawn as symbols alone",
426
513
  "crystal": "Cap treatment",
@@ -439,6 +526,9 @@
439
526
  "default"
440
527
  ],
441
528
  "material": "Primary-soft or surface-alt fill",
529
+ "surface": [
530
+ "none"
531
+ ],
442
532
  "geometry": "Content radius or circle; 24px icon",
443
533
  "semantics": "Decorative and aria-hidden unless it is the only carrier of meaning",
444
534
  "crystal": "Container fill and icon sizing",
@@ -461,13 +551,15 @@
461
551
  "failed"
462
552
  ],
463
553
  "material": "Haze; own messages use the primary-container pair",
554
+ "surface": [
555
+ "bubble"
556
+ ],
464
557
  "geometry": "6/22/22/22px incoming, 22/6/22/22px own, mirrored for right-to-left",
465
558
  "semantics": "Author and time are text, not implied by side alone",
466
559
  "crystal": "Silhouette, corner asymmetry, own and incoming pairs, mirroring",
467
560
  "product": "Delivery, grouping rules and failure recovery",
468
561
  "motion": [
469
- "message-in",
470
- "reaction"
562
+ "message-in"
471
563
  ],
472
564
  "parity": [
473
565
  "—"
@@ -484,6 +576,9 @@
484
576
  "overlaid"
485
577
  ],
486
578
  "material": "Stone label backing when overlaid on media, so contrast does not depend on the image",
579
+ "surface": [
580
+ "stone"
581
+ ],
487
582
  "geometry": "Content radius when overlaid; 12px inset from the media edge",
488
583
  "semantics": "Real figure and figcaption. A caption never replaces alt text; the two say different things.",
489
584
  "crystal": "Backing material, placement and protected contrast",
@@ -510,10 +605,18 @@
510
605
  "disabled"
511
606
  ],
512
607
  "material": "Frost panel with Haze day cells",
608
+ "surface": [
609
+ "frost",
610
+ "haze"
611
+ ],
513
612
  "geometry": "Cells reach 44px; the panel keeps panel radius.",
514
613
  "semantics": "A grid with row and column headers; today is marked as current, selection as selected.",
515
614
  "crystal": "Cell materials, range rendering, selection by weight",
516
615
  "product": "Locale, events, min and max",
616
+ "motion": [
617
+ "selection",
618
+ "page-in"
619
+ ],
517
620
  "parity": [
518
621
  "mui-x-date-pickers:DateCalendar",
519
622
  "primereact:datepicker"
@@ -530,30 +633,19 @@
530
633
  "focus-visible"
531
634
  ],
532
635
  "material": "Haze item fills on the surrounding material",
636
+ "surface": [
637
+ "haze"
638
+ ],
533
639
  "geometry": "Item radius is the content radius; layout switches at a declared breakpoint.",
534
640
  "semantics": "A list; the layout switch is a control with a pressed state, not a hidden toggle.",
535
641
  "crystal": "Item material, layout motion, empty and loading surfaces",
536
642
  "product": "Data, sorting, paging",
537
- "parity": [
538
- "primereact:dataview"
539
- ]
540
- },
541
- {
542
- "id": "virtual-scroller",
543
- "name": "Virtual scroller",
544
- "anatomy": "A long list that renders only what is near the viewport.",
545
- "states": [
546
- "at-rest",
547
- "scrolling",
548
- "loading"
643
+ "motion": [
644
+ "list-in",
645
+ "list-out"
549
646
  ],
550
- "material": "None of its own",
551
- "geometry": "Scroll container follows the scroll-area contract.",
552
- "semantics": "Rows keep their position in the set via aria-setsize and aria-posinset.",
553
- "crystal": "Scroll surface, focus retention across recycling",
554
- "product": "Row height strategy, data source",
555
647
  "parity": [
556
- "primereact:virtualscroller"
648
+ "primereact:dataview"
557
649
  ]
558
650
  },
559
651
  {
@@ -565,10 +657,16 @@
565
657
  "focus-visible"
566
658
  ],
567
659
  "material": "Haze caption bars over the image",
660
+ "surface": [
661
+ "haze"
662
+ ],
568
663
  "geometry": "Uniform gap; caption bars keep the content radius at the bottom corners.",
569
664
  "semantics": "A list; each image needs an accessible name or is marked decorative.",
570
665
  "crystal": "Caption material, focus ring, aspect handling",
571
666
  "product": "Images, captions, columns",
667
+ "motion": [
668
+ "media-in"
669
+ ],
572
670
  "parity": [
573
671
  "mui:ImageList",
574
672
  "primereact:gallery"
@@ -585,10 +683,17 @@
585
683
  "focus-visible"
586
684
  ],
587
685
  "material": "Haze nodes on the surrounding material",
686
+ "surface": [
687
+ "haze"
688
+ ],
588
689
  "geometry": "Nodes keep the content radius; connectors use the rim colour.",
589
690
  "semantics": "A tree; collapse state is announced, and the chart is navigable by keyboard.",
590
691
  "crystal": "Node material, connector colour, selection by weight",
591
692
  "product": "Hierarchy data and layout direction",
693
+ "motion": [
694
+ "accordion-in",
695
+ "accordion-out"
696
+ ],
592
697
  "parity": [
593
698
  "primereact:organizationchart"
594
699
  ]
@@ -602,6 +707,9 @@
602
707
  "changing"
603
708
  ],
604
709
  "material": "Inherits",
710
+ "surface": [
711
+ "none"
712
+ ],
605
713
  "geometry": "Tabular figures so the width does not jump.",
606
714
  "semantics": "The value is announced once it settles, not on every frame.",
607
715
  "crystal": "Digit motion, reduced-motion fallback to an instant change",
@@ -620,10 +728,17 @@
620
728
  "focus-visible"
621
729
  ],
622
730
  "material": "Resin handle over the images",
731
+ "surface": [
732
+ "resin"
733
+ ],
623
734
  "geometry": "Handle is a pill and reaches 44px.",
624
735
  "semantics": "The divider is a slider with a percentage value and keyboard steps.",
625
736
  "crystal": "Handle material, focus ring, drag motion",
626
737
  "product": "The two images and their labels",
738
+ "motion": [
739
+ "drag-pickup",
740
+ "drag-settle"
741
+ ],
627
742
  "parity": [
628
743
  "primereact:imagecompare"
629
744
  ]
@@ -637,6 +752,9 @@
637
752
  "paused"
638
753
  ],
639
754
  "material": "Inherits",
755
+ "surface": [
756
+ "none"
757
+ ],
640
758
  "geometry": "Edges fade using the surrounding material, not a hard cut.",
641
759
  "semantics": "Pausable on hover and focus; removed entirely under reduced motion.",
642
760
  "crystal": "Edge treatment, motion, the reduced-motion contract",
@@ -654,10 +772,16 @@
654
772
  "hidden"
655
773
  ],
656
774
  "material": "Haze fill with a crisp glyph",
775
+ "surface": [
776
+ "haze"
777
+ ],
657
778
  "geometry": "Offset from the corner; never clipped by its host.",
658
779
  "semantics": "Labels its host rather than standing alone; decorative badges are hidden from assistive technology.",
659
780
  "crystal": "Material, offset, glyph crispness",
660
781
  "product": "Count or status shown",
782
+ "motion": [
783
+ "attention"
784
+ ],
661
785
  "parity": [
662
786
  "primereact:overlaybadge"
663
787
  ]
@@ -673,10 +797,17 @@
673
797
  "focus-visible"
674
798
  ],
675
799
  "material": "Haze rows",
800
+ "surface": [
801
+ "haze"
802
+ ],
676
803
  "geometry": "Indentation per level; rows reach 44px.",
677
804
  "semantics": "A tree with aria-current on the active destination; expansion is announced.",
678
805
  "crystal": "Row material, expansion motion, current marking by label weight",
679
806
  "product": "The destination set and routing",
807
+ "motion": [
808
+ "accordion-in",
809
+ "accordion-out"
810
+ ],
680
811
  "parity": [
681
812
  "react-aria:NavigationTree"
682
813
  ]
@@ -691,10 +822,19 @@
691
822
  "focus-visible"
692
823
  ],
693
824
  "material": "Inherits the table surface",
825
+ "surface": [
826
+ "table"
827
+ ],
694
828
  "geometry": "The resizer is a 44px target that does not shift the column it borders.",
695
829
  "semantics": "The resizer is a slider: arrow keys resize, and the new width is announced.",
696
830
  "crystal": "Resizer affordance, focus ring, live layout while dragging",
697
831
  "product": "Which columns resize, and persistence",
832
+ "motion": [
833
+ "list-in",
834
+ "list-out",
835
+ "highlight",
836
+ "resize-settle"
837
+ ],
698
838
  "parity": [
699
839
  "react-aria:ResizableTableContainer",
700
840
  "mui-x-data-grid:GridColumnResizer"
@@ -710,10 +850,16 @@
710
850
  "empty"
711
851
  ],
712
852
  "material": "Haze content fill on the surrounding material",
853
+ "surface": [
854
+ "haze"
855
+ ],
713
856
  "geometry": "Content radius; spacing from the scale.",
714
857
  "semantics": "The figure and its trend are one readable sentence, not a number beside an arrow.",
715
858
  "crystal": "Material, figure typography, trend colour from the status tokens",
716
859
  "product": "The data and its period",
860
+ "motion": [
861
+ "highlight"
862
+ ],
717
863
  "parity": [
718
864
  "mantine:Card",
719
865
  "antd:Statistic"
@@ -730,10 +876,16 @@
730
876
  "loading"
731
877
  ],
732
878
  "material": "Haze content fill on the surrounding material",
879
+ "surface": [
880
+ "haze"
881
+ ],
733
882
  "geometry": "Content radius; spacing from the scale.",
734
883
  "semantics": "Target attainment is stated in words as well as shown.",
735
884
  "crystal": "Material, progress rendering, status colour",
736
885
  "product": "Targets and thresholds",
886
+ "motion": [
887
+ "highlight"
888
+ ],
737
889
  "parity": [
738
890
  "antd:Statistic",
739
891
  "primereact:card"
@@ -749,10 +901,16 @@
749
901
  "flat"
750
902
  ],
751
903
  "material": "Inherits",
904
+ "surface": [
905
+ "none"
906
+ ],
752
907
  "geometry": "Sits inline with the figure it qualifies.",
753
908
  "semantics": "Direction is carried by a word and a symbol, never by colour alone.",
754
909
  "crystal": "Status colour, symbol pairing",
755
910
  "product": "What counts as a meaningful change",
911
+ "motion": [
912
+ "highlight"
913
+ ],
756
914
  "parity": [
757
915
  "antd:Statistic",
758
916
  "mantine:Text"
@@ -768,10 +926,16 @@
768
926
  "neutral"
769
927
  ],
770
928
  "material": "Haze fill",
929
+ "surface": [
930
+ "haze"
931
+ ],
771
932
  "geometry": "Pill.",
772
933
  "semantics": "The sign is a character, not a colour.",
773
934
  "crystal": "Status tokens, pill geometry",
774
935
  "product": "Formatting and precision",
936
+ "motion": [
937
+ "highlight"
938
+ ],
775
939
  "parity": [
776
940
  "antd:Tag"
777
941
  ]