@atlaskit/tokens 1.8.0 → 1.9.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/cjs/artifacts/generated-pairs.js +3 -6593
- package/dist/cjs/artifacts/palettes-raw/palette.js +87 -19
- package/dist/cjs/artifacts/theme-import-map.js +1 -7
- package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +3 -3
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +57 -57
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +3 -3
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/palettes/palette.js +39 -9
- package/dist/cjs/set-global-theme.js +5 -37
- package/dist/cjs/theme-config.js +17 -17
- package/dist/cjs/tokens/atlassian-dark/color/background.js +5 -4
- package/dist/cjs/tokens/atlassian-dark/color/icon.js +2 -2
- package/dist/cjs/tokens/atlassian-dark/color/text.js +3 -3
- package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +1 -1
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +8 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/generated-pairs.js +2 -6584
- package/dist/es2019/artifacts/palettes-raw/palette.js +87 -19
- package/dist/es2019/artifacts/theme-import-map.js +1 -3
- package/dist/es2019/artifacts/themes/atlassian-dark.js +39 -39
- package/dist/es2019/artifacts/themes/atlassian-light.js +3 -3
- package/dist/es2019/artifacts/token-default-values.js +3 -3
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +57 -57
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +3 -3
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/palettes/palette.js +39 -9
- package/dist/es2019/set-global-theme.js +1 -19
- package/dist/es2019/theme-config.js +14 -14
- package/dist/es2019/tokens/atlassian-dark/color/background.js +5 -4
- package/dist/es2019/tokens/atlassian-dark/color/icon.js +2 -2
- package/dist/es2019/tokens/atlassian-dark/color/text.js +3 -3
- package/dist/es2019/tokens/atlassian-dark/elevation/shadow.js +1 -1
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +8 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/generated-pairs.js +2 -6584
- package/dist/esm/artifacts/palettes-raw/palette.js +87 -19
- package/dist/esm/artifacts/theme-import-map.js +1 -5
- package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +3 -3
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +57 -57
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +3 -3
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/palettes/palette.js +39 -9
- package/dist/esm/set-global-theme.js +5 -37
- package/dist/esm/theme-config.js +14 -14
- package/dist/esm/tokens/atlassian-dark/color/background.js +5 -4
- package/dist/esm/tokens/atlassian-dark/color/icon.js +2 -2
- package/dist/esm/tokens/atlassian-dark/color/text.js +3 -3
- package/dist/esm/tokens/atlassian-dark/elevation/shadow.js +1 -1
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +8 -8
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/generated-pairs.d.ts +9 -3
- package/dist/types/artifacts/palettes-raw/palette.d.ts +1 -1
- package/dist/types/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +3 -3
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/palettes/palette.d.ts +1 -1
- package/dist/types/theme-config.d.ts +16 -36
- package/dist/types/tokens/atlassian-dark/utility/utility.d.ts +1 -1
- package/dist/types/tokens/atlassian-light/utility/utility.d.ts +1 -1
- package/dist/types/tokens/default/utility/utility.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/generated-pairs.d.ts +9 -3
- package/dist/types-ts4.5/artifacts/palettes-raw/palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-light.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +3 -3
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types-ts4.5/palettes/palette.d.ts +1 -1
- package/dist/types-ts4.5/theme-config.d.ts +19 -36
- package/dist/types-ts4.5/tokens/atlassian-dark/utility/utility.d.ts +1 -1
- package/dist/types-ts4.5/tokens/atlassian-light/utility/utility.d.ts +1 -1
- package/dist/types-ts4.5/tokens/default/utility/utility.d.ts +1 -1
- package/figma/atlassian-dark-new-input-border.json +15 -0
- package/figma/atlassian-dark.json +38 -38
- package/figma/atlassian-light-new-input-border.json +15 -0
- package/figma/atlassian-light.json +2 -2
- package/package.json +5 -9
- package/report.api.md +18 -2
- package/tmp/api-report-tmp.d.ts +13 -2
- package/dist/cjs/tokens/atlassian-dark-iteration/color/accent.js +0 -70
- package/dist/cjs/tokens/atlassian-dark-iteration/color/background.js +0 -80
- package/dist/cjs/tokens/atlassian-dark-iteration/color/chart.js +0 -34
- package/dist/cjs/tokens/atlassian-dark-iteration/color/icon.js +0 -26
- package/dist/cjs/tokens/atlassian-dark-iteration/color/text.js +0 -29
- package/dist/cjs/tokens/atlassian-dark-iteration/elevation/shadow.js +0 -45
- package/dist/cjs/tokens/atlassian-dark-iteration/elevation/surface.js +0 -48
- package/dist/es2019/tokens/atlassian-dark-iteration/color/accent.js +0 -63
- package/dist/es2019/tokens/atlassian-dark-iteration/color/background.js +0 -73
- package/dist/es2019/tokens/atlassian-dark-iteration/color/chart.js +0 -27
- package/dist/es2019/tokens/atlassian-dark-iteration/color/icon.js +0 -19
- package/dist/es2019/tokens/atlassian-dark-iteration/color/text.js +0 -22
- package/dist/es2019/tokens/atlassian-dark-iteration/elevation/shadow.js +0 -38
- package/dist/es2019/tokens/atlassian-dark-iteration/elevation/surface.js +0 -41
- package/dist/esm/tokens/atlassian-dark-iteration/color/accent.js +0 -63
- package/dist/esm/tokens/atlassian-dark-iteration/color/background.js +0 -73
- package/dist/esm/tokens/atlassian-dark-iteration/color/chart.js +0 -27
- package/dist/esm/tokens/atlassian-dark-iteration/color/icon.js +0 -19
- package/dist/esm/tokens/atlassian-dark-iteration/color/text.js +0 -22
- package/dist/esm/tokens/atlassian-dark-iteration/elevation/shadow.js +0 -38
- package/dist/esm/tokens/atlassian-dark-iteration/elevation/surface.js +0 -41
- package/dist/types/tokens/atlassian-dark-iteration/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/color/chart.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/color/text.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-iteration/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-iteration/elevation/surface.d.ts +0 -4
|
@@ -45,7 +45,7 @@ const getThemePreferences = themeState => {
|
|
|
45
45
|
themePreferences.push(themeId);
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
if (getBooleanFF('platform.design-system-team.
|
|
48
|
+
if (getBooleanFF('platform.design-system-team.border-checkbox_nyoiu')) {
|
|
49
49
|
themePreferences.push(`${themePreferences.includes('dark') ? 'dark' : 'light'}-new-input-border`);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -96,15 +96,6 @@ const setGlobalTheme = async ({
|
|
|
96
96
|
typography
|
|
97
97
|
});
|
|
98
98
|
await Promise.all(themePreferences.map(async themeId => await loadAndAppendThemeCss(themeId)));
|
|
99
|
-
if (themePreferences.includes('dark')) {
|
|
100
|
-
if (
|
|
101
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
102
|
-
getBooleanFF('design-system-team.dark-theme-iteration_dk1ln')) {
|
|
103
|
-
await loadAndAppendThemeCss('dark-iteration');
|
|
104
|
-
} else if (getBooleanFF('platform.design-system-team.dark-iteration-confluence_e2t22')) {
|
|
105
|
-
await loadAndAppendThemeCss('dark-iteration');
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
99
|
if (colorMode === 'auto' && darkModeMql) {
|
|
109
100
|
colorMode = darkModeMql.matches ? 'dark' : 'light';
|
|
110
101
|
// Add an event listener for changes to the system theme.
|
|
@@ -160,15 +151,6 @@ export const getThemeStyles = async ({
|
|
|
160
151
|
spacing,
|
|
161
152
|
typography
|
|
162
153
|
});
|
|
163
|
-
if (themePreferences.includes('dark')) {
|
|
164
|
-
if (
|
|
165
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
166
|
-
getBooleanFF('design-system-team.dark-theme-iteration_dk1ln')) {
|
|
167
|
-
themePreferences.push('dark-iteration');
|
|
168
|
-
} else if (getBooleanFF('platform.design-system-team.dark-iteration-confluence_e2t22')) {
|
|
169
|
-
themePreferences.push('dark-iteration');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
154
|
const results = await Promise.all(themePreferences.map(async themeId => {
|
|
173
155
|
try {
|
|
174
156
|
const css = await loadThemeCss(themeId);
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
* style-dictionary will attempt to locate these in the file-system.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* ThemeOverrides: The internal identifier of a theme override. Which are themes that contain
|
|
13
|
+
* a subset of tokens intended to override an existing theme. These ids are what the actual
|
|
14
|
+
* theme files/folders are called. style-dictionary will attempt to locate these in the file-system.
|
|
15
|
+
* Theme overrides are temporary and there may not be any defined at times.
|
|
16
|
+
*/
|
|
17
|
+
|
|
11
18
|
/**
|
|
12
19
|
* Theme kinds: The type of theme.
|
|
13
20
|
* Some themes are entirely focused on Color, whilst others are purely focused on spacing.
|
|
@@ -28,6 +35,11 @@ export const themeColorModes = ['light', 'dark', 'auto'];
|
|
|
28
35
|
* These ids must be kebab case
|
|
29
36
|
*/
|
|
30
37
|
export const themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape'];
|
|
38
|
+
/**
|
|
39
|
+
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
40
|
+
* Theme overrides are temporary and there may not be any defined at times.
|
|
41
|
+
*/
|
|
42
|
+
export const themeOverrideIds = ['light-new-input-border', 'dark-new-input-border'];
|
|
31
43
|
|
|
32
44
|
/**
|
|
33
45
|
* Theme to use a base. This will create the theme as
|
|
@@ -106,24 +118,12 @@ const themeConfig = {
|
|
|
106
118
|
attributes: {
|
|
107
119
|
type: 'shape'
|
|
108
120
|
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
export const themeOverrideConfig = {
|
|
112
|
-
'atlassian-dark-iteration': {
|
|
113
|
-
id: 'dark-iteration',
|
|
114
|
-
displayName: 'Dark Theme Iteration',
|
|
115
|
-
palette: 'defaultPalette',
|
|
116
|
-
overrideTheme: 'dark',
|
|
117
|
-
attributes: {
|
|
118
|
-
type: 'color',
|
|
119
|
-
mode: 'dark'
|
|
120
|
-
}
|
|
121
121
|
},
|
|
122
122
|
'atlassian-light-new-input-border': {
|
|
123
123
|
id: 'light-new-input-border',
|
|
124
124
|
displayName: 'Light Theme New Input Border',
|
|
125
125
|
palette: 'defaultPalette',
|
|
126
|
-
|
|
126
|
+
override: 'light',
|
|
127
127
|
attributes: {
|
|
128
128
|
type: 'color',
|
|
129
129
|
mode: 'light'
|
|
@@ -133,7 +133,7 @@ export const themeOverrideConfig = {
|
|
|
133
133
|
id: 'dark-new-input-border',
|
|
134
134
|
displayName: 'Dark Theme New Input Border',
|
|
135
135
|
palette: 'defaultPalette',
|
|
136
|
-
|
|
136
|
+
override: 'dark',
|
|
137
137
|
attributes: {
|
|
138
138
|
type: 'color',
|
|
139
139
|
mode: 'dark'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const color = {
|
|
2
2
|
color: {
|
|
3
3
|
blanket: {
|
|
4
|
+
// @ts-ignore temporary value (DarkNeutral-100 60% opacity)
|
|
4
5
|
'[default]': {
|
|
5
|
-
value: '
|
|
6
|
+
value: '#10121499'
|
|
6
7
|
},
|
|
7
8
|
// @ts-ignore temporary value (Blue600 8% opacity)
|
|
8
9
|
selected: {
|
|
@@ -35,13 +36,13 @@ const color = {
|
|
|
35
36
|
},
|
|
36
37
|
input: {
|
|
37
38
|
'[default]': {
|
|
38
|
-
value: '
|
|
39
|
+
value: 'DarkNeutral200'
|
|
39
40
|
},
|
|
40
41
|
hovered: {
|
|
41
|
-
value: '
|
|
42
|
+
value: 'DarkNeutral250'
|
|
42
43
|
},
|
|
43
44
|
pressed: {
|
|
44
|
-
value: '
|
|
45
|
+
value: 'DarkNeutral200'
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
neutral: {
|
|
@@ -8,7 +8,7 @@ const color = {
|
|
|
8
8
|
value: 'DarkNeutral700'
|
|
9
9
|
},
|
|
10
10
|
inverse: {
|
|
11
|
-
value: '
|
|
11
|
+
value: 'DarkNeutral100'
|
|
12
12
|
},
|
|
13
13
|
disabled: {
|
|
14
14
|
value: 'DarkNeutral400A'
|
|
@@ -27,7 +27,7 @@ const color = {
|
|
|
27
27
|
value: 'Yellow500'
|
|
28
28
|
},
|
|
29
29
|
inverse: {
|
|
30
|
-
value: '
|
|
30
|
+
value: 'DarkNeutral100'
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
success: {
|
|
@@ -2,7 +2,7 @@ const color = {
|
|
|
2
2
|
color: {
|
|
3
3
|
text: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
value: '
|
|
5
|
+
value: 'DarkNeutral900'
|
|
6
6
|
},
|
|
7
7
|
subtle: {
|
|
8
8
|
value: 'DarkNeutral800'
|
|
@@ -11,7 +11,7 @@ const color = {
|
|
|
11
11
|
value: 'DarkNeutral700'
|
|
12
12
|
},
|
|
13
13
|
inverse: {
|
|
14
|
-
value: '
|
|
14
|
+
value: 'DarkNeutral100'
|
|
15
15
|
},
|
|
16
16
|
disabled: {
|
|
17
17
|
value: 'DarkNeutral400A'
|
|
@@ -30,7 +30,7 @@ const color = {
|
|
|
30
30
|
value: 'Yellow300'
|
|
31
31
|
},
|
|
32
32
|
inverse: {
|
|
33
|
-
value: '
|
|
33
|
+
value: 'DarkNeutral100'
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
success: {
|
|
@@ -3,24 +3,24 @@ const elevation = {
|
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
5
|
'[default]': {
|
|
6
|
-
value: '
|
|
6
|
+
value: 'DarkNeutral100'
|
|
7
7
|
},
|
|
8
8
|
hovered: {
|
|
9
|
-
value: '
|
|
9
|
+
value: 'DarkNeutral200'
|
|
10
10
|
},
|
|
11
11
|
pressed: {
|
|
12
|
-
value: '
|
|
12
|
+
value: 'DarkNeutral250'
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
sunken: {
|
|
16
|
-
value: '
|
|
16
|
+
value: 'DarkNeutral0'
|
|
17
17
|
},
|
|
18
18
|
raised: {
|
|
19
19
|
'[default]': {
|
|
20
|
-
value: '
|
|
20
|
+
value: 'DarkNeutral200'
|
|
21
21
|
},
|
|
22
22
|
hovered: {
|
|
23
|
-
value: '
|
|
23
|
+
value: 'DarkNeutral250'
|
|
24
24
|
},
|
|
25
25
|
pressed: {
|
|
26
26
|
value: 'DarkNeutral300'
|
|
@@ -28,13 +28,13 @@ const elevation = {
|
|
|
28
28
|
},
|
|
29
29
|
overlay: {
|
|
30
30
|
'[default]': {
|
|
31
|
-
value: '
|
|
31
|
+
value: 'DarkNeutral250'
|
|
32
32
|
},
|
|
33
33
|
hovered: {
|
|
34
34
|
value: 'DarkNeutral300'
|
|
35
35
|
},
|
|
36
36
|
pressed: {
|
|
37
|
-
value: '
|
|
37
|
+
value: 'DarkNeutral350'
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|