@adobe/spectrum-design-data 3.3.0-beta.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion.json +67 -15
- package/components/action-bar.json +30 -9
- package/components/action-button.json +92 -39
- package/components/action-group.json +137 -18
- package/components/alert-banner.json +27 -8
- package/components/alert-dialog.json +55 -34
- package/components/avatar-group.json +35 -9
- package/components/avatar.json +105 -29
- package/components/badge.json +163 -56
- package/components/breadcrumbs.json +107 -26
- package/components/button-group.json +63 -19
- package/components/button.json +105 -61
- package/components/calendar.json +74 -8
- package/components/card.json +13 -0
- package/components/cards.json +46 -31
- package/components/checkbox-group.json +85 -16
- package/components/checkbox.json +97 -27
- package/components/close-button.json +75 -20
- package/components/coach-indicator.json +44 -14
- package/components/coach-mark.json +26 -8
- package/components/color-area.json +100 -20
- package/components/color-handle.json +46 -25
- package/components/color-loupe.json +14 -2
- package/components/color-slider.json +129 -26
- package/components/color-wheel.json +91 -17
- package/components/combo-box.json +189 -50
- package/components/contextual-help.json +126 -80
- package/components/date-field.json +7 -0
- package/components/date-picker.json +127 -24
- package/components/divider.json +38 -12
- package/components/drop-zone.json +37 -18
- package/components/field-label.json +62 -21
- package/components/heading.json +7 -0
- package/components/help-text.json +53 -16
- package/components/illustrated-message.json +85 -21
- package/components/in-line-alert.json +53 -13
- package/components/link.json +63 -24
- package/components/list-view.json +80 -15
- package/components/menu.json +181 -45
- package/components/meter.json +78 -24
- package/components/number-field.json +175 -34
- package/components/picker.json +188 -42
- package/components/popover.json +126 -37
- package/components/progress-bar.json +108 -23
- package/components/progress-circle.json +55 -12
- package/components/radio-button.json +67 -14
- package/components/radio-group.json +132 -28
- package/components/rating.json +38 -9
- package/components/search-field.json +126 -34
- package/components/segmented-control.json +70 -21
- package/components/select-box.json +103 -29
- package/components/side-navigation.json +69 -28
- package/components/slider.json +155 -39
- package/components/standard-dialog.json +88 -16
- package/components/status-light.json +136 -41
- package/components/steplist.json +24 -5
- package/components/swatch-group.json +55 -19
- package/components/swatch.json +79 -24
- package/components/switch.json +79 -31
- package/components/table.json +73 -26
- package/components/tabs.json +52 -22
- package/components/tag-field.json +60 -14
- package/components/tag-group.json +56 -16
- package/components/tag.json +78 -21
- package/components/takeover-dialog.json +61 -10
- package/components/text-area.json +205 -49
- package/components/text-field.json +170 -42
- package/components/thumbnail.json +63 -22
- package/components/time-field.json +7 -0
- package/components/toast.json +50 -29
- package/components/tooltip.json +87 -27
- package/components/tree-view.json +147 -45
- package/components/user-card.json +7 -0
- package/guidelines/app-frame-content-area.json +81 -0
- package/guidelines/app-frame-creating-bluelines.json +58 -0
- package/guidelines/app-frame-header.json +72 -0
- package/guidelines/app-frame-overview.json +50 -44
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +21 -12
- package/guidelines/background-layers.json +10 -44
- package/guidelines/brand.json +10 -30
- package/guidelines/colors.json +17 -35
- package/guidelines/containers.json +62 -0
- package/guidelines/developer-overview.json +9 -25
- package/guidelines/faqs.json +9 -96
- package/guidelines/fonts.json +14 -29
- package/guidelines/grays.json +44 -17
- package/guidelines/icon-fundamentals.json +18 -7
- package/guidelines/illustrations.json +111 -0
- package/guidelines/introduction.json +2 -2
- package/guidelines/manifest.json +60 -252
- package/guidelines/motion.json +16 -17
- package/guidelines/object-styles.json +102 -0
- package/guidelines/principles.json +2 -2
- package/guidelines/resources.json +15 -21
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +10 -15
- package/guidelines/typography-fundamentals.json +142 -0
- package/guidelines/using-icons.json +44 -33
- package/package.json +2 -2
- package/registry/platform-implementations.json +30 -0
- package/guidelines/ai-resource-guide.json +0 -50
- package/guidelines/applying-the-type-system.json +0 -63
- package/guidelines/bi-directionality.json +0 -57
- package/guidelines/border-width.json +0 -42
- package/guidelines/cognitive.json +0 -197
- package/guidelines/component-spacing.json +0 -49
- package/guidelines/contact-us.json +0 -67
- package/guidelines/content-area-browsing-context.json +0 -65
- package/guidelines/creating-bluelines-browsing-context.json +0 -91
- package/guidelines/design-tokens.json +0 -122
- package/guidelines/drop-shadow.json +0 -56
- package/guidelines/grammar-and-mechanics.json +0 -252
- package/guidelines/header-browsing-context.json +0 -37
- package/guidelines/illustration.json +0 -109
- package/guidelines/in-product-word-list.json +0 -29
- package/guidelines/inclusive-design.json +0 -93
- package/guidelines/inclusive-ux-writing.json +0 -30
- package/guidelines/internationalization.json +0 -87
- package/guidelines/layout-and-structure-containers.json +0 -47
- package/guidelines/layout-spacing.json +0 -39
- package/guidelines/object-styles-overview.json +0 -17
- package/guidelines/rounding.json +0 -61
- package/guidelines/side-navigation-browsing-context.json +0 -71
- package/guidelines/spacing-overview.json +0 -45
- package/guidelines/typography-overview.json +0 -39
- package/guidelines/typography-system.json +0 -168
- package/guidelines/visual-language-containers.json +0 -36
- package/guidelines/voice-and-tone.json +0 -47
- package/guidelines/writing-about-people.json +0 -103
- package/guidelines/writing-for-errors.json +0 -120
- package/guidelines/writing-for-onboarding.json +0 -119
- package/guidelines/writing-for-readability.json +0 -54
- package/guidelines/writing-with-visuals.json +0 -70
- package/registry/platform-extensions/web-components-states.json +0 -58
package/components/toast.json
CHANGED
|
@@ -16,100 +16,121 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Toasts display brief, temporary notifications. They appear briefly without blocking interaction and typically do not require user action."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Toasts must include text to communicate a message. Write the text as concisely as possible while still being clear about what has happened or is happening."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "The neutral toast is the default variant. It is gray and does not have an icon. This is used when the message is neutral in tone or when its semantics do not fit in any of the other variants."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "The informative toast uses the informative semantic color (blue) and has an info icon to help those with color vision deficiency discern the message tone. This should be used when the message should call extra attention compared to the neutral variant."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"type": "
|
|
35
|
-
"content": "
|
|
36
|
-
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "The positive toast uses the positive semantic color (green) and has a checkmark icon to help those with color vision deficiency discern the message tone. This is used to inform about a successful action or completion of a task."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "The negative toast uses the negative semantic color (red) and has an alert icon to help those with color vision deficiency to discern the message tone. This is used to show an error or failure."
|
|
37
40
|
},
|
|
38
41
|
{
|
|
39
|
-
"type": "
|
|
40
|
-
"content": "
|
|
41
|
-
"dont": "Actionable toasts should not have a button with a redundant action. For example, including a \"Dismiss\" button would be redundant because all toasts already have a close button."
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "By default, a toast will dismiss when the user clicks the close button. A toast also has the option to auto-dismiss. Be sure to set a minimum of 5 seconds so that users can have time to read the toast message. If an actionable toast is set to auto-dismiss, make sure that the action is still available elsewhere in the app."
|
|
42
44
|
},
|
|
43
45
|
{
|
|
44
46
|
"type": "guideline",
|
|
45
|
-
"content": "
|
|
47
|
+
"content": "When the text is too long for the available horizontal space, it wraps to form another line. In actionable toasts, the button moves below the text prior to text wrapping."
|
|
46
48
|
},
|
|
47
49
|
{
|
|
48
50
|
"type": "guideline",
|
|
49
|
-
"content": "
|
|
51
|
+
"content": "The default state can display up to three toasts at a time. To view additional toasts beyond this limit, users can click the “Show all” action button. Alternatively, they can reveal remaining toasts by interacting with a button or dismissing the component. Additionally, hovering over the upper part of the toasts triggers a subtle animation, signaling to the user that the group can be fully expanded."
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
"type": "guideline",
|
|
53
|
-
"content": "
|
|
55
|
+
"content": "Please refer to more multiple toasts usage guideline below."
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
"type": "guideline",
|
|
57
|
-
"content": "
|
|
59
|
+
"content": "Toasts should only be used for confirmations, simple notifications, and low-priority alerts that do not need to completely interrupt the user experience."
|
|
58
60
|
},
|
|
59
61
|
{
|
|
60
62
|
"type": "guideline",
|
|
61
|
-
"content": "
|
|
63
|
+
"content": "Dialogs are ideal for when a situation requires a user’s attention, either for displaying important information or prompting for a response."
|
|
62
64
|
},
|
|
63
65
|
{
|
|
64
66
|
"type": "guideline",
|
|
65
|
-
"content": "
|
|
67
|
+
"content": "By default, a toast is placed at the bottom center for both desktop and mobile platform scales to avoid disrupting the user experience."
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
70
|
"type": "guideline",
|
|
69
|
-
"content": "
|
|
71
|
+
"content": "For desktop applications, a toast should be placed 16 px away from the bottom of the viewport."
|
|
70
72
|
},
|
|
71
73
|
{
|
|
72
74
|
"type": "guideline",
|
|
73
|
-
"content": "
|
|
75
|
+
"content": "If a toast isn’t noticeable or disrupts the user experience, its placement can be changed to bottom end, top end, or top center."
|
|
74
76
|
},
|
|
75
77
|
{
|
|
76
78
|
"type": "guideline",
|
|
77
|
-
"content": "
|
|
79
|
+
"content": "Actionable toasts should only have one button."
|
|
78
80
|
},
|
|
79
81
|
{
|
|
80
82
|
"type": "guideline",
|
|
81
|
-
"content": "
|
|
83
|
+
"content": "Actionable toasts should not have a button with a redundant action. For example, including a “Dismiss” button would be redundant because all toasts already have a close button."
|
|
82
84
|
},
|
|
83
85
|
{
|
|
84
86
|
"type": "guideline",
|
|
85
|
-
"content": "
|
|
87
|
+
"content": "Products should allow for users to be able turn off all types of alerts. Doing this helps people who want to focus and minimize information that they may find non-essential."
|
|
86
88
|
}
|
|
87
89
|
],
|
|
88
90
|
"options": {
|
|
89
|
-
"text": {
|
|
91
|
+
"text": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
90
94
|
"variant": {
|
|
91
95
|
"type": "string",
|
|
92
96
|
"default": "neutral",
|
|
93
97
|
"values": [
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
+
{
|
|
99
|
+
"value": "neutral"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"value": "informative"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"value": "positive"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"value": "negative"
|
|
109
|
+
}
|
|
98
110
|
]
|
|
99
111
|
},
|
|
100
112
|
"actionLabel": {
|
|
101
113
|
"type": "string",
|
|
102
114
|
"description": "If undefined, this button does not appear."
|
|
103
115
|
},
|
|
104
|
-
"isAutoDismissible": {
|
|
116
|
+
"isAutoDismissible": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"default": false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"lifecycle": {
|
|
122
|
+
"introduced": "1.0.0-draft"
|
|
105
123
|
},
|
|
106
|
-
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
107
124
|
"accessibility": {
|
|
108
125
|
"intents": ["dismiss"],
|
|
109
126
|
"focusable": true,
|
|
110
127
|
"keyboardIntents": ["dismiss"],
|
|
111
128
|
"wcag": [
|
|
112
|
-
{
|
|
129
|
+
{
|
|
130
|
+
"criterion": "4.1.3",
|
|
131
|
+
"level": "AA",
|
|
132
|
+
"title": "Status Messages"
|
|
133
|
+
}
|
|
113
134
|
]
|
|
114
135
|
}
|
|
115
136
|
}
|
package/components/tooltip.json
CHANGED
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
"category": "feedback",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/tooltip/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Tooltip",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"componentName": "Tooltip",
|
|
21
|
+
"importPath": "@adobe/spectrum-wc/components/tooltip",
|
|
22
|
+
"notes": "Spectrum 2 web component custom element: swc-tooltip."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -16,64 +29,94 @@
|
|
|
16
29
|
},
|
|
17
30
|
{
|
|
18
31
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
32
|
+
"content": "Tooltips display contextual information related to a specific component. They appear on hover or focus to clarify purpose or behavior."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "guideline",
|
|
36
|
+
"content": "All tooltips have a label. The label communicates the contextual help or information about specific components when a user hovers over or focuses on them."
|
|
20
37
|
},
|
|
21
38
|
{
|
|
22
39
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
40
|
+
"content": "By default, tooltips are the neutral variant. These are the most common variant because most tooltips are used to only disclose additional information, without conveying a semantic meaning. The neutral variant never includes an icon."
|
|
24
41
|
},
|
|
25
42
|
{
|
|
26
43
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
44
|
+
"content": "Tooltips also come in semantic variants: informative (blue), and negative (red). An icon is required for these variants to ensure information isn’t conveyed by color alone."
|
|
28
45
|
},
|
|
29
46
|
{
|
|
30
47
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
48
|
+
"content": "2 of the 3 tooltip variants (informative and negative) can include an icon to supplement the messaging. These icons are predefined and can not be customized. Unless it's being used to provide context about the exact same icon, a semantic tooltip should always show an icon. Doing this is essential for helping users with color vision deficiency to discern the message tone."
|
|
32
49
|
},
|
|
33
50
|
{
|
|
34
51
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
52
|
+
"content": "A tooltip is positioned in relation to its target."
|
|
36
53
|
},
|
|
37
54
|
{
|
|
38
|
-
"type": "
|
|
39
|
-
"content": "
|
|
40
|
-
|
|
55
|
+
"type": "guideline",
|
|
56
|
+
"content": "This option determines whether or not a tooltip should be able to switch sides when constrained by space. A tooltip placed at the top would flip to be placed at the bottom (and vice versa), and a tooltip placed at the left would flip to be placed at the right (and vice versa)."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "guideline",
|
|
60
|
+
"content": "The offset is the distance between the end of the tip and the target."
|
|
41
61
|
},
|
|
42
62
|
{
|
|
43
63
|
"type": "guideline",
|
|
44
|
-
"content": "
|
|
64
|
+
"content": "To make sure that the tooltip will stay within certain boundaries (e.g., a browser window) it’s possible to define a container and a container padding value to respect."
|
|
45
65
|
},
|
|
46
66
|
{
|
|
47
|
-
"type": "
|
|
48
|
-
"content": "
|
|
49
|
-
|
|
67
|
+
"type": "guideline",
|
|
68
|
+
"content": "When the label is too long for the available horizontal space, it wraps to form another line."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "guideline",
|
|
72
|
+
"content": "A tooltip fades in and out when showing and hiding, and slides a short distance from the source to indicate its origin. The direction of the slide (left, right, top, bottom) depends on the placement of the tooltip. The animation attributes (duration, easing, offset) are the same whether it’s showing or hiding."
|
|
50
73
|
},
|
|
51
74
|
{
|
|
52
75
|
"type": "guideline",
|
|
53
|
-
"content": "
|
|
76
|
+
"content": "Tooltips attached to help icons appear immediately. For conventional UI elements where a tooltip appearing immediately would be intrusive, delay appearance with a warmup period."
|
|
54
77
|
},
|
|
55
78
|
{
|
|
56
79
|
"type": "guideline",
|
|
57
|
-
"content": "
|
|
80
|
+
"content": "The warmup period is a global timer that requires the cursor to remain on a UI element for the allotted time before a tooltip appears. Once this period is complete, a tooltip appears instantly on any hovered-upon UI element until the cursor is in an area that does not trigger a tooltip for the duration of the cooldown period."
|
|
58
81
|
},
|
|
59
82
|
{
|
|
60
83
|
"type": "guideline",
|
|
61
|
-
"content": "
|
|
84
|
+
"content": "Icons are not always easy to identify on their own. When you use components that don’t have labels — for example, icon-only action buttons and tabs — make sure to use tooltips to provide context for the icons."
|
|
62
85
|
},
|
|
63
86
|
{
|
|
64
87
|
"type": "guideline",
|
|
65
|
-
"content": "
|
|
88
|
+
"content": "For example, in a scenario where a user is entering their password into a field, the crucial information would be to state the password requirements. Supplementary context would be a message about how to get help if they have forgotten their password."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "guideline",
|
|
92
|
+
"content": "Tooltips should be as concise and clear as possible. Keep the text to 1 or 2 short sentences. If the information you need to communicate is longer than that, look into using a different design."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "guideline",
|
|
96
|
+
"content": "If a tooltip is written in a full sentence (or is 2 or more sentences), include a period at the end. If it's a short phrase or is only the name of a tool, action, or icon, don't add a period to the end."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "guideline",
|
|
100
|
+
"content": "Tooltips appear only on hover or when in keyboard focus. They should not contain actions or links."
|
|
66
101
|
}
|
|
67
102
|
],
|
|
68
103
|
"options": {
|
|
69
|
-
"label": {
|
|
104
|
+
"label": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
70
107
|
"variant": {
|
|
71
108
|
"type": "string",
|
|
72
109
|
"default": "neutral",
|
|
73
110
|
"values": [
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
111
|
+
{
|
|
112
|
+
"value": "neutral"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"value": "informative"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"value": "negative"
|
|
119
|
+
}
|
|
77
120
|
]
|
|
78
121
|
},
|
|
79
122
|
"hasIcon": {
|
|
@@ -90,13 +133,24 @@
|
|
|
90
133
|
"type": "string",
|
|
91
134
|
"default": "top",
|
|
92
135
|
"values": [
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
136
|
+
{
|
|
137
|
+
"value": "top"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"value": "bottom"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"value": "left"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"value": "right"
|
|
147
|
+
}
|
|
97
148
|
]
|
|
98
149
|
},
|
|
99
|
-
"shouldFlip": {
|
|
150
|
+
"shouldFlip": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"default": false
|
|
153
|
+
},
|
|
100
154
|
"offset": {
|
|
101
155
|
"type": "number",
|
|
102
156
|
"default": 4,
|
|
@@ -108,7 +162,9 @@
|
|
|
108
162
|
"description": "units: pixels"
|
|
109
163
|
}
|
|
110
164
|
},
|
|
111
|
-
"lifecycle": {
|
|
165
|
+
"lifecycle": {
|
|
166
|
+
"introduced": "1.0.0-draft"
|
|
167
|
+
},
|
|
112
168
|
"accessibility": {
|
|
113
169
|
"role": "tooltip",
|
|
114
170
|
"focusable": false,
|
|
@@ -118,7 +174,11 @@
|
|
|
118
174
|
"level": "AA",
|
|
119
175
|
"title": "Content on Hover or Focus"
|
|
120
176
|
},
|
|
121
|
-
{
|
|
177
|
+
{
|
|
178
|
+
"criterion": "4.1.2",
|
|
179
|
+
"level": "A",
|
|
180
|
+
"title": "Name, Role, Value"
|
|
181
|
+
}
|
|
122
182
|
]
|
|
123
183
|
}
|
|
124
184
|
}
|