@adobe/design-data-spec 0.3.0 → 0.5.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 (92) hide show
  1. package/components/accordion.json +517 -0
  2. package/components/action-bar.json +203 -0
  3. package/components/action-button.json +481 -0
  4. package/components/action-group.json +82 -0
  5. package/components/alert-banner.json +111 -0
  6. package/components/alert-dialog.json +152 -0
  7. package/components/avatar-group.json +140 -0
  8. package/components/avatar.json +184 -0
  9. package/components/badge.json +502 -0
  10. package/components/body.json +29 -0
  11. package/components/bottom-navigation-android.json +41 -0
  12. package/components/breadcrumbs.json +263 -0
  13. package/components/button-group.json +47 -0
  14. package/components/button.json +466 -8
  15. package/components/calendar.json +104 -0
  16. package/components/cards.json +512 -0
  17. package/components/checkbox-group.json +54 -0
  18. package/components/checkbox.json +303 -0
  19. package/components/close-button.json +170 -0
  20. package/components/coach-indicator.json +76 -0
  21. package/components/coach-mark.json +157 -0
  22. package/components/code.json +25 -0
  23. package/components/color-area.json +115 -0
  24. package/components/color-handle.json +85 -0
  25. package/components/color-loupe.json +74 -0
  26. package/components/color-slider.json +121 -0
  27. package/components/color-wheel.json +94 -0
  28. package/components/combo-box.json +480 -0
  29. package/components/contextual-help.json +162 -0
  30. package/components/date-picker.json +439 -0
  31. package/components/detail.json +30 -0
  32. package/components/divider.json +73 -0
  33. package/components/drop-zone.json +211 -0
  34. package/components/field-label.json +189 -0
  35. package/components/heading.json +33 -0
  36. package/components/help-text.json +186 -0
  37. package/components/illustrated-message.json +155 -0
  38. package/components/in-field-progress-button.json +44 -0
  39. package/components/in-field-progress-circle.json +80 -0
  40. package/components/in-line-alert.json +201 -0
  41. package/components/link.json +135 -0
  42. package/components/list-view.json +355 -0
  43. package/components/menu.json +542 -0
  44. package/components/meter.json +162 -0
  45. package/components/number-field.json +468 -0
  46. package/components/opacity-checkerboard.json +43 -0
  47. package/components/picker.json +522 -0
  48. package/components/popover.json +119 -0
  49. package/components/progress-bar.json +182 -0
  50. package/components/progress-circle.json +99 -0
  51. package/components/radio-button.json +285 -0
  52. package/components/radio-group.json +63 -0
  53. package/components/rating.json +145 -0
  54. package/components/scroll-zoom-bar.json +53 -0
  55. package/components/search-field.json +306 -0
  56. package/components/segmented-control.json +210 -0
  57. package/components/select-box.json +248 -0
  58. package/components/side-navigation.json +293 -0
  59. package/components/slider.json +370 -0
  60. package/components/standard-dialog.json +151 -0
  61. package/components/standard-panel.json +53 -0
  62. package/components/status-light.json +272 -0
  63. package/components/steplist.json +270 -0
  64. package/components/swatch-group.json +62 -0
  65. package/components/swatch.json +193 -0
  66. package/components/switch.json +305 -0
  67. package/components/tab-bar-ios.json +41 -0
  68. package/components/table.json +392 -0
  69. package/components/tabs.json +229 -0
  70. package/components/tag-field.json +203 -0
  71. package/components/tag-group.json +53 -0
  72. package/components/tag.json +376 -0
  73. package/components/takeover-dialog.json +92 -0
  74. package/components/text-area.json +485 -0
  75. package/components/text-field.json +501 -0
  76. package/components/thumbnail.json +109 -0
  77. package/components/title.json +39 -0
  78. package/components/toast.json +131 -0
  79. package/components/tooltip.json +140 -0
  80. package/components/tray.json +21 -0
  81. package/components/tree-view.json +341 -0
  82. package/conformance/invalid/SPEC-027/dataset.json +25 -0
  83. package/conformance/invalid/SPEC-027/expected-errors.json +10 -0
  84. package/conformance/valid/token-bindings.json +27 -0
  85. package/package.json +2 -1
  86. package/rules/rules.yaml +9 -0
  87. package/schemas/component.schema.json +24 -2
  88. package/schemas/token.schema.json +27 -0
  89. package/spec/agent-surface.md +39 -9
  90. package/spec/component-format.md +41 -16
  91. package/spec/token-format.md +18 -0
  92. package/src/validate.js +27 -3
@@ -0,0 +1,480 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/combo-box.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "combo-box",
6
+ "displayName": "Combo box",
7
+ "description": "Combo boxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/combo-box/"
11
+ },
12
+ "options": {
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "labelPosition": {
17
+ "type": "string",
18
+ "enum": ["top", "side", "in line"],
19
+ "default": "top"
20
+ },
21
+ "value": {
22
+ "type": "string"
23
+ },
24
+ "width": {
25
+ "type": "number"
26
+ },
27
+ "size": {
28
+ "type": "string",
29
+ "enum": ["s", "m", "l", "xl"],
30
+ "default": "m"
31
+ },
32
+ "isRequired": {
33
+ "type": "boolean",
34
+ "default": false
35
+ },
36
+ "necessityIndicator": {
37
+ "type": "string",
38
+ "enum": ["text", "icon"],
39
+ "default": "icon"
40
+ },
41
+ "hasAutocomplete": {
42
+ "type": "boolean",
43
+ "default": false
44
+ },
45
+ "menuTrigger": {
46
+ "type": "string",
47
+ "enum": ["input", "focus", "manual"],
48
+ "default": "input"
49
+ },
50
+ "isError": {
51
+ "type": "boolean",
52
+ "default": false
53
+ },
54
+ "isDisabled": {
55
+ "type": "boolean",
56
+ "default": false
57
+ },
58
+ "isReadOnly": {
59
+ "type": "boolean",
60
+ "default": false
61
+ },
62
+ "description": {
63
+ "type": "string"
64
+ },
65
+ "errorMessage": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ "states": [
70
+ {
71
+ "name": "hover-(text-area)",
72
+ "trigger": "prop"
73
+ },
74
+ {
75
+ "name": "hover-(button-area)",
76
+ "trigger": "prop"
77
+ },
78
+ {
79
+ "name": "focus-+-hover",
80
+ "trigger": "prop"
81
+ },
82
+ {
83
+ "name": "focus-+-not-hover",
84
+ "trigger": "prop"
85
+ },
86
+ {
87
+ "name": "keyboard-focus",
88
+ "trigger": "interaction"
89
+ }
90
+ ],
91
+ "lifecycle": {
92
+ "introduced": "1.0.0-draft"
93
+ },
94
+ "tokenBindings": [
95
+ {
96
+ "token": "combo-box-visual-to-field-button-quiet",
97
+ "context": "S1 Spacing (alert icon/progress circle to field button)"
98
+ },
99
+ {
100
+ "token": "component-top-to-text-300",
101
+ "context": "S2 Leading icon (top/bottom edge to leading icon) position: inline"
102
+ },
103
+ {
104
+ "token": "component-top-to-workflow-icon-400",
105
+ "context": "S2 Leading icon (top/bottom edge to leading icon) position: inline"
106
+ },
107
+ {
108
+ "token": "component-padding-vertical-200",
109
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
110
+ },
111
+ {
112
+ "token": "component-padding-vertical-300",
113
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
114
+ },
115
+ {
116
+ "token": "component-top-to-text-50",
117
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
118
+ },
119
+ {
120
+ "token": "component-top-to-text-100",
121
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
122
+ },
123
+ {
124
+ "token": "field-default-width-small",
125
+ "context": "Width (default)"
126
+ },
127
+ {
128
+ "token": "field-default-width-medium",
129
+ "context": "Width (default)"
130
+ },
131
+ {
132
+ "token": "field-default-width-large",
133
+ "context": "Width (default)"
134
+ },
135
+ {
136
+ "token": "field-default-width-extra-large",
137
+ "context": "Width (default)"
138
+ },
139
+ {
140
+ "token": "combo-box-minimum-width-multiplier",
141
+ "context": "Width (minimum)"
142
+ },
143
+ {
144
+ "token": "component-height-75",
145
+ "context": "Height"
146
+ },
147
+ {
148
+ "token": "component-height-100",
149
+ "context": "Height"
150
+ },
151
+ {
152
+ "token": "component-height-200",
153
+ "context": "Height"
154
+ },
155
+ {
156
+ "token": "component-height-300",
157
+ "context": "Height"
158
+ },
159
+ {
160
+ "token": "corner-radius-medium-size-small",
161
+ "context": "Rounding"
162
+ },
163
+ {
164
+ "token": "corner-radius-medium-size-medium",
165
+ "context": "Rounding"
166
+ },
167
+ {
168
+ "token": "corner-radius-medium-size-large",
169
+ "context": "Rounding"
170
+ },
171
+ {
172
+ "token": "corner-radius-medium-size-extra-large",
173
+ "context": "Rounding"
174
+ },
175
+ {
176
+ "token": "component-edge-to-text-75",
177
+ "context": "Spacing (start/end edge to value)"
178
+ },
179
+ {
180
+ "token": "component-edge-to-text-100",
181
+ "context": "Spacing (start/end edge to value)"
182
+ },
183
+ {
184
+ "token": "component-edge-to-text-200",
185
+ "context": "Spacing (start/end edge to value)"
186
+ },
187
+ {
188
+ "token": "component-edge-to-text-300",
189
+ "context": "Spacing (start/end edge to value)"
190
+ },
191
+ {
192
+ "token": "workflow-icon-size-75",
193
+ "context": "Prefix min-width"
194
+ },
195
+ {
196
+ "token": "workflow-icon-size-100",
197
+ "context": "Prefix min-width"
198
+ },
199
+ {
200
+ "token": "workflow-icon-size-200",
201
+ "context": "Prefix min-width"
202
+ },
203
+ {
204
+ "token": "workflow-icon-size-300",
205
+ "context": "Prefix min-width"
206
+ },
207
+ {
208
+ "token": "text-to-visual-75",
209
+ "context": "Spacing (prefix to value/placeholder)"
210
+ },
211
+ {
212
+ "token": "text-to-visual-100",
213
+ "context": "Spacing (prefix to value/placeholder)"
214
+ },
215
+ {
216
+ "token": "text-to-visual-200",
217
+ "context": "Spacing (prefix to value/placeholder)"
218
+ },
219
+ {
220
+ "token": "text-to-visual-300",
221
+ "context": "Spacing (prefix to value/placeholder)"
222
+ },
223
+ {
224
+ "token": "border-width-200",
225
+ "context": "Border"
226
+ },
227
+ {
228
+ "token": "focus-indicator-thickness",
229
+ "context": "Focus indicator"
230
+ },
231
+ {
232
+ "token": "focus-indicator-gap",
233
+ "context": "Focus indicator"
234
+ },
235
+ {
236
+ "token": "combo-box-visual-to-field-button",
237
+ "context": "Spacing (alert icon/in-field progress circle to field button)"
238
+ },
239
+ {
240
+ "token": "component-top-to-workflow-icon-75",
241
+ "context": "Spacing (top/bottom edge to alert icon)"
242
+ },
243
+ {
244
+ "token": "component-top-to-workflow-icon-100",
245
+ "context": "Spacing (top/bottom edge to alert icon)"
246
+ },
247
+ {
248
+ "token": "component-top-to-workflow-icon-200",
249
+ "context": "Spacing (top/bottom edge to alert icon)"
250
+ },
251
+ {
252
+ "token": "component-top-to-workflow-icon-300",
253
+ "context": "Spacing (top/bottom edge to alert icon)"
254
+ },
255
+ {
256
+ "token": "field-edge-to-alert-icon-small",
257
+ "context": "Leading icon (leading icon to end edge)"
258
+ },
259
+ {
260
+ "token": "field-edge-to-alert-icon-medium",
261
+ "context": "Leading icon (leading icon to end edge)"
262
+ },
263
+ {
264
+ "token": "field-edge-to-alert-icon-large",
265
+ "context": "Leading icon (leading icon to end edge)"
266
+ },
267
+ {
268
+ "token": "field-edge-to-alert-icon-extra-large",
269
+ "context": "Leading icon (leading icon to end edge)"
270
+ },
271
+ {
272
+ "token": "field-label-to-component",
273
+ "context": "Spacing (field label to combo box)"
274
+ },
275
+ {
276
+ "token": "component-to-menu-small",
277
+ "context": "Spacing (component to menu)"
278
+ },
279
+ {
280
+ "token": "component-to-menu-medium",
281
+ "context": "Spacing (component to menu)"
282
+ },
283
+ {
284
+ "token": "component-to-menu-large",
285
+ "context": "Spacing (component to menu)"
286
+ },
287
+ {
288
+ "token": "component-to-menu-extra-large",
289
+ "context": "Spacing (component to menu)"
290
+ },
291
+ {
292
+ "token": "help-text-to-component",
293
+ "context": "Spacing (combo box to help text)"
294
+ },
295
+ {
296
+ "token": "in-field-progress-circle",
297
+ "context": "In-field progress circle"
298
+ },
299
+ {
300
+ "token": "field-top-to-progress-circle-small",
301
+ "context": "Spacing (top/bottom edge to in-field progress circle icon)"
302
+ },
303
+ {
304
+ "token": "field-top-to-progress-circle-medium",
305
+ "context": "Spacing (top/bottom edge to in-field progress circle icon)"
306
+ },
307
+ {
308
+ "token": "field-top-to-progress-circle-large",
309
+ "context": "Spacing (top/bottom edge to in-field progress circle icon)"
310
+ },
311
+ {
312
+ "token": "field-top-to-progress-circle-extra-large",
313
+ "context": "Spacing (top/bottom edge to in-field progress circle icon)"
314
+ },
315
+ {
316
+ "token": "gray-25",
317
+ "context": "Background and border"
318
+ },
319
+ {
320
+ "token": "gray-300",
321
+ "context": "Background and border"
322
+ },
323
+ {
324
+ "token": "gray-400",
325
+ "context": "Background and border"
326
+ },
327
+ {
328
+ "token": "gray-900",
329
+ "context": "Background and border"
330
+ },
331
+ {
332
+ "token": "gray-800",
333
+ "context": "Background and border"
334
+ },
335
+ {
336
+ "token": "neutral-subdued-content-color-default",
337
+ "context": "Background and border"
338
+ },
339
+ {
340
+ "token": "negative-border-color-default",
341
+ "context": "Border (error)"
342
+ },
343
+ {
344
+ "token": "negative-border-color-hover",
345
+ "context": "Border (error)"
346
+ },
347
+ {
348
+ "token": "negative-border-color-focus-hover",
349
+ "context": "Border (error)"
350
+ },
351
+ {
352
+ "token": "negative-border-color-focus",
353
+ "context": "Border (error)"
354
+ },
355
+ {
356
+ "token": "negative-border-color-key-focus",
357
+ "context": "Border (error)"
358
+ },
359
+ {
360
+ "token": "neutral-content-color-default",
361
+ "context": "Value"
362
+ },
363
+ {
364
+ "token": "neutral-content-color-hover",
365
+ "context": "Value"
366
+ },
367
+ {
368
+ "token": "neutral-content-color-focus-hover",
369
+ "context": "Value"
370
+ },
371
+ {
372
+ "token": "neutral-content-color-focus",
373
+ "context": "Value"
374
+ },
375
+ {
376
+ "token": "neutral-content-color-key-focus",
377
+ "context": "Value"
378
+ },
379
+ {
380
+ "token": "negative-visual-color",
381
+ "context": "Alert icon"
382
+ },
383
+ {
384
+ "token": "disabled-content-color",
385
+ "context": "Disabled"
386
+ },
387
+ {
388
+ "token": "disabled-border-color",
389
+ "context": "Disabled"
390
+ },
391
+ {
392
+ "token": "disabled-background-color",
393
+ "context": "Disabled"
394
+ },
395
+ {
396
+ "token": "focus-indicator-color",
397
+ "context": "Focus ring"
398
+ },
399
+ {
400
+ "token": "default-font-family",
401
+ "context": "Value"
402
+ },
403
+ {
404
+ "token": "regular-font-weight",
405
+ "context": "Value"
406
+ },
407
+ {
408
+ "token": "default-font-style",
409
+ "context": "Value"
410
+ },
411
+ {
412
+ "token": "component-s-regular",
413
+ "context": "Value"
414
+ },
415
+ {
416
+ "token": "component-m-regular",
417
+ "context": "Value"
418
+ },
419
+ {
420
+ "token": "component-l-regular",
421
+ "context": "Value"
422
+ },
423
+ {
424
+ "token": "component-xl-regular",
425
+ "context": "Value"
426
+ },
427
+ {
428
+ "token": "line-height-font-size-75",
429
+ "context": "Value"
430
+ },
431
+ {
432
+ "token": "line-height-font-size-100",
433
+ "context": "Value"
434
+ },
435
+ {
436
+ "token": "line-height-font-size-200",
437
+ "context": "Value"
438
+ },
439
+ {
440
+ "token": "line-height-font-size-300",
441
+ "context": "Value"
442
+ },
443
+ {
444
+ "token": "cjk-line-height-100",
445
+ "context": "Value"
446
+ },
447
+ {
448
+ "token": "medium-font-weight",
449
+ "context": "Prefix"
450
+ },
451
+ {
452
+ "token": "component-s-medium",
453
+ "context": "Prefix"
454
+ },
455
+ {
456
+ "token": "component-m-medium",
457
+ "context": "Prefix"
458
+ },
459
+ {
460
+ "token": "component-l-medium",
461
+ "context": "Prefix"
462
+ },
463
+ {
464
+ "token": "component-xl-medium",
465
+ "context": "Prefix"
466
+ },
467
+ {
468
+ "token": "field-label-top-to-asterisk-large",
469
+ "context": "Spacing (top/bottom edge to required)"
470
+ },
471
+ {
472
+ "token": "field-label-top-to-asterisk-extra-large",
473
+ "context": "Spacing (top/bottom edge to required)"
474
+ },
475
+ {
476
+ "token": "gray-600",
477
+ "context": "Label (populated true/false)"
478
+ }
479
+ ]
480
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/contextual-help.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "contextual-help",
6
+ "displayName": "Contextual help",
7
+ "description": "Contextual help shows a user extra information about the state of either an adjacent component or an entire view. It explains a high-level topic about an experience and can point users to more information elsewhere.",
8
+ "meta": {
9
+ "category": "feedback",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/contextual-help/"
11
+ },
12
+ "options": {
13
+ "icon": {
14
+ "type": "string",
15
+ "enum": ["info", "help"],
16
+ "default": "info"
17
+ },
18
+ "popoverPlacement": {
19
+ "type": "string",
20
+ "enum": [
21
+ "top",
22
+ "top left",
23
+ "top right",
24
+ "top start",
25
+ "top end",
26
+ "bottom",
27
+ "bottom left",
28
+ "bottom right",
29
+ "bottom start",
30
+ "bottom end",
31
+ "left",
32
+ "left top",
33
+ "left bottom",
34
+ "start",
35
+ "start top",
36
+ "start bottom",
37
+ "right",
38
+ "right top",
39
+ "right bottom",
40
+ "end",
41
+ "end top",
42
+ "end bottom"
43
+ ],
44
+ "default": "bottom start"
45
+ },
46
+ "popoverOffset": {
47
+ "type": "number",
48
+ "default": 8
49
+ },
50
+ "href": {
51
+ "type": "string",
52
+ "description": "Optional URL within contextual help content like a 'Learn more' link."
53
+ },
54
+ "popoverCrossOffset": {
55
+ "type": "number",
56
+ "default": 0
57
+ },
58
+ "containerPadding": {
59
+ "type": "number",
60
+ "default": 8
61
+ }
62
+ },
63
+ "states": [
64
+ {
65
+ "name": "down",
66
+ "trigger": "interaction"
67
+ },
68
+ {
69
+ "name": "open",
70
+ "trigger": "prop"
71
+ },
72
+ {
73
+ "name": "keyboard-focus",
74
+ "trigger": "interaction"
75
+ }
76
+ ],
77
+ "lifecycle": {
78
+ "introduced": "1.0.0-draft"
79
+ },
80
+ "tokenBindings": [
81
+ {
82
+ "token": "xs-s",
83
+ "context": "Components"
84
+ },
85
+ {
86
+ "token": "s-m",
87
+ "context": "Components"
88
+ },
89
+ {
90
+ "token": "contextual-help-minimum-width",
91
+ "context": "Minimum width"
92
+ },
93
+ {
94
+ "token": "corner-radius-large-default",
95
+ "context": "Rounding"
96
+ },
97
+ {
98
+ "token": "spacing-400",
99
+ "context": "Spacing (top/bottom/start/end edge to text)"
100
+ },
101
+ {
102
+ "token": "spacing-100",
103
+ "context": "Spacing (header to body, body to link)"
104
+ },
105
+ {
106
+ "token": "spacing-200",
107
+ "context": "Spacing (header to body, body to link)"
108
+ },
109
+ {
110
+ "token": "spacing-300",
111
+ "context": "Spacing (header to body, body to link)"
112
+ },
113
+ {
114
+ "token": "contextual-help-title-size",
115
+ "context": "Title"
116
+ },
117
+ {
118
+ "token": "title-sans-serif-font-family",
119
+ "context": "Title"
120
+ },
121
+ {
122
+ "token": "title-sans-serif-font-weight",
123
+ "context": "Title"
124
+ },
125
+ {
126
+ "token": "title-sans-serif-font-style",
127
+ "context": "Title"
128
+ },
129
+ {
130
+ "token": "title-line-height",
131
+ "context": "Title"
132
+ },
133
+ {
134
+ "token": "contextual-help-body-size",
135
+ "context": "Body"
136
+ },
137
+ {
138
+ "token": "body-sans-serif-font-family",
139
+ "context": "Body"
140
+ },
141
+ {
142
+ "token": "body-sans-serif-font-weight",
143
+ "context": "Body"
144
+ },
145
+ {
146
+ "token": "body-sans-serif-font-style",
147
+ "context": "Body"
148
+ },
149
+ {
150
+ "token": "line-height-200",
151
+ "context": "Body"
152
+ },
153
+ {
154
+ "token": "title-color",
155
+ "context": "Color"
156
+ },
157
+ {
158
+ "token": "body-color",
159
+ "context": "Color"
160
+ }
161
+ ]
162
+ }