@adobe/spectrum-tokens 12.24.1 → 12.26.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 +12 -0
- package/dist/json/variables.json +6 -2
- package/index.js +52 -0
- package/moon.yml +3 -2
- package/package.json +7 -6
- package/schemas/token-types/alias.json +1 -0
- package/schemas/token-types/color-set.json +7 -2
- package/schemas/token-types/color.json +1 -0
- package/schemas/token-types/dimension.json +1 -0
- package/schemas/token-types/font-family.json +1 -0
- package/schemas/token-types/font-size.json +1 -0
- package/schemas/token-types/font-style.json +1 -0
- package/schemas/token-types/font-weight.json +1 -0
- package/schemas/token-types/multiplier.json +1 -0
- package/schemas/token-types/opacity.json +1 -0
- package/schemas/token-types/scale-set.json +7 -2
- package/schemas/token-types/system-set.json +1 -0
- package/schemas/token-types/text-transform.json +1 -0
- package/schemas/token-types/token.json +6 -1
- package/src/color-aliases.json +136 -68
- package/src/color-component.json +2 -1
- package/src/color-palette.json +619 -213
- package/src/icons.json +109 -55
- package/src/layout-component.json +897 -448
- package/src/layout.json +277 -139
- package/src/semantic-color-palette.json +28 -14
- package/src/typography.json +40 -20
- package/tasks/addIds.js +2 -1
- package/tasks/addPrivate.js +22 -0
- package/tasks/diff.js +2 -2
- package/test/checkComponentProps.js +25 -0
- package/test/checkId.test.js +24 -38
- package/test/checkManifest.test.js +1 -1
- package/test/checkPrivate.js +22 -0
- package/test/checkUniqueTokenNames.js +32 -0
- package/test/componentSchemaValidator.test.js +1 -1
- package/test/deprecateExpress.test.js +1 -1
- package/test/drover.test.js +1 -1
- package/test/schemaValidator.test.js +74 -0
- package/test/schemaValidators/alias.test.js +1 -1
- package/test/tokenSchemaValidator.test.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @adobe/spectrum-tokens
|
|
2
2
|
|
|
3
|
+
## 12.26.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#345](https://github.com/adobe/spectrum-tokens/pull/345) [`fe4c707`](https://github.com/adobe/spectrum-tokens/commit/fe4c707c5ae2cc89efe6439dc775cddc94b706b3) Thanks [@GarthDB](https://github.com/GarthDB)! - Added UUIDs to the base of set tokens.
|
|
8
|
+
|
|
9
|
+
## 12.25.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`413ef5a`](https://github.com/adobe/spectrum-tokens/commit/413ef5adad9083b7e133cc867e0436a879004ec8) Thanks [@GarthDB](https://github.com/GarthDB)! - Added `private` metadata to global tokens.
|
|
14
|
+
|
|
3
15
|
## 12.24.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/json/variables.json
CHANGED
|
@@ -16325,8 +16325,12 @@
|
|
|
16325
16325
|
"color-area-border-rounding": {
|
|
16326
16326
|
"ref": "{corner-radius-100}",
|
|
16327
16327
|
"sets": {
|
|
16328
|
-
"spectrum": {
|
|
16329
|
-
|
|
16328
|
+
"spectrum": {
|
|
16329
|
+
"uuid": "67b83ee8-2782-48a5-ba27-70f690c95b4a"
|
|
16330
|
+
},
|
|
16331
|
+
"express": {
|
|
16332
|
+
"uuid": "179b1a27-66f9-47b9-9af9-648c0a3dbbfb"
|
|
16333
|
+
}
|
|
16330
16334
|
},
|
|
16331
16335
|
"uuid": "ab656bf4-8814-42fa-9036-b1e67159e4e1"
|
|
16332
16336
|
},
|
package/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2024 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { glob } from "glob";
|
|
14
|
+
|
|
15
|
+
import { resolve } from "path";
|
|
16
|
+
import { readFile } from "fs/promises";
|
|
17
|
+
import * as url from "url";
|
|
18
|
+
import { writeFile } from "fs/promises";
|
|
19
|
+
import { format } from "prettier";
|
|
20
|
+
|
|
21
|
+
export const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
|
22
|
+
|
|
23
|
+
export const tokenFileNames = await glob(
|
|
24
|
+
`${resolve(__dirname, "./src")}/**/*.json`,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export const readJson = async (fileName) =>
|
|
28
|
+
JSON.parse(await readFile(fileName, "utf8"));
|
|
29
|
+
|
|
30
|
+
export const writeJson = async (fileName, jsonData) => {
|
|
31
|
+
await writeFile(
|
|
32
|
+
fileName,
|
|
33
|
+
await format(JSON.stringify(jsonData), { parser: "json-stringify" }),
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const getFileTokens = async (tokenFileName) =>
|
|
38
|
+
await readJson(resolve(__dirname, "src", tokenFileName));
|
|
39
|
+
|
|
40
|
+
export const getAllTokens = async () => {
|
|
41
|
+
return await Promise.all(tokenFileNames.map(getFileTokens)).then(
|
|
42
|
+
(tokenFileDataAr) => {
|
|
43
|
+
return tokenFileDataAr.reduce(
|
|
44
|
+
(tokenDataAcc, tokenFileData) => ({
|
|
45
|
+
...tokenDataAcc,
|
|
46
|
+
...tokenFileData,
|
|
47
|
+
}),
|
|
48
|
+
{},
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
};
|
package/moon.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2024 Adobe. All rights reserved.
|
|
2
2
|
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
4
|
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
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
|
+
$schema: "https://moonrepo.dev/schemas/project.json"
|
|
10
11
|
type: library
|
|
11
12
|
fileGroups:
|
|
12
13
|
sources:
|
|
@@ -54,7 +55,7 @@ tasks:
|
|
|
54
55
|
platform: node
|
|
55
56
|
test:
|
|
56
57
|
command:
|
|
57
|
-
-
|
|
58
|
+
- pnpm
|
|
58
59
|
- ava
|
|
59
60
|
inputs:
|
|
60
61
|
- "tasks/**/*"
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spectrum-tokens",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.26.0",
|
|
4
4
|
"description": "Design tokens for Spectrum, Adobe's design system",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "index.js",
|
|
7
7
|
"tokens": "dist/json/variables.json",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
"homepage": "https://github.com/adobe/spectrum-tokens/tree/main/packages/tokens#readme",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"ajv": "^8.12.0",
|
|
26
|
-
"ajv-formats": "^
|
|
26
|
+
"ajv-formats": "^3.0.1",
|
|
27
27
|
"deep-object-diff": "^1.1.9",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"find-duplicated-property-keys": "^1.2.9",
|
|
29
|
+
"glob": "^10.3.12",
|
|
30
|
+
"style-dictionary": "^3.9.2",
|
|
30
31
|
"style-dictionary-sets": "^2.3.0",
|
|
31
|
-
"tar": "^
|
|
32
|
+
"tar": "^7.0.1",
|
|
32
33
|
"tmp-promise": "^3.0.3"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {}
|
|
@@ -70,9 +70,14 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"component": {},
|
|
73
|
+
"private": {},
|
|
73
74
|
"deprecated": {},
|
|
74
75
|
"deprecated_comment": {},
|
|
75
|
-
"uuid": {
|
|
76
|
+
"uuid": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$",
|
|
79
|
+
"format": "uuid"
|
|
80
|
+
}
|
|
76
81
|
},
|
|
77
|
-
"required": ["sets"]
|
|
82
|
+
"required": ["sets", "uuid"]
|
|
78
83
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"pattern": "^rgba\\((([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]),\\s?){3}(0|1|0?\\.\\d+)\\)|rgb\\(([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]){1,3}(,\\s?\\d{1,3}%?){2}\\)$"
|
|
19
19
|
},
|
|
20
20
|
"component": {},
|
|
21
|
+
"private": {},
|
|
21
22
|
"deprecated": {},
|
|
22
23
|
"deprecated_comment": {},
|
|
23
24
|
"uuid": {}
|
|
@@ -46,9 +46,14 @@
|
|
|
46
46
|
"required": ["mobile", "desktop"]
|
|
47
47
|
},
|
|
48
48
|
"component": {},
|
|
49
|
+
"private": {},
|
|
49
50
|
"deprecated": {},
|
|
50
51
|
"deprecated_comment": {},
|
|
51
|
-
"uuid": {
|
|
52
|
+
"uuid": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$",
|
|
55
|
+
"format": "uuid"
|
|
56
|
+
}
|
|
52
57
|
},
|
|
53
|
-
"required": ["sets"]
|
|
58
|
+
"required": ["sets", "uuid"]
|
|
54
59
|
}
|