@adobe/spectrum-design-data 3.3.0-beta.1 → 3.3.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 +67 -15
- package/components/action-bar.json +30 -9
- package/components/action-button.json +92 -39
- package/components/action-group.json +137 -18
- package/components/alert-banner.json +27 -8
- package/components/alert-dialog.json +55 -34
- package/components/avatar-group.json +35 -9
- package/components/avatar.json +105 -29
- package/components/badge.json +163 -56
- package/components/breadcrumbs.json +107 -26
- package/components/button-group.json +63 -19
- package/components/button.json +105 -61
- package/components/calendar.json +74 -8
- package/components/card.json +13 -0
- package/components/cards.json +46 -31
- package/components/checkbox-group.json +85 -16
- package/components/checkbox.json +97 -27
- package/components/close-button.json +75 -20
- package/components/coach-indicator.json +44 -14
- package/components/coach-mark.json +26 -8
- package/components/color-area.json +100 -20
- package/components/color-handle.json +46 -25
- package/components/color-loupe.json +14 -2
- package/components/color-slider.json +129 -26
- package/components/color-wheel.json +91 -17
- package/components/combo-box.json +189 -50
- package/components/contextual-help.json +126 -80
- package/components/date-field.json +7 -0
- package/components/date-picker.json +127 -24
- package/components/divider.json +38 -12
- package/components/drop-zone.json +37 -18
- package/components/field-label.json +62 -21
- package/components/heading.json +7 -0
- package/components/help-text.json +53 -16
- package/components/illustrated-message.json +85 -21
- package/components/in-line-alert.json +53 -13
- package/components/link.json +63 -24
- package/components/list-view.json +80 -15
- package/components/menu.json +181 -45
- package/components/meter.json +78 -24
- package/components/number-field.json +175 -34
- package/components/picker.json +188 -42
- package/components/popover.json +126 -37
- package/components/progress-bar.json +108 -23
- package/components/progress-circle.json +55 -12
- package/components/radio-button.json +67 -14
- package/components/radio-group.json +132 -28
- package/components/rating.json +38 -9
- package/components/search-field.json +126 -34
- package/components/segmented-control.json +70 -21
- package/components/select-box.json +103 -29
- package/components/side-navigation.json +69 -28
- package/components/slider.json +155 -39
- package/components/standard-dialog.json +88 -16
- package/components/status-light.json +136 -41
- package/components/steplist.json +24 -5
- package/components/swatch-group.json +55 -19
- package/components/swatch.json +79 -24
- package/components/switch.json +79 -31
- package/components/table.json +73 -26
- package/components/tabs.json +52 -22
- package/components/tag-field.json +60 -14
- package/components/tag-group.json +56 -16
- package/components/tag.json +78 -21
- package/components/takeover-dialog.json +61 -10
- package/components/text-area.json +205 -49
- package/components/text-field.json +170 -42
- package/components/thumbnail.json +63 -22
- package/components/time-field.json +7 -0
- package/components/toast.json +50 -29
- package/components/tooltip.json +87 -27
- package/components/tree-view.json +147 -45
- package/components/user-card.json +7 -0
- package/guidelines/app-frame-content-area.json +81 -0
- package/guidelines/app-frame-creating-bluelines.json +58 -0
- package/guidelines/app-frame-header.json +72 -0
- package/guidelines/app-frame-overview.json +50 -44
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +21 -12
- package/guidelines/background-layers.json +10 -44
- package/guidelines/brand.json +10 -30
- package/guidelines/colors.json +17 -35
- package/guidelines/containers.json +62 -0
- package/guidelines/developer-overview.json +9 -25
- package/guidelines/faqs.json +9 -96
- package/guidelines/fonts.json +14 -29
- package/guidelines/grays.json +44 -17
- package/guidelines/icon-fundamentals.json +18 -7
- package/guidelines/illustrations.json +111 -0
- package/guidelines/introduction.json +2 -2
- package/guidelines/manifest.json +60 -252
- package/guidelines/motion.json +16 -17
- package/guidelines/object-styles.json +102 -0
- package/guidelines/principles.json +2 -2
- package/guidelines/resources.json +15 -21
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +10 -15
- package/guidelines/typography-fundamentals.json +142 -0
- package/guidelines/using-icons.json +44 -33
- package/package.json +2 -2
- package/registry/platform-implementations.json +30 -0
- package/guidelines/ai-resource-guide.json +0 -50
- package/guidelines/applying-the-type-system.json +0 -63
- package/guidelines/bi-directionality.json +0 -57
- package/guidelines/border-width.json +0 -42
- package/guidelines/cognitive.json +0 -197
- package/guidelines/component-spacing.json +0 -49
- package/guidelines/contact-us.json +0 -67
- package/guidelines/content-area-browsing-context.json +0 -65
- package/guidelines/creating-bluelines-browsing-context.json +0 -91
- package/guidelines/design-tokens.json +0 -122
- package/guidelines/drop-shadow.json +0 -56
- package/guidelines/grammar-and-mechanics.json +0 -252
- package/guidelines/header-browsing-context.json +0 -37
- package/guidelines/illustration.json +0 -109
- package/guidelines/in-product-word-list.json +0 -29
- package/guidelines/inclusive-design.json +0 -93
- package/guidelines/inclusive-ux-writing.json +0 -30
- package/guidelines/internationalization.json +0 -87
- package/guidelines/layout-and-structure-containers.json +0 -47
- package/guidelines/layout-spacing.json +0 -39
- package/guidelines/object-styles-overview.json +0 -17
- package/guidelines/rounding.json +0 -61
- package/guidelines/side-navigation-browsing-context.json +0 -71
- package/guidelines/spacing-overview.json +0 -45
- package/guidelines/typography-overview.json +0 -39
- package/guidelines/typography-system.json +0 -168
- package/guidelines/visual-language-containers.json +0 -36
- package/guidelines/voice-and-tone.json +0 -47
- package/guidelines/writing-about-people.json +0 -103
- package/guidelines/writing-for-errors.json +0 -120
- package/guidelines/writing-for-onboarding.json +0 -119
- package/guidelines/writing-for-readability.json +0 -54
- package/guidelines/writing-with-visuals.json +0 -70
- package/registry/platform-extensions/web-components-states.json +0 -58
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/accordion/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Accordion",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"componentName": "Accordion",
|
|
21
|
+
"importPath": "@adobe/spectrum-wc/components/accordion",
|
|
22
|
+
"notes": "Spectrum 2 web component custom element: swc-accordion."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -72,21 +85,41 @@
|
|
|
72
85
|
"type": "string",
|
|
73
86
|
"default": "m",
|
|
74
87
|
"values": [
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
88
|
+
{
|
|
89
|
+
"value": "s"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": "m"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"value": "l"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"value": "xl"
|
|
99
|
+
}
|
|
79
100
|
]
|
|
80
101
|
},
|
|
81
|
-
"isQuiet": {
|
|
82
|
-
|
|
102
|
+
"isQuiet": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"default": false
|
|
105
|
+
},
|
|
106
|
+
"isDisabled": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": false
|
|
109
|
+
},
|
|
83
110
|
"density": {
|
|
84
111
|
"type": "string",
|
|
85
112
|
"default": "regular",
|
|
86
113
|
"values": [
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
114
|
+
{
|
|
115
|
+
"value": "compact"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"value": "regular"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "spacious"
|
|
122
|
+
}
|
|
90
123
|
]
|
|
91
124
|
},
|
|
92
125
|
"items": {
|
|
@@ -129,18 +162,37 @@
|
|
|
129
162
|
}
|
|
130
163
|
},
|
|
131
164
|
"states": [
|
|
132
|
-
{
|
|
133
|
-
|
|
134
|
-
|
|
165
|
+
{
|
|
166
|
+
"name": "hover",
|
|
167
|
+
"trigger": "interaction"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "down",
|
|
171
|
+
"trigger": "interaction"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "keyboard-focus",
|
|
175
|
+
"trigger": "interaction"
|
|
176
|
+
}
|
|
135
177
|
],
|
|
136
|
-
"lifecycle": {
|
|
178
|
+
"lifecycle": {
|
|
179
|
+
"introduced": "1.0.0-draft"
|
|
180
|
+
},
|
|
137
181
|
"accessibility": {
|
|
138
182
|
"intents": ["expand"],
|
|
139
183
|
"focusable": true,
|
|
140
184
|
"keyboardIntents": ["activate", "expand", "collapse"],
|
|
141
185
|
"wcag": [
|
|
142
|
-
{
|
|
143
|
-
|
|
186
|
+
{
|
|
187
|
+
"criterion": "2.1.1",
|
|
188
|
+
"level": "A",
|
|
189
|
+
"title": "Keyboard"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"criterion": "4.1.2",
|
|
193
|
+
"level": "A",
|
|
194
|
+
"title": "Name, Role, Value"
|
|
195
|
+
}
|
|
144
196
|
]
|
|
145
197
|
}
|
|
146
198
|
}
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/action-bar/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "ActionBar",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,7 +23,7 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "Action bar in Dark theme.\n\nAction bar is split into a separate component for each color theme — light and dark. Since each is set to either light or dark mode in Figma, they do not switch automatically like the rest of the UI when placed in frames that are set to
|
|
26
|
+
"content": "Action bar in Dark theme.\n\nAction bar is split into a separate component for each color theme — light and dark. Since each is set to either light or dark mode in Figma, they do not switch automatically like the rest of the UI when placed in frames that are set to \"auto\" mode.\n\nIn dark theme, the action bar also includes a 1px inner border to help it stand out against the background colors."
|
|
20
27
|
},
|
|
21
28
|
{
|
|
22
29
|
"type": "guideline",
|
|
@@ -28,11 +35,11 @@
|
|
|
28
35
|
},
|
|
29
36
|
{
|
|
30
37
|
"type": "guideline",
|
|
31
|
-
"content": "Placement.\n\nWhen a user selects items with relevant actions, an action bar appears at the bottom of the viewport. The bar should have margins of spacing-200 (12 pixels on desktop scale) on the sides and bottom."
|
|
38
|
+
"content": "Placement.\n\nWhen a user selects items with relevant actions, an action bar appears at the bottom of the viewport. The bar should have margins of `spacing-200` (12 pixels on desktop scale) on the sides and bottom."
|
|
32
39
|
},
|
|
33
40
|
{
|
|
34
41
|
"type": "guideline",
|
|
35
|
-
"content": "Safe zone.\n\nInclude a safe zone of at least spacing-400 (24 pixels on desktop scale) between the item counter and the action group."
|
|
42
|
+
"content": "Safe zone.\n\nInclude a safe zone of at least `spacing-400` (24 pixels on desktop scale) between the item counter and the action group."
|
|
36
43
|
},
|
|
37
44
|
{
|
|
38
45
|
"type": "guideline",
|
|
@@ -48,11 +55,17 @@
|
|
|
48
55
|
"content": "Allow scrolling to view underlying content.\n\nAction bars appear on top of content. Allow space for a user to still be able to view the content underneath, especially if they're taking actions on a table or a list of items and need to be able to scroll."
|
|
49
56
|
},
|
|
50
57
|
{
|
|
51
|
-
"type": "
|
|
52
|
-
"content": "Don
|
|
58
|
+
"type": "do-dont",
|
|
59
|
+
"content": "Don't use quick actions",
|
|
60
|
+
"dont": "Instead of quick actions, use an action bar for both single and bulk selection patterns. An action bar is useful for when a user needs to perform actions on either a single or multiple items at the same time. It can be used on either a grid view or a table view.\n\nDon't use quick actions — a deprecated component — because it presents conflicting nested actions (for example, a whole asset card could open a detailed view). This makes targeting specific actions very difficult, especially on smaller screens or with the keyboard."
|
|
53
61
|
}
|
|
54
62
|
],
|
|
55
|
-
"options": {
|
|
63
|
+
"options": {
|
|
64
|
+
"isEmphasized": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"default": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
56
69
|
"anatomy": [
|
|
57
70
|
{
|
|
58
71
|
"name": "action-group-area",
|
|
@@ -62,14 +75,22 @@
|
|
|
62
75
|
"name": "item-counter",
|
|
63
76
|
"description": "Badge showing a count of items or actions."
|
|
64
77
|
},
|
|
65
|
-
{
|
|
78
|
+
{
|
|
79
|
+
"name": "counter"
|
|
80
|
+
}
|
|
66
81
|
],
|
|
67
|
-
"lifecycle": {
|
|
82
|
+
"lifecycle": {
|
|
83
|
+
"introduced": "1.0.0-draft"
|
|
84
|
+
},
|
|
68
85
|
"accessibility": {
|
|
69
86
|
"intents": ["trigger"],
|
|
70
87
|
"focusable": false,
|
|
71
88
|
"wcag": [
|
|
72
|
-
{
|
|
89
|
+
{
|
|
90
|
+
"criterion": "4.1.2",
|
|
91
|
+
"level": "A",
|
|
92
|
+
"title": "Name, Role, Value"
|
|
93
|
+
}
|
|
73
94
|
]
|
|
74
95
|
}
|
|
75
96
|
}
|
|
@@ -9,10 +9,23 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/action-button/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "ActionButton",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"componentName": "ActionButton",
|
|
21
|
+
"importPath": "@adobe/spectrum-wc/components/action-button",
|
|
22
|
+
"notes": "Spectrum 2 web component custom element: swc-action-button."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
15
|
-
"content": "Action buttons
|
|
28
|
+
"content": "Action buttons perform tasks or mark selections. They're suited for task-based workflows where buttons don't need to draw attention."
|
|
16
29
|
},
|
|
17
30
|
{
|
|
18
31
|
"type": "guideline",
|
|
@@ -20,7 +33,7 @@
|
|
|
20
33
|
},
|
|
21
34
|
{
|
|
22
35
|
"type": "guideline",
|
|
23
|
-
"content": "Keyboard focus.\n\nAn action button can be navigated using a keyboard. The keyboard focus state takes the button
|
|
36
|
+
"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
37
|
},
|
|
25
38
|
{
|
|
26
39
|
"type": "guideline",
|
|
@@ -28,7 +41,7 @@
|
|
|
28
41
|
},
|
|
29
42
|
{
|
|
30
43
|
"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
|
|
44
|
+
"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
45
|
},
|
|
33
46
|
{
|
|
34
47
|
"type": "guideline",
|
|
@@ -44,28 +57,17 @@
|
|
|
44
57
|
},
|
|
45
58
|
{
|
|
46
59
|
"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
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the action button is mirrored. The icon is placed on the right side of the text and the hold icon is placed on the left side of the icon."
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"content": "Keyboard interactions.\n\nWhen an action button does not feature a hold icon: Key Interaction Space or EnterExecutes the action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller.TabMoves focus into the action button component and places focus on the selected action item.Shift + TabReturns focus to the previous action within the action button component. When an action button features a hold icon: Key Interaction EnterExecutes the action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller.SpaceOpens the popover menu.Alt + Down ArrowOpens the popover menu.TabMoves focus into the action button component and places focus on the selected action item.Shift + TabReturns focus to the previous action within the action button component."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components in every state."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
63
|
-
"content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 ANon‑text elements—such as icons used in action buttons—must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function.Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAAAction buttons should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized.Text contrast 1.4.3 AALarge text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement.Non-text contrast 1.4.11 AAThe visual presentation of icons and various states have a contrast ratio of at least 3:1.Text spacing 1.4.12 AALine height of text is at least 1.5x the font size if text is wrapped inside an action button. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus can be moved away from the component using only a keyboard.Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
60
|
+
"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."
|
|
64
61
|
}
|
|
65
62
|
],
|
|
66
63
|
"options": {
|
|
67
|
-
"label": {
|
|
68
|
-
|
|
64
|
+
"label": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"hideLabel": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
69
71
|
"icon": {
|
|
70
72
|
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
|
|
71
73
|
"description": "Icon must be present if the label is not defined."
|
|
@@ -74,41 +76,92 @@
|
|
|
74
76
|
"type": "string",
|
|
75
77
|
"default": "m",
|
|
76
78
|
"values": [
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
|
|
79
|
+
{
|
|
80
|
+
"value": "xs"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "s"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "m"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"value": "l"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": "xl"
|
|
93
|
+
}
|
|
82
94
|
]
|
|
83
95
|
},
|
|
84
|
-
"isQuiet": {
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
"isQuiet": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"default": false
|
|
99
|
+
},
|
|
100
|
+
"isSelected": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"default": false
|
|
103
|
+
},
|
|
104
|
+
"isEmphasized": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"default": false
|
|
107
|
+
},
|
|
87
108
|
"staticColor": {
|
|
88
109
|
"type": "string",
|
|
89
110
|
"description": "Static color must not be set for the default version of this component.",
|
|
90
|
-
"values": [
|
|
111
|
+
"values": [
|
|
112
|
+
{
|
|
113
|
+
"value": "white"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": "black"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
91
119
|
},
|
|
92
120
|
"selectedTextColor": {
|
|
93
121
|
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/hex-color.json"
|
|
94
122
|
},
|
|
95
|
-
"hasHoldIcon": {
|
|
96
|
-
|
|
123
|
+
"hasHoldIcon": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"default": false
|
|
126
|
+
},
|
|
127
|
+
"isDisabled": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"default": false
|
|
130
|
+
}
|
|
97
131
|
},
|
|
98
132
|
"states": [
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
|
|
133
|
+
{
|
|
134
|
+
"name": "hover",
|
|
135
|
+
"trigger": "interaction"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "down",
|
|
139
|
+
"trigger": "interaction"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "keyboard-focus",
|
|
143
|
+
"trigger": "interaction"
|
|
144
|
+
}
|
|
102
145
|
],
|
|
103
|
-
"lifecycle": {
|
|
146
|
+
"lifecycle": {
|
|
147
|
+
"introduced": "1.0.0-draft"
|
|
148
|
+
},
|
|
104
149
|
"accessibility": {
|
|
105
150
|
"role": "button",
|
|
106
151
|
"intents": ["trigger"],
|
|
107
152
|
"focusable": true,
|
|
108
153
|
"keyboardIntents": ["activate"],
|
|
109
154
|
"wcag": [
|
|
110
|
-
{
|
|
111
|
-
|
|
155
|
+
{
|
|
156
|
+
"criterion": "2.1.1",
|
|
157
|
+
"level": "A",
|
|
158
|
+
"title": "Keyboard"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"criterion": "4.1.2",
|
|
162
|
+
"level": "A",
|
|
163
|
+
"title": "Name, Role, Value"
|
|
164
|
+
}
|
|
112
165
|
]
|
|
113
166
|
}
|
|
114
167
|
}
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/action-group/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "ActionGroup",
|
|
16
|
+
"importPath": "@adobe/spectrum-wc/components/action-group",
|
|
17
|
+
"notes": "Spectrum 2 web component custom element: swc-action-group."
|
|
18
|
+
}
|
|
19
|
+
],
|
|
12
20
|
"documentBlocks": [
|
|
13
21
|
{
|
|
14
22
|
"type": "purpose",
|
|
@@ -16,47 +24,140 @@
|
|
|
16
24
|
},
|
|
17
25
|
{
|
|
18
26
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
27
|
+
"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."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "When selection is enabled, an action group's selection behavior can be set to allow for an empty selection, or not."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "When selection is enabled, an action group can allow for single or multiple selection of action buttons."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "By default, selection is not enabled in an action group. This is used for action groups that offer direct actions, rather than toggling."
|
|
20
40
|
},
|
|
21
41
|
{
|
|
22
42
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
43
|
+
"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)."
|
|
24
44
|
},
|
|
25
45
|
{
|
|
26
46
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
47
|
+
"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."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"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."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"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."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"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."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"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."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "guideline",
|
|
67
|
+
"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."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "guideline",
|
|
71
|
+
"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."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "guideline",
|
|
75
|
+
"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."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"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."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "guideline",
|
|
83
|
+
"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."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "guideline",
|
|
87
|
+
"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."
|
|
28
88
|
}
|
|
29
89
|
],
|
|
30
90
|
"options": {
|
|
31
91
|
"orientation": {
|
|
32
92
|
"type": "string",
|
|
33
93
|
"default": "horizontal",
|
|
34
|
-
"values": [
|
|
94
|
+
"values": [
|
|
95
|
+
{
|
|
96
|
+
"value": "horizontal"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"value": "vertical"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
35
102
|
},
|
|
36
103
|
"size": {
|
|
37
104
|
"type": "string",
|
|
38
105
|
"default": "m",
|
|
39
106
|
"values": [
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
107
|
+
{
|
|
108
|
+
"value": "s"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"value": "m"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"value": "l"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"value": "xl"
|
|
118
|
+
}
|
|
44
119
|
]
|
|
45
120
|
},
|
|
46
121
|
"density": {
|
|
47
122
|
"type": "string",
|
|
48
123
|
"default": "regular",
|
|
49
|
-
"values": [
|
|
124
|
+
"values": [
|
|
125
|
+
{
|
|
126
|
+
"value": "regular"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "compact"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"isJustified": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"default": false
|
|
136
|
+
},
|
|
137
|
+
"isQuiet": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": false
|
|
140
|
+
},
|
|
141
|
+
"isEmphasized": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"default": false
|
|
144
|
+
},
|
|
145
|
+
"enableSelection": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"default": false
|
|
50
148
|
},
|
|
51
|
-
"isJustified": { "type": "boolean", "default": false },
|
|
52
|
-
"isQuiet": { "type": "boolean", "default": false },
|
|
53
|
-
"isEmphasized": { "type": "boolean", "default": false },
|
|
54
|
-
"enableSelection": { "type": "boolean", "default": false },
|
|
55
149
|
"selectionMode": {
|
|
56
150
|
"type": "string",
|
|
57
151
|
"default": "single",
|
|
58
152
|
"description": "Only applicable if selection is enabled",
|
|
59
|
-
"values": [
|
|
153
|
+
"values": [
|
|
154
|
+
{
|
|
155
|
+
"value": "single"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"value": "multiple"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
60
161
|
},
|
|
61
162
|
"allowsEmptySelection": {
|
|
62
163
|
"type": "boolean",
|
|
@@ -66,14 +167,32 @@
|
|
|
66
167
|
"overflowMode": {
|
|
67
168
|
"type": "string",
|
|
68
169
|
"default": "wrap",
|
|
69
|
-
"values": [
|
|
170
|
+
"values": [
|
|
171
|
+
{
|
|
172
|
+
"value": "wrap"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"value": "collapse"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
70
178
|
},
|
|
71
|
-
"isDisabled": {
|
|
179
|
+
"isDisabled": {
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"default": false
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"lifecycle": {
|
|
185
|
+
"introduced": "1.0.0-draft"
|
|
72
186
|
},
|
|
73
|
-
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
74
187
|
"accessibility": {
|
|
75
188
|
"intents": ["trigger"],
|
|
76
189
|
"focusable": false,
|
|
77
|
-
"wcag": [
|
|
190
|
+
"wcag": [
|
|
191
|
+
{
|
|
192
|
+
"criterion": "2.1.1",
|
|
193
|
+
"level": "A",
|
|
194
|
+
"title": "Keyboard"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
78
197
|
}
|
|
79
198
|
}
|
|
@@ -96,22 +96,35 @@
|
|
|
96
96
|
}
|
|
97
97
|
],
|
|
98
98
|
"options": {
|
|
99
|
-
"text": {
|
|
99
|
+
"text": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
100
102
|
"variant": {
|
|
101
103
|
"type": "string",
|
|
102
104
|
"default": "neutral",
|
|
103
105
|
"values": [
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
106
|
+
{
|
|
107
|
+
"value": "neutral"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"value": "informative"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"value": "negative"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": "accent"
|
|
117
|
+
}
|
|
108
118
|
]
|
|
109
119
|
},
|
|
110
120
|
"actionLabel": {
|
|
111
121
|
"type": "string",
|
|
112
122
|
"description": "If undefined, this button does not appear."
|
|
113
123
|
},
|
|
114
|
-
"isDismissible": {
|
|
124
|
+
"isDismissible": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
115
128
|
},
|
|
116
129
|
"anatomy": [
|
|
117
130
|
{
|
|
@@ -119,11 +132,17 @@
|
|
|
119
132
|
"description": "Icon indicating the alert's severity."
|
|
120
133
|
}
|
|
121
134
|
],
|
|
122
|
-
"lifecycle": {
|
|
135
|
+
"lifecycle": {
|
|
136
|
+
"introduced": "1.0.0-draft"
|
|
137
|
+
},
|
|
123
138
|
"accessibility": {
|
|
124
139
|
"focusable": false,
|
|
125
140
|
"wcag": [
|
|
126
|
-
{
|
|
141
|
+
{
|
|
142
|
+
"criterion": "4.1.3",
|
|
143
|
+
"level": "AA",
|
|
144
|
+
"title": "Status Messages"
|
|
145
|
+
}
|
|
127
146
|
]
|
|
128
147
|
}
|
|
129
148
|
}
|