@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,92 @@
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/takeover-dialog.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "takeover-dialog",
6
+ "displayName": "Takeover dialog",
7
+ "description": "Takeover dialogs are larger, flexible dialogs that contain other components to support complex workflows.",
8
+ "meta": {
9
+ "category": "feedback",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/takeover-dialog/"
11
+ },
12
+ "options": {
13
+ "title": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "variant": {
20
+ "type": "string",
21
+ "enum": ["dialog", "full screen"],
22
+ "default": "dialog"
23
+ },
24
+ "primaryActionLabel": {
25
+ "type": "string"
26
+ },
27
+ "secondaryActionLabel": {
28
+ "type": "string",
29
+ "description": "If undefined, this button does not appear."
30
+ },
31
+ "cancelActionLabel": {
32
+ "type": "string",
33
+ "default": "cancel",
34
+ "description": "If undefined, this button does not appear."
35
+ },
36
+ "slots": {
37
+ "type": "array",
38
+ "description": "Areas where other components can be inserted (e.g. Side navigation, Steplist, Forms).",
39
+ "items": {
40
+ "type": "object",
41
+ "properties": {
42
+ "name": {
43
+ "type": "string",
44
+ "description": "Identifier for the slot (e.g. 'sidebar', 'content', 'footer')."
45
+ },
46
+ "component": {
47
+ "type": "string",
48
+ "description": "The type of component placed in this slot (e.g. side-navigation, steplist, form)."
49
+ }
50
+ },
51
+ "required": ["name", "component"]
52
+ }
53
+ }
54
+ },
55
+ "lifecycle": {
56
+ "introduced": "1.0.0-draft"
57
+ },
58
+ "tokenBindings": [
59
+ {
60
+ "token": "takeover-dialog-width",
61
+ "context": "Height & width"
62
+ },
63
+ {
64
+ "token": "takeover-dialog-height",
65
+ "context": "Height & width"
66
+ },
67
+ {
68
+ "token": "window-to-edge",
69
+ "context": "Margins (dialog option)"
70
+ },
71
+ {
72
+ "token": "corner-radius-extra-large-default",
73
+ "context": "Rounding (dialog option)"
74
+ },
75
+ {
76
+ "token": "background-color-layer2",
77
+ "context": "Background"
78
+ },
79
+ {
80
+ "token": "overlay-color",
81
+ "context": "Overlay"
82
+ },
83
+ {
84
+ "token": "overlay-opacity",
85
+ "context": "Overlay"
86
+ },
87
+ {
88
+ "token": "heading-color",
89
+ "context": "Title"
90
+ }
91
+ ]
92
+ }
@@ -0,0 +1,485 @@
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/text-area.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "text-area",
6
+ "displayName": "Text area",
7
+ "description": "A text area lets a user input a longer amount of text than a standard text field. It can include all of the standard validation options supported by the text field component.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/text-area/"
11
+ },
12
+ "options": {
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "labelPosition": {
17
+ "type": "string",
18
+ "default": "top",
19
+ "enum": ["top", "side"]
20
+ },
21
+ "hideLabel": {
22
+ "type": "boolean",
23
+ "default": false
24
+ },
25
+ "value": {
26
+ "type": "string",
27
+ "description": "from minValue to maxValue"
28
+ },
29
+ "width": {
30
+ "type": "number"
31
+ },
32
+ "size": {
33
+ "type": "string",
34
+ "enum": ["s", "m", "l", "xl"],
35
+ "default": "m"
36
+ },
37
+ "necessityIndicator": {
38
+ "type": "string",
39
+ "enum": ["text", "icon"],
40
+ "default": "icon"
41
+ },
42
+ "isRequired": {
43
+ "type": "boolean",
44
+ "default": false
45
+ },
46
+ "hasCharacterCount": {
47
+ "type": "boolean",
48
+ "default": false
49
+ },
50
+ "showValidIcon": {
51
+ "type": "boolean",
52
+ "default": false
53
+ },
54
+ "isError": {
55
+ "type": "boolean",
56
+ "default": false
57
+ },
58
+ "isDisabled": {
59
+ "type": "boolean",
60
+ "default": false
61
+ },
62
+ "hideDragIcon": {
63
+ "type": "boolean",
64
+ "default": false
65
+ },
66
+ "height": {
67
+ "type": "number",
68
+ "description": "If undefined, height is dynamic and grows with input text."
69
+ },
70
+ "helpText": {
71
+ "type": "string"
72
+ },
73
+ "errorMessage": {
74
+ "type": "string"
75
+ },
76
+ "inputType": {
77
+ "type": "string",
78
+ "enum": ["text", "url", "phone", "email", "password"],
79
+ "default": "text"
80
+ }
81
+ },
82
+ "states": [
83
+ {
84
+ "name": "hover",
85
+ "trigger": "interaction"
86
+ },
87
+ {
88
+ "name": "focus-+-hover",
89
+ "trigger": "prop"
90
+ },
91
+ {
92
+ "name": "focus-+-not-hover",
93
+ "trigger": "prop"
94
+ },
95
+ {
96
+ "name": "keyboard-focus",
97
+ "trigger": "interaction"
98
+ }
99
+ ],
100
+ "lifecycle": {
101
+ "introduced": "1.0.0-draft"
102
+ },
103
+ "tokenBindings": [
104
+ {
105
+ "token": "field-default-width-small",
106
+ "context": "Width (default)"
107
+ },
108
+ {
109
+ "token": "field-default-width-medium",
110
+ "context": "Width (default)"
111
+ },
112
+ {
113
+ "token": "field-default-width-large",
114
+ "context": "Width (default)"
115
+ },
116
+ {
117
+ "token": "field-default-width-extra-large",
118
+ "context": "Width (default)"
119
+ },
120
+ {
121
+ "token": "text-area-minimum-width",
122
+ "context": "Width (minimum)"
123
+ },
124
+ {
125
+ "token": "text-area-minimum-height",
126
+ "context": "Height"
127
+ },
128
+ {
129
+ "token": "corner-radius-medium-size-small",
130
+ "context": "Rounding"
131
+ },
132
+ {
133
+ "token": "corner-radius-medium-size-medium",
134
+ "context": "Rounding"
135
+ },
136
+ {
137
+ "token": "corner-radius-medium-size-large",
138
+ "context": "Rounding"
139
+ },
140
+ {
141
+ "token": "corner-radius-medium-size-extra-large",
142
+ "context": "Rounding"
143
+ },
144
+ {
145
+ "token": "component-edge-to-text-75",
146
+ "context": "Spacing (start/end edge to value)"
147
+ },
148
+ {
149
+ "token": "component-edge-to-text-100",
150
+ "context": "Spacing (start/end edge to value)"
151
+ },
152
+ {
153
+ "token": "component-edge-to-text-200",
154
+ "context": "Spacing (start/end edge to value)"
155
+ },
156
+ {
157
+ "token": "component-edge-to-text-300",
158
+ "context": "Spacing (start/end edge to value)"
159
+ },
160
+ {
161
+ "token": "workflow-icon-size-75",
162
+ "context": "Prefix min-width"
163
+ },
164
+ {
165
+ "token": "workflow-icon-size-100",
166
+ "context": "Prefix min-width"
167
+ },
168
+ {
169
+ "token": "workflow-icon-size-200",
170
+ "context": "Prefix min-width"
171
+ },
172
+ {
173
+ "token": "workflow-icon-size-300",
174
+ "context": "Prefix min-width"
175
+ },
176
+ {
177
+ "token": "text-to-visual-75",
178
+ "context": "Spacing (prefix to value/placeholder)"
179
+ },
180
+ {
181
+ "token": "text-to-visual-100",
182
+ "context": "Spacing (prefix to value/placeholder)"
183
+ },
184
+ {
185
+ "token": "text-to-visual-200",
186
+ "context": "Spacing (prefix to value/placeholder)"
187
+ },
188
+ {
189
+ "token": "text-to-visual-300",
190
+ "context": "Spacing (prefix to value/placeholder)"
191
+ },
192
+ {
193
+ "token": "border-width-200",
194
+ "context": "Border"
195
+ },
196
+ {
197
+ "token": "focus-indicator-thickness",
198
+ "context": "Focus indicator"
199
+ },
200
+ {
201
+ "token": "field-label-to-component",
202
+ "context": "Spacing (field label to text area)"
203
+ },
204
+ {
205
+ "token": "spacing-200",
206
+ "context": "Spacing (character count to field label)"
207
+ },
208
+ {
209
+ "token": "side-label-character-count-to-field",
210
+ "context": "Spacing (side label, field to character count)"
211
+ },
212
+ {
213
+ "token": "help-text-to-component",
214
+ "context": "Spacing (text area to help text)"
215
+ },
216
+ {
217
+ "token": "component-top-to-workflow-icon-75",
218
+ "context": "Spacing (top/bottom edge to alert icon)"
219
+ },
220
+ {
221
+ "token": "component-top-to-workflow-icon-100",
222
+ "context": "Spacing (top/bottom edge to alert icon)"
223
+ },
224
+ {
225
+ "token": "component-top-to-workflow-icon-200",
226
+ "context": "Spacing (top/bottom edge to alert icon)"
227
+ },
228
+ {
229
+ "token": "component-top-to-workflow-icon-300",
230
+ "context": "Spacing (top/bottom edge to alert icon)"
231
+ },
232
+ {
233
+ "token": "field-edge-to-alert-icon-small",
234
+ "context": "Spacing (alert icon to end edge)"
235
+ },
236
+ {
237
+ "token": "field-edge-to-alert-icon-medium",
238
+ "context": "Spacing (alert icon to end edge)"
239
+ },
240
+ {
241
+ "token": "field-edge-to-alert-icon-large",
242
+ "context": "Spacing (alert icon to end edge)"
243
+ },
244
+ {
245
+ "token": "field-edge-to-alert-icon-extra-large",
246
+ "context": "Spacing (alert icon to end edge)"
247
+ },
248
+ {
249
+ "token": "checkmark-icon-size-75",
250
+ "context": "Checkmark UI icon asset"
251
+ },
252
+ {
253
+ "token": "checkmark-icon-size-100",
254
+ "context": "Checkmark UI icon asset"
255
+ },
256
+ {
257
+ "token": "checkmark-icon-size-200",
258
+ "context": "Checkmark UI icon asset"
259
+ },
260
+ {
261
+ "token": "checkmark-icon-size-300",
262
+ "context": "Checkmark UI icon asset"
263
+ },
264
+ {
265
+ "token": "field-top-to-validation-icon-small",
266
+ "context": "Spacing (top/bottom edge to validation icon)"
267
+ },
268
+ {
269
+ "token": "field-top-to-validation-icon-medium",
270
+ "context": "Spacing (top/bottom edge to validation icon)"
271
+ },
272
+ {
273
+ "token": "field-top-to-validation-icon-large",
274
+ "context": "Spacing (top/bottom edge to validation icon)"
275
+ },
276
+ {
277
+ "token": "field-top-to-validation-icon-extra-large",
278
+ "context": "Spacing (top/bottom edge to validation icon)"
279
+ },
280
+ {
281
+ "token": "field-edge-to-validation-icon-small",
282
+ "context": "Spacing (validation icon to end edge)"
283
+ },
284
+ {
285
+ "token": "field-edge-to-validation-icon-medium",
286
+ "context": "Spacing (validation icon to end edge)"
287
+ },
288
+ {
289
+ "token": "field-edge-to-validation-icon-large",
290
+ "context": "Spacing (validation icon to end edge)"
291
+ },
292
+ {
293
+ "token": "field-edge-to-validation-icon-extra-large",
294
+ "context": "Spacing (validation icon to end edge)"
295
+ },
296
+ {
297
+ "token": "gray-25",
298
+ "context": "Background and border"
299
+ },
300
+ {
301
+ "token": "gray-300",
302
+ "context": "Background and border"
303
+ },
304
+ {
305
+ "token": "gray-400",
306
+ "context": "Background and border"
307
+ },
308
+ {
309
+ "token": "gray-900",
310
+ "context": "Background and border"
311
+ },
312
+ {
313
+ "token": "gray-800",
314
+ "context": "Background and border"
315
+ },
316
+ {
317
+ "token": "neutral-subdued-content-color-default",
318
+ "context": "Background and border"
319
+ },
320
+ {
321
+ "token": "negative-border-color-default",
322
+ "context": "Border (error)"
323
+ },
324
+ {
325
+ "token": "negative-border-color-hover",
326
+ "context": "Border (error)"
327
+ },
328
+ {
329
+ "token": "negative-border-color-focus-hover",
330
+ "context": "Border (error)"
331
+ },
332
+ {
333
+ "token": "negative-border-color-focus",
334
+ "context": "Border (error)"
335
+ },
336
+ {
337
+ "token": "negative-border-color-key-focus",
338
+ "context": "Border (error)"
339
+ },
340
+ {
341
+ "token": "neutral-content-color-default",
342
+ "context": "Value"
343
+ },
344
+ {
345
+ "token": "neutral-content-color-hover",
346
+ "context": "Value"
347
+ },
348
+ {
349
+ "token": "neutral-content-color-focus-hover",
350
+ "context": "Value"
351
+ },
352
+ {
353
+ "token": "neutral-content-color-focus",
354
+ "context": "Value"
355
+ },
356
+ {
357
+ "token": "neutral-content-color-key-focus",
358
+ "context": "Value"
359
+ },
360
+ {
361
+ "token": "negative-visual-color",
362
+ "context": "Alert icon"
363
+ },
364
+ {
365
+ "token": "positive-visual-color",
366
+ "context": "Positive icon"
367
+ },
368
+ {
369
+ "token": "disabled-border-color",
370
+ "context": "Disabled"
371
+ },
372
+ {
373
+ "token": "disabled-content-color",
374
+ "context": "Disabled"
375
+ },
376
+ {
377
+ "token": "focus-indicator-color",
378
+ "context": "Focus ring"
379
+ },
380
+ {
381
+ "token": "gray-600",
382
+ "context": "Leading icon"
383
+ },
384
+ {
385
+ "token": "default-font-family",
386
+ "context": "Label"
387
+ },
388
+ {
389
+ "token": "regular-font-weight",
390
+ "context": "Label"
391
+ },
392
+ {
393
+ "token": "default-font-style",
394
+ "context": "Label"
395
+ },
396
+ {
397
+ "token": "component-s-regular",
398
+ "context": "Label"
399
+ },
400
+ {
401
+ "token": "component-m-regular",
402
+ "context": "Label"
403
+ },
404
+ {
405
+ "token": "component-l-regular",
406
+ "context": "Label"
407
+ },
408
+ {
409
+ "token": "component-xl-regular",
410
+ "context": "Label"
411
+ },
412
+ {
413
+ "token": "line-height-font-size-75",
414
+ "context": "Label"
415
+ },
416
+ {
417
+ "token": "line-height-font-size-100",
418
+ "context": "Label"
419
+ },
420
+ {
421
+ "token": "line-height-font-size-200",
422
+ "context": "Label"
423
+ },
424
+ {
425
+ "token": "line-height-font-size-300",
426
+ "context": "Label"
427
+ },
428
+ {
429
+ "token": "cjk-line-height-100",
430
+ "context": "Label"
431
+ },
432
+ {
433
+ "token": "medium-font-weight",
434
+ "context": "Prefix"
435
+ },
436
+ {
437
+ "token": "component-s-medium",
438
+ "context": "Prefix"
439
+ },
440
+ {
441
+ "token": "component-m-medium",
442
+ "context": "Prefix"
443
+ },
444
+ {
445
+ "token": "component-l-medium",
446
+ "context": "Prefix"
447
+ },
448
+ {
449
+ "token": "component-xl-medium",
450
+ "context": "Prefix"
451
+ },
452
+ {
453
+ "token": "component-top-to-text-50",
454
+ "context": "Spacing (top/bottom edge to text)"
455
+ },
456
+ {
457
+ "token": "component-top-to-text-100",
458
+ "context": "Spacing (top/bottom edge to text)"
459
+ },
460
+ {
461
+ "token": "field-label-top-to-asterisk-large",
462
+ "context": "Spacing (top/bottom edge to required)"
463
+ },
464
+ {
465
+ "token": "field-label-top-to-asterisk-extra-large",
466
+ "context": "Spacing (top/bottom edge to required)"
467
+ },
468
+ {
469
+ "token": "component-top-to-text-300",
470
+ "context": "Leading icon (top/bottom edge to leading icon)"
471
+ },
472
+ {
473
+ "token": "component-top-to-workflow-icon-400",
474
+ "context": "Leading icon (top/bottom edge to leading icon)"
475
+ },
476
+ {
477
+ "token": "component-padding-vertical-200",
478
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
479
+ },
480
+ {
481
+ "token": "component-padding-vertical-300",
482
+ "context": "S2 Spacing (top/bottom edge to text: inline)"
483
+ }
484
+ ]
485
+ }