@atlaskit/tokens 0.10.19 → 0.10.21
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 +19 -0
- package/babel-plugin/package.json +8 -1
- package/css/atlassian-dark.css +8 -2
- package/css/atlassian-legacy-dark.css +8 -2
- package/css/atlassian-legacy-light.css +7 -1
- package/css/atlassian-light.css +7 -1
- package/dist/cjs/artifacts/rename-mapping.js +4 -4
- package/dist/cjs/artifacts/token-default-values.js +7 -1
- package/dist/cjs/artifacts/token-names.js +7 -1
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +163 -17
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +163 -17
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +143 -17
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +143 -17
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/cjs/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/cjs/tokens/default/elevation/surface.js +69 -15
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/rename-mapping.js +4 -4
- package/dist/es2019/artifacts/token-default-values.js +7 -1
- package/dist/es2019/artifacts/token-names.js +7 -1
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +163 -17
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-dark.js +163 -17
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-light.js +143 -17
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +143 -17
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/es2019/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/es2019/tokens/default/elevation/surface.js +69 -17
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/rename-mapping.js +4 -4
- package/dist/esm/artifacts/token-default-values.js +7 -1
- package/dist/esm/artifacts/token-names.js +7 -1
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +163 -17
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-dark.js +163 -17
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-light.js +143 -17
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +143 -17
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/esm/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/esm/tokens/default/elevation/surface.js +69 -15
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/rename-mapping.d.ts +1 -1
- package/dist/types/artifacts/token-default-values.d.ts +7 -1
- package/dist/types/artifacts/token-names.d.ts +13 -1
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-light.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/artifacts/types-internal.d.ts +2 -2
- package/dist/types/artifacts/types.d.ts +2 -2
- package/dist/types/types.d.ts +15 -3
- 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 +15 -7
- 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.21",
|
|
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
|
],
|
|
@@ -78,11 +85,12 @@
|
|
|
78
85
|
"@atlaskit/tooltip": "^17.5.7",
|
|
79
86
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
80
87
|
"@babel/core": "^7.12.3",
|
|
88
|
+
"@emotion/core": "^10.0.9",
|
|
81
89
|
"@emotion/react": "^11.7.1",
|
|
82
|
-
"@testing-library/dom": "^
|
|
83
|
-
"@testing-library/react": "^
|
|
84
|
-
"@testing-library/react-hooks": "^
|
|
85
|
-
"@testing-library/user-event": "
|
|
90
|
+
"@testing-library/dom": "^8.17.1",
|
|
91
|
+
"@testing-library/react": "^12.1.5",
|
|
92
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
93
|
+
"@testing-library/user-event": "^14.4.3",
|
|
86
94
|
"@types/chrome": "^0.0.171",
|
|
87
95
|
"copy-webpack-plugin": "^6.4.0",
|
|
88
96
|
"fuse.js": "^6.6.2",
|
|
@@ -90,8 +98,8 @@
|
|
|
90
98
|
"prettier": "^2.1.1",
|
|
91
99
|
"react": "^16.8.0",
|
|
92
100
|
"style-dictionary": "^3.0.0",
|
|
93
|
-
"ts-node": "^10.
|
|
94
|
-
"typescript": "4.
|
|
101
|
+
"ts-node": "^10.9.1",
|
|
102
|
+
"typescript": "4.5.5"
|
|
95
103
|
},
|
|
96
104
|
"techstack": {
|
|
97
105
|
"@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
|
}
|