@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,145 @@
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/rating.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "rating",
6
+ "displayName": "Rating",
7
+ "description": "The rating component lets users apply a rating to an item or experience, such as an image, a forum post, an item for sale in a marketplace, and more.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/rating/"
11
+ },
12
+ "options": {
13
+ "value": {
14
+ "type": "number",
15
+ "minimum": 0,
16
+ "maximum": 5,
17
+ "default": 0,
18
+ "multipleOf": 0.5,
19
+ "description": "From 0 to 5, can be a decimal to represent half stars"
20
+ },
21
+ "isEmphasized": {
22
+ "type": "boolean",
23
+ "default": false
24
+ },
25
+ "isDisabled": {
26
+ "type": "boolean",
27
+ "default": false
28
+ }
29
+ },
30
+ "states": [
31
+ {
32
+ "name": "hover",
33
+ "trigger": "interaction"
34
+ },
35
+ {
36
+ "name": "down",
37
+ "trigger": "interaction"
38
+ },
39
+ {
40
+ "name": "keyboard-focus",
41
+ "trigger": "interaction"
42
+ }
43
+ ],
44
+ "lifecycle": {
45
+ "introduced": "1.0.0-draft"
46
+ },
47
+ "tokenBindings": [
48
+ {
49
+ "token": "worfklow-icon-size-75",
50
+ "context": "Layout"
51
+ },
52
+ {
53
+ "token": "workflow-icon-size-100",
54
+ "context": "Layout"
55
+ },
56
+ {
57
+ "token": "rating-width-small",
58
+ "context": "Width"
59
+ },
60
+ {
61
+ "token": "rating-width-medium",
62
+ "context": "Width"
63
+ },
64
+ {
65
+ "token": "rating-height-small",
66
+ "context": "Height"
67
+ },
68
+ {
69
+ "token": "rating-height-medium",
70
+ "context": "Height"
71
+ },
72
+ {
73
+ "token": "corner-radius-medium-size-small",
74
+ "context": "Rounding"
75
+ },
76
+ {
77
+ "token": "corner-radius-medium-size-medium",
78
+ "context": "Rounding"
79
+ },
80
+ {
81
+ "token": "focus-indicator-thickness",
82
+ "context": "Focus ring"
83
+ },
84
+ {
85
+ "token": "focus-indicator-grap",
86
+ "context": "Focus ring"
87
+ },
88
+ {
89
+ "token": "rating-top-to-content-area-small",
90
+ "context": "Spacing (padding)"
91
+ },
92
+ {
93
+ "token": "rating-top-to-content-area-medium",
94
+ "context": "Spacing (padding)"
95
+ },
96
+ {
97
+ "token": "rating-bottom-to-content-area-small",
98
+ "context": "Spacing (padding)"
99
+ },
100
+ {
101
+ "token": "rating-bottom-to-content-area-medium",
102
+ "context": "Spacing (padding)"
103
+ },
104
+ {
105
+ "token": "rating-edge-to-content-area-small",
106
+ "context": "Spacing (padding)"
107
+ },
108
+ {
109
+ "token": "rating-edge-to-content-area-medium",
110
+ "context": "Spacing (padding)"
111
+ },
112
+ {
113
+ "token": "spacing-75",
114
+ "context": "Spacing"
115
+ },
116
+ {
117
+ "token": "neutral-content-color-default",
118
+ "context": "Default"
119
+ },
120
+ {
121
+ "token": "accent-content-color-default",
122
+ "context": "Emphasized"
123
+ },
124
+ {
125
+ "token": "accent-content-color-hover",
126
+ "context": "Hover"
127
+ },
128
+ {
129
+ "token": "neutral-content-color-hover",
130
+ "context": "Hover"
131
+ },
132
+ {
133
+ "token": "neutral-content-color-down",
134
+ "context": "Down"
135
+ },
136
+ {
137
+ "token": "accent-content-color-down",
138
+ "context": "Down"
139
+ },
140
+ {
141
+ "token": "disabled-content-color",
142
+ "context": "Disabled"
143
+ }
144
+ ]
145
+ }
@@ -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/scroll-zoom-bar.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "scroll-zoom-bar",
6
+ "displayName": "Scroll-zoom bar",
7
+ "description": "Primarily for usage in timelines, a scroll-zoom bar lets a user scroll or zoom with the same control.",
8
+ "meta": {
9
+ "category": "navigation",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/scroll-zoom-bar/"
11
+ },
12
+ "options": {
13
+ "size": {
14
+ "type": "string",
15
+ "enum": ["s", "m", "l"],
16
+ "default": "m"
17
+ },
18
+ "orientation": {
19
+ "type": "string",
20
+ "enum": ["horizontal", "vertical"],
21
+ "default": "horizontal"
22
+ },
23
+ "hideTrack": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "hideHandles": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "scaleDown": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "isDetached": {
36
+ "type": "boolean",
37
+ "default": false
38
+ }
39
+ },
40
+ "states": [
41
+ {
42
+ "name": "hover",
43
+ "trigger": "interaction"
44
+ },
45
+ {
46
+ "name": "keyboard-focus",
47
+ "trigger": "interaction"
48
+ }
49
+ ],
50
+ "lifecycle": {
51
+ "introduced": "1.0.0-draft"
52
+ }
53
+ }
@@ -0,0 +1,306 @@
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/search-field.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "search-field",
6
+ "displayName": "Search field",
7
+ "description": "A search field is used for searching and filtering items.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/search-field/"
11
+ },
12
+ "options": {
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "hideLabel": {
17
+ "type": "boolean",
18
+ "default": false
19
+ },
20
+ "icon": {
21
+ "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
22
+ "description": "Icon must be present if the label is not defined."
23
+ },
24
+ "value": {
25
+ "type": "string"
26
+ },
27
+ "width": {
28
+ "type": "number"
29
+ },
30
+ "size": {
31
+ "type": "string",
32
+ "enum": ["s", "m", "l", "xl"],
33
+ "default": "m",
34
+ "pattern": "^(x?s|m|x{0,3}l)$"
35
+ },
36
+ "helpText": {
37
+ "type": "string"
38
+ },
39
+ "placeholder": {
40
+ "type": "string"
41
+ },
42
+ "isDisabled": {
43
+ "type": "boolean",
44
+ "default": false
45
+ }
46
+ },
47
+ "states": [
48
+ {
49
+ "name": "down",
50
+ "trigger": "interaction"
51
+ },
52
+ {
53
+ "name": "hover",
54
+ "trigger": "interaction"
55
+ },
56
+ {
57
+ "name": "focus-+-hover",
58
+ "trigger": "prop"
59
+ },
60
+ {
61
+ "name": "focus-+-not-hover",
62
+ "trigger": "prop"
63
+ },
64
+ {
65
+ "name": "keyboard-focus",
66
+ "trigger": "interaction"
67
+ }
68
+ ],
69
+ "lifecycle": {
70
+ "introduced": "1.0.0-draft"
71
+ },
72
+ "tokenBindings": [
73
+ {
74
+ "token": "in-field",
75
+ "context": "Components"
76
+ },
77
+ {
78
+ "token": "search-field-minimum-width-multiplier",
79
+ "context": "Width (minimum)"
80
+ },
81
+ {
82
+ "token": "field-width",
83
+ "context": "Width (default)"
84
+ },
85
+ {
86
+ "token": "component-height-75",
87
+ "context": "Height"
88
+ },
89
+ {
90
+ "token": "component-height-100",
91
+ "context": "Height"
92
+ },
93
+ {
94
+ "token": "component-height-200",
95
+ "context": "Height"
96
+ },
97
+ {
98
+ "token": "component-height-300",
99
+ "context": "Height"
100
+ },
101
+ {
102
+ "token": "help-text-to-component",
103
+ "context": "Spacing (search field to help text)"
104
+ },
105
+ {
106
+ "token": "corner-radius-full",
107
+ "context": "Rounding"
108
+ },
109
+ {
110
+ "token": "border-width-200",
111
+ "context": "Border"
112
+ },
113
+ {
114
+ "token": "workflow-icon-size-75",
115
+ "context": "Icon"
116
+ },
117
+ {
118
+ "token": "workflow-icon-size-100",
119
+ "context": "Icon"
120
+ },
121
+ {
122
+ "token": "workflow-icon-size-200",
123
+ "context": "Icon"
124
+ },
125
+ {
126
+ "token": "workflow-icon-size-300",
127
+ "context": "Icon"
128
+ },
129
+ {
130
+ "token": "component-pill-edge-to-text-75",
131
+ "context": "Spacing (start/end edge to text)"
132
+ },
133
+ {
134
+ "token": "component-pill-edge-to-text-100",
135
+ "context": "Spacing (start/end edge to text)"
136
+ },
137
+ {
138
+ "token": "component-pill-edge-to-text-200",
139
+ "context": "Spacing (start/end edge to text)"
140
+ },
141
+ {
142
+ "token": "component-pill-edge-to-text-300",
143
+ "context": "Spacing (start/end edge to text)"
144
+ },
145
+ {
146
+ "token": "component-pill-edge-to-visual-75",
147
+ "context": "Spacing (start/end edge to text)"
148
+ },
149
+ {
150
+ "token": "component-pill-edge-to-visual-100",
151
+ "context": "Spacing (start/end edge to text)"
152
+ },
153
+ {
154
+ "token": "component-pill-edge-to-visual-200",
155
+ "context": "Spacing (start/end edge to text)"
156
+ },
157
+ {
158
+ "token": "component-pill-edge-to-visual-300",
159
+ "context": "Spacing (start/end edge to text)"
160
+ },
161
+ {
162
+ "token": "text-to-visual-75",
163
+ "context": "Spacing (icon to text)"
164
+ },
165
+ {
166
+ "token": "text-to-visual-100",
167
+ "context": "Spacing (icon to text)"
168
+ },
169
+ {
170
+ "token": "text-to-visual-200",
171
+ "context": "Spacing (icon to text)"
172
+ },
173
+ {
174
+ "token": "text-to-visual-300",
175
+ "context": "Spacing (icon to text)"
176
+ },
177
+ {
178
+ "token": "component-top-to-workflow-icon-75",
179
+ "context": "Spacing (top edge to icon)"
180
+ },
181
+ {
182
+ "token": "component-top-to-workflow-icon-100",
183
+ "context": "Spacing (top edge to icon)"
184
+ },
185
+ {
186
+ "token": "component-top-to-workflow-icon-200",
187
+ "context": "Spacing (top edge to icon)"
188
+ },
189
+ {
190
+ "token": "component-top-to-workflow-icon-300",
191
+ "context": "Spacing (top edge to icon)"
192
+ },
193
+ {
194
+ "token": "focus-indicator-thickness",
195
+ "context": "Focus indicator"
196
+ },
197
+ {
198
+ "token": "focus-indicator-gap",
199
+ "context": "Focus indicator"
200
+ },
201
+ {
202
+ "token": "default-font-family",
203
+ "context": "Label"
204
+ },
205
+ {
206
+ "token": "regular-font-weight",
207
+ "context": "Label"
208
+ },
209
+ {
210
+ "token": "default-font-style",
211
+ "context": "Label"
212
+ },
213
+ {
214
+ "token": "component-s-regular",
215
+ "context": "Label"
216
+ },
217
+ {
218
+ "token": "component-m-regular",
219
+ "context": "Label"
220
+ },
221
+ {
222
+ "token": "component-l-regular",
223
+ "context": "Label"
224
+ },
225
+ {
226
+ "token": "component-xl-regular",
227
+ "context": "Label"
228
+ },
229
+ {
230
+ "token": "line-height-font-size-75",
231
+ "context": "Label"
232
+ },
233
+ {
234
+ "token": "line-height-font-size-100",
235
+ "context": "Label"
236
+ },
237
+ {
238
+ "token": "line-height-font-size-200",
239
+ "context": "Label"
240
+ },
241
+ {
242
+ "token": "line-height-font-size-300",
243
+ "context": "Label"
244
+ },
245
+ {
246
+ "token": "cjk-line-height-100",
247
+ "context": "Label"
248
+ },
249
+ {
250
+ "token": "gray-25",
251
+ "context": "Background and border"
252
+ },
253
+ {
254
+ "token": "gray-300",
255
+ "context": "Background and border"
256
+ },
257
+ {
258
+ "token": "gray-400",
259
+ "context": "Background and border"
260
+ },
261
+ {
262
+ "token": "gray-900",
263
+ "context": "Background and border"
264
+ },
265
+ {
266
+ "token": "gray-800",
267
+ "context": "Background and border"
268
+ },
269
+ {
270
+ "token": "neutral-content-color-default",
271
+ "context": "Value, label and icon"
272
+ },
273
+ {
274
+ "token": "neutral-content-color-hover",
275
+ "context": "Value, label and icon"
276
+ },
277
+ {
278
+ "token": "neutral-content-color-focus-hover",
279
+ "context": "Value, label and icon"
280
+ },
281
+ {
282
+ "token": "neutral-content-color-focus",
283
+ "context": "Value, label and icon"
284
+ },
285
+ {
286
+ "token": "neutral-content-color-key-focus",
287
+ "context": "Value, label and icon"
288
+ },
289
+ {
290
+ "token": "gray-600",
291
+ "context": "Value, label and icon"
292
+ },
293
+ {
294
+ "token": "disabled-content-color",
295
+ "context": "Background and border (disabled)"
296
+ },
297
+ {
298
+ "token": "disabled-border-color",
299
+ "context": "Background and border (disabled)"
300
+ },
301
+ {
302
+ "token": "focus-indicator-color",
303
+ "context": "Focus ring"
304
+ }
305
+ ]
306
+ }