@adobe/spectrum-design-data 3.3.0-beta.2 → 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.
Files changed (136) hide show
  1. package/components/accordion.json +67 -15
  2. package/components/action-bar.json +30 -9
  3. package/components/action-button.json +92 -39
  4. package/components/action-group.json +137 -18
  5. package/components/alert-banner.json +27 -8
  6. package/components/alert-dialog.json +55 -34
  7. package/components/avatar-group.json +35 -9
  8. package/components/avatar.json +105 -29
  9. package/components/badge.json +163 -56
  10. package/components/breadcrumbs.json +107 -26
  11. package/components/button-group.json +63 -19
  12. package/components/button.json +105 -61
  13. package/components/calendar.json +74 -8
  14. package/components/card.json +13 -0
  15. package/components/cards.json +46 -31
  16. package/components/checkbox-group.json +85 -16
  17. package/components/checkbox.json +97 -27
  18. package/components/close-button.json +75 -20
  19. package/components/coach-indicator.json +44 -14
  20. package/components/coach-mark.json +26 -8
  21. package/components/color-area.json +100 -20
  22. package/components/color-handle.json +46 -25
  23. package/components/color-loupe.json +14 -2
  24. package/components/color-slider.json +129 -26
  25. package/components/color-wheel.json +91 -17
  26. package/components/combo-box.json +189 -50
  27. package/components/contextual-help.json +126 -80
  28. package/components/date-field.json +7 -0
  29. package/components/date-picker.json +127 -24
  30. package/components/divider.json +38 -12
  31. package/components/drop-zone.json +37 -18
  32. package/components/field-label.json +62 -21
  33. package/components/heading.json +7 -0
  34. package/components/help-text.json +53 -16
  35. package/components/illustrated-message.json +85 -21
  36. package/components/in-line-alert.json +53 -13
  37. package/components/link.json +63 -24
  38. package/components/list-view.json +80 -15
  39. package/components/menu.json +181 -45
  40. package/components/meter.json +78 -24
  41. package/components/number-field.json +175 -34
  42. package/components/picker.json +188 -42
  43. package/components/popover.json +126 -37
  44. package/components/progress-bar.json +108 -23
  45. package/components/progress-circle.json +55 -12
  46. package/components/radio-button.json +67 -14
  47. package/components/radio-group.json +132 -28
  48. package/components/rating.json +38 -9
  49. package/components/search-field.json +126 -34
  50. package/components/segmented-control.json +70 -21
  51. package/components/select-box.json +103 -29
  52. package/components/side-navigation.json +69 -28
  53. package/components/slider.json +155 -39
  54. package/components/standard-dialog.json +88 -16
  55. package/components/status-light.json +136 -41
  56. package/components/steplist.json +24 -5
  57. package/components/swatch-group.json +55 -19
  58. package/components/swatch.json +79 -24
  59. package/components/switch.json +79 -31
  60. package/components/table.json +73 -26
  61. package/components/tabs.json +52 -22
  62. package/components/tag-field.json +60 -14
  63. package/components/tag-group.json +56 -16
  64. package/components/tag.json +78 -21
  65. package/components/takeover-dialog.json +61 -10
  66. package/components/text-area.json +205 -49
  67. package/components/text-field.json +170 -42
  68. package/components/thumbnail.json +63 -22
  69. package/components/time-field.json +7 -0
  70. package/components/toast.json +50 -29
  71. package/components/tooltip.json +87 -27
  72. package/components/tree-view.json +147 -45
  73. package/components/user-card.json +7 -0
  74. package/guidelines/app-frame-overview.json +44 -46
  75. package/guidelines/attention-hierarchy.json +22 -13
  76. package/guidelines/background-layers.json +10 -80
  77. package/guidelines/brand.json +12 -32
  78. package/guidelines/colors.json +17 -47
  79. package/guidelines/developer-overview.json +9 -25
  80. package/guidelines/faqs.json +9 -96
  81. package/guidelines/fonts.json +14 -29
  82. package/guidelines/grays.json +44 -17
  83. package/guidelines/icon-fundamentals.json +18 -7
  84. package/guidelines/manifest.json +15 -367
  85. package/guidelines/motion.json +16 -17
  86. package/guidelines/principles.json +8 -7
  87. package/guidelines/resources.json +15 -21
  88. package/guidelines/states.json +11 -16
  89. package/guidelines/using-icons.json +44 -33
  90. package/package.json +2 -2
  91. package/registry/platform-implementations.json +30 -0
  92. package/guidelines/ai-resource-guide.json +0 -50
  93. package/guidelines/applying-the-type-system.json +0 -67
  94. package/guidelines/bi-directionality.json +0 -57
  95. package/guidelines/border-width.json +0 -58
  96. package/guidelines/cognitive.json +0 -197
  97. package/guidelines/component-spacing.json +0 -61
  98. package/guidelines/contact-us.json +0 -67
  99. package/guidelines/content-area-browsing-context.json +0 -65
  100. package/guidelines/content-design-grammar-and-mechanics.json +0 -241
  101. package/guidelines/content-design-voice-and-tone.json +0 -37
  102. package/guidelines/content-grammar-and-mechanics.json +0 -252
  103. package/guidelines/content-language-and-inclusivity-writing-about-people.json +0 -103
  104. package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +0 -70
  105. package/guidelines/content-voice-and-tone.json +0 -47
  106. package/guidelines/creating-bluelines-browsing-context.json +0 -91
  107. package/guidelines/design-tokens.json +0 -158
  108. package/guidelines/drop-shadow.json +0 -68
  109. package/guidelines/grammar-and-mechanics.json +0 -252
  110. package/guidelines/header-browsing-context.json +0 -40
  111. package/guidelines/illustration.json +0 -105
  112. package/guidelines/in-product-word-list.json +0 -29
  113. package/guidelines/inclusive-design.json +0 -101
  114. package/guidelines/inclusive-ux-writing.json +0 -30
  115. package/guidelines/internationalization.json +0 -87
  116. package/guidelines/language-and-inclusivity-writing-about-people.json +0 -85
  117. package/guidelines/language-and-inclusivity-writing-with-visuals.json +0 -61
  118. package/guidelines/layout-and-structure-containers.json +0 -47
  119. package/guidelines/layout-and-structure-spacing-overview.json +0 -66
  120. package/guidelines/layout-spacing.json +0 -39
  121. package/guidelines/object-styles-overview.json +0 -17
  122. package/guidelines/rounding.json +0 -73
  123. package/guidelines/side-navigation-browsing-context.json +0 -74
  124. package/guidelines/spacing-overview.json +0 -45
  125. package/guidelines/support.json +0 -113
  126. package/guidelines/typography-overview.json +0 -43
  127. package/guidelines/typography-system.json +0 -208
  128. package/guidelines/visual-language-containers.json +0 -36
  129. package/guidelines/voice-and-tone.json +0 -47
  130. package/guidelines/whats-new.json +0 -32
  131. package/guidelines/writing-about-people.json +0 -103
  132. package/guidelines/writing-for-errors.json +0 -120
  133. package/guidelines/writing-for-onboarding.json +0 -119
  134. package/guidelines/writing-for-readability.json +0 -54
  135. package/guidelines/writing-with-visuals.json +0 -70
  136. package/registry/platform-extensions/web-components-states.json +0 -58
@@ -9,6 +9,13 @@
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
+ ],
12
19
  "documentBlocks": [
13
20
  {
14
21
  "type": "purpose",
@@ -16,77 +23,130 @@
16
23
  },
17
24
  {
18
25
  "type": "guideline",
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."
26
+ "content": "Sliders select a value along a continuous range. They’re ideal when upper and lower limits are fixed. Use when approximate or fast selection is more important than precision."
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."
39
+ },
40
+ {
41
+ "type": "guideline",
42
+ "content": "More information about a design scenario, to use this option in the component."
43
+ },
44
+ {
45
+ "type": "guideline",
46
+ "content": "The step is the increment by which these values increase or decrease. A step value of 1 (the default) lets a user only select whole numbers within the min and max range."
47
+ },
48
+ {
49
+ "type": "guideline",
50
+ "content": "Sometimes a value needs to be formatted for localization or for clearer communication such as currencies or percentages. Formatting can involve rounding, mathematical transformations, number formatting, or displaying a prefix or suffix, such as “+/-” or “px.”"
51
+ },
52
+ {
53
+ "type": "guideline",
54
+ "content": "Sliders use a linear progression scale by default which means that value is directly correlated to the position of the handle along the track. In some cases, sliders can use a logarithmic (log) progression scale, which is helpful when users need finer control over small values."
55
+ },
56
+ {
57
+ "type": "guideline",
58
+ "content": "The width of a slider can be customized appropriately for its context."
20
59
  },
21
60
  {
22
61
  "type": "guideline",
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."
62
+ "content": "The track of the slider can have a fill. By default, the fill originates from the left side of the track."
24
63
  },
25
64
  {
26
65
  "type": "guideline",
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."
66
+ "content": "If the value represents an offset, the fill start can be set to represent the point of origin. This allows the slider fill to start from inside the track."
28
67
  },
29
68
  {
30
69
  "type": "guideline",
31
- "content": "Text overflow.\n\nWhen the label is too long for the available horizontal space, it wraps to form another line."
70
+ "content": "A gradient can be added to the track of any slider to give more meaning to the range of values. Tracks with a gradient can also have a fill. A gradient track should not be used for choosing a precise color; use a color slider, color area, or color wheel instead."
32
71
  },
33
72
  {
34
73
  "type": "guideline",
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."
74
+ "content": "In situations where users should be able to precisely input a value, the value can be editable within a text field."
36
75
  },
37
76
  {
38
77
  "type": "guideline",
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."
78
+ "content": "A disabled slider shows that an input exists but is not available in the current context. This helps maintain layout continuity and signals that the slider may become available later."
40
79
  },
41
80
  {
42
81
  "type": "guideline",
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."
82
+ "content": "A 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."
44
83
  },
45
84
  {
46
85
  "type": "guideline",
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."
86
+ "content": "A 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."
48
87
  },
49
88
  {
50
89
  "type": "guideline",
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."
90
+ "content": "When the label is too long for the available horizontal space, it wraps to form another line."
52
91
  },
53
92
  {
54
93
  "type": "guideline",
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."
94
+ "content": "After a slider has been adjusted, it can be reset to the default value by double-clicking the handle."
56
95
  },
57
96
  {
58
97
  "type": "guideline",
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."
98
+ "content": "Every slider should have a label. A slider without a label is ambiguous and not accessible. Write the label in sentence case."
60
99
  },
61
100
  {
62
101
  "type": "guideline",
63
- "content": "Keyboard interactions.\n\nKey Interaction TabMoves focus onto or off of the button.Space or EnterExecutes 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."
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."
64
103
  },
65
104
  {
66
105
  "type": "guideline",
67
- "content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
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."
68
107
  },
69
108
  {
70
109
  "type": "guideline",
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 ANon‑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, AAAButtons 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 AColor 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 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.Resize text 1.4.4 AAButtons should be built in such a way that they can be resized without assistive technology up to 200%.Visual presentation 1.4.8 AAAThe 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 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. 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."
110
+ "content": "If 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."
72
111
  }
73
112
  ],
74
113
  "options": {
75
- "label": { "type": "string" },
114
+ "label": {
115
+ "type": "string"
116
+ },
76
117
  "labelPosition": {
77
118
  "type": "string",
78
119
  "default": "top",
79
- "values": [{ "value": "top" }, { "value": "side" }]
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
80
140
  },
81
- "value": { "type": "number", "description": "from minValue to maxValue" },
82
- "minValue": { "type": "number", "default": 0 },
83
- "maxValue": { "type": "number", "default": 100 },
84
141
  "isRange": {
85
142
  "type": "boolean",
86
143
  "default": false,
87
144
  "description": "If true, the slider will allow selection of a range of values by displaying two handles."
88
145
  },
89
- "step": { "type": "number", "default": 1 },
146
+ "step": {
147
+ "type": "number",
148
+ "default": 1
149
+ },
90
150
  "valueFormat": {
91
151
  "type": "string",
92
152
  "description": "This will vary depending on implementation."
@@ -94,36 +154,92 @@
94
154
  "progressionScale": {
95
155
  "type": "string",
96
156
  "default": "linear",
97
- "values": [{ "value": "linear" }, { "value": "log" }]
98
- },
99
- "width": { "type": "number" },
100
- "hasFill": { "type": "boolean", "default": false },
101
- "fillStart": { "type": "number", "default": 0 },
102
- "hasGradient": { "type": "boolean", "default": false },
103
- "isEditable": { "type": "boolean", "default": false },
104
- "isDisabled": { "type": "boolean", "default": false }
157
+ "values": [
158
+ {
159
+ "value": "linear"
160
+ },
161
+ {
162
+ "value": "log"
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
+ }
105
189
  },
106
190
  "anatomy": [
107
- { "name": "text-field", "description": "Editable numeric value field." },
108
- { "name": "handle" },
109
- { "name": "track" },
110
- { "name": "control" }
191
+ {
192
+ "name": "text-field",
193
+ "description": "Editable numeric value field."
194
+ },
195
+ {
196
+ "name": "handle"
197
+ },
198
+ {
199
+ "name": "track"
200
+ },
201
+ {
202
+ "name": "control"
203
+ }
111
204
  ],
112
205
  "states": [
113
- { "name": "hover", "trigger": "interaction" },
114
- { "name": "down", "trigger": "interaction" },
115
- { "name": "keyboard-focus", "trigger": "interaction" }
206
+ {
207
+ "name": "hover",
208
+ "trigger": "interaction"
209
+ },
210
+ {
211
+ "name": "down",
212
+ "trigger": "interaction"
213
+ },
214
+ {
215
+ "name": "keyboard-focus",
216
+ "trigger": "interaction"
217
+ }
116
218
  ],
117
- "lifecycle": { "introduced": "1.0.0-draft" },
219
+ "lifecycle": {
220
+ "introduced": "1.0.0-draft"
221
+ },
118
222
  "accessibility": {
119
223
  "role": "slider",
120
224
  "intents": ["choose"],
121
225
  "focusable": true,
122
226
  "keyboardIntents": ["increment", "decrement"],
123
227
  "wcag": [
124
- { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
125
- { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
126
- { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
228
+ {
229
+ "criterion": "1.3.1",
230
+ "level": "A",
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
+ }
127
243
  ]
128
244
  }
129
245
  }
@@ -16,33 +16,80 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Placement.\n\nStandard dialogs appear in the center of the screen."
19
+ "content": "Standard dialogs are containers that appear over the interface to present contextual information, tasks, or workflows. They’re centered on the screen and used for moderately complex actions that require focused attention. Interactions outside the dialog are blocked until it's dismissed or completed."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
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."
23
+ "content": "By default, an alert dialog that includes a button to cancel or go back will be labeled “Cancel.”"
24
24
  },
25
25
  {
26
26
  "type": "guideline",
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."
27
+ "content": "Standard dialogs can include up to three buttons if a secondary outline button label is defined. If no label is defined, the button won’t appear. The secondary outline button should use a short, actionable phrase that clearly communicates the result of selecting the action—typically describing the previous step or an alternative choice."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
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."
31
+ "content": "The primary action label refers to the rightmost button in the dialog footer for languages that read left to right. It should use a short, actionable phrase that clearly communicates the result of selecting the action—whether that means moving forward or dismissing the dialog."
32
32
  },
33
33
  {
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."
34
+ "type": "guideline",
35
+ "content": "The presence of a close button determines whether a dialog is dismissible."
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."
37
76
  },
38
77
  {
39
78
  "type": "guideline",
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."
79
+ "content": "A dismissible dialog should not include buttons in the footer. Instead, the dialog is dismissed by clicking the close button or the background overlay."
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.”"
41
84
  }
42
85
  ],
43
86
  "options": {
44
- "title": { "type": "string" },
45
- "description": { "type": "string" },
87
+ "title": {
88
+ "type": "string"
89
+ },
90
+ "description": {
91
+ "type": "string"
92
+ },
46
93
  "hideImage": {
47
94
  "type": "boolean",
48
95
  "default": false,
@@ -51,14 +98,29 @@
51
98
  "size": {
52
99
  "type": "string",
53
100
  "default": "m",
54
- "values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
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
55
116
  },
56
- "hideCloseButton": { "type": "boolean", "default": false },
57
117
  "footerContent": {
58
118
  "type": "string",
59
119
  "description": "Optional footer content to display in the dialog footer like a checkbox."
60
120
  },
61
- "primaryActionLabel": { "type": "string" },
121
+ "primaryActionLabel": {
122
+ "type": "string"
123
+ },
62
124
  "secondaryActionLabel": {
63
125
  "type": "string",
64
126
  "description": "If undefined, this button does not appear."
@@ -69,15 +131,25 @@
69
131
  "description": "If undefined, this button does not appear."
70
132
  }
71
133
  },
72
- "lifecycle": { "introduced": "1.0.0-draft" },
134
+ "lifecycle": {
135
+ "introduced": "1.0.0-draft"
136
+ },
73
137
  "accessibility": {
74
138
  "role": "dialog",
75
139
  "intents": ["dismiss"],
76
140
  "focusable": false,
77
141
  "keyboardIntents": ["dismiss"],
78
142
  "wcag": [
79
- { "criterion": "2.4.3", "level": "A", "title": "Focus Order" },
80
- { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
143
+ {
144
+ "criterion": "2.4.3",
145
+ "level": "A",
146
+ "title": "Focus Order"
147
+ },
148
+ {
149
+ "criterion": "4.1.2",
150
+ "level": "A",
151
+ "title": "Name, Role, Value"
152
+ }
81
153
  ]
82
154
  }
83
155
  }