@adobe/spectrum-design-data 3.3.0 → 3.4.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 +32 -102
- package/components/action-bar.json +9 -23
- package/components/action-button.json +52 -92
- package/components/action-group.json +18 -129
- package/components/alert-banner.json +8 -27
- package/components/alert-dialog.json +45 -55
- package/components/avatar-group.json +20 -50
- package/components/avatar.json +44 -123
- package/components/badge.json +66 -160
- package/components/breadcrumbs.json +26 -100
- package/components/button-group.json +32 -63
- package/components/button.json +74 -105
- package/components/calendar.json +8 -67
- package/components/cards.json +31 -46
- package/components/checkbox-group.json +22 -84
- package/components/checkbox.json +33 -96
- package/components/close-button.json +31 -73
- package/components/coach-indicator.json +14 -44
- package/components/coach-mark.json +8 -26
- package/components/color-area.json +20 -93
- package/components/color-handle.json +25 -38
- package/components/color-loupe.json +18 -18
- package/components/color-slider.json +26 -122
- package/components/color-wheel.json +17 -84
- package/components/combo-box.json +56 -188
- package/components/contextual-help.json +87 -126
- package/components/date-picker.json +24 -120
- package/components/divider.json +25 -38
- package/components/drop-zone.json +25 -37
- package/components/field-label.json +22 -59
- package/components/help-text.json +16 -53
- package/components/illustrated-message.json +21 -72
- package/components/in-line-alert.json +13 -53
- package/components/link.json +31 -63
- package/components/list-view.json +15 -73
- package/components/menu.json +51 -180
- package/components/meter.json +35 -76
- package/components/number-field.json +34 -168
- package/components/picker.json +48 -187
- package/components/popover.json +47 -123
- package/components/progress-bar.json +33 -105
- package/components/progress-circle.json +25 -55
- package/components/radio-button.json +14 -67
- package/components/radio-group.json +34 -131
- package/components/rating.json +9 -38
- package/components/search-field.json +40 -125
- package/components/segmented-control.json +27 -69
- package/components/select-box.json +29 -96
- package/components/side-navigation.json +28 -69
- package/components/slider.json +45 -154
- package/components/standard-dialog.json +16 -88
- package/components/status-light.json +51 -133
- package/components/steplist.json +5 -24
- package/components/swatch-group.json +19 -55
- package/components/swatch.json +24 -79
- package/components/switch.json +42 -79
- package/components/table.json +26 -73
- package/components/tabs.json +35 -52
- package/components/tag-field.json +14 -60
- package/components/tag-group.json +22 -55
- package/components/tag.json +27 -77
- package/components/takeover-dialog.json +10 -61
- package/components/text-area.json +55 -204
- package/components/text-field.json +48 -169
- package/components/thumbnail.json +22 -63
- package/components/toast.json +30 -47
- package/components/tooltip.json +37 -84
- package/components/tree-view.json +51 -146
- package/fields/structure.json +1 -2
- package/guidelines/ai-resource-guide.json +42 -0
- package/guidelines/app-frame-overview.json +45 -44
- package/guidelines/applying-the-type-system.json +71 -0
- package/guidelines/attention-hierarchy.json +13 -22
- package/guidelines/background-layers.json +84 -10
- package/guidelines/bi-directionality.json +57 -0
- package/guidelines/border-width.json +70 -0
- package/guidelines/brand.json +24 -12
- package/guidelines/cognitive.json +229 -0
- package/guidelines/colors.json +55 -17
- package/guidelines/component-spacing.json +65 -0
- package/guidelines/contact-us.json +27 -0
- package/guidelines/containers.json +21 -28
- package/guidelines/content-area-browsing-context.json +73 -0
- package/guidelines/creating-bluelines-browsing-context.json +71 -0
- package/guidelines/design-tokens.json +186 -0
- package/guidelines/developer-overview.json +33 -9
- package/guidelines/drop-shadow.json +76 -0
- package/guidelines/faqs.json +100 -9
- package/guidelines/fonts.json +33 -14
- package/guidelines/grammar-and-mechanics.json +276 -0
- package/guidelines/grays.json +17 -44
- package/guidelines/header-browsing-context.json +40 -0
- package/guidelines/icon-fundamentals.json +7 -18
- package/guidelines/illustration.json +120 -0
- package/guidelines/in-product-word-list.json +25 -0
- package/guidelines/inclusive-design.json +101 -0
- package/guidelines/inclusive-ux-writing.json +34 -0
- package/guidelines/internationalization.json +103 -0
- package/guidelines/layout-spacing.json +39 -0
- package/guidelines/manifest.json +280 -16
- package/guidelines/motion.json +18 -13
- package/guidelines/object-styles-overview.json +17 -0
- package/guidelines/principles.json +7 -8
- package/guidelines/resources.json +29 -15
- package/guidelines/rounding.json +85 -0
- package/guidelines/side-navigation-browsing-context.json +74 -0
- package/guidelines/spacing-overview.json +78 -0
- package/guidelines/states.json +16 -11
- package/guidelines/support.json +125 -0
- package/guidelines/typography-overview.json +39 -0
- package/guidelines/typography-system.json +212 -0
- package/guidelines/using-icons.json +32 -47
- package/guidelines/voice-and-tone.json +51 -0
- package/guidelines/whats-new.json +21 -0
- package/guidelines/writing-about-people.json +99 -0
- package/guidelines/writing-for-errors.json +140 -0
- package/guidelines/writing-for-onboarding.json +123 -0
- package/guidelines/writing-for-readability.json +66 -0
- package/guidelines/writing-with-visuals.json +78 -0
- package/package.json +2 -2
- package/tokens/layout.tokens.json +88 -0
package/components/slider.json
CHANGED
|
@@ -9,13 +9,6 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/slider/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "Slider",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
12
|
"documentBlocks": [
|
|
20
13
|
{
|
|
21
14
|
"type": "purpose",
|
|
@@ -23,130 +16,84 @@
|
|
|
23
16
|
},
|
|
24
17
|
{
|
|
25
18
|
"type": "guideline",
|
|
26
|
-
"content": "
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "guideline",
|
|
30
|
-
"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 text, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"type": "guideline",
|
|
34
|
-
"content": "The value is the number selected within the slider’s range, from the min value to max value."
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "guideline",
|
|
38
|
-
"content": "The min and max values can also be customized appropriately for whatever the slider is showing. By default, the min value starts at 0 and the max value is set to 100."
|
|
19
|
+
"content": "Keyboard focus.\n\nA slider can be navigated using a keyboard. The keyboard focus state takes the slider's visual hover state and adds a blue ring to the slider handle in focus."
|
|
39
20
|
},
|
|
40
21
|
{
|
|
41
22
|
"type": "guideline",
|
|
42
|
-
"content": "
|
|
23
|
+
"content": "Value placement.\n\nThe value follows the placement of the label: on top when the label is on top, and on the side when the label is on the side. The exception to this rule is when the value is editable in a text field, either standard or quiet style. In that case, the editable input is always placed on the side and should include an ARIA label for accessibility, using either aria-labelledby or aria-label."
|
|
43
24
|
},
|
|
44
25
|
{
|
|
45
26
|
"type": "guideline",
|
|
46
|
-
"content": "
|
|
27
|
+
"content": "Mixed value.\n\nA slider representing multiple non-identical values appears as indeterminate, with an en dash (–) in place of the value. The handle position corresponds to the first selected value."
|
|
47
28
|
},
|
|
48
29
|
{
|
|
49
30
|
"type": "guideline",
|
|
50
|
-
"content": "
|
|
31
|
+
"content": "Text overflow.\n\nWhen the label is too long for the available horizontal space, it wraps to form another line."
|
|
51
32
|
},
|
|
52
33
|
{
|
|
53
34
|
"type": "guideline",
|
|
54
|
-
"content": "
|
|
35
|
+
"content": "Double-click to reset.\n\nAfter a slider has been adjusted, it can be reset to the default value by double-clicking the handle."
|
|
55
36
|
},
|
|
56
37
|
{
|
|
57
38
|
"type": "guideline",
|
|
58
|
-
"content": "
|
|
39
|
+
"content": "Include a label.\n\nEvery slider should have a label. A slider without a label is ambiguous and not accessible. Write the label in sentence case."
|
|
59
40
|
},
|
|
60
41
|
{
|
|
61
42
|
"type": "guideline",
|
|
62
|
-
"content": "
|
|
43
|
+
"content": "Review label-less designs.\n\nIn rare cases where context is sufficient and a label could be absent, make sure to have the design reviewed and approved by an accessibility expert. These sliders must still include an ARIA label in HTML, using either aria-label or aria-labelledby depending on context."
|
|
63
44
|
},
|
|
64
45
|
{
|
|
65
46
|
"type": "guideline",
|
|
66
|
-
"content": "
|
|
47
|
+
"content": "Allow a hot text option when needed.\n\nIn addition to dragging the handle, sliders can offer other ways to change the value, known as \"hot text.\" Users can click the value text and drag up or down, or scroll up or down while hovering over the value text."
|
|
67
48
|
},
|
|
68
49
|
{
|
|
69
50
|
"type": "guideline",
|
|
70
|
-
"content": "
|
|
51
|
+
"content": "Show value units to help provide context.\n\nSlider values can include a unit when it adds context, such as \"%\" or \"px.\" When the value is shown within a text field, the unit disappears on focus."
|
|
71
52
|
},
|
|
72
53
|
{
|
|
73
54
|
"type": "guideline",
|
|
74
|
-
"content": "
|
|
55
|
+
"content": "Prefix positive/negative values.\n\nIf the value ranges from negative to positive, prefix the value with a plus (+) or minus (-) sign. When the sign is shown within a text field, it remains visible on focus. When the sign is shown outside the text field, there should be a space between the sign and the numerical value for readability."
|
|
75
56
|
},
|
|
76
57
|
{
|
|
77
58
|
"type": "guideline",
|
|
78
|
-
"content": "
|
|
59
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the slider is mirrored. The label is right-aligned, the value is left-aligned, and the fill progresses from right to left. Keep in mind that the placement of the percent sign differs depending on the locale."
|
|
79
60
|
},
|
|
80
61
|
{
|
|
81
62
|
"type": "guideline",
|
|
82
|
-
"content": "
|
|
63
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the button. Space or Enter Executes the button 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."
|
|
83
64
|
},
|
|
84
65
|
{
|
|
85
66
|
"type": "guideline",
|
|
86
|
-
"content": "
|
|
67
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components."
|
|
87
68
|
},
|
|
88
69
|
{
|
|
89
70
|
"type": "guideline",
|
|
90
|
-
"content": "
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"content": "After a slider has been adjusted, it can be reset to the default value by double-clicking the handle."
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "guideline",
|
|
98
|
-
"content": "Every slider should have a label. A slider without a label is ambiguous and not accessible. Write the label in sentence case."
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"type": "guideline",
|
|
102
|
-
"content": "In addition to dragging the handle, sliders can offer other ways to change the value, known as “hot text.” Users can click the value text and drag up or down, or scroll up or down while hovering over the value text."
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "guideline",
|
|
106
|
-
"content": "Slider values can include a unit when it adds context, such as “%” or “px.” When the value is shown within a text field, the unit disappears on focus."
|
|
107
|
-
},
|
|
71
|
+
"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 A Non‑text elements—such as icons used in buttons—must provide a text alternative that communicates the button’s purpose. All buttons, especially icon‑only buttons, 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, AAA Buttons should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role of buttons should be utilized. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in buttons. While negative buttons do use red to reinforce their purpose, every button also includes a clear text label that communicates the action it performs. Text contrast minimums 1.4.3 AA Large 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. Resize text 1.4.4 AA Buttons should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus 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, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"implementations": [
|
|
108
75
|
{
|
|
109
|
-
"
|
|
110
|
-
"
|
|
76
|
+
"platform": "web",
|
|
77
|
+
"componentName": "Slider",
|
|
78
|
+
"package": "@react-spectrum/s2"
|
|
111
79
|
}
|
|
112
80
|
],
|
|
113
81
|
"options": {
|
|
114
|
-
"label": {
|
|
115
|
-
"type": "string"
|
|
116
|
-
},
|
|
82
|
+
"label": { "type": "string" },
|
|
117
83
|
"labelPosition": {
|
|
118
84
|
"type": "string",
|
|
119
85
|
"default": "top",
|
|
120
|
-
"values": [
|
|
121
|
-
{
|
|
122
|
-
"value": "top"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"value": "side"
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"value": {
|
|
130
|
-
"type": "number",
|
|
131
|
-
"description": "from minValue to maxValue"
|
|
132
|
-
},
|
|
133
|
-
"minValue": {
|
|
134
|
-
"type": "number",
|
|
135
|
-
"default": 0
|
|
136
|
-
},
|
|
137
|
-
"maxValue": {
|
|
138
|
-
"type": "number",
|
|
139
|
-
"default": 100
|
|
86
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
140
87
|
},
|
|
88
|
+
"value": { "type": "number", "description": "from minValue to maxValue" },
|
|
89
|
+
"minValue": { "type": "number", "default": 0 },
|
|
90
|
+
"maxValue": { "type": "number", "default": 100 },
|
|
141
91
|
"isRange": {
|
|
142
92
|
"type": "boolean",
|
|
143
93
|
"default": false,
|
|
144
94
|
"description": "If true, the slider will allow selection of a range of values by displaying two handles."
|
|
145
95
|
},
|
|
146
|
-
"step": {
|
|
147
|
-
"type": "number",
|
|
148
|
-
"default": 1
|
|
149
|
-
},
|
|
96
|
+
"step": { "type": "number", "default": 1 },
|
|
150
97
|
"valueFormat": {
|
|
151
98
|
"type": "string",
|
|
152
99
|
"description": "This will vary depending on implementation."
|
|
@@ -154,92 +101,36 @@
|
|
|
154
101
|
"progressionScale": {
|
|
155
102
|
"type": "string",
|
|
156
103
|
"default": "linear",
|
|
157
|
-
"values": [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
"width": {
|
|
167
|
-
"type": "number"
|
|
168
|
-
},
|
|
169
|
-
"hasFill": {
|
|
170
|
-
"type": "boolean",
|
|
171
|
-
"default": false
|
|
172
|
-
},
|
|
173
|
-
"fillStart": {
|
|
174
|
-
"type": "number",
|
|
175
|
-
"default": 0
|
|
176
|
-
},
|
|
177
|
-
"hasGradient": {
|
|
178
|
-
"type": "boolean",
|
|
179
|
-
"default": false
|
|
180
|
-
},
|
|
181
|
-
"isEditable": {
|
|
182
|
-
"type": "boolean",
|
|
183
|
-
"default": false
|
|
184
|
-
},
|
|
185
|
-
"isDisabled": {
|
|
186
|
-
"type": "boolean",
|
|
187
|
-
"default": false
|
|
188
|
-
}
|
|
104
|
+
"values": [{ "value": "linear" }, { "value": "log" }]
|
|
105
|
+
},
|
|
106
|
+
"width": { "type": "number" },
|
|
107
|
+
"hasFill": { "type": "boolean", "default": false },
|
|
108
|
+
"fillStart": { "type": "number", "default": 0 },
|
|
109
|
+
"hasGradient": { "type": "boolean", "default": false },
|
|
110
|
+
"isEditable": { "type": "boolean", "default": false },
|
|
111
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
189
112
|
},
|
|
190
113
|
"anatomy": [
|
|
191
|
-
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
{
|
|
196
|
-
"name": "handle"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"name": "track"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"name": "control"
|
|
203
|
-
}
|
|
114
|
+
{ "name": "text-field", "description": "Editable numeric value field." },
|
|
115
|
+
{ "name": "handle" },
|
|
116
|
+
{ "name": "track" },
|
|
117
|
+
{ "name": "control" }
|
|
204
118
|
],
|
|
205
119
|
"states": [
|
|
206
|
-
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"name": "down",
|
|
212
|
-
"trigger": "interaction"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"name": "keyboard-focus",
|
|
216
|
-
"trigger": "interaction"
|
|
217
|
-
}
|
|
120
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
121
|
+
{ "name": "down", "trigger": "interaction" },
|
|
122
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
218
123
|
],
|
|
219
|
-
"lifecycle": {
|
|
220
|
-
"introduced": "1.0.0-draft"
|
|
221
|
-
},
|
|
124
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
222
125
|
"accessibility": {
|
|
223
126
|
"role": "slider",
|
|
224
127
|
"intents": ["choose"],
|
|
225
128
|
"focusable": true,
|
|
226
129
|
"keyboardIntents": ["increment", "decrement"],
|
|
227
130
|
"wcag": [
|
|
228
|
-
{
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"title": "Info and Relationships"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"criterion": "2.1.1",
|
|
235
|
-
"level": "A",
|
|
236
|
-
"title": "Keyboard"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"criterion": "4.1.2",
|
|
240
|
-
"level": "A",
|
|
241
|
-
"title": "Name, Role, Value"
|
|
242
|
-
}
|
|
131
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
132
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
133
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
243
134
|
]
|
|
244
135
|
}
|
|
245
136
|
}
|
|
@@ -16,80 +16,33 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Placement.\n\nStandard dialogs appear in the center of the screen."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Text overflow.\n\nWhen the title and description text are too long for the available horizontal space, they wrap to form another line."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Button group overflow.\n\nStandard dialogs can include up to three buttons. When horizontal space is limited, the buttons stack vertically. Buttons should be ordered by ascending importance, with the most critical action placed at the end or bottom of the stack."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Dismissible or not?\n\nWhether a dialog is dismissible is controlled by the hideCloseButton prop. A dialog with a close button can be dismissed by clicking the button or the background overlay. Avoid using a dismissible dialog when the user needs to confirm an action or make a decision. Instead, use a dismissible dialog for information that is optional or nice to know—content that can be quickly dismissed without requiring user action."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"type": "
|
|
35
|
-
"content": "
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
"type": "guideline",
|
|
39
|
-
"content": "In both cases, pressing the Escape key should close the dialog and return the page to its previous state. This action should behave the same as clicking a close or cancel button."
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "guideline",
|
|
43
|
-
"content": "Standard dialogs are available in three widths:"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "guideline",
|
|
47
|
-
"content": "Dialogs automatically scale down to 90% of the screen width on smaller viewports. Height is flexible and adjusts to fit the content."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "Standard dialogs can include a full-bleed cover image at the top. Dialogs with a cover image should not be dismissible and rely on buttons in the footer area to close the dialog."
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"content": "Standard dialogs can include an optional description. Use the description to briefly provide additional context or information that helps users make an informed decision based on the available actions."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"content": "All standard dialogs must include a title. The title appears at the top of the dialog and should briefly describe the expected outcome if the user proceeds with the primary action. If a cover image is shown, the title will appear below it."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
63
|
-
"content": "Standard dialogs appear in the center of the screen."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "guideline",
|
|
67
|
-
"content": "When the title and description text are too long for the available horizontal space, they wrap to form another line."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
71
|
-
"content": "Standard dialogs can include up to three buttons. When horizontal space is limited, the buttons stack vertically. Buttons should be ordered by ascending importance, with the most critical action placed at the end or bottom of the stack."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
75
|
-
"content": "Avoid using a dismissible dialog when the user needs to confirm an action or make a decision. Instead, use a dismissible dialog for information that is optional or nice to know—content that can be quickly dismissed without requiring user action."
|
|
34
|
+
"type": "do-dont",
|
|
35
|
+
"content": "Don't include buttons when dismissible",
|
|
36
|
+
"dont": "A dismissible dialog should not include buttons in the footer. Instead, the dialog is dismissed by clicking the close button or the background overlay."
|
|
76
37
|
},
|
|
77
38
|
{
|
|
78
39
|
"type": "guideline",
|
|
79
|
-
"content": "
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "guideline",
|
|
83
|
-
"content": "Most dialog titles should communicate the primary action of the dialog. When possible, the button label should use the same language as the action mentioned in the title. For example, if the title is “Delete conversation,” the primary action button label should be “Delete.”"
|
|
40
|
+
"content": "Use similar language for dialog titles and actions.\n\nMost dialog titles should communicate the primary action of the dialog. When possible, the button label should use the same language as the action mentioned in the title. For example, if the title is \"Delete conversation,\" the primary action button label should be \"Delete."
|
|
84
41
|
}
|
|
85
42
|
],
|
|
86
43
|
"options": {
|
|
87
|
-
"title": {
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
"description": {
|
|
91
|
-
"type": "string"
|
|
92
|
-
},
|
|
44
|
+
"title": { "type": "string" },
|
|
45
|
+
"description": { "type": "string" },
|
|
93
46
|
"hideImage": {
|
|
94
47
|
"type": "boolean",
|
|
95
48
|
"default": false,
|
|
@@ -98,29 +51,14 @@
|
|
|
98
51
|
"size": {
|
|
99
52
|
"type": "string",
|
|
100
53
|
"default": "m",
|
|
101
|
-
"values": [
|
|
102
|
-
{
|
|
103
|
-
"value": "s"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"value": "m"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"value": "l"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
"hideCloseButton": {
|
|
114
|
-
"type": "boolean",
|
|
115
|
-
"default": false
|
|
54
|
+
"values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
|
|
116
55
|
},
|
|
56
|
+
"hideCloseButton": { "type": "boolean", "default": false },
|
|
117
57
|
"footerContent": {
|
|
118
58
|
"type": "string",
|
|
119
59
|
"description": "Optional footer content to display in the dialog footer like a checkbox."
|
|
120
60
|
},
|
|
121
|
-
"primaryActionLabel": {
|
|
122
|
-
"type": "string"
|
|
123
|
-
},
|
|
61
|
+
"primaryActionLabel": { "type": "string" },
|
|
124
62
|
"secondaryActionLabel": {
|
|
125
63
|
"type": "string",
|
|
126
64
|
"description": "If undefined, this button does not appear."
|
|
@@ -131,25 +69,15 @@
|
|
|
131
69
|
"description": "If undefined, this button does not appear."
|
|
132
70
|
}
|
|
133
71
|
},
|
|
134
|
-
"lifecycle": {
|
|
135
|
-
"introduced": "1.0.0-draft"
|
|
136
|
-
},
|
|
72
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
137
73
|
"accessibility": {
|
|
138
74
|
"role": "dialog",
|
|
139
75
|
"intents": ["dismiss"],
|
|
140
76
|
"focusable": false,
|
|
141
77
|
"keyboardIntents": ["dismiss"],
|
|
142
78
|
"wcag": [
|
|
143
|
-
{
|
|
144
|
-
|
|
145
|
-
"level": "A",
|
|
146
|
-
"title": "Focus Order"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"criterion": "4.1.2",
|
|
150
|
-
"level": "A",
|
|
151
|
-
"title": "Name, Role, Value"
|
|
152
|
-
}
|
|
79
|
+
{ "criterion": "2.4.3", "level": "A", "title": "Focus Order" },
|
|
80
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
153
81
|
]
|
|
154
82
|
}
|
|
155
83
|
}
|