@adobe/design-data-spec 4.8.1 → 4.10.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 (87) 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 +4 -2
  36. package/conformance/invalid/SPEC-073/dataset.json +59 -0
  37. package/conformance/invalid/SPEC-073/expected-errors.json +10 -0
  38. package/conformance/invalid/SPEC-074/dataset.json +36 -0
  39. package/conformance/invalid/SPEC-074/expected-errors.json +10 -0
  40. package/conformance/invalid/SPEC-075/dataset.json +53 -0
  41. package/conformance/invalid/SPEC-075/expected-errors.json +10 -0
  42. package/conformance/invalid/SPEC-076/dataset.json +62 -0
  43. package/conformance/invalid/SPEC-076/expected-errors.json +10 -0
  44. package/conformance/invalid/SPEC-076/manifest.json +6 -0
  45. package/conformance/invalid/SPEC-079/dataset.json +62 -0
  46. package/conformance/invalid/SPEC-079/expected-errors.json +10 -0
  47. package/conformance/invalid/SPEC-079/manifest.json +58 -0
  48. package/conformance/invalid/SPEC-080/dataset.json +62 -0
  49. package/conformance/invalid/SPEC-080/expected-errors.json +10 -0
  50. package/conformance/invalid/SPEC-080/manifest.json +32 -0
  51. package/conformance/invalid/SPEC-081/dataset.json +62 -0
  52. package/conformance/invalid/SPEC-081/expected-errors.json +10 -0
  53. package/conformance/invalid/SPEC-081/manifest.json +7 -0
  54. package/conformance/invalid/SPEC-082/dataset.json +62 -0
  55. package/conformance/invalid/SPEC-082/expected-errors.json +10 -0
  56. package/conformance/invalid/SPEC-082/manifest.json +14 -0
  57. package/conformance/invalid/SPEC-083/dataset.json +47 -0
  58. package/conformance/invalid/SPEC-083/expected-errors.json +10 -0
  59. package/conformance/invalid/SPEC-084/dataset.json +16 -0
  60. package/conformance/invalid/SPEC-084/expected-errors.json +10 -0
  61. package/conformance/valid/SPEC-025/dataset.json +1 -1
  62. package/conformance/valid/SPEC-049/dataset.json +1 -1
  63. package/conformance/valid/SPEC-051/dataset.json +40 -9
  64. package/conformance/valid/SPEC-064/dataset.json +64 -0
  65. package/conformance/valid/SPEC-064/expected-errors.json +4 -0
  66. package/conformance/valid/SPEC-065/dataset.json +89 -0
  67. package/conformance/valid/SPEC-065/expected-errors.json +4 -0
  68. package/conformance/valid/SPEC-079/dataset.json +62 -0
  69. package/conformance/valid/SPEC-079/manifest.json +58 -0
  70. package/package.json +1 -1
  71. package/rules/rules.yaml +358 -0
  72. package/schemas/anatomy-part.schema.json +11 -0
  73. package/schemas/component-changelog.schema.json +306 -0
  74. package/schemas/component-spec-sheet.schema.json +222 -0
  75. package/schemas/component-visual.schema.json +287 -0
  76. package/schemas/component.schema.json +80 -0
  77. package/schemas/manifest.schema.json +5 -0
  78. package/schemas/relationship.schema.json +8 -6
  79. package/spec/anatomy-format.md +97 -10
  80. package/spec/artifact-moves.md +157 -0
  81. package/spec/component-changelog.md +49 -0
  82. package/spec/component-format.md +4 -0
  83. package/spec/component-visuals.md +210 -0
  84. package/spec/index.md +5 -0
  85. package/spec/manifest.md +37 -21
  86. package/spec/option-constraints.md +87 -0
  87. package/spec/relationship-format.md +14 -11
@@ -5,16 +5,23 @@
5
5
  "component": "button",
6
6
  "part": "label",
7
7
  "property": "background-color",
8
- "options": { "style": "fill", "state": ["hover"] }
8
+ "options": {
9
+ "style": "fill",
10
+ "state": ["hover"]
11
+ }
9
12
  },
10
13
  "value": "#ff0000",
11
14
  "uuid": "33333333-3333-3333-3333-333333333333",
12
15
  "legacyKey": "button-label-background-color-fill-hover"
13
16
  },
14
17
  {
15
- "scope": { "component": "button", "property": "border-color" },
18
+ "scope": {
19
+ "component": "button",
20
+ "property": "border-color"
21
+ },
16
22
  "context": "informative border color",
17
- "$ref": "33333333-3333-3333-3333-333333333333"
23
+ "$ref": "33333333-3333-3333-3333-333333333333",
24
+ "uuid": "4e242f61-d33d-53e0-b6ae-c21ed87ab4d0"
18
25
  }
19
26
  ],
20
27
  "components": [
@@ -22,20 +29,44 @@
22
29
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/button.json",
23
30
  "name": "button",
24
31
  "displayName": "Button",
25
- "meta": { "category": "actions" },
32
+ "meta": {
33
+ "category": "actions"
34
+ },
26
35
  "anatomy": [
27
- { "name": "icon", "description": "Leading icon." },
28
- { "name": "label", "description": "Button text.", "required": true }
36
+ {
37
+ "name": "icon",
38
+ "description": "Leading icon."
39
+ },
40
+ {
41
+ "name": "label",
42
+ "description": "Button text.",
43
+ "required": true
44
+ }
29
45
  ],
30
46
  "options": {
31
47
  "style": {
32
48
  "type": "enum",
33
- "values": [{ "value": "fill" }, { "value": "outline" }]
49
+ "values": [
50
+ {
51
+ "value": "fill"
52
+ },
53
+ {
54
+ "value": "outline"
55
+ }
56
+ ]
34
57
  }
35
58
  },
36
59
  "states": [
37
- { "name": "hover", "trigger": "interaction", "precedence": 50 },
38
- { "name": "disabled", "trigger": "prop", "precedence": 100 }
60
+ {
61
+ "name": "hover",
62
+ "trigger": "interaction",
63
+ "precedence": 50
64
+ },
65
+ {
66
+ "name": "disabled",
67
+ "trigger": "prop",
68
+ "precedence": 100
69
+ }
39
70
  ]
40
71
  }
41
72
  ]
@@ -0,0 +1,64 @@
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
+ "style": "outline"
44
+ },
45
+ "require": {
46
+ "variant": ["primary"]
47
+ },
48
+ "severity": "error"
49
+ },
50
+ {
51
+ "when": {
52
+ "isLabelHidden": true
53
+ },
54
+ "require": {
55
+ "icon": {
56
+ "present": true
57
+ }
58
+ },
59
+ "severity": "error"
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": []
4
+ }
@@ -0,0 +1,89 @@
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
+ "style": "outline"
44
+ },
45
+ "require": {
46
+ "variant": ["primary"]
47
+ },
48
+ "severity": "error"
49
+ },
50
+ {
51
+ "when": {
52
+ "isLabelHidden": true
53
+ },
54
+ "require": {
55
+ "icon": {
56
+ "present": true
57
+ }
58
+ },
59
+ "severity": "error"
60
+ }
61
+ ]
62
+ }
63
+ ],
64
+ "relationships": [
65
+ {
66
+ "scope": {
67
+ "component": "button",
68
+ "property": "background-color",
69
+ "options": {
70
+ "variant": "accent"
71
+ }
72
+ },
73
+ "value": "#ff0000",
74
+ "uuid": "180823cc-5404-54c9-97e8-a5c0a401cb09"
75
+ },
76
+ {
77
+ "scope": {
78
+ "component": "button",
79
+ "property": "background-color",
80
+ "options": {
81
+ "style": "outline",
82
+ "variant": "primary"
83
+ }
84
+ },
85
+ "value": "#ff0000",
86
+ "uuid": "f92bfa48-5e24-5603-8553-fa3c35efd784"
87
+ }
88
+ ]
89
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": []
4
+ }
@@ -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,58 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "platform": "fixture-resolves",
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-height-100"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-spec",
3
- "version": "4.8.1",
3
+ "version": "4.10.0",
4
4
  "description": "Design Data Specification — prose, JSON Schemas, rule catalog, and conformance fixtures for the design data format",
5
5
  "type": "module",
6
6
  "repository": {