@adobe/spectrum-design-data 0.3.0 → 0.6.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 (99) hide show
  1. package/LICENSE +1 -1
  2. package/components/accordion.json +108 -194
  3. package/components/action-bar.json +64 -97
  4. package/components/action-button.json +95 -230
  5. package/components/action-group.json +88 -86
  6. package/components/alert-banner.json +104 -76
  7. package/components/alert-dialog.json +78 -126
  8. package/components/avatar-group.json +61 -119
  9. package/components/avatar.json +98 -212
  10. package/components/badge.json +138 -256
  11. package/components/breadcrumbs.json +95 -89
  12. package/components/button-group.json +57 -48
  13. package/components/button.json +151 -368
  14. package/components/calendar.json +97 -34
  15. package/components/cards.json +109 -250
  16. package/components/checkbox-group.json +50 -58
  17. package/components/checkbox.json +121 -186
  18. package/components/close-button.json +61 -124
  19. package/components/coach-indicator.json +63 -72
  20. package/components/coach-mark.json +89 -93
  21. package/components/color-area.json +68 -94
  22. package/components/color-handle.json +39 -79
  23. package/components/color-loupe.json +35 -52
  24. package/components/color-slider.json +95 -116
  25. package/components/color-wheel.json +67 -73
  26. package/components/combo-box.json +243 -331
  27. package/components/contextual-help.json +86 -175
  28. package/components/date-picker.json +139 -179
  29. package/components/divider.json +30 -69
  30. package/components/drop-zone.json +51 -92
  31. package/components/field-label.json +75 -117
  32. package/components/help-text.json +81 -105
  33. package/components/illustrated-message.json +106 -73
  34. package/components/in-line-alert.json +50 -83
  35. package/components/link.json +63 -85
  36. package/components/list-view.json +107 -146
  37. package/components/menu.json +180 -274
  38. package/components/meter.json +72 -118
  39. package/components/number-field.json +213 -305
  40. package/components/picker.json +208 -320
  41. package/components/popover.json +94 -129
  42. package/components/progress-bar.json +94 -131
  43. package/components/progress-circle.json +45 -72
  44. package/components/radio-button.json +87 -156
  45. package/components/radio-group.json +107 -74
  46. package/components/rating.json +66 -99
  47. package/components/search-field.json +132 -202
  48. package/components/segmented-control.json +94 -109
  49. package/components/select-box.json +119 -179
  50. package/components/side-navigation.json +108 -118
  51. package/components/slider.json +143 -228
  52. package/components/standard-dialog.json +96 -114
  53. package/components/standard-panel.json +105 -53
  54. package/components/status-light.json +104 -240
  55. package/components/steplist.json +77 -161
  56. package/components/swatch-group.json +42 -58
  57. package/components/swatch.json +75 -162
  58. package/components/switch.json +101 -189
  59. package/components/table.json +97 -102
  60. package/components/tabs.json +77 -104
  61. package/components/tag-field.json +86 -150
  62. package/components/tag-group.json +50 -44
  63. package/components/tag.json +81 -198
  64. package/components/takeover-dialog.json +59 -57
  65. package/components/text-area.json +200 -323
  66. package/components/text-field.json +183 -304
  67. package/components/thumbnail.json +63 -105
  68. package/components/toast.json +97 -83
  69. package/components/tooltip.json +104 -96
  70. package/components/tree-view.json +169 -181
  71. package/guidelines/app-frame-content-area.json +87 -0
  72. package/guidelines/app-frame-creating-bluelines.json +61 -0
  73. package/guidelines/app-frame-header.json +75 -0
  74. package/guidelines/app-frame-overview.json +167 -0
  75. package/guidelines/app-frame-side-navigation.json +138 -0
  76. package/guidelines/attention-hierarchy.json +42 -0
  77. package/guidelines/background-layers.json +41 -0
  78. package/guidelines/brand.json +50 -0
  79. package/guidelines/colors.json +65 -0
  80. package/guidelines/containers.json +65 -0
  81. package/guidelines/developer-overview.json +38 -0
  82. package/guidelines/faqs.json +35 -0
  83. package/guidelines/fonts.json +58 -0
  84. package/guidelines/grays.json +69 -0
  85. package/guidelines/icon-fundamentals.json +45 -0
  86. package/guidelines/illustrations.json +114 -0
  87. package/guidelines/introduction.json +34 -0
  88. package/guidelines/manifest.json +204 -0
  89. package/guidelines/motion.json +41 -0
  90. package/guidelines/object-styles.json +105 -0
  91. package/guidelines/principles.json +30 -0
  92. package/guidelines/resources.json +59 -0
  93. package/guidelines/spacing.json +25 -0
  94. package/guidelines/states.json +34 -0
  95. package/guidelines/typography-fundamentals.json +145 -0
  96. package/guidelines/using-icons.json +110 -0
  97. package/package.json +5 -2
  98. package/tokens/layout-component.tokens.json +72 -36
  99. package/tokens/layout.tokens.json +207 -92
@@ -9,83 +9,75 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/checkbox-group/"
11
11
  },
12
- "options": {
13
- "label": {
14
- "type": "string"
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "A checkbox group is a grouping of checkboxes that are related to each other."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "When a description is present and an error is triggered, it is replaced with an error message. Once the error is resolved, the help text description reappears."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "A checkbox group in a disabled state shows that a selection exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later. The field label, checkboxes, and help text are all displayed in a disabled state when the checkbox group is disabled."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "Checkbox groups can be either horizontal or vertical. By default, checkbox groups are stacked vertically. Use a horizontal checkbox group when vertical space is limited."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "Checkbox groups can be marked as optional or required, depending on the situation. Optional checkbox groups are either denoted with text added to the end of the label — “(optional)” — or have no indication at all."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "For required checkbox groups, there are two necessity indicator options: a “(required)” label or an asterisk. If you use an asterisk, be sure to include help text to explain what the asterisk means."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "The asterisk used in this component is an icon that has specific spacing from the label text — not part of the label text itself."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Labels can be placed either on top or on the side. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
15
44
  },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Checkbox groups should always have a label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These checkbox groups without a visible label should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
48
+ }
49
+ ],
50
+ "options": {
51
+ "label": { "type": "string" },
16
52
  "labelPosition": {
17
53
  "type": "string",
18
54
  "default": "top",
19
- "values": [
20
- {
21
- "value": "top"
22
- },
23
- {
24
- "value": "side"
25
- }
26
- ]
55
+ "values": [{ "value": "top" }, { "value": "side" }]
27
56
  },
28
57
  "necessityIndicator": {
29
58
  "type": "string",
30
59
  "default": "icon",
31
- "values": [
32
- {
33
- "value": "text"
34
- },
35
- {
36
- "value": "icon"
37
- }
38
- ]
39
- },
40
- "isRequired": {
41
- "type": "boolean",
42
- "default": false
60
+ "values": [{ "value": "text" }, { "value": "icon" }]
43
61
  },
62
+ "isRequired": { "type": "boolean", "default": false },
44
63
  "orientation": {
45
64
  "type": "string",
46
65
  "default": "vertical",
47
- "values": [
48
- {
49
- "value": "horizontal"
50
- },
51
- {
52
- "value": "vertical"
53
- }
54
- ]
55
- },
56
- "isError": {
57
- "type": "boolean",
58
- "default": false
66
+ "values": [{ "value": "horizontal" }, { "value": "vertical" }]
59
67
  },
60
- "isDisabled": {
61
- "type": "boolean",
62
- "default": false
63
- },
64
- "description": {
65
- "type": "string"
66
- },
67
- "errorMessage": {
68
- "type": "string"
69
- }
70
- },
71
- "lifecycle": {
72
- "introduced": "1.0.0-draft"
68
+ "isError": { "type": "boolean", "default": false },
69
+ "isDisabled": { "type": "boolean", "default": false },
70
+ "description": { "type": "string" },
71
+ "errorMessage": { "type": "string" }
73
72
  },
73
+ "lifecycle": { "introduced": "1.0.0-draft" },
74
74
  "tokenBindings": [],
75
75
  "accessibility": {
76
76
  "intents": ["choose"],
77
77
  "focusable": false,
78
78
  "wcag": [
79
- {
80
- "criterion": "1.3.1",
81
- "level": "A",
82
- "title": "Info and Relationships"
83
- },
84
- {
85
- "criterion": "4.1.2",
86
- "level": "A",
87
- "title": "Name, Role, Value"
88
- }
79
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
80
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
89
81
  ]
90
82
  }
91
83
  }
@@ -9,15 +9,86 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/checkbox/"
11
11
  },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Checkboxes support selecting one or more items from a list. Each item can be selected independently or in combination with others."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Checkboxes can be marked as having an error to show that a selection needs to be made in order to move forward, or that a selection that was made is invalid. For example, in a form that requires a user to acknowledge legal terms before proceeding, the checkbox would show an unchecked error to communicate that it needs to be selected."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "A checkbox in a disabled state shows that a selection exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "By default, checkboxes are not emphasized (gray). This version is optimal for when the checkbox is not the core part of an interface, such as in application panels, where all visual components are monochrome in order to direct focus to the content."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "The emphasized (blue) version provides a visual prominence that is optimal for forms, settings, lists or grids of assets, and other situations where a checkbox need to be noticed."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "Checkboxes come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Checkboxes can be in an indeterminate state when they represent both selected and not selected values."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Checkboxes can be selected or not selected."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "Checkboxes should always have a label. When the label is not defined, a checkbox becomes standalone. Standalone checkboxes are only used when their connection to other components is clear and they give sufficient context — for example, in application panels."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "A checkbox can be navigated using a keyboard. The keyboard focus state takes the checkbox’s visual hover state and adds a blue ring to the checkbox in focus."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "When the label is too long for the horizontal space available, it wraps to form another line."
60
+ },
61
+ {
62
+ "type": "guideline",
63
+ "content": "Emphasized checkboxes are optimal for forms, settings, etc. where the checkboxes need to be noticed, or to bring attention to selected items such as cards or table rows. Not emphasized checkboxes are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
64
+ },
65
+ {
66
+ "type": "guideline",
67
+ "content": "Standalone checkboxes should be used in situations where the context is clear without an associated text label. An example of this would be when a checkbox is connected to other controls inside of a panel."
68
+ },
69
+ {
70
+ "type": "guideline",
71
+ "content": "Checkboxes and radio buttons are not interchangeable. A set of checkboxes should be used to select as many options as desired (or none). A set of radio buttons should be used to select only a single option from a list of mutually exclusive options."
72
+ },
73
+ {
74
+ "type": "guideline",
75
+ "content": "Use checkboxes to show selection, such as choosing multiple table rows. Use switches to show activation, like turning a setting on or off. Unlike switches, checkboxes can display an error state."
76
+ },
77
+ {
78
+ "type": "guideline",
79
+ "content": "Sets of checkboxes should always have a clear label that describes what the list of options represents and guides users what to do. This is important for accessibility, since a screen reader will read the label before each option."
80
+ },
81
+ {
82
+ "type": "guideline",
83
+ "content": "When a checkbox represents multiple values that are not identical, the checkbox should appear in the indeterminate state. Any subsequent click or tap should select the checkbox, and update all values to be selected. Another click or tap after that should deselect the checkbox, and update all values to be not selected."
84
+ }
85
+ ],
12
86
  "options": {
13
87
  "label": {
14
88
  "type": "string",
15
89
  "description": "When the label is not defined, the checkbox appears as a standalone checkbox."
16
90
  },
17
- "isSelected": {
18
- "type": "boolean",
19
- "default": false
20
- },
91
+ "isSelected": { "type": "boolean", "default": false },
21
92
  "isIndeterminate": {
22
93
  "type": "boolean",
23
94
  "default": false,
@@ -27,63 +98,26 @@
27
98
  "type": "string",
28
99
  "default": "m",
29
100
  "values": [
30
- {
31
- "value": "s"
32
- },
33
- {
34
- "value": "m"
35
- },
36
- {
37
- "value": "l"
38
- },
39
- {
40
- "value": "xl"
41
- }
101
+ { "value": "s" },
102
+ { "value": "m" },
103
+ { "value": "l" },
104
+ { "value": "xl" }
42
105
  ]
43
106
  },
44
- "isEmphasized": {
45
- "type": "boolean",
46
- "default": false
47
- },
48
- "isDisabled": {
49
- "type": "boolean",
50
- "default": false
51
- },
52
- "isError": {
53
- "type": "boolean",
54
- "default": false
55
- }
107
+ "isEmphasized": { "type": "boolean", "default": false },
108
+ "isDisabled": { "type": "boolean", "default": false },
109
+ "isError": { "type": "boolean", "default": false }
56
110
  },
57
111
  "states": [
58
- {
59
- "name": "hover",
60
- "trigger": "interaction"
61
- },
62
- {
63
- "name": "down",
64
- "trigger": "interaction"
65
- },
66
- {
67
- "name": "keyboard-focus",
68
- "trigger": "interaction"
69
- }
112
+ { "name": "hover", "trigger": "interaction" },
113
+ { "name": "down", "trigger": "interaction" },
114
+ { "name": "keyboard-focus", "trigger": "interaction" }
70
115
  ],
71
- "lifecycle": {
72
- "introduced": "1.0.0-draft"
73
- },
116
+ "lifecycle": { "introduced": "1.0.0-draft" },
74
117
  "tokenBindings": [
75
- {
76
- "token": "checkbox-control-size-small",
77
- "context": "S2 Control (size)"
78
- },
79
- {
80
- "token": "checkbox-control-size-medium",
81
- "context": "S2 Control (size)"
82
- },
83
- {
84
- "token": "checkbox-control-size-large",
85
- "context": "S2 Control (size)"
86
- },
118
+ { "token": "checkbox-control-size-small", "context": "S2 Control (size)" },
119
+ { "token": "checkbox-control-size-medium", "context": "S2 Control (size)" },
120
+ { "token": "checkbox-control-size-large", "context": "S2 Control (size)" },
87
121
  {
88
122
  "token": "checkbox-control-size-extra-large",
89
123
  "context": "S2 Control (size)"
@@ -116,22 +150,10 @@
116
150
  "token": "neutral-background-color-selected-key-focus",
117
151
  "context": "S2 Control (selected, non emphasized)"
118
152
  },
119
- {
120
- "token": "component-height-75",
121
- "context": "Minimum height"
122
- },
123
- {
124
- "token": "component-height-100",
125
- "context": "Minimum height"
126
- },
127
- {
128
- "token": "component-height-200",
129
- "context": "Minimum height"
130
- },
131
- {
132
- "token": "component-height-300",
133
- "context": "Minimum height"
134
- },
153
+ { "token": "component-height-75", "context": "Minimum height" },
154
+ { "token": "component-height-100", "context": "Minimum height" },
155
+ { "token": "component-height-200", "context": "Minimum height" },
156
+ { "token": "component-height-300", "context": "Minimum height" },
135
157
  {
136
158
  "token": "component-size-difference-down",
137
159
  "context": "Component size (down)"
@@ -144,10 +166,7 @@
144
166
  "token": "component-size-minimum-perspective-down",
145
167
  "context": "Component size (down)"
146
168
  },
147
- {
148
- "token": "border-width-200",
149
- "context": "Control (border)"
150
- },
169
+ { "token": "border-width-200", "context": "Control (border)" },
151
170
  {
152
171
  "token": "corner-radius-small-size-small",
153
172
  "context": "Control (rounding)"
@@ -164,22 +183,10 @@
164
183
  "token": "corner-radius-small-size-extra-large",
165
184
  "context": "Control (rounding)"
166
185
  },
167
- {
168
- "token": "text-to-control-75",
169
- "context": "Spacing (control to label)"
170
- },
171
- {
172
- "token": "text-to-control-100",
173
- "context": "Spacing (control to label)"
174
- },
175
- {
176
- "token": "text-to-control-200",
177
- "context": "Spacing (control to label)"
178
- },
179
- {
180
- "token": "text-to-control-300",
181
- "context": "Spacing (control to label)"
182
- },
186
+ { "token": "text-to-control-75", "context": "Spacing (control to label)" },
187
+ { "token": "text-to-control-100", "context": "Spacing (control to label)" },
188
+ { "token": "text-to-control-200", "context": "Spacing (control to label)" },
189
+ { "token": "text-to-control-300", "context": "Spacing (control to label)" },
183
190
  {
184
191
  "token": "component-top-to-text-75",
185
192
  "context": "Spacing (top/bottom edge to label)"
@@ -212,38 +219,17 @@
212
219
  "token": "component-bottom-to-text-300",
213
220
  "context": "Spacing (top/bottom edge to label)"
214
221
  },
215
- {
216
- "token": "focus-indicator-thickness",
217
- "context": "Focus ring"
218
- },
219
- {
220
- "token": "focus-indicator-gap",
221
- "context": "Focus ring"
222
- },
222
+ { "token": "focus-indicator-thickness", "context": "Focus ring" },
223
+ { "token": "focus-indicator-gap", "context": "Focus ring" },
223
224
  {
224
225
  "token": "spacing-300",
225
226
  "context": "Checkbox group spacing (horizontal)"
226
227
  },
227
- {
228
- "token": "neutral-content-color-default",
229
- "context": "Label"
230
- },
231
- {
232
- "token": "neutral-content-color-hover",
233
- "context": "Label"
234
- },
235
- {
236
- "token": "neutral-content-color-down",
237
- "context": "Label"
238
- },
239
- {
240
- "token": "neutral-content-color-key-focus",
241
- "context": "Label"
242
- },
243
- {
244
- "token": "gray-25",
245
- "context": "Control"
246
- },
228
+ { "token": "neutral-content-color-default", "context": "Label" },
229
+ { "token": "neutral-content-color-hover", "context": "Label" },
230
+ { "token": "neutral-content-color-down", "context": "Label" },
231
+ { "token": "neutral-content-color-key-focus", "context": "Label" },
232
+ { "token": "gray-25", "context": "Control" },
247
233
  {
248
234
  "token": "accent-content-color-default",
249
235
  "context": "Control (selected, emphasized)"
@@ -260,58 +246,19 @@
260
246
  "token": "accent-content-color-key-focus",
261
247
  "context": "Control (selected, emphasized)"
262
248
  },
263
- {
264
- "token": "disabled-content-color",
265
- "context": "Label (disabled)"
266
- },
267
- {
268
- "token": "focus-indicator-color",
269
- "context": "Focus ring"
270
- },
271
- {
272
- "token": "negative-color-900",
273
- "context": "Checkbox colors"
274
- },
275
- {
276
- "token": "negative-color-1000",
277
- "context": "Checkbox colors"
278
- },
279
- {
280
- "token": "default-font-family",
281
- "context": "Label"
282
- },
283
- {
284
- "token": "regular-font-weight",
285
- "context": "Label"
286
- },
287
- {
288
- "token": "default-font-style",
289
- "context": "Label"
290
- },
291
- {
292
- "token": "font-size-75",
293
- "context": "Label"
294
- },
295
- {
296
- "token": "font-size-100",
297
- "context": "Label"
298
- },
299
- {
300
- "token": "font-size-200",
301
- "context": "Label"
302
- },
303
- {
304
- "token": "font-size-300",
305
- "context": "Label"
306
- },
307
- {
308
- "token": "line-height-100",
309
- "context": "Label"
310
- },
311
- {
312
- "token": "cjk-line-height-100",
313
- "context": "Label"
314
- }
249
+ { "token": "disabled-content-color", "context": "Label (disabled)" },
250
+ { "token": "focus-indicator-color", "context": "Focus ring" },
251
+ { "token": "negative-color-900", "context": "Checkbox colors" },
252
+ { "token": "negative-color-1000", "context": "Checkbox colors" },
253
+ { "token": "default-font-family", "context": "Label" },
254
+ { "token": "regular-font-weight", "context": "Label" },
255
+ { "token": "default-font-style", "context": "Label" },
256
+ { "token": "font-size-75", "context": "Label" },
257
+ { "token": "font-size-100", "context": "Label" },
258
+ { "token": "font-size-200", "context": "Label" },
259
+ { "token": "font-size-300", "context": "Label" },
260
+ { "token": "line-height-100", "context": "Label" },
261
+ { "token": "cjk-line-height-100", "context": "Label" }
315
262
  ],
316
263
  "accessibility": {
317
264
  "role": "checkbox",
@@ -319,21 +266,9 @@
319
266
  "focusable": true,
320
267
  "keyboardIntents": ["activate"],
321
268
  "wcag": [
322
- {
323
- "criterion": "1.3.1",
324
- "level": "A",
325
- "title": "Info and Relationships"
326
- },
327
- {
328
- "criterion": "2.1.1",
329
- "level": "A",
330
- "title": "Keyboard"
331
- },
332
- {
333
- "criterion": "4.1.2",
334
- "level": "A",
335
- "title": "Name, Role, Value"
336
- }
269
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
270
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
271
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
337
272
  ]
338
273
  }
339
274
  }