@adobe/spectrum-component-api-schemas 1.0.1 → 2.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.
- package/CHANGELOG.md +16 -0
- package/moon.yml +1 -1
- package/package.json +1 -1
- package/schemas/components/avatar.json +18 -5
- package/schemas/components/badge.json +20 -1
- package/schemas/components/checkbox.json +1 -4
- package/schemas/components/coach-indicator.json +34 -0
- package/schemas/components/in-field-progress-button.json +31 -0
- package/schemas/components/in-field-progress-circle.json +22 -0
- package/schemas/components/meter.json +1 -1
- package/schemas/components/opacity-checkerboard.json +21 -0
- package/schemas/components/radio-button.json +30 -0
- package/schemas/components/thumbnail.json +22 -0
- package/test/performance.test.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @adobe/spectrum-component-api-schemas
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#581](https://github.com/adobe/spectrum-tokens/pull/581) [`163fe7c`](https://github.com/adobe/spectrum-tokens/commit/163fe7c13bb00c639d202195a398126b6c25b58f) Thanks [@GarthDB](https://github.com/GarthDB)! - feat(component-schemas): add S2 Batch 2 components with breaking changes
|
|
8
|
+
- Add 6 new component schemas (coach-indicator, in-field-progress-button, etc.)
|
|
9
|
+
- Update avatar, badge, and checkbox components with breaking changes
|
|
10
|
+
- Expand size options and add new interaction states
|
|
11
|
+
- Major version bump required due to breaking schema changes
|
|
12
|
+
|
|
13
|
+
## 1.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#545](https://github.com/adobe/spectrum-tokens/pull/545) [`ebc79f6`](https://github.com/adobe/spectrum-tokens/commit/ebc79f6f91bce28a64cddfc2cc5548ddcf30389d) Thanks [@GarthDB](https://github.com/GarthDB)! - Fixed a typo where meter had `valueLable` instead of `valueLabel`.
|
|
18
|
+
|
|
3
19
|
## 1.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/moon.yml
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
9
|
# governing permissions and limitations under the License.
|
|
10
10
|
$schema: "https://moonrepo.dev/schemas/project.json"
|
|
11
|
-
|
|
11
|
+
layer: library
|
|
12
12
|
fileGroups:
|
|
13
13
|
schemas:
|
|
14
14
|
- "schemas/**/*.{yaml,yml,json}"
|
package/package.json
CHANGED
|
@@ -11,21 +11,34 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"size": {
|
|
13
13
|
"type": "number",
|
|
14
|
-
"enum": [
|
|
15
|
-
|
|
14
|
+
"enum": [
|
|
15
|
+
50, 75, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200,
|
|
16
|
+
1300, 1400, 1500
|
|
17
|
+
],
|
|
18
|
+
"default": 500
|
|
16
19
|
},
|
|
17
20
|
"image": {
|
|
18
21
|
"type": "string",
|
|
19
|
-
"enum": [
|
|
20
|
-
|
|
22
|
+
"enum": [
|
|
23
|
+
"user image",
|
|
24
|
+
"gradient image",
|
|
25
|
+
"gradient",
|
|
26
|
+
"guest image",
|
|
27
|
+
"initials"
|
|
28
|
+
],
|
|
29
|
+
"default": "user image"
|
|
21
30
|
},
|
|
22
31
|
"isDisabled": {
|
|
23
32
|
"type": "boolean",
|
|
24
33
|
"default": false
|
|
25
34
|
},
|
|
35
|
+
"showStroke": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": false
|
|
38
|
+
},
|
|
26
39
|
"state": {
|
|
27
40
|
"type": "string",
|
|
28
|
-
"enum": ["default", "
|
|
41
|
+
"enum": ["default", "down", "keyboard focus"],
|
|
29
42
|
"default": "default"
|
|
30
43
|
}
|
|
31
44
|
}
|
|
@@ -28,9 +28,28 @@
|
|
|
28
28
|
"magenta",
|
|
29
29
|
"fuchsia",
|
|
30
30
|
"purple",
|
|
31
|
-
"seafoam"
|
|
31
|
+
"seafoam",
|
|
32
|
+
"accent",
|
|
33
|
+
"notice",
|
|
34
|
+
"gray",
|
|
35
|
+
"red",
|
|
36
|
+
"orange",
|
|
37
|
+
"chartreuse",
|
|
38
|
+
"celery",
|
|
39
|
+
"green",
|
|
40
|
+
"cyan",
|
|
41
|
+
"blue",
|
|
42
|
+
"pink",
|
|
43
|
+
"turquoise",
|
|
44
|
+
"brown",
|
|
45
|
+
"cinnamon",
|
|
46
|
+
"silver"
|
|
32
47
|
]
|
|
33
48
|
},
|
|
49
|
+
"style": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["bold", "subtle", "outline"]
|
|
52
|
+
},
|
|
34
53
|
"fixed": {
|
|
35
54
|
"type": "string",
|
|
36
55
|
"enum": ["none", "top", "right", "bottom", "left"],
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/coach-indicator.json",
|
|
4
|
+
"title": "Coach indicator",
|
|
5
|
+
"description": "Coach indicators help guide users through interfaces by highlighting important areas or features during onboarding and feature discovery.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "feedback",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/coach-indicator/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"cornerRounding": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"none",
|
|
16
|
+
"corner-radius-75",
|
|
17
|
+
"corner-radius-100",
|
|
18
|
+
"corner-radius-200",
|
|
19
|
+
"corner-radius-300",
|
|
20
|
+
"corner-radius-400",
|
|
21
|
+
"corner-radius-500",
|
|
22
|
+
"corner-radius-600",
|
|
23
|
+
"corner-radius-700",
|
|
24
|
+
"corner-radius-800",
|
|
25
|
+
"full"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"staticColor": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["white"],
|
|
31
|
+
"description": "If not set to white, the coach indicator uses the default color."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/in-field-progress-button.json",
|
|
4
|
+
"title": "In field progress button",
|
|
5
|
+
"description": "In field progress buttons provide interactive controls within form fields for actions like clearing, adding, or disclosing additional content.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "actions",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/in-field-progress-button/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"size": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["s", "m", "l", "xl"],
|
|
15
|
+
"default": "m"
|
|
16
|
+
},
|
|
17
|
+
"state": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["default", "hover", "down", "keyboard focus"],
|
|
20
|
+
"default": "default"
|
|
21
|
+
},
|
|
22
|
+
"style": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["disclosure", "clear", "dash", "add"]
|
|
25
|
+
},
|
|
26
|
+
"isQuiet": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/in-field-progress-circle.json",
|
|
4
|
+
"title": "In field progress circle",
|
|
5
|
+
"description": "In field progress circles indicate progress for loading states within form fields and input areas.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "feedback",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/in-field-progress-circle/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"size": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["s", "m", "l", "xl"],
|
|
15
|
+
"default": "m"
|
|
16
|
+
},
|
|
17
|
+
"staticColor": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["white", "black"]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/opacity-checkerboard.json",
|
|
4
|
+
"title": "Opacity Checkerboard",
|
|
5
|
+
"description": "Opacity checkerboards provide a visual pattern background used in color swatches and UI elements to indicate transparency or when no color is selected.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "status",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/opacity-checkerboard/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"verticalSize": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"enum": [16, 32, 64, 128, 256]
|
|
15
|
+
},
|
|
16
|
+
"horizontalSize": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"enum": [24, 40]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/radio-button.json",
|
|
4
|
+
"title": "Radio button",
|
|
5
|
+
"description": "Radio buttons allow users to select a single option from a list of mutually exclusive options.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "inputs",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/radio-button/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"state": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["default", "hover", "down", "keyboard focus"],
|
|
15
|
+
"default": "default"
|
|
16
|
+
},
|
|
17
|
+
"isSelected": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"isEmphasized": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": false
|
|
24
|
+
},
|
|
25
|
+
"label": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/component.json",
|
|
3
|
+
"$id": "https://opensource.adobe.com/spectrum-tokens/schemas/components/thumbnail.json",
|
|
4
|
+
"title": "Thumbnail",
|
|
5
|
+
"description": "Thumbnails are small representations of images or content used for previews and navigation in galleries, lists, and media collections.",
|
|
6
|
+
"meta": {
|
|
7
|
+
"category": "navigation",
|
|
8
|
+
"documentationUrl": "https://spectrum.adobe.com/page/thumbnail/"
|
|
9
|
+
},
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"size": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"enum": [50, 75, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]
|
|
15
|
+
},
|
|
16
|
+
"state": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["default", "disabled"],
|
|
19
|
+
"default": "default"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
package/test/performance.test.js
CHANGED
|
@@ -63,10 +63,10 @@ test("getSchemaFile should complete within reasonable time", async (t) => {
|
|
|
63
63
|
const end = performance.now();
|
|
64
64
|
const duration = end - start;
|
|
65
65
|
|
|
66
|
-
// Should complete within
|
|
66
|
+
// Should complete within 200ms (increased for CI environment stability)
|
|
67
67
|
t.true(
|
|
68
|
-
duration <
|
|
69
|
-
`getSchemaFile took ${duration.toFixed(2)}ms, expected <
|
|
68
|
+
duration < 200,
|
|
69
|
+
`getSchemaFile took ${duration.toFixed(2)}ms, expected < 200ms`,
|
|
70
70
|
);
|
|
71
71
|
t.truthy(schema);
|
|
72
72
|
});
|