-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponent-catalog.json
More file actions
1229 lines (1228 loc) · 31.9 KB
/
Copy pathcomponent-catalog.json
File metadata and controls
1229 lines (1228 loc) · 31.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"lumui_component_catalog": "1.0",
"compatible_surface": "1.0",
"status": "stable",
"common_required": [
"id",
"kind"
],
"common_optional": [
"label",
"description",
"help",
"enabled",
"visible",
"priority",
"sensitive",
"live",
"required",
"readonly",
"value",
"default_value",
"action",
"actions",
"error",
"validation",
"fallback",
"metadata"
],
"action_reference_fields": [
"action",
"actions",
"clear_action",
"copy_action",
"primary_action",
"reset_action",
"secondary_actions",
"submit_action"
],
"component_reference_fields": [
"content",
"empty",
"fallback",
"illustration"
],
"component_collection_fields": [
"children",
"items",
"nodes",
"regions",
"tabs"
],
"semantic_hints": {
"content_extent": {
"values": [
"tiny",
"small",
"medium",
"large"
],
"meaning": "Expected content volume for renderer planning."
},
"intrinsic_aspect_ratio": {
"meaning": "The natural proportion of media content."
}
},
"families": {
"structure": [
"page",
"section",
"form",
"list",
"optionBar",
"grid",
"table",
"tree",
"tabs",
"toolbar",
"menu",
"breadcrumb"
],
"content": [
"text",
"valueDisplay",
"richText",
"codeBlock",
"link",
"quote",
"image",
"figure",
"imageCollection",
"icon",
"badge",
"status",
"clock",
"chart"
],
"action_and_choice": [
"button",
"toggle",
"checkOption",
"imageOption",
"detailOption",
"checkBox",
"radioGroup",
"choice",
"multiSelect",
"comboBox",
"slider",
"stepper",
"rating"
],
"input": [
"textField",
"textArea",
"passwordField",
"searchField",
"numberField",
"dateField",
"timeField",
"dateTimeField",
"dateRangeField",
"colorField",
"otpField"
],
"feedback": [
"progress",
"meter",
"activity",
"alert",
"toast",
"error",
"emptyState"
],
"media_and_capability": [
"audio",
"audioPlayer",
"video",
"videoPlayer",
"calendar",
"mediaPicker",
"map",
"navigation",
"locationPicker",
"dialer",
"contactPicker",
"filePicker",
"dialog",
"notification",
"graphic"
],
"preview": [
"preview"
]
},
"component_specification": "lumui-components.md",
"components": {
"page": {
"purpose": "A page or step in a task.",
"required": [
"id",
"title",
"regions"
],
"optional": [
"role",
"description",
"primary_action",
"secondary_actions",
"back_behavior",
"priority"
],
"presentation": "Show one page at a time with a clear title and logical reading order. Keep navigation to other pages available."
},
"section": {
"purpose": "A group of related content.",
"required": [
"id",
"items"
],
"optional": [
"label",
"description",
"role",
"collapsible",
"priority"
],
"presentation": "Group the items under the label when one is supplied. Keep their order and collapsed state clear."
},
"form": {
"purpose": "Fields submitted together.",
"required": [
"id",
"items",
"actions"
],
"optional": [
"submit_action",
"reset_action",
"validation_mode",
"dirty"
],
"presentation": "Keep the fields, validation messages and form actions together. Submit only through the declared action."
},
"list": {
"purpose": "An ordered collection of items.",
"required": [
"id",
"items"
],
"optional": [
"selection_mode",
"empty",
"estimated_count",
"pagination",
"reorderable"
],
"presentation": "Keep the declared item order. Selection, reordering, paging and the empty state MUST remain usable without relying on position alone."
},
"optionBar": {
"purpose": "Commands for the current page.",
"required": [
"id",
"options"
],
"optional": [
"action",
"label",
"description"
],
"presentation": "Place page commands in a consistent and keyboard-reachable area. Overflow menus are allowed, but commands MUST remain available."
},
"grid": {
"purpose": "Items arranged for visual scanning.",
"required": [
"id",
"items"
],
"optional": [
"selection_mode"
],
"fallback": "list",
"presentation": "Use a grid when space allows and it helps scanning. Keep reading and focus order logical, and use a list when a grid is unsuitable."
},
"table": {
"purpose": "Data organized in rows and columns.",
"required": [
"id",
"columns",
"rows"
],
"optional": [
"caption",
"sortable",
"filterable",
"selection_mode",
"pagination"
],
"fallback": "list or summary",
"presentation": "Keep the caption, headers and cell relationships clear. On narrow screens, reflow, scroll or use the stated fallback without losing those relationships."
},
"tree": {
"purpose": "Hierarchical data.",
"required": [
"id",
"nodes"
],
"optional": [
"expanded_node_ids",
"selection_mode"
],
"presentation": "Show an expandable hierarchy with level, selection and expanded state. Use normal keyboard tree behavior where the platform provides it."
},
"tabs": {
"purpose": "A choice between related views.",
"required": [
"id",
"tabs",
"selected"
],
"optional": [],
"presentation": "Show one selected tab and its related panel. Expose selection, focus and panel relationships to assistive technology."
},
"toolbar": {
"purpose": "A group of related commands.",
"required": [
"id",
"actions"
],
"optional": [
"label"
],
"presentation": "Keep related commands together in a labelled toolbar. Preserve their order and make every command keyboard reachable."
},
"menu": {
"purpose": "Commands or local navigation.",
"required": [
"id",
"items"
],
"optional": [
"trigger",
"selection_mode"
],
"presentation": "Use normal menu behavior for commands or local navigation. Follow platform rules for focus, selection and dismissal."
},
"breadcrumb": {
"purpose": "The path to the current page.",
"required": [
"id",
"items"
],
"optional": [],
"presentation": "Show the ordered path to the current page. Identify the current destination and avoid making it a redundant link."
},
"text": {
"purpose": "Read-only text or a heading.",
"required": [
"id",
"text"
],
"optional": [
"text_role",
"selectable"
],
"presentation": "Use the declared text role. A requested heading MUST be a real heading, not only larger text."
},
"valueDisplay": {
"purpose": "A prominent value, time or measurement.",
"required": [
"id",
"text|value"
],
"optional": [
"label",
"description",
"unit",
"source",
"live",
"format"
],
"presentation": "Give the value suitable emphasis while retaining its label, unit and source. Spoken output MUST include enough context to understand it."
},
"richText": {
"purpose": "Text with limited formatting.",
"required": [
"id",
"content"
],
"optional": [
"format",
"language"
],
"presentation": "Render only the supported formatting. Do not execute embedded HTML, script, style or unsafe links."
},
"codeBlock": {
"purpose": "Code, logs or command output.",
"required": [
"id",
"text"
],
"optional": [
"language",
"copy_action"
],
"presentation": "Preserve whitespace and identify the content as code or preformatted output. Wrap or scroll long lines, and provide the declared copy action."
},
"link": {
"purpose": "A link to another resource.",
"required": [
"id",
"label",
"href"
],
"optional": [
"description",
"rel",
"type",
"external",
"download"
],
"presentation": "Show a focusable link with a clear destination. It MUST work from the keyboard and follow viewer policy for external destinations."
},
"quote": {
"purpose": "A quotation and optional source.",
"required": [
"id",
"text"
],
"optional": [
"attribution",
"cite",
"language"
],
"presentation": "Keep the quotation separate from surrounding text and associate its attribution and source when supplied."
},
"image": {
"purpose": "One image.",
"required": [
"id",
"source",
"alt"
],
"optional": [
"caption",
"intrinsic_aspect_ratio",
"action",
"sensitive",
"decorative",
"variants"
],
"presentation": "Preserve the image's aspect ratio. Provide alt text for meaningful images, omit decorative images from accessibility output and protect sensitive images."
},
"figure": {
"purpose": "Content with a caption.",
"required": [
"id",
"content"
],
"optional": [
"caption",
"credit",
"source_link"
],
"presentation": "Keep the content, caption, credit and source together when the layout changes."
},
"imageCollection": {
"purpose": "A group of related images.",
"required": [
"id",
"images"
],
"optional": [
"selection_mode",
"current_index",
"caption"
],
"fallback": "sequential image or captions",
"presentation": "Show a gallery, carousel or sequence with a stable order and clear current position. Every item and action MUST work without pointer-only gestures."
},
"icon": {
"purpose": "A small symbol.",
"required": [
"id",
"symbol|source",
"meaning"
],
"optional": [
"decorative"
],
"presentation": "Use the registered symbol or image. A meaningful icon needs an accessible name and MUST NOT be the only label for an action or state."
},
"badge": {
"purpose": "A compact count or state.",
"required": [
"id",
"label"
],
"optional": [
"value",
"tone"
],
"presentation": "Show the label and optional value as a compact annotation. Do not rely on color alone."
},
"status": {
"purpose": "A current state.",
"required": [
"id",
"label",
"state"
],
"optional": [
"state_description",
"tone",
"live"
],
"presentation": "Show the label, state and description together. Do not rely on color alone, and follow the declared announcement setting."
},
"chart": {
"purpose": "A visual presentation of data.",
"required": [
"id",
"chart_type",
"data",
"summary"
],
"optional": [
"table_fallback",
"axes",
"series",
"actions"
],
"fallback": "table or summary",
"presentation": "Show the chart with its summary and data fallback. Do not rely on color, shape or position alone to distinguish data series."
},
"button": {
"purpose": "A command started by the user.",
"required": [
"id",
"label",
"action"
],
"optional": [
"confirmation",
"icon"
],
"presentation": "Use a normal command control with a visible label and focus indication. Run only the declared action and apply its confirmation rule."
},
"toggle": {
"purpose": "An immediate on or off setting.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [],
"presentation": "Use a switch or equivalent control and announce its label and current state. Change the setting only through the declared action."
},
"checkOption": {
"purpose": "Membership in a set.",
"required": [
"id",
"label",
"value"
],
"optional": [
"description",
"action",
"enabled"
],
"presentation": "Use a checkbox-like control, normally with related options. Expose its label, checked state and disabled state."
},
"imageOption": {
"purpose": "A selectable image, tile or swatch.",
"required": [
"id",
"label",
"value",
"source"
],
"optional": [
"description",
"selected",
"action",
"enabled"
],
"presentation": "Show a selectable tile or swatch with a text label and selected state. The image or color MUST NOT be its only identifier."
},
"detailOption": {
"purpose": "A selectable item with supporting details.",
"required": [
"id",
"label"
],
"optional": [
"description",
"text",
"value",
"selected",
"action",
"enabled"
],
"presentation": "Show the label, supporting description and trailing value as one selectable item. It MUST remain understandable after reflow."
},
"checkBox": {
"purpose": "A yes or no form value.",
"required": [
"id",
"label",
"value"
],
"optional": [
"action",
"required"
],
"presentation": "Use a labelled checkbox. Expose its checked, required and validation states."
},
"radioGroup": {
"purpose": "One selection from visible options.",
"required": [
"id",
"label",
"options",
"value"
],
"optional": [
"action"
],
"presentation": "Show one labelled single-selection group. Use normal radio-button keyboard behavior where available."
},
"choice": {
"purpose": "One selection from several options.",
"required": [
"id",
"label",
"options",
"value",
"action"
],
"optional": [],
"presentation": "Use radios, a picker or another suitable single-selection control. Keep the selected value and declared action explicit."
},
"multiSelect": {
"purpose": "Several selections from a set.",
"required": [
"id",
"label",
"options",
"values"
],
"optional": [
"min_selected",
"max_selected",
"action"
],
"presentation": "Show a labelled multiple-selection control. Explain minimum and maximum selection limits before submission."
},
"comboBox": {
"purpose": "A searchable or editable selection.",
"required": [
"id",
"label",
"options",
"value"
],
"optional": [
"editable",
"preview",
"filter_mode",
"allow_empty",
"action"
],
"presentation": "Use normal combobox behavior with an associated option list. Previewing an option MUST NOT commit it."
},
"slider": {
"purpose": "A value within a numeric range.",
"required": [
"id",
"label",
"value",
"min",
"max",
"action"
],
"optional": [
"step",
"unit",
"display_value",
"marks"
],
"fallback": "stepper or numeric input",
"presentation": "Expose the label, value, minimum, maximum, step and unit. Keyboard changes and a stepper or numeric fallback MUST be available."
},
"stepper": {
"purpose": "A number changed in steps.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"min",
"max",
"step",
"unit"
],
"presentation": "Show the value with increase and decrease commands and direct entry where possible. Disable a command at its limit."
},
"rating": {
"purpose": "An ordinal rating.",
"required": [
"id",
"label",
"value",
"max"
],
"optional": [
"min",
"allow_half",
"action"
],
"presentation": "Show an understandable ordinal scale. Symbols may support the display, but the value and range MUST also be available as text."
},
"textField": {
"purpose": "Single-line text input.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"placeholder",
"content_type",
"keyboard",
"autocomplete",
"min_length",
"max_length",
"pattern",
"spellcheck",
"autocapitalize"
],
"presentation": "Use a labelled single-line field. Associate its help, placeholder and validation message correctly."
},
"textArea": {
"purpose": "Multi-line text input.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"placeholder",
"content_extent",
"max_length",
"spellcheck"
],
"presentation": "Use a labelled multi-line field. Resize, reflow or scroll rather than clipping entered text."
},
"passwordField": {
"purpose": "Secret text input.",
"required": [
"id",
"label",
"value_present",
"action"
],
"optional": [
"placeholder",
"min_length",
"max_length",
"rules",
"allow_reveal",
"password_manager",
"autocomplete"
],
"forbidden": [
"value",
"default_value"
],
"presentation": "Mask entered characters by default. Keep the real value out of the surface, logs, history and previews. A temporary reveal is allowed only when requested by the component and MUST clearly announce its state."
},
"searchField": {
"purpose": "A search query.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"placeholder",
"suggestions",
"submit_action",
"clear_action",
"debounce_ms",
"result_count"
],
"presentation": "Use a search field with reachable submit and clear commands and an associated suggestion list. Updates MUST NOT steal focus."
},
"numberField": {
"purpose": "A numeric value.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"min",
"max",
"step",
"unit",
"precision",
"format",
"allow_negative"
],
"presentation": "Use a locale-appropriate numeric field while preserving the exact numeric value. Show limits, precision, step, unit and errors."
},
"dateField": {
"purpose": "A date.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"min",
"max",
"calendar",
"format"
],
"presentation": "Use a native date control or an accessible equivalent. The display may be localized, but the submitted date and limits MUST remain clear."
},
"timeField": {
"purpose": "A time.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"min",
"max",
"format",
"step_minutes"
],
"presentation": "Use a native time control or an accessible equivalent. Apply the declared format and minute step."
},
"dateTimeField": {
"purpose": "A date and time.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"min",
"max",
"timezone"
],
"presentation": "Show date and time as one value or two clearly related controls. Show the time zone whenever it affects meaning."
},
"dateRangeField": {
"purpose": "A start and end date.",
"required": [
"id",
"label",
"start",
"end",
"action"
],
"optional": [
"min",
"max",
"allow_open_end"
],
"presentation": "Present start and end as one labelled range and explain errors between them. Allow an open end only when declared."
},
"colorField": {
"purpose": "A color used as data.",
"required": [
"id",
"label",
"value",
"action"
],
"optional": [
"format",
"palette",
"allow_custom"
],
"presentation": "Provide a picker or palette with a text value or name. Color MUST NOT be the only way to identify the choice."
},
"otpField": {
"purpose": "A one-time code.",
"required": [
"id",
"label",
"length",
"action"
],
"optional": [
"value_present",
"content_type",
"auto_submit"
],
"forbidden": [
"value",
"default_value"
],
"presentation": "Show the expected code length and current entry position. Keep the code out of the surface, logs, history and previews, and announce automatic submission before it occurs."
},
"progress": {
"purpose": "Progress of a task.",
"required": [
"id",
"label",
"value|indeterminate"
],
"optional": [
"min",
"max",
"unit",
"live"
],
"presentation": "Use determinate progress when a value is known and an activity indicator otherwise. Provide a text label and accessible progress state."
},
"meter": {
"purpose": "A measurement within a range.",
"required": [
"id",
"label",
"value",
"min",
"max"
],
"optional": [
"low",
"high",
"optimum",
"unit"
],
"presentation": "Expose the value, range, thresholds and optimum. Color may support the ranges but MUST NOT define them alone."
},
"activity": {
"purpose": "Work with no known completion value.",
"required": [
"id",
"label"
],
"optional": [
"description",
"live"
],
"presentation": "Show ongoing work with a readable status label. Respect reduced-motion settings."
},
"alert": {
"purpose": "An important persistent message.",
"required": [
"id",
"title",
"message"
],
"optional": [
"severity",
"actions",
"live"
],
"presentation": "Show a persistent message with its severity and actions. Use the declared announcement urgency without repeating the message unnecessarily."
},
"toast": {
"purpose": "A short non-modal message.",
"required": [
"id",
"message"
],
"optional": [
"duration_ms",
"action"
],
"presentation": "Show a temporary message without moving focus. Leave it visible long enough to read and use, and do not use it as the only place for critical information."
},
"error": {
"purpose": "An error that requires attention.",
"required": [
"id",
"title",
"message"
],
"optional": [
"severity",
"actions",
"correlation_id"
],
"presentation": "Show a persistent heading, message and recovery actions. Link related invalid fields and keep the support reference available when supplied."
},
"emptyState": {
"purpose": "A clear state for an empty collection.",
"required": [
"id",
"title"
],
"optional": [
"message",
"actions",
"illustration"
],
"presentation": "Show an explicit empty state instead of a blank area. Keep its title, message, illustration and actions together."
},
"audio": {
"purpose": "Embedded audio.",
"required": [
"id",
"label",
"source"
],
"optional": [
"description",
"transcript",
"duration_ms",
"preload",
"download"
],
"fallback": "transcript or download",
"presentation": "Provide play, pause, seek and volume controls when supported. Keep the transcript and download fallbacks available and make every control keyboard operable."
},
"audioPlayer": {
"purpose": "An audio playback session.",
"required": [
"id",
"label"
],
"optional": [
"artist",