@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,210 @@
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/segmented-control.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "segmented-control",
6
+ "displayName": "Segmented Control",
7
+ "description": "Segmented controls allow users to select one option from a set of mutually exclusive options.",
8
+ "meta": {
9
+ "category": "navigation",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/segmented-control/"
11
+ },
12
+ "options": {
13
+ "orientation": {
14
+ "type": "string",
15
+ "enum": ["horizontal", "vertical"],
16
+ "default": "horizontal"
17
+ },
18
+ "isFluid": {
19
+ "type": "boolean",
20
+ "default": false,
21
+ "description": "If true, the control takes up the full width of its container. Only applicable to horizontal segmented controls."
22
+ },
23
+ "alignment": {
24
+ "type": "string",
25
+ "enum": ["start", "center"],
26
+ "default": "start"
27
+ },
28
+ "hideTracker": {
29
+ "type": "boolean",
30
+ "default": false,
31
+ "description": "If true, the tracker that indicates the selected item is hidden."
32
+ },
33
+ "selectedItem": {
34
+ "type": "string",
35
+ "description": "The identifier of the currently selected item."
36
+ },
37
+ "keyboardActivation": {
38
+ "type": "string",
39
+ "enum": ["manual", "automatic"],
40
+ "default": "manual"
41
+ },
42
+ "items": {
43
+ "type": "array",
44
+ "description": "An array of segmented control items.",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "label": {
49
+ "type": "string",
50
+ "description": "The text displayed for the segmented control item."
51
+ },
52
+ "isDisabled": {
53
+ "type": "boolean",
54
+ "default": false,
55
+ "description": "Whether the segmented control item is disabled."
56
+ },
57
+ "state": {
58
+ "type": "string",
59
+ "enum": ["default", "hover", "keyboard focus"],
60
+ "default": "default",
61
+ "description": "The interaction state of the segmented control item."
62
+ },
63
+ "contentVariant": {
64
+ "type": "string",
65
+ "enum": ["label-only", "icon-only", "icon-label"],
66
+ "default": "icon-label",
67
+ "description": "Controls whether the segmented control item displays a label, an icon, or both."
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "lifecycle": {
74
+ "introduced": "1.0.0-draft"
75
+ },
76
+ "tokenBindings": [
77
+ {
78
+ "token": "segmented-control-item-height",
79
+ "context": "Height "
80
+ },
81
+ {
82
+ "token": "corner-radius-medium-default",
83
+ "context": "Corner radius"
84
+ },
85
+ {
86
+ "token": "workflow-icon-size-100",
87
+ "context": "Icon "
88
+ },
89
+ {
90
+ "token": "component-edge-to-visual-only-100",
91
+ "context": "Spacing (top/bottom to edge, workflow icon only)"
92
+ },
93
+ {
94
+ "token": "text-to-visual-100",
95
+ "context": "Spacing (icon to label)"
96
+ },
97
+ {
98
+ "token": "component-edge-to-visual-100",
99
+ "context": "Spacing (start/end edges, workflow icon with label)"
100
+ },
101
+ {
102
+ "token": "component-edge-to-text-100",
103
+ "context": "Spacing (start/end edges, workflow icon with label)"
104
+ },
105
+ {
106
+ "token": "component-top-to-text-100",
107
+ "context": "Spacing (top/bottom to edge, workflow icon with label)"
108
+ },
109
+ {
110
+ "token": "component-bottom-to-text-100",
111
+ "context": "Spacing (top/bottom to edge, workflow icon with label)"
112
+ },
113
+ {
114
+ "token": "component-top-to-workflow-icon-100",
115
+ "context": "Spacing (top/bottom edge to icon, workflow icon with label)"
116
+ },
117
+ {
118
+ "token": "spacing-50",
119
+ "context": "Spacing (between segmented control items)"
120
+ },
121
+ {
122
+ "token": "spacing-75",
123
+ "context": "Spacing (between segmented control items)"
124
+ },
125
+ {
126
+ "token": "focus-indicator-thickness",
127
+ "context": "Focus ring"
128
+ },
129
+ {
130
+ "token": "focus-indicator-gap",
131
+ "context": "Focus ring"
132
+ },
133
+ {
134
+ "token": "segmented-control-selection-border-width",
135
+ "context": "Selection border"
136
+ },
137
+ {
138
+ "token": "gray-600",
139
+ "context": "Segmented control items (no track)"
140
+ },
141
+ {
142
+ "token": "neutral-subdued-content-color-hover",
143
+ "context": "Segmented control items (no track)"
144
+ },
145
+ {
146
+ "token": "neutral-subdued-content-color-key-focus",
147
+ "context": "Segmented control items (no track)"
148
+ },
149
+ {
150
+ "token": "neutral-content-color-default",
151
+ "context": "Segmented control items (no track)"
152
+ },
153
+ {
154
+ "token": "neutral-content-color-hover",
155
+ "context": "Segmented control items (no track)"
156
+ },
157
+ {
158
+ "token": "neutral-content-color-key-focus",
159
+ "context": "Segmented control items (no track)"
160
+ },
161
+ {
162
+ "token": "gray-200",
163
+ "context": "Segmented control items (no track)"
164
+ },
165
+ {
166
+ "token": "neutral-subdued-content-color-default",
167
+ "context": "Segmented control items (with track)"
168
+ },
169
+ {
170
+ "token": "gray-25",
171
+ "context": "Segmented control items (with track)"
172
+ },
173
+ {
174
+ "token": "gray-100",
175
+ "context": "Segmented control items (with track)"
176
+ },
177
+ {
178
+ "token": "disabled-content-color",
179
+ "context": "Disabled"
180
+ },
181
+ {
182
+ "token": "disabled-background-color",
183
+ "context": "Disabled"
184
+ },
185
+ {
186
+ "token": "focus-indicator-color",
187
+ "context": "Focus ring"
188
+ },
189
+ {
190
+ "token": "default-font-family",
191
+ "context": "Label"
192
+ },
193
+ {
194
+ "token": "default-font-style",
195
+ "context": "Label"
196
+ },
197
+ {
198
+ "token": "regular-font-weight",
199
+ "context": "Label"
200
+ },
201
+ {
202
+ "token": "font-size-100",
203
+ "context": "Label"
204
+ },
205
+ {
206
+ "token": "line-height-100",
207
+ "context": "Label"
208
+ }
209
+ ]
210
+ }
@@ -0,0 +1,248 @@
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/select-box.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "select-box",
6
+ "displayName": "Select box",
7
+ "meta": {
8
+ "category": "inputs",
9
+ "documentationUrl": "https://spectrum.adobe.com/page/select-box/"
10
+ },
11
+ "options": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "orientation": {
16
+ "type": "string",
17
+ "enum": ["horizontal", "vertical"],
18
+ "default": "vertical"
19
+ },
20
+ "body": {
21
+ "type": "string"
22
+ },
23
+ "isSelected": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "hideIllustration": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "showCheckbox": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "isDisabled": {
36
+ "type": "boolean",
37
+ "default": false
38
+ },
39
+ "multiple": {
40
+ "type": "boolean",
41
+ "default": false,
42
+ "description": "Set to true to allow multiple selections."
43
+ }
44
+ },
45
+ "states": [
46
+ {
47
+ "name": "down",
48
+ "trigger": "interaction"
49
+ },
50
+ {
51
+ "name": "hover",
52
+ "trigger": "interaction"
53
+ },
54
+ {
55
+ "name": "keyboard-focus",
56
+ "trigger": "interaction"
57
+ }
58
+ ],
59
+ "lifecycle": {
60
+ "introduced": "1.0.0-draft"
61
+ },
62
+ "tokenBindings": [
63
+ {
64
+ "token": "select-box-vertical-height",
65
+ "context": "Component height and width (vertical)"
66
+ },
67
+ {
68
+ "token": "select-box-vertical-edge-to-content",
69
+ "context": "Padding (vertical)"
70
+ },
71
+ {
72
+ "token": "select-box-vertical-illustration-to-label",
73
+ "context": "Spacing (illustration to text, vertical)"
74
+ },
75
+ {
76
+ "token": "select-box-horizontal-width",
77
+ "context": "Component width (horizontal)"
78
+ },
79
+ {
80
+ "token": "select-box-horizontal-minimum-width",
81
+ "context": "Component minimum width (horizontal)"
82
+ },
83
+ {
84
+ "token": "select-box-horizontal-minimum-height",
85
+ "context": "Component minimum height (horizontal)"
86
+ },
87
+ {
88
+ "token": "select-box-horizontal-top-to-content",
89
+ "context": "Padding (horizontal)"
90
+ },
91
+ {
92
+ "token": "select-box-horizontal-start-to-content",
93
+ "context": "Padding (horizontal)"
94
+ },
95
+ {
96
+ "token": "select-box-horizontal-end-to-content",
97
+ "context": "Padding (horizontal)"
98
+ },
99
+ {
100
+ "token": "select-box-horizontal-label-to-description",
101
+ "context": "Spacing (label to description, horizontal)"
102
+ },
103
+ {
104
+ "token": "select-box-horizontal-illustration-to-label",
105
+ "context": "Spacing (illustration to label, horizontal)"
106
+ },
107
+ {
108
+ "token": "border-width-200",
109
+ "context": "Border (Selected)"
110
+ },
111
+ {
112
+ "token": "component-size-difference-down",
113
+ "context": "Down state"
114
+ },
115
+ {
116
+ "token": "component-size-width-ratio-down",
117
+ "context": "Down state"
118
+ },
119
+ {
120
+ "token": "component-size-minimum-perspective-down",
121
+ "context": "Down state"
122
+ },
123
+ {
124
+ "token": "focus-indicator-thickness",
125
+ "context": "Border (Selected)"
126
+ },
127
+ {
128
+ "token": "corner-radius-700",
129
+ "context": "Border radius"
130
+ },
131
+ {
132
+ "token": "select-box-edge-to-checkbox",
133
+ "context": "Spacing (top/side edge to checkbox)"
134
+ },
135
+ {
136
+ "token": "default-font-family",
137
+ "context": "Text (vertical)"
138
+ },
139
+ {
140
+ "token": "regular-font-weight",
141
+ "context": "Text (vertical)"
142
+ },
143
+ {
144
+ "token": "default-font-style",
145
+ "context": "Text (vertical)"
146
+ },
147
+ {
148
+ "token": "font-size-100",
149
+ "context": "Text (vertical)"
150
+ },
151
+ {
152
+ "token": "line-height-100",
153
+ "context": "Text (vertical)"
154
+ },
155
+ {
156
+ "token": "cjk-line-height-100",
157
+ "context": "Text (vertical)"
158
+ },
159
+ {
160
+ "token": "bold-font-weight",
161
+ "context": "Text (horizontal)"
162
+ },
163
+ {
164
+ "token": "background-layer-2-color",
165
+ "context": "Background"
166
+ },
167
+ {
168
+ "token": "neutral-content-color-default",
169
+ "context": "Illustration color"
170
+ },
171
+ {
172
+ "token": "neutral-content-color-hover",
173
+ "context": "Illustration color"
174
+ },
175
+ {
176
+ "token": "netural-content-color-focus",
177
+ "context": "Illustration color"
178
+ },
179
+ {
180
+ "token": "select-box-selected-border-color",
181
+ "context": "Border (selected)"
182
+ },
183
+ {
184
+ "token": "gray-900",
185
+ "context": "Border (selected)"
186
+ },
187
+ {
188
+ "token": "focus-indicator-color",
189
+ "context": "Border (focus)"
190
+ },
191
+ {
192
+ "token": "disabled-content-color",
193
+ "context": "Disabled"
194
+ },
195
+ {
196
+ "token": "disabled-background-color",
197
+ "context": "Disabled"
198
+ },
199
+ {
200
+ "token": "drop-shadow-emphasized-default-x",
201
+ "context": "Default"
202
+ },
203
+ {
204
+ "token": "drop-shadow-emphasized-default-y",
205
+ "context": "Default"
206
+ },
207
+ {
208
+ "token": "drop-shadow-emphasized-default-blur",
209
+ "context": "Default"
210
+ },
211
+ {
212
+ "token": "drop-shadow-emphasized-default-color",
213
+ "context": "Default"
214
+ },
215
+ {
216
+ "token": "drop-shadow-emphasized-hover-x",
217
+ "context": "Hover"
218
+ },
219
+ {
220
+ "token": "drop-shadow-emphasized-hover-y",
221
+ "context": "Hover"
222
+ },
223
+ {
224
+ "token": "drop-shadow-emphasized-hover-blur",
225
+ "context": "Hover"
226
+ },
227
+ {
228
+ "token": "drop-shadow-emphasized-hover-color",
229
+ "context": "Hover"
230
+ },
231
+ {
232
+ "token": "drop-shadow-elevated-x",
233
+ "context": "Focus"
234
+ },
235
+ {
236
+ "token": "drop-shadow-elevated-y",
237
+ "context": "Focus"
238
+ },
239
+ {
240
+ "token": "drop-shadow-elevated-blur",
241
+ "context": "Focus"
242
+ },
243
+ {
244
+ "token": "drop-shadow-elevated-color",
245
+ "context": "Focus"
246
+ }
247
+ ]
248
+ }