@adobe/design-data-spec 4.8.0 → 4.9.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 (88) hide show
  1. package/conformance/README.md +32 -9
  2. package/conformance/invalid/SPEC-051/dataset.json +9 -3
  3. package/conformance/invalid/SPEC-052/dataset.json +14 -4
  4. package/conformance/invalid/SPEC-053/dataset.json +16 -4
  5. package/conformance/invalid/SPEC-054/dataset.json +18 -5
  6. package/conformance/invalid/SPEC-055/dataset.json +9 -3
  7. package/conformance/invalid/SPEC-057/dataset.json +5 -2
  8. package/conformance/invalid/SPEC-058/dataset.json +8 -3
  9. package/conformance/invalid/SPEC-059/dataset.json +28 -0
  10. package/conformance/invalid/SPEC-059/expected-errors.json +10 -0
  11. package/conformance/invalid/SPEC-060/dataset.json +44 -0
  12. package/conformance/invalid/SPEC-060/expected-errors.json +10 -0
  13. package/conformance/invalid/SPEC-061/dataset.json +63 -0
  14. package/conformance/invalid/SPEC-061/expected-errors.json +15 -0
  15. package/conformance/invalid/SPEC-062/dataset.json +50 -0
  16. package/conformance/invalid/SPEC-062/expected-errors.json +10 -0
  17. package/conformance/invalid/SPEC-063/dataset.json +57 -0
  18. package/conformance/invalid/SPEC-063/expected-errors.json +10 -0
  19. package/conformance/invalid/SPEC-064/dataset.json +53 -0
  20. package/conformance/invalid/SPEC-064/expected-errors.json +15 -0
  21. package/conformance/invalid/SPEC-065/dataset.json +78 -0
  22. package/conformance/invalid/SPEC-065/expected-errors.json +10 -0
  23. package/conformance/invalid/SPEC-066/dataset.json +37 -0
  24. package/conformance/invalid/SPEC-066/expected-errors.json +10 -0
  25. package/conformance/invalid/SPEC-067/dataset.json +60 -0
  26. package/conformance/invalid/SPEC-067/expected-errors.json +10 -0
  27. package/conformance/invalid/SPEC-068/dataset.json +37 -0
  28. package/conformance/invalid/SPEC-068/expected-errors.json +10 -0
  29. package/conformance/invalid/SPEC-069/dataset.json +63 -0
  30. package/conformance/invalid/SPEC-069/expected-errors.json +10 -0
  31. package/conformance/invalid/SPEC-070/dataset.json +71 -0
  32. package/conformance/invalid/SPEC-070/expected-errors.json +15 -0
  33. package/conformance/invalid/SPEC-071/dataset.json +77 -0
  34. package/conformance/invalid/SPEC-071/expected-errors.json +10 -0
  35. package/conformance/invalid/SPEC-072/dataset.json +52 -0
  36. package/conformance/invalid/SPEC-072/expected-errors.json +10 -0
  37. package/conformance/invalid/SPEC-073/dataset.json +59 -0
  38. package/conformance/invalid/SPEC-073/expected-errors.json +10 -0
  39. package/conformance/invalid/SPEC-074/dataset.json +36 -0
  40. package/conformance/invalid/SPEC-074/expected-errors.json +10 -0
  41. package/conformance/invalid/SPEC-075/dataset.json +53 -0
  42. package/conformance/invalid/SPEC-075/expected-errors.json +10 -0
  43. package/conformance/invalid/SPEC-076/dataset.json +62 -0
  44. package/conformance/invalid/SPEC-076/expected-errors.json +10 -0
  45. package/conformance/invalid/SPEC-076/manifest.json +6 -0
  46. package/conformance/invalid/SPEC-079/dataset.json +62 -0
  47. package/conformance/invalid/SPEC-079/expected-errors.json +10 -0
  48. package/conformance/invalid/SPEC-079/manifest.json +58 -0
  49. package/conformance/invalid/SPEC-080/dataset.json +62 -0
  50. package/conformance/invalid/SPEC-080/expected-errors.json +10 -0
  51. package/conformance/invalid/SPEC-080/manifest.json +32 -0
  52. package/conformance/invalid/SPEC-081/dataset.json +62 -0
  53. package/conformance/invalid/SPEC-081/expected-errors.json +10 -0
  54. package/conformance/invalid/SPEC-081/manifest.json +7 -0
  55. package/conformance/invalid/SPEC-082/dataset.json +62 -0
  56. package/conformance/invalid/SPEC-082/expected-errors.json +10 -0
  57. package/conformance/invalid/SPEC-082/manifest.json +14 -0
  58. package/conformance/invalid/SPEC-083/dataset.json +47 -0
  59. package/conformance/invalid/SPEC-083/expected-errors.json +10 -0
  60. package/conformance/invalid/SPEC-084/dataset.json +16 -0
  61. package/conformance/invalid/SPEC-084/expected-errors.json +10 -0
  62. package/conformance/valid/SPEC-025/dataset.json +1 -1
  63. package/conformance/valid/SPEC-049/dataset.json +1 -1
  64. package/conformance/valid/SPEC-051/dataset.json +40 -9
  65. package/conformance/valid/SPEC-064/dataset.json +64 -0
  66. package/conformance/valid/SPEC-064/expected-errors.json +4 -0
  67. package/conformance/valid/SPEC-065/dataset.json +89 -0
  68. package/conformance/valid/SPEC-065/expected-errors.json +4 -0
  69. package/conformance/valid/SPEC-079/dataset.json +62 -0
  70. package/conformance/valid/SPEC-079/manifest.json +58 -0
  71. package/package.json +1 -1
  72. package/rules/rules.yaml +373 -0
  73. package/schemas/anatomy-part.schema.json +11 -0
  74. package/schemas/component-changelog.schema.json +306 -0
  75. package/schemas/component-spec-sheet.schema.json +215 -0
  76. package/schemas/component-visual.schema.json +287 -0
  77. package/schemas/component.schema.json +80 -0
  78. package/schemas/manifest.schema.json +5 -0
  79. package/schemas/relationship.schema.json +8 -6
  80. package/spec/anatomy-format.md +97 -10
  81. package/spec/artifact-moves.md +157 -0
  82. package/spec/component-changelog.md +49 -0
  83. package/spec/component-format.md +4 -0
  84. package/spec/component-visuals.md +210 -0
  85. package/spec/index.md +5 -0
  86. package/spec/manifest.md +46 -29
  87. package/spec/option-constraints.md +87 -0
  88. package/spec/relationship-format.md +14 -11
@@ -7,15 +7,38 @@ Each **invalid** case lives under `invalid/<RULE_ID>/` with:
7
7
 
8
8
  **Valid** baselines live under `valid/`.
9
9
 
10
- | Folder | Rule | Intent |
11
- | ------------------ | -------- | ------------------------------------------------------- |
12
- | `invalid/SPEC-001` | SPEC-001 | Alias target does not exist. |
13
- | `invalid/SPEC-002` | SPEC-002 | Alias resolves to incompatible type (semantic). |
14
- | `invalid/SPEC-003` | SPEC-003 | Circular alias chain. |
15
- | `invalid/SPEC-004` | SPEC-004 | Duplicate `uuid` across tokens. |
16
- | `invalid/SPEC-005` | SPEC-005 | Mode set `default` not in `modes`. |
17
- | `invalid/SPEC-006` | SPEC-006 | Ambiguous resolution / specificity tie (warning). |
18
- | `invalid/SPEC-008` | SPEC-008 | Non-default mode variants with no base/default variant. |
10
+ | Folder | Rule | Intent |
11
+ | ------------------ | -------- | --------------------------------------------------------------------- |
12
+ | `invalid/SPEC-001` | SPEC-001 | Alias target does not exist. |
13
+ | `invalid/SPEC-002` | SPEC-002 | Alias resolves to incompatible type (semantic). |
14
+ | `invalid/SPEC-003` | SPEC-003 | Circular alias chain. |
15
+ | `invalid/SPEC-004` | SPEC-004 | Duplicate `uuid` across tokens. |
16
+ | `invalid/SPEC-005` | SPEC-005 | Mode set `default` not in `modes`. |
17
+ | `invalid/SPEC-006` | SPEC-006 | Ambiguous resolution / specificity tie (warning). |
18
+ | `invalid/SPEC-008` | SPEC-008 | Non-default mode variants with no base/default variant. |
19
+ | `invalid/SPEC-059` | SPEC-059 | Alias sets a mode that differs from its target's (warning). |
20
+ | `invalid/SPEC-060` | SPEC-060 | Recipe part is not a declared anatomy part. |
21
+ | `invalid/SPEC-061` | SPEC-061 | Recipe condition names an undeclared option. |
22
+ | `invalid/SPEC-062` | SPEC-062 | Recipe relationship selector matches no relationship. |
23
+ | `invalid/SPEC-063` | SPEC-063 | `sizeScale` keys differ from the component's `size` values. |
24
+ | `invalid/SPEC-064` | SPEC-064 | Constraint names an undeclared option or value. |
25
+ | `invalid/SPEC-065` | SPEC-065 | Relationship scope matches only excluded combinations (warning). |
26
+ | `invalid/SPEC-066` | SPEC-066 | Component option the recipe never uses (warning). |
27
+ | `invalid/SPEC-067` | SPEC-067 | Recipe `token` selector duplicates a relationship (warning). |
28
+ | `invalid/SPEC-068` | SPEC-068 | Recipe supplies a literal size (warning). |
29
+ | `invalid/SPEC-069` | SPEC-069 | Recipe binds only a deprecated token (warning). |
30
+ | `invalid/SPEC-070` | SPEC-070 | Recipes name the focus ring part differently (warning). |
31
+ | `invalid/SPEC-071` | SPEC-071 | Relationship contexts the recipe never binds (info). |
32
+ | `invalid/SPEC-072` | SPEC-072 | Relationship repeats a `$ref` that has a scale counterpart (warning). |
33
+ | `invalid/SPEC-073` | SPEC-073 | Components without reviewed anatomy (info). |
34
+ | `invalid/SPEC-074` | SPEC-074 | Anatomy `presentIn` names an undeclared state (warning). |
35
+ | `invalid/SPEC-075` | SPEC-075 | Recipe and anatomy disagree on the states a part shows in (warning). |
36
+ | `invalid/SPEC-076` | SPEC-076 | A platform manifest drops a token a recipe binds (warning). |
37
+ | `invalid/SPEC-079` | SPEC-079 | A platform-owned recipe does not render under the platform (warning). |
38
+ | `invalid/SPEC-080` | SPEC-080 | A platform recipe replaces a foundation recipe (info). |
39
+ | `invalid/SPEC-081` | SPEC-081 | A `componentAliases` entry is invalid (error). |
40
+ | `invalid/SPEC-082` | SPEC-082 | A platform manifest fails to apply (error). |
41
+ | `invalid/SPEC-083` | SPEC-083 | A recipe part binds a prop the renderer does not read (warning). |
19
42
 
20
43
  Implementors SHOULD run these fixtures once the Rust validator exposes rule IDs ([#724](https://github.com/adobe/spectrum-design-data/issues/724), [#725](https://github.com/adobe/spectrum-design-data/issues/725)).
21
44
 
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "relationships": [
3
3
  {
4
- "scope": { "component": "ghost", "property": "background-color" },
5
- "value": "#ff0000"
4
+ "scope": {
5
+ "component": "ghost",
6
+ "property": "background-color"
7
+ },
8
+ "value": "#ff0000",
9
+ "uuid": "e2226979-bba1-5f25-9c6d-5228ce10b098"
6
10
  }
7
11
  ],
8
12
  "components": [
@@ -10,7 +14,9 @@
10
14
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
11
15
  "name": "button",
12
16
  "displayName": "Button",
13
- "meta": { "category": "actions" }
17
+ "meta": {
18
+ "category": "actions"
19
+ }
14
20
  }
15
21
  ]
16
22
  }
@@ -6,7 +6,8 @@
6
6
  "part": "capsule",
7
7
  "property": "background-color"
8
8
  },
9
- "value": "#ff0000"
9
+ "value": "#ff0000",
10
+ "uuid": "70d73e43-63f6-5f44-8e74-181c957cad3c"
10
11
  }
11
12
  ],
12
13
  "components": [
@@ -14,10 +15,19 @@
14
15
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
15
16
  "name": "button",
16
17
  "displayName": "Button",
17
- "meta": { "category": "actions" },
18
+ "meta": {
19
+ "category": "actions"
20
+ },
18
21
  "anatomy": [
19
- { "name": "icon", "description": "Leading icon." },
20
- { "name": "label", "description": "Button text.", "required": true }
22
+ {
23
+ "name": "icon",
24
+ "description": "Leading icon."
25
+ },
26
+ {
27
+ "name": "label",
28
+ "description": "Button text.",
29
+ "required": true
30
+ }
21
31
  ]
22
32
  }
23
33
  ]
@@ -4,9 +4,12 @@
4
4
  "scope": {
5
5
  "component": "button",
6
6
  "property": "background-color",
7
- "options": { "style": "ghost" }
7
+ "options": {
8
+ "style": "ghost"
9
+ }
8
10
  },
9
- "value": "#ff0000"
11
+ "value": "#ff0000",
12
+ "uuid": "b981f911-fd4d-5d36-b27e-818dae817c7d"
10
13
  }
11
14
  ],
12
15
  "components": [
@@ -14,11 +17,20 @@
14
17
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
15
18
  "name": "button",
16
19
  "displayName": "Button",
17
- "meta": { "category": "actions" },
20
+ "meta": {
21
+ "category": "actions"
22
+ },
18
23
  "options": {
19
24
  "style": {
20
25
  "type": "enum",
21
- "values": [{ "value": "fill" }, { "value": "outline" }]
26
+ "values": [
27
+ {
28
+ "value": "fill"
29
+ },
30
+ {
31
+ "value": "outline"
32
+ }
33
+ ]
22
34
  }
23
35
  }
24
36
  }
@@ -4,9 +4,12 @@
4
4
  "scope": {
5
5
  "component": "button",
6
6
  "property": "background-color",
7
- "options": { "state": ["jello"] }
7
+ "options": {
8
+ "state": ["jello"]
9
+ }
8
10
  },
9
- "value": "#ff0000"
11
+ "value": "#ff0000",
12
+ "uuid": "086517d9-47ec-5a21-b65e-d169985c77b1"
10
13
  }
11
14
  ],
12
15
  "components": [
@@ -14,10 +17,20 @@
14
17
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
15
18
  "name": "button",
16
19
  "displayName": "Button",
17
- "meta": { "category": "actions" },
20
+ "meta": {
21
+ "category": "actions"
22
+ },
18
23
  "states": [
19
- { "name": "hover", "trigger": "interaction", "precedence": 50 },
20
- { "name": "disabled", "trigger": "prop", "precedence": 100 }
24
+ {
25
+ "name": "hover",
26
+ "trigger": "interaction",
27
+ "precedence": 50
28
+ },
29
+ {
30
+ "name": "disabled",
31
+ "trigger": "prop",
32
+ "precedence": 100
33
+ }
21
34
  ]
22
35
  }
23
36
  ]
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "relationships": [
3
3
  {
4
- "scope": { "component": "button", "property": "background-color" },
5
- "$ref": "99999999-9999-9999-9999-999999999999"
4
+ "scope": {
5
+ "component": "button",
6
+ "property": "background-color"
7
+ },
8
+ "$ref": "99999999-9999-9999-9999-999999999999",
9
+ "uuid": "3cfca5aa-69b2-5d04-af8c-29c919556a11"
6
10
  }
7
11
  ],
8
12
  "components": [
@@ -10,7 +14,9 @@
10
14
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
11
15
  "name": "button",
12
16
  "displayName": "Button",
13
- "meta": { "category": "actions" }
17
+ "meta": {
18
+ "category": "actions"
19
+ }
14
20
  }
15
21
  ]
16
22
  }
@@ -7,7 +7,8 @@
7
7
  },
8
8
  "value": "#ff0000",
9
9
  "setUuid": "22222222-2222-2222-2222-222222222222",
10
- "setSchema": "color-set"
10
+ "setSchema": "color-set",
11
+ "uuid": "d05a3fcd-4d4b-5970-82e2-544cfb6269b7"
11
12
  }
12
13
  ],
13
14
  "components": [
@@ -15,7 +16,9 @@
15
16
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
16
17
  "name": "button",
17
18
  "displayName": "Button",
18
- "meta": { "category": "actions" }
19
+ "meta": {
20
+ "category": "actions"
21
+ }
19
22
  }
20
23
  ]
21
24
  }
@@ -13,7 +13,9 @@
13
13
  }
14
14
  },
15
15
  {
16
- "name": { "property": "base-padding-vertical-medium" },
16
+ "name": {
17
+ "property": "base-padding-vertical-medium"
18
+ },
17
19
  "value": "5px",
18
20
  "uuid": "aaaaaaaa-0058-4000-8000-000000000002"
19
21
  }
@@ -24,7 +26,8 @@
24
26
  "component": "accordion",
25
27
  "property": "top-to-text-compact-medium"
26
28
  },
27
- "$ref": "aaaaaaaa-0058-4000-8000-000000000001"
29
+ "$ref": "aaaaaaaa-0058-4000-8000-000000000001",
30
+ "uuid": "06de4978-71d2-500c-ba12-e903156a487f"
28
31
  }
29
32
  ],
30
33
  "components": [
@@ -32,7 +35,9 @@
32
35
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/accordion.json",
33
36
  "name": "accordion",
34
37
  "displayName": "Accordion",
35
- "meta": { "category": "actions" }
38
+ "meta": {
39
+ "category": "actions"
40
+ }
36
41
  }
37
42
  ]
38
43
  }
@@ -0,0 +1,28 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "accent-color",
6
+ "colorScheme": "light"
7
+ },
8
+ "value": "#ffffff",
9
+ "uuid": "aaaaaaaa-0059-4000-8000-000000000001"
10
+ },
11
+ {
12
+ "name": {
13
+ "property": "background-color",
14
+ "colorScheme": "dark"
15
+ },
16
+ "$ref": "aaaaaaaa-0059-4000-8000-000000000001",
17
+ "uuid": "aaaaaaaa-0059-4000-8000-000000000002"
18
+ }
19
+ ],
20
+ "components": [],
21
+ "modeSets": [
22
+ {
23
+ "name": "colorScheme",
24
+ "modes": ["light", "dark"],
25
+ "default": "light"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-059",
6
+ "severity": "warning",
7
+ "message_pattern": ".*colorScheme=dark.*colorScheme=light.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
5
+ "name": "button",
6
+ "displayName": "Button",
7
+ "meta": {
8
+ "category": "actions",
9
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
10
+ },
11
+ "anatomy": [
12
+ {
13
+ "name": "container",
14
+ "description": "Background.",
15
+ "required": true,
16
+ "contains": ["label"]
17
+ },
18
+ {
19
+ "name": "label",
20
+ "description": "Text."
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "visuals": [
26
+ {
27
+ "component": "button",
28
+ "root": "container",
29
+ "parts": {
30
+ "container": {
31
+ "kind": "box",
32
+ "children": ["label"]
33
+ },
34
+ "label": {
35
+ "kind": "text"
36
+ },
37
+ "ghost": {
38
+ "kind": "box"
39
+ }
40
+ }
41
+ }
42
+ ],
43
+ "tokens": []
44
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-060",
6
+ "severity": "error",
7
+ "message_pattern": ".*'ghost'.*not a declared anatomy part of 'button'.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
5
+ "name": "button",
6
+ "displayName": "Button",
7
+ "meta": {
8
+ "category": "actions",
9
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
10
+ },
11
+ "anatomy": [
12
+ {
13
+ "name": "container",
14
+ "description": "Background.",
15
+ "required": true,
16
+ "contains": ["label"]
17
+ },
18
+ {
19
+ "name": "label",
20
+ "description": "Text."
21
+ }
22
+ ],
23
+ "options": {
24
+ "isDisabled": {
25
+ "type": "boolean"
26
+ }
27
+ }
28
+ }
29
+ ],
30
+ "visuals": [
31
+ {
32
+ "component": "button",
33
+ "root": "container",
34
+ "parts": {
35
+ "container": {
36
+ "kind": "box",
37
+ "children": ["label"],
38
+ "props": {
39
+ "fill": [
40
+ {
41
+ "when": {
42
+ "options": {
43
+ "tone": "warm"
44
+ }
45
+ },
46
+ "value": "red"
47
+ }
48
+ ],
49
+ "stroke": {
50
+ "token": {
51
+ "variant": "{style}"
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "label": {
57
+ "kind": "text"
58
+ }
59
+ }
60
+ }
61
+ ],
62
+ "tokens": []
63
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-061",
6
+ "severity": "error",
7
+ "message_pattern": ".*'tone'.*not an option of 'button'.*"
8
+ },
9
+ {
10
+ "rule_id": "SPEC-061",
11
+ "severity": "error",
12
+ "message_pattern": ".*Selector template '\\{style\\}' is not an option of 'button'.*"
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
5
+ "name": "button",
6
+ "displayName": "Button",
7
+ "meta": {
8
+ "category": "actions",
9
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
10
+ },
11
+ "anatomy": [
12
+ {
13
+ "name": "container",
14
+ "description": "Background.",
15
+ "required": true,
16
+ "contains": ["label"]
17
+ },
18
+ {
19
+ "name": "label",
20
+ "description": "Text."
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "relationships": [],
26
+ "visuals": [
27
+ {
28
+ "component": "button",
29
+ "root": "container",
30
+ "parts": {
31
+ "container": {
32
+ "kind": "box",
33
+ "children": ["label"],
34
+ "props": {
35
+ "height": {
36
+ "relationship": {
37
+ "property": "component-height-100",
38
+ "context": "Minimum height"
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "label": {
44
+ "kind": "text"
45
+ }
46
+ }
47
+ }
48
+ ],
49
+ "tokens": []
50
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-062",
6
+ "severity": "error",
7
+ "message_pattern": "^No relationship for 'button' with property 'component-height-100' and context 'Minimum height'$"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
5
+ "name": "button",
6
+ "displayName": "Button",
7
+ "meta": {
8
+ "category": "actions",
9
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
10
+ },
11
+ "anatomy": [
12
+ {
13
+ "name": "container",
14
+ "description": "Background.",
15
+ "required": true,
16
+ "contains": ["label"]
17
+ },
18
+ {
19
+ "name": "label",
20
+ "description": "Text."
21
+ }
22
+ ],
23
+ "options": {
24
+ "size": {
25
+ "type": "string",
26
+ "values": [
27
+ {
28
+ "value": "s"
29
+ },
30
+ {
31
+ "value": "m"
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ }
37
+ ],
38
+ "visuals": [
39
+ {
40
+ "component": "button",
41
+ "root": "container",
42
+ "sizeScale": {
43
+ "s": 75
44
+ },
45
+ "parts": {
46
+ "container": {
47
+ "kind": "box",
48
+ "children": ["label"]
49
+ },
50
+ "label": {
51
+ "kind": "text"
52
+ }
53
+ }
54
+ }
55
+ ],
56
+ "tokens": []
57
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-063",
6
+ "severity": "error",
7
+ "message_pattern": ".*'m'.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
5
+ "name": "button",
6
+ "displayName": "Button",
7
+ "meta": {
8
+ "category": "actions"
9
+ },
10
+ "options": {
11
+ "variant": {
12
+ "type": "string",
13
+ "values": [
14
+ {
15
+ "value": "primary"
16
+ },
17
+ {
18
+ "value": "accent"
19
+ }
20
+ ]
21
+ },
22
+ "style": {
23
+ "type": "string",
24
+ "values": [
25
+ {
26
+ "value": "fill"
27
+ },
28
+ {
29
+ "value": "outline"
30
+ }
31
+ ]
32
+ },
33
+ "isLabelHidden": {
34
+ "type": "boolean"
35
+ },
36
+ "icon": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "constraints": [
41
+ {
42
+ "when": {
43
+ "shape": "round"
44
+ },
45
+ "require": {
46
+ "variant": ["primary", "electric"]
47
+ },
48
+ "severity": "error"
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-064",
6
+ "severity": "error",
7
+ "message_pattern": ".*option 'shape' is not declared.*"
8
+ },
9
+ {
10
+ "rule_id": "SPEC-064",
11
+ "severity": "error",
12
+ "message_pattern": ".*\"electric\".*variant.*not declared.*"
13
+ }
14
+ ]
15
+ }