@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
package/components/picker.json
CHANGED
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/picker/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Picker",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,86 +23,159 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
26
|
+
"content": "Pickers present a list of options in a compact format for selection. They’re sometimes called “dropdowns” or “selects,” and the available options may change based on context."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "guideline",
|
|
30
|
+
"content": "The error message communicates an error for when the selection requirements aren’t met, prompting a user to adjust what they had originally selected."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "guideline",
|
|
34
|
+
"content": "A picker can have help text below the field to give extra context or instruction about what a user should input in the field. The help text communicates a hint or helpful information, such as specific requirements for correctly filling out the field."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "guideline",
|
|
38
|
+
"content": "A picker can be marked as having an error to show that a value needs to be entered in order to move forward or that a value that was entered is invalid."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "guideline",
|
|
42
|
+
"content": "A picker in a disabled state shows that an input field exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that it may become available later."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "guideline",
|
|
46
|
+
"content": "The picker menu is a menu element that is used to display the options for the picker. A picker menu can include menu items, menu dividers, and menu groups. A picker menu should never contain submenus, as doing so would render it inaccessible."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "guideline",
|
|
50
|
+
"content": "For required pickers, you have two options:"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "guideline",
|
|
54
|
+
"content": "For optional pickers, you have two options:"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "guideline",
|
|
58
|
+
"content": "By default, pickers have a visible background. This style works best in a dense array of controls where the background helps to separate the input from the surrounding container, or to give visibility to isolated buttons."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "guideline",
|
|
62
|
+
"content": "Alternatively, quiet pickers can have no visible background. 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."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "guideline",
|
|
66
|
+
"content": "Pickers 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."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "guideline",
|
|
70
|
+
"content": "The width of a picker can be customized appropriately for its context. This option is not applicable to quiet pickers."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "guideline",
|
|
74
|
+
"content": "The value shows the option that a user has selected."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "guideline",
|
|
78
|
+
"content": "Placeholder text provides hints about expected input values. It disappears once a user selects an option."
|
|
20
79
|
},
|
|
21
80
|
{
|
|
22
81
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
82
|
+
"content": "Labels can be placed either on top or on the side. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
|
|
24
83
|
},
|
|
25
84
|
{
|
|
26
85
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
86
|
+
"content": "Pickers should always have a label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These pickers without a visible label should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
|
|
28
87
|
},
|
|
29
88
|
{
|
|
30
89
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
90
|
+
"content": "When the field label and menu text are too long for the available horizontal space, they wrap to form another line. The field text itself truncates at the end, but the text can be shown in full in the menu."
|
|
32
91
|
},
|
|
33
92
|
{
|
|
34
93
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
94
|
+
"content": "When the help or error text is too long for the available horizontal space, it wraps to form another line."
|
|
36
95
|
},
|
|
37
96
|
{
|
|
38
97
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
98
|
+
"content": "The picker menu can be as tall as necessary to show as many options as possible in the available space. There is no maximum height."
|
|
40
99
|
},
|
|
41
100
|
{
|
|
42
101
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
102
|
+
"content": "Every picker should have a label. A picker without a label is ambiguous and not accessible."
|
|
44
103
|
},
|
|
45
104
|
{
|
|
46
105
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
106
|
+
"content": "In 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 should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
|
|
48
107
|
},
|
|
49
108
|
{
|
|
50
109
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
110
|
+
"content": "Keep menu items short and concise. Long menu items that cause text to wrap to multiple lines are discouraged. If text wrapping becomes a frequent concern, consider revising the text or use alternative UI patterns that will give your content more space."
|
|
52
111
|
},
|
|
53
112
|
{
|
|
54
113
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
114
|
+
"content": "When possible, the field button width should be wide enough so that any chosen menu items can be displayed in full."
|
|
56
115
|
},
|
|
57
116
|
{
|
|
58
117
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
118
|
+
"content": "Field labels, placeholder text, and menu items should be in sentence case."
|
|
60
119
|
},
|
|
61
120
|
{
|
|
62
121
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
122
|
+
"content": "When labeling pickers in a form, only mark the minority type — either required or optional — to reduce visual clutter:"
|
|
64
123
|
},
|
|
65
124
|
{
|
|
66
125
|
"type": "guideline",
|
|
67
|
-
"content": "
|
|
126
|
+
"content": "Never use an asterisk to indicate an optional picker."
|
|
68
127
|
},
|
|
69
128
|
{
|
|
70
129
|
"type": "guideline",
|
|
71
|
-
"content": "
|
|
130
|
+
"content": "A picker’s description in the help text is can communicate what to select or how to select an option. This includes information such as:"
|
|
72
131
|
},
|
|
73
132
|
{
|
|
74
133
|
"type": "guideline",
|
|
75
|
-
"content": "
|
|
134
|
+
"content": "The help text’s message should not simply restate the same information in the label in order to prompt someone to interact with a picker. Don’t add help text if it isn’t actually relevant or meaningful to a user in order to try to maintain layout continuity with other inputs that require help text."
|
|
76
135
|
},
|
|
77
136
|
{
|
|
78
137
|
"type": "guideline",
|
|
79
|
-
"content": "
|
|
138
|
+
"content": "The help text area also displays an error message. When a picker already includes help text and an error is triggered, the help text is replaced with error text. Once the error is resolved, the help text description reappears below the picker."
|
|
80
139
|
},
|
|
81
140
|
{
|
|
82
141
|
"type": "guideline",
|
|
83
|
-
"content": "
|
|
142
|
+
"content": "Since one gets replaced by the other, the language of the help text and error text need to work together to convey the same messaging. Help text explains the requirement or adds supplementary context for how to complete the interaction. Error text tells a user how to fix the error by re-stating the selection requirements or describing the necessary interaction. Make sure that the help text and the error text include the same essential information so that it isn’t lost if one replaces the other like minimum requirements."
|
|
84
143
|
},
|
|
85
144
|
{
|
|
86
145
|
"type": "guideline",
|
|
87
|
-
"content": "
|
|
146
|
+
"content": "Write error messaging in a human-centered way by guiding a user and showing them a solution — don’t simply state what’s wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error to a user."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "guideline",
|
|
150
|
+
"content": "Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. End sentences with a period, and never with an exclamation point. For pickers, the nature of the error is often related to something that needs to be fixed for in-line validation, so a helpful tone is most appropriate. For example, if someone were to miss selecting an option to note as their preferred contact method, write the error text like you’re offering a hint or a tip to help guide them to understand what needs to be selected: “Select a contact method.”"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "guideline",
|
|
154
|
+
"content": "Placeholder text provides hints about expected input values. When implemented properly, it enhances usability without compromising accessibility."
|
|
88
155
|
}
|
|
89
156
|
],
|
|
90
157
|
"options": {
|
|
91
|
-
"label": {
|
|
158
|
+
"label": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
92
161
|
"labelPosition": {
|
|
93
162
|
"type": "string",
|
|
94
163
|
"default": "top",
|
|
95
|
-
"values": [
|
|
164
|
+
"values": [
|
|
165
|
+
{
|
|
166
|
+
"value": "top"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"value": "side"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"placeholder": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"value": {
|
|
177
|
+
"type": "string"
|
|
96
178
|
},
|
|
97
|
-
"placeholder": { "type": "string" },
|
|
98
|
-
"value": { "type": "string" },
|
|
99
179
|
"width": {
|
|
100
180
|
"type": "number",
|
|
101
181
|
"description": "Not applicable to quiet picker."
|
|
@@ -104,45 +184,111 @@
|
|
|
104
184
|
"type": "string",
|
|
105
185
|
"default": "m",
|
|
106
186
|
"values": [
|
|
107
|
-
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
187
|
+
{
|
|
188
|
+
"value": "s"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"value": "m"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"value": "l"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"value": "xl"
|
|
198
|
+
}
|
|
111
199
|
]
|
|
112
200
|
},
|
|
113
|
-
"isQuiet": {
|
|
201
|
+
"isQuiet": {
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"default": false
|
|
204
|
+
},
|
|
114
205
|
"necessityIndicator": {
|
|
115
206
|
"type": "string",
|
|
116
207
|
"default": "icon",
|
|
117
|
-
"values": [
|
|
208
|
+
"values": [
|
|
209
|
+
{
|
|
210
|
+
"value": "text"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"value": "icon"
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"isRequired": {
|
|
218
|
+
"type": "boolean",
|
|
219
|
+
"default": false
|
|
118
220
|
},
|
|
119
|
-
"isRequired": { "type": "boolean", "default": false },
|
|
120
221
|
"menuContainer": {
|
|
121
222
|
"type": "string",
|
|
122
223
|
"default": "popover",
|
|
123
|
-
"values": [
|
|
224
|
+
"values": [
|
|
225
|
+
{
|
|
226
|
+
"value": "popover"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"value": "tray"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"isDisabled": {
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"default": false
|
|
236
|
+
},
|
|
237
|
+
"isError": {
|
|
238
|
+
"type": "boolean",
|
|
239
|
+
"default": false
|
|
124
240
|
},
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
241
|
+
"description": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"default": null
|
|
244
|
+
},
|
|
245
|
+
"errorMessage": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"default": null
|
|
248
|
+
}
|
|
129
249
|
},
|
|
130
250
|
"states": [
|
|
131
|
-
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
251
|
+
{
|
|
252
|
+
"name": "hover",
|
|
253
|
+
"trigger": "interaction"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "focus-+-hover",
|
|
257
|
+
"trigger": "prop"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "focus-+-not-hover",
|
|
261
|
+
"trigger": "prop"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "keyboard-focus",
|
|
265
|
+
"trigger": "interaction"
|
|
266
|
+
}
|
|
135
267
|
],
|
|
136
|
-
"lifecycle": {
|
|
268
|
+
"lifecycle": {
|
|
269
|
+
"introduced": "1.0.0-draft"
|
|
270
|
+
},
|
|
137
271
|
"accessibility": {
|
|
138
272
|
"role": "combobox",
|
|
139
273
|
"intents": ["select", "expand"],
|
|
140
274
|
"focusable": true,
|
|
141
275
|
"keyboardIntents": ["expand", "collapse", "navigate-options"],
|
|
142
276
|
"wcag": [
|
|
143
|
-
{
|
|
144
|
-
|
|
145
|
-
|
|
277
|
+
{
|
|
278
|
+
"criterion": "1.3.1",
|
|
279
|
+
"level": "A",
|
|
280
|
+
"title": "Info and Relationships"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"criterion": "2.1.1",
|
|
284
|
+
"level": "A",
|
|
285
|
+
"title": "Keyboard"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"criterion": "4.1.2",
|
|
289
|
+
"level": "A",
|
|
290
|
+
"title": "Name, Role, Value"
|
|
291
|
+
}
|
|
146
292
|
]
|
|
147
293
|
}
|
|
148
294
|
}
|
package/components/popover.json
CHANGED
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
"category": "containers",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/popover/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Popover",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"componentName": "Popover",
|
|
21
|
+
"importPath": "@adobe/spectrum-wc/components/popover",
|
|
22
|
+
"notes": "Spectrum 2 web component custom element: swc-popover."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -16,71 +29,138 @@
|
|
|
16
29
|
},
|
|
17
30
|
{
|
|
18
31
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
32
|
+
"content": "Popovers are containers for transient content like menus, options, or additional actions. They float above the interface and stand out visually using stroke and drop shadow."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "guideline",
|
|
36
|
+
"content": "To keep a popover within certain boundaries, such as a browser window, define a container and a container padding value."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "guideline",
|
|
40
|
+
"content": "The cross offset is the placement offset on the cross axis: the x-axis for top and bottom positions, and the y-axis for left and right positions."
|
|
20
41
|
},
|
|
21
42
|
{
|
|
22
43
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
44
|
+
"content": "The offset is the space between the source and the popover (or tip, if present). Adjust it as needed to align visually with the source’s perceived bounds and maintain a balanced relationship between the two elements."
|
|
24
45
|
},
|
|
25
46
|
{
|
|
26
47
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
48
|
+
"content": "A popover is positioned in relation to its source."
|
|
28
49
|
},
|
|
29
50
|
{
|
|
30
51
|
"type": "guideline",
|
|
31
|
-
"content": "Popovers
|
|
52
|
+
"content": "Popovers usually appear without a tip and rely on a distinct down state in the source to show their origin. When the source lacks that visual cue, add a tip to reinforce the connection between the popover and its source."
|
|
32
53
|
},
|
|
33
54
|
{
|
|
34
55
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
56
|
+
"content": "A popover’s height can be customized appropriately for its context."
|
|
36
57
|
},
|
|
37
58
|
{
|
|
38
59
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
60
|
+
"content": "A popover’s width can be customized appropriately for its context."
|
|
40
61
|
},
|
|
41
62
|
{
|
|
42
63
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
64
|
+
"content": "Popovers stem off of action buttons that act as a source to open up transient content."
|
|
44
65
|
},
|
|
45
66
|
{
|
|
46
67
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
68
|
+
"content": "When displaying a popover, it should animate from its source to reinforce the connection between popover and source. It should fade in and slide with subtle motion from the source."
|
|
48
69
|
},
|
|
49
70
|
{
|
|
50
71
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
72
|
+
"content": "A popover can be dismissed by clicking or tapping anywhere outside it, including the source, or by selecting an option or taking an action inside the popover."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "guideline",
|
|
76
|
+
"content": "Trays can be used as alternatives to popovers on small screens. Use a tray when the amount of content is too large or overwhelming for a popover."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "guideline",
|
|
80
|
+
"content": "When the source that triggers the popover does not have a visually distinct down state, use a popover with a tip to clearly indicate the connection to its source."
|
|
52
81
|
}
|
|
53
82
|
],
|
|
54
83
|
"options": {
|
|
55
|
-
"width": {
|
|
56
|
-
|
|
57
|
-
|
|
84
|
+
"width": {
|
|
85
|
+
"type": "number"
|
|
86
|
+
},
|
|
87
|
+
"height": {
|
|
88
|
+
"type": "number"
|
|
89
|
+
},
|
|
90
|
+
"hideTip": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": false
|
|
93
|
+
},
|
|
58
94
|
"placement": {
|
|
59
95
|
"type": "string",
|
|
60
96
|
"default": "top",
|
|
61
97
|
"values": [
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
98
|
+
{
|
|
99
|
+
"value": "top"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"value": "top left"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"value": "top right"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"value": "top start"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"value": "top end"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"value": "bottom"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"value": "bottom left"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"value": "bottom right"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"value": "bottom start"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"value": "bottom end"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"value": "left"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"value": "left top"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"value": "left bottom"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"value": "start"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"value": "start top"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"value": "start bottom"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"value": "right"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"value": "right top"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"value": "right bottom"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"value": "end"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"value": "end top"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"value": "end bottom"
|
|
163
|
+
}
|
|
84
164
|
]
|
|
85
165
|
},
|
|
86
166
|
"offset": {
|
|
@@ -88,19 +168,28 @@
|
|
|
88
168
|
"default": 8,
|
|
89
169
|
"description": "pixel measurement"
|
|
90
170
|
},
|
|
91
|
-
"crossOffset": {
|
|
171
|
+
"crossOffset": {
|
|
172
|
+
"type": "number",
|
|
173
|
+
"default": 0
|
|
174
|
+
},
|
|
92
175
|
"containerPadding": {
|
|
93
176
|
"type": "number",
|
|
94
177
|
"default": 8,
|
|
95
178
|
"description": "pixel measurement"
|
|
96
179
|
}
|
|
97
180
|
},
|
|
98
|
-
"lifecycle": {
|
|
181
|
+
"lifecycle": {
|
|
182
|
+
"introduced": "1.0.0-draft"
|
|
183
|
+
},
|
|
99
184
|
"accessibility": {
|
|
100
185
|
"intents": ["dismiss"],
|
|
101
186
|
"focusable": false,
|
|
102
187
|
"wcag": [
|
|
103
|
-
{
|
|
188
|
+
{
|
|
189
|
+
"criterion": "4.1.2",
|
|
190
|
+
"level": "A",
|
|
191
|
+
"title": "Name, Role, Value"
|
|
192
|
+
}
|
|
104
193
|
]
|
|
105
194
|
}
|
|
106
195
|
}
|