@atlaskit/tokens 1.5.1 → 1.6.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 +16 -0
- package/dist/cjs/artifacts/generated-pairs.js +1 -289
- package/dist/cjs/artifacts/palettes-raw/shape-palette.js +3 -3
- package/dist/cjs/artifacts/themes/atlassian-dark-new-input-border.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light-new-input-border.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-shape.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +12 -10
- package/dist/cjs/artifacts/token-names.js +12 -10
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-iteration.js +902 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-new-input-border.js +36 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +33 -33
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +33 -33
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +33 -33
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-new-input-border.js +36 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +33 -33
- package/dist/cjs/artifacts/tokens-raw/atlassian-shape.js +81 -37
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/palettes/shape-palette.js +2 -1
- package/dist/cjs/set-global-theme.js +14 -3
- package/dist/cjs/tokens/atlassian-dark-new-input-border/color/border.js +1 -37
- package/dist/cjs/tokens/atlassian-light-new-input-border/color/border.js +1 -37
- package/dist/cjs/tokens/atlassian-shape/shape.js +7 -1
- package/dist/cjs/tokens/default/color/accent.js +16 -16
- package/dist/cjs/tokens/default/shape/shape.js +33 -17
- package/dist/cjs/utils/theme-state-transformer.js +2 -1
- package/dist/cjs/utils/token-order.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/generated-pairs.js +1 -289
- package/dist/es2019/artifacts/palettes-raw/shape-palette.js +3 -3
- package/dist/es2019/artifacts/themes/atlassian-dark-new-input-border.js +2 -14
- package/dist/es2019/artifacts/themes/atlassian-light-new-input-border.js +2 -14
- package/dist/es2019/artifacts/themes/atlassian-shape.js +12 -10
- package/dist/es2019/artifacts/token-default-values.js +12 -10
- package/dist/es2019/artifacts/token-names.js +12 -10
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-iteration.js +895 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-new-input-border.js +29 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +33 -33
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-dark.js +33 -33
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-light.js +33 -33
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-new-input-border.js +29 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +33 -33
- package/dist/es2019/artifacts/tokens-raw/atlassian-shape.js +81 -37
- package/dist/es2019/constants.js +1 -1
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/palettes/shape-palette.js +2 -1
- package/dist/es2019/set-global-theme.js +10 -2
- package/dist/es2019/tokens/atlassian-dark-new-input-border/color/border.js +1 -37
- package/dist/es2019/tokens/atlassian-light-new-input-border/color/border.js +1 -37
- package/dist/es2019/tokens/atlassian-shape/shape.js +7 -1
- package/dist/es2019/tokens/default/color/accent.js +16 -16
- package/dist/es2019/tokens/default/shape/shape.js +33 -17
- package/dist/es2019/utils/theme-state-transformer.js +2 -1
- package/dist/es2019/utils/token-order.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/generated-pairs.js +1 -289
- package/dist/esm/artifacts/palettes-raw/shape-palette.js +3 -3
- package/dist/esm/artifacts/themes/atlassian-dark-new-input-border.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light-new-input-border.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-shape.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +12 -10
- package/dist/esm/artifacts/token-names.js +12 -10
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-iteration.js +895 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-new-input-border.js +29 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +33 -33
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-dark.js +33 -33
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-light.js +33 -33
- package/dist/esm/artifacts/tokens-raw/atlassian-light-new-input-border.js +29 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +33 -33
- package/dist/esm/artifacts/tokens-raw/atlassian-shape.js +81 -37
- package/dist/esm/constants.js +1 -1
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/palettes/shape-palette.js +2 -1
- package/dist/esm/set-global-theme.js +14 -3
- package/dist/esm/tokens/atlassian-dark-new-input-border/color/border.js +1 -37
- package/dist/esm/tokens/atlassian-light-new-input-border/color/border.js +1 -37
- package/dist/esm/tokens/atlassian-shape/shape.js +7 -1
- package/dist/esm/tokens/default/color/accent.js +16 -16
- package/dist/esm/tokens/default/shape/shape.js +33 -17
- package/dist/esm/utils/theme-state-transformer.js +2 -1
- package/dist/esm/utils/token-order.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/shape-palette.d.ts +3 -18
- package/dist/types/artifacts/themes/atlassian-dark-new-input-border.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light-new-input-border.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-shape.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +12 -10
- package/dist/types/artifacts/token-names.d.ts +23 -19
- package/dist/types/artifacts/tokens-raw/atlassian-dark-iteration.d.ts +91 -0
- package/dist/types/artifacts/tokens-raw/atlassian-dark-new-input-border.d.ts +29 -0
- 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-new-input-border.d.ts +29 -0
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-shape.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/index.d.ts +1 -1
- package/dist/types/palettes/shape-palette.d.ts +1 -1
- package/dist/types/set-global-theme.d.ts +8 -7
- package/dist/types/tokens/atlassian-dark-new-input-border/color/border.d.ts +9 -3
- package/dist/types/tokens/atlassian-light-new-input-border/color/border.d.ts +9 -3
- package/dist/types/types.d.ts +3 -1
- package/dist/types-ts4.5/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/shape-palette.d.ts +3 -18
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark-new-input-border.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-light-new-input-border.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-shape.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +12 -10
- package/dist/types-ts4.5/artifacts/token-names.d.ts +23 -19
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-iteration.d.ts +91 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-new-input-border.d.ts +29 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-legacy-light.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-new-input-border.d.ts +29 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-shape.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/palettes/shape-palette.d.ts +1 -1
- package/dist/types-ts4.5/set-global-theme.d.ts +8 -7
- package/dist/types-ts4.5/tokens/atlassian-dark-new-input-border/color/border.d.ts +9 -3
- package/dist/types-ts4.5/tokens/atlassian-light-new-input-border/color/border.d.ts +9 -3
- package/dist/types-ts4.5/types.d.ts +3 -1
- package/figma/atlassian-dark.json +16 -16
- package/figma/atlassian-legacy-dark.json +16 -16
- package/figma/atlassian-legacy-light.json +16 -16
- package/figma/atlassian-light.json +16 -16
- package/figma/atlassian-shape.json +36 -18
- package/package.json +4 -3
- package/report.api.md +125 -22
- package/tmp/api-report-tmp.d.ts +107 -27
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::8b50feb722f3a686c5a45c85ec5545b2>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
const tokens = [{
|
|
7
7
|
"attributes": {
|
|
8
8
|
"group": "shape",
|
|
9
|
-
"state": "
|
|
9
|
+
"state": "active",
|
|
10
10
|
"introduced": "1.1.0",
|
|
11
|
-
"description": "
|
|
11
|
+
"description": "Used for selection indicators, like tabs."
|
|
12
12
|
},
|
|
13
13
|
"value": "2px",
|
|
14
14
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -16,9 +16,9 @@ const tokens = [{
|
|
|
16
16
|
"original": {
|
|
17
17
|
"attributes": {
|
|
18
18
|
"group": "shape",
|
|
19
|
-
"state": "
|
|
19
|
+
"state": "active",
|
|
20
20
|
"introduced": "1.1.0",
|
|
21
|
-
"description": "
|
|
21
|
+
"description": "Used for selection indicators, like tabs."
|
|
22
22
|
},
|
|
23
23
|
"value": "Radius050"
|
|
24
24
|
},
|
|
@@ -28,9 +28,31 @@ const tokens = [{
|
|
|
28
28
|
}, {
|
|
29
29
|
"attributes": {
|
|
30
30
|
"group": "shape",
|
|
31
|
-
"state": "
|
|
31
|
+
"state": "active",
|
|
32
|
+
"introduced": "1.5.2",
|
|
33
|
+
"description": "The default border radius."
|
|
34
|
+
},
|
|
35
|
+
"value": "4px",
|
|
36
|
+
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
37
|
+
"isSource": true,
|
|
38
|
+
"original": {
|
|
39
|
+
"attributes": {
|
|
40
|
+
"group": "shape",
|
|
41
|
+
"state": "active",
|
|
42
|
+
"introduced": "1.5.2",
|
|
43
|
+
"description": "The default border radius."
|
|
44
|
+
},
|
|
45
|
+
"value": "Radius100"
|
|
46
|
+
},
|
|
47
|
+
"name": "border.radius.[default]",
|
|
48
|
+
"path": ["border", "radius", "[default]"],
|
|
49
|
+
"cleanName": "border.radius"
|
|
50
|
+
}, {
|
|
51
|
+
"attributes": {
|
|
52
|
+
"group": "shape",
|
|
53
|
+
"state": "active",
|
|
32
54
|
"introduced": "1.1.0",
|
|
33
|
-
"description": "
|
|
55
|
+
"description": "Used for buttons and inputs."
|
|
34
56
|
},
|
|
35
57
|
"value": "4px",
|
|
36
58
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -38,9 +60,9 @@ const tokens = [{
|
|
|
38
60
|
"original": {
|
|
39
61
|
"attributes": {
|
|
40
62
|
"group": "shape",
|
|
41
|
-
"state": "
|
|
63
|
+
"state": "active",
|
|
42
64
|
"introduced": "1.1.0",
|
|
43
|
-
"description": "
|
|
65
|
+
"description": "Used for buttons and inputs."
|
|
44
66
|
},
|
|
45
67
|
"value": "Radius100"
|
|
46
68
|
},
|
|
@@ -50,9 +72,9 @@ const tokens = [{
|
|
|
50
72
|
}, {
|
|
51
73
|
"attributes": {
|
|
52
74
|
"group": "shape",
|
|
53
|
-
"state": "
|
|
75
|
+
"state": "active",
|
|
54
76
|
"introduced": "1.1.0",
|
|
55
|
-
"description": "
|
|
77
|
+
"description": "Used for smaller cards."
|
|
56
78
|
},
|
|
57
79
|
"value": "8px",
|
|
58
80
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -60,9 +82,9 @@ const tokens = [{
|
|
|
60
82
|
"original": {
|
|
61
83
|
"attributes": {
|
|
62
84
|
"group": "shape",
|
|
63
|
-
"state": "
|
|
85
|
+
"state": "active",
|
|
64
86
|
"introduced": "1.1.0",
|
|
65
|
-
"description": "
|
|
87
|
+
"description": "Used for smaller cards."
|
|
66
88
|
},
|
|
67
89
|
"value": "Radius200"
|
|
68
90
|
},
|
|
@@ -72,9 +94,9 @@ const tokens = [{
|
|
|
72
94
|
}, {
|
|
73
95
|
"attributes": {
|
|
74
96
|
"group": "shape",
|
|
75
|
-
"state": "
|
|
97
|
+
"state": "active",
|
|
76
98
|
"introduced": "1.1.0",
|
|
77
|
-
"description": "
|
|
99
|
+
"description": "Used for cards and larger containers."
|
|
78
100
|
},
|
|
79
101
|
"value": "12px",
|
|
80
102
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -82,9 +104,9 @@ const tokens = [{
|
|
|
82
104
|
"original": {
|
|
83
105
|
"attributes": {
|
|
84
106
|
"group": "shape",
|
|
85
|
-
"state": "
|
|
107
|
+
"state": "active",
|
|
86
108
|
"introduced": "1.1.0",
|
|
87
|
-
"description": "
|
|
109
|
+
"description": "Used for cards and larger containers."
|
|
88
110
|
},
|
|
89
111
|
"value": "Radius300"
|
|
90
112
|
},
|
|
@@ -94,9 +116,9 @@ const tokens = [{
|
|
|
94
116
|
}, {
|
|
95
117
|
"attributes": {
|
|
96
118
|
"group": "shape",
|
|
97
|
-
"state": "
|
|
119
|
+
"state": "active",
|
|
98
120
|
"introduced": "1.1.0",
|
|
99
|
-
"description": "
|
|
121
|
+
"description": "Used for modals."
|
|
100
122
|
},
|
|
101
123
|
"value": "16px",
|
|
102
124
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -104,9 +126,9 @@ const tokens = [{
|
|
|
104
126
|
"original": {
|
|
105
127
|
"attributes": {
|
|
106
128
|
"group": "shape",
|
|
107
|
-
"state": "
|
|
129
|
+
"state": "active",
|
|
108
130
|
"introduced": "1.1.0",
|
|
109
|
-
"description": "
|
|
131
|
+
"description": "Used for modals."
|
|
110
132
|
},
|
|
111
133
|
"value": "Radius400"
|
|
112
134
|
},
|
|
@@ -116,25 +138,47 @@ const tokens = [{
|
|
|
116
138
|
}, {
|
|
117
139
|
"attributes": {
|
|
118
140
|
"group": "shape",
|
|
119
|
-
"state": "
|
|
141
|
+
"state": "active",
|
|
120
142
|
"introduced": "1.1.0",
|
|
121
|
-
"description": "
|
|
143
|
+
"description": "Used for circular containers, like a rounded button."
|
|
122
144
|
},
|
|
123
|
-
"value": "
|
|
145
|
+
"value": "32032px",
|
|
124
146
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
125
147
|
"isSource": true,
|
|
126
148
|
"original": {
|
|
127
149
|
"attributes": {
|
|
128
150
|
"group": "shape",
|
|
129
|
-
"state": "
|
|
151
|
+
"state": "active",
|
|
130
152
|
"introduced": "1.1.0",
|
|
131
|
-
"description": "
|
|
153
|
+
"description": "Used for circular containers, like a rounded button."
|
|
132
154
|
},
|
|
133
155
|
"value": "RadiusCircle"
|
|
134
156
|
},
|
|
135
|
-
"name": "border.radius.
|
|
136
|
-
"path": ["border", "radius", "
|
|
137
|
-
"cleanName": "border.radius.
|
|
157
|
+
"name": "border.radius.circle",
|
|
158
|
+
"path": ["border", "radius", "circle"],
|
|
159
|
+
"cleanName": "border.radius.circle"
|
|
160
|
+
}, {
|
|
161
|
+
"attributes": {
|
|
162
|
+
"group": "shape",
|
|
163
|
+
"state": "active",
|
|
164
|
+
"introduced": "1.5.2",
|
|
165
|
+
"description": "The default border width."
|
|
166
|
+
},
|
|
167
|
+
"value": "1px",
|
|
168
|
+
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
169
|
+
"isSource": true,
|
|
170
|
+
"original": {
|
|
171
|
+
"attributes": {
|
|
172
|
+
"group": "shape",
|
|
173
|
+
"state": "active",
|
|
174
|
+
"introduced": "1.5.2",
|
|
175
|
+
"description": "The default border width."
|
|
176
|
+
},
|
|
177
|
+
"value": "Size050"
|
|
178
|
+
},
|
|
179
|
+
"name": "border.width.[default]",
|
|
180
|
+
"path": ["border", "width", "[default]"],
|
|
181
|
+
"cleanName": "border.width"
|
|
138
182
|
}, {
|
|
139
183
|
"attributes": {
|
|
140
184
|
"group": "shape",
|
|
@@ -160,9 +204,9 @@ const tokens = [{
|
|
|
160
204
|
}, {
|
|
161
205
|
"attributes": {
|
|
162
206
|
"group": "shape",
|
|
163
|
-
"state": "
|
|
207
|
+
"state": "active",
|
|
164
208
|
"introduced": "1.1.0",
|
|
165
|
-
"description": "
|
|
209
|
+
"description": "Used for all borders and dividers."
|
|
166
210
|
},
|
|
167
211
|
"value": "1px",
|
|
168
212
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -170,9 +214,9 @@ const tokens = [{
|
|
|
170
214
|
"original": {
|
|
171
215
|
"attributes": {
|
|
172
216
|
"group": "shape",
|
|
173
|
-
"state": "
|
|
217
|
+
"state": "active",
|
|
174
218
|
"introduced": "1.1.0",
|
|
175
|
-
"description": "
|
|
219
|
+
"description": "Used for all borders and dividers."
|
|
176
220
|
},
|
|
177
221
|
"value": "Size050"
|
|
178
222
|
},
|
|
@@ -182,9 +226,9 @@ const tokens = [{
|
|
|
182
226
|
}, {
|
|
183
227
|
"attributes": {
|
|
184
228
|
"group": "shape",
|
|
185
|
-
"state": "
|
|
229
|
+
"state": "active",
|
|
186
230
|
"introduced": "1.1.0",
|
|
187
|
-
"description": "
|
|
231
|
+
"description": "Used for bolder dividers and interaction states."
|
|
188
232
|
},
|
|
189
233
|
"value": "2px",
|
|
190
234
|
"filePath": "src/tokens/atlassian-shape/shape.tsx",
|
|
@@ -192,9 +236,9 @@ const tokens = [{
|
|
|
192
236
|
"original": {
|
|
193
237
|
"attributes": {
|
|
194
238
|
"group": "shape",
|
|
195
|
-
"state": "
|
|
239
|
+
"state": "active",
|
|
196
240
|
"introduced": "1.1.0",
|
|
197
|
-
"description": "
|
|
241
|
+
"description": "Used for bolder dividers and interaction states."
|
|
198
242
|
},
|
|
199
243
|
"value": "Size100"
|
|
200
244
|
},
|
package/dist/es2019/constants.js
CHANGED
|
@@ -2,5 +2,5 @@ export const THEME_DATA_ATTRIBUTE = 'data-theme';
|
|
|
2
2
|
export const COLOR_MODE_ATTRIBUTE = 'data-color-mode';
|
|
3
3
|
export const DEFAULT_THEME = 'light';
|
|
4
4
|
export const CSS_PREFIX = 'ds';
|
|
5
|
-
export const CSS_VAR_FULL = ['opacity', 'font', 'space'];
|
|
5
|
+
export const CSS_VAR_FULL = ['opacity', 'font', 'space', 'border'];
|
|
6
6
|
export const TOKEN_NOT_FOUND_CSS_VAR = `--${CSS_PREFIX}-token-not-found`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
const name = "@atlaskit/tokens";
|
|
4
|
-
const version = "1.
|
|
4
|
+
const version = "1.6.0";
|
|
5
5
|
/**
|
|
6
6
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
7
7
|
* resulting CSS Custom Property.
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
4
4
|
const name = "@atlaskit/tokens";
|
|
5
|
-
const version = "1.
|
|
5
|
+
const version = "1.6.0";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
8
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -16,6 +16,7 @@ const themeStateDefaults = {
|
|
|
16
16
|
colorMode: 'auto',
|
|
17
17
|
dark: 'dark',
|
|
18
18
|
light: 'light',
|
|
19
|
+
shape: undefined,
|
|
19
20
|
spacing: undefined,
|
|
20
21
|
typography: undefined
|
|
21
22
|
};
|
|
@@ -70,6 +71,7 @@ const setGlobalTheme = async ({
|
|
|
70
71
|
colorMode = themeStateDefaults['colorMode'],
|
|
71
72
|
dark = themeStateDefaults['dark'],
|
|
72
73
|
light = themeStateDefaults['light'],
|
|
74
|
+
shape = themeStateDefaults['shape'],
|
|
73
75
|
spacing = themeStateDefaults['spacing'],
|
|
74
76
|
typography = themeStateDefaults['typography']
|
|
75
77
|
} = {}) => {
|
|
@@ -77,6 +79,7 @@ const setGlobalTheme = async ({
|
|
|
77
79
|
colorMode,
|
|
78
80
|
dark,
|
|
79
81
|
light,
|
|
82
|
+
shape,
|
|
80
83
|
spacing,
|
|
81
84
|
typography
|
|
82
85
|
});
|
|
@@ -105,6 +108,7 @@ const setGlobalTheme = async ({
|
|
|
105
108
|
colorMode,
|
|
106
109
|
dark,
|
|
107
110
|
light,
|
|
111
|
+
shape,
|
|
108
112
|
spacing,
|
|
109
113
|
typography
|
|
110
114
|
});
|
|
@@ -132,12 +136,14 @@ export const getThemeStyles = async ({
|
|
|
132
136
|
dark = themeStateDefaults['dark'],
|
|
133
137
|
light = themeStateDefaults['light'],
|
|
134
138
|
spacing = themeStateDefaults['spacing'],
|
|
135
|
-
typography = themeStateDefaults['typography']
|
|
139
|
+
typography = themeStateDefaults['typography'],
|
|
140
|
+
shape = themeStateDefaults['shape']
|
|
136
141
|
} = {}) => {
|
|
137
142
|
const themePreferences = getThemePreferences({
|
|
138
143
|
colorMode,
|
|
139
144
|
dark,
|
|
140
145
|
light,
|
|
146
|
+
shape,
|
|
141
147
|
spacing,
|
|
142
148
|
typography
|
|
143
149
|
});
|
|
@@ -185,6 +191,7 @@ export const getThemeHtmlAttrs = ({
|
|
|
185
191
|
colorMode = themeStateDefaults['colorMode'],
|
|
186
192
|
dark = themeStateDefaults['dark'],
|
|
187
193
|
light = themeStateDefaults['light'],
|
|
194
|
+
shape = themeStateDefaults['shape'],
|
|
188
195
|
spacing = themeStateDefaults['spacing'],
|
|
189
196
|
typography = themeStateDefaults['typography']
|
|
190
197
|
} = {}) => {
|
|
@@ -192,7 +199,8 @@ export const getThemeHtmlAttrs = ({
|
|
|
192
199
|
dark,
|
|
193
200
|
light,
|
|
194
201
|
spacing,
|
|
195
|
-
typography
|
|
202
|
+
typography,
|
|
203
|
+
shape
|
|
196
204
|
};
|
|
197
205
|
const themeAttribute = themeObjectToString(themePreferences);
|
|
198
206
|
return {
|
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
const color = {
|
|
2
2
|
color: {
|
|
3
3
|
border: {
|
|
4
|
-
'[default]': {
|
|
5
|
-
value: 'DarkNeutral300A'
|
|
6
|
-
},
|
|
7
|
-
bold: {
|
|
8
|
-
value: 'DarkNeutral600'
|
|
9
|
-
},
|
|
10
|
-
inverse: {
|
|
11
|
-
value: 'DarkNeutral0'
|
|
12
|
-
},
|
|
13
|
-
focused: {
|
|
14
|
-
value: 'Blue300'
|
|
15
|
-
},
|
|
16
4
|
input: {
|
|
17
|
-
value: '
|
|
18
|
-
},
|
|
19
|
-
disabled: {
|
|
20
|
-
value: 'DarkNeutral200A'
|
|
21
|
-
},
|
|
22
|
-
brand: {
|
|
23
|
-
value: 'Blue400'
|
|
24
|
-
},
|
|
25
|
-
selected: {
|
|
26
|
-
value: 'Blue400'
|
|
27
|
-
},
|
|
28
|
-
danger: {
|
|
29
|
-
value: 'Red500'
|
|
30
|
-
},
|
|
31
|
-
warning: {
|
|
32
|
-
value: 'Yellow500'
|
|
33
|
-
},
|
|
34
|
-
success: {
|
|
35
|
-
value: 'Green500'
|
|
36
|
-
},
|
|
37
|
-
discovery: {
|
|
38
|
-
value: 'Purple500'
|
|
39
|
-
},
|
|
40
|
-
information: {
|
|
41
|
-
value: 'Blue500'
|
|
5
|
+
value: 'DarkNeutral500'
|
|
42
6
|
}
|
|
43
7
|
}
|
|
44
8
|
}
|
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
const color = {
|
|
2
2
|
color: {
|
|
3
3
|
border: {
|
|
4
|
-
'[default]': {
|
|
5
|
-
value: 'Neutral300A'
|
|
6
|
-
},
|
|
7
|
-
bold: {
|
|
8
|
-
value: 'Neutral600'
|
|
9
|
-
},
|
|
10
|
-
inverse: {
|
|
11
|
-
value: 'Neutral0'
|
|
12
|
-
},
|
|
13
|
-
focused: {
|
|
14
|
-
value: 'Blue500'
|
|
15
|
-
},
|
|
16
4
|
input: {
|
|
17
|
-
value: '
|
|
18
|
-
},
|
|
19
|
-
disabled: {
|
|
20
|
-
value: 'Neutral200A'
|
|
21
|
-
},
|
|
22
|
-
brand: {
|
|
23
|
-
value: 'Blue700'
|
|
24
|
-
},
|
|
25
|
-
selected: {
|
|
26
|
-
value: 'Blue700'
|
|
27
|
-
},
|
|
28
|
-
danger: {
|
|
29
|
-
value: 'Red600'
|
|
30
|
-
},
|
|
31
|
-
warning: {
|
|
32
|
-
value: 'Orange600'
|
|
33
|
-
},
|
|
34
|
-
success: {
|
|
35
|
-
value: 'Green600'
|
|
36
|
-
},
|
|
37
|
-
discovery: {
|
|
38
|
-
value: 'Purple600'
|
|
39
|
-
},
|
|
40
|
-
information: {
|
|
41
|
-
value: 'Blue600'
|
|
5
|
+
value: 'Neutral500'
|
|
42
6
|
}
|
|
43
7
|
}
|
|
44
8
|
}
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
const shape = {
|
|
6
6
|
border: {
|
|
7
7
|
width: {
|
|
8
|
+
'[default]': {
|
|
9
|
+
value: 'Size050'
|
|
10
|
+
},
|
|
8
11
|
'0': {
|
|
9
12
|
value: 'Size0'
|
|
10
13
|
},
|
|
@@ -16,6 +19,9 @@ const shape = {
|
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
radius: {
|
|
22
|
+
'[default]': {
|
|
23
|
+
value: 'Radius100'
|
|
24
|
+
},
|
|
19
25
|
'050': {
|
|
20
26
|
value: 'Radius050'
|
|
21
27
|
},
|
|
@@ -31,7 +37,7 @@ const shape = {
|
|
|
31
37
|
'400': {
|
|
32
38
|
value: 'Radius400'
|
|
33
39
|
},
|
|
34
|
-
|
|
40
|
+
circle: {
|
|
35
41
|
value: 'RadiusCircle'
|
|
36
42
|
}
|
|
37
43
|
}
|
|
@@ -8,7 +8,7 @@ const color = {
|
|
|
8
8
|
group: 'paint',
|
|
9
9
|
state: 'active',
|
|
10
10
|
introduced: '0.6.0',
|
|
11
|
-
description: 'Use for blue text on
|
|
11
|
+
description: 'Use for blue text on subtlest and subtler blue accent backgrounds when there is no meaning tied to the color.'
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
bolder: {
|
|
@@ -16,7 +16,7 @@ const color = {
|
|
|
16
16
|
group: 'paint',
|
|
17
17
|
state: 'active',
|
|
18
18
|
introduced: '0.7.0',
|
|
19
|
-
description: 'Use on
|
|
19
|
+
description: 'Use for blue text on subtle blue accent backgrounds when there is no meaning tied to the color.'
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -26,7 +26,7 @@ const color = {
|
|
|
26
26
|
group: 'paint',
|
|
27
27
|
state: 'active',
|
|
28
28
|
introduced: '0.6.0',
|
|
29
|
-
description: 'Use for red text on
|
|
29
|
+
description: 'Use for red text on subtlest and subtler red accent backgrounds when there is no meaning tied to the color.'
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
bolder: {
|
|
@@ -34,7 +34,7 @@ const color = {
|
|
|
34
34
|
group: 'paint',
|
|
35
35
|
state: 'active',
|
|
36
36
|
introduced: '0.7.0',
|
|
37
|
-
description: 'Use on
|
|
37
|
+
description: 'Use for red text on subtle red accent backgrounds when there is no meaning tied to the color.'
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
},
|
|
@@ -44,7 +44,7 @@ const color = {
|
|
|
44
44
|
group: 'paint',
|
|
45
45
|
state: 'active',
|
|
46
46
|
introduced: '0.6.0',
|
|
47
|
-
description: 'Use for orange text on
|
|
47
|
+
description: 'Use for orange text on subtlest and subtler orange accent backgrounds when there is no meaning tied to the color.'
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
bolder: {
|
|
@@ -52,7 +52,7 @@ const color = {
|
|
|
52
52
|
group: 'paint',
|
|
53
53
|
state: 'active',
|
|
54
54
|
introduced: '0.7.0',
|
|
55
|
-
description: 'Use on
|
|
55
|
+
description: 'Use for orange text on subtle orange accent backgrounds when there is no meaning tied to the color.'
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -62,7 +62,7 @@ const color = {
|
|
|
62
62
|
group: 'paint',
|
|
63
63
|
state: 'active',
|
|
64
64
|
introduced: '0.6.0',
|
|
65
|
-
description: 'Use for yellow text on
|
|
65
|
+
description: 'Use for yellow text on subtlest and subtler yellow accent backgrounds when there is no meaning tied to the color.'
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
bolder: {
|
|
@@ -70,7 +70,7 @@ const color = {
|
|
|
70
70
|
group: 'paint',
|
|
71
71
|
state: 'active',
|
|
72
72
|
introduced: '0.7.0',
|
|
73
|
-
description: 'Use on
|
|
73
|
+
description: 'Use for yellow text on subtle yellow accent backgrounds when there is no meaning tied to the color.'
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
},
|
|
@@ -80,7 +80,7 @@ const color = {
|
|
|
80
80
|
group: 'paint',
|
|
81
81
|
state: 'active',
|
|
82
82
|
introduced: '0.6.0',
|
|
83
|
-
description: 'Use for green text on
|
|
83
|
+
description: 'Use for green text on subtlest and subtler green accent backgrounds when there is no meaning tied to the color.'
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
bolder: {
|
|
@@ -88,7 +88,7 @@ const color = {
|
|
|
88
88
|
group: 'paint',
|
|
89
89
|
state: 'active',
|
|
90
90
|
introduced: '0.7.0',
|
|
91
|
-
description: 'Use on
|
|
91
|
+
description: 'Use for green text on subtle green accent backgrounds when there is no meaning tied to the color.'
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
},
|
|
@@ -98,7 +98,7 @@ const color = {
|
|
|
98
98
|
group: 'paint',
|
|
99
99
|
state: 'active',
|
|
100
100
|
introduced: '0.6.0',
|
|
101
|
-
description: 'Use for purple text on
|
|
101
|
+
description: 'Use for purple text on subtlest and subtler purple accent backgrounds when there is no meaning tied to the color.'
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
bolder: {
|
|
@@ -106,7 +106,7 @@ const color = {
|
|
|
106
106
|
group: 'paint',
|
|
107
107
|
state: 'active',
|
|
108
108
|
introduced: '0.7.0',
|
|
109
|
-
description: 'Use on
|
|
109
|
+
description: 'Use for purple text on subtle purple accent backgrounds when there is no meaning tied to the color.'
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
},
|
|
@@ -116,7 +116,7 @@ const color = {
|
|
|
116
116
|
group: 'paint',
|
|
117
117
|
state: 'active',
|
|
118
118
|
introduced: '0.6.0',
|
|
119
|
-
description: 'Use for teal text on
|
|
119
|
+
description: 'Use for teal text on subtlest and subtler teal accent backgrounds when there is no meaning tied to the color.'
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
bolder: {
|
|
@@ -124,7 +124,7 @@ const color = {
|
|
|
124
124
|
group: 'paint',
|
|
125
125
|
state: 'active',
|
|
126
126
|
introduced: '0.7.0',
|
|
127
|
-
description: 'Use on
|
|
127
|
+
description: 'Use for teal text on subtle teal accent backgrounds when there is no meaning tied to the color.'
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
},
|
|
@@ -134,7 +134,7 @@ const color = {
|
|
|
134
134
|
group: 'paint',
|
|
135
135
|
state: 'active',
|
|
136
136
|
introduced: '0.6.0',
|
|
137
|
-
description: 'Use for magenta text on
|
|
137
|
+
description: 'Use for magenta text on subtlest and subtler magenta accent backgrounds when there is no meaning tied to the color.'
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
bolder: {
|
|
@@ -142,7 +142,7 @@ const color = {
|
|
|
142
142
|
group: 'paint',
|
|
143
143
|
state: 'active',
|
|
144
144
|
introduced: '0.7.0',
|
|
145
|
-
description: 'Use on
|
|
145
|
+
description: 'Use for magenta text on subtle magenta accent backgrounds when there is no meaning tied to the color.'
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
},
|