@atlaskit/tokens 0.10.20 → 0.10.22
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/babel-plugin/package.json +8 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/artifacts/palettes-raw/legacy-palette.d.ts +41 -0
- package/dist/types-ts4.0/artifacts/palettes-raw/palette.d.ts +41 -0
- package/dist/types-ts4.0/artifacts/rename-mapping.d.ts +26 -0
- package/dist/types-ts4.0/artifacts/token-default-values.d.ts +302 -0
- package/dist/types-ts4.0/artifacts/token-names.d.ts +593 -0
- package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-dark.d.ts +222 -0
- package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +222 -0
- package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-legacy-light.d.ts +174 -0
- package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-light.d.ts +174 -0
- package/dist/types-ts4.0/artifacts/types-internal.d.ts +6 -0
- package/dist/types-ts4.0/artifacts/types.d.ts +6 -0
- package/dist/types-ts4.0/babel-plugin/index.d.ts +1 -0
- package/dist/types-ts4.0/babel-plugin/plugin.d.ts +14 -0
- package/dist/types-ts4.0/constants.d.ts +17 -0
- package/dist/types-ts4.0/entry-points/babel-plugin.d.ts +1 -0
- package/dist/types-ts4.0/entry-points/palettes-raw.d.ts +1 -0
- package/dist/types-ts4.0/entry-points/rename-mapping.d.ts +1 -0
- package/dist/types-ts4.0/entry-points/token-ids.d.ts +1 -0
- package/dist/types-ts4.0/entry-points/token-names.d.ts +2 -0
- package/dist/types-ts4.0/figma/synchronize-figma-tokens.d.ts +24 -0
- package/dist/types-ts4.0/figma/types.d.ts +40 -0
- package/dist/types-ts4.0/get-token.d.ts +4 -0
- package/dist/types-ts4.0/index.d.ts +5 -0
- package/dist/types-ts4.0/palettes/legacy-palette.d.ts +10 -0
- package/dist/types-ts4.0/palettes/palette.d.ts +5 -0
- package/dist/types-ts4.0/set-global-theme.d.ts +3 -0
- package/dist/types-ts4.0/theme-change-observer.d.ts +35 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/accent.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/background.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/border.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/icon.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/interaction.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/color/text.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/deprecated/deprecated.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/opacity/opacity.d.ts +3 -0
- package/dist/types-ts4.0/tokens/atlassian-dark/utility/utility.d.ts +5 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/accent.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/background.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/border.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/icon.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/interaction.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/color/text.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/deprecated/deprecated.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/opacity/opacity.d.ts +3 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-dark/utility/utility.d.ts +5 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/accent.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/background.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/border.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/icon.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/interaction.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/color/text.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/deprecated/deprecated.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/opacity/opacity.d.ts +3 -0
- package/dist/types-ts4.0/tokens/atlassian-legacy-light/utility/utility.d.ts +5 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/accent.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/background.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/border.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/icon.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/interaction.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/color/text.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/deprecated/deprecated.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.0/tokens/atlassian-light/opacity/opacity.d.ts +3 -0
- package/dist/types-ts4.0/tokens/atlassian-light/utility/utility.d.ts +5 -0
- package/dist/types-ts4.0/tokens/default/color/accent.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/background.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/border.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/icon.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/interaction.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/color/text.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/deprecated/deprecated.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.0/tokens/default/opacity/opacity.d.ts +3 -0
- package/dist/types-ts4.0/tokens/default/utility/utility.d.ts +5 -0
- package/dist/types-ts4.0/types.d.ts +656 -0
- package/dist/types-ts4.0/utils/color-detection.d.ts +38 -0
- package/dist/types-ts4.0/utils/token-ids.d.ts +41 -0
- package/package.json +14 -8
- package/palettes-raw/package.json +8 -1
- package/rename-mapping/package.json +8 -1
- package/token-ids/package.json +8 -1
- package/token-names/package.json +8 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a style dictionary token path to a CSS custom property.
|
|
3
|
+
*
|
|
4
|
+
* A css prefix will be prepended and all [default] key words will be omitted
|
|
5
|
+
* from the path
|
|
6
|
+
*
|
|
7
|
+
* @example <caption>Passing a path as an array</caption>
|
|
8
|
+
* // Returns ds-background-bold
|
|
9
|
+
* getCSSCustomProperty(['color', 'background', 'bold', '[default]'])
|
|
10
|
+
*
|
|
11
|
+
* @example <caption>Passing a path as a string</caption>
|
|
12
|
+
* // Returns ds-background-bold
|
|
13
|
+
* getCSSCustomProperty('color.background.bold.[default]')
|
|
14
|
+
*/
|
|
15
|
+
export declare const getCSSCustomProperty: (path: string | string[]) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Transforms a style dictionary token path to a shorthand token id
|
|
18
|
+
* These ids will be typically be how tokens are interacted with via typescript and css
|
|
19
|
+
*
|
|
20
|
+
* All [default] key words will be omitted from the path
|
|
21
|
+
*
|
|
22
|
+
* @example <caption>Passing a path as an array</caption>
|
|
23
|
+
* // Returns color.background.bold
|
|
24
|
+
* getTokenId(['color', 'background', 'bold', '[default]'])
|
|
25
|
+
*
|
|
26
|
+
* @example <caption>Passing a path as a string</caption>
|
|
27
|
+
* // Returns color.background.bold
|
|
28
|
+
* getTokenId('color.background.bold.[default]')
|
|
29
|
+
*/
|
|
30
|
+
export declare const getTokenId: (path: string | string[]) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Transforms a style dictionary token path to a fully qualified token id
|
|
33
|
+
* These Ids are intended to be used internal to this package by style-dictionary
|
|
34
|
+
*
|
|
35
|
+
* [default] key words will NOT be omitted from the path
|
|
36
|
+
*
|
|
37
|
+
* @example <caption>Passing a path as a string</caption>
|
|
38
|
+
* // Returns color.background.bold.[default]
|
|
39
|
+
* getFullyQualifiedTokenId(['color', 'background', 'bold', '[default]'])
|
|
40
|
+
*/
|
|
41
|
+
export declare const getFullyQualifiedTokenId: (path: string[]) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.22",
|
|
4
4
|
"author": "Atlassian Pty Ltd",
|
|
5
5
|
"description": "Design tokens are the single source of truth to name and store design decisions.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
"module": "dist/esm/index.js",
|
|
22
22
|
"module:es2019": "dist/es2019/index.js",
|
|
23
23
|
"types": "dist/types/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
">=4.0 <4.5": {
|
|
26
|
+
"*": [
|
|
27
|
+
"dist/types-ts4.0/*"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
24
31
|
"sideEffects": [
|
|
25
32
|
"**/*.css"
|
|
26
33
|
],
|
|
@@ -40,8 +47,7 @@
|
|
|
40
47
|
"scripts": {
|
|
41
48
|
"ak-postbuild": "cd ../../../ && yarn build @af/codegen && cd packages/design-system/tokens && yarn codegen-tokens && yarn check-clean-git",
|
|
42
49
|
"check-clean-git": "git diff --exit-code -- packages/design-system/tokens/ || (echo 'tokens are out of date, run yarn build tokens' && false)",
|
|
43
|
-
"codegen-tokens": "ts-node --project ../../../tsconfig.node.json ./scripts/style-dictionary/build"
|
|
44
|
-
"build-chrome-extension": "yarn --cwd tokens-browser-extension build-chrome-extension"
|
|
50
|
+
"codegen-tokens": "ts-node --project ../../../tsconfig.node.json ./scripts/style-dictionary/build"
|
|
45
51
|
},
|
|
46
52
|
"dependencies": {
|
|
47
53
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
@@ -65,7 +71,7 @@
|
|
|
65
71
|
"@atlaskit/dynamic-table": "^14.8.0",
|
|
66
72
|
"@atlaskit/empty-state": "^7.4.0",
|
|
67
73
|
"@atlaskit/focus-ring": "^1.0.0",
|
|
68
|
-
"@atlaskit/heading": "
|
|
74
|
+
"@atlaskit/heading": "^0.1.16",
|
|
69
75
|
"@atlaskit/icon": "^21.10.2",
|
|
70
76
|
"@atlaskit/lozenge": "^11.2.0",
|
|
71
77
|
"@atlaskit/modal-dialog": "^12.3.0",
|
|
@@ -82,8 +88,8 @@
|
|
|
82
88
|
"@emotion/react": "^11.7.1",
|
|
83
89
|
"@testing-library/dom": "^8.17.1",
|
|
84
90
|
"@testing-library/react": "^12.1.5",
|
|
85
|
-
"@testing-library/react-hooks": "^
|
|
86
|
-
"@testing-library/user-event": "^
|
|
91
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
92
|
+
"@testing-library/user-event": "^14.4.3",
|
|
87
93
|
"@types/chrome": "^0.0.171",
|
|
88
94
|
"copy-webpack-plugin": "^6.4.0",
|
|
89
95
|
"fuse.js": "^6.6.2",
|
|
@@ -91,8 +97,8 @@
|
|
|
91
97
|
"prettier": "^2.1.1",
|
|
92
98
|
"react": "^16.8.0",
|
|
93
99
|
"style-dictionary": "^3.0.0",
|
|
94
|
-
"ts-node": "^10.
|
|
95
|
-
"typescript": "4.
|
|
100
|
+
"ts-node": "^10.9.1",
|
|
101
|
+
"typescript": "4.5.5"
|
|
96
102
|
},
|
|
97
103
|
"techstack": {
|
|
98
104
|
"@atlassian/frontend": {
|
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/palettes-raw.d.ts"
|
|
9
|
+
"types": "../dist/types/entry-points/palettes-raw.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.0 <4.5": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.0/entry-points/palettes-raw.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
}
|
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/rename-mapping.d.ts"
|
|
9
|
+
"types": "../dist/types/entry-points/rename-mapping.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.0 <4.5": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.0/entry-points/rename-mapping.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
}
|
package/token-ids/package.json
CHANGED
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/token-ids.d.ts"
|
|
9
|
+
"types": "../dist/types/entry-points/token-ids.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.0 <4.5": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.0/entry-points/token-ids.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
}
|
package/token-names/package.json
CHANGED
|
@@ -6,5 +6,12 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/token-names.d.ts"
|
|
9
|
+
"types": "../dist/types/entry-points/token-names.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.0 <4.5": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.0/entry-points/token-names.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
}
|