@adobe/spectrum-design-data 0.0.0-size-token-taxonomy-20260929225107

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.
Files changed (203) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +75 -0
  3. package/components/accordion.json +185 -0
  4. package/components/action-bar.json +89 -0
  5. package/components/action-button.json +167 -0
  6. package/components/action-group.json +190 -0
  7. package/components/alert-banner.json +148 -0
  8. package/components/alert-dialog.json +124 -0
  9. package/components/avatar-group.json +82 -0
  10. package/components/avatar.json +162 -0
  11. package/components/badge.json +227 -0
  12. package/components/bar-panel.json +14 -0
  13. package/components/body.json +54 -0
  14. package/components/bottom-navigation-android.json +72 -0
  15. package/components/breadcrumbs.json +213 -0
  16. package/components/button-group.json +122 -0
  17. package/components/button.json +239 -0
  18. package/components/calendar.json +196 -0
  19. package/components/card-horizontal.json +14 -0
  20. package/components/card.json +22 -0
  21. package/components/cards.json +117 -0
  22. package/components/checkbox-group.json +128 -0
  23. package/components/checkbox.json +171 -0
  24. package/components/close-button.json +116 -0
  25. package/components/coach-indicator.json +109 -0
  26. package/components/coach-mark.json +151 -0
  27. package/components/code.json +44 -0
  28. package/components/collection-card.json +13 -0
  29. package/components/color-area.json +150 -0
  30. package/components/color-control.json +14 -0
  31. package/components/color-handle.json +79 -0
  32. package/components/color-loupe.json +49 -0
  33. package/components/color-slider.json +189 -0
  34. package/components/color-wheel.json +137 -0
  35. package/components/combo-box.json +319 -0
  36. package/components/contextual-help.json +186 -0
  37. package/components/date-field.json +13 -0
  38. package/components/date-picker.json +297 -0
  39. package/components/detail.json +53 -0
  40. package/components/divider.json +62 -0
  41. package/components/double-calendar.json +13 -0
  42. package/components/drop-zone.json +102 -0
  43. package/components/field-label.json +125 -0
  44. package/components/field.json +13 -0
  45. package/components/floating-action-button.json +13 -0
  46. package/components/form-item.json +13 -0
  47. package/components/heading.json +68 -0
  48. package/components/help-text.json +117 -0
  49. package/components/illustrated-message.json +159 -0
  50. package/components/in-field-button.json +14 -0
  51. package/components/in-field-progress-button.json +88 -0
  52. package/components/in-field-progress-circle.json +62 -0
  53. package/components/in-line-alert.json +109 -0
  54. package/components/link.json +127 -0
  55. package/components/list-view.json +233 -0
  56. package/components/menu.json +310 -0
  57. package/components/meter.json +127 -0
  58. package/components/number-field.json +264 -0
  59. package/components/opacity-checkerboard.json +51 -0
  60. package/components/picker.json +287 -0
  61. package/components/popover.json +182 -0
  62. package/components/progress-bar.json +177 -0
  63. package/components/progress-circle.json +108 -0
  64. package/components/radio-button.json +130 -0
  65. package/components/radio-group.json +202 -0
  66. package/components/rating.json +120 -0
  67. package/components/scroll-zoom-bar.json +82 -0
  68. package/components/search-field.json +206 -0
  69. package/components/segmented-control.json +184 -0
  70. package/components/segmented-text-field.json +13 -0
  71. package/components/select-box.json +165 -0
  72. package/components/side-navigation.json +185 -0
  73. package/components/single-calendar.json +13 -0
  74. package/components/slider.json +238 -0
  75. package/components/stack-item.json +23 -0
  76. package/components/standard-dialog.json +155 -0
  77. package/components/standard-panel.json +135 -0
  78. package/components/status-light.json +175 -0
  79. package/components/steplist.json +127 -0
  80. package/components/swatch-group.json +126 -0
  81. package/components/swatch.json +153 -0
  82. package/components/switch.json +156 -0
  83. package/components/table.json +273 -0
  84. package/components/tabs.json +163 -0
  85. package/components/tag-field.json +147 -0
  86. package/components/tag-group.json +111 -0
  87. package/components/tag.json +123 -0
  88. package/components/takeover-dialog.json +129 -0
  89. package/components/text-area.json +299 -0
  90. package/components/text-field.json +263 -0
  91. package/components/thumbnail.json +109 -0
  92. package/components/time-field.json +13 -0
  93. package/components/title.json +53 -0
  94. package/components/toast.json +136 -0
  95. package/components/tooltip.json +171 -0
  96. package/components/tray.json +32 -0
  97. package/components/tree-view.json +270 -0
  98. package/components/triple-calendar.json +13 -0
  99. package/components/user-card.json +14 -0
  100. package/fields/alignment.json +15 -0
  101. package/fields/anatomy.json +15 -0
  102. package/fields/color-scheme.json +16 -0
  103. package/fields/colorFamily.json +16 -0
  104. package/fields/colorRole.json +16 -0
  105. package/fields/component.json +15 -0
  106. package/fields/contrast.json +16 -0
  107. package/fields/density.json +15 -0
  108. package/fields/easing.json +15 -0
  109. package/fields/emphasis.json +16 -0
  110. package/fields/family.json +16 -0
  111. package/fields/from.json +16 -0
  112. package/fields/icon.json +15 -0
  113. package/fields/motionRole.json +15 -0
  114. package/fields/object.json +15 -0
  115. package/fields/orientation.json +15 -0
  116. package/fields/position.json +15 -0
  117. package/fields/property.json +15 -0
  118. package/fields/qualifier.json +15 -0
  119. package/fields/referenceScaleIndex.json +16 -0
  120. package/fields/role.json +15 -0
  121. package/fields/scale.json +16 -0
  122. package/fields/scaleIndex.json +16 -0
  123. package/fields/script.json +16 -0
  124. package/fields/shape.json +15 -0
  125. package/fields/size.json +15 -0
  126. package/fields/state.json +15 -0
  127. package/fields/structure.json +16 -0
  128. package/fields/style.json +15 -0
  129. package/fields/substructure.json +15 -0
  130. package/fields/to.json +16 -0
  131. package/fields/variant.json +15 -0
  132. package/fields/weight.json +15 -0
  133. package/guidelines/app-frame-content-area.json +81 -0
  134. package/guidelines/app-frame-creating-bluelines.json +58 -0
  135. package/guidelines/app-frame-header.json +72 -0
  136. package/guidelines/app-frame-overview.json +167 -0
  137. package/guidelines/app-frame-side-navigation.json +138 -0
  138. package/guidelines/attention-hierarchy.json +42 -0
  139. package/guidelines/background-layers.json +38 -0
  140. package/guidelines/brand.json +50 -0
  141. package/guidelines/colors.json +62 -0
  142. package/guidelines/containers.json +62 -0
  143. package/guidelines/developer-overview.json +35 -0
  144. package/guidelines/faqs.json +35 -0
  145. package/guidelines/fonts.json +58 -0
  146. package/guidelines/grays.json +66 -0
  147. package/guidelines/icon-fundamentals.json +45 -0
  148. package/guidelines/illustrations.json +111 -0
  149. package/guidelines/introduction.json +31 -0
  150. package/guidelines/manifest.json +204 -0
  151. package/guidelines/motion.json +41 -0
  152. package/guidelines/object-styles.json +102 -0
  153. package/guidelines/principles.json +30 -0
  154. package/guidelines/resources.json +59 -0
  155. package/guidelines/spacing.json +25 -0
  156. package/guidelines/states.json +34 -0
  157. package/guidelines/typography-fundamentals.json +142 -0
  158. package/guidelines/using-icons.json +107 -0
  159. package/mode-sets/color-scheme.json +8 -0
  160. package/mode-sets/contrast.json +8 -0
  161. package/mode-sets/scale.json +8 -0
  162. package/package.json +68 -0
  163. package/registry/alignments.json +22 -0
  164. package/registry/anatomy-terms.json +860 -0
  165. package/registry/categories.json +55 -0
  166. package/registry/color-families.json +177 -0
  167. package/registry/color-roles.json +47 -0
  168. package/registry/components.json +472 -0
  169. package/registry/densities.json +17 -0
  170. package/registry/easing-curves.json +42 -0
  171. package/registry/glossary.json +181 -0
  172. package/registry/icon-terms.json +104 -0
  173. package/registry/motion-roles.json +32 -0
  174. package/registry/navigation-terms.json +241 -0
  175. package/registry/orientations.json +17 -0
  176. package/registry/platform-extensions/web-components-states.json +58 -0
  177. package/registry/platforms.json +37 -0
  178. package/registry/positions.json +70 -0
  179. package/registry/property-terms.json +352 -0
  180. package/registry/qualifiers.json +47 -0
  181. package/registry/roles.json +17 -0
  182. package/registry/scale-values.json +133 -0
  183. package/registry/scripts.json +12 -0
  184. package/registry/shapes.json +27 -0
  185. package/registry/sizes.json +78 -0
  186. package/registry/states.json +187 -0
  187. package/registry/structures.json +67 -0
  188. package/registry/substructures.json +12 -0
  189. package/registry/token-objects.json +32 -0
  190. package/registry/token-terminology.json +925 -0
  191. package/registry/typography-emphasis.json +32 -0
  192. package/registry/typography-families.json +22 -0
  193. package/registry/typography-styles.json +22 -0
  194. package/registry/typography-weights.json +37 -0
  195. package/registry/variants.json +366 -0
  196. package/tokens/color-aliases.tokens.json +5579 -0
  197. package/tokens/color-component.tokens.json +1 -0
  198. package/tokens/color-palette.tokens.json +13458 -0
  199. package/tokens/icons.tokens.json +2777 -0
  200. package/tokens/layout-component.tokens.json +3121 -0
  201. package/tokens/layout.tokens.json +8741 -0
  202. package/tokens/semantic-color-palette.tokens.json +1246 -0
  203. package/tokens/typography.tokens.json +1447 -0
@@ -0,0 +1,196 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/calendar.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "calendar",
6
+ "displayName": "Calendar",
7
+ "description": "Calendars display days, weeks, and months, allowing users to select dates or ranges.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/calendar/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Calendars display days, weeks, and months, allowing users to select dates or ranges."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Calendars display the days of a selected month and highlight the current day. They support navigating to past or future months and selecting a specific date."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "An array of days that are displayed in the current calendar view. This includes:"
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "The maximum amount of months displayed in the calendar popover is three."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "The minimum amount of months displayed in the calendar popover is one."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "The calendar popover may display an error as error text when a user attempts to provide an input that violates the defined constraints of the date selection. For example, when the user selects dates that fall outside allowable limits, or conflict with contextual restrictions."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "The calendar popover is disabled. For example, a month within a three-month range is disabled."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "The types of selection available for the calendar."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "The current year or month displayed in the calendar popover."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "When a day or several days are unavailable within the calendar popover, each day should display a strikethrough to help the user understand that they cannot select it."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "Disabled days use a distinct gray style to clearly differentiate them from unavailable days. When the calendar prevents selection of past dates, this visual treatment helps users distinguish disabled days from those marked as unavailable."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "In a date selection system, users often need to distinguish between dates that cannot be selected and dates that are simply inactive. Supporting both states improves clarity and prevents errors."
60
+ },
61
+ {
62
+ "type": "guideline",
63
+ "content": "Here’s an example scenario: A potential guest is browsing a calendar to book a stay at a vacation rental."
64
+ },
65
+ {
66
+ "type": "guideline",
67
+ "content": "Unavailable dates: Days when the rental is already booked or blocked by the owner. These appear with a strikethrough, indicating they cannot be selected."
68
+ },
69
+ {
70
+ "type": "guideline",
71
+ "content": "Disabled dates: Past dates that are no longer valid for booking. These appear visually distinct (gray style) to show they are inactive."
72
+ },
73
+ {
74
+ "type": "guideline",
75
+ "content": "Guests see unavailable dates marked clearly so they don’t attempt to select them. Hosts or admins can view past dates as disabled and also mark future dates as unavailable when needed."
76
+ },
77
+ {
78
+ "type": "guideline",
79
+ "content": "By supporting both behaviors, the system provides a clear, intuitive experience for different user roles and prevents confusion during date selection."
80
+ },
81
+ {
82
+ "type": "guideline",
83
+ "content": "The range fill shows which days fall between two selected dates. If the range spans more than the three-month calendar view, it ends on the last visible day but continues as users navigate with the calendar chevrons. A dashed stroke outlines the fill to improve visibility on bright screens and for users with vision impairments."
84
+ },
85
+ {
86
+ "type": "guideline",
87
+ "content": "The strikethrough styling intentionally accommodates internationalization."
88
+ },
89
+ {
90
+ "type": "guideline",
91
+ "content": "The calendar popover supports a disabled state but not a read-only state. Dates or months may be temporarily disabled based on context (for example, if a user must complete a task before selecting a date). In these cases, help text can explain why certain dates are unavailable."
92
+ },
93
+ {
94
+ "type": "guideline",
95
+ "content": "If a date picker is truly read-only, users shouldn’t be able to open the calendar popover at all, since they can’t interact with it."
96
+ },
97
+ {
98
+ "type": "guideline",
99
+ "content": "The calendar popover can also include time-specific fields, allowing users to specify start and end times."
100
+ }
101
+ ],
102
+ "options": {
103
+ "currentMonth": {
104
+ "type": "number",
105
+ "minimum": 1,
106
+ "maximum": 12,
107
+ "description": "The month currently displayed in the calendar (1 = January, 12 = December)."
108
+ },
109
+ "currentYear": {
110
+ "type": "number",
111
+ "description": "The year currently displayed in the calendar (Gregorian year number)."
112
+ },
113
+ "selectionMode": {
114
+ "type": "string",
115
+ "default": "single",
116
+ "description": "Controls whether the calendar allows selecting a single date or a date range.",
117
+ "values": [{ "value": "single" }, { "value": "range" }]
118
+ },
119
+ "isDisabled": { "type": "boolean", "default": false },
120
+ "isError": { "type": "boolean", "default": false },
121
+ "minValue": {
122
+ "type": "string",
123
+ "description": "The minimum allowed date that a user may select (ISO format string)."
124
+ },
125
+ "maxValue": {
126
+ "type": "string",
127
+ "description": "The maximum allowed date that a user may select (ISO format string)."
128
+ },
129
+ "showTimeZone": {
130
+ "type": "boolean",
131
+ "default": false,
132
+ "description": "Whether to show a time zone indicator in the calendar."
133
+ },
134
+ "days": {
135
+ "type": "array",
136
+ "description": "An array of days displayed in the current calendar view.",
137
+ "items": {
138
+ "type": "object",
139
+ "properties": {
140
+ "date": {
141
+ "type": "string",
142
+ "description": "The date represented by this day (ISO format string)."
143
+ },
144
+ "isDisabled": {
145
+ "type": "boolean",
146
+ "default": false,
147
+ "description": "Whether this day is disabled."
148
+ },
149
+ "isSelected": {
150
+ "type": "boolean",
151
+ "default": false,
152
+ "description": "Whether this day is currently selected."
153
+ },
154
+ "isRangeStart": {
155
+ "type": "boolean",
156
+ "default": false,
157
+ "description": "Whether this day is the start of a selected range."
158
+ },
159
+ "isRangeEnd": {
160
+ "type": "boolean",
161
+ "default": false,
162
+ "description": "Whether this day is the end of a selected range."
163
+ },
164
+ "isUnavailable": {
165
+ "type": "boolean",
166
+ "default": false,
167
+ "description": "Whether this day is unavailable for selection. If true, the day appears with a strikethrough."
168
+ },
169
+ "isToday": {
170
+ "type": "boolean",
171
+ "default": false,
172
+ "description": "Whether this day represents the current date."
173
+ },
174
+ "state": {
175
+ "type": "string",
176
+ "enum": ["default", "hover", "keyboard focus"],
177
+ "default": "default",
178
+ "description": "The interaction state of the day cell."
179
+ }
180
+ },
181
+ "required": ["date"]
182
+ }
183
+ }
184
+ },
185
+ "lifecycle": { "introduced": "1.0.0-draft" },
186
+ "accessibility": {
187
+ "intents": ["input", "choose"],
188
+ "focusable": true,
189
+ "keyboardIntents": ["navigate-items", "activate"],
190
+ "wcag": [
191
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
192
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
193
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
194
+ ]
195
+ }
196
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/card-horizontal.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "card-horizontal",
6
+ "displayName": "Horizontal card",
7
+ "description": "A card variant laid out horizontally, pairing a preview with content side by side.",
8
+ "meta": {
9
+ "category": "containers",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/card-horizontal/"
11
+ },
12
+ "states": [{ "name": "default" }],
13
+ "lifecycle": { "introduced": "1.0.0-draft" }
14
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/card.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "card",
6
+ "displayName": "Card",
7
+ "description": "A single card surface used to group related content and actions; the base of the cards family (cards.json documents the group).",
8
+ "meta": {
9
+ "category": "containers",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/card/"
11
+ },
12
+ "anatomy": [
13
+ { "name": "selection" },
14
+ { "name": "well" },
15
+ {
16
+ "name": "preview",
17
+ "description": "Preview area or thumbnail within the card."
18
+ }
19
+ ],
20
+ "states": [{ "name": "default" }],
21
+ "lifecycle": { "introduced": "1.0.0-draft" }
22
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/cards.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "cards",
6
+ "displayName": "Cards",
7
+ "description": "Cards group related content into distinct layouts depending on context.",
8
+ "meta": {
9
+ "category": "containers",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/cards/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Cards group related content into distinct layouts depending on context."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Cards group related content and actions into flexible containers for browsing. They preview key information and reveal more detail on interaction."
20
+ },
21
+ {
22
+ "type": "guideline",
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
+ },
25
+ {
26
+ "type": "guideline",
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
+ },
29
+ {
30
+ "type": "guideline",
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
+ },
33
+ {
34
+ "type": "guideline",
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
+ },
37
+ {
38
+ "type": "guideline",
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
+ },
41
+ {
42
+ "type": "guideline",
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
+ },
45
+ {
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."
48
+ },
49
+ {
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:"
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "Cards are meant to just show a taste of the available information. Don’t overload cards with more information than necessary."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "Only standard cards can have a footer, and buttons can only appear inside a footer."
60
+ },
61
+ {
62
+ "type": "guideline",
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."
64
+ },
65
+ {
66
+ "type": "guideline",
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."
68
+ }
69
+ ],
70
+ "options": {
71
+ "variant": {
72
+ "type": "string",
73
+ "default": "asset",
74
+ "description": "Determines which card layout variant is used.",
75
+ "values": [
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
+ }
94
+ ]
95
+ }
96
+ },
97
+ "lifecycle": {
98
+ "introduced": "1.0.0-draft"
99
+ },
100
+ "accessibility": {
101
+ "intents": ["select"],
102
+ "focusable": true,
103
+ "keyboardIntents": ["activate"],
104
+ "wcag": [
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
+ }
115
+ ]
116
+ }
117
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/checkbox-group.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "checkbox-group",
6
+ "displayName": "Checkbox group",
7
+ "description": "A checkbox group is a grouping of checkboxes that are related to each other.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/checkbox-group/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "A checkbox group is a grouping of checkboxes that are related to each other."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "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."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "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."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "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."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "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."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "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."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "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."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "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."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "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”)."
48
+ }
49
+ ],
50
+ "options": {
51
+ "label": {
52
+ "type": "string"
53
+ },
54
+ "labelPosition": {
55
+ "type": "string",
56
+ "default": "top",
57
+ "values": [
58
+ {
59
+ "value": "top"
60
+ },
61
+ {
62
+ "value": "side"
63
+ }
64
+ ]
65
+ },
66
+ "necessityIndicator": {
67
+ "type": "string",
68
+ "default": "icon",
69
+ "values": [
70
+ {
71
+ "value": "text"
72
+ },
73
+ {
74
+ "value": "icon"
75
+ }
76
+ ]
77
+ },
78
+ "isRequired": {
79
+ "type": "boolean",
80
+ "default": false
81
+ },
82
+ "orientation": {
83
+ "type": "string",
84
+ "default": "vertical",
85
+ "values": [
86
+ {
87
+ "value": "horizontal"
88
+ },
89
+ {
90
+ "value": "vertical"
91
+ }
92
+ ]
93
+ },
94
+ "isError": {
95
+ "type": "boolean",
96
+ "default": false
97
+ },
98
+ "isDisabled": {
99
+ "type": "boolean",
100
+ "default": false
101
+ },
102
+ "description": {
103
+ "type": "string"
104
+ },
105
+ "errorMessage": {
106
+ "type": "string"
107
+ }
108
+ },
109
+ "lifecycle": {
110
+ "introduced": "1.0.0-draft"
111
+ },
112
+ "accessibility": {
113
+ "intents": ["choose"],
114
+ "focusable": false,
115
+ "wcag": [
116
+ {
117
+ "criterion": "1.3.1",
118
+ "level": "A",
119
+ "title": "Info and Relationships"
120
+ },
121
+ {
122
+ "criterion": "4.1.2",
123
+ "level": "A",
124
+ "title": "Name, Role, Value"
125
+ }
126
+ ]
127
+ }
128
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component.schema.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/checkbox.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "checkbox",
6
+ "displayName": "Checkbox",
7
+ "description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/checkbox/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Checkboxes support selecting one or more items from a list. Each item can be selected independently or in combination with others."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "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."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "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."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "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."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "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."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "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."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Checkboxes can be in an indeterminate state when they represent both selected and not selected values."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Checkboxes can be selected or not selected."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "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."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "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."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "When the label is too long for the horizontal space available, it wraps to form another line."
60
+ },
61
+ {
62
+ "type": "guideline",
63
+ "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."
64
+ },
65
+ {
66
+ "type": "guideline",
67
+ "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."
68
+ },
69
+ {
70
+ "type": "guideline",
71
+ "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."
72
+ },
73
+ {
74
+ "type": "guideline",
75
+ "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."
76
+ },
77
+ {
78
+ "type": "guideline",
79
+ "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."
80
+ },
81
+ {
82
+ "type": "guideline",
83
+ "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."
84
+ }
85
+ ],
86
+ "options": {
87
+ "label": {
88
+ "type": "string",
89
+ "description": "When the label is not defined, the checkbox appears as a standalone checkbox."
90
+ },
91
+ "isSelected": {
92
+ "type": "boolean",
93
+ "default": false
94
+ },
95
+ "isIndeterminate": {
96
+ "type": "boolean",
97
+ "default": false,
98
+ "description": "When a checkbox is indeterminate, it overrides the selection state."
99
+ },
100
+ "size": {
101
+ "type": "string",
102
+ "default": "m",
103
+ "values": [
104
+ {
105
+ "value": "s"
106
+ },
107
+ {
108
+ "value": "m"
109
+ },
110
+ {
111
+ "value": "l"
112
+ },
113
+ {
114
+ "value": "xl"
115
+ }
116
+ ]
117
+ },
118
+ "isEmphasized": {
119
+ "type": "boolean",
120
+ "default": false
121
+ },
122
+ "isDisabled": {
123
+ "type": "boolean",
124
+ "default": false
125
+ },
126
+ "isError": {
127
+ "type": "boolean",
128
+ "default": false
129
+ }
130
+ },
131
+ "states": [
132
+ {
133
+ "name": "hover",
134
+ "trigger": "interaction"
135
+ },
136
+ {
137
+ "name": "down",
138
+ "trigger": "interaction"
139
+ },
140
+ {
141
+ "name": "keyboard-focus",
142
+ "trigger": "interaction"
143
+ }
144
+ ],
145
+ "lifecycle": {
146
+ "introduced": "1.0.0-draft"
147
+ },
148
+ "accessibility": {
149
+ "role": "checkbox",
150
+ "intents": ["choose"],
151
+ "focusable": true,
152
+ "keyboardIntents": ["activate"],
153
+ "wcag": [
154
+ {
155
+ "criterion": "1.3.1",
156
+ "level": "A",
157
+ "title": "Info and Relationships"
158
+ },
159
+ {
160
+ "criterion": "2.1.1",
161
+ "level": "A",
162
+ "title": "Keyboard"
163
+ },
164
+ {
165
+ "criterion": "4.1.2",
166
+ "level": "A",
167
+ "title": "Name, Role, Value"
168
+ }
169
+ ]
170
+ }
171
+ }