@adobe/spectrum-component-api-schemas 4.0.0 → 5.0.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/package.json +1 -1
  3. package/schemas/components/accordion.json +4 -20
  4. package/schemas/components/alert-banner.json +1 -1
  5. package/schemas/components/avatar-group.json +18 -26
  6. package/schemas/components/breadcrumbs.json +7 -7
  7. package/schemas/components/calendar.json +109 -0
  8. package/schemas/components/cards.json +238 -0
  9. package/schemas/components/checkbox-group.json +1 -1
  10. package/schemas/components/coach-mark.json +51 -0
  11. package/schemas/components/color-handle.json +27 -27
  12. package/schemas/components/color-slider.json +10 -2
  13. package/schemas/components/illustrated-message.json +52 -0
  14. package/schemas/components/in-line-alert.json +3 -3
  15. package/schemas/components/list-view.json +106 -0
  16. package/schemas/components/number-field.json +53 -69
  17. package/schemas/components/picker.json +18 -8
  18. package/schemas/components/radio-button.json +1 -6
  19. package/schemas/components/segmented-control.json +62 -79
  20. package/schemas/components/side-navigation.json +61 -2
  21. package/schemas/components/slider.json +3 -14
  22. package/schemas/components/standard-dialog.json +53 -0
  23. package/schemas/components/standard-panel.json +49 -0
  24. package/schemas/components/swatch-group.json +4 -20
  25. package/schemas/components/swatch.json +4 -21
  26. package/schemas/components/table.json +144 -0
  27. package/schemas/components/tabs.json +6 -26
  28. package/schemas/components/tag-field.json +38 -47
  29. package/schemas/components/tag-group.json +27 -34
  30. package/schemas/components/takeover-dialog.json +60 -0
  31. package/schemas/components/text-field.json +3 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @adobe/spectrum-component-api-schemas
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#614](https://github.com/adobe/spectrum-tokens/pull/614) [`a772572`](https://github.com/adobe/spectrum-tokens/commit/a772572de88c54d279c20d7148f6ac91eb941d2a) Thanks [@AmunMRa](https://github.com/AmunMRa)! - # Component Schemas Changed (9 added, 0 deleted, 3 updated)
8
+
9
+ **Original Branch:** `main`
10
+
11
+ **New Branch:** `feat-batch4-schema-updates`
12
+
13
+ ## 🚨 Breaking Changes Detected
14
+
15
+ This PR introduces **2 breaking change(s)** to component schemas. Please review carefully and ensure proper versioning.
16
+
17
+ ### 📦 Added Components (9)
18
+ - `calendar` - New component schema
19
+ - `cards` - New component schema
20
+ - `coach-mark` - New component schema
21
+ - `illustrated-message` - New component schema
22
+ - `list-view` - New component schema
23
+ - `standard-dialog` - New component schema
24
+ - `standard-panel` - New component schema
25
+ - `table` - New component schema
26
+ - `takeover-dialog` - New component schema
27
+
28
+ ### 💥 Breaking Updates ⚠️ BREAKING
29
+
30
+ **picker**
31
+ - Removed: `isReadOnly` property
32
+
33
+ **side-navigation**
34
+ - Added: `items` (array) - "The list of navigation items."
35
+ - Added: `selectionMode` (string, default: single) - "How selection is handled for items."
36
+ - Added: `required` - ["items"]
37
+
38
+ ### 🔄 Non-Breaking Updates
39
+
40
+ **alert-banner**
41
+ - Added: `variant`
42
+
3
43
  ## 4.0.0
4
44
 
5
45
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spectrum-component-api-schemas",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -11,22 +11,12 @@
11
11
  "properties": {
12
12
  "state": {
13
13
  "type": "string",
14
- "enum": [
15
- "default",
16
- "hover",
17
- "down",
18
- "keyboard focus"
19
- ],
14
+ "enum": ["default", "hover", "down", "keyboard focus"],
20
15
  "default": "default"
21
16
  },
22
17
  "size": {
23
18
  "type": "string",
24
- "enum": [
25
- "s",
26
- "m",
27
- "l",
28
- "xl"
29
- ],
19
+ "enum": ["s", "m", "l", "xl"],
30
20
  "default": "m"
31
21
  },
32
22
  "isQuiet": {
@@ -39,11 +29,7 @@
39
29
  },
40
30
  "density": {
41
31
  "type": "string",
42
- "enum": [
43
- "compact",
44
- "regular",
45
- "spacious"
46
- ],
32
+ "enum": ["compact", "regular", "spacious"],
47
33
  "default": "regular"
48
34
  },
49
35
  "items": {
@@ -76,9 +62,7 @@
76
62
  "description": "If true, the accordion item includes an action button."
77
63
  }
78
64
  },
79
- "required": [
80
- "label"
81
- ]
65
+ "required": ["label"]
82
66
  }
83
67
  },
84
68
  "isMultiple": {
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "variant": {
16
16
  "type": "string",
17
- "enum": ["neutral", "informative", "negative"],
17
+ "enum": ["neutral", "informative", "negative", "accent"],
18
18
  "default": "neutral"
19
19
  },
20
20
  "actionLabel": {
@@ -1,30 +1,22 @@
1
1
  {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/avatar-group.json",
4
- "title": "Avatar group",
5
- "description": "Avatar groups display a collection of avatars representing people or entities.",
6
- "meta": {
7
- "category": "actions",
8
- "documentationUrl": "https://spectrum.adobe.com/page/avatar-group/"
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/avatar-group.json",
4
+ "title": "Avatar group",
5
+ "description": "Avatar groups display a collection of avatars representing people or entities.",
6
+ "meta": {
7
+ "category": "actions",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/avatar-group/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string",
14
+ "description": "Optional text label displayed with the avatar group (e.g., group name)."
9
15
  },
10
- "type": "object",
11
- "properties": {
12
- "label": {
13
- "type": "string",
14
- "description": "Optional text label displayed with the avatar group (e.g., group name)."
15
- },
16
- "size": {
17
- "type": "number",
18
- "enum": [
19
- 50,
20
- 75,
21
- 100,
22
- 200,
23
- 300,
24
- 400,
25
- 500
26
- ],
27
- "default": 100
28
- }
16
+ "size": {
17
+ "type": "number",
18
+ "enum": [50, 75, 100, 200, 300, 400, 500],
19
+ "default": 100
29
20
  }
21
+ }
30
22
  }
@@ -50,13 +50,13 @@
50
50
  }
51
51
  },
52
52
  "required": ["label"]
53
- }
54
- },
55
- "separator": {
56
- "type": "string",
57
- "enum": ["chevron", "none"],
58
- "default": "chevron",
59
- "description": "The separator icon used between breadcrumb items."
53
+ }
54
+ },
55
+ "separator": {
56
+ "type": "string",
57
+ "enum": ["chevron", "none"],
58
+ "default": "chevron",
59
+ "description": "The separator icon used between breadcrumb items."
60
60
  },
61
61
  "isTruncated": {
62
62
  "type": "boolean",
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/calendar.json",
4
+ "title": "Calendar",
5
+ "description": "Calendars display days, weeks, and months, allowing users to select dates or ranges.",
6
+ "meta": {
7
+ "category": "inputs",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/calendar/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "currentMonth": {
13
+ "type": "number",
14
+ "minimum": 1,
15
+ "maximum": 12,
16
+ "description": "The month currently displayed in the calendar (1 = January, 12 = December)."
17
+ },
18
+ "currentYear": {
19
+ "type": "number",
20
+ "description": "The year currently displayed in the calendar (Gregorian year number)."
21
+ },
22
+ "selectionMode": {
23
+ "type": "string",
24
+ "enum": [
25
+ "single",
26
+ "range"
27
+ ],
28
+ "default": "single",
29
+ "description": "Controls whether the calendar allows selecting a single date or a date range."
30
+ },
31
+ "isDisabled": {
32
+ "type": "boolean",
33
+ "default": false
34
+ },
35
+ "isError": {
36
+ "type": "boolean",
37
+ "default": false
38
+ },
39
+ "minValue": {
40
+ "type": "string",
41
+ "description": "The minimum allowed date that a user may select (ISO format string)."
42
+ },
43
+ "maxValue": {
44
+ "type": "string",
45
+ "description": "The maximum allowed date that a user may select (ISO format string)."
46
+ },
47
+ "showTimeZone": {
48
+ "type": "boolean",
49
+ "default": false,
50
+ "description": "Whether to show a time zone indicator in the calendar."
51
+ },
52
+ "days": {
53
+ "type": "array",
54
+ "description": "An array of days displayed in the current calendar view.",
55
+ "items": {
56
+ "type": "object",
57
+ "properties": {
58
+ "date": {
59
+ "type": "string",
60
+ "description": "The date represented by this day (ISO format string)."
61
+ },
62
+ "isDisabled": {
63
+ "type": "boolean",
64
+ "default": false,
65
+ "description": "Whether this day is disabled."
66
+ },
67
+ "isSelected": {
68
+ "type": "boolean",
69
+ "default": false,
70
+ "description": "Whether this day is currently selected."
71
+ },
72
+ "isRangeStart": {
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "Whether this day is the start of a selected range."
76
+ },
77
+ "isRangeEnd": {
78
+ "type": "boolean",
79
+ "default": false,
80
+ "description": "Whether this day is the end of a selected range."
81
+ },
82
+ "isUnavailable": {
83
+ "type": "boolean",
84
+ "default": false,
85
+ "description": "Whether this day is unavailable for selection. If true, the day appears with a strikethrough."
86
+ },
87
+ "isToday": {
88
+ "type": "boolean",
89
+ "default": false,
90
+ "description": "Whether this day represents the current date."
91
+ },
92
+ "state": {
93
+ "type": "string",
94
+ "enum": [
95
+ "default",
96
+ "hover",
97
+ "keyboard focus"
98
+ ],
99
+ "default": "default",
100
+ "description": "The interaction state of the day cell."
101
+ }
102
+ },
103
+ "required": [
104
+ "date"
105
+ ]
106
+ }
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,238 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/cards.json",
4
+ "title": "Cards",
5
+ "description": "Cards group related content into distinct layouts depending on context.",
6
+ "meta": {
7
+ "category": "containers",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/cards/"
9
+ },
10
+ "type": "object",
11
+ "definitions": {
12
+ "baseCard": {
13
+ "type": "object",
14
+ "properties": {
15
+ "size": {
16
+ "type": "string",
17
+ "enum": ["xs", "s", "m", "l", "xl"],
18
+ "default": "m",
19
+ "description": "Overall size of the card."
20
+ },
21
+ "state": {
22
+ "type": "string",
23
+ "enum": ["default", "hover", "pending"],
24
+ "default": "default",
25
+ "description": "Interaction state of the card."
26
+ },
27
+ "isSelected": {
28
+ "type": "boolean",
29
+ "default": false,
30
+ "description": "Whether the card is selected."
31
+ },
32
+ "isQuiet": {
33
+ "type": "boolean",
34
+ "default": false,
35
+ "description": "Applies a quiet visual style."
36
+ },
37
+ "isDisabled": {
38
+ "type": "boolean",
39
+ "default": false,
40
+ "description": "Whether the card is disabled."
41
+ },
42
+ "hideCheckbox": {
43
+ "type": "boolean",
44
+ "default": false,
45
+ "description": "If true, the selection checkbox is hidden."
46
+ },
47
+ "actionLabel": {
48
+ "type": "string",
49
+ "description": "Optional action button label."
50
+ },
51
+ "metadata": {
52
+ "type": "string",
53
+ "description": "Optional metadata shown below the card."
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "properties": {
59
+ "variant": {
60
+ "type": "string",
61
+ "enum": [
62
+ "asset",
63
+ "collection",
64
+ "flex",
65
+ "gallery",
66
+ "horizontal",
67
+ "product"
68
+ ],
69
+ "default": "asset",
70
+ "description": "Determines which card layout variant is used."
71
+ }
72
+ },
73
+ "oneOf": [
74
+ {
75
+ "allOf": [
76
+ {
77
+ "$ref": "#/definitions/baseCard"
78
+ },
79
+ {
80
+ "properties": {
81
+ "variant": {
82
+ "const": "asset"
83
+ },
84
+ "title": {
85
+ "type": "string"
86
+ },
87
+ "description": {
88
+ "type": "string"
89
+ },
90
+ "image": {
91
+ "type": "string",
92
+ "description": "Preview image."
93
+ },
94
+ "previewVariant": {
95
+ "type": "string",
96
+ "enum": [
97
+ "full-bleed",
98
+ "half-horizontal",
99
+ "two-thirds-horizontal",
100
+ "half-vertical",
101
+ "two-thirds-vertical"
102
+ ],
103
+ "default": "full-bleed",
104
+ "description": "Layout style for the preview image."
105
+ }
106
+ },
107
+ "required": ["image"]
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "allOf": [
113
+ {
114
+ "$ref": "#/definitions/baseCard"
115
+ },
116
+ {
117
+ "properties": {
118
+ "variant": {
119
+ "const": "collection"
120
+ },
121
+ "title": {
122
+ "type": "string"
123
+ },
124
+ "description": {
125
+ "type": "string"
126
+ },
127
+ "collectionName": {
128
+ "type": "string"
129
+ },
130
+ "itemCount": {
131
+ "type": "number"
132
+ }
133
+ },
134
+ "required": ["collectionName"]
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "allOf": [
140
+ {
141
+ "$ref": "#/definitions/baseCard"
142
+ },
143
+ {
144
+ "properties": {
145
+ "variant": {
146
+ "const": "flex"
147
+ },
148
+ "title": {
149
+ "type": "string"
150
+ },
151
+ "description": {
152
+ "type": "string"
153
+ },
154
+ "content": {
155
+ "type": "string",
156
+ "description": "Flexible card content."
157
+ }
158
+ }
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "properties": {
164
+ "variant": {
165
+ "const": "gallery"
166
+ },
167
+ "images": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ },
172
+ "description": "Image URLs for gallery display."
173
+ }
174
+ },
175
+ "required": ["images"],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "allOf": [
180
+ {
181
+ "$ref": "#/definitions/baseCard"
182
+ },
183
+ {
184
+ "properties": {
185
+ "variant": {
186
+ "const": "horizontal"
187
+ },
188
+ "title": {
189
+ "type": "string"
190
+ },
191
+ "description": {
192
+ "type": "string"
193
+ },
194
+ "thumbnail": {
195
+ "type": "string",
196
+ "description": "Thumbnail image on left or right."
197
+ },
198
+ "details": {
199
+ "type": "string",
200
+ "description": "Supporting text beside thumbnail."
201
+ }
202
+ }
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "allOf": [
208
+ {
209
+ "$ref": "#/definitions/baseCard"
210
+ },
211
+ {
212
+ "properties": {
213
+ "variant": {
214
+ "const": "product"
215
+ },
216
+ "title": {
217
+ "type": "string"
218
+ },
219
+ "description": {
220
+ "type": "string"
221
+ },
222
+ "productName": {
223
+ "type": "string"
224
+ },
225
+ "price": {
226
+ "type": "string"
227
+ },
228
+ "thumbnail": {
229
+ "type": "string",
230
+ "description": "Thumbnail for the product."
231
+ }
232
+ },
233
+ "required": ["productName", "price", "thumbnail"]
234
+ }
235
+ ]
236
+ }
237
+ ]
238
+ }
@@ -39,7 +39,7 @@
39
39
  "type": "boolean",
40
40
  "default": false
41
41
  },
42
- "description": {
42
+ "description": {
43
43
  "type": "string"
44
44
  },
45
45
  "errorMessage": {
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/coach-mark.json",
4
+ "title": "Coach mark",
5
+ "description": "Coach marks provide contextual guidance to users by highlighting specific interface elements.",
6
+ "meta": {
7
+ "category": "feedback",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/coach-mark/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "title": {
13
+ "type": "string"
14
+ },
15
+ "description": {
16
+ "type": "string"
17
+ },
18
+ "hideImage": {
19
+ "type": "boolean",
20
+ "default": false,
21
+ "description": "Optional image to display in dialog."
22
+ },
23
+ "actions": {
24
+ "type": "object",
25
+ "description": "Configuration for coach mark actions.",
26
+ "properties": {
27
+ "topActionLabel": {
28
+ "type": "string",
29
+ "description": "Optional action button displayed at the top, often for a menu."
30
+ },
31
+ "footerContent": {
32
+ "type": "string",
33
+ "description": "Optional footer content to display in the dialog footer like a checkbox."
34
+ },
35
+ "primaryActionLabel": {
36
+ "type": "string",
37
+ "description": "Label for the primary footer action."
38
+ },
39
+ "secondaryActionLabel": {
40
+ "type": "string",
41
+ "description": "Label for the secondary footer action (optional)."
42
+ },
43
+ "cancelActionLabel": {
44
+ "type": "string",
45
+ "default": "cancel",
46
+ "description": "Label for the cancel action (optional)."
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -1,31 +1,31 @@
1
1
  {
2
- "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
- "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/color-handle.json",
4
- "title": "Color handle",
5
- "description": "Color handles allow users to select and adjust colors in a color picker.",
6
- "meta": {
7
- "category": "inputs",
8
- "documentationUrl": "https://spectrum.adobe.com/page/color-handle/"
2
+ "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
3
+ "$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/color-handle.json",
4
+ "title": "Color handle",
5
+ "description": "Color handles allow users to select and adjust colors in a color picker.",
6
+ "meta": {
7
+ "category": "inputs",
8
+ "documentationUrl": "https://spectrum.adobe.com/page/color-handle/"
9
+ },
10
+ "type": "object",
11
+ "properties": {
12
+ "channel": {
13
+ "type": "string",
14
+ "enum": [
15
+ "hue",
16
+ "saturation",
17
+ "lightness",
18
+ "red",
19
+ "green",
20
+ "blue",
21
+ "alpha"
22
+ ],
23
+ "default": "hue",
24
+ "description": "Which channel of the color this handle controls. Use 'alpha' for opacity."
9
25
  },
10
- "type": "object",
11
- "properties": {
12
- "channel": {
13
- "type": "string",
14
- "enum": [
15
- "hue",
16
- "saturation",
17
- "lightness",
18
- "red",
19
- "green",
20
- "blue",
21
- "alpha"
22
- ],
23
- "default": "hue",
24
- "description": "Which channel of the color this handle controls. Use 'alpha' for opacity."
25
- },
26
- "isDisabled": {
27
- "type": "boolean",
28
- "default": false
29
- }
26
+ "isDisabled": {
27
+ "type": "boolean",
28
+ "default": false
30
29
  }
30
+ }
31
31
  }
@@ -15,10 +15,18 @@
15
15
  },
16
16
  "channel": {
17
17
  "type": "string",
18
- "enum": ["hue", "saturation", "lightness", "red", "green", "blue", "alpha"],
18
+ "enum": [
19
+ "hue",
20
+ "saturation",
21
+ "lightness",
22
+ "red",
23
+ "green",
24
+ "blue",
25
+ "alpha"
26
+ ],
19
27
  "default": "hue",
20
28
  "description": "Which channel of the color this slider controls. Use 'alpha' for opacity."
21
- },
29
+ },
22
30
  "value": {
23
31
  "type": "number",
24
32
  "description": "Number (from minValue to maxValue)."