@adobe/spectrum-design-data 3.3.0-beta.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion.json +67 -15
- package/components/action-bar.json +30 -9
- package/components/action-button.json +92 -39
- package/components/action-group.json +137 -18
- package/components/alert-banner.json +27 -8
- package/components/alert-dialog.json +55 -34
- package/components/avatar-group.json +35 -9
- package/components/avatar.json +105 -29
- package/components/badge.json +163 -56
- package/components/breadcrumbs.json +107 -26
- package/components/button-group.json +63 -19
- package/components/button.json +105 -61
- package/components/calendar.json +74 -8
- package/components/card.json +13 -0
- package/components/cards.json +46 -31
- package/components/checkbox-group.json +85 -16
- package/components/checkbox.json +97 -27
- package/components/close-button.json +75 -20
- package/components/coach-indicator.json +44 -14
- package/components/coach-mark.json +26 -8
- package/components/color-area.json +100 -20
- package/components/color-handle.json +46 -25
- package/components/color-loupe.json +14 -2
- package/components/color-slider.json +129 -26
- package/components/color-wheel.json +91 -17
- package/components/combo-box.json +189 -50
- package/components/contextual-help.json +126 -80
- package/components/date-field.json +7 -0
- package/components/date-picker.json +127 -24
- package/components/divider.json +38 -12
- package/components/drop-zone.json +37 -18
- package/components/field-label.json +62 -21
- package/components/heading.json +7 -0
- package/components/help-text.json +53 -16
- package/components/illustrated-message.json +85 -21
- package/components/in-line-alert.json +53 -13
- package/components/link.json +63 -24
- package/components/list-view.json +80 -15
- package/components/menu.json +181 -45
- package/components/meter.json +78 -24
- package/components/number-field.json +175 -34
- package/components/picker.json +188 -42
- package/components/popover.json +126 -37
- package/components/progress-bar.json +108 -23
- package/components/progress-circle.json +55 -12
- package/components/radio-button.json +67 -14
- package/components/radio-group.json +132 -28
- package/components/rating.json +38 -9
- package/components/search-field.json +126 -34
- package/components/segmented-control.json +70 -21
- package/components/select-box.json +103 -29
- package/components/side-navigation.json +69 -28
- package/components/slider.json +155 -39
- package/components/standard-dialog.json +88 -16
- package/components/status-light.json +136 -41
- package/components/steplist.json +24 -5
- package/components/swatch-group.json +55 -19
- package/components/swatch.json +79 -24
- package/components/switch.json +79 -31
- package/components/table.json +73 -26
- package/components/tabs.json +52 -22
- package/components/tag-field.json +60 -14
- package/components/tag-group.json +56 -16
- package/components/tag.json +78 -21
- package/components/takeover-dialog.json +61 -10
- package/components/text-area.json +205 -49
- package/components/text-field.json +170 -42
- package/components/thumbnail.json +63 -22
- package/components/time-field.json +7 -0
- package/components/toast.json +50 -29
- package/components/tooltip.json +87 -27
- package/components/tree-view.json +147 -45
- package/components/user-card.json +7 -0
- package/guidelines/app-frame-content-area.json +81 -0
- package/guidelines/app-frame-creating-bluelines.json +58 -0
- package/guidelines/app-frame-header.json +72 -0
- package/guidelines/app-frame-overview.json +50 -44
- package/guidelines/app-frame-side-navigation.json +138 -0
- package/guidelines/attention-hierarchy.json +21 -12
- package/guidelines/background-layers.json +10 -44
- package/guidelines/brand.json +10 -30
- package/guidelines/colors.json +17 -35
- package/guidelines/containers.json +62 -0
- package/guidelines/developer-overview.json +9 -25
- package/guidelines/faqs.json +9 -96
- package/guidelines/fonts.json +14 -29
- package/guidelines/grays.json +44 -17
- package/guidelines/icon-fundamentals.json +18 -7
- package/guidelines/illustrations.json +111 -0
- package/guidelines/introduction.json +2 -2
- package/guidelines/manifest.json +60 -252
- package/guidelines/motion.json +16 -17
- package/guidelines/object-styles.json +102 -0
- package/guidelines/principles.json +2 -2
- package/guidelines/resources.json +15 -21
- package/guidelines/spacing.json +25 -0
- package/guidelines/states.json +10 -15
- package/guidelines/typography-fundamentals.json +142 -0
- package/guidelines/using-icons.json +44 -33
- package/package.json +2 -2
- package/registry/platform-implementations.json +30 -0
- package/guidelines/ai-resource-guide.json +0 -50
- package/guidelines/applying-the-type-system.json +0 -63
- package/guidelines/bi-directionality.json +0 -57
- package/guidelines/border-width.json +0 -42
- package/guidelines/cognitive.json +0 -197
- package/guidelines/component-spacing.json +0 -49
- package/guidelines/contact-us.json +0 -67
- package/guidelines/content-area-browsing-context.json +0 -65
- package/guidelines/creating-bluelines-browsing-context.json +0 -91
- package/guidelines/design-tokens.json +0 -122
- package/guidelines/drop-shadow.json +0 -56
- package/guidelines/grammar-and-mechanics.json +0 -252
- package/guidelines/header-browsing-context.json +0 -37
- package/guidelines/illustration.json +0 -109
- package/guidelines/in-product-word-list.json +0 -29
- package/guidelines/inclusive-design.json +0 -93
- package/guidelines/inclusive-ux-writing.json +0 -30
- package/guidelines/internationalization.json +0 -87
- package/guidelines/layout-and-structure-containers.json +0 -47
- package/guidelines/layout-spacing.json +0 -39
- package/guidelines/object-styles-overview.json +0 -17
- package/guidelines/rounding.json +0 -61
- package/guidelines/side-navigation-browsing-context.json +0 -71
- package/guidelines/spacing-overview.json +0 -45
- package/guidelines/typography-overview.json +0 -39
- package/guidelines/typography-system.json +0 -168
- package/guidelines/visual-language-containers.json +0 -36
- package/guidelines/voice-and-tone.json +0 -47
- package/guidelines/writing-about-people.json +0 -103
- package/guidelines/writing-for-errors.json +0 -120
- package/guidelines/writing-for-onboarding.json +0 -119
- package/guidelines/writing-for-readability.json +0 -54
- package/guidelines/writing-with-visuals.json +0 -70
- package/registry/platform-extensions/web-components-states.json +0 -58
package/components/cards.json
CHANGED
|
@@ -16,62 +16,55 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Cards group related content and actions into flexible containers for browsing. They preview key information and reveal more detail on interaction."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Card preview areas have a maximum image height aspect ratio of 3:4, and a minimum height aspect ratio of of 4:1."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "If the card has a fixed height, such as in a tile grid, long titles will be truncated. Use short titles to avoid this. In layouts with variable height, like a waterfall grid, titles will wrap to fit."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Cards, by definition, should have some form of interaction such as viewing, editing, purchasing, etc. Some actions are exposed in buttons, and others simply occur by clicking the card."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "If a card only has an ability to be opened or viewed in more detail, do not include a button. Clicking anywhere on the card should perform that action."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "If a card has other interactive elements such as a hidden actions menu or an avatar, but no buttons, the whole card (outside of those elements) should be clickable."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
43
|
+
"content": "If there’s only one action (that’s not opening or viewing the card), use a button to communicate that action. If there are two or more available actions, and one of those actions is to open or view the card, use a button to communicate “View” or “Open,” instead of relying on clicking on the card."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"type": "
|
|
47
|
-
"content": "
|
|
48
|
-
"dont": "Only standard cards can have a footer, and buttons can only appear inside a footer."
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"type": "do-dont",
|
|
52
|
-
"content": "Don't align individual cards to the column grid",
|
|
53
|
-
"dont": "Individual cards are not aligned to individual columns in the page's responsive column grid. Instead, groups of cards are aligned to the column grid in a layout region."
|
|
46
|
+
"type": "guideline",
|
|
47
|
+
"content": "If a standard card has a footer with a button, only the button is clickable. If a card has a preview, clicking the preview will open that card. When a preview is purely decorative, it is not clickable."
|
|
54
48
|
},
|
|
55
49
|
{
|
|
56
|
-
"type": "
|
|
57
|
-
"content": "
|
|
58
|
-
"dont": "If the preview is a video clip or other moving item, do not automatically play the clip or motion. Save the movement for either when a user hovers on the card or when they click on a play button."
|
|
50
|
+
"type": "guideline",
|
|
51
|
+
"content": "When a group of cards are loading, they follow the ghost loading convention. There are 5 phases for ghost loading:"
|
|
59
52
|
},
|
|
60
53
|
{
|
|
61
54
|
"type": "guideline",
|
|
62
|
-
"content": "
|
|
55
|
+
"content": "Cards are meant to just show a taste of the available information. Don’t overload cards with more information than necessary."
|
|
63
56
|
},
|
|
64
57
|
{
|
|
65
58
|
"type": "guideline",
|
|
66
|
-
"content": "
|
|
59
|
+
"content": "Only standard cards can have a footer, and buttons can only appear inside a footer."
|
|
67
60
|
},
|
|
68
61
|
{
|
|
69
62
|
"type": "guideline",
|
|
70
|
-
"content": "
|
|
63
|
+
"content": "Individual cards are not aligned to individual columns in the page's responsive column grid. Instead, groups of cards are aligned to the column grid in a layout region."
|
|
71
64
|
},
|
|
72
65
|
{
|
|
73
66
|
"type": "guideline",
|
|
74
|
-
"content": "
|
|
67
|
+
"content": "If the preview is a video clip or other moving item, do not automatically play the clip or motion. Save the movement for either when a user hovers on the card or when they click on a play button."
|
|
75
68
|
}
|
|
76
69
|
],
|
|
77
70
|
"options": {
|
|
@@ -80,23 +73,45 @@
|
|
|
80
73
|
"default": "asset",
|
|
81
74
|
"description": "Determines which card layout variant is used.",
|
|
82
75
|
"values": [
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
{
|
|
77
|
+
"value": "asset"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "collection"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "flex"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"value": "gallery"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"value": "horizontal"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": "product"
|
|
93
|
+
}
|
|
89
94
|
]
|
|
90
95
|
}
|
|
91
96
|
},
|
|
92
|
-
"lifecycle": {
|
|
97
|
+
"lifecycle": {
|
|
98
|
+
"introduced": "1.0.0-draft"
|
|
99
|
+
},
|
|
93
100
|
"accessibility": {
|
|
94
101
|
"intents": ["select"],
|
|
95
102
|
"focusable": true,
|
|
96
103
|
"keyboardIntents": ["activate"],
|
|
97
104
|
"wcag": [
|
|
98
|
-
{
|
|
99
|
-
|
|
105
|
+
{
|
|
106
|
+
"criterion": "2.1.1",
|
|
107
|
+
"level": "A",
|
|
108
|
+
"title": "Keyboard"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"criterion": "4.1.2",
|
|
112
|
+
"level": "A",
|
|
113
|
+
"title": "Name, Role, Value"
|
|
114
|
+
}
|
|
100
115
|
]
|
|
101
116
|
}
|
|
102
117
|
}
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/checkbox-group/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "CheckboxGroup",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,51 +23,113 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
26
|
+
"content": "When a description is present and an error is triggered, it is replaced with an error message. Once the error is resolved, the help text description reappears."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "guideline",
|
|
30
|
+
"content": "A checkbox group in a disabled state shows that a selection exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later. The field label, checkboxes, and help text are all displayed in a disabled state when the checkbox group is disabled."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "guideline",
|
|
34
|
+
"content": "Checkbox groups can be either horizontal or vertical. By default, checkbox groups are stacked vertically. Use a horizontal checkbox group when vertical space is limited."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "guideline",
|
|
38
|
+
"content": "Checkbox groups can be marked as optional or required, depending on the situation. Optional checkbox groups are either denoted with text added to the end of the label — “(optional)” — or have no indication at all."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "guideline",
|
|
42
|
+
"content": "For required checkbox groups, there are two necessity indicator options: a “(required)” label or an asterisk. If you use an asterisk, be sure to include help text to explain what the asterisk means."
|
|
20
43
|
},
|
|
21
44
|
{
|
|
22
45
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
46
|
+
"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."
|
|
24
47
|
},
|
|
25
48
|
{
|
|
26
49
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
50
|
+
"content": "Labels can be placed either on top or on the side. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
|
|
28
51
|
},
|
|
29
52
|
{
|
|
30
53
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
54
|
+
"content": "Checkbox groups should always have a label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These checkbox groups without a visible label should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
|
|
32
55
|
}
|
|
33
56
|
],
|
|
34
57
|
"options": {
|
|
35
|
-
"label": {
|
|
58
|
+
"label": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
36
61
|
"labelPosition": {
|
|
37
62
|
"type": "string",
|
|
38
63
|
"default": "top",
|
|
39
|
-
"values": [
|
|
64
|
+
"values": [
|
|
65
|
+
{
|
|
66
|
+
"value": "top"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"value": "side"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
40
72
|
},
|
|
41
73
|
"necessityIndicator": {
|
|
42
74
|
"type": "string",
|
|
43
75
|
"default": "icon",
|
|
44
|
-
"values": [
|
|
76
|
+
"values": [
|
|
77
|
+
{
|
|
78
|
+
"value": "text"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"value": "icon"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"isRequired": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false
|
|
45
88
|
},
|
|
46
|
-
"isRequired": { "type": "boolean", "default": false },
|
|
47
89
|
"orientation": {
|
|
48
90
|
"type": "string",
|
|
49
91
|
"default": "vertical",
|
|
50
|
-
"values": [
|
|
92
|
+
"values": [
|
|
93
|
+
{
|
|
94
|
+
"value": "horizontal"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"value": "vertical"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
51
100
|
},
|
|
52
|
-
"isError": {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
101
|
+
"isError": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": false
|
|
104
|
+
},
|
|
105
|
+
"isDisabled": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": false
|
|
108
|
+
},
|
|
109
|
+
"description": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"errorMessage": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"lifecycle": {
|
|
117
|
+
"introduced": "1.0.0-draft"
|
|
56
118
|
},
|
|
57
|
-
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
58
119
|
"accessibility": {
|
|
59
120
|
"intents": ["choose"],
|
|
60
121
|
"focusable": false,
|
|
61
122
|
"wcag": [
|
|
62
|
-
{
|
|
63
|
-
|
|
123
|
+
{
|
|
124
|
+
"criterion": "1.3.1",
|
|
125
|
+
"level": "A",
|
|
126
|
+
"title": "Info and Relationships"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"criterion": "4.1.2",
|
|
130
|
+
"level": "A",
|
|
131
|
+
"title": "Name, Role, Value"
|
|
132
|
+
}
|
|
64
133
|
]
|
|
65
134
|
}
|
|
66
135
|
}
|
package/components/checkbox.json
CHANGED
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"category": "inputs",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/checkbox/"
|
|
11
11
|
},
|
|
12
|
+
"implementations": [
|
|
13
|
+
{
|
|
14
|
+
"platform": "web",
|
|
15
|
+
"componentName": "Checkbox",
|
|
16
|
+
"package": "@react-spectrum/s2"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
12
19
|
"documentBlocks": [
|
|
13
20
|
{
|
|
14
21
|
"type": "purpose",
|
|
@@ -16,51 +23,71 @@
|
|
|
16
23
|
},
|
|
17
24
|
{
|
|
18
25
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
26
|
+
"content": "Checkboxes support selecting one or more items from a list. Each item can be selected independently or in combination with others."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "guideline",
|
|
30
|
+
"content": "Checkboxes can be marked as having an error to show that a selection needs to be made in order to move forward, or that a selection that was made is invalid. For example, in a form that requires a user to acknowledge legal terms before proceeding, the checkbox would show an unchecked error to communicate that it needs to be selected."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "guideline",
|
|
34
|
+
"content": "A checkbox in a disabled state shows that a selection exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later."
|
|
20
35
|
},
|
|
21
36
|
{
|
|
22
37
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
38
|
+
"content": "By default, checkboxes are not emphasized (gray). This version is optimal for when the checkbox is not the core part of an interface, such as in application panels, where all visual components are monochrome in order to direct focus to the content."
|
|
24
39
|
},
|
|
25
40
|
{
|
|
26
41
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
42
|
+
"content": "The emphasized (blue) version provides a visual prominence that is optimal for forms, settings, lists or grids of assets, and other situations where a checkbox need to be noticed."
|
|
28
43
|
},
|
|
29
44
|
{
|
|
30
45
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
46
|
+
"content": "Checkboxes come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
|
|
32
47
|
},
|
|
33
48
|
{
|
|
34
49
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
50
|
+
"content": "Checkboxes can be in an indeterminate state when they represent both selected and not selected values."
|
|
36
51
|
},
|
|
37
52
|
{
|
|
38
53
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
54
|
+
"content": "Checkboxes can be selected or not selected."
|
|
40
55
|
},
|
|
41
56
|
{
|
|
42
57
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
58
|
+
"content": "Checkboxes should always have a label. When the label is not defined, a checkbox becomes standalone. Standalone checkboxes are only used when their connection to other components is clear and they give sufficient context — for example, in application panels."
|
|
44
59
|
},
|
|
45
60
|
{
|
|
46
61
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
62
|
+
"content": "A checkbox can be navigated using a keyboard. The keyboard focus state takes the checkbox’s visual hover state and adds a blue ring to the checkbox in focus."
|
|
48
63
|
},
|
|
49
64
|
{
|
|
50
65
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
66
|
+
"content": "When the label is too long for the horizontal space available, it wraps to form another line."
|
|
52
67
|
},
|
|
53
68
|
{
|
|
54
69
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
70
|
+
"content": "Emphasized checkboxes are optimal for forms, settings, etc. where the checkboxes need to be noticed, or to bring attention to selected items such as cards or table rows. Not emphasized checkboxes are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
|
|
56
71
|
},
|
|
57
72
|
{
|
|
58
73
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
74
|
+
"content": "Standalone checkboxes should be used in situations where the context is clear without an associated text label. An example of this would be when a checkbox is connected to other controls inside of a panel."
|
|
60
75
|
},
|
|
61
76
|
{
|
|
62
77
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
78
|
+
"content": "Checkboxes and radio buttons are not interchangeable. A set of checkboxes should be used to select as many options as desired (or none). A set of radio buttons should be used to select only a single option from a list of mutually exclusive options."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "guideline",
|
|
82
|
+
"content": "Use checkboxes to show selection, such as choosing multiple table rows. Use switches to show activation, like turning a setting on or off. Unlike switches, checkboxes can display an error state."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "guideline",
|
|
86
|
+
"content": "Sets of checkboxes should always have a clear label that describes what the list of options represents and guides users what to do. This is important for accessibility, since a screen reader will read the label before each option."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "guideline",
|
|
90
|
+
"content": "When a checkbox represents multiple values that are not identical, the checkbox should appear in the indeterminate state. Any subsequent click or tap should select the checkbox, and update all values to be selected. Another click or tap after that should deselect the checkbox, and update all values to be not selected."
|
|
64
91
|
}
|
|
65
92
|
],
|
|
66
93
|
"options": {
|
|
@@ -68,7 +95,10 @@
|
|
|
68
95
|
"type": "string",
|
|
69
96
|
"description": "When the label is not defined, the checkbox appears as a standalone checkbox."
|
|
70
97
|
},
|
|
71
|
-
"isSelected": {
|
|
98
|
+
"isSelected": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"default": false
|
|
101
|
+
},
|
|
72
102
|
"isIndeterminate": {
|
|
73
103
|
"type": "boolean",
|
|
74
104
|
"default": false,
|
|
@@ -78,31 +108,71 @@
|
|
|
78
108
|
"type": "string",
|
|
79
109
|
"default": "m",
|
|
80
110
|
"values": [
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{
|
|
111
|
+
{
|
|
112
|
+
"value": "s"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"value": "m"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"value": "l"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "xl"
|
|
122
|
+
}
|
|
85
123
|
]
|
|
86
124
|
},
|
|
87
|
-
"isEmphasized": {
|
|
88
|
-
|
|
89
|
-
|
|
125
|
+
"isEmphasized": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"default": false
|
|
128
|
+
},
|
|
129
|
+
"isDisabled": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"default": false
|
|
132
|
+
},
|
|
133
|
+
"isError": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"default": false
|
|
136
|
+
}
|
|
90
137
|
},
|
|
91
138
|
"states": [
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
139
|
+
{
|
|
140
|
+
"name": "hover",
|
|
141
|
+
"trigger": "interaction"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "down",
|
|
145
|
+
"trigger": "interaction"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "keyboard-focus",
|
|
149
|
+
"trigger": "interaction"
|
|
150
|
+
}
|
|
95
151
|
],
|
|
96
|
-
"lifecycle": {
|
|
152
|
+
"lifecycle": {
|
|
153
|
+
"introduced": "1.0.0-draft"
|
|
154
|
+
},
|
|
97
155
|
"accessibility": {
|
|
98
156
|
"role": "checkbox",
|
|
99
157
|
"intents": ["choose"],
|
|
100
158
|
"focusable": true,
|
|
101
159
|
"keyboardIntents": ["activate"],
|
|
102
160
|
"wcag": [
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
161
|
+
{
|
|
162
|
+
"criterion": "1.3.1",
|
|
163
|
+
"level": "A",
|
|
164
|
+
"title": "Info and Relationships"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"criterion": "2.1.1",
|
|
168
|
+
"level": "A",
|
|
169
|
+
"title": "Keyboard"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"criterion": "4.1.2",
|
|
173
|
+
"level": "A",
|
|
174
|
+
"title": "Name, Role, Value"
|
|
175
|
+
}
|
|
106
176
|
]
|
|
107
177
|
}
|
|
108
178
|
}
|