@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,13 +9,6 @@
|
|
|
9
9
|
"category": "feedback",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/contextual-help/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "ContextualHelp",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
12
|
"documentBlocks": [
|
|
20
13
|
{
|
|
21
14
|
"type": "purpose",
|
|
@@ -23,171 +16,139 @@
|
|
|
23
16
|
},
|
|
24
17
|
{
|
|
25
18
|
"type": "guideline",
|
|
26
|
-
"content": "
|
|
19
|
+
"content": "Keyboard focus.\n\nA button can be navigated using a keyboard. The keyboard focus state takes the button’s visual hover state and adds a blue ring to the button in focus."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "guideline",
|
|
23
|
+
"content": "Tooltip when the label is hidden.\n\nWhen the button label is hidden, a tooltip is shown on hover that displays the label text and, if appropriate, a keyboard shortcut."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "guideline",
|
|
27
|
+
"content": "Flexible width.\n\nThe width of a button automatically adjusts to fit the label text. The padding on each side of the button is equal to half its height."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "guideline",
|
|
31
|
+
"content": "Minimum width.\n\nButtons have a minimum width of 2.25× the height of the button. This ensures that small buttons retain an identifiable shape."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "guideline",
|
|
35
|
+
"content": "Text overflow.\n\nWhen the button text is too long for the horizontal space available, it wraps to form another line."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "guideline",
|
|
39
|
+
"content": "Cursor style.\n\nButtons use the default arrow cursor for all states, including hover and down. The only exception occurs on the web; if the button is using the href property it will display the pointer cursor instead."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "guideline",
|
|
43
|
+
"content": "Delay before pending state.\n\nSome progress can be very quick. In order to avoid showing a progress circle for a fraction of a second, which results in an unpleasant flickering, there is a delay of 1 second before the pending state appears. During this delay, the button continues to visually respond to interactive events (e.g., hover), but additional clicks do not result in repeated submissions."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "Tooltip vs. contextual help.\n\nA tooltip shows in-line information about the element that a user is hovering or focusing on. Contextual help describes a larger experience, such as something that's associated with that element in a broader sense. Use contextual help to communicate information about an entire view, rather than a specific element of the experience (e.g., in high-level section headers). Tooltips are meant for a few words or a short sentence, such as showing the label for an icon-only button. Contextual help offers more space to give more information, or to describe where a user can find further help."
|
|
27
48
|
},
|
|
28
49
|
{
|
|
29
50
|
"type": "guideline",
|
|
30
|
-
"content": "
|
|
51
|
+
"content": "Help text vs. contextual help.\n\nHelp text is readily visible, in-line information about a specific UI element. The information in the contextual help component is about an entire experience or view, is hidden within a popover, and only appears once a user interacts with the icon-only action button. Use help text for critical information that a user needs to know to complete a task. Don't hide essential information in contextual help; it's intended to supplement the experience with minimal disruption."
|
|
31
52
|
},
|
|
32
53
|
{
|
|
33
54
|
"type": "guideline",
|
|
34
|
-
"content": "
|
|
55
|
+
"content": "More information about disabled components.\n\nContextual help can be used to explain why a component is disabled and how to enable it. Don't make disabled components interactive (with focus states or hovering) as a way to display contextual information."
|
|
35
56
|
},
|
|
36
57
|
{
|
|
37
58
|
"type": "guideline",
|
|
38
|
-
"content": "
|
|
59
|
+
"content": "Action button component size.\n\nThere are two size options for the action button in contextual help: extra-small and small. Regardless of size, the action button should be quiet and display only an icon."
|
|
39
60
|
},
|
|
40
61
|
{
|
|
41
62
|
"type": "guideline",
|
|
42
|
-
"content": "
|
|
63
|
+
"content": "Informative vs. helpful content.\n\nThe content within the contextual help's popover reflects the icon it's associated with: either the info icon or the help icon. Use the info icon for informative content: specific, brief, and contextual guidance. This is best for supplemental or nice-to-know information, in-line with a label or a component (if there is no label). The content should be instructive in tone. Use the help icon for helpful content: more detailed, in-depth guidance about a task, UI element, tool, or keyboard shortcuts. This may include an image, video, or link and should be helpful in tone."
|
|
43
64
|
},
|
|
44
65
|
{
|
|
45
66
|
"type": "guideline",
|
|
46
|
-
"content": "
|
|
67
|
+
"content": "Use proper formatting.\n\nFor this component, don't add a period to the end of the title. A question mark is acceptable, depending on the context. For the description, add a period to the end of the sentence, even if it's only a single sentence. If using a standalone link, do not add punctuation to the end of the link text."
|
|
47
68
|
},
|
|
48
69
|
{
|
|
49
70
|
"type": "guideline",
|
|
50
|
-
"content": "
|
|
71
|
+
"content": "When to use a standalone link.\n\nIf using a standalone link, make sure that the landing experience is intuitive, helpful, and naturally builds upon the information being introduced in the component. For example, don't link to an external sales website unless the information there is directly related to a user being able to do something within the product. A generic \"Learn more\" can be acceptable, but it's more helpful to include another word or two in the link text that gives more context about the landing experience."
|
|
51
72
|
},
|
|
52
73
|
{
|
|
53
74
|
"type": "guideline",
|
|
54
|
-
"content": "
|
|
75
|
+
"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."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "guideline",
|
|
79
|
+
"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."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "guideline",
|
|
83
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "guideline",
|
|
87
|
+
"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."
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"implementations": [
|
|
91
|
+
{
|
|
92
|
+
"platform": "web",
|
|
93
|
+
"componentName": "ContextualHelp",
|
|
94
|
+
"package": "@react-spectrum/s2"
|
|
55
95
|
}
|
|
56
96
|
],
|
|
57
97
|
"options": {
|
|
58
98
|
"icon": {
|
|
59
99
|
"type": "string",
|
|
60
100
|
"default": "info",
|
|
61
|
-
"values": [
|
|
62
|
-
{
|
|
63
|
-
"value": "info"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"value": "help"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
101
|
+
"values": [{ "value": "info" }, { "value": "help" }]
|
|
69
102
|
},
|
|
70
103
|
"popoverPlacement": {
|
|
71
104
|
"type": "string",
|
|
72
105
|
"default": "bottom start",
|
|
73
106
|
"values": [
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"value": "bottom right"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"value": "bottom start"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"value": "bottom end"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"value": "left"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"value": "left top"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"value": "left bottom"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"value": "start"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"value": "start top"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"value": "start bottom"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"value": "right"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"value": "right top"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"value": "right bottom"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"value": "end"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"value": "end top"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"value": "end bottom"
|
|
139
|
-
}
|
|
107
|
+
{ "value": "top" },
|
|
108
|
+
{ "value": "top left" },
|
|
109
|
+
{ "value": "top right" },
|
|
110
|
+
{ "value": "top start" },
|
|
111
|
+
{ "value": "top end" },
|
|
112
|
+
{ "value": "bottom" },
|
|
113
|
+
{ "value": "bottom left" },
|
|
114
|
+
{ "value": "bottom right" },
|
|
115
|
+
{ "value": "bottom start" },
|
|
116
|
+
{ "value": "bottom end" },
|
|
117
|
+
{ "value": "left" },
|
|
118
|
+
{ "value": "left top" },
|
|
119
|
+
{ "value": "left bottom" },
|
|
120
|
+
{ "value": "start" },
|
|
121
|
+
{ "value": "start top" },
|
|
122
|
+
{ "value": "start bottom" },
|
|
123
|
+
{ "value": "right" },
|
|
124
|
+
{ "value": "right top" },
|
|
125
|
+
{ "value": "right bottom" },
|
|
126
|
+
{ "value": "end" },
|
|
127
|
+
{ "value": "end top" },
|
|
128
|
+
{ "value": "end bottom" }
|
|
140
129
|
]
|
|
141
130
|
},
|
|
142
|
-
"popoverOffset": {
|
|
143
|
-
"type": "number",
|
|
144
|
-
"default": 8
|
|
145
|
-
},
|
|
131
|
+
"popoverOffset": { "type": "number", "default": 8 },
|
|
146
132
|
"href": {
|
|
147
133
|
"type": "string",
|
|
148
134
|
"description": "Optional URL within contextual help content like a 'Learn more' link."
|
|
149
135
|
},
|
|
150
|
-
"popoverCrossOffset": {
|
|
151
|
-
|
|
152
|
-
"default": 0
|
|
153
|
-
},
|
|
154
|
-
"containerPadding": {
|
|
155
|
-
"type": "number",
|
|
156
|
-
"default": 8
|
|
157
|
-
}
|
|
136
|
+
"popoverCrossOffset": { "type": "number", "default": 0 },
|
|
137
|
+
"containerPadding": { "type": "number", "default": 8 }
|
|
158
138
|
},
|
|
159
139
|
"states": [
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"name": "open",
|
|
166
|
-
"trigger": "prop"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "keyboard-focus",
|
|
170
|
-
"trigger": "interaction"
|
|
171
|
-
}
|
|
140
|
+
{ "name": "down", "trigger": "interaction" },
|
|
141
|
+
{ "name": "open", "trigger": "prop" },
|
|
142
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
172
143
|
],
|
|
173
|
-
"lifecycle": {
|
|
174
|
-
"introduced": "1.0.0-draft"
|
|
175
|
-
},
|
|
144
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
176
145
|
"accessibility": {
|
|
177
146
|
"intents": ["trigger"],
|
|
178
147
|
"focusable": true,
|
|
179
148
|
"keyboardIntents": ["activate"],
|
|
180
149
|
"wcag": [
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
"level": "A",
|
|
184
|
-
"title": "Keyboard"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"criterion": "4.1.2",
|
|
188
|
-
"level": "A",
|
|
189
|
-
"title": "Name, Role, Value"
|
|
190
|
-
}
|
|
150
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
151
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
191
152
|
]
|
|
192
153
|
}
|
|
193
154
|
}
|
|
@@ -23,91 +23,39 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "guideline",
|
|
26
|
-
"content": "
|
|
26
|
+
"content": "Displaying the popover calendar.\n\nThe calendar popover is displayed or hidden when the user selects the in-field button (the calendar icon)."
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"type": "guideline",
|
|
30
|
-
"content": "
|
|
30
|
+
"content": "Range selection.\n\nIf a user selects a day preceding the first selection, that earlier day becomes the start of the range. For example: First selection: Jan 3. This is the start of the range. Second selection: Jan 1. This is the new start of the range. The range is now Jan 1–3 in the calendar popover and date field. A third selection resets the range. For example: Third selection: Jan 4. This is the start of a new range. Current state: Jan 4 (no end of range). The calendar popover displays Jan 4 as the start of the range but with no defined end. The date field remains populated by the user's last complete input (Jan 1-3) until they indicate the end of their new range."
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"type": "guideline",
|
|
34
|
-
"content": "
|
|
34
|
+
"content": "Individual segments for date field.\n\nDate pickers display placeholder values in individual segments by default. This is to makes it easier for users to focus and edit specific values like the day, month, or year without re-entering the entire date. This approach reduces input errors, improves accessibility, and supports faster, more precise interactions. It also adapts well to different regional formats, enhancing clarity across locales."
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"type": "guideline",
|
|
38
|
-
"content": "
|
|
38
|
+
"content": "Single date or date range.\n\nDate pickers can be used to select a single date or a date range (a start date and an end date)."
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"type": "guideline",
|
|
42
|
-
"content": "
|
|
42
|
+
"content": "Date range selection.\n\nWhen a date picker is formatted to allow a range, it displays a placeholder by default. When the user first interacts with the date field, the first value of the placeholder is in focus. This is to allow the user to edit the individual segments. When the user opens the popover without interacting, it displays the current day along with the month and year based on their locale. However, the date field will continue to show the placeholder until the user either completes the range in the field or within the calendar popover. If the user inputs a date range within the date field that spans more than the maximum of three months that the calendar popover allows, the calendar popover will only show the first three consecutive months within that range."
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"type": "guideline",
|
|
46
|
-
"content": "
|
|
46
|
+
"content": "Granularity.\n\nThe date field can also capture time values with precision down to the second, and may include time zone information. The calendar popover can also include time-specific fields, allowing users to specify start and end times."
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"type": "guideline",
|
|
50
|
-
"content": "
|
|
50
|
+
"content": "Required or optional.\n\nDate pickers can be marked as optional or required, depending on the situation. For required date pickers, there are two styling options: a \"(required)\" label or an asterisk. If you use an asterisk, be sure to include help text to explain what the asterisk means. Optional date pickers are either denoted with text added to the end of the label — \"(optional)\" — or have no indication at all. The asterisk used in this component is an icon that has specific spacing from the label text — not part of the label text itself."
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"type": "guideline",
|
|
54
|
-
"content": "
|
|
54
|
+
"content": "Read-only states vs. disabled states.\n\nA read-only state of date picker means that the user cannot interact with the field, and they can only read what the field is displaying. Therefore, the in-field button is not clickable. In the disabled state, the read-only state of date picker allows the user to focus on a value—even though they cannot change the value. A disabled date picker means that the user cannot interact with the field, but not for the same reasons as a read-only scenario. For example, a date picker may be temporarily disabled because the user needs to complete a dependent task (such as filling out another field) somewhere within their experience. A disabled date picker does not allow for the ability to focus on a value, or to change its value."
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"type": "guideline",
|
|
58
|
-
"content": "
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"type": "guideline",
|
|
62
|
-
"content": "If a user selects a day preceding the first selection, that earlier day becomes the start of the range. For example:"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"type": "guideline",
|
|
66
|
-
"content": "A third selection resets the range. For example:"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"type": "guideline",
|
|
70
|
-
"content": "Date pickers display placeholder values in individual segments by default. This is to makes it easier for users to focus and edit specific values like the day, month, or year without re-entering the entire date."
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"type": "guideline",
|
|
74
|
-
"content": "This approach reduces input errors, improves accessibility, and supports faster, more precise interactions. It also adapts well to different regional formats, enhancing clarity across locales."
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"type": "guideline",
|
|
78
|
-
"content": "Date pickers can be used to select a single date or a date range (a start date and an end date)."
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "guideline",
|
|
82
|
-
"content": "When a date picker is formatted to allow a range, it displays a placeholder by default. When the user first interacts with the date field, the first value of the placeholder is in focus. This is to allow the user to edit the individual segments. When the user opens the popover without interacting, it displays the current day along with the month and year based on their locale. However, the date field will continue to show the placeholder until the user either completes the range in the field or within the calendar popover."
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"type": "guideline",
|
|
86
|
-
"content": "If the user inputs a date range within the date field that spans more than the maximum of three months that the calendar popover allows, the calendar popover will only show the first three consecutive months within that range."
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"type": "guideline",
|
|
90
|
-
"content": "The date field can also capture time values with precision down to the second, and may include time zone information. The calendar popover can also include time-specific fields, allowing users to specify start and end times."
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "guideline",
|
|
94
|
-
"content": "Date pickers can be marked as optional or required, depending on the situation. For required date pickers, there are two styling options: a “(required)” label or an asterisk. If you use an asterisk, be sure to include help text to explain what the asterisk means. Optional date pickers are either denoted with text added to the end of the label — “(optional)” — or have no indication at all."
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "guideline",
|
|
98
|
-
"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."
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"type": "guideline",
|
|
102
|
-
"content": "A read-only state of date picker means that the user cannot interact with the field, and they can only read what the field is displaying. Therefore, the in-field button is not clickable. In the disabled state, the read-only state of date picker allows the user to focus on a value—even though they cannot change the value."
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "guideline",
|
|
106
|
-
"content": "A disabled date picker means that the user cannot interact with the field, but not for the same reasons as a read-only scenario. For example, a date picker may be temporarily disabled because the user needs to complete a dependent task (such as filling out another field) somewhere within their experience. A disabled date picker does not allow for the ability to focus on a value, or to change its value."
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"type": "guideline",
|
|
110
|
-
"content": "A date picker can be marked as having an error to show that a value needs to be entered in order to move forward, or that an entered value is invalid. In this scenario, displaying error text beneath the date field can aid the user in understanding how to resolve it. Error text within the calendar popover may also be helpful to aid the user in understanding what the error is signaling."
|
|
58
|
+
"content": "Error.\n\nA date picker can be marked as having an error to show that a value needs to be entered in order to move forward, or that an entered value is invalid. In this scenario, displaying error text beneath the date field can aid the user in understanding how to resolve it. Error text within the calendar popover may also be helpful to aid the user in understanding what the error is signaling."
|
|
111
59
|
}
|
|
112
60
|
],
|
|
113
61
|
"options": {
|
|
@@ -116,15 +64,9 @@
|
|
|
116
64
|
"default": "single",
|
|
117
65
|
"description": "Controls the number of months displayed in the calendar popover.",
|
|
118
66
|
"values": [
|
|
119
|
-
{
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
{
|
|
123
|
-
"value": "double"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"value": "triple"
|
|
127
|
-
}
|
|
67
|
+
{ "value": "single" },
|
|
68
|
+
{ "value": "double" },
|
|
69
|
+
{ "value": "triple" }
|
|
128
70
|
]
|
|
129
71
|
},
|
|
130
72
|
"selectedDate": {
|
|
@@ -135,14 +77,8 @@
|
|
|
135
77
|
"type": "object",
|
|
136
78
|
"description": "The currently selected date range, used when selectionMode is range.",
|
|
137
79
|
"properties": {
|
|
138
|
-
"start": {
|
|
139
|
-
|
|
140
|
-
"description": "Range start date."
|
|
141
|
-
},
|
|
142
|
-
"end": {
|
|
143
|
-
"type": "string",
|
|
144
|
-
"description": "Range end date."
|
|
145
|
-
}
|
|
80
|
+
"start": { "type": "string", "description": "Range start date." },
|
|
81
|
+
"end": { "type": "string", "description": "Range end date." }
|
|
146
82
|
}
|
|
147
83
|
},
|
|
148
84
|
"dateField": {
|
|
@@ -158,22 +94,10 @@
|
|
|
158
94
|
"enum": ["top", "side"],
|
|
159
95
|
"default": "top"
|
|
160
96
|
},
|
|
161
|
-
"hideLabel": {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
"isDisabled": {
|
|
166
|
-
"type": "boolean",
|
|
167
|
-
"default": false
|
|
168
|
-
},
|
|
169
|
-
"isReadOnly": {
|
|
170
|
-
"type": "boolean",
|
|
171
|
-
"default": false
|
|
172
|
-
},
|
|
173
|
-
"isRequired": {
|
|
174
|
-
"type": "boolean",
|
|
175
|
-
"default": false
|
|
176
|
-
},
|
|
97
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
98
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
99
|
+
"isReadOnly": { "type": "boolean", "default": false },
|
|
100
|
+
"isRequired": { "type": "boolean", "default": false },
|
|
177
101
|
"isError": {
|
|
178
102
|
"type": "boolean",
|
|
179
103
|
"default": false,
|
|
@@ -198,10 +122,7 @@
|
|
|
198
122
|
"type": "object",
|
|
199
123
|
"description": "Configuration for the calendar popover.",
|
|
200
124
|
"properties": {
|
|
201
|
-
"isDisabled": {
|
|
202
|
-
"type": "boolean",
|
|
203
|
-
"default": false
|
|
204
|
-
},
|
|
125
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
205
126
|
"minValue": {
|
|
206
127
|
"type": "string",
|
|
207
128
|
"description": "The minimum allowed date that a user may select."
|
|
@@ -266,14 +187,9 @@
|
|
|
266
187
|
}
|
|
267
188
|
}
|
|
268
189
|
},
|
|
269
|
-
"lifecycle": {
|
|
270
|
-
"introduced": "1.0.0-draft"
|
|
271
|
-
},
|
|
190
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
272
191
|
"tokenBindings": [
|
|
273
|
-
{
|
|
274
|
-
"token": "strikethrough-day-thickness",
|
|
275
|
-
"context": "Strikethrough day "
|
|
276
|
-
},
|
|
192
|
+
{ "token": "strikethrough-day-thickness", "context": "Strikethrough day " },
|
|
277
193
|
{
|
|
278
194
|
"token": "date-picker-text-to-in-field-button",
|
|
279
195
|
"context": "Spacing (value to in-field button)"
|
|
@@ -284,21 +200,9 @@
|
|
|
284
200
|
"focusable": true,
|
|
285
201
|
"keyboardIntents": ["navigate-items", "activate"],
|
|
286
202
|
"wcag": [
|
|
287
|
-
{
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"title": "Info and Relationships"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"criterion": "2.1.1",
|
|
294
|
-
"level": "A",
|
|
295
|
-
"title": "Keyboard"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"criterion": "4.1.2",
|
|
299
|
-
"level": "A",
|
|
300
|
-
"title": "Name, Role, Value"
|
|
301
|
-
}
|
|
203
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
204
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
205
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
302
206
|
]
|
|
303
207
|
}
|
|
304
208
|
}
|
package/components/divider.json
CHANGED
|
@@ -9,19 +9,6 @@
|
|
|
9
9
|
"category": "containers",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/divider/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "Divider",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "Divider",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/divider",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-divider."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
@@ -35,41 +22,41 @@
|
|
|
35
22
|
"type": "do-dont",
|
|
36
23
|
"content": "Don't overuse dividers",
|
|
37
24
|
"dont": "Dividers lose their value when overused. Use them sparingly to avoid creating unnecessary noise."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "guideline",
|
|
28
|
+
"content": "Cursor guidelines.\n\nCursor Usage Default (Arrow) Use the default cursor for non-interactive elements like the divider."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "guideline",
|
|
32
|
+
"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. 2. Operable Requirement Criterion Level Compliance 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."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"implementations": [
|
|
36
|
+
{
|
|
37
|
+
"platform": "web",
|
|
38
|
+
"componentName": "Divider",
|
|
39
|
+
"package": "@react-spectrum/s2"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"platform": "web",
|
|
43
|
+
"componentName": "Divider",
|
|
44
|
+
"importPath": "@adobe/spectrum-wc/components/divider",
|
|
45
|
+
"notes": "Spectrum 2 web component custom element: swc-divider."
|
|
38
46
|
}
|
|
39
47
|
],
|
|
40
48
|
"options": {
|
|
41
49
|
"size": {
|
|
42
50
|
"type": "string",
|
|
43
51
|
"default": "s",
|
|
44
|
-
"values": [
|
|
45
|
-
{
|
|
46
|
-
"value": "s"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"value": "m"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"value": "l"
|
|
53
|
-
}
|
|
54
|
-
]
|
|
52
|
+
"values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
|
|
55
53
|
},
|
|
56
54
|
"orientation": {
|
|
57
55
|
"type": "string",
|
|
58
56
|
"default": "horizontal",
|
|
59
|
-
"values": [
|
|
60
|
-
{
|
|
61
|
-
"value": "horizontal"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"value": "vertical"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
57
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
67
58
|
}
|
|
68
59
|
},
|
|
69
|
-
"lifecycle": {
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
"accessibility": {
|
|
73
|
-
"focusable": false
|
|
74
|
-
}
|
|
60
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
61
|
+
"accessibility": { "focusable": false }
|
|
75
62
|
}
|