@adobe/spectrum-design-data 0.4.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.
- package/components/accordion.json +108 -194
- package/components/action-bar.json +64 -97
- package/components/action-button.json +95 -230
- package/components/action-group.json +88 -86
- package/components/alert-banner.json +104 -76
- package/components/alert-dialog.json +78 -126
- package/components/avatar-group.json +61 -119
- package/components/avatar.json +98 -212
- package/components/badge.json +138 -256
- package/components/breadcrumbs.json +95 -89
- package/components/button-group.json +57 -48
- package/components/button.json +151 -368
- package/components/calendar.json +97 -34
- package/components/cards.json +109 -250
- package/components/checkbox-group.json +50 -58
- package/components/checkbox.json +121 -186
- package/components/close-button.json +61 -124
- package/components/coach-indicator.json +63 -72
- package/components/coach-mark.json +89 -93
- package/components/color-area.json +68 -94
- package/components/color-handle.json +39 -79
- package/components/color-loupe.json +35 -52
- package/components/color-slider.json +95 -116
- package/components/color-wheel.json +67 -73
- package/components/combo-box.json +243 -331
- package/components/contextual-help.json +86 -175
- package/components/date-picker.json +139 -179
- package/components/divider.json +30 -69
- package/components/drop-zone.json +51 -92
- package/components/field-label.json +75 -117
- package/components/help-text.json +81 -105
- package/components/illustrated-message.json +106 -73
- package/components/in-line-alert.json +50 -83
- package/components/link.json +63 -85
- package/components/list-view.json +107 -146
- package/components/menu.json +180 -274
- package/components/meter.json +72 -118
- package/components/number-field.json +213 -305
- package/components/picker.json +208 -320
- package/components/popover.json +94 -129
- package/components/progress-bar.json +94 -131
- package/components/progress-circle.json +45 -72
- package/components/radio-button.json +87 -156
- package/components/radio-group.json +107 -74
- package/components/rating.json +66 -99
- package/components/search-field.json +132 -202
- package/components/segmented-control.json +94 -109
- package/components/select-box.json +119 -179
- package/components/side-navigation.json +108 -118
- package/components/slider.json +143 -228
- package/components/standard-dialog.json +96 -114
- package/components/standard-panel.json +105 -53
- package/components/status-light.json +104 -240
- package/components/steplist.json +77 -161
- package/components/swatch-group.json +42 -58
- package/components/swatch.json +75 -162
- package/components/switch.json +101 -189
- package/components/table.json +97 -102
- package/components/tabs.json +77 -104
- package/components/tag-field.json +86 -150
- package/components/tag-group.json +50 -44
- package/components/tag.json +81 -198
- package/components/takeover-dialog.json +59 -57
- package/components/text-area.json +200 -323
- package/components/text-field.json +183 -304
- package/components/thumbnail.json +63 -105
- package/components/toast.json +97 -83
- package/components/tooltip.json +104 -96
- package/components/tree-view.json +169 -181
- package/guidelines/app-frame-content-area.json +87 -0
- package/guidelines/app-frame-creating-bluelines.json +61 -0
- package/guidelines/app-frame-header.json +75 -0
- package/guidelines/app-frame-overview.json +167 -0
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +42 -0
- package/guidelines/background-layers.json +41 -0
- package/guidelines/brand.json +50 -0
- package/guidelines/colors.json +65 -0
- package/guidelines/containers.json +65 -0
- package/guidelines/developer-overview.json +38 -0
- package/guidelines/faqs.json +35 -0
- package/guidelines/fonts.json +58 -0
- package/guidelines/grays.json +69 -0
- package/guidelines/icon-fundamentals.json +45 -0
- package/guidelines/illustrations.json +114 -0
- package/guidelines/introduction.json +34 -0
- package/guidelines/manifest.json +204 -0
- package/guidelines/motion.json +41 -0
- package/guidelines/object-styles.json +105 -0
- package/guidelines/principles.json +30 -0
- package/guidelines/resources.json +59 -0
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +34 -0
- package/guidelines/typography-fundamentals.json +145 -0
- package/guidelines/using-icons.json +110 -0
- package/package.json +5 -2
|
@@ -9,14 +9,47 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/action-button/"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"type": "
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Action buttons perform tasks or mark selections. They're suited for task-based workflows where buttons don't need to draw attention."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Text overflow.\n\nWhen the action button text is too long for the available horizontal space, it truncates at the end. The full text should be revealed with a tooltip on hover."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "Keyboard focus.\n\nAn action button can be navigated using a keyboard. The keyboard focus state takes the button's visual hover state and adds a blue ring to the button in focus."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Use tooltips.\n\nIcon-only action buttons can be hard to identify. They should always show a tooltip upon hovering for a short period of time, displaying the name and possibly a keyboard shortcut."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Isolated action buttons.\n\nIf you have an icon-only or text-only isolated action button, use the standard style to make sure it's more easily identifiable as a button."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Only group related actions with a hold icon.\n\nWhen using a hold icon to switch actions, only group the actions that are part of the same family. Don't group unrelated actions just for the sake of saving space."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Respect hold icon placement.\n\nIn left-to-right interfaces, the hold icon is always in the bottom right corner of the action button. It's a symbolic indicator that shows that a popover menu will appear on hold. Don't change the placement of the hold icon based on the design of the interface."
|
|
15
40
|
},
|
|
16
|
-
|
|
17
|
-
"type": "
|
|
18
|
-
"
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "When to use static black and static white.\n\nTo ensure maximum contrast with the background, use static black for light backgrounds and images, and use static white for dark backgrounds and images. Avoid placing static components on top of busy images with a lot of variance in contrast."
|
|
19
44
|
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "Selected state text color.\n\nThe text color on the selected state of the over-background variant can be customized to match the background it's on. Use the background color for selected text when the action button is on a solid color, and is dark enough to meet a 4.5:1 contrast ratio with a white background (or black background, for the static black variant).\n\nUse black text when the button is on top of an image, or if the background is too low-contrast to meet the 4.5:1 contrast ratio."
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"options": {
|
|
51
|
+
"label": { "type": "string" },
|
|
52
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
20
53
|
"icon": {
|
|
21
54
|
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
|
|
22
55
|
"description": "Icon must be present if the label is not defined."
|
|
@@ -25,97 +58,39 @@
|
|
|
25
58
|
"type": "string",
|
|
26
59
|
"default": "m",
|
|
27
60
|
"values": [
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"value": "m"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"value": "l"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"value": "xl"
|
|
42
|
-
}
|
|
61
|
+
{ "value": "xs" },
|
|
62
|
+
{ "value": "s" },
|
|
63
|
+
{ "value": "m" },
|
|
64
|
+
{ "value": "l" },
|
|
65
|
+
{ "value": "xl" }
|
|
43
66
|
]
|
|
44
67
|
},
|
|
45
|
-
"isQuiet": {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
"isSelected": {
|
|
50
|
-
"type": "boolean",
|
|
51
|
-
"default": false
|
|
52
|
-
},
|
|
53
|
-
"isEmphasized": {
|
|
54
|
-
"type": "boolean",
|
|
55
|
-
"default": false
|
|
56
|
-
},
|
|
68
|
+
"isQuiet": { "type": "boolean", "default": false },
|
|
69
|
+
"isSelected": { "type": "boolean", "default": false },
|
|
70
|
+
"isEmphasized": { "type": "boolean", "default": false },
|
|
57
71
|
"staticColor": {
|
|
58
72
|
"type": "string",
|
|
59
73
|
"description": "Static color must not be set for the default version of this component.",
|
|
60
|
-
"values": [
|
|
61
|
-
{
|
|
62
|
-
"value": "white"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"value": "black"
|
|
66
|
-
}
|
|
67
|
-
]
|
|
74
|
+
"values": [{ "value": "white" }, { "value": "black" }]
|
|
68
75
|
},
|
|
69
76
|
"selectedTextColor": {
|
|
70
77
|
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/hex-color.json"
|
|
71
78
|
},
|
|
72
|
-
"hasHoldIcon": {
|
|
73
|
-
|
|
74
|
-
"default": false
|
|
75
|
-
},
|
|
76
|
-
"isDisabled": {
|
|
77
|
-
"type": "boolean",
|
|
78
|
-
"default": false
|
|
79
|
-
}
|
|
79
|
+
"hasHoldIcon": { "type": "boolean", "default": false },
|
|
80
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
80
81
|
},
|
|
81
82
|
"states": [
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "down",
|
|
88
|
-
"trigger": "interaction"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"name": "keyboard-focus",
|
|
92
|
-
"trigger": "interaction"
|
|
93
|
-
}
|
|
83
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
84
|
+
{ "name": "down", "trigger": "interaction" },
|
|
85
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
94
86
|
],
|
|
95
|
-
"lifecycle": {
|
|
96
|
-
"introduced": "1.0.0-draft"
|
|
97
|
-
},
|
|
87
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
98
88
|
"tokenBindings": [
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"token": "component-height-75",
|
|
105
|
-
"context": "Height"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"token": "component-height-100",
|
|
109
|
-
"context": "Height"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"token": "component-height-200",
|
|
113
|
-
"context": "Height"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"token": "component-height-300",
|
|
117
|
-
"context": "Height"
|
|
118
|
-
},
|
|
89
|
+
{ "token": "component-height-50", "context": "Height" },
|
|
90
|
+
{ "token": "component-height-75", "context": "Height" },
|
|
91
|
+
{ "token": "component-height-100", "context": "Height" },
|
|
92
|
+
{ "token": "component-height-200", "context": "Height" },
|
|
93
|
+
{ "token": "component-height-300", "context": "Height" },
|
|
119
94
|
{
|
|
120
95
|
"token": "component-size-difference-down",
|
|
121
96
|
"context": "Component size (down)"
|
|
@@ -128,66 +103,21 @@
|
|
|
128
103
|
"token": "component-size-minimum-perspective-down",
|
|
129
104
|
"context": "Component size (down)"
|
|
130
105
|
},
|
|
131
|
-
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"token": "corner-radius-medium-size-extra-large",
|
|
149
|
-
"context": "Rounding"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"token": "workflow-icon-size-50",
|
|
153
|
-
"context": "Icon"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"token": "workflow-icon-size-75",
|
|
157
|
-
"context": "Icon"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"token": "workflow-icon-size-100",
|
|
161
|
-
"context": "Icon"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"token": "workflow-icon-size-200",
|
|
165
|
-
"context": "Icon"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"token": "workflow-icon-size-300",
|
|
169
|
-
"context": "Icon"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"token": "text-to-visual-50",
|
|
173
|
-
"context": "Spacing (icon to label)"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"token": "text-to-visual-75",
|
|
177
|
-
"context": "Spacing (icon to label)"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"token": "text-to-visual-100",
|
|
181
|
-
"context": "Spacing (icon to label)"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"token": "text-to-visual-200",
|
|
185
|
-
"context": "Spacing (icon to label)"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"token": "text-to-visual-300",
|
|
189
|
-
"context": "Spacing (icon to label)"
|
|
190
|
-
},
|
|
106
|
+
{ "token": "corner-radius-medium-size-extra-small", "context": "Rounding" },
|
|
107
|
+
{ "token": "corner-radius-medium-size-small", "context": "Rounding" },
|
|
108
|
+
{ "token": "corner-radius-medium-size-medium", "context": "Rounding" },
|
|
109
|
+
{ "token": "corner-radius-medium-size-large", "context": "Rounding" },
|
|
110
|
+
{ "token": "corner-radius-medium-size-extra-large", "context": "Rounding" },
|
|
111
|
+
{ "token": "workflow-icon-size-50", "context": "Icon" },
|
|
112
|
+
{ "token": "workflow-icon-size-75", "context": "Icon" },
|
|
113
|
+
{ "token": "workflow-icon-size-100", "context": "Icon" },
|
|
114
|
+
{ "token": "workflow-icon-size-200", "context": "Icon" },
|
|
115
|
+
{ "token": "workflow-icon-size-300", "context": "Icon" },
|
|
116
|
+
{ "token": "text-to-visual-50", "context": "Spacing (icon to label)" },
|
|
117
|
+
{ "token": "text-to-visual-75", "context": "Spacing (icon to label)" },
|
|
118
|
+
{ "token": "text-to-visual-100", "context": "Spacing (icon to label)" },
|
|
119
|
+
{ "token": "text-to-visual-200", "context": "Spacing (icon to label)" },
|
|
120
|
+
{ "token": "text-to-visual-300", "context": "Spacing (icon to label)" },
|
|
191
121
|
{
|
|
192
122
|
"token": "component-edge-to-visual-50",
|
|
193
123
|
"context": "Spacing (start/end edges)"
|
|
@@ -288,14 +218,8 @@
|
|
|
288
218
|
"token": "component-top-to-text-300",
|
|
289
219
|
"context": "Spacing (top edge to label)"
|
|
290
220
|
},
|
|
291
|
-
{
|
|
292
|
-
|
|
293
|
-
"context": "Focus ring"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"token": "focus-indicator-gap",
|
|
297
|
-
"context": "Focus ring"
|
|
298
|
-
},
|
|
221
|
+
{ "token": "focus-indicator-thickness", "context": "Focus ring" },
|
|
222
|
+
{ "token": "focus-indicator-gap", "context": "Focus ring" },
|
|
299
223
|
{
|
|
300
224
|
"token": "action-button-edge-to-hold-icon-extra-small",
|
|
301
225
|
"context": "Spacing (edge to hold icon)"
|
|
@@ -316,54 +240,18 @@
|
|
|
316
240
|
"token": "action-button-edge-to-hold-icon-extra-large",
|
|
317
241
|
"context": "Spacing (edge to hold icon)"
|
|
318
242
|
},
|
|
319
|
-
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"token": "font-size-50",
|
|
333
|
-
"context": "Label"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"token": "font-size-75",
|
|
337
|
-
"context": "Label"
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"token": "font-size-100",
|
|
341
|
-
"context": "Label"
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"token": "font-size-200",
|
|
345
|
-
"context": "Label"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"token": "font-size-300",
|
|
349
|
-
"context": "Label"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"token": "line-height-100",
|
|
353
|
-
"context": "Label"
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"token": "cjk-line-height-100",
|
|
357
|
-
"context": "Label"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"token": "gray-100",
|
|
361
|
-
"context": "Background "
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
"token": "gray-200",
|
|
365
|
-
"context": "Background "
|
|
366
|
-
},
|
|
243
|
+
{ "token": "default-font-family", "context": "Label" },
|
|
244
|
+
{ "token": "medium-font-weight", "context": "Label" },
|
|
245
|
+
{ "token": "default-font-style", "context": "Label" },
|
|
246
|
+
{ "token": "font-size-50", "context": "Label" },
|
|
247
|
+
{ "token": "font-size-75", "context": "Label" },
|
|
248
|
+
{ "token": "font-size-100", "context": "Label" },
|
|
249
|
+
{ "token": "font-size-200", "context": "Label" },
|
|
250
|
+
{ "token": "font-size-300", "context": "Label" },
|
|
251
|
+
{ "token": "line-height-100", "context": "Label" },
|
|
252
|
+
{ "token": "cjk-line-height-100", "context": "Label" },
|
|
253
|
+
{ "token": "gray-100", "context": "Background " },
|
|
254
|
+
{ "token": "gray-200", "context": "Background " },
|
|
367
255
|
{
|
|
368
256
|
"token": "neutral-content-color-default",
|
|
369
257
|
"context": "Label, icon, and hold icon"
|
|
@@ -428,18 +316,9 @@
|
|
|
428
316
|
"token": "disabled-content-color",
|
|
429
317
|
"context": "Label, icon, and hold icon (disabled)"
|
|
430
318
|
},
|
|
431
|
-
{
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"token": "transparent-white-100",
|
|
437
|
-
"context": "Background "
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"token": "transparent-white-200",
|
|
441
|
-
"context": "Background "
|
|
442
|
-
},
|
|
319
|
+
{ "token": "focus-indicator-color", "context": "Focus ring" },
|
|
320
|
+
{ "token": "transparent-white-100", "context": "Background " },
|
|
321
|
+
{ "token": "transparent-white-200", "context": "Background " },
|
|
443
322
|
{
|
|
444
323
|
"token": "transparent-white-800",
|
|
445
324
|
"context": "Label, icon, and hold icon"
|
|
@@ -468,14 +347,8 @@
|
|
|
468
347
|
"token": "static-white-focus-indicator-color",
|
|
469
348
|
"context": "Focus ring (white)"
|
|
470
349
|
},
|
|
471
|
-
{
|
|
472
|
-
|
|
473
|
-
"context": "Background "
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"token": "transparent-black-200",
|
|
477
|
-
"context": "Background "
|
|
478
|
-
},
|
|
350
|
+
{ "token": "transparent-black-100", "context": "Background " },
|
|
351
|
+
{ "token": "transparent-black-200", "context": "Background " },
|
|
479
352
|
{
|
|
480
353
|
"token": "transparent-black-800",
|
|
481
354
|
"context": "Label, icon, and hold icon"
|
|
@@ -507,16 +380,8 @@
|
|
|
507
380
|
"focusable": true,
|
|
508
381
|
"keyboardIntents": ["activate"],
|
|
509
382
|
"wcag": [
|
|
510
|
-
{
|
|
511
|
-
|
|
512
|
-
"level": "A",
|
|
513
|
-
"title": "Keyboard"
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
"criterion": "4.1.2",
|
|
517
|
-
"level": "A",
|
|
518
|
-
"title": "Name, Role, Value"
|
|
519
|
-
}
|
|
383
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
384
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
520
385
|
]
|
|
521
386
|
}
|
|
522
387
|
}
|
|
@@ -9,77 +9,106 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/action-group/"
|
|
11
11
|
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "An action group is a grouping of action buttons that are related to each other."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "An action group in a disabled state shows that the action buttons within the group exist, but are not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action group may become available later."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "When selection is enabled, an action group's selection behavior can be set to allow for an empty selection, or not."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "When selection is enabled, an action group can allow for single or multiple selection of action buttons."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "By default, selection is not enabled in an action group. This is used for action groups that offer direct actions, rather than toggling."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Selection can be enabled for an action group to allow for toggling. This can be used to disclose parts of an interface (for example, showing or hiding panels) or to switch between views (for example, grid or list views)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Like action buttons, action groups are not emphasized by default. This is optimal for when the action group is not the core part of an interface, such as in application panels, where all components are monochrome in order to direct focus to the content."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "The emphasized action group has a blue background for its selected state in order to provide a visual prominence that meets the accessible color contrast ratio. This is optimal for when the selection should call attention, such as within a tool bar."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "By default, an action group uses not-quiet action buttons. This style works best in a dense array of controls where the background helps to separate action buttons from the surrounding container, or to give visibility to isolated buttons."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Alternatively, quiet action groups can have no visible background until they’re interacted with. This style works best when a clear layout (vertical stack, table, grid) makes it easy to parse the buttons. Too many quiet components in a small space can be hard to read."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "An action group can become justified. By default, it is not justified since the action button size depends on the label and/or icon inside each button. When an action group is justified, it takes up the entire available container width, divided equally for each action button that is inside the group."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"content": "Action groups come in two densities: regular and compact. The compact density retains the same font and icon sizes, but has tighter spacing. The action buttons also become connected for non-quiet action groups."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"content": "Action groups 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."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "guideline",
|
|
67
|
+
"content": "An action group can be either horizontal or vertical in its orientation. By default, an action group is horizontal. The vertical option should be reserved for when horizontal space is limited."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "guideline",
|
|
71
|
+
"content": "When there are more actions than the action group has horizontal space for, overflowMode collapse will use an Action menu to contain additional actions. This is used in the components like action bar or panels to show an array of actions to select from when horizontal space is limited."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "guideline",
|
|
75
|
+
"content": "When multiple items can be selected at a time use an action group when taking actions or making choices from a list of options. Action group is the preferred competent to use when those actions are simple (1-2 words or icon only). If you are switching views or navigating to different content, a segmented control is the preferred component."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"content": "Use the fully justified variant when using the vertical compact action group (both the quiet and not quiet options). This will ensure the buttons have the same width."
|
|
80
|
+
}
|
|
81
|
+
],
|
|
12
82
|
"options": {
|
|
13
83
|
"orientation": {
|
|
14
84
|
"type": "string",
|
|
15
85
|
"default": "horizontal",
|
|
16
|
-
"values": [
|
|
17
|
-
{
|
|
18
|
-
"value": "horizontal"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"value": "vertical"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
86
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
24
87
|
},
|
|
25
88
|
"size": {
|
|
26
89
|
"type": "string",
|
|
27
90
|
"default": "m",
|
|
28
91
|
"values": [
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"value": "m"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"value": "l"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"value": "xl"
|
|
40
|
-
}
|
|
92
|
+
{ "value": "s" },
|
|
93
|
+
{ "value": "m" },
|
|
94
|
+
{ "value": "l" },
|
|
95
|
+
{ "value": "xl" }
|
|
41
96
|
]
|
|
42
97
|
},
|
|
43
98
|
"density": {
|
|
44
99
|
"type": "string",
|
|
45
100
|
"default": "regular",
|
|
46
|
-
"values": [
|
|
47
|
-
{
|
|
48
|
-
"value": "regular"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"value": "compact"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"isJustified": {
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"default": false
|
|
58
|
-
},
|
|
59
|
-
"isQuiet": {
|
|
60
|
-
"type": "boolean",
|
|
61
|
-
"default": false
|
|
62
|
-
},
|
|
63
|
-
"isEmphasized": {
|
|
64
|
-
"type": "boolean",
|
|
65
|
-
"default": false
|
|
66
|
-
},
|
|
67
|
-
"enableSelection": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"default": false
|
|
101
|
+
"values": [{ "value": "regular" }, { "value": "compact" }]
|
|
70
102
|
},
|
|
103
|
+
"isJustified": { "type": "boolean", "default": false },
|
|
104
|
+
"isQuiet": { "type": "boolean", "default": false },
|
|
105
|
+
"isEmphasized": { "type": "boolean", "default": false },
|
|
106
|
+
"enableSelection": { "type": "boolean", "default": false },
|
|
71
107
|
"selectionMode": {
|
|
72
108
|
"type": "string",
|
|
73
109
|
"default": "single",
|
|
74
110
|
"description": "Only applicable if selection is enabled",
|
|
75
|
-
"values": [
|
|
76
|
-
{
|
|
77
|
-
"value": "single"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"value": "multiple"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
111
|
+
"values": [{ "value": "single" }, { "value": "multiple" }]
|
|
83
112
|
},
|
|
84
113
|
"allowsEmptySelection": {
|
|
85
114
|
"type": "boolean",
|
|
@@ -89,46 +118,19 @@
|
|
|
89
118
|
"overflowMode": {
|
|
90
119
|
"type": "string",
|
|
91
120
|
"default": "wrap",
|
|
92
|
-
"values": [
|
|
93
|
-
{
|
|
94
|
-
"value": "wrap"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"value": "collapse"
|
|
98
|
-
}
|
|
99
|
-
]
|
|
121
|
+
"values": [{ "value": "wrap" }, { "value": "collapse" }]
|
|
100
122
|
},
|
|
101
|
-
"isDisabled": {
|
|
102
|
-
"type": "boolean",
|
|
103
|
-
"default": false
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"lifecycle": {
|
|
107
|
-
"introduced": "1.0.0-draft"
|
|
123
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
108
124
|
},
|
|
125
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
109
126
|
"tokenBindings": [
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"token": "spacing-100",
|
|
116
|
-
"context": "Spacing (horizontal, regular)"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"token": "spacing-50",
|
|
120
|
-
"context": "Spacing (horizontal, compact)"
|
|
121
|
-
}
|
|
127
|
+
{ "token": "spacing-75", "context": "Spacing (horizontal, regular)" },
|
|
128
|
+
{ "token": "spacing-100", "context": "Spacing (horizontal, regular)" },
|
|
129
|
+
{ "token": "spacing-50", "context": "Spacing (horizontal, compact)" }
|
|
122
130
|
],
|
|
123
131
|
"accessibility": {
|
|
124
132
|
"intents": ["trigger"],
|
|
125
133
|
"focusable": false,
|
|
126
|
-
"wcag": [
|
|
127
|
-
{
|
|
128
|
-
"criterion": "2.1.1",
|
|
129
|
-
"level": "A",
|
|
130
|
-
"title": "Keyboard"
|
|
131
|
-
}
|
|
132
|
-
]
|
|
134
|
+
"wcag": [{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" }]
|
|
133
135
|
}
|
|
134
136
|
}
|