@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,182 @@
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/progress-bar.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "progress-bar",
6
+ "displayName": "Progress bar",
7
+ "description": "Progress bars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way. They can represent either determinate or indeterminate progress.",
8
+ "meta": {
9
+ "category": "status",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/progress-bar/"
11
+ },
12
+ "options": {
13
+ "variant": {
14
+ "type": "string",
15
+ "enum": ["default", "over background"],
16
+ "default": "default"
17
+ },
18
+ "staticColor": {
19
+ "type": "string",
20
+ "enum": ["white"],
21
+ "description": "Static color can only be white, otherwise it is default."
22
+ },
23
+ "label": {
24
+ "type": "string"
25
+ },
26
+ "labelPosition": {
27
+ "type": "string",
28
+ "enum": ["top", "side"],
29
+ "default": "top"
30
+ },
31
+ "hideLabel": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "value": {
36
+ "type": "number",
37
+ "description": "Not applicable when indeterminate."
38
+ },
39
+ "minValue": {
40
+ "type": "number",
41
+ "default": 0,
42
+ "description": "Not applicable when indeterminate."
43
+ },
44
+ "maxValue": {
45
+ "type": "number",
46
+ "default": 1,
47
+ "description": "Not applicable when indeterminate."
48
+ },
49
+ "valueLabel": {
50
+ "type": "string"
51
+ },
52
+ "width": {
53
+ "type": "number"
54
+ },
55
+ "size": {
56
+ "type": "string",
57
+ "enum": ["s", "m", "l", "xl"],
58
+ "default": "m"
59
+ },
60
+ "isIndeterminate": {
61
+ "type": "boolean",
62
+ "default": false
63
+ }
64
+ },
65
+ "lifecycle": {
66
+ "introduced": "1.0.0-draft"
67
+ },
68
+ "tokenBindings": [
69
+ {
70
+ "token": "progress-bar-minimum-width",
71
+ "context": "Minimum width"
72
+ },
73
+ {
74
+ "token": "progress-bar-maximum-width",
75
+ "context": "Maximum width"
76
+ },
77
+ {
78
+ "token": "spacing-75",
79
+ "context": "Spacing (field label to progress bar)"
80
+ },
81
+ {
82
+ "token": "spacing-200",
83
+ "context": "Minimum spacing (field label to text)"
84
+ },
85
+ {
86
+ "token": "component-top-to-text-75",
87
+ "context": "Spacing (top edge to text)"
88
+ },
89
+ {
90
+ "token": "component-top-to-text-100",
91
+ "context": "Spacing (top edge to text)"
92
+ },
93
+ {
94
+ "token": "component-top-to-text-200",
95
+ "context": "Spacing (top edge to text)"
96
+ },
97
+ {
98
+ "token": "component-top-to-text-300",
99
+ "context": "Spacing (top edge to text)"
100
+ },
101
+ {
102
+ "token": "progress-bar-thickness-small",
103
+ "context": "Thickness (track)"
104
+ },
105
+ {
106
+ "token": "progress-bar-thickness-medium",
107
+ "context": "Thickness (track)"
108
+ },
109
+ {
110
+ "token": "progress-bar-thickness-large",
111
+ "context": "Thickness (track)"
112
+ },
113
+ {
114
+ "token": "progress-bar-thickness-extra-large",
115
+ "context": "Thickness (track)"
116
+ },
117
+ {
118
+ "token": "corner-radius-full",
119
+ "context": "Rounding"
120
+ },
121
+ {
122
+ "token": "default-font-family",
123
+ "context": "Value"
124
+ },
125
+ {
126
+ "token": "regular-font-weight",
127
+ "context": "Value"
128
+ },
129
+ {
130
+ "token": "default-font-style",
131
+ "context": "Value"
132
+ },
133
+ {
134
+ "token": "font-size-75",
135
+ "context": "Value"
136
+ },
137
+ {
138
+ "token": "font-size-100",
139
+ "context": "Value"
140
+ },
141
+ {
142
+ "token": "font-size-200",
143
+ "context": "Value"
144
+ },
145
+ {
146
+ "token": "font-size-300",
147
+ "context": "Value"
148
+ },
149
+ {
150
+ "token": "line-height-100",
151
+ "context": "Value"
152
+ },
153
+ {
154
+ "token": "cjk-line-height-100",
155
+ "context": "Value"
156
+ },
157
+ {
158
+ "token": "neutral-subdued-content-color-default",
159
+ "context": "Text"
160
+ },
161
+ {
162
+ "token": "track-color",
163
+ "context": "Track and indicator"
164
+ },
165
+ {
166
+ "token": "accent-content-color-default",
167
+ "context": "Track and indicator"
168
+ },
169
+ {
170
+ "token": "static-white-text-color",
171
+ "context": "Text (white)"
172
+ },
173
+ {
174
+ "token": "static-white-track-color",
175
+ "context": "Track and indicator (white)"
176
+ },
177
+ {
178
+ "token": "static-white-track-indicator-color",
179
+ "context": "Track and indicator (white)"
180
+ }
181
+ ]
182
+ }
@@ -0,0 +1,99 @@
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/progress-circle.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "progress-circle",
6
+ "displayName": "Progress circle",
7
+ "description": "Progress circles show the progression of a system operation such as downloading, uploading, processing, etc. in a visual way. They can represent determinate or indeterminate progress.",
8
+ "meta": {
9
+ "category": "status",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/progress-circle/"
11
+ },
12
+ "options": {
13
+ "variant": {
14
+ "type": "string",
15
+ "enum": ["default", "over background"],
16
+ "default": "default"
17
+ },
18
+ "value": {
19
+ "type": "number",
20
+ "description": "Not applicable when indeterminate."
21
+ },
22
+ "minValue": {
23
+ "type": "number",
24
+ "default": 0,
25
+ "description": "Not applicable when indeterminate."
26
+ },
27
+ "maxValue": {
28
+ "type": "number",
29
+ "default": 1,
30
+ "description": "Not applicable when indeterminate."
31
+ },
32
+ "size": {
33
+ "type": "string",
34
+ "enum": ["s", "m", "l"],
35
+ "default": "m"
36
+ },
37
+ "isIndeterminate": {
38
+ "type": "boolean",
39
+ "default": false
40
+ }
41
+ },
42
+ "lifecycle": {
43
+ "introduced": "1.0.0-draft"
44
+ },
45
+ "tokenBindings": [
46
+ {
47
+ "token": "progress-circle-size-small",
48
+ "context": "Size"
49
+ },
50
+ {
51
+ "token": "progress-circle-size-medium",
52
+ "context": "Size"
53
+ },
54
+ {
55
+ "token": "progress-circle-size-large",
56
+ "context": "Size"
57
+ },
58
+ {
59
+ "token": "progress-circle-thickness-small",
60
+ "context": "Thickness"
61
+ },
62
+ {
63
+ "token": "progress-circle-thickness-medium",
64
+ "context": "Thickness"
65
+ },
66
+ {
67
+ "token": "progress-circle-thickness-large",
68
+ "context": "Thickness"
69
+ },
70
+ {
71
+ "token": "corner-radius-full",
72
+ "context": "Rounding (fill)"
73
+ },
74
+ {
75
+ "token": "track-color",
76
+ "context": "Track and fill"
77
+ },
78
+ {
79
+ "token": "accent-content-color-default",
80
+ "context": "Track and fill"
81
+ },
82
+ {
83
+ "token": "static-white-track-color",
84
+ "context": "Track and fill (white)"
85
+ },
86
+ {
87
+ "token": "static-white-track-indicator-color",
88
+ "context": "Track and fill (white)"
89
+ },
90
+ {
91
+ "token": "static-black-track-color",
92
+ "context": "Track and fill (black)"
93
+ },
94
+ {
95
+ "token": "static-black-track-indicator-color",
96
+ "context": "Track and fill (black)"
97
+ }
98
+ ]
99
+ }
@@ -0,0 +1,285 @@
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/radio-button.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "radio-button",
6
+ "displayName": "Radio button",
7
+ "description": "Radio buttons allow users to select a single option from a list of mutually exclusive options.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/radio-button/"
11
+ },
12
+ "options": {
13
+ "isSelected": {
14
+ "type": "boolean",
15
+ "default": false
16
+ },
17
+ "isEmphasized": {
18
+ "type": "boolean",
19
+ "default": false
20
+ },
21
+ "label": {
22
+ "type": "string",
23
+ "description": "The text displayed next to a radio button."
24
+ }
25
+ },
26
+ "states": [
27
+ {
28
+ "name": "hover",
29
+ "trigger": "interaction"
30
+ },
31
+ {
32
+ "name": "down",
33
+ "trigger": "interaction"
34
+ },
35
+ {
36
+ "name": "keyboard-focus",
37
+ "trigger": "interaction"
38
+ }
39
+ ],
40
+ "lifecycle": {
41
+ "introduced": "1.0.0-draft"
42
+ },
43
+ "tokenBindings": [
44
+ {
45
+ "token": "radio-button-control-size-small",
46
+ "context": "S2 Control (size)"
47
+ },
48
+ {
49
+ "token": "radio-button-control-size-medium",
50
+ "context": "S2 Control (size)"
51
+ },
52
+ {
53
+ "token": "radio-button-control-size-large",
54
+ "context": "S2 Control (size)"
55
+ },
56
+ {
57
+ "token": "radio-button-control-size-extra-large",
58
+ "context": "S2 Control (size)"
59
+ },
60
+ {
61
+ "token": "radio-button-top-to-control-small",
62
+ "context": "S2 Spacing (top edge to control)"
63
+ },
64
+ {
65
+ "token": "radio-button-top-to-control-medium",
66
+ "context": "S2 Spacing (top edge to control)"
67
+ },
68
+ {
69
+ "token": "radio-button-top-to-control-large",
70
+ "context": "S2 Spacing (top edge to control)"
71
+ },
72
+ {
73
+ "token": "radio-button-top-to-control-extra-large",
74
+ "context": "S2 Spacing (top edge to control)"
75
+ },
76
+ {
77
+ "token": "neutral-content-color-selected-default",
78
+ "context": "S2 Control (selected, non emphasized)"
79
+ },
80
+ {
81
+ "token": "neutral-content-color-selected-hover",
82
+ "context": "S2 Control (selected, non emphasized)"
83
+ },
84
+ {
85
+ "token": "neutral-content-color-selected-key-focus",
86
+ "context": "S2 Control (selected, non emphasized)"
87
+ },
88
+ {
89
+ "token": "neutral-background-color-selected-default",
90
+ "context": "S1 Control (selected, non emphasized)"
91
+ },
92
+ {
93
+ "token": "neutral-background-color-selected-hover",
94
+ "context": "S1 Control (selected, non emphasized)"
95
+ },
96
+ {
97
+ "token": "neutral-background-color-selected-key-focus",
98
+ "context": "S1 Control (selected, non emphasized)"
99
+ },
100
+ {
101
+ "token": "component-height-75",
102
+ "context": "Minimum height"
103
+ },
104
+ {
105
+ "token": "component-height-100",
106
+ "context": "Minimum height"
107
+ },
108
+ {
109
+ "token": "component-height-200",
110
+ "context": "Minimum height"
111
+ },
112
+ {
113
+ "token": "component-height-300",
114
+ "context": "Minimum height"
115
+ },
116
+ {
117
+ "token": "component-size-difference-down",
118
+ "context": "Component size (down)"
119
+ },
120
+ {
121
+ "token": "component-size-width-ratio-down",
122
+ "context": "Component size (down)"
123
+ },
124
+ {
125
+ "token": "component-size-minimum-perspective-down",
126
+ "context": "Component size (down)"
127
+ },
128
+ {
129
+ "token": "border-width-200",
130
+ "context": "Control (border)"
131
+ },
132
+ {
133
+ "token": "text-to-control-75",
134
+ "context": "Spacing (control to label)"
135
+ },
136
+ {
137
+ "token": "text-to-control-100",
138
+ "context": "Spacing (control to label)"
139
+ },
140
+ {
141
+ "token": "text-to-control-200",
142
+ "context": "Spacing (control to label)"
143
+ },
144
+ {
145
+ "token": "text-to-control-300",
146
+ "context": "Spacing (control to label)"
147
+ },
148
+ {
149
+ "token": "component-top-to-text-75",
150
+ "context": "Spacing (top/bottom edge to label)"
151
+ },
152
+ {
153
+ "token": "component-top-to-text-100",
154
+ "context": "Spacing (top/bottom edge to label)"
155
+ },
156
+ {
157
+ "token": "component-top-to-text-200",
158
+ "context": "Spacing (top/bottom edge to label)"
159
+ },
160
+ {
161
+ "token": "component-top-to-text-300",
162
+ "context": "Spacing (top/bottom edge to label)"
163
+ },
164
+ {
165
+ "token": "component-bottom-to-text-75",
166
+ "context": "Spacing (top/bottom edge to label)"
167
+ },
168
+ {
169
+ "token": "component-bottom-to-text-100",
170
+ "context": "Spacing (top/bottom edge to label)"
171
+ },
172
+ {
173
+ "token": "component-bottom-to-text-200",
174
+ "context": "Spacing (top/bottom edge to label)"
175
+ },
176
+ {
177
+ "token": "component-bottom-to-text-300",
178
+ "context": "Spacing (top/bottom edge to label)"
179
+ },
180
+ {
181
+ "token": "focus-indicator-thickness",
182
+ "context": "Focus ring"
183
+ },
184
+ {
185
+ "token": "focus-indicator-gap",
186
+ "context": "Focus ring"
187
+ },
188
+ {
189
+ "token": "radio-button-selection-indicator",
190
+ "context": "Selection indicator"
191
+ },
192
+ {
193
+ "token": "spacing-300",
194
+ "context": "Radio group spacing (horizontal)"
195
+ },
196
+ {
197
+ "token": "neutral-content-color-default",
198
+ "context": "Label"
199
+ },
200
+ {
201
+ "token": "neutral-content-color-hover",
202
+ "context": "Label"
203
+ },
204
+ {
205
+ "token": "neutral-content-color-down",
206
+ "context": "Label"
207
+ },
208
+ {
209
+ "token": "neutral-content-color-key-focus",
210
+ "context": "Label"
211
+ },
212
+ {
213
+ "token": "gray-25",
214
+ "context": "Control"
215
+ },
216
+ {
217
+ "token": "accent-content-color-default",
218
+ "context": "Control (selected, emphasized)"
219
+ },
220
+ {
221
+ "token": "accent-content-color-hover",
222
+ "context": "Control (selected, emphasized)"
223
+ },
224
+ {
225
+ "token": "accent-content-color-down",
226
+ "context": "Control (selected, emphasized)"
227
+ },
228
+ {
229
+ "token": "accent-content-color-key-focus",
230
+ "context": "Control (selected, emphasized)"
231
+ },
232
+ {
233
+ "token": "disabled-content-color",
234
+ "context": "Label (disabled)"
235
+ },
236
+ {
237
+ "token": "focus-indicator-color",
238
+ "context": "Focus ring"
239
+ },
240
+ {
241
+ "token": "negative-color-900",
242
+ "context": "Radio button colors"
243
+ },
244
+ {
245
+ "token": "negative-color-1000",
246
+ "context": "Radio button colors"
247
+ },
248
+ {
249
+ "token": "default-font-family",
250
+ "context": "Label"
251
+ },
252
+ {
253
+ "token": "regular-font-weight",
254
+ "context": "Label"
255
+ },
256
+ {
257
+ "token": "default-font-style",
258
+ "context": "Label"
259
+ },
260
+ {
261
+ "token": "font-size-75",
262
+ "context": "Label"
263
+ },
264
+ {
265
+ "token": "font-size-100",
266
+ "context": "Label"
267
+ },
268
+ {
269
+ "token": "font-size-200",
270
+ "context": "Label"
271
+ },
272
+ {
273
+ "token": "font-size-300",
274
+ "context": "Label"
275
+ },
276
+ {
277
+ "token": "line-height-100",
278
+ "context": "Label"
279
+ },
280
+ {
281
+ "token": "cjk-line-height-100",
282
+ "context": "Label"
283
+ }
284
+ ]
285
+ }
@@ -0,0 +1,63 @@
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/radio-group.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "radio-group",
6
+ "displayName": "Radio Group",
7
+ "description": "A radio group is a grouping of radio buttons that are related to each other.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/radio-group/"
11
+ },
12
+ "options": {
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "labelPosition": {
17
+ "type": "string",
18
+ "enum": ["top", "side"],
19
+ "default": "top"
20
+ },
21
+ "orientation": {
22
+ "type": "string",
23
+ "enum": ["horizontal", "vertical"],
24
+ "default": "vertical"
25
+ },
26
+ "size": {
27
+ "type": "string",
28
+ "enum": ["s", "m", "l", "xl"],
29
+ "default": "m"
30
+ },
31
+ "isEmphasized": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "necessityIndicator": {
36
+ "type": "string",
37
+ "enum": ["text", "icon"],
38
+ "default": "icon"
39
+ },
40
+ "isRequired": {
41
+ "type": "boolean",
42
+ "default": false
43
+ },
44
+ "isError": {
45
+ "type": "boolean",
46
+ "default": false
47
+ },
48
+ "isDisabled": {
49
+ "type": "boolean",
50
+ "default": false
51
+ },
52
+ "errorMessage": {
53
+ "type": "string"
54
+ },
55
+ "description": {
56
+ "type": "string"
57
+ }
58
+ },
59
+ "lifecycle": {
60
+ "introduced": "1.0.0-draft"
61
+ },
62
+ "tokenBindings": []
63
+ }