@adobe/spectrum-design-data 3.3.0-beta.2 → 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-overview.json +44 -46
- package/guidelines/attention-hierarchy.json +22 -13
- package/guidelines/background-layers.json +10 -80
- package/guidelines/brand.json +12 -32
- package/guidelines/colors.json +17 -47
- 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/manifest.json +15 -367
- package/guidelines/motion.json +16 -17
- package/guidelines/principles.json +8 -7
- package/guidelines/resources.json +15 -21
- package/guidelines/states.json +11 -16
- 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 -67
- package/guidelines/bi-directionality.json +0 -57
- package/guidelines/border-width.json +0 -58
- package/guidelines/cognitive.json +0 -197
- package/guidelines/component-spacing.json +0 -61
- package/guidelines/contact-us.json +0 -67
- package/guidelines/content-area-browsing-context.json +0 -65
- package/guidelines/content-design-grammar-and-mechanics.json +0 -241
- package/guidelines/content-design-voice-and-tone.json +0 -37
- package/guidelines/content-grammar-and-mechanics.json +0 -252
- package/guidelines/content-language-and-inclusivity-writing-about-people.json +0 -103
- package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +0 -70
- package/guidelines/content-voice-and-tone.json +0 -47
- package/guidelines/creating-bluelines-browsing-context.json +0 -91
- package/guidelines/design-tokens.json +0 -158
- package/guidelines/drop-shadow.json +0 -68
- package/guidelines/grammar-and-mechanics.json +0 -252
- package/guidelines/header-browsing-context.json +0 -40
- package/guidelines/illustration.json +0 -105
- package/guidelines/in-product-word-list.json +0 -29
- package/guidelines/inclusive-design.json +0 -101
- package/guidelines/inclusive-ux-writing.json +0 -30
- package/guidelines/internationalization.json +0 -87
- package/guidelines/language-and-inclusivity-writing-about-people.json +0 -85
- package/guidelines/language-and-inclusivity-writing-with-visuals.json +0 -61
- package/guidelines/layout-and-structure-containers.json +0 -47
- package/guidelines/layout-and-structure-spacing-overview.json +0 -66
- package/guidelines/layout-spacing.json +0 -39
- package/guidelines/object-styles-overview.json +0 -17
- package/guidelines/rounding.json +0 -73
- package/guidelines/side-navigation-browsing-context.json +0 -74
- package/guidelines/spacing-overview.json +0 -45
- package/guidelines/support.json +0 -113
- package/guidelines/typography-overview.json +0 -43
- package/guidelines/typography-system.json +0 -208
- package/guidelines/visual-language-containers.json +0 -36
- package/guidelines/voice-and-tone.json +0 -47
- package/guidelines/whats-new.json +0 -32
- 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
|
@@ -9,6 +9,13 @@
|
|
|
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
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,132 +23,171 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
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."
|
|
26
|
+
"content": "Contextual help displays additional information about the state of a nearby component or an entire view. It explains high-level concepts and can link to more detailed guidance."
|
|
32
27
|
},
|
|
33
28
|
{
|
|
34
29
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
30
|
+
"content": "To make sure that a popover will stay within certain boundaries (e.g., a browser window) it’s possible to define a container, and a container padding value, to respect."
|
|
36
31
|
},
|
|
37
32
|
{
|
|
38
33
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
34
|
+
"content": "The cross offset is the placement offset on the cross axis (x-axis for top and bottom, y-axis for left and right)."
|
|
40
35
|
},
|
|
41
36
|
{
|
|
42
37
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
38
|
+
"content": "A contextual help can have up to one link."
|
|
44
39
|
},
|
|
45
40
|
{
|
|
46
41
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
42
|
+
"content": "The offset is the distance between the action button and the popover edge. There is a default value but this can also be adjusted depending on the context."
|
|
48
43
|
},
|
|
49
44
|
{
|
|
50
45
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
46
|
+
"content": "Indicates whether contents are informative or provides helpful guidance."
|
|
52
47
|
},
|
|
53
48
|
{
|
|
54
49
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
50
|
+
"content": "Contextual 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."
|
|
56
51
|
},
|
|
57
52
|
{
|
|
58
53
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
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."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "guideline",
|
|
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."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
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."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
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 TabMoves focus onto or off of the button.Space or EnterExecutes 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 PointerUse 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 ANon‑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, AAAButtons 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 AColor 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 AALarge 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 AAButtons should be built in such a way that they can be resized without assistive technology up to 200%.Visual presentation 1.4.8 AAAThe 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 AAThe visual presentation of icons and various states have a contrast ratio of at least 3:1.Text spacing 1.4.12 AALine 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, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus 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, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
54
|
+
"content": "There 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."
|
|
88
55
|
}
|
|
89
56
|
],
|
|
90
57
|
"options": {
|
|
91
58
|
"icon": {
|
|
92
59
|
"type": "string",
|
|
93
60
|
"default": "info",
|
|
94
|
-
"values": [
|
|
61
|
+
"values": [
|
|
62
|
+
{
|
|
63
|
+
"value": "info"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "help"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
95
69
|
},
|
|
96
70
|
"popoverPlacement": {
|
|
97
71
|
"type": "string",
|
|
98
72
|
"default": "bottom start",
|
|
99
73
|
"values": [
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{
|
|
74
|
+
{
|
|
75
|
+
"value": "top"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "top left"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"value": "top right"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"value": "top start"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"value": "top end"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "bottom"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"value": "bottom left"
|
|
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
|
+
}
|
|
122
140
|
]
|
|
123
141
|
},
|
|
124
|
-
"popoverOffset": {
|
|
142
|
+
"popoverOffset": {
|
|
143
|
+
"type": "number",
|
|
144
|
+
"default": 8
|
|
145
|
+
},
|
|
125
146
|
"href": {
|
|
126
147
|
"type": "string",
|
|
127
148
|
"description": "Optional URL within contextual help content like a 'Learn more' link."
|
|
128
149
|
},
|
|
129
|
-
"popoverCrossOffset": {
|
|
130
|
-
|
|
150
|
+
"popoverCrossOffset": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"default": 0
|
|
153
|
+
},
|
|
154
|
+
"containerPadding": {
|
|
155
|
+
"type": "number",
|
|
156
|
+
"default": 8
|
|
157
|
+
}
|
|
131
158
|
},
|
|
132
159
|
"states": [
|
|
133
|
-
{
|
|
134
|
-
|
|
135
|
-
|
|
160
|
+
{
|
|
161
|
+
"name": "down",
|
|
162
|
+
"trigger": "interaction"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "open",
|
|
166
|
+
"trigger": "prop"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "keyboard-focus",
|
|
170
|
+
"trigger": "interaction"
|
|
171
|
+
}
|
|
136
172
|
],
|
|
137
|
-
"lifecycle": {
|
|
173
|
+
"lifecycle": {
|
|
174
|
+
"introduced": "1.0.0-draft"
|
|
175
|
+
},
|
|
138
176
|
"accessibility": {
|
|
139
177
|
"intents": ["trigger"],
|
|
140
178
|
"focusable": true,
|
|
141
179
|
"keyboardIntents": ["activate"],
|
|
142
180
|
"wcag": [
|
|
143
|
-
{
|
|
144
|
-
|
|
181
|
+
{
|
|
182
|
+
"criterion": "2.1.1",
|
|
183
|
+
"level": "A",
|
|
184
|
+
"title": "Keyboard"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"criterion": "4.1.2",
|
|
188
|
+
"level": "A",
|
|
189
|
+
"title": "Name, Role, Value"
|
|
190
|
+
}
|
|
145
191
|
]
|
|
146
192
|
}
|
|
147
193
|
}
|
|
@@ -9,5 +9,12 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/date-field/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "DateField",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"lifecycle": { "introduced": "1.0.0-draft" }
|
|
13
20
|
}
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/date-picker/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "DatePicker",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,39 +23,91 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
26
|
+
"content": "Date pickers allow selection of a single date or a date range. They include a calendar within a popover, with optional manual entry. Date range variants support selecting a start and end date in one field."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "guideline",
|
|
30
|
+
"content": "Calendar popover displays a grid of days spanning one, two, or three months, enabling users to select a single date or a range."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "guideline",
|
|
34
|
+
"content": "Date field allows users to enter and edit date values. Users can edit each part of a date value, such as the day, month, and year, by interacting with individual segments. A date field includes a label, segments for each value of the date, and an in-field button to allow the user to open the calendar popover."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "guideline",
|
|
38
|
+
"content": "The range of days the user has selected (a start date and an end date)."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "guideline",
|
|
42
|
+
"content": "The selected date allows a user to see which date they have selected within the calendar popover."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "guideline",
|
|
46
|
+
"content": "A single date picker only displays a single date within the date field as well as a single month within the calendar popover."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "guideline",
|
|
50
|
+
"content": "A double date picker displays a date range within the date field as well as two consecutive months within the calendar popover."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "guideline",
|
|
54
|
+
"content": "A triple date picker displays a date range within the date field as well as three consecutive months within the calendar popover."
|
|
20
55
|
},
|
|
21
56
|
{
|
|
22
57
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
58
|
+
"content": "The calendar popover is displayed or hidden when the user selects the in-field button (the calendar icon)."
|
|
24
59
|
},
|
|
25
60
|
{
|
|
26
61
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
62
|
+
"content": "If a user selects a day preceding the first selection, that earlier day becomes the start of the range. For example:"
|
|
28
63
|
},
|
|
29
64
|
{
|
|
30
65
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
66
|
+
"content": "A third selection resets the range. For example:"
|
|
32
67
|
},
|
|
33
68
|
{
|
|
34
69
|
"type": "guideline",
|
|
35
|
-
"content": "Date
|
|
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."
|
|
36
71
|
},
|
|
37
72
|
{
|
|
38
73
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
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."
|
|
40
75
|
},
|
|
41
76
|
{
|
|
42
77
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
78
|
+
"content": "Date pickers can be used to select a single date or a date range (a start date and an end date)."
|
|
44
79
|
},
|
|
45
80
|
{
|
|
46
81
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
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."
|
|
48
83
|
},
|
|
49
84
|
{
|
|
50
85
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
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."
|
|
52
111
|
}
|
|
53
112
|
],
|
|
54
113
|
"options": {
|
|
@@ -57,9 +116,15 @@
|
|
|
57
116
|
"default": "single",
|
|
58
117
|
"description": "Controls the number of months displayed in the calendar popover.",
|
|
59
118
|
"values": [
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
119
|
+
{
|
|
120
|
+
"value": "single"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"value": "double"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"value": "triple"
|
|
127
|
+
}
|
|
63
128
|
]
|
|
64
129
|
},
|
|
65
130
|
"selectedDate": {
|
|
@@ -70,8 +135,14 @@
|
|
|
70
135
|
"type": "object",
|
|
71
136
|
"description": "The currently selected date range, used when selectionMode is range.",
|
|
72
137
|
"properties": {
|
|
73
|
-
"start": {
|
|
74
|
-
|
|
138
|
+
"start": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "Range start date."
|
|
141
|
+
},
|
|
142
|
+
"end": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Range end date."
|
|
145
|
+
}
|
|
75
146
|
}
|
|
76
147
|
},
|
|
77
148
|
"dateField": {
|
|
@@ -87,10 +158,22 @@
|
|
|
87
158
|
"enum": ["top", "side"],
|
|
88
159
|
"default": "top"
|
|
89
160
|
},
|
|
90
|
-
"hideLabel": {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
161
|
+
"hideLabel": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"default": false
|
|
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
|
+
},
|
|
94
177
|
"isError": {
|
|
95
178
|
"type": "boolean",
|
|
96
179
|
"default": false,
|
|
@@ -115,7 +198,10 @@
|
|
|
115
198
|
"type": "object",
|
|
116
199
|
"description": "Configuration for the calendar popover.",
|
|
117
200
|
"properties": {
|
|
118
|
-
"isDisabled": {
|
|
201
|
+
"isDisabled": {
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"default": false
|
|
204
|
+
},
|
|
119
205
|
"minValue": {
|
|
120
206
|
"type": "string",
|
|
121
207
|
"description": "The minimum allowed date that a user may select."
|
|
@@ -180,9 +266,14 @@
|
|
|
180
266
|
}
|
|
181
267
|
}
|
|
182
268
|
},
|
|
183
|
-
"lifecycle": {
|
|
269
|
+
"lifecycle": {
|
|
270
|
+
"introduced": "1.0.0-draft"
|
|
271
|
+
},
|
|
184
272
|
"tokenBindings": [
|
|
185
|
-
{
|
|
273
|
+
{
|
|
274
|
+
"token": "strikethrough-day-thickness",
|
|
275
|
+
"context": "Strikethrough day "
|
|
276
|
+
},
|
|
186
277
|
{
|
|
187
278
|
"token": "date-picker-text-to-in-field-button",
|
|
188
279
|
"context": "Spacing (value to in-field button)"
|
|
@@ -193,9 +284,21 @@
|
|
|
193
284
|
"focusable": true,
|
|
194
285
|
"keyboardIntents": ["navigate-items", "activate"],
|
|
195
286
|
"wcag": [
|
|
196
|
-
{
|
|
197
|
-
|
|
198
|
-
|
|
287
|
+
{
|
|
288
|
+
"criterion": "1.3.1",
|
|
289
|
+
"level": "A",
|
|
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
|
+
}
|
|
199
302
|
]
|
|
200
303
|
}
|
|
201
304
|
}
|
package/components/divider.json
CHANGED
|
@@ -9,6 +9,19 @@
|
|
|
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
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -22,28 +35,41 @@
|
|
|
22
35
|
"type": "do-dont",
|
|
23
36
|
"content": "Don't overuse dividers",
|
|
24
37
|
"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, AAAThere is no flashing content or unnecessary motion or animation in this component."
|
|
33
38
|
}
|
|
34
39
|
],
|
|
35
40
|
"options": {
|
|
36
41
|
"size": {
|
|
37
42
|
"type": "string",
|
|
38
43
|
"default": "s",
|
|
39
|
-
"values": [
|
|
44
|
+
"values": [
|
|
45
|
+
{
|
|
46
|
+
"value": "s"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"value": "m"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"value": "l"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
40
55
|
},
|
|
41
56
|
"orientation": {
|
|
42
57
|
"type": "string",
|
|
43
58
|
"default": "horizontal",
|
|
44
|
-
"values": [
|
|
59
|
+
"values": [
|
|
60
|
+
{
|
|
61
|
+
"value": "horizontal"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"value": "vertical"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
45
67
|
}
|
|
46
68
|
},
|
|
47
|
-
"lifecycle": {
|
|
48
|
-
|
|
69
|
+
"lifecycle": {
|
|
70
|
+
"introduced": "1.0.0-draft"
|
|
71
|
+
},
|
|
72
|
+
"accessibility": {
|
|
73
|
+
"focusable": false
|
|
74
|
+
}
|
|
49
75
|
}
|