@atlaskit/tokens 7.1.0 → 8.0.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 +33 -0
- package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
- package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
- package/dist/cjs/artifacts/palettes-raw/palette.js +147 -147
- package/dist/cjs/artifacts/theme-import-map.js +1 -13
- package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +266 -266
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +436 -436
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +375 -375
- package/dist/cjs/babel-plugin/plugin.js +8 -0
- package/dist/cjs/entry-points/palettes-raw.js +0 -7
- package/dist/cjs/entry-points/token-metadata.codegen.js +266 -266
- package/dist/cjs/entry-points/tokens-raw.js +0 -14
- package/dist/cjs/get-theme-styles.js +0 -3
- package/dist/cjs/get-token-value.js +0 -4
- package/dist/cjs/get-token.js +0 -4
- package/dist/cjs/theme-config.js +1 -19
- package/dist/cjs/utils/theme-loading.js +3 -7
- package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
- package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
- package/dist/es2019/artifacts/palettes-raw/palette.js +147 -147
- package/dist/es2019/artifacts/theme-import-map.js +2 -6
- package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +289 -289
- package/dist/es2019/artifacts/themes/atlassian-dark.js +294 -294
- package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +218 -218
- package/dist/es2019/artifacts/themes/atlassian-light.js +266 -266
- package/dist/es2019/artifacts/token-default-values.js +266 -266
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +436 -436
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +375 -375
- package/dist/es2019/babel-plugin/plugin.js +8 -0
- package/dist/es2019/entry-points/palettes-raw.js +0 -1
- package/dist/es2019/entry-points/token-metadata.codegen.js +266 -266
- package/dist/es2019/entry-points/tokens-raw.js +0 -2
- package/dist/es2019/get-theme-styles.js +0 -1
- package/dist/es2019/get-token-value.js +0 -4
- package/dist/es2019/get-token.js +0 -4
- package/dist/es2019/theme-config.js +1 -19
- package/dist/es2019/utils/theme-loading.js +0 -4
- package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
- package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
- package/dist/esm/artifacts/palettes-raw/palette.js +147 -147
- package/dist/esm/artifacts/theme-import-map.js +1 -9
- package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +266 -266
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +436 -436
- package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +375 -375
- package/dist/esm/babel-plugin/plugin.js +8 -0
- package/dist/esm/entry-points/palettes-raw.js +0 -1
- package/dist/esm/entry-points/token-metadata.codegen.js +266 -266
- package/dist/esm/entry-points/tokens-raw.js +0 -2
- package/dist/esm/get-theme-styles.js +0 -3
- package/dist/esm/get-token-value.js +0 -4
- package/dist/esm/get-token.js +0 -4
- package/dist/esm/theme-config.js +1 -19
- package/dist/esm/utils/theme-loading.js +3 -7
- package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
- package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
- 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-increased-contrast.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +266 -266
- package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/babel-plugin/plugin.d.ts +4 -0
- package/dist/types/entry-points/palettes-raw.d.ts +0 -1
- package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types/entry-points/tokens-raw.d.ts +0 -2
- package/dist/types/theme-config.d.ts +6 -6
- package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
- package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
- 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-increased-contrast.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.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 +266 -266
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types-ts4.5/babel-plugin/plugin.d.ts +4 -0
- package/dist/types-ts4.5/entry-points/palettes-raw.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/tokens-raw.d.ts +0 -2
- package/dist/types-ts4.5/theme-config.d.ts +4 -8
- package/figma/atlassian-dark-increased-contrast.json +292 -292
- package/figma/atlassian-dark.json +297 -297
- package/figma/atlassian-light-increased-contrast.json +220 -220
- package/figma/atlassian-light.json +268 -268
- package/package.json +6 -6
- package/dist/cjs/artifacts/themes/atlassian-dark-brand-refresh.js +0 -12
- package/dist/cjs/artifacts/themes/atlassian-light-brand-refresh.js +0 -12
- package/dist/es2019/artifacts/themes/atlassian-dark-brand-refresh.js +0 -401
- package/dist/es2019/artifacts/themes/atlassian-light-brand-refresh.js +0 -401
- package/dist/esm/artifacts/themes/atlassian-dark-brand-refresh.js +0 -6
- package/dist/esm/artifacts/themes/atlassian-light-brand-refresh.js +0 -6
- package/dist/types/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
- package/dist/types/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
- package/dist/types-ts4.5/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
- package/figma/atlassian-dark-brand-refresh.json +0 -3558
- package/figma/atlassian-light-brand-refresh.json +0 -3537
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { default as light } from '../artifacts/tokens-raw/atlassian-light';
|
|
2
|
-
export { default as lightBrandRefresh } from '../artifacts/tokens-raw/atlassian-light-brand-refresh';
|
|
3
2
|
export { default as legacyLightTokens } from '../artifacts/tokens-raw/atlassian-legacy-light';
|
|
4
3
|
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
5
|
-
export { default as darkBrandRefresh } from '../artifacts/tokens-raw/atlassian-dark-brand-refresh';
|
|
6
4
|
export { default as spacing } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
7
5
|
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography';
|
|
8
6
|
export { default as typographyAdg3 } from '../artifacts/tokens-raw/atlassian-typography-adg3';
|
|
@@ -29,7 +29,6 @@ const getThemeStyles = async preferences => {
|
|
|
29
29
|
if (!fg('platform_increased-contrast-themes')) {
|
|
30
30
|
themePreferences = themePreferences.filter(n => n !== 'light-increased-contrast' && n !== 'dark-increased-contrast');
|
|
31
31
|
}
|
|
32
|
-
themePreferences = themePreferences.filter(n => n !== 'light-brand-refresh' && n !== 'dark-brand-refresh');
|
|
33
32
|
} else {
|
|
34
33
|
const themeState = {
|
|
35
34
|
colorMode: (preferences === null || preferences === void 0 ? void 0 : preferences.colorMode) || themeStateDefaults['colorMode'],
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import tokens from './artifacts/token-names';
|
|
4
3
|
/**
|
|
5
4
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
@@ -29,9 +28,6 @@ function getTokenValue(tokenId, fallback = '') {
|
|
|
29
28
|
if (!token) {
|
|
30
29
|
warnOnce(`Unknown token id at path: ${tokenId} in @atlaskit/tokens`);
|
|
31
30
|
}
|
|
32
|
-
if (token === '--ds-icon-subtlest' && !fg('platform-component-visual-refresh')) {
|
|
33
|
-
warnOnce(`Token "color.icon.subtlest" is only available when feature flag "platform-component-visual-refresh" is on, don't use it if the flag can't be turned on on this page`);
|
|
34
|
-
}
|
|
35
31
|
}
|
|
36
32
|
if (typeof window === 'undefined') {
|
|
37
33
|
return tokenValue;
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import tokens from './artifacts/token-names';
|
|
4
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
5
4
|
/**
|
|
@@ -30,9 +29,6 @@ function token(path, fallback) {
|
|
|
30
29
|
if (!token) {
|
|
31
30
|
warnOnce(`Unknown token id at path: ${path} in @atlaskit/tokens`);
|
|
32
31
|
}
|
|
33
|
-
if (token === '--ds-icon-subtlest' && !fg('platform-component-visual-refresh')) {
|
|
34
|
-
warnOnce(`Token "color.icon.subtlest" is only available when feature flag "platform-component-visual-refresh" is on, don't use it if the flag can't be turned on on this page`);
|
|
35
|
-
}
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
// if the token is not found - replacing it with variable name without any value, to avoid it being undefined which would result in invalid css
|
|
@@ -40,7 +40,7 @@ const themeContrastModes = ['more', 'no-preference', 'auto'];
|
|
|
40
40
|
*
|
|
41
41
|
* These ids must be kebab case
|
|
42
42
|
*/
|
|
43
|
-
export const themeIds = ['light-increased-contrast', 'light', 'light-future', '
|
|
43
|
+
export const themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'legacy-light', 'legacy-dark', 'spacing', 'shape', 'typography', 'typography-adg3', 'typography-modernized', 'typography-refreshed'];
|
|
44
44
|
/**
|
|
45
45
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
46
46
|
* Theme overrides are temporary and there may not be any defined at times.
|
|
@@ -191,24 +191,6 @@ const themeConfig = {
|
|
|
191
191
|
attributes: {
|
|
192
192
|
type: 'typography'
|
|
193
193
|
}
|
|
194
|
-
},
|
|
195
|
-
'atlassian-light-brand-refresh': {
|
|
196
|
-
id: 'light-brand-refresh',
|
|
197
|
-
displayName: 'Light theme (Brand refresh)',
|
|
198
|
-
palette: 'brandRefreshPalette',
|
|
199
|
-
attributes: {
|
|
200
|
-
type: 'color',
|
|
201
|
-
mode: 'light'
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
'atlassian-dark-brand-refresh': {
|
|
205
|
-
id: 'dark-brand-refresh',
|
|
206
|
-
displayName: 'Dark theme (Brand refresh)',
|
|
207
|
-
palette: 'brandRefreshPalette',
|
|
208
|
-
attributes: {
|
|
209
|
-
type: 'color',
|
|
210
|
-
mode: 'dark'
|
|
211
|
-
}
|
|
212
194
|
}
|
|
213
195
|
};
|
|
214
196
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import themeImportMap from '../artifacts/theme-import-map';
|
|
3
2
|
import { CUSTOM_THEME_ATTRIBUTE, THEME_DATA_ATTRIBUTE } from '../constants';
|
|
4
3
|
export const loadAndAppendThemeCss = async themeId => {
|
|
@@ -18,9 +17,6 @@ export const loadAndAppendThemeCss = async themeId => {
|
|
|
18
17
|
document.head.appendChild(style);
|
|
19
18
|
};
|
|
20
19
|
export const loadThemeCss = async themeId => {
|
|
21
|
-
if ((themeId === 'light' || themeId === 'dark') && fg('platform-component-visual-refresh')) {
|
|
22
|
-
themeId += '-brand-refresh';
|
|
23
|
-
}
|
|
24
20
|
const {
|
|
25
21
|
default: themeCss
|
|
26
22
|
} = await themeImportMap[themeId]();
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Token names mapped to their values, used for contrast checking when generating custom themes
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::a4300b2e54a0be0fd9143a9438bedc56>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
var tokenValues = {
|
|
10
|
-
'color.text.brand': '#
|
|
11
|
-
'elevation.surface.overlay': '#
|
|
12
|
-
'color.background.selected': '#
|
|
13
|
-
'color.text.selected': '#
|
|
14
|
-
'color.border.brand': '#
|
|
15
|
-
'color.chart.brand': '#
|
|
16
|
-
'color.text.inverse': '#
|
|
10
|
+
'color.text.brand': '#669DF1',
|
|
11
|
+
'elevation.surface.overlay': '#2B2C2F',
|
|
12
|
+
'color.background.selected': '#1C2B42',
|
|
13
|
+
'color.text.selected': '#669DF1',
|
|
14
|
+
'color.border.brand': '#669DF1',
|
|
15
|
+
'color.chart.brand': '#4688EC',
|
|
16
|
+
'color.text.inverse': '#1F1F21'
|
|
17
17
|
};
|
|
18
18
|
export default tokenValues;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Token names mapped to their values, used for contrast checking when generating custom themes
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::9bb4cd1746b9d02e7d3b431f3310479f>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
var tokenValues = {
|
|
10
|
-
'color.text.brand': '#
|
|
11
|
-
'elevation.surface.sunken': '#
|
|
12
|
-
'color.background.selected': '#
|
|
13
|
-
'color.text.selected': '#
|
|
14
|
-
'color.border.brand': '#
|
|
15
|
-
'color.chart.brand': '#
|
|
10
|
+
'color.text.brand': '#1868DB',
|
|
11
|
+
'elevation.surface.sunken': '#F8F8F8',
|
|
12
|
+
'color.background.selected': '#E9F2FE',
|
|
13
|
+
'color.text.selected': '#1868DB',
|
|
14
|
+
'color.border.brand': '#1868DB',
|
|
15
|
+
'color.chart.brand': '#357DE8',
|
|
16
16
|
'color.text.inverse': '#FFFFFF'
|
|
17
17
|
};
|
|
18
18
|
export default tokenValues;
|