@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,203 @@
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/tag-field.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "tag-field",
6
+ "displayName": "Tag field",
7
+ "description": "A tag field is an input field that allows users to enter and manage tags.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/tag-field/"
11
+ },
12
+ "options": {
13
+ "size": {
14
+ "type": "string",
15
+ "enum": ["s", "m", "l"],
16
+ "default": "m"
17
+ },
18
+ "style": {
19
+ "type": "string",
20
+ "enum": ["keyword", "icon", "thumbnail", "avatar"],
21
+ "default": "keyword"
22
+ },
23
+ "isDisabled": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "hideLabel": {
28
+ "type": "boolean",
29
+ "default": false
30
+ }
31
+ },
32
+ "states": [
33
+ {
34
+ "name": "hover",
35
+ "trigger": "interaction"
36
+ },
37
+ {
38
+ "name": "focus-+-hover",
39
+ "trigger": "prop"
40
+ },
41
+ {
42
+ "name": "focus-+-not-hover",
43
+ "trigger": "prop"
44
+ },
45
+ {
46
+ "name": "keyboard-focus",
47
+ "trigger": "interaction"
48
+ }
49
+ ],
50
+ "lifecycle": {
51
+ "introduced": "1.0.0-draft"
52
+ },
53
+ "tokenBindings": [
54
+ {
55
+ "token": "tag-field-default-width-small",
56
+ "context": "Width (default)"
57
+ },
58
+ {
59
+ "token": "tag-field-default-width-medium",
60
+ "context": "Width (default)"
61
+ },
62
+ {
63
+ "token": "tag-field-default-width-large",
64
+ "context": "Width (default)"
65
+ },
66
+ {
67
+ "token": "tag-field-minimum-width",
68
+ "context": "Width (minimum)"
69
+ },
70
+ {
71
+ "token": "tag-field-minimum-height-small",
72
+ "context": "Height (minimum)"
73
+ },
74
+ {
75
+ "token": "tag-field-minimum-height-medium",
76
+ "context": "Height (minimum)"
77
+ },
78
+ {
79
+ "token": "tag-field-minimum-height-large",
80
+ "context": "Height (minimum)"
81
+ },
82
+ {
83
+ "token": "corner-radius-medium-size-small",
84
+ "context": "Rounding"
85
+ },
86
+ {
87
+ "token": "corner-radius-medium-size-medium",
88
+ "context": "Rounding"
89
+ },
90
+ {
91
+ "token": "corner-radius-medium-size-large",
92
+ "context": "Rounding"
93
+ },
94
+ {
95
+ "token": "border-width-200",
96
+ "context": "Border"
97
+ },
98
+ {
99
+ "token": "focus-indicator-thickness",
100
+ "context": "Focus indicator"
101
+ },
102
+ {
103
+ "token": "workflow-icon-size-75",
104
+ "context": "Alert icon"
105
+ },
106
+ {
107
+ "token": "workflow-icon-size-100",
108
+ "context": "Alert icon"
109
+ },
110
+ {
111
+ "token": "workflow-icon-size-200",
112
+ "context": "Alert icon"
113
+ },
114
+ {
115
+ "token": "field-edge-to-alert-icon-small",
116
+ "context": "Spacing (top/bottom edge to alert icon)"
117
+ },
118
+ {
119
+ "token": "field-edge-to-alert-icon-medium",
120
+ "context": "Spacing (top/bottom edge to alert icon)"
121
+ },
122
+ {
123
+ "token": "field-edge-to-alert-icon-large",
124
+ "context": "Spacing (top/bottom edge to alert icon)"
125
+ },
126
+ {
127
+ "token": "field-label-to-component",
128
+ "context": "Spacing (field label to tag field)"
129
+ },
130
+ {
131
+ "token": "tag-field-edge-to-content-small",
132
+ "context": "Spacing (edge to tag group)"
133
+ },
134
+ {
135
+ "token": "tag-field-edge-to-content-medium",
136
+ "context": "Spacing (edge to tag group)"
137
+ },
138
+ {
139
+ "token": "tag-field-edge-to-content-large",
140
+ "context": "Spacing (edge to tag group)"
141
+ },
142
+ {
143
+ "token": "help-text-to-component",
144
+ "context": "Spacing (tag field to help text)"
145
+ },
146
+ {
147
+ "token": "spacing-200",
148
+ "context": "Spacing (minimum, field label to field)"
149
+ },
150
+ {
151
+ "token": "gray-25",
152
+ "context": "Background and border"
153
+ },
154
+ {
155
+ "token": "gray-300",
156
+ "context": "Background and border"
157
+ },
158
+ {
159
+ "token": "gray-400",
160
+ "context": "Background and border"
161
+ },
162
+ {
163
+ "token": "gray-900",
164
+ "context": "Background and border"
165
+ },
166
+ {
167
+ "token": "gray-800",
168
+ "context": "Background and border"
169
+ },
170
+ {
171
+ "token": "negative-border-color-default",
172
+ "context": "Border (error)"
173
+ },
174
+ {
175
+ "token": "negative-border-color-hover",
176
+ "context": "Border (error)"
177
+ },
178
+ {
179
+ "token": "negative-border-color-focus-hover",
180
+ "context": "Border (error)"
181
+ },
182
+ {
183
+ "token": "negative-border-color-focus",
184
+ "context": "Border (error)"
185
+ },
186
+ {
187
+ "token": "negative-border-color-key-focus",
188
+ "context": "Border (error)"
189
+ },
190
+ {
191
+ "token": "negative-visual-color",
192
+ "context": "Alert icon"
193
+ },
194
+ {
195
+ "token": "disabled-border-color",
196
+ "context": "Disabled"
197
+ },
198
+ {
199
+ "token": "focus-indicator-color",
200
+ "context": "Focus ring"
201
+ }
202
+ ]
203
+ }
@@ -0,0 +1,53 @@
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/tag-group.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "tag-group",
6
+ "displayName": "Tag group",
7
+ "description": "A tag group is a collection of tags that represent a set of related items.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/tag-group/"
11
+ },
12
+ "options": {
13
+ "size": {
14
+ "type": "string",
15
+ "enum": ["s", "m", "l"],
16
+ "default": "m"
17
+ },
18
+ "labelPosition": {
19
+ "type": "string",
20
+ "enum": ["top", "side"],
21
+ "default": "top"
22
+ },
23
+ "hideLabel": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "actionLabel": {
28
+ "type": "string",
29
+ "description": "If undefined, this button does not appear."
30
+ }
31
+ },
32
+ "lifecycle": {
33
+ "introduced": "1.0.0-draft"
34
+ },
35
+ "tokenBindings": [
36
+ {
37
+ "token": "spacing-100",
38
+ "context": "Spacing (vertical)"
39
+ },
40
+ {
41
+ "token": "spacing-200",
42
+ "context": "Spacing (vertical)"
43
+ },
44
+ {
45
+ "token": "field-label-to-component",
46
+ "context": "Spacing (Field label to Tags)"
47
+ },
48
+ {
49
+ "token": "help-text-to-component",
50
+ "context": "Spacing (Text area to Help text)"
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,376 @@
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/tag.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "tag",
6
+ "displayName": "Tag",
7
+ "description": "Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request.",
8
+ "meta": {
9
+ "category": "navigation",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/tag/"
11
+ },
12
+ "options": {
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "hasAvatar": {
17
+ "type": "boolean",
18
+ "default": false
19
+ },
20
+ "isRemovable": {
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "isError": {
25
+ "type": "boolean",
26
+ "default": false
27
+ },
28
+ "isDisabled": {
29
+ "type": "boolean",
30
+ "default": false
31
+ },
32
+ "isReadOnly": {
33
+ "type": "boolean",
34
+ "default": false
35
+ }
36
+ },
37
+ "states": [
38
+ {
39
+ "name": "hover",
40
+ "trigger": "interaction"
41
+ },
42
+ {
43
+ "name": "down",
44
+ "trigger": "interaction"
45
+ },
46
+ {
47
+ "name": "keyboard-focus",
48
+ "trigger": "interaction"
49
+ }
50
+ ],
51
+ "lifecycle": {
52
+ "introduced": "1.0.0-draft"
53
+ },
54
+ "tokenBindings": [
55
+ {
56
+ "token": "avatar-size-50",
57
+ "context": "Components"
58
+ },
59
+ {
60
+ "token": "avatar-size-100",
61
+ "context": "Components"
62
+ },
63
+ {
64
+ "token": "thumbnail-size-50",
65
+ "context": "Components"
66
+ },
67
+ {
68
+ "token": "thumbnail-size-75",
69
+ "context": "Components"
70
+ },
71
+ {
72
+ "token": "thumbnail-size-100",
73
+ "context": "Components"
74
+ },
75
+ {
76
+ "token": "component-height-75",
77
+ "context": "Minimum height"
78
+ },
79
+ {
80
+ "token": "component-height-100",
81
+ "context": "Minimum height"
82
+ },
83
+ {
84
+ "token": "component-height-200",
85
+ "context": "Minimum height"
86
+ },
87
+ {
88
+ "token": "tag-minimum-width-small",
89
+ "context": "Minimum width (with label)"
90
+ },
91
+ {
92
+ "token": "tag-minimum-width-medium",
93
+ "context": "Minimum width (with label)"
94
+ },
95
+ {
96
+ "token": "tag-minimum-width-large",
97
+ "context": "Minimum width (with label)"
98
+ },
99
+ {
100
+ "token": "tag-maximum-width-multiplier",
101
+ "context": "Maximum width (with label)"
102
+ },
103
+ {
104
+ "token": "component-size-difference-down",
105
+ "context": "Component size (down)"
106
+ },
107
+ {
108
+ "token": "component-size-width-ratio-down",
109
+ "context": "Component size (down)"
110
+ },
111
+ {
112
+ "token": "component-size-minimum-perspective-down",
113
+ "context": "Component size (down)"
114
+ },
115
+ {
116
+ "token": "corner-radius-medium-size-small",
117
+ "context": "Rounding"
118
+ },
119
+ {
120
+ "token": "corner-radius-medium-size-medium",
121
+ "context": "Rounding"
122
+ },
123
+ {
124
+ "token": "corner-radius-medium-size-large",
125
+ "context": "Rounding"
126
+ },
127
+ {
128
+ "token": "workflow-icon-size-75",
129
+ "context": "Icon"
130
+ },
131
+ {
132
+ "token": "workflow-icon-size-100",
133
+ "context": "Icon"
134
+ },
135
+ {
136
+ "token": "workflow-icon-size-200",
137
+ "context": "Icon"
138
+ },
139
+ {
140
+ "token": "cross-icon-size-75",
141
+ "context": "Cross icon"
142
+ },
143
+ {
144
+ "token": "cross-icon-size-100",
145
+ "context": "Cross icon"
146
+ },
147
+ {
148
+ "token": "cross-icon-size-200",
149
+ "context": "Cross icon"
150
+ },
151
+ {
152
+ "token": "component-edge-to-visual-75",
153
+ "context": "Spacing (start/end edges)"
154
+ },
155
+ {
156
+ "token": "component-edge-to-visual-100",
157
+ "context": "Spacing (start/end edges)"
158
+ },
159
+ {
160
+ "token": "component-edge-to-visual-200",
161
+ "context": "Spacing (start/end edges)"
162
+ },
163
+ {
164
+ "token": "component-edge-to-text-75",
165
+ "context": "Spacing (start/end edges)"
166
+ },
167
+ {
168
+ "token": "component-edge-to-text-100",
169
+ "context": "Spacing (start/end edges)"
170
+ },
171
+ {
172
+ "token": "component-edge-to-text-200",
173
+ "context": "Spacing (start/end edges)"
174
+ },
175
+ {
176
+ "token": "text-to-visual-75",
177
+ "context": "Spacing (visual to label)"
178
+ },
179
+ {
180
+ "token": "text-to-visual-100",
181
+ "context": "Spacing (visual to label)"
182
+ },
183
+ {
184
+ "token": "text-to-visual-200",
185
+ "context": "Spacing (visual to label)"
186
+ },
187
+ {
188
+ "token": "tag-label-to-clear-icon-small",
189
+ "context": "Spacing (label to cross icon)"
190
+ },
191
+ {
192
+ "token": "tag-label-to-clear-icon-medium",
193
+ "context": "Spacing (label to cross icon)"
194
+ },
195
+ {
196
+ "token": "tag-label-to-clear-icon-large",
197
+ "context": "Spacing (label to cross icon)"
198
+ },
199
+ {
200
+ "token": "tag-edge-to-clear-icon-small",
201
+ "context": "Spacing (cross icon to end edge)"
202
+ },
203
+ {
204
+ "token": "tag-edge-to-clear-icon-medium",
205
+ "context": "Spacing (cross icon to end edge)"
206
+ },
207
+ {
208
+ "token": "tag-edge-to-clear-icon-large",
209
+ "context": "Spacing (cross icon to end edge)"
210
+ },
211
+ {
212
+ "token": "component-top-to-workflow-icon-75",
213
+ "context": "Spacing (top/bottom edge to icon)"
214
+ },
215
+ {
216
+ "token": "component-top-to-workflow-icon-100",
217
+ "context": "Spacing (top/bottom edge to icon)"
218
+ },
219
+ {
220
+ "token": "component-top-to-workflow-icon-200",
221
+ "context": "Spacing (top/bottom edge to icon)"
222
+ },
223
+ {
224
+ "token": "tag-top-to-avatar-small",
225
+ "context": "Spacing (top/bottom edge to avatar)"
226
+ },
227
+ {
228
+ "token": "tag-top-to-avatar-medium",
229
+ "context": "Spacing (top/bottom edge to avatar)"
230
+ },
231
+ {
232
+ "token": "tag-top-to-avatar-large",
233
+ "context": "Spacing (top/bottom edge to avatar)"
234
+ },
235
+ {
236
+ "token": "component-top-to-text-75",
237
+ "context": "Spacing (top edge to label)"
238
+ },
239
+ {
240
+ "token": "component-top-to-text-100",
241
+ "context": "Spacing (top edge to label)"
242
+ },
243
+ {
244
+ "token": "component-top-to-text-200",
245
+ "context": "Spacing (top edge to label)"
246
+ },
247
+ {
248
+ "token": "tag-top-to-cross-icon-small",
249
+ "context": "Spacing (top/bottom edge to cross icon)"
250
+ },
251
+ {
252
+ "token": "tag-top-to-cross-icon-medium",
253
+ "context": "Spacing (top/bottom edge to cross icon)"
254
+ },
255
+ {
256
+ "token": "tag-top-to-cross-icon-large",
257
+ "context": "Spacing (top/bottom edge to cross icon)"
258
+ },
259
+ {
260
+ "token": "focus-indicator-thickness",
261
+ "context": "Focus indicator"
262
+ },
263
+ {
264
+ "token": "focus-indicator-gap",
265
+ "context": "Focus indicator"
266
+ },
267
+ {
268
+ "token": "default-font-family",
269
+ "context": "Label"
270
+ },
271
+ {
272
+ "token": "medium-font-weight",
273
+ "context": "Label"
274
+ },
275
+ {
276
+ "token": "default-font-style",
277
+ "context": "Label"
278
+ },
279
+ {
280
+ "token": "font-size-75",
281
+ "context": "Label"
282
+ },
283
+ {
284
+ "token": "font-size-100",
285
+ "context": "Label"
286
+ },
287
+ {
288
+ "token": "font-size-200",
289
+ "context": "Label"
290
+ },
291
+ {
292
+ "token": "line-height-100",
293
+ "context": "Label"
294
+ },
295
+ {
296
+ "token": "cjk-line-height-100",
297
+ "context": "Label"
298
+ },
299
+ {
300
+ "token": "accent-background-color-default",
301
+ "context": "Background"
302
+ },
303
+ {
304
+ "token": "accent-background-color-hover",
305
+ "context": "Background"
306
+ },
307
+ {
308
+ "token": "accent-background-color-down",
309
+ "context": "Background"
310
+ },
311
+ {
312
+ "token": "accent-background-color-key-focus",
313
+ "context": "Background"
314
+ },
315
+ {
316
+ "token": "white",
317
+ "context": "Icon and Clear icon"
318
+ },
319
+ {
320
+ "token": "neutral-selected-background-color-default",
321
+ "context": "Background"
322
+ },
323
+ {
324
+ "token": "neutral-selected-background-color-hover",
325
+ "context": "Background"
326
+ },
327
+ {
328
+ "token": "neutral-selected-background-color-down",
329
+ "context": "Background"
330
+ },
331
+ {
332
+ "token": "neutral-selected-background-color-key-focus",
333
+ "context": "Background"
334
+ },
335
+ {
336
+ "token": "gray-25",
337
+ "context": "Icon and Clear icon"
338
+ },
339
+ {
340
+ "token": "gray-100",
341
+ "context": "Background"
342
+ },
343
+ {
344
+ "token": "gray-200",
345
+ "context": "Background"
346
+ },
347
+ {
348
+ "token": "neutral-content-color-default",
349
+ "context": "Icon and Clear icon and Label"
350
+ },
351
+ {
352
+ "token": "neutral-content-color-hover",
353
+ "context": "Icon and Clear icon and Label"
354
+ },
355
+ {
356
+ "token": "neutral-content-color-down",
357
+ "context": "Icon and Clear icon and Label"
358
+ },
359
+ {
360
+ "token": "neutral-content-color-key-focus",
361
+ "context": "Icon and Clear icon and Label"
362
+ },
363
+ {
364
+ "token": "disabled-background-color",
365
+ "context": "Fill"
366
+ },
367
+ {
368
+ "token": "disabled-content-color",
369
+ "context": "Icon and Clear icon"
370
+ },
371
+ {
372
+ "token": "focus-indicator-color",
373
+ "context": "Focus indicator"
374
+ }
375
+ ]
376
+ }