@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Adobe
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # [**@adobe/spectrum-design-data**](https://github.com/adobe/spectrum-design-data)
2
+
3
+ Spectrum design tokens in **cascade format** — the canonical source of truth
4
+ for [`@adobe/spectrum-tokens`](../tokens).
5
+
6
+ ## What is the cascade format?
7
+
8
+ Each `.tokens.json` file in `tokens/` is a JSON array of spec-compliant token
9
+ objects. Each token carries a structured `name` object with taxonomy fields
10
+ (`component`, `property`, `state`, `colorFamily`, `scaleIndex`, etc.) instead
11
+ of a flat kebab-case string. The format is defined in
12
+ [`packages/design-data-spec`](../design-data-spec).
13
+
14
+ ```jsonc
15
+ // tokens/color-palette.tokens.json (excerpt)
16
+ [
17
+ {
18
+ "name": { "property": "color", "colorFamily": "blue", "scaleIndex": 100 },
19
+ "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color.json",
20
+ "value": "#E9F4FF",
21
+ "uuid": "…"
22
+ }
23
+ ]
24
+ ```
25
+
26
+ ## Relationship to `@adobe/spectrum-tokens`
27
+
28
+ `packages/tokens/src/` (the legacy flat-object format consumed by Style
29
+ Dictionary and downstream tooling) is **generated** from this package. Do not
30
+ edit `packages/tokens/src/` directly — changes will be overwritten.
31
+
32
+ To regenerate the legacy package after editing tokens here:
33
+
34
+ ```bash
35
+ moon run design-data:legacy-output
36
+ ```
37
+
38
+ ## Token corpus
39
+
40
+ 8 files, 4 166 cascade tokens (from 2 460 legacy entries):
41
+
42
+ | File | Description |
43
+ | ----------------------------- | ----------------------------------- |
44
+ | `color-palette.json` | Global color scale (blues, reds, …) |
45
+ | `color-component.json` | Component-scoped color tokens |
46
+ | `color-aliases.json` | Semantic color aliases |
47
+ | `semantic-color-palette.json` | Semantic/contextual palette |
48
+ | `typography.json` | Font sizes, weights, families |
49
+ | `layout.json` | Global spacing and sizing |
50
+ | `layout-component.json` | Component-scoped layout tokens |
51
+ | `icons.json` | Icon sizing tokens |
52
+
53
+ ## Name-object quality
54
+
55
+ 95% of tokens carry structured name objects:
56
+
57
+ * **23%** enriched from sidecar name metadata (`colorFamily`, `scaleIndex`, `variant`, …)
58
+ * **71%** decomposed from the legacy key (`component` + `property` + `state`)
59
+ * **6%** thin (full legacy key stored in `property`) — tracked as SPEC-017 tech debt
60
+
61
+ ## moon tasks
62
+
63
+ | Task | Command | Purpose |
64
+ | ------------------------ | --------------------------------------------- | ----------------------------------------------------- |
65
+ | `validate` | `moon run design-data:validate` | Validate cascade files against spec rules |
66
+ | `legacy-output` | `moon run design-data:legacy-output` | Regenerate `packages/tokens/src/` |
67
+ | `roundtrip-verify` | `moon run design-data:roundtrip-verify` | CI guard: fail if cascade and legacy diverge |
68
+ | `regenerate-from-legacy` | `moon run design-data:regenerate-from-legacy` | Re-sync cascade from legacy (one-time / escape hatch) |
69
+
70
+ ## Consuming the cascade format
71
+
72
+ ```js
73
+ import colorPalette from "@adobe/spectrum-design-data/tokens/color-palette";
74
+ // colorPalette is an array of cascade token objects
75
+ ```
@@ -0,0 +1,185 @@
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/accordion.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "accordion",
6
+ "displayName": "Accordion",
7
+ "description": "An accordion is a vertically stacked set of interactive headings that each contain a title and a content area.",
8
+ "meta": {
9
+ "category": "inputs",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/accordion/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "An accordion is a vertically stacked set of interactive headings that each contain a title and a content area."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "An accordion displays a list of items that can be expanded or collapsed to show additional content. It can support zero, one, or multiple expanded items at a time."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "By default, only one accordion item can be expanded at a time. Use the isMultiple option to allow multiple items to be expanded simultaneously."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "Accordions can contain any number of items. Each item can be expanded or collapsed by interacting with any part of the item."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "Accordions come in three densities: compact, regular, and spacious. Each of the different densities have the same font size, but have tighter or looser vertical spacing between the rows."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "Individual accordion items can be disabled using the isDisabled option. Disabled items cannot be expanded or collapsed."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "By default, accordions have dividers between sections. This style works best when lots of content is inside each section."
40
+ },
41
+ {
42
+ "type": "guideline",
43
+ "content": "Alternatively, you can have no dividers between sections. This style works best when a clear layout (vertical stack, table, grid) makes it easy see and understand. Too many quiet components in a small space can be hard to differentiate."
44
+ },
45
+ {
46
+ "type": "guideline",
47
+ "content": "Accordions come in four different sizes: small, medium, large, and extra-large. The medium size is the default and recommended option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page. Each of the different sizes have varying font sizes, and tighter or looser vertical spacing between the rows."
48
+ },
49
+ {
50
+ "type": "guideline",
51
+ "content": "By default, only one accordion item may be expanded at a time. However, the component can be configured to allow multiple items to remain open simultaneously."
52
+ },
53
+ {
54
+ "type": "guideline",
55
+ "content": "Accordion titles wrap automatically if they exceed the available width."
56
+ },
57
+ {
58
+ "type": "guideline",
59
+ "content": "An optional action button or switch can be placed on the trailing edge of an accordion item to support contextual interactions."
60
+ },
61
+ {
62
+ "type": "guideline",
63
+ "content": "Accordions are effective for organizing large amounts of related content within a limited space. They help users stay focused by revealing information only when it's needed, making them ideal for scenarios where not all content needs to be visible at once."
64
+ },
65
+ {
66
+ "type": "guideline",
67
+ "content": "Avoid using accordions when users are likely to read all the content in one go, as they can introduce unnecessary clicks and hinder the user experience. For complex or deeply nested information structures, consider alternative components such as tree views or tabs to maintain clarity and ease of navigation."
68
+ }
69
+ ],
70
+ "options": {
71
+ "size": {
72
+ "type": "string",
73
+ "default": "m",
74
+ "values": [
75
+ {
76
+ "value": "s"
77
+ },
78
+ {
79
+ "value": "m"
80
+ },
81
+ {
82
+ "value": "l"
83
+ },
84
+ {
85
+ "value": "xl"
86
+ }
87
+ ]
88
+ },
89
+ "isQuiet": {
90
+ "type": "boolean",
91
+ "default": false
92
+ },
93
+ "isDisabled": {
94
+ "type": "boolean",
95
+ "default": false
96
+ },
97
+ "density": {
98
+ "type": "string",
99
+ "default": "regular",
100
+ "values": [
101
+ {
102
+ "value": "compact"
103
+ },
104
+ {
105
+ "value": "regular"
106
+ },
107
+ {
108
+ "value": "spacious"
109
+ }
110
+ ]
111
+ },
112
+ "items": {
113
+ "type": "array",
114
+ "description": "An array of accordion items.",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "label": {
119
+ "type": "string",
120
+ "description": "The text label displayed for the accordion item."
121
+ },
122
+ "content": {
123
+ "type": "string",
124
+ "description": "The content shown when the accordion item is expanded."
125
+ },
126
+ "isExpanded": {
127
+ "type": "boolean",
128
+ "default": false,
129
+ "description": "Whether the accordion item is expanded by default."
130
+ },
131
+ "hasSwitch": {
132
+ "type": "boolean",
133
+ "default": false,
134
+ "description": "If true, the accordion item includes a switch."
135
+ },
136
+ "hasActionButton": {
137
+ "type": "boolean",
138
+ "default": false,
139
+ "description": "If true, the accordion item includes an action button."
140
+ }
141
+ },
142
+ "required": ["label"]
143
+ }
144
+ },
145
+ "isMultiple": {
146
+ "type": "boolean",
147
+ "default": false,
148
+ "description": "If true, multiple accordion items can be expanded at the same time."
149
+ }
150
+ },
151
+ "states": [
152
+ {
153
+ "name": "hover",
154
+ "trigger": "interaction"
155
+ },
156
+ {
157
+ "name": "down",
158
+ "trigger": "interaction"
159
+ },
160
+ {
161
+ "name": "keyboard-focus",
162
+ "trigger": "interaction"
163
+ }
164
+ ],
165
+ "lifecycle": {
166
+ "introduced": "1.0.0-draft"
167
+ },
168
+ "accessibility": {
169
+ "intents": ["expand"],
170
+ "focusable": true,
171
+ "keyboardIntents": ["activate", "expand", "collapse"],
172
+ "wcag": [
173
+ {
174
+ "criterion": "2.1.1",
175
+ "level": "A",
176
+ "title": "Keyboard"
177
+ },
178
+ {
179
+ "criterion": "4.1.2",
180
+ "level": "A",
181
+ "title": "Name, Role, Value"
182
+ }
183
+ ]
184
+ }
185
+ }
@@ -0,0 +1,89 @@
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/action-bar.json",
4
+ "specVersion": "1.0.0-draft",
5
+ "name": "action-bar",
6
+ "displayName": "Action bar",
7
+ "description": "Action bars are used for single and bulk selection patterns, when a user needs to perform actions on either a single or multiple items at the same time.",
8
+ "meta": {
9
+ "category": "actions",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/action-bar/"
11
+ },
12
+ "documentBlocks": [
13
+ {
14
+ "type": "purpose",
15
+ "content": "Action bars are used for single and bulk selection patterns, when a user needs to perform actions on either a single or multiple items at the same time."
16
+ },
17
+ {
18
+ "type": "guideline",
19
+ "content": "Action bar in Dark theme.\n\nAction bar is split into a separate component for each color theme — light and dark. Since each is set to either light or dark mode in Figma, they do not switch automatically like the rest of the UI when placed in frames that are set to \"auto\" mode.\n\nIn dark theme, the action bar also includes a 1px inner border to help it stand out against the background colors."
20
+ },
21
+ {
22
+ "type": "guideline",
23
+ "content": "Action group variants (Icon-only, Label-only, Icon + label).\n\nAt larger screen or section sizes, use an action group that shows a label and icon. For smaller screen or section sizes, use an icon-only action group. Place any overflow actions into a action menu at the end of the bar."
24
+ },
25
+ {
26
+ "type": "guideline",
27
+ "content": "Action disabled behavior.\n\nIndividual actions can be disabled in an action bar which follow the isDisabled property of the action group. This disabled state shows that the action buttons within the group exist, but are not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action group may become available later."
28
+ },
29
+ {
30
+ "type": "guideline",
31
+ "content": "Placement.\n\nWhen a user selects items with relevant actions, an action bar appears at the bottom of the viewport. The bar should have margins of `spacing-200` (12 pixels on desktop scale) on the sides and bottom."
32
+ },
33
+ {
34
+ "type": "guideline",
35
+ "content": "Safe zone.\n\nInclude a safe zone of at least `spacing-400` (24 pixels on desktop scale) between the item counter and the action group."
36
+ },
37
+ {
38
+ "type": "guideline",
39
+ "content": "Motion and stickiness.\n\nAction bars slide and fade in from the bottom of the page or section. They remain or \"stick\" there until a user either deselects the items or navigates away."
40
+ },
41
+ {
42
+ "type": "do-dont",
43
+ "content": "Don't add a drag bar",
44
+ "dont": "An action bar appears when items in a list or grid view are selected, and it remains in place until items are deselected or a user navigates away. Action bars can not be moved or dragged."
45
+ },
46
+ {
47
+ "type": "guideline",
48
+ "content": "Allow scrolling to view underlying content.\n\nAction bars appear on top of content. Allow space for a user to still be able to view the content underneath, especially if they're taking actions on a table or a list of items and need to be able to scroll."
49
+ },
50
+ {
51
+ "type": "do-dont",
52
+ "content": "Don't use quick actions",
53
+ "dont": "Instead of quick actions, use an action bar for both single and bulk selection patterns. An action bar is useful for when a user needs to perform actions on either a single or multiple items at the same time. It can be used on either a grid view or a table view.\n\nDon't use quick actions — a deprecated component — because it presents conflicting nested actions (for example, a whole asset card could open a detailed view). This makes targeting specific actions very difficult, especially on smaller screens or with the keyboard."
54
+ }
55
+ ],
56
+ "options": {
57
+ "isEmphasized": {
58
+ "type": "boolean",
59
+ "default": false
60
+ }
61
+ },
62
+ "anatomy": [
63
+ {
64
+ "name": "action-group-area",
65
+ "description": "Group of secondary action controls."
66
+ },
67
+ {
68
+ "name": "item-counter",
69
+ "description": "Badge showing a count of items or actions."
70
+ },
71
+ {
72
+ "name": "counter"
73
+ }
74
+ ],
75
+ "lifecycle": {
76
+ "introduced": "1.0.0-draft"
77
+ },
78
+ "accessibility": {
79
+ "intents": ["trigger"],
80
+ "focusable": false,
81
+ "wcag": [
82
+ {
83
+ "criterion": "4.1.2",
84
+ "level": "A",
85
+ "title": "Name, Role, Value"
86
+ }
87
+ ]
88
+ }
89
+ }