@adobe/spectrum-design-data 3.3.0 → 3.5.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/llms.txt +27 -0
- package/package.json +3 -2
- package/tokens/layout.tokens.json +88 -0
|
@@ -23,198 +23,87 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "guideline",
|
|
26
|
-
"content": "
|
|
26
|
+
"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."
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"type": "guideline",
|
|
30
|
-
"content": "
|
|
30
|
+
"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."
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"type": "guideline",
|
|
34
|
-
"content": "
|
|
34
|
+
"content": "Mixed value.\n\nWhen a number field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"type": "guideline",
|
|
38
|
-
"content": "
|
|
38
|
+
"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."
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"type": "guideline",
|
|
42
|
-
"content": "
|
|
42
|
+
"content": "Calculations.\n\nNumber fields should always allow users to add, subtract, multiply, and divide, with the field automatically calculating the result."
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"type": "guideline",
|
|
46
|
-
"content": "
|
|
46
|
+
"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."
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"type": "guideline",
|
|
50
|
-
"content": "
|
|
50
|
+
"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."
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"type": "guideline",
|
|
54
|
-
"content": "
|
|
54
|
+
"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\")."
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"type": "guideline",
|
|
58
|
-
"content": "
|
|
58
|
+
"content": "Follow capitalization rules.\n\nLabels for number fields should be in sentence case."
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"type": "guideline",
|
|
62
|
-
"content": "
|
|
62
|
+
"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."
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
"type": "
|
|
66
|
-
"content": "
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
"type": "guideline",
|
|
70
|
-
"content": "The value shows a user’s entered text or a default value, plus the units of measurement, if applicable."
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"type": "guideline",
|
|
74
|
-
"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."
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"type": "guideline",
|
|
78
|
-
"content": "When an error message is displayed, it replaces the help text. If an error exists, the error icon always overrides the validation icon."
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "guideline",
|
|
82
|
-
"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."
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"type": "guideline",
|
|
86
|
-
"content": "Help text is replaced by error messages when validation fails."
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"type": "guideline",
|
|
90
|
-
"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."
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "guideline",
|
|
94
|
-
"content": "When a number field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "guideline",
|
|
98
|
-
"content": "When the help text is too long for the available horizontal space, it wraps to form another line."
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"type": "guideline",
|
|
102
|
-
"content": "Number fields should always allow users to add, subtract, multiply, and divide, with the field automatically calculating the result."
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "guideline",
|
|
106
|
-
"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."
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"type": "guideline",
|
|
110
|
-
"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."
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"type": "guideline",
|
|
114
|
-
"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”)."
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"type": "guideline",
|
|
118
|
-
"content": "Labels for number fields should be in sentence case."
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"type": "guideline",
|
|
122
|
-
"content": "When labeling number fields in a form, only mark the minority type—either required or optional—to reduce visual clutter:"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"type": "guideline",
|
|
126
|
-
"content": "Important: Never use an asterisk to indicate an optional number field."
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"type": "guideline",
|
|
130
|
-
"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."
|
|
65
|
+
"type": "do-dont",
|
|
66
|
+
"content": "Do not use placeholder text in number fields",
|
|
67
|
+
"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."
|
|
131
68
|
},
|
|
132
69
|
{
|
|
133
70
|
"type": "guideline",
|
|
134
|
-
"content": "
|
|
71
|
+
"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."
|
|
135
72
|
},
|
|
136
73
|
{
|
|
137
74
|
"type": "guideline",
|
|
138
|
-
"content": "
|
|
75
|
+
"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."
|
|
139
76
|
},
|
|
140
77
|
{
|
|
141
78
|
"type": "guideline",
|
|
142
|
-
"content": "
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"type": "guideline",
|
|
146
|
-
"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."
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"type": "guideline",
|
|
150
|
-
"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."
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"type": "guideline",
|
|
154
|
-
"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."
|
|
79
|
+
"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."
|
|
155
80
|
}
|
|
156
81
|
],
|
|
157
82
|
"options": {
|
|
158
|
-
"label": {
|
|
159
|
-
"type": "string"
|
|
160
|
-
},
|
|
83
|
+
"label": { "type": "string" },
|
|
161
84
|
"size": {
|
|
162
85
|
"type": "string",
|
|
163
86
|
"default": "m",
|
|
164
87
|
"values": [
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"value": "m"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"value": "l"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"value": "xl"
|
|
176
|
-
}
|
|
88
|
+
{ "value": "s" },
|
|
89
|
+
{ "value": "m" },
|
|
90
|
+
{ "value": "l" },
|
|
91
|
+
{ "value": "xl" }
|
|
177
92
|
]
|
|
178
93
|
},
|
|
179
94
|
"labelPosition": {
|
|
180
95
|
"type": "string",
|
|
181
96
|
"default": "top",
|
|
182
|
-
"values": [
|
|
183
|
-
{
|
|
184
|
-
"value": "top"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"value": "side"
|
|
188
|
-
}
|
|
189
|
-
]
|
|
190
|
-
},
|
|
191
|
-
"hideLabel": {
|
|
192
|
-
"type": "boolean",
|
|
193
|
-
"default": false
|
|
194
|
-
},
|
|
195
|
-
"isDisabled": {
|
|
196
|
-
"type": "boolean",
|
|
197
|
-
"default": false
|
|
198
|
-
},
|
|
199
|
-
"isError": {
|
|
200
|
-
"type": "boolean",
|
|
201
|
-
"default": false
|
|
202
|
-
},
|
|
203
|
-
"isRequired": {
|
|
204
|
-
"type": "boolean",
|
|
205
|
-
"default": false
|
|
97
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
206
98
|
},
|
|
99
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
100
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
101
|
+
"isError": { "type": "boolean", "default": false },
|
|
102
|
+
"isRequired": { "type": "boolean", "default": false },
|
|
207
103
|
"necessityIndicator": {
|
|
208
104
|
"type": "string",
|
|
209
105
|
"default": "icon",
|
|
210
|
-
"values": [
|
|
211
|
-
{
|
|
212
|
-
"value": "text"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"value": "icon"
|
|
216
|
-
}
|
|
217
|
-
]
|
|
106
|
+
"values": [{ "value": "text" }, { "value": "icon" }]
|
|
218
107
|
},
|
|
219
108
|
"hideStepper": {
|
|
220
109
|
"type": "boolean",
|
|
@@ -229,43 +118,20 @@
|
|
|
229
118
|
}
|
|
230
119
|
],
|
|
231
120
|
"states": [
|
|
232
|
-
{
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"name": "focus-+-hover",
|
|
238
|
-
"trigger": "prop"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"name": "focus-+-not-hover",
|
|
242
|
-
"trigger": "prop"
|
|
243
|
-
}
|
|
121
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
122
|
+
{ "name": "focus-+-hover", "trigger": "prop" },
|
|
123
|
+
{ "name": "focus-+-not-hover", "trigger": "prop" }
|
|
244
124
|
],
|
|
245
|
-
"lifecycle": {
|
|
246
|
-
"introduced": "1.0.0-draft"
|
|
247
|
-
},
|
|
125
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
248
126
|
"accessibility": {
|
|
249
127
|
"role": "spinbutton",
|
|
250
128
|
"intents": ["choose", "input"],
|
|
251
129
|
"focusable": true,
|
|
252
130
|
"keyboardIntents": ["increment", "decrement"],
|
|
253
131
|
"wcag": [
|
|
254
|
-
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
"title": "Info and Relationships"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"criterion": "2.1.1",
|
|
261
|
-
"level": "A",
|
|
262
|
-
"title": "Keyboard"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"criterion": "4.1.2",
|
|
266
|
-
"level": "A",
|
|
267
|
-
"title": "Name, Role, Value"
|
|
268
|
-
}
|
|
132
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
133
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
134
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
269
135
|
]
|
|
270
136
|
}
|
|
271
137
|
}
|