@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": "status",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/status-light/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "StatusLight",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "StatusLight",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/status-light",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-status-light."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
@@ -29,160 +16,91 @@
|
|
|
29
16
|
},
|
|
30
17
|
{
|
|
31
18
|
"type": "guideline",
|
|
32
|
-
"content": "
|
|
19
|
+
"content": "Text overflow.\n\nWhen the text is too long for the horizontal space available, it wraps to form another line."
|
|
33
20
|
},
|
|
34
21
|
{
|
|
35
22
|
"type": "guideline",
|
|
36
|
-
"content": "
|
|
23
|
+
"content": "Use the appropriate variation.\n\nSemantic status lights should never be used for color coding categories or labels, and vice versa."
|
|
37
24
|
},
|
|
38
25
|
{
|
|
39
26
|
"type": "guideline",
|
|
40
|
-
"content": "
|
|
27
|
+
"content": "Status light text.\n\nA status light should always include a label with text that clearly communicates about the kind of status being shown. Do not change the text color to match the dot."
|
|
41
28
|
},
|
|
42
29
|
{
|
|
43
30
|
"type": "guideline",
|
|
44
|
-
"content": "
|
|
31
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the status light is mirrored. The dot is placed on the right side of the text."
|
|
45
32
|
},
|
|
46
33
|
{
|
|
47
34
|
"type": "guideline",
|
|
48
|
-
"content": "
|
|
35
|
+
"content": "Cursor Description Default (Arrow) Use the default cursor for non-interactive components like status light."
|
|
49
36
|
},
|
|
50
37
|
{
|
|
51
38
|
"type": "guideline",
|
|
52
|
-
"content": "
|
|
53
|
-
}
|
|
39
|
+
"content": "Any 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 Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Status lights should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role should be utilized. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in status lights. While color is used to reinforce their meaning, every status light also includes a clear text label that communicates the status. 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. 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 the status light dot has 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 wrapped. 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."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"implementations": [
|
|
54
43
|
{
|
|
55
|
-
"
|
|
56
|
-
"
|
|
44
|
+
"platform": "web",
|
|
45
|
+
"componentName": "StatusLight",
|
|
46
|
+
"package": "@react-spectrum/s2"
|
|
57
47
|
},
|
|
58
48
|
{
|
|
59
|
-
"
|
|
60
|
-
"
|
|
49
|
+
"platform": "web",
|
|
50
|
+
"componentName": "StatusLight",
|
|
51
|
+
"importPath": "@adobe/spectrum-wc/components/status-light",
|
|
52
|
+
"notes": "Spectrum 2 web component custom element: swc-status-light."
|
|
61
53
|
}
|
|
62
54
|
],
|
|
63
55
|
"options": {
|
|
64
|
-
"label": {
|
|
65
|
-
"type": "string"
|
|
66
|
-
},
|
|
56
|
+
"label": { "type": "string" },
|
|
67
57
|
"variant": {
|
|
68
58
|
"type": "string",
|
|
69
59
|
"default": "informative",
|
|
70
60
|
"values": [
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"value": "yellow"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"value": "magenta"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"value": "fuchsia"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"value": "purple"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"value": "seafoam"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"value": "pink"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"value": "turquoise"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"value": "cinnamon"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"value": "brown"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"value": "silver"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"value": "gray"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"value": "red"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"value": "orange"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"value": "green"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"value": "cyan"
|
|
139
|
-
}
|
|
61
|
+
{ "value": "informative" },
|
|
62
|
+
{ "value": "neutral" },
|
|
63
|
+
{ "value": "positive" },
|
|
64
|
+
{ "value": "notice" },
|
|
65
|
+
{ "value": "negative" },
|
|
66
|
+
{ "value": "indigo" },
|
|
67
|
+
{ "value": "celery" },
|
|
68
|
+
{ "value": "chartreuse" },
|
|
69
|
+
{ "value": "yellow" },
|
|
70
|
+
{ "value": "magenta" },
|
|
71
|
+
{ "value": "fuchsia" },
|
|
72
|
+
{ "value": "purple" },
|
|
73
|
+
{ "value": "seafoam" },
|
|
74
|
+
{ "value": "pink" },
|
|
75
|
+
{ "value": "turquoise" },
|
|
76
|
+
{ "value": "cinnamon" },
|
|
77
|
+
{ "value": "brown" },
|
|
78
|
+
{ "value": "silver" },
|
|
79
|
+
{ "value": "gray" },
|
|
80
|
+
{ "value": "red" },
|
|
81
|
+
{ "value": "orange" },
|
|
82
|
+
{ "value": "green" },
|
|
83
|
+
{ "value": "cyan" }
|
|
140
84
|
]
|
|
141
85
|
},
|
|
142
86
|
"size": {
|
|
143
87
|
"type": "string",
|
|
144
88
|
"default": "m",
|
|
145
89
|
"values": [
|
|
146
|
-
{
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"value": "m"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"value": "l"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"value": "xl"
|
|
157
|
-
}
|
|
90
|
+
{ "value": "s" },
|
|
91
|
+
{ "value": "m" },
|
|
92
|
+
{ "value": "l" },
|
|
93
|
+
{ "value": "xl" }
|
|
158
94
|
]
|
|
159
95
|
}
|
|
160
96
|
},
|
|
161
97
|
"anatomy": [
|
|
162
|
-
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"name": "visual-100",
|
|
168
|
-
"description": "Severity dot, 100 size variant."
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "visual-200",
|
|
172
|
-
"description": "Severity dot, 200 size variant."
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"name": "visual-300",
|
|
176
|
-
"description": "Severity dot, 300 size variant."
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"name": "dot"
|
|
180
|
-
}
|
|
98
|
+
{ "name": "visual-75", "description": "Severity dot, 75 size variant." },
|
|
99
|
+
{ "name": "visual-100", "description": "Severity dot, 100 size variant." },
|
|
100
|
+
{ "name": "visual-200", "description": "Severity dot, 200 size variant." },
|
|
101
|
+
{ "name": "visual-300", "description": "Severity dot, 300 size variant." },
|
|
102
|
+
{ "name": "dot" }
|
|
181
103
|
],
|
|
182
|
-
"lifecycle": {
|
|
183
|
-
|
|
184
|
-
},
|
|
185
|
-
"accessibility": {
|
|
186
|
-
"focusable": false
|
|
187
|
-
}
|
|
104
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
105
|
+
"accessibility": { "focusable": false }
|
|
188
106
|
}
|
package/components/steplist.json
CHANGED
|
@@ -51,14 +51,7 @@
|
|
|
51
51
|
"orientation": {
|
|
52
52
|
"type": "string",
|
|
53
53
|
"default": "horizontal",
|
|
54
|
-
"values": [
|
|
55
|
-
{
|
|
56
|
-
"value": "horizontal"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"value": "vertical"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
54
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
62
55
|
},
|
|
63
56
|
"items": {
|
|
64
57
|
"type": "array",
|
|
@@ -100,28 +93,16 @@
|
|
|
100
93
|
"name": "track-size",
|
|
101
94
|
"description": "The connecting track between steps."
|
|
102
95
|
},
|
|
103
|
-
{
|
|
104
|
-
"name": "track"
|
|
105
|
-
}
|
|
96
|
+
{ "name": "track" }
|
|
106
97
|
],
|
|
107
|
-
"lifecycle": {
|
|
108
|
-
"introduced": "1.0.0-draft"
|
|
109
|
-
},
|
|
98
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
110
99
|
"accessibility": {
|
|
111
100
|
"intents": ["navigate"],
|
|
112
101
|
"focusable": true,
|
|
113
102
|
"keyboardIntents": ["navigate-items", "activate"],
|
|
114
103
|
"wcag": [
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
"level": "A",
|
|
118
|
-
"title": "Keyboard"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"criterion": "4.1.2",
|
|
122
|
-
"level": "A",
|
|
123
|
-
"title": "Name, Role, Value"
|
|
124
|
-
}
|
|
104
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
105
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
125
106
|
]
|
|
126
107
|
}
|
|
127
108
|
}
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Border only for low-contrast swatches.\n\nIt's important for users to compare colors when they're displayed in a swatch group. Because of this, swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself. This reduces the likelihood of the UI interfering with color perception and comparisons."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Corner rounding in swatch groups.\n\nA corner rounding of none should be used in a swatch group in order to help minimize the Hermann grid illusion that happens at the intersections of the white space within the group. The only exception is when a swatch group only takes up a single row. In that case, use any of the rounding options: none, partial rounding, or full rounding."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto the swatch or swatch group. Arrow keys Moves focus through the swatches in the group."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Cursor guidelines.\n\nCursor Description Pointer Use the pointer cursor for all interactive elements in every state."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"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 must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, 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 Swatch groups should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized, so the grouping relationship between swatches and the selected state are programmatically conveyed. Use of color 1.4.1 A This criterion requires that color not be the only method of communicating information. In swatches, the color itself is the content being presented, not a cue that conveys additional meaning. 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."
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"options": {
|
|
@@ -40,51 +40,27 @@
|
|
|
40
40
|
"type": "string",
|
|
41
41
|
"default": "m",
|
|
42
42
|
"values": [
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"value": "s"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"value": "m"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"value": "l"
|
|
54
|
-
}
|
|
43
|
+
{ "value": "xs" },
|
|
44
|
+
{ "value": "s" },
|
|
45
|
+
{ "value": "m" },
|
|
46
|
+
{ "value": "l" }
|
|
55
47
|
]
|
|
56
48
|
},
|
|
57
49
|
"density": {
|
|
58
50
|
"type": "string",
|
|
59
51
|
"default": "regular",
|
|
60
52
|
"values": [
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
{
|
|
65
|
-
"value": "regular"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"value": "spacious"
|
|
69
|
-
}
|
|
53
|
+
{ "value": "compact" },
|
|
54
|
+
{ "value": "regular" },
|
|
55
|
+
{ "value": "spacious" }
|
|
70
56
|
]
|
|
71
57
|
},
|
|
72
|
-
"enableSelection": {
|
|
73
|
-
"type": "boolean",
|
|
74
|
-
"default": false
|
|
75
|
-
},
|
|
58
|
+
"enableSelection": { "type": "boolean", "default": false },
|
|
76
59
|
"selectionMode": {
|
|
77
60
|
"type": "string",
|
|
78
61
|
"description": "Only applicable if selection is enabled.",
|
|
79
62
|
"default": "single",
|
|
80
|
-
"values": [
|
|
81
|
-
{
|
|
82
|
-
"value": "single"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"value": "multiple"
|
|
86
|
-
}
|
|
87
|
-
]
|
|
63
|
+
"values": [{ "value": "single" }, { "value": "multiple" }]
|
|
88
64
|
},
|
|
89
65
|
"allowsEmptySelection": {
|
|
90
66
|
"type": "boolean",
|
|
@@ -96,31 +72,19 @@
|
|
|
96
72
|
"default": "none",
|
|
97
73
|
"description": "Determines the corner radius of each swatch in the group. Partial refers to corner-radius-75.",
|
|
98
74
|
"values": [
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
{
|
|
103
|
-
"value": "full"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"value": "partial"
|
|
107
|
-
}
|
|
75
|
+
{ "value": "none" },
|
|
76
|
+
{ "value": "full" },
|
|
77
|
+
{ "value": "partial" }
|
|
108
78
|
]
|
|
109
79
|
}
|
|
110
80
|
},
|
|
111
|
-
"lifecycle": {
|
|
112
|
-
"introduced": "1.0.0-draft"
|
|
113
|
-
},
|
|
81
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
114
82
|
"accessibility": {
|
|
115
83
|
"role": "group",
|
|
116
84
|
"intents": ["choose"],
|
|
117
85
|
"focusable": false,
|
|
118
86
|
"wcag": [
|
|
119
|
-
{
|
|
120
|
-
"criterion": "4.1.2",
|
|
121
|
-
"level": "A",
|
|
122
|
-
"title": "Name, Role, Value"
|
|
123
|
-
}
|
|
87
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
124
88
|
]
|
|
125
89
|
}
|
|
126
90
|
}
|
package/components/swatch.json
CHANGED
|
@@ -16,31 +16,27 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Keyboard focus.\n\nA swatch can be navigated using a keyboard. The keyboard focus state adds a blue ring to the swatch in focus."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Mixed value.\n\nWhen a swatch represents multiple values that are not identical, the preview shows a gray fill and a dash UI icon."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Hide unavailable swatches when possible.\n\nEven though swatches can have a disabled state, hiding unavailable swatches reduces visual clutter and eases cognitive load. Only show disabled swatches if hiding them would cause confusion to your users."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the swatch group. Focus moves to the first swatch in the group. Space or Enter Triggers an action or selects the swatch when selection is enabled. The focus remains on the swatch, unless the swatch opens or closes the current container. In this case, the focus moves to the target or back to the caller."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Cursor guidelines.\n\nCursor Description Pointer Use the pointer cursor for all interactive elements in every state."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "A
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "guideline",
|
|
43
|
-
"content": "Even though swatches can have a disabled state, hiding unavailable swatches reduces visual clutter and eases cognitive load. Only show disabled swatches if hiding them would cause confusion to your users."
|
|
39
|
+
"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 must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, 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 Swatch groups should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized, so the grouping relationship between swatches and the selected state are programmatically conveyed. Use of color 1.4.1 A This criterion requires that color not be the only method of communicating information. In swatches, the color itself is the content being presented, not a cue that conveys additional meaning. 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."
|
|
44
40
|
}
|
|
45
41
|
],
|
|
46
42
|
"options": {
|
|
@@ -52,102 +48,51 @@
|
|
|
52
48
|
"type": "string",
|
|
53
49
|
"default": "m",
|
|
54
50
|
"values": [
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"value": "s"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"value": "m"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"value": "l"
|
|
66
|
-
}
|
|
51
|
+
{ "value": "xs" },
|
|
52
|
+
{ "value": "s" },
|
|
53
|
+
{ "value": "m" },
|
|
54
|
+
{ "value": "l" }
|
|
67
55
|
]
|
|
68
56
|
},
|
|
69
57
|
"shape": {
|
|
70
58
|
"type": "string",
|
|
71
59
|
"default": "square",
|
|
72
|
-
"values": [
|
|
73
|
-
{
|
|
74
|
-
"value": "square"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"value": "rectangle"
|
|
78
|
-
}
|
|
79
|
-
]
|
|
60
|
+
"values": [{ "value": "square" }, { "value": "rectangle" }]
|
|
80
61
|
},
|
|
81
62
|
"cornerRounding": {
|
|
82
63
|
"type": "string",
|
|
83
64
|
"default": "none",
|
|
84
65
|
"description": "Determines the corner radius of the swatch. Partial refers to corner-radius-75.",
|
|
85
66
|
"values": [
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
{
|
|
90
|
-
"value": "partial"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"value": "full"
|
|
94
|
-
}
|
|
67
|
+
{ "value": "none" },
|
|
68
|
+
{ "value": "partial" },
|
|
69
|
+
{ "value": "full" }
|
|
95
70
|
]
|
|
96
71
|
},
|
|
97
|
-
"isSelected": {
|
|
98
|
-
|
|
99
|
-
"default": false
|
|
100
|
-
},
|
|
101
|
-
"isDisabled": {
|
|
102
|
-
"type": "boolean",
|
|
103
|
-
"default": false
|
|
104
|
-
}
|
|
72
|
+
"isSelected": { "type": "boolean", "default": false },
|
|
73
|
+
"isDisabled": { "type": "boolean", "default": false }
|
|
105
74
|
},
|
|
106
75
|
"anatomy": [
|
|
107
76
|
{
|
|
108
77
|
"name": "slash",
|
|
109
78
|
"description": "Diagonal slash indicating an empty or \"none\" swatch."
|
|
110
79
|
},
|
|
111
|
-
{
|
|
112
|
-
"name": "icon"
|
|
113
|
-
}
|
|
80
|
+
{ "name": "icon" }
|
|
114
81
|
],
|
|
115
82
|
"states": [
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
{
|
|
121
|
-
"name": "down",
|
|
122
|
-
"trigger": "interaction"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"name": "keyboard-focus",
|
|
126
|
-
"trigger": "interaction"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "disabled",
|
|
130
|
-
"trigger": "prop"
|
|
131
|
-
}
|
|
83
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
84
|
+
{ "name": "down", "trigger": "interaction" },
|
|
85
|
+
{ "name": "keyboard-focus", "trigger": "interaction" },
|
|
86
|
+
{ "name": "disabled", "trigger": "prop" }
|
|
132
87
|
],
|
|
133
|
-
"lifecycle": {
|
|
134
|
-
"introduced": "1.0.0-draft"
|
|
135
|
-
},
|
|
88
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
136
89
|
"accessibility": {
|
|
137
90
|
"intents": ["choose"],
|
|
138
91
|
"focusable": true,
|
|
139
92
|
"keyboardIntents": ["activate"],
|
|
140
93
|
"wcag": [
|
|
141
|
-
{
|
|
142
|
-
|
|
143
|
-
"level": "A",
|
|
144
|
-
"title": "Keyboard"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"criterion": "4.1.2",
|
|
148
|
-
"level": "A",
|
|
149
|
-
"title": "Name, Role, Value"
|
|
150
|
-
}
|
|
94
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
95
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
151
96
|
]
|
|
152
97
|
}
|
|
153
98
|
}
|