@adobe/spectrum-design-data 3.2.3 → 3.3.0-beta.1
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 +15 -54
- package/components/action-bar.json +9 -23
- package/components/action-button.json +39 -79
- package/components/action-group.json +18 -129
- package/components/alert-banner.json +8 -27
- package/components/alert-dialog.json +34 -48
- package/components/avatar-group.json +9 -28
- package/components/avatar.json +29 -92
- package/components/badge.json +56 -150
- package/components/breadcrumbs.json +26 -100
- package/components/button-group.json +19 -50
- package/components/button.json +61 -92
- package/components/calendar.json +8 -67
- package/components/cards.json +31 -46
- package/components/checkbox-group.json +16 -78
- package/components/checkbox.json +27 -90
- package/components/close-button.json +20 -62
- 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 +2 -6
- package/components/color-slider.json +26 -122
- package/components/color-wheel.json +17 -84
- package/components/combo-box.json +50 -182
- package/components/contextual-help.json +80 -119
- package/components/date-picker.json +24 -120
- package/components/divider.json +12 -25
- package/components/drop-zone.json +18 -30
- package/components/field-label.json +21 -62
- 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 +24 -56
- package/components/list-view.json +15 -73
- package/components/menu.json +45 -174
- package/components/meter.json +24 -65
- package/components/number-field.json +34 -168
- package/components/picker.json +42 -181
- package/components/popover.json +37 -113
- package/components/progress-bar.json +23 -95
- package/components/progress-circle.json +12 -42
- package/components/radio-button.json +14 -67
- package/components/radio-group.json +28 -125
- package/components/rating.json +9 -38
- package/components/search-field.json +34 -119
- package/components/segmented-control.json +21 -63
- package/components/select-box.json +29 -96
- package/components/side-navigation.json +28 -69
- package/components/slider.json +39 -148
- package/components/standard-dialog.json +16 -88
- package/components/status-light.json +41 -123
- package/components/steplist.json +5 -24
- package/components/swatch-group.json +19 -55
- package/components/swatch.json +24 -79
- package/components/switch.json +31 -72
- package/components/table.json +26 -73
- package/components/tabs.json +22 -39
- package/components/tag-field.json +14 -60
- package/components/tag-group.json +16 -49
- package/components/tag.json +21 -71
- package/components/takeover-dialog.json +10 -61
- package/components/text-area.json +49 -198
- package/components/text-field.json +42 -163
- package/components/thumbnail.json +22 -63
- package/components/toast.json +29 -50
- package/components/tooltip.json +27 -74
- package/components/tree-view.json +45 -140
- package/guidelines/ai-resource-guide.json +50 -0
- package/guidelines/app-frame-overview.json +44 -50
- package/guidelines/applying-the-type-system.json +63 -0
- package/guidelines/attention-hierarchy.json +12 -21
- package/guidelines/background-layers.json +44 -10
- package/guidelines/bi-directionality.json +57 -0
- package/guidelines/border-width.json +42 -0
- package/guidelines/brand.json +30 -10
- package/guidelines/cognitive.json +197 -0
- package/guidelines/colors.json +35 -17
- package/guidelines/component-spacing.json +49 -0
- package/guidelines/contact-us.json +67 -0
- package/guidelines/content-area-browsing-context.json +65 -0
- package/guidelines/creating-bluelines-browsing-context.json +91 -0
- package/guidelines/design-tokens.json +122 -0
- package/guidelines/developer-overview.json +25 -9
- package/guidelines/drop-shadow.json +56 -0
- package/guidelines/faqs.json +96 -9
- package/guidelines/fonts.json +29 -14
- package/guidelines/grammar-and-mechanics.json +252 -0
- package/guidelines/grays.json +17 -44
- package/guidelines/header-browsing-context.json +37 -0
- package/guidelines/icon-fundamentals.json +7 -18
- package/guidelines/illustration.json +109 -0
- package/guidelines/in-product-word-list.json +29 -0
- package/guidelines/inclusive-design.json +93 -0
- package/guidelines/inclusive-ux-writing.json +30 -0
- package/guidelines/internationalization.json +87 -0
- package/guidelines/introduction.json +2 -2
- package/guidelines/layout-and-structure-containers.json +47 -0
- package/guidelines/layout-spacing.json +39 -0
- package/guidelines/manifest.json +252 -60
- package/guidelines/motion.json +17 -16
- package/guidelines/object-styles-overview.json +17 -0
- package/guidelines/principles.json +2 -2
- package/guidelines/resources.json +21 -15
- package/guidelines/rounding.json +61 -0
- package/guidelines/side-navigation-browsing-context.json +71 -0
- package/guidelines/spacing-overview.json +45 -0
- package/guidelines/states.json +15 -10
- package/guidelines/typography-overview.json +39 -0
- package/guidelines/typography-system.json +168 -0
- package/guidelines/using-icons.json +33 -44
- package/guidelines/visual-language-containers.json +36 -0
- package/guidelines/voice-and-tone.json +47 -0
- package/guidelines/writing-about-people.json +103 -0
- package/guidelines/writing-for-errors.json +120 -0
- package/guidelines/writing-for-onboarding.json +119 -0
- package/guidelines/writing-for-readability.json +54 -0
- package/guidelines/writing-with-visuals.json +70 -0
- package/package.json +1 -1
- package/guidelines/app-frame-content-area.json +0 -81
- package/guidelines/app-frame-creating-bluelines.json +0 -58
- package/guidelines/app-frame-header.json +0 -72
- package/guidelines/app-frame-side-navigation.json +0 -138
- package/guidelines/containers.json +0 -62
- package/guidelines/illustrations.json +0 -111
- package/guidelines/object-styles.json +0 -102
- package/guidelines/spacing.json +0 -25
- package/guidelines/typography-fundamentals.json +0 -142
|
@@ -16,198 +16,87 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Minimum width.\n\nThe minimum width for a number field is number-field-minimum-width-multiplier (without stepper) and number-field-with-stepper-minimum-width-[small/medium/large/extra-large] (with stepper). This minimum width guarantees that small number fields are readable and easy to interact with on touch devices."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Text overflow.\n\nWhen the field label is too long for the available horizontal space, it wraps to form another line. The text inside the field truncates."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Mixed value.\n\nWhen a number field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Help text and error message overflow.\n\nWhen the help text is too long for the available horizontal space, it wraps to form another line."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Calculations.\n\nNumber fields should always allow users to add, subtract, multiply, and divide, with the field automatically calculating the result."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "Units.\n\nNumber fields can include units of measurement in the value. When focused or entering text, the units disappear. When scrolling, the units stay. If a user enters a unit that does not match the unit that the field requires, the field should automatically calculate a conversion and display the input value in the correct unit."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
43
|
+
"content": "Choose default values for number fields.\n\nChoose a default value for a field to revert back to if an invalid entry is input. If a user enters a valid number and then enters an invalid number, revert to the most recent valid entry."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
47
|
+
"content": "Review label-less designs.\n\nMost number fields should have a label. A field without a label is ambiguous and not accessible. 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
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
51
|
+
"content": "Follow capitalization rules.\n\nLabels for number fields should be in sentence case."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
55
|
+
"content": "Marking Required vs. Optional number fields in Forms.\n\nWhen labeling number fields in a form, only mark the minority type—either required or optional—to reduce visual clutter: If most number fields are optional, mark only the required ones (e.g., add an asterisk or \"(required)\"). If most number fields are required, mark only the optional ones (e.g., append \"(optional)\" to their labels). Important: Never use an asterisk to indicate an optional number field."
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
"type": "
|
|
59
|
-
"content": "
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
63
|
-
"content": "The value shows a user’s entered text or a default value, plus the units of measurement, if applicable."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "guideline",
|
|
67
|
-
"content": "A number field 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. The error message communicates an error for when the field requirements aren’t met, prompting a user to adjust what they had originally input. If an error exists, the error icon always overrides the validation icon."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
71
|
-
"content": "When an error message is displayed, it replaces the help text. If an error exists, the error icon always overrides the validation icon."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
75
|
-
"content": "A number field 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."
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "guideline",
|
|
79
|
-
"content": "Help text is replaced by error messages when validation fails."
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "guideline",
|
|
83
|
-
"content": "When the field label is too long for the available horizontal space, it wraps to form another line. The text inside the field truncates."
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "guideline",
|
|
87
|
-
"content": "When a number field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "guideline",
|
|
91
|
-
"content": "When the help text is too long for the available horizontal space, it wraps to form another line."
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"type": "guideline",
|
|
95
|
-
"content": "Number fields should always allow users to add, subtract, multiply, and divide, with the field automatically calculating the result."
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"type": "guideline",
|
|
99
|
-
"content": "Number fields can include units of measurement in the value. When focused or entering text, the units disappear. When scrolling, the units stay. If a user enters a unit that does not match the unit that the field requires, the field should automatically calculate a conversion and display the input value in the correct unit."
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"type": "guideline",
|
|
103
|
-
"content": "Choose a default value for a field to revert back to if an invalid entry is input. If a user enters a valid number and then enters an invalid number, revert to the most recent valid entry."
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"type": "guideline",
|
|
107
|
-
"content": "Most number fields should have a label. A field without a label is ambiguous and not accessible. 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”)."
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"type": "guideline",
|
|
111
|
-
"content": "Labels for number fields should be in sentence case."
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"type": "guideline",
|
|
115
|
-
"content": "When labeling number fields in a form, only mark the minority type—either required or optional—to reduce visual clutter:"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"type": "guideline",
|
|
119
|
-
"content": "Important: Never use an asterisk to indicate an optional number field."
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"type": "guideline",
|
|
123
|
-
"content": "Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible, and should be avoided. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text."
|
|
58
|
+
"type": "do-dont",
|
|
59
|
+
"content": "Do not use placeholder text in number fields",
|
|
60
|
+
"dont": "Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible, and should be avoided. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text. Instead of placeholder text, choose a default value to include in the field in default state. Use the help text description to convey requirements or to show any formatting examples that would help user comprehension."
|
|
124
61
|
},
|
|
125
62
|
{
|
|
126
63
|
"type": "guideline",
|
|
127
|
-
"content": "
|
|
64
|
+
"content": "Use help text to show hints, formatting, and requirements.\n\nThe description in the help text is flexible and encompasses a range of guidance. Sometimes this guidance is about what to input, and sometimes it's about how to input. This includes information such as: An overall description of the number field Hints for what kind of information needs to be input Specific formatting examples or requirements The help text's message should not simply restate the same information in the label in order to prompt someone to interact with it. 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."
|
|
128
65
|
},
|
|
129
66
|
{
|
|
130
67
|
"type": "guideline",
|
|
131
|
-
"content": "
|
|
68
|
+
"content": "Switch help text with error text.\n\nThe help text area also displays an error message. When a number field 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 field. 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 successfully complete the input. Error text tells a user how to fix the error by re-stating the input 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 formatting requirements."
|
|
132
69
|
},
|
|
133
70
|
{
|
|
134
71
|
"type": "guideline",
|
|
135
|
-
"content": "
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "guideline",
|
|
139
|
-
"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 successfully complete the input. Error text tells a user how to fix the error by re-stating the input 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 formatting requirements."
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"type": "guideline",
|
|
143
|
-
"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."
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"type": "guideline",
|
|
147
|
-
"content": "Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. Never end with an exclamation point. For number fields, 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."
|
|
72
|
+
"content": "Write error text that shows a solution.\n\nWrite 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. Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. Never end with an exclamation point. For number fields, 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."
|
|
148
73
|
}
|
|
149
74
|
],
|
|
150
75
|
"options": {
|
|
151
|
-
"label": {
|
|
152
|
-
"type": "string"
|
|
153
|
-
},
|
|
76
|
+
"label": { "type": "string" },
|
|
154
77
|
"size": {
|
|
155
78
|
"type": "string",
|
|
156
79
|
"default": "m",
|
|
157
80
|
"values": [
|
|
158
|
-
{
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"value": "m"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"value": "l"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"value": "xl"
|
|
169
|
-
}
|
|
81
|
+
{ "value": "s" },
|
|
82
|
+
{ "value": "m" },
|
|
83
|
+
{ "value": "l" },
|
|
84
|
+
{ "value": "xl" }
|
|
170
85
|
]
|
|
171
86
|
},
|
|
172
87
|
"labelPosition": {
|
|
173
88
|
"type": "string",
|
|
174
89
|
"default": "top",
|
|
175
|
-
"values": [
|
|
176
|
-
{
|
|
177
|
-
"value": "top"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"value": "side"
|
|
181
|
-
}
|
|
182
|
-
]
|
|
183
|
-
},
|
|
184
|
-
"hideLabel": {
|
|
185
|
-
"type": "boolean",
|
|
186
|
-
"default": false
|
|
187
|
-
},
|
|
188
|
-
"isDisabled": {
|
|
189
|
-
"type": "boolean",
|
|
190
|
-
"default": false
|
|
191
|
-
},
|
|
192
|
-
"isError": {
|
|
193
|
-
"type": "boolean",
|
|
194
|
-
"default": false
|
|
195
|
-
},
|
|
196
|
-
"isRequired": {
|
|
197
|
-
"type": "boolean",
|
|
198
|
-
"default": false
|
|
90
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
199
91
|
},
|
|
92
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
93
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
94
|
+
"isError": { "type": "boolean", "default": false },
|
|
95
|
+
"isRequired": { "type": "boolean", "default": false },
|
|
200
96
|
"necessityIndicator": {
|
|
201
97
|
"type": "string",
|
|
202
98
|
"default": "icon",
|
|
203
|
-
"values": [
|
|
204
|
-
{
|
|
205
|
-
"value": "text"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"value": "icon"
|
|
209
|
-
}
|
|
210
|
-
]
|
|
99
|
+
"values": [{ "value": "text" }, { "value": "icon" }]
|
|
211
100
|
},
|
|
212
101
|
"hideStepper": {
|
|
213
102
|
"type": "boolean",
|
|
@@ -222,43 +111,20 @@
|
|
|
222
111
|
}
|
|
223
112
|
],
|
|
224
113
|
"states": [
|
|
225
|
-
{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "focus-+-hover",
|
|
231
|
-
"trigger": "prop"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"name": "focus-+-not-hover",
|
|
235
|
-
"trigger": "prop"
|
|
236
|
-
}
|
|
114
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
115
|
+
{ "name": "focus-+-hover", "trigger": "prop" },
|
|
116
|
+
{ "name": "focus-+-not-hover", "trigger": "prop" }
|
|
237
117
|
],
|
|
238
|
-
"lifecycle": {
|
|
239
|
-
"introduced": "1.0.0-draft"
|
|
240
|
-
},
|
|
118
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
241
119
|
"accessibility": {
|
|
242
120
|
"role": "spinbutton",
|
|
243
121
|
"intents": ["choose", "input"],
|
|
244
122
|
"focusable": true,
|
|
245
123
|
"keyboardIntents": ["increment", "decrement"],
|
|
246
124
|
"wcag": [
|
|
247
|
-
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
"title": "Info and Relationships"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"criterion": "2.1.1",
|
|
254
|
-
"level": "A",
|
|
255
|
-
"title": "Keyboard"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"criterion": "4.1.2",
|
|
259
|
-
"level": "A",
|
|
260
|
-
"title": "Name, Role, Value"
|
|
261
|
-
}
|
|
125
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
126
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
127
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
262
128
|
]
|
|
263
129
|
}
|
|
264
130
|
}
|