@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.
Files changed (122) hide show
  1. package/components/accordion.json +32 -102
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +52 -92
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +45 -55
  7. package/components/avatar-group.json +20 -50
  8. package/components/avatar.json +44 -123
  9. package/components/badge.json +66 -160
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +32 -63
  12. package/components/button.json +74 -105
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +22 -84
  16. package/components/checkbox.json +33 -96
  17. package/components/close-button.json +31 -73
  18. package/components/coach-indicator.json +14 -44
  19. package/components/coach-mark.json +8 -26
  20. package/components/color-area.json +20 -93
  21. package/components/color-handle.json +25 -38
  22. package/components/color-loupe.json +18 -18
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +56 -188
  26. package/components/contextual-help.json +87 -126
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +25 -38
  29. package/components/drop-zone.json +25 -37
  30. package/components/field-label.json +22 -59
  31. package/components/help-text.json +16 -53
  32. package/components/illustrated-message.json +21 -72
  33. package/components/in-line-alert.json +13 -53
  34. package/components/link.json +31 -63
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +51 -180
  37. package/components/meter.json +35 -76
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +48 -187
  40. package/components/popover.json +47 -123
  41. package/components/progress-bar.json +33 -105
  42. package/components/progress-circle.json +25 -55
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +34 -131
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +40 -125
  47. package/components/segmented-control.json +27 -69
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +45 -154
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +51 -133
  53. package/components/steplist.json +5 -24
  54. package/components/swatch-group.json +19 -55
  55. package/components/swatch.json +24 -79
  56. package/components/switch.json +42 -79
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +35 -52
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +22 -55
  61. package/components/tag.json +27 -77
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +55 -204
  64. package/components/text-field.json +48 -169
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +30 -47
  67. package/components/tooltip.json +37 -84
  68. package/components/tree-view.json +51 -146
  69. package/fields/structure.json +1 -2
  70. package/guidelines/ai-resource-guide.json +42 -0
  71. package/guidelines/app-frame-overview.json +45 -44
  72. package/guidelines/applying-the-type-system.json +71 -0
  73. package/guidelines/attention-hierarchy.json +13 -22
  74. package/guidelines/background-layers.json +84 -10
  75. package/guidelines/bi-directionality.json +57 -0
  76. package/guidelines/border-width.json +70 -0
  77. package/guidelines/brand.json +24 -12
  78. package/guidelines/cognitive.json +229 -0
  79. package/guidelines/colors.json +55 -17
  80. package/guidelines/component-spacing.json +65 -0
  81. package/guidelines/contact-us.json +27 -0
  82. package/guidelines/containers.json +21 -28
  83. package/guidelines/content-area-browsing-context.json +73 -0
  84. package/guidelines/creating-bluelines-browsing-context.json +71 -0
  85. package/guidelines/design-tokens.json +186 -0
  86. package/guidelines/developer-overview.json +33 -9
  87. package/guidelines/drop-shadow.json +76 -0
  88. package/guidelines/faqs.json +100 -9
  89. package/guidelines/fonts.json +33 -14
  90. package/guidelines/grammar-and-mechanics.json +276 -0
  91. package/guidelines/grays.json +17 -44
  92. package/guidelines/header-browsing-context.json +40 -0
  93. package/guidelines/icon-fundamentals.json +7 -18
  94. package/guidelines/illustration.json +120 -0
  95. package/guidelines/in-product-word-list.json +25 -0
  96. package/guidelines/inclusive-design.json +101 -0
  97. package/guidelines/inclusive-ux-writing.json +34 -0
  98. package/guidelines/internationalization.json +103 -0
  99. package/guidelines/layout-spacing.json +39 -0
  100. package/guidelines/manifest.json +280 -16
  101. package/guidelines/motion.json +18 -13
  102. package/guidelines/object-styles-overview.json +17 -0
  103. package/guidelines/principles.json +7 -8
  104. package/guidelines/resources.json +29 -15
  105. package/guidelines/rounding.json +85 -0
  106. package/guidelines/side-navigation-browsing-context.json +74 -0
  107. package/guidelines/spacing-overview.json +78 -0
  108. package/guidelines/states.json +16 -11
  109. package/guidelines/support.json +125 -0
  110. package/guidelines/typography-overview.json +39 -0
  111. package/guidelines/typography-system.json +212 -0
  112. package/guidelines/using-icons.json +32 -47
  113. package/guidelines/voice-and-tone.json +51 -0
  114. package/guidelines/whats-new.json +21 -0
  115. package/guidelines/writing-about-people.json +99 -0
  116. package/guidelines/writing-for-errors.json +140 -0
  117. package/guidelines/writing-for-onboarding.json +123 -0
  118. package/guidelines/writing-for-readability.json +66 -0
  119. package/guidelines/writing-with-visuals.json +78 -0
  120. package/llms.txt +27 -0
  121. package/package.json +3 -2
  122. package/tokens/layout.tokens.json +88 -0
@@ -23,198 +23,87 @@
23
23
  },
24
24
  {
25
25
  "type": "guideline",
26
- "content": "Number fields accept numeric inputs and allow values to be incremented or decremented. They are commonly used when a defined range or step value is required."
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": "Number fields can have optional stepper buttons to the side of the field. Regardless of if a number field has these buttons or not, is should always accommodate arrow key shortcuts to increase or decrease the number."
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": "If true, hides in-field increment and decrement buttons (stepper)."
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": "Number fields can be marked as optional or required, depending on the situation. For required number fields, there are two styling options: a “(required)” label or an asterisk. If you use an asterisk, be sure to include hint text to explain what the asterisk means. Optional number fields are either denoted with text added to the end of the label — “(optional)” — or have no indication at all."
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": "The asterisk used in this component is an icon that has specific spacing from the label text — not part of the label text itself."
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": "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. For this component, an incorrect value should typically revert back to either the previously entered number or to the default value, rather than showing an error."
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": "A number field in a disabled state shows that an input exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that the field may become available later."
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": "Number fields should always have an accessible name, typically provided by a visible text label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the visible label may be hidden or omitted. When no visible label is present, the input must still expose an accessible name (for example, in HTML via “aria-label” or “aria-labelledby,” and on other platforms via the platform’s accessible-name mechanism)."
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": "Number fields can show or hide the visible label."
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": "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."
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": "guideline",
66
- "content": "Number fields 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 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": "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."
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": "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."
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": "The 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."
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
- "value": "s"
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
- "name": "hover",
234
- "trigger": "interaction"
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
- "criterion": "1.3.1",
256
- "level": "A",
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
  }