@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
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-074",
6
+ "severity": "error",
7
+ "message_pattern": ".*focus-indicator.*button.*present in state 'focus'.*not a declared state.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "tokens": [],
3
+ "components": [
4
+ {
5
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
6
+ "name": "button",
7
+ "displayName": "Button",
8
+ "meta": {
9
+ "category": "actions",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
11
+ },
12
+ "states": [
13
+ {
14
+ "name": "hover",
15
+ "trigger": "interaction"
16
+ },
17
+ {
18
+ "name": "focus",
19
+ "trigger": "interaction"
20
+ }
21
+ ],
22
+ "anatomy": [
23
+ {
24
+ "name": "container",
25
+ "description": "Background.",
26
+ "required": true
27
+ },
28
+ {
29
+ "name": "focus-indicator",
30
+ "description": "Outline drawn outside the container for keyboard focus.",
31
+ "presentIn": ["hover"]
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "visuals": [
37
+ {
38
+ "component": "button",
39
+ "root": "container",
40
+ "parts": {
41
+ "container": {
42
+ "kind": "box"
43
+ },
44
+ "focus-indicator": {
45
+ "kind": "ring",
46
+ "visibleWhen": {
47
+ "states": ["focus"]
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-075",
6
+ "severity": "error",
7
+ "message_pattern": ".*focus-indicator.*button.*visible in keyboard-focus.*presentIn lists hover.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "component-height-100"
6
+ },
7
+ "uuid": "76000000-0000-4000-8000-000000000001",
8
+ "value": "32px"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
14
+ "name": "button",
15
+ "displayName": "Button",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
19
+ },
20
+ "anatomy": [
21
+ {
22
+ "name": "container",
23
+ "description": "Background.",
24
+ "required": true
25
+ }
26
+ ],
27
+ "options": {
28
+ "size": {
29
+ "type": "string",
30
+ "default": "m",
31
+ "values": [
32
+ {
33
+ "value": "m"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ "relationships": [],
41
+ "visuals": [
42
+ {
43
+ "component": "button",
44
+ "root": "container",
45
+ "sizeScale": {
46
+ "m": 100
47
+ },
48
+ "parts": {
49
+ "container": {
50
+ "kind": "box",
51
+ "props": {
52
+ "height": {
53
+ "token": {
54
+ "property": "component-height-100"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-076",
6
+ "severity": "warning",
7
+ "message_pattern": ".*button.*platform 'fixture-drop'.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-drop",
4
+ "foundationVersion": "3.7.0",
5
+ "exclude": ["property=component-height-100"]
6
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "component-height-100"
6
+ },
7
+ "uuid": "76000000-0000-4000-8000-000000000001",
8
+ "value": "32px"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
14
+ "name": "button",
15
+ "displayName": "Button",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
19
+ },
20
+ "anatomy": [
21
+ {
22
+ "name": "container",
23
+ "description": "Background.",
24
+ "required": true
25
+ }
26
+ ],
27
+ "options": {
28
+ "size": {
29
+ "type": "string",
30
+ "default": "m",
31
+ "values": [
32
+ {
33
+ "value": "m"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ "relationships": [],
41
+ "visuals": [
42
+ {
43
+ "component": "button",
44
+ "root": "container",
45
+ "sizeScale": {
46
+ "m": 100
47
+ },
48
+ "parts": {
49
+ "container": {
50
+ "kind": "box",
51
+ "props": {
52
+ "height": {
53
+ "token": {
54
+ "property": "component-height-100"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-079",
6
+ "severity": "warning",
7
+ "message_pattern": ".*button-fixture.*fixture-unresolved.*component-missing-100.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-unresolved",
4
+ "foundationVersion": "3.7.0",
5
+ "extensions": {
6
+ "components": [
7
+ {
8
+ "name": "button-fixture",
9
+ "displayName": "Button fixture",
10
+ "meta": {
11
+ "category": "actions"
12
+ },
13
+ "anatomy": [
14
+ {
15
+ "name": "container",
16
+ "description": "Background.",
17
+ "required": true
18
+ }
19
+ ],
20
+ "options": {
21
+ "size": {
22
+ "type": "string",
23
+ "default": "m",
24
+ "values": [
25
+ {
26
+ "value": "m"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
32
+ ],
33
+ "visuals": [
34
+ {
35
+ "file": "extensions/visuals/button-fixture.json",
36
+ "recipe": {
37
+ "component": "button-fixture",
38
+ "root": "container",
39
+ "sizeScale": {
40
+ "m": 100
41
+ },
42
+ "parts": {
43
+ "container": {
44
+ "kind": "box",
45
+ "props": {
46
+ "height": {
47
+ "token": {
48
+ "property": "component-missing-100"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "component-height-100"
6
+ },
7
+ "uuid": "76000000-0000-4000-8000-000000000001",
8
+ "value": "32px"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
14
+ "name": "button",
15
+ "displayName": "Button",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
19
+ },
20
+ "anatomy": [
21
+ {
22
+ "name": "container",
23
+ "description": "Background.",
24
+ "required": true
25
+ }
26
+ ],
27
+ "options": {
28
+ "size": {
29
+ "type": "string",
30
+ "default": "m",
31
+ "values": [
32
+ {
33
+ "value": "m"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ "relationships": [],
41
+ "visuals": [
42
+ {
43
+ "component": "button",
44
+ "root": "container",
45
+ "sizeScale": {
46
+ "m": 100
47
+ },
48
+ "parts": {
49
+ "container": {
50
+ "kind": "box",
51
+ "props": {
52
+ "height": {
53
+ "token": {
54
+ "property": "component-height-100"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-080",
6
+ "severity": "info",
7
+ "message_pattern": ".*button.*fixture-replace.*replaces the foundation recipe.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-replace",
4
+ "foundationVersion": "3.7.0",
5
+ "extensions": {
6
+ "components": [],
7
+ "visuals": [
8
+ {
9
+ "file": "extensions/visuals/button.json",
10
+ "recipe": {
11
+ "component": "button",
12
+ "root": "container",
13
+ "sizeScale": {
14
+ "m": 100
15
+ },
16
+ "parts": {
17
+ "container": {
18
+ "kind": "box",
19
+ "props": {
20
+ "height": {
21
+ "token": {
22
+ "property": "component-height-100"
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ]
31
+ }
32
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "component-height-100"
6
+ },
7
+ "uuid": "76000000-0000-4000-8000-000000000001",
8
+ "value": "32px"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
14
+ "name": "button",
15
+ "displayName": "Button",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
19
+ },
20
+ "anatomy": [
21
+ {
22
+ "name": "container",
23
+ "description": "Background.",
24
+ "required": true
25
+ }
26
+ ],
27
+ "options": {
28
+ "size": {
29
+ "type": "string",
30
+ "default": "m",
31
+ "values": [
32
+ {
33
+ "value": "m"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ "relationships": [],
41
+ "visuals": [
42
+ {
43
+ "component": "button",
44
+ "root": "container",
45
+ "sizeScale": {
46
+ "m": 100
47
+ },
48
+ "parts": {
49
+ "container": {
50
+ "kind": "box",
51
+ "props": {
52
+ "height": {
53
+ "token": {
54
+ "property": "component-height-100"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-081",
6
+ "severity": "error",
7
+ "message_pattern": ".*button.*fixture-alias.*button-missing.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-alias",
4
+ "foundationVersion": "3.7.0",
5
+ "componentAliases": { "button": "button-missing" },
6
+ "extensions": { "components": [] }
7
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "property": "component-height-100"
6
+ },
7
+ "uuid": "76000000-0000-4000-8000-000000000001",
8
+ "value": "32px"
9
+ }
10
+ ],
11
+ "components": [
12
+ {
13
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
14
+ "name": "button",
15
+ "displayName": "Button",
16
+ "meta": {
17
+ "category": "actions",
18
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
19
+ },
20
+ "anatomy": [
21
+ {
22
+ "name": "container",
23
+ "description": "Background.",
24
+ "required": true
25
+ }
26
+ ],
27
+ "options": {
28
+ "size": {
29
+ "type": "string",
30
+ "default": "m",
31
+ "values": [
32
+ {
33
+ "value": "m"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ "relationships": [],
41
+ "visuals": [
42
+ {
43
+ "component": "button",
44
+ "root": "container",
45
+ "sizeScale": {
46
+ "m": 100
47
+ },
48
+ "parts": {
49
+ "container": {
50
+ "kind": "box",
51
+ "props": {
52
+ "height": {
53
+ "token": {
54
+ "property": "component-height-100"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-082",
6
+ "severity": "error",
7
+ "message_pattern": ".*fixture-apply.*failed to apply.*no-such-mode-set.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-apply",
4
+ "foundationVersion": "3.7.0",
5
+ "extensions": {
6
+ "platformExtensions": [
7
+ {
8
+ "platform": "fixture-apply",
9
+ "extends": "no-such-mode-set",
10
+ "termId": "x"
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "tokens": [],
3
+ "components": [
4
+ {
5
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
6
+ "name": "button",
7
+ "displayName": "Button",
8
+ "meta": {
9
+ "category": "actions",
10
+ "documentationUrl": "https://spectrum.adobe.com/page/button/"
11
+ },
12
+ "states": [
13
+ {
14
+ "name": "hover",
15
+ "trigger": "interaction"
16
+ },
17
+ {
18
+ "name": "focus",
19
+ "trigger": "interaction"
20
+ }
21
+ ],
22
+ "anatomy": [
23
+ {
24
+ "name": "container",
25
+ "description": "Background.",
26
+ "required": true
27
+ }
28
+ ]
29
+ }
30
+ ],
31
+ "visuals": [
32
+ {
33
+ "component": "button",
34
+ "root": "container",
35
+ "parts": {
36
+ "container": {
37
+ "kind": "box",
38
+ "props": {
39
+ "minWidth": {
40
+ "value": 0.5
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-083",
6
+ "severity": "warning",
7
+ "message_pattern": ".*Part 'container' \\(root\\).*binds 'minWidth'.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "relationships": [
3
+ {
4
+ "scope": { "component": "button", "property": "background-color" },
5
+ "value": "#ff0000"
6
+ }
7
+ ],
8
+ "components": [
9
+ {
10
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
11
+ "name": "button",
12
+ "displayName": "Button",
13
+ "meta": { "category": "actions" }
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-084",
6
+ "severity": "error",
7
+ "message_pattern": ".*has no uuid.*button.*background-color.*"
8
+ }
9
+ ]
10
+ }
@@ -20,7 +20,7 @@
20
20
  },
21
21
  {
22
22
  "name": {
23
- "anatomy": "focus-ring",
23
+ "anatomy": "focus-indicator",
24
24
  "property": "gap"
25
25
  },
26
26
  "value": "2px"
@@ -12,7 +12,7 @@
12
12
  },
13
13
  {
14
14
  "name": {
15
- "anatomy": "focus-ring",
15
+ "anatomy": "focus-indicator",
16
16
  "property": "gap"
17
17
  },
18
18
  "value": "2px"