@adobe/spectrum-design-data 0.4.0 → 0.7.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 +108 -194
- package/components/action-bar.json +64 -97
- package/components/action-button.json +95 -230
- package/components/action-group.json +88 -86
- package/components/alert-banner.json +104 -76
- package/components/alert-dialog.json +78 -126
- package/components/avatar-group.json +61 -119
- package/components/avatar.json +98 -212
- package/components/badge.json +138 -256
- package/components/breadcrumbs.json +95 -89
- package/components/button-group.json +57 -48
- package/components/button.json +151 -368
- package/components/calendar.json +97 -34
- package/components/cards.json +109 -250
- package/components/checkbox-group.json +50 -58
- package/components/checkbox.json +121 -186
- package/components/close-button.json +61 -124
- package/components/coach-indicator.json +63 -72
- package/components/coach-mark.json +89 -93
- package/components/color-area.json +68 -94
- package/components/color-handle.json +39 -79
- package/components/color-loupe.json +35 -52
- package/components/color-slider.json +95 -116
- package/components/color-wheel.json +67 -73
- package/components/combo-box.json +243 -331
- package/components/contextual-help.json +86 -175
- package/components/date-picker.json +139 -179
- package/components/divider.json +30 -69
- package/components/drop-zone.json +51 -92
- package/components/field-label.json +75 -117
- package/components/help-text.json +81 -105
- package/components/illustrated-message.json +106 -73
- package/components/in-line-alert.json +50 -83
- package/components/link.json +63 -85
- package/components/list-view.json +107 -146
- package/components/menu.json +180 -274
- package/components/meter.json +72 -118
- package/components/number-field.json +213 -305
- package/components/picker.json +208 -320
- package/components/popover.json +94 -129
- package/components/progress-bar.json +94 -131
- package/components/progress-circle.json +45 -72
- package/components/radio-button.json +87 -156
- package/components/radio-group.json +107 -74
- package/components/rating.json +66 -99
- package/components/search-field.json +132 -202
- package/components/segmented-control.json +94 -109
- package/components/select-box.json +119 -179
- package/components/side-navigation.json +108 -118
- package/components/slider.json +143 -228
- package/components/standard-dialog.json +96 -114
- package/components/standard-panel.json +105 -53
- package/components/status-light.json +104 -240
- package/components/steplist.json +77 -161
- package/components/swatch-group.json +42 -58
- package/components/swatch.json +75 -162
- package/components/switch.json +101 -189
- package/components/table.json +97 -102
- package/components/tabs.json +77 -104
- package/components/tag-field.json +86 -150
- package/components/tag-group.json +50 -44
- package/components/tag.json +81 -198
- package/components/takeover-dialog.json +59 -57
- package/components/text-area.json +200 -323
- package/components/text-field.json +183 -304
- package/components/thumbnail.json +63 -105
- package/components/toast.json +97 -83
- package/components/tooltip.json +104 -96
- package/components/tree-view.json +169 -181
- 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 +167 -0
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +42 -0
- package/guidelines/background-layers.json +38 -0
- package/guidelines/brand.json +50 -0
- package/guidelines/colors.json +62 -0
- package/guidelines/containers.json +62 -0
- package/guidelines/developer-overview.json +35 -0
- package/guidelines/faqs.json +35 -0
- package/guidelines/fonts.json +58 -0
- package/guidelines/grays.json +66 -0
- package/guidelines/icon-fundamentals.json +45 -0
- package/guidelines/illustrations.json +111 -0
- package/guidelines/introduction.json +31 -0
- package/guidelines/manifest.json +204 -0
- package/guidelines/motion.json +41 -0
- package/guidelines/object-styles.json +102 -0
- package/guidelines/principles.json +30 -0
- package/guidelines/resources.json +59 -0
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +34 -0
- package/guidelines/typography-fundamentals.json +142 -0
- package/guidelines/using-icons.json +107 -0
- package/package.json +4 -2
|
@@ -9,6 +9,36 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/drop-zone/"
|
|
11
11
|
},
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "A drop zone allows users to drag and drop files or other content into a designated area."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Drop zones accept dragged and dropped objects. They support upload and file management workflows, and are commonly used to move or add content within an interface."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "A button is an optional element to prompt the user to take action."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Drop zones come in three different sizes: small, medium, and large. The medium size is the default and most frequently used option."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Indicate to users the accepted file types to let users know what they can upload before interacting. This can be done through helper text or placeholder content."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "When a file is dragged over or dropped into the zone, provide the user with visual feedback such as highlighting the border or changing the background, to confirm the interaction is recognized."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Visual styling that indicates a user can replace file types within a dropzone should clearly communicate interactivity and the potential for change without disrupting the overall layout. This is typically achieved through subtle but intuitive cues such as displaying a button over the drop zone area informing the user that they may replace their content type."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
12
42
|
"options": {
|
|
13
43
|
"accept": {
|
|
14
44
|
"type": "array",
|
|
@@ -20,17 +50,7 @@
|
|
|
20
50
|
"size": {
|
|
21
51
|
"type": "string",
|
|
22
52
|
"default": "m",
|
|
23
|
-
"values": [
|
|
24
|
-
{
|
|
25
|
-
"value": "s"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"value": "m"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"value": "l"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
53
|
+
"values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
|
|
34
54
|
},
|
|
35
55
|
"actionLabel": {
|
|
36
56
|
"type": "string",
|
|
@@ -49,18 +69,10 @@
|
|
|
49
69
|
"description": "Callback function called when a file is dragged out of the drop zone."
|
|
50
70
|
}
|
|
51
71
|
},
|
|
52
|
-
"lifecycle": {
|
|
53
|
-
"introduced": "1.0.0-draft"
|
|
54
|
-
},
|
|
72
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
55
73
|
"tokenBindings": [
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
"context": "Component width"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"token": "spacing-400",
|
|
62
|
-
"context": "Padding"
|
|
63
|
-
},
|
|
74
|
+
{ "token": "drop-zone-width", "context": "Component width" },
|
|
75
|
+
{ "token": "spacing-400", "context": "Padding" },
|
|
64
76
|
{
|
|
65
77
|
"token": "drop-zone-content-maximum-width",
|
|
66
78
|
"context": "Content width (maximum)"
|
|
@@ -85,30 +97,15 @@
|
|
|
85
97
|
"token": "spacing-200",
|
|
86
98
|
"context": "Spacing (illustration to title area) "
|
|
87
99
|
},
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"token": "spacing-300",
|
|
94
|
-
"context": "Spacing (body area to action) "
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"token": "component-height-300",
|
|
98
|
-
"context": "Text area (filled, hover)"
|
|
99
|
-
},
|
|
100
|
+
{ "token": "spacing-75", "context": "Spacing (title area to body area) " },
|
|
101
|
+
{ "token": "spacing-300", "context": "Spacing (body area to action) " },
|
|
102
|
+
{ "token": "component-height-300", "context": "Text area (filled, hover)" },
|
|
100
103
|
{
|
|
101
104
|
"token": "component-edge-to-text-300",
|
|
102
105
|
"context": "Text area (filled, hover)"
|
|
103
106
|
},
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
"context": "Text area (filled, hover)"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"token": "text-300",
|
|
110
|
-
"context": "Text area (filled, hover)"
|
|
111
|
-
},
|
|
107
|
+
{ "token": "component-top", "context": "Text area (filled, hover)" },
|
|
108
|
+
{ "token": "text-300", "context": "Text area (filled, hover)" },
|
|
112
109
|
{
|
|
113
110
|
"token": "component-bottom-to-text-300",
|
|
114
111
|
"context": "Text area (filled, hover)"
|
|
@@ -133,10 +130,7 @@
|
|
|
133
130
|
"token": "drop-zone-cjk-title-font-size",
|
|
134
131
|
"context": "Title area and body area"
|
|
135
132
|
},
|
|
136
|
-
{
|
|
137
|
-
"token": "title-line-height",
|
|
138
|
-
"context": "Title area and body area"
|
|
139
|
-
},
|
|
133
|
+
{ "token": "title-line-height", "context": "Title area and body area" },
|
|
140
134
|
{
|
|
141
135
|
"token": "body-sans-serif-font-family",
|
|
142
136
|
"context": "Title area and body area"
|
|
@@ -153,50 +147,23 @@
|
|
|
153
147
|
"token": "drop-zone-body-font-size",
|
|
154
148
|
"context": "Title area and body area"
|
|
155
149
|
},
|
|
156
|
-
{
|
|
157
|
-
"token": "body-line-height",
|
|
158
|
-
"context": "Title area and body area"
|
|
159
|
-
},
|
|
150
|
+
{ "token": "body-line-height", "context": "Title area and body area" },
|
|
160
151
|
{
|
|
161
152
|
"token": "sans-serif-font-family",
|
|
162
153
|
"context": "Title area and body area"
|
|
163
154
|
},
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"token": "default-font-size",
|
|
170
|
-
"context": "Title area and body area"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"token": "font-size-300",
|
|
174
|
-
"context": "Title area and body area"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"token": "line-height-100",
|
|
178
|
-
"context": "Title area and body area"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"token": "grey-300",
|
|
182
|
-
"context": "Border color"
|
|
183
|
-
},
|
|
155
|
+
{ "token": "bold-font-weight", "context": "Title area and body area" },
|
|
156
|
+
{ "token": "default-font-size", "context": "Title area and body area" },
|
|
157
|
+
{ "token": "font-size-300", "context": "Title area and body area" },
|
|
158
|
+
{ "token": "line-height-100", "context": "Title area and body area" },
|
|
159
|
+
{ "token": "grey-300", "context": "Border color" },
|
|
184
160
|
{
|
|
185
161
|
"token": "neutral-content-color-default",
|
|
186
162
|
"context": "Illustration color"
|
|
187
163
|
},
|
|
188
|
-
{
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"token": "heading-color",
|
|
194
|
-
"context": "Title and body color"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"token": "body-color",
|
|
198
|
-
"context": "Title and body color"
|
|
199
|
-
},
|
|
164
|
+
{ "token": "accent-content-color", "context": "Illustration color" },
|
|
165
|
+
{ "token": "heading-color", "context": "Title and body color" },
|
|
166
|
+
{ "token": "body-color", "context": "Title and body color" },
|
|
200
167
|
{
|
|
201
168
|
"token": "accent-visual-color",
|
|
202
169
|
"context": "Border and background color (empty, hover)"
|
|
@@ -223,16 +190,8 @@
|
|
|
223
190
|
"focusable": true,
|
|
224
191
|
"keyboardIntents": ["activate"],
|
|
225
192
|
"wcag": [
|
|
226
|
-
{
|
|
227
|
-
|
|
228
|
-
"level": "A",
|
|
229
|
-
"title": "Keyboard"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"criterion": "4.1.2",
|
|
233
|
-
"level": "A",
|
|
234
|
-
"title": "Name, Role, Value"
|
|
235
|
-
}
|
|
193
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
194
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
236
195
|
]
|
|
237
196
|
}
|
|
238
197
|
}
|
|
@@ -9,81 +9,83 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/field-label/"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"type": "
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Field labels give context to the information that a user needs to input. They're commonly used in forms."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Field labels provide context for associated input fields. They describe the expected content or data type."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "A field label 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 an input field may become available later."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Inputs can be marked as required or optional, depending on the situation, using a necessity indicator. There are two styles for the necessity indicator: icon or text."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "By default, the necessity indicator is shown with an asterisk icon. Required inputs are marked with this at the end of the label. If you use this icon, be sure to include hint text to explain what it means. The asterisk used in this component is an icon that has specific spacing from the label text — not part of the label text itself. Optional inputs do not have an icon."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Alternatively, the necessity indicator can be shown with text. This appends text that reads either “(required)” or “(optional)” at the end of the label."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Field labels come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option with medium-sized inputs. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page. Both small and medium field labels have the same font size, but different paddings when used as side labels."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "A label can be placed either on top or on the side of an input. This option affects the bounding box of the component to ensure proper alignment. 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."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "When the field label is too long for the available horizontal space, it wraps to form another line."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "In a single form, mark only the required fields or only the optional fields, depending on whichever is less frequent in the entire form."
|
|
15
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "If most of the input fields are optional, only the required fields should be given an asterisk icon or have labels appended with “(required).” If most of the input fields are required, only the optional fields should be appended with “(optional).” An asterisk icon should never be used to note that a field is optional."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"options": {
|
|
59
|
+
"label": { "type": "string" },
|
|
16
60
|
"labelPosition": {
|
|
17
61
|
"type": "string",
|
|
18
62
|
"default": "top",
|
|
19
|
-
"values": [
|
|
20
|
-
{
|
|
21
|
-
"value": "top"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"value": "side"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
63
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
27
64
|
},
|
|
28
65
|
"size": {
|
|
29
66
|
"type": "string",
|
|
30
67
|
"default": "m",
|
|
31
68
|
"values": [
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"value": "m"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"value": "l"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"value": "xl"
|
|
43
|
-
}
|
|
69
|
+
{ "value": "s" },
|
|
70
|
+
{ "value": "m" },
|
|
71
|
+
{ "value": "l" },
|
|
72
|
+
{ "value": "xl" }
|
|
44
73
|
]
|
|
45
74
|
},
|
|
46
75
|
"necessityIndicator": {
|
|
47
76
|
"type": "string",
|
|
48
77
|
"default": "icon",
|
|
49
|
-
"values": [
|
|
50
|
-
{
|
|
51
|
-
"value": "text"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"value": "icon"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
78
|
+
"values": [{ "value": "text" }, { "value": "icon" }]
|
|
57
79
|
},
|
|
58
|
-
"isRequired": {
|
|
59
|
-
|
|
60
|
-
"default": false
|
|
61
|
-
},
|
|
62
|
-
"isDisabled": {
|
|
63
|
-
"type": "boolean",
|
|
64
|
-
"default": false
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"lifecycle": {
|
|
68
|
-
"introduced": "1.0.0-draft"
|
|
80
|
+
"isRequired": { "type": "boolean", "default": false },
|
|
81
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
69
82
|
},
|
|
83
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
70
84
|
"tokenBindings": [
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"token": "component-height-100",
|
|
77
|
-
"context": "Minimum height"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"token": "component-height-200",
|
|
81
|
-
"context": "Minimum height"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"token": "component-height-300",
|
|
85
|
-
"context": "Minimum height"
|
|
86
|
-
},
|
|
85
|
+
{ "token": "component-height-75", "context": "Minimum height" },
|
|
86
|
+
{ "token": "component-height-100", "context": "Minimum height" },
|
|
87
|
+
{ "token": "component-height-200", "context": "Minimum height" },
|
|
88
|
+
{ "token": "component-height-300", "context": "Minimum height" },
|
|
87
89
|
{
|
|
88
90
|
"token": "field-label-text-to-asterisk-small",
|
|
89
91
|
"context": "Spacing (label to asterisk icon)"
|
|
@@ -148,18 +150,9 @@
|
|
|
148
150
|
"token": "component-bottom-to-text-300",
|
|
149
151
|
"context": "Spacing (top/bottom edge to label)"
|
|
150
152
|
},
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"token": "asterisk-icon-size-200",
|
|
157
|
-
"context": "Asterisk UI icon asset"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"token": "asterisk-icon-size-300",
|
|
161
|
-
"context": "Asterisk UI icon asset"
|
|
162
|
-
},
|
|
153
|
+
{ "token": "asterisk-icon-size-100", "context": "Asterisk UI icon asset" },
|
|
154
|
+
{ "token": "asterisk-icon-size-200", "context": "Asterisk UI icon asset" },
|
|
155
|
+
{ "token": "asterisk-icon-size-300", "context": "Asterisk UI icon asset" },
|
|
163
156
|
{
|
|
164
157
|
"token": "neutral-subdued-content-color-default",
|
|
165
158
|
"context": "Label and asterisk icon"
|
|
@@ -168,52 +161,17 @@
|
|
|
168
161
|
"token": "disabled-content-color",
|
|
169
162
|
"context": "Label and asterisk icon (disabled)"
|
|
170
163
|
},
|
|
171
|
-
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"token": "regular-font-weight",
|
|
185
|
-
"context": "Label"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"token": "default-font-style",
|
|
189
|
-
"context": "Label"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"token": "font-size-75",
|
|
193
|
-
"context": "Label"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"token": "font-size-100",
|
|
197
|
-
"context": "Label"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"token": "font-size-200",
|
|
201
|
-
"context": "Label"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"token": "font-size-300",
|
|
205
|
-
"context": "Label"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"token": "line-height-100",
|
|
209
|
-
"context": "Label"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"token": "cjk-line-height-100",
|
|
213
|
-
"context": "Label"
|
|
214
|
-
}
|
|
164
|
+
{ "token": "white", "context": "Label and asterisk icon (white)" },
|
|
165
|
+
{ "token": "black", "context": "Label and asterisk icon (black)" },
|
|
166
|
+
{ "token": "default-font-family", "context": "Label" },
|
|
167
|
+
{ "token": "regular-font-weight", "context": "Label" },
|
|
168
|
+
{ "token": "default-font-style", "context": "Label" },
|
|
169
|
+
{ "token": "font-size-75", "context": "Label" },
|
|
170
|
+
{ "token": "font-size-100", "context": "Label" },
|
|
171
|
+
{ "token": "font-size-200", "context": "Label" },
|
|
172
|
+
{ "token": "font-size-300", "context": "Label" },
|
|
173
|
+
{ "token": "line-height-100", "context": "Label" },
|
|
174
|
+
{ "token": "cjk-line-height-100", "context": "Label" }
|
|
215
175
|
],
|
|
216
|
-
"accessibility": {
|
|
217
|
-
"focusable": false
|
|
218
|
-
}
|
|
176
|
+
"accessibility": { "focusable": false }
|
|
219
177
|
}
|
|
@@ -9,21 +9,66 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/help-text/"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"type": "
|
|
12
|
+
"documentBlocks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "purpose",
|
|
15
|
+
"content": "Help text provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "guideline",
|
|
19
|
+
"content": "Help text provides additional context for an input field, such as descriptions, instructions, or error messages. It’s commonly used in forms to clarify what’s expected or to explain validation."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "Help text using the neutral variant can be displayed in a disabled state. The text appears with a lighter gray that matches the style of other components in a disabled state. Help text using the negative variant cannot be displayed in a disabled state because it communicates an error, and error messages should not be visible when the component is disabled."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Help text comes 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 and pair them with components of the same size to respect the built-in hierarchy."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Help text has two variants: neutral and negative. The neutral variant is used to convey informative messages, while the negative variant is used to convey error messages."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "The text can accommodate either a description or an error message, giving extra context and guidance. Sometimes this communicates what to input or select, and sometimes it communicates how. It includes information such as:"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Regardless of the kind of message, it should be clear and concise. Use 1-2 short, complete sentences that end with a period (never an exclamation point). When showing formatting examples, it's not necessary to end with a period."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "When the text is too long for the available horizontal space, it wraps to form another line."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "For the optional icon that can be displayed with the negative variant, usage depends on what kind of component the help text is accompanying. Whether to include the optional icon with the negative variant depends on the component that the help text accompanies."
|
|
15
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "Help text displays either a description (the neutral variant) or an error message (the negative variant) in the same space. When a description is present and an error is triggered, it is replaced with an error message. Once the error is resolved, the help text description reappears."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "guideline",
|
|
55
|
+
"content": "Since one gets replaced by Because one replaces the other, the language of the help text description and the error need to work together to communicate convey the same message messaging. The description text explains the requirements or adds supplementary context for how to successfully interact with a component. The error message text restates the same requirements, guiding the user to fix the issue. tells a user how to fix the error by re-stating the interaction requirements. Make sure that the help text description and error message include the same essential information so that it isn’t lost if one replaces the other."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "guideline",
|
|
59
|
+
"content": "Communicate error messages 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."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "guideline",
|
|
63
|
+
"content": "For help text, usually the error is 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 filling out a required field that asks for their email address, write the error text like you’re offering a hint or a tip to help guide them to understand what needs to go in the missing field: “Enter your email address.”"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"options": {
|
|
67
|
+
"text": { "type": "string" },
|
|
16
68
|
"variant": {
|
|
17
69
|
"type": "string",
|
|
18
70
|
"default": "neutral",
|
|
19
|
-
"values": [
|
|
20
|
-
{
|
|
21
|
-
"value": "neutral"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"value": "negative"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
71
|
+
"values": [{ "value": "neutral" }, { "value": "negative" }]
|
|
27
72
|
},
|
|
28
73
|
"hideIcon": {
|
|
29
74
|
"type": "boolean",
|
|
@@ -34,18 +79,10 @@
|
|
|
34
79
|
"type": "string",
|
|
35
80
|
"default": "m",
|
|
36
81
|
"values": [
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"value": "m"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"value": "l"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"value": "xl"
|
|
48
|
-
}
|
|
82
|
+
{ "value": "s" },
|
|
83
|
+
{ "value": "m" },
|
|
84
|
+
{ "value": "l" },
|
|
85
|
+
{ "value": "xl" }
|
|
49
86
|
]
|
|
50
87
|
},
|
|
51
88
|
"isDisabled": {
|
|
@@ -54,46 +91,17 @@
|
|
|
54
91
|
"description": "Help text cannot be both disabled and negative variant."
|
|
55
92
|
}
|
|
56
93
|
},
|
|
57
|
-
"lifecycle": {
|
|
58
|
-
"introduced": "1.0.0-draft"
|
|
59
|
-
},
|
|
94
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
60
95
|
"tokenBindings": [
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"token": "component-height-200",
|
|
71
|
-
"context": "Minimum Height"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"token": "component-height-300",
|
|
75
|
-
"context": "Minimum Height"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"token": "workflow-icon-size-75",
|
|
79
|
-
"context": "Icon size"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"token": "workflow-icon-size-100",
|
|
83
|
-
"context": "Icon size"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"token": "workflow-icon-size-200",
|
|
87
|
-
"context": "Icon size"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"token": "workflow-icon-size-300",
|
|
91
|
-
"context": "Icon size"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"token": "text-to-visual-75",
|
|
95
|
-
"context": "Spacing (alert icon to text)"
|
|
96
|
-
},
|
|
96
|
+
{ "token": "component-height-75", "context": "Minimum Height" },
|
|
97
|
+
{ "token": "component-height-100", "context": "Minimum Height" },
|
|
98
|
+
{ "token": "component-height-200", "context": "Minimum Height" },
|
|
99
|
+
{ "token": "component-height-300", "context": "Minimum Height" },
|
|
100
|
+
{ "token": "workflow-icon-size-75", "context": "Icon size" },
|
|
101
|
+
{ "token": "workflow-icon-size-100", "context": "Icon size" },
|
|
102
|
+
{ "token": "workflow-icon-size-200", "context": "Icon size" },
|
|
103
|
+
{ "token": "workflow-icon-size-300", "context": "Icon size" },
|
|
104
|
+
{ "token": "text-to-visual-75", "context": "Spacing (alert icon to text)" },
|
|
97
105
|
{
|
|
98
106
|
"token": "text-to-visual-100",
|
|
99
107
|
"context": "Spacing (alert icon to text)"
|
|
@@ -154,10 +162,7 @@
|
|
|
154
162
|
"token": "component-bottom-to-text-300",
|
|
155
163
|
"context": "Spacing (top/bottom edge to text)"
|
|
156
164
|
},
|
|
157
|
-
{
|
|
158
|
-
"token": "neutral-subdued-content-color-default",
|
|
159
|
-
"context": "Text"
|
|
160
|
-
},
|
|
165
|
+
{ "token": "neutral-subdued-content-color-default", "context": "Text" },
|
|
161
166
|
{
|
|
162
167
|
"token": "disabled-content-color-default",
|
|
163
168
|
"context": "Text and alert icon (disabled)"
|
|
@@ -166,44 +171,15 @@
|
|
|
166
171
|
"token": "negative-content-color-default",
|
|
167
172
|
"context": "Text and alert icon (warning)"
|
|
168
173
|
},
|
|
169
|
-
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"token": "default-font-style",
|
|
179
|
-
"context": "Text"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"token": "font-size-75",
|
|
183
|
-
"context": "Text"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"token": "font-size-100",
|
|
187
|
-
"context": "Text"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"token": "font-size-200",
|
|
191
|
-
"context": "Text"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"token": "font-size-300",
|
|
195
|
-
"context": "Text"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"token": "line-height-100",
|
|
199
|
-
"context": "Text"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"token": "cjk-line-height-100",
|
|
203
|
-
"context": "Text"
|
|
204
|
-
}
|
|
174
|
+
{ "token": "default-font-family", "context": "Text" },
|
|
175
|
+
{ "token": "regular-font-weight", "context": "Text" },
|
|
176
|
+
{ "token": "default-font-style", "context": "Text" },
|
|
177
|
+
{ "token": "font-size-75", "context": "Text" },
|
|
178
|
+
{ "token": "font-size-100", "context": "Text" },
|
|
179
|
+
{ "token": "font-size-200", "context": "Text" },
|
|
180
|
+
{ "token": "font-size-300", "context": "Text" },
|
|
181
|
+
{ "token": "line-height-100", "context": "Text" },
|
|
182
|
+
{ "token": "cjk-line-height-100", "context": "Text" }
|
|
205
183
|
],
|
|
206
|
-
"accessibility": {
|
|
207
|
-
"focusable": false
|
|
208
|
-
}
|
|
184
|
+
"accessibility": { "focusable": false }
|
|
209
185
|
}
|