@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,270 @@
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/steplist.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "steplist",
6
+ "displayName": "Steplist",
7
+ "description": "Step lists display progress through a sequence of steps, with each step marked as completed, current, or incomplete.",
8
+ "meta": {
9
+ "category": "navigation",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/steplist/"
11
+ },
12
+ "options": {
13
+ "orientation": {
14
+ "type": "string",
15
+ "enum": ["horizontal", "vertical"],
16
+ "default": "horizontal"
17
+ },
18
+ "items": {
19
+ "type": "array",
20
+ "description": "An array of step items in the step list.",
21
+ "items": {
22
+ "type": "object",
23
+ "properties": {
24
+ "label": {
25
+ "type": "string",
26
+ "description": "The text displayed for the step item."
27
+ },
28
+ "isDisabled": {
29
+ "type": "boolean",
30
+ "default": false,
31
+ "description": "Whether the step item is disabled."
32
+ },
33
+ "stepState": {
34
+ "type": "string",
35
+ "enum": [
36
+ "completed default",
37
+ "completed hover",
38
+ "current default",
39
+ "incomplete default"
40
+ ],
41
+ "default": "current default",
42
+ "description": "The current state of the step item."
43
+ }
44
+ },
45
+ "required": ["label", "stepState"]
46
+ }
47
+ },
48
+ "currentStep": {
49
+ "type": "string",
50
+ "description": "The identifier or label of the currently active step."
51
+ }
52
+ },
53
+ "lifecycle": {
54
+ "introduced": "1.0.0-draft"
55
+ },
56
+ "tokenBindings": [
57
+ {
58
+ "token": "steplist-step-default-width-small",
59
+ "context": "Width small (default)"
60
+ },
61
+ {
62
+ "token": "steplist-step-default-width-medium",
63
+ "context": "Width small (default)"
64
+ },
65
+ {
66
+ "token": "steplist-step-default-width-large",
67
+ "context": "Width small (default)"
68
+ },
69
+ {
70
+ "token": "steplist-step-default-width-extra-large",
71
+ "context": "Width small (default)"
72
+ },
73
+ {
74
+ "token": "steplist-step-default-height-small",
75
+ "context": "Height small (default)"
76
+ },
77
+ {
78
+ "token": "steplist-step-default-height-medium",
79
+ "context": "Height small (default)"
80
+ },
81
+ {
82
+ "token": "steplist-step-default-height-large",
83
+ "context": "Height small (default)"
84
+ },
85
+ {
86
+ "token": "steplist-step-default-height-extra-large",
87
+ "context": "Height small (default)"
88
+ },
89
+ {
90
+ "token": "steplist-step-to-track-size-small",
91
+ "context": "Spacing (step to track)"
92
+ },
93
+ {
94
+ "token": "steplist-step-to-track-size-medium",
95
+ "context": "Spacing (step to track)"
96
+ },
97
+ {
98
+ "token": "steplist-step-to-track-size-large",
99
+ "context": "Spacing (step to track)"
100
+ },
101
+ {
102
+ "token": "steplist-step-to-track-size-extra-large",
103
+ "context": "Spacing (step to track)"
104
+ },
105
+ {
106
+ "token": "steplist-bottom-to-text",
107
+ "context": "Text adjustment"
108
+ },
109
+ {
110
+ "token": "border-width-200",
111
+ "context": "Visual border"
112
+ },
113
+ {
114
+ "token": "text-to-visual-75",
115
+ "context": "Spacing (text to visual)"
116
+ },
117
+ {
118
+ "token": "text-to-visual-100",
119
+ "context": "Spacing (text to visual)"
120
+ },
121
+ {
122
+ "token": "text-to-visual-200",
123
+ "context": "Spacing (text to visual)"
124
+ },
125
+ {
126
+ "token": "text-to-visual-300",
127
+ "context": "Spacing (text to visual)"
128
+ },
129
+ {
130
+ "token": "steplist-visual-size-small",
131
+ "context": "Visual size"
132
+ },
133
+ {
134
+ "token": "steplist-visual-size-medium",
135
+ "context": "Visual size"
136
+ },
137
+ {
138
+ "token": "steplist-visual-size-large",
139
+ "context": "Visual size"
140
+ },
141
+ {
142
+ "token": "steplist-visual-size-extra-large",
143
+ "context": "Visual size"
144
+ },
145
+ {
146
+ "token": "steplist-track-thickness-thickness",
147
+ "context": "Steplist track thickness"
148
+ },
149
+ {
150
+ "token": "neutral-subdued-content-color-default",
151
+ "context": "Step text"
152
+ },
153
+ {
154
+ "token": "neutral-subdued-content-color-hover",
155
+ "context": "Step text"
156
+ },
157
+ {
158
+ "token": "neutral-subdued-content-color-key-focus",
159
+ "context": "Step text"
160
+ },
161
+ {
162
+ "token": "neutral-content-color-default",
163
+ "context": "Step text"
164
+ },
165
+ {
166
+ "token": "neutral-content-color-key-focus",
167
+ "context": "Step text"
168
+ },
169
+ {
170
+ "token": "accent-content-color-default",
171
+ "context": "Step text"
172
+ },
173
+ {
174
+ "token": "accent-content-color-key-focus",
175
+ "context": "Step text"
176
+ },
177
+ {
178
+ "token": "neutral-subdued-background-color-default",
179
+ "context": "Step visual"
180
+ },
181
+ {
182
+ "token": "neutral-subdued-background-color-hover",
183
+ "context": "Step visual"
184
+ },
185
+ {
186
+ "token": "neutral-subdued-background-color-key-focus",
187
+ "context": "Step visual"
188
+ },
189
+ {
190
+ "token": "neutral-background-color-default",
191
+ "context": "Step visual"
192
+ },
193
+ {
194
+ "token": "neutral-background-color-key-focus",
195
+ "context": "Step visual"
196
+ },
197
+ {
198
+ "token": "neutral-visual-color",
199
+ "context": "Step visual"
200
+ },
201
+ {
202
+ "token": "accent-background-color-default",
203
+ "context": "Step visual"
204
+ },
205
+ {
206
+ "token": "accent-background-color-key-focus",
207
+ "context": "Step visual"
208
+ },
209
+ {
210
+ "token": "accent-background-color-hover",
211
+ "context": "Step visual"
212
+ },
213
+ {
214
+ "token": "gray-25",
215
+ "context": "Step visual text"
216
+ },
217
+ {
218
+ "token": "white",
219
+ "context": "Step visual text"
220
+ },
221
+ {
222
+ "token": "accent-visual-color",
223
+ "context": "Steplist track"
224
+ },
225
+ {
226
+ "token": "disabled-content-color",
227
+ "context": "Disabled"
228
+ },
229
+ {
230
+ "token": "disabled-background-color",
231
+ "context": "Disabled"
232
+ },
233
+ {
234
+ "token": "default-font-family",
235
+ "context": "Label"
236
+ },
237
+ {
238
+ "token": "regular-font-weight",
239
+ "context": "Label"
240
+ },
241
+ {
242
+ "token": "default-font-style",
243
+ "context": "Label"
244
+ },
245
+ {
246
+ "token": "font-size-75",
247
+ "context": "Label"
248
+ },
249
+ {
250
+ "token": "font-size-100",
251
+ "context": "Label"
252
+ },
253
+ {
254
+ "token": "font-size-200",
255
+ "context": "Label"
256
+ },
257
+ {
258
+ "token": "font-size-300",
259
+ "context": "Label"
260
+ },
261
+ {
262
+ "token": "line-height-100",
263
+ "context": "Label"
264
+ },
265
+ {
266
+ "token": "cjk-line-height-100",
267
+ "context": "Label"
268
+ }
269
+ ]
270
+ }
@@ -0,0 +1,62 @@
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/swatch-group.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "swatch-group",
6
+ "displayName": "Swatch group",
7
+ "description": "A swatch group is a grouping of swatches that are related to each other.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/swatch-group/"
11
+ },
12
+ "options": {
13
+ "size": {
14
+ "type": "string",
15
+ "enum": ["xs", "s", "m", "l"],
16
+ "default": "m"
17
+ },
18
+ "density": {
19
+ "type": "string",
20
+ "enum": ["compact", "regular", "spacious"],
21
+ "default": "regular"
22
+ },
23
+ "enableSelection": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "selectionMode": {
28
+ "type": "string",
29
+ "description": "Only applicable if selection is enabled.",
30
+ "enum": ["single", "multiple"],
31
+ "default": "single"
32
+ },
33
+ "allowsEmptySelection": {
34
+ "type": "boolean",
35
+ "default": false,
36
+ "description": "Only applicable if selection is enabled."
37
+ },
38
+ "cornerRadius": {
39
+ "type": "string",
40
+ "enum": ["none", "full", "partial"],
41
+ "default": "none",
42
+ "description": "Determines the corner radius of each swatch in the group. Partial refers to corner-radius-75."
43
+ }
44
+ },
45
+ "lifecycle": {
46
+ "introduced": "1.0.0-draft"
47
+ },
48
+ "tokenBindings": [
49
+ {
50
+ "token": "swatch-group-spacing-spacious",
51
+ "context": "Spacing (spacious)"
52
+ },
53
+ {
54
+ "token": "swatch-group-border-color",
55
+ "context": "Border"
56
+ },
57
+ {
58
+ "token": "swatch-group-border-opacity",
59
+ "context": "Border"
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,193 @@
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/swatch.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "swatch",
6
+ "displayName": "Swatch",
7
+ "description": "A swatch shows a small sample of a fill \u2014 such as a color, gradient, texture, or material \u2014 that is intended to be applied to an object.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/swatch/"
11
+ },
12
+ "options": {
13
+ "preview": {
14
+ "type": "string",
15
+ "description": "This will vary depending on implementation."
16
+ },
17
+ "size": {
18
+ "type": "string",
19
+ "enum": ["xs", "s", "m", "l"],
20
+ "default": "m"
21
+ },
22
+ "shape": {
23
+ "type": "string",
24
+ "enum": ["square", "rectangle"],
25
+ "default": "square"
26
+ },
27
+ "cornerRounding": {
28
+ "type": "string",
29
+ "enum": ["none", "partial", "full"],
30
+ "default": "none",
31
+ "description": "Determines the corner radius of the swatch. Partial refers to corner-radius-75."
32
+ },
33
+ "isSelected": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "isDisabled": {
38
+ "type": "boolean",
39
+ "default": false
40
+ }
41
+ },
42
+ "states": [
43
+ {
44
+ "name": "hover",
45
+ "trigger": "interaction"
46
+ },
47
+ {
48
+ "name": "down",
49
+ "trigger": "interaction"
50
+ },
51
+ {
52
+ "name": "keyboard-focus",
53
+ "trigger": "interaction"
54
+ }
55
+ ],
56
+ "lifecycle": {
57
+ "introduced": "1.0.0-draft"
58
+ },
59
+ "tokenBindings": [
60
+ {
61
+ "token": "swatch-size-extra-small",
62
+ "context": "Size (square)"
63
+ },
64
+ {
65
+ "token": "swatch-size-small",
66
+ "context": "Size (square)"
67
+ },
68
+ {
69
+ "token": "swatch-size-medium",
70
+ "context": "Size (square)"
71
+ },
72
+ {
73
+ "token": "swatch-size-large",
74
+ "context": "Size (square)"
75
+ },
76
+ {
77
+ "token": "swatch-rectangle-width-multiplier",
78
+ "context": "Width (rectangle)"
79
+ },
80
+ {
81
+ "token": "corner-radius-75",
82
+ "context": "Rounding"
83
+ },
84
+ {
85
+ "token": "border-width-100",
86
+ "context": "Border"
87
+ },
88
+ {
89
+ "token": "border-width-200",
90
+ "context": "Border and inner border (selected)"
91
+ },
92
+ {
93
+ "token": "workflow-icon-size-50",
94
+ "context": "Disabled icon asset"
95
+ },
96
+ {
97
+ "token": "workflow-icon-size-75",
98
+ "context": "Disabled icon asset"
99
+ },
100
+ {
101
+ "token": "workflow-icon-size-100",
102
+ "context": "Disabled icon asset"
103
+ },
104
+ {
105
+ "token": "workflow-icon-size-200",
106
+ "context": "Disabled icon asset"
107
+ },
108
+ {
109
+ "token": "swatch-slash-thickness-extra-small",
110
+ "context": "Slash thickness (empty)"
111
+ },
112
+ {
113
+ "token": "swatch-slash-thickness-small",
114
+ "context": "Slash thickness (empty)"
115
+ },
116
+ {
117
+ "token": "swatch-slash-thickness-medium",
118
+ "context": "Slash thickness (empty)"
119
+ },
120
+ {
121
+ "token": "swatch-slash-thickness-large",
122
+ "context": "Slash thickness (empty)"
123
+ },
124
+ {
125
+ "token": "focus-indicator-thickness",
126
+ "context": "Focus ring"
127
+ },
128
+ {
129
+ "token": "focus-indicator-gap",
130
+ "context": "Focus ring"
131
+ },
132
+ {
133
+ "token": "spacing-75",
134
+ "context": "Spacing (Tooltip to Swatch)"
135
+ },
136
+ {
137
+ "token": "swatch-border-color",
138
+ "context": "Border"
139
+ },
140
+ {
141
+ "token": "swatch-border-opacity",
142
+ "context": "Border"
143
+ },
144
+ {
145
+ "token": "gray-1000",
146
+ "context": "Border and inner border (selected)"
147
+ },
148
+ {
149
+ "token": "gray-25",
150
+ "context": "Border and inner border (selected)"
151
+ },
152
+ {
153
+ "token": "swatch-disabled-icon-border-color",
154
+ "context": "Disabled icon"
155
+ },
156
+ {
157
+ "token": "swatch-disabled-icon-border-opacity",
158
+ "context": "Disabled icon"
159
+ },
160
+ {
161
+ "token": "white",
162
+ "context": "Disabled icon"
163
+ },
164
+ {
165
+ "token": "negative-visual-color",
166
+ "context": "Slash"
167
+ },
168
+ {
169
+ "token": "neutral-content-color-default",
170
+ "context": "Dash UI icon"
171
+ },
172
+ {
173
+ "token": "gray-100",
174
+ "context": "Add \u201cbutton\u201d background"
175
+ },
176
+ {
177
+ "token": "gray-200",
178
+ "context": "Add \u201cbutton\u201d background"
179
+ },
180
+ {
181
+ "token": "focus-indicator-color",
182
+ "context": "Focus ring"
183
+ },
184
+ {
185
+ "token": "spacing-50",
186
+ "context": "Spacing (compact)"
187
+ },
188
+ {
189
+ "token": "spacing-100",
190
+ "context": "Spacing (spacious)"
191
+ }
192
+ ]
193
+ }