@adobe/spectrum-design-data 3.3.0 → 3.4.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/package.json +2 -2
- package/tokens/layout.tokens.json +88 -0
|
@@ -9,19 +9,6 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/button-group/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "ButtonGroup",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "ButtonGroup",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/button-group",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-button-group."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
@@ -29,107 +16,89 @@
|
|
|
29
16
|
},
|
|
30
17
|
{
|
|
31
18
|
"type": "guideline",
|
|
32
|
-
"content": "
|
|
19
|
+
"content": "Overflow.\n\nWhen horizontal space is limited, button groups stack vertically. Buttons are stacked by the importance of the action, with the most critical or primary action at the bottom."
|
|
33
20
|
},
|
|
34
21
|
{
|
|
35
22
|
"type": "guideline",
|
|
36
|
-
"content": "
|
|
23
|
+
"content": "Use the recommended option for subsequent actions.\n\nThe most critical action within a button group should be an accent, primary, or negative button (fill or outline). The other actions should always be a secondary outline button."
|
|
37
24
|
},
|
|
38
25
|
{
|
|
39
26
|
"type": "guideline",
|
|
40
|
-
"content": "
|
|
27
|
+
"content": "Align button groups based on content.\n\nButton groups are aligned contextually. In general, button groups are left-aligned to follow content such as a block of text. They are center-aligned in the context of an empty state. And, they should be right-aligned inside container components such as dialogs, popovers, or cards."
|
|
41
28
|
},
|
|
42
29
|
{
|
|
43
30
|
"type": "guideline",
|
|
44
|
-
"content": "
|
|
31
|
+
"content": "Respect button order within a group.\n\nThe order of button priority should match the alignment of surrounding text. When text is left-aligned, buttons should be arranged so that the leftmost button is the most critical. When text is right- or center- aligned, the most critical action should be the furthest right."
|
|
45
32
|
},
|
|
46
33
|
{
|
|
47
34
|
"type": "guideline",
|
|
48
|
-
"content": "
|
|
35
|
+
"content": "Use icons only for the most critical actions.\n\nNot all buttons in a group require an icon, but buttons with icons should always be of a higher priority than ones without icons. If the most critical action in a group doesn't have an icon, don't use icons in the remaining lower-level actions."
|
|
49
36
|
},
|
|
50
37
|
{
|
|
51
38
|
"type": "guideline",
|
|
52
|
-
"content": "
|
|
39
|
+
"content": "Use a button group to show additional actions.\n\nInstead of a single split button (now a deprecated component), use a button group to show any additional actions related to the most critical action."
|
|
53
40
|
},
|
|
54
41
|
{
|
|
55
42
|
"type": "guideline",
|
|
56
|
-
"content": "
|
|
43
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the button group is mirrored."
|
|
57
44
|
},
|
|
58
45
|
{
|
|
59
46
|
"type": "guideline",
|
|
60
|
-
"content": "
|
|
47
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the button group. Focus is placed on the primary button of the group. Shift + Tab Moves focus to the previous component. Space or Enter Executes the selected action within the button group. Focus remains on the active button to preserve context across the group. If the action opens or closes a related container, focus moves into the resulting context or returns to the triggering button Arrow keys Moves focus through the group of buttons."
|
|
61
48
|
},
|
|
62
49
|
{
|
|
63
50
|
"type": "guideline",
|
|
64
|
-
"content": "
|
|
51
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components in every state."
|
|
65
52
|
},
|
|
66
53
|
{
|
|
67
54
|
"type": "guideline",
|
|
68
|
-
"content": "
|
|
55
|
+
"content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 A Non‑text elements—such as icons used in buttons—must provide a text alternative that communicates the button’s purpose. All buttons, especially icon‑only buttons, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function. Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Buttons should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role of buttons should be utilized. Orientation 1.3.4 AA Button groups are available in both vertical and horizontal orientations. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in buttons. While negative buttons do use red to reinforce their purpose, every button also includes a clear text label that communicates the action it performs. Text contrast 1.4.3 AA Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size when text is wrapped in buttons. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus can be moved away from the component using only a keyboard. Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"implementations": [
|
|
59
|
+
{
|
|
60
|
+
"platform": "web",
|
|
61
|
+
"componentName": "ButtonGroup",
|
|
62
|
+
"package": "@react-spectrum/s2"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"platform": "web",
|
|
66
|
+
"componentName": "ButtonGroup",
|
|
67
|
+
"importPath": "@adobe/spectrum-wc/components/button-group",
|
|
68
|
+
"notes": "Spectrum 2 web component custom element: swc-button-group."
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
"options": {
|
|
72
72
|
"orientation": {
|
|
73
73
|
"type": "string",
|
|
74
74
|
"default": "horizontal",
|
|
75
|
-
"values": [
|
|
76
|
-
{
|
|
77
|
-
"value": "horizontal"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"value": "vertical"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
75
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
83
76
|
},
|
|
84
77
|
"size": {
|
|
85
78
|
"type": "string",
|
|
86
79
|
"pattern": "^(x?s|m|x{0,3}l)$",
|
|
87
80
|
"default": "m",
|
|
88
81
|
"values": [
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"value": "m"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"value": "l"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"value": "xl"
|
|
100
|
-
}
|
|
82
|
+
{ "value": "s" },
|
|
83
|
+
{ "value": "m" },
|
|
84
|
+
{ "value": "l" },
|
|
85
|
+
{ "value": "xl" }
|
|
101
86
|
]
|
|
102
87
|
},
|
|
103
88
|
"overflowMode": {
|
|
104
89
|
"type": "string",
|
|
105
90
|
"default": "wrap",
|
|
106
|
-
"values": [
|
|
107
|
-
{
|
|
108
|
-
"value": "wrap"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"value": "collapse"
|
|
112
|
-
}
|
|
113
|
-
]
|
|
91
|
+
"values": [{ "value": "wrap" }, { "value": "collapse" }]
|
|
114
92
|
},
|
|
115
|
-
"isDisabled": {
|
|
116
|
-
"type": "boolean",
|
|
117
|
-
"default": false
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"lifecycle": {
|
|
121
|
-
"introduced": "1.0.0-draft"
|
|
93
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
122
94
|
},
|
|
95
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
123
96
|
"accessibility": {
|
|
124
97
|
"role": "group",
|
|
125
98
|
"intents": ["trigger"],
|
|
126
99
|
"focusable": false,
|
|
127
100
|
"wcag": [
|
|
128
|
-
{
|
|
129
|
-
"criterion": "4.1.2",
|
|
130
|
-
"level": "A",
|
|
131
|
-
"title": "Name, Role, Value"
|
|
132
|
-
}
|
|
101
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
133
102
|
]
|
|
134
103
|
}
|
|
135
104
|
}
|
package/components/button.json
CHANGED
|
@@ -9,23 +9,10 @@
|
|
|
9
9
|
"category": "actions",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/button/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "Button",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "Button",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/button",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-button."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
28
|
-
"content": "Buttons
|
|
15
|
+
"content": "Buttons allow users to perform an action or to navigate to another page."
|
|
29
16
|
},
|
|
30
17
|
{
|
|
31
18
|
"type": "guideline",
|
|
@@ -62,7 +49,7 @@
|
|
|
62
49
|
{
|
|
63
50
|
"type": "do-dont",
|
|
64
51
|
"content": "Don't override color",
|
|
65
|
-
"dont": "Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible
|
|
52
|
+
"dont": "Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible"
|
|
66
53
|
},
|
|
67
54
|
{
|
|
68
55
|
"type": "guideline",
|
|
@@ -71,15 +58,64 @@
|
|
|
71
58
|
{
|
|
72
59
|
"type": "do-dont",
|
|
73
60
|
"content": "Don't use the pending state for long progress",
|
|
74
|
-
"dont": "The pending state should be reserved for indeterminate actions that are expected to take 5 seconds or less. For determinate or longer actions, use a
|
|
61
|
+
"dont": "The pending state should be reserved for indeterminate actions that are expected to take 5 seconds or less. For determinate or longer actions, use a progress bar or progress circle outside of the button."
|
|
75
62
|
},
|
|
76
63
|
{
|
|
77
64
|
"type": "guideline",
|
|
78
|
-
"content": "Use a button group to show additional actions.\n\nInstead of a single split button (now a deprecated component), use a
|
|
65
|
+
"content": "Use a button group to show additional actions.\n\nInstead of a single split button (now a deprecated component), use a button group to show any additional actions related to the most critical action."
|
|
79
66
|
},
|
|
80
67
|
{
|
|
81
68
|
"type": "guideline",
|
|
82
69
|
"content": "Display a popover when featuring subsequent options.\n\nIn some instances, it's possible to have a call to action button display a popover (or tray) to feature subsequent options. These options should extend and parallel the action of the button. Do not include arbitrary or unrelated options."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "guideline",
|
|
73
|
+
"content": "Be concise.\n\nButton text should be concise: 1 or 2 words, no longer than 4 words, with fewer than 20 characters including spaces. Don't use punctuation marks such as periods or exclamation points."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "guideline",
|
|
77
|
+
"content": "Write labels as verbs.\n\nA button represents an action, so its label needs to reflect the action that a user is taking — which is a verb. Labels written as nouns or adjectives tend to be unclear and disorienting."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "guideline",
|
|
81
|
+
"content": "Clearly state the action.\n\nMake sure that a button's label clearly states the outcome of the action. Use the same word or phrase as found elsewhere in the experience. For example, when designing a form for people to sign up for a trial offer, use \"Sign up\" as the call to action for completing the form. Phrases like \"Start trial\" skip the sign up step. Words like \"Submit\" or \"Enter,\" while technically correct, focus on the action of finishing filling out the form itself, rather than what the user is actually doing by filling it out (signing up for something)."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "guideline",
|
|
85
|
+
"content": "Use sentence case.\n\nButton text should always be in sentence case. Never use capitalization to emphasize a specific button."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "guideline",
|
|
89
|
+
"content": "Be aware of tone.\n\nEmoji and exclamation points aren't appropriate for the functional, utilitarian nature of buttons. Keep the label to just text, with no punctuation or extra decoration."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "guideline",
|
|
93
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the button is mirrored. The icon is placed on the right side of the text."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "guideline",
|
|
97
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the button. Space or Enter Executes the button action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "guideline",
|
|
101
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "guideline",
|
|
105
|
+
"content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 A Non‑text elements—such as icons used in buttons—must provide a text alternative that communicates the button’s purpose. All buttons, especially icon‑only buttons, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function. Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Buttons should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role of buttons should be utilized. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in buttons. While negative buttons do use red to reinforce their purpose, every button also includes a clear text label that communicates the action it performs. Text contrast minimums 1.4.3 AA Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement. Resize text 1.4.4 AA Buttons should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus can be moved away from the component using only a keyboard. Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"implementations": [
|
|
109
|
+
{
|
|
110
|
+
"platform": "web",
|
|
111
|
+
"componentName": "Button",
|
|
112
|
+
"package": "@react-spectrum/s2"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"platform": "web",
|
|
116
|
+
"componentName": "Button",
|
|
117
|
+
"importPath": "@adobe/spectrum-wc/components/button",
|
|
118
|
+
"notes": "Spectrum 2 web component custom element: swc-button."
|
|
83
119
|
}
|
|
84
120
|
],
|
|
85
121
|
"options": {
|
|
@@ -88,62 +124,30 @@
|
|
|
88
124
|
"default": "accent",
|
|
89
125
|
"description": "Visual emphasis level.",
|
|
90
126
|
"values": [
|
|
91
|
-
{
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"value": "negative"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"value": "primary"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"value": "secondary"
|
|
102
|
-
}
|
|
127
|
+
{ "value": "accent" },
|
|
128
|
+
{ "value": "negative" },
|
|
129
|
+
{ "value": "primary" },
|
|
130
|
+
{ "value": "secondary" }
|
|
103
131
|
]
|
|
104
132
|
},
|
|
105
133
|
"style": {
|
|
106
134
|
"type": "string",
|
|
107
135
|
"default": "fill",
|
|
108
|
-
"values": [
|
|
109
|
-
{
|
|
110
|
-
"value": "fill"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"value": "outline"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
136
|
+
"values": [{ "value": "fill" }, { "value": "outline" }]
|
|
116
137
|
},
|
|
117
138
|
"size": {
|
|
118
139
|
"type": "string",
|
|
119
140
|
"default": "m",
|
|
120
141
|
"values": [
|
|
121
|
-
{
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"value": "m"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"value": "l"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"value": "xl"
|
|
132
|
-
}
|
|
142
|
+
{ "value": "s" },
|
|
143
|
+
{ "value": "m" },
|
|
144
|
+
{ "value": "l" },
|
|
145
|
+
{ "value": "xl" }
|
|
133
146
|
]
|
|
134
147
|
},
|
|
135
|
-
"isDisabled": {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
"isPending": {
|
|
140
|
-
"type": "boolean",
|
|
141
|
-
"default": false
|
|
142
|
-
},
|
|
143
|
-
"isLabelHidden": {
|
|
144
|
-
"type": "boolean",
|
|
145
|
-
"default": false
|
|
146
|
-
},
|
|
148
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
149
|
+
"isPending": { "type": "boolean", "default": false },
|
|
150
|
+
"isLabelHidden": { "type": "boolean", "default": false },
|
|
147
151
|
"icon": {
|
|
148
152
|
"$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
|
|
149
153
|
"description": "Icon placed at the start of the button. Required when isLabelHidden is true."
|
|
@@ -151,14 +155,7 @@
|
|
|
151
155
|
"staticColor": {
|
|
152
156
|
"type": "string",
|
|
153
157
|
"description": "Static color for use on colored backgrounds.",
|
|
154
|
-
"values": [
|
|
155
|
-
{
|
|
156
|
-
"value": "white"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"value": "black"
|
|
160
|
-
}
|
|
161
|
-
]
|
|
158
|
+
"values": [{ "value": "white" }, { "value": "black" }]
|
|
162
159
|
}
|
|
163
160
|
},
|
|
164
161
|
"slots": [
|
|
@@ -167,43 +164,23 @@
|
|
|
167
164
|
"description": "Text label of the button.",
|
|
168
165
|
"required": false
|
|
169
166
|
},
|
|
170
|
-
{
|
|
171
|
-
"name": "icon",
|
|
172
|
-
"description": "Icon placed at the start of the button."
|
|
173
|
-
}
|
|
167
|
+
{ "name": "icon", "description": "Icon placed at the start of the button." }
|
|
174
168
|
],
|
|
175
169
|
"anatomy": [
|
|
176
|
-
{
|
|
177
|
-
|
|
178
|
-
"description": "Leading icon."
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"name": "label",
|
|
182
|
-
"description": "Button text.",
|
|
183
|
-
"required": true
|
|
184
|
-
}
|
|
170
|
+
{ "name": "icon", "description": "Leading icon." },
|
|
171
|
+
{ "name": "label", "description": "Button text.", "required": true }
|
|
185
172
|
],
|
|
186
173
|
"states": [
|
|
187
|
-
{
|
|
188
|
-
"name": "hover",
|
|
189
|
-
"trigger": "interaction",
|
|
190
|
-
"precedence": 50
|
|
191
|
-
},
|
|
174
|
+
{ "name": "hover", "trigger": "interaction", "precedence": 50 },
|
|
192
175
|
{
|
|
193
176
|
"name": "focus",
|
|
194
177
|
"trigger": "interaction",
|
|
195
178
|
"precedence": 60,
|
|
196
179
|
"layered": true
|
|
197
180
|
},
|
|
198
|
-
{
|
|
199
|
-
"name": "disabled",
|
|
200
|
-
"trigger": "prop",
|
|
201
|
-
"precedence": 100
|
|
202
|
-
}
|
|
181
|
+
{ "name": "disabled", "trigger": "prop", "precedence": 100 }
|
|
203
182
|
],
|
|
204
|
-
"lifecycle": {
|
|
205
|
-
"introduced": "1.0.0-draft"
|
|
206
|
-
},
|
|
183
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
207
184
|
"tokenBindings": [
|
|
208
185
|
{
|
|
209
186
|
"token": "corner-radius-button-small",
|
|
@@ -224,16 +201,8 @@
|
|
|
224
201
|
"focusable": true,
|
|
225
202
|
"keyboardIntents": ["activate"],
|
|
226
203
|
"wcag": [
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
"level": "A",
|
|
230
|
-
"title": "Keyboard"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"criterion": "4.1.2",
|
|
234
|
-
"level": "A",
|
|
235
|
-
"title": "Name, Role, Value"
|
|
236
|
-
}
|
|
204
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
205
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
237
206
|
]
|
|
238
207
|
}
|
|
239
208
|
}
|
package/components/calendar.json
CHANGED
|
@@ -23,87 +23,28 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "guideline",
|
|
26
|
-
"content": "
|
|
26
|
+
"content": "Unavailable dates.\n\nWhen a day or several days are unavailable within the calendar popover, each day should display a strikethrough to help the user understand that they cannot select it. Disabled days use a distinct gray style to clearly differentiate them from unavailable days. When the calendar prevents selection of past dates, this visual treatment helps users distinguish disabled days from those marked as unavailable."
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"type": "guideline",
|
|
30
|
-
"content": "
|
|
30
|
+
"content": "Why unavailable and disabled days are necessary.\n\nIn a date selection system, users often need to distinguish between dates that cannot be selected and dates that are simply inactive. Supporting both states improves clarity and prevents errors. Here's an example scenario: A potential guest is browsing a calendar to book a stay at a vacation rental. Unavailable dates: Days when the rental is already booked or blocked by the owner. These appear with a strikethrough, indicating they cannot be selected. Disabled dates: Past dates that are no longer valid for booking. These appear visually distinct (gray style) to show they are inactive. Guests see unavailable dates marked clearly so they don't attempt to select them. Hosts or admins can view past dates as disabled and also mark future dates as unavailable when needed. By supporting both behaviors, the system provides a clear, intuitive experience for different user roles and prevents confusion during date selection."
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"type": "guideline",
|
|
34
|
-
"content": "
|
|
34
|
+
"content": "Range fill color.\n\nThe range fill shows which days fall between two selected dates. If the range spans more than the three-month calendar view, it ends on the last visible day but continues as users navigate with the calendar chevrons. A dashed stroke outlines the fill to improve visibility on bright screens and for users with vision impairments."
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
"type": "
|
|
38
|
-
"content": "
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
"type": "guideline",
|
|
42
|
-
"content": "The calendar popover may display an error as error text when a user attempts to provide an input that violates the defined constraints of the date selection. For example, when the user selects dates that fall outside allowable limits, or conflict with contextual restrictions."
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "guideline",
|
|
46
|
-
"content": "The calendar popover is disabled. For example, a month within a three-month range is disabled."
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "guideline",
|
|
50
|
-
"content": "The types of selection available for the calendar."
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "guideline",
|
|
54
|
-
"content": "The current year or month displayed in the calendar popover."
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "guideline",
|
|
58
|
-
"content": "When a day or several days are unavailable within the calendar popover, each day should display a strikethrough to help the user understand that they cannot select it."
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"type": "guideline",
|
|
62
|
-
"content": "Disabled days use a distinct gray style to clearly differentiate them from unavailable days. When the calendar prevents selection of past dates, this visual treatment helps users distinguish disabled days from those marked as unavailable."
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"type": "guideline",
|
|
66
|
-
"content": "In a date selection system, users often need to distinguish between dates that cannot be selected and dates that are simply inactive. Supporting both states improves clarity and prevents errors."
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"type": "guideline",
|
|
70
|
-
"content": "Here’s an example scenario: A potential guest is browsing a calendar to book a stay at a vacation rental."
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"type": "guideline",
|
|
74
|
-
"content": "Unavailable dates: Days when the rental is already booked or blocked by the owner. These appear with a strikethrough, indicating they cannot be selected."
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"type": "guideline",
|
|
78
|
-
"content": "Disabled dates: Past dates that are no longer valid for booking. These appear visually distinct (gray style) to show they are inactive."
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "guideline",
|
|
82
|
-
"content": "Guests see unavailable dates marked clearly so they don’t attempt to select them. Hosts or admins can view past dates as disabled and also mark future dates as unavailable when needed."
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"type": "guideline",
|
|
86
|
-
"content": "By supporting both behaviors, the system provides a clear, intuitive experience for different user roles and prevents confusion during date selection."
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"type": "guideline",
|
|
90
|
-
"content": "The range fill shows which days fall between two selected dates. If the range spans more than the three-month calendar view, it ends on the last visible day but continues as users navigate with the calendar chevrons. A dashed stroke outlines the fill to improve visibility on bright screens and for users with vision impairments."
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "guideline",
|
|
94
|
-
"content": "The strikethrough styling intentionally accommodates internationalization."
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "guideline",
|
|
98
|
-
"content": "The calendar popover supports a disabled state but not a read-only state. Dates or months may be temporarily disabled based on context (for example, if a user must complete a task before selecting a date). In these cases, help text can explain why certain dates are unavailable."
|
|
37
|
+
"type": "do-dont",
|
|
38
|
+
"content": "Do not change the styling of unavailable days",
|
|
39
|
+
"dont": "The strikethrough styling intentionally accommodates internationalization."
|
|
99
40
|
},
|
|
100
41
|
{
|
|
101
42
|
"type": "guideline",
|
|
102
|
-
"content": "If a date picker is truly read-only, users shouldn
|
|
43
|
+
"content": "Calendar popover states.\n\nThe calendar popover supports a disabled state but not a read-only state. Dates or months may be temporarily disabled based on context (for example, if a user must complete a task before selecting a date). In these cases, help text can explain why certain dates are unavailable. If a date picker is truly read-only, users shouldn't be able to open the calendar popover at all, since they can't interact with it."
|
|
103
44
|
},
|
|
104
45
|
{
|
|
105
46
|
"type": "guideline",
|
|
106
|
-
"content": "
|
|
47
|
+
"content": "Optional time fields.\n\nThe calendar popover can also include time-specific fields, allowing users to specify start and end times."
|
|
107
48
|
}
|
|
108
49
|
],
|
|
109
50
|
"options": {
|