@atlaskit/tokens 7.1.1 → 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.
Files changed (115) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
  3. package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
  4. package/dist/cjs/artifacts/palettes-raw/palette.js +147 -147
  5. package/dist/cjs/artifacts/theme-import-map.js +1 -13
  6. package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  7. package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
  8. package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  9. package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
  10. package/dist/cjs/artifacts/token-default-values.js +266 -266
  11. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  12. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +436 -436
  13. package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  14. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +375 -375
  15. package/dist/cjs/entry-points/palettes-raw.js +0 -7
  16. package/dist/cjs/entry-points/token-metadata.codegen.js +266 -266
  17. package/dist/cjs/entry-points/tokens-raw.js +0 -14
  18. package/dist/cjs/get-theme-styles.js +0 -3
  19. package/dist/cjs/get-token-value.js +0 -4
  20. package/dist/cjs/get-token.js +0 -4
  21. package/dist/cjs/theme-config.js +1 -19
  22. package/dist/cjs/utils/theme-loading.js +3 -7
  23. package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
  24. package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
  25. package/dist/es2019/artifacts/palettes-raw/palette.js +147 -147
  26. package/dist/es2019/artifacts/theme-import-map.js +2 -6
  27. package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +289 -289
  28. package/dist/es2019/artifacts/themes/atlassian-dark.js +294 -294
  29. package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +218 -218
  30. package/dist/es2019/artifacts/themes/atlassian-light.js +266 -266
  31. package/dist/es2019/artifacts/token-default-values.js +266 -266
  32. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  33. package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +436 -436
  34. package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  35. package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +375 -375
  36. package/dist/es2019/entry-points/palettes-raw.js +0 -1
  37. package/dist/es2019/entry-points/token-metadata.codegen.js +266 -266
  38. package/dist/es2019/entry-points/tokens-raw.js +0 -2
  39. package/dist/es2019/get-theme-styles.js +0 -1
  40. package/dist/es2019/get-token-value.js +0 -4
  41. package/dist/es2019/get-token.js +0 -4
  42. package/dist/es2019/theme-config.js +1 -19
  43. package/dist/es2019/utils/theme-loading.js +0 -4
  44. package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
  45. package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
  46. package/dist/esm/artifacts/palettes-raw/palette.js +147 -147
  47. package/dist/esm/artifacts/theme-import-map.js +1 -9
  48. package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  49. package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
  50. package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  51. package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
  52. package/dist/esm/artifacts/token-default-values.js +266 -266
  53. package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  54. package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +436 -436
  55. package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  56. package/dist/esm/artifacts/tokens-raw/atlassian-light.js +375 -375
  57. package/dist/esm/entry-points/palettes-raw.js +0 -1
  58. package/dist/esm/entry-points/token-metadata.codegen.js +266 -266
  59. package/dist/esm/entry-points/tokens-raw.js +0 -2
  60. package/dist/esm/get-theme-styles.js +0 -3
  61. package/dist/esm/get-token-value.js +0 -4
  62. package/dist/esm/get-token.js +0 -4
  63. package/dist/esm/theme-config.js +1 -19
  64. package/dist/esm/utils/theme-loading.js +3 -7
  65. package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
  66. package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
  67. package/dist/types/artifacts/palettes-raw/palette.d.ts +1 -1
  68. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  69. package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  70. package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
  71. package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  72. package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
  73. package/dist/types/artifacts/token-default-values.d.ts +266 -266
  74. package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  75. package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  76. package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  77. package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  78. package/dist/types/entry-points/palettes-raw.d.ts +0 -1
  79. package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
  80. package/dist/types/entry-points/tokens-raw.d.ts +0 -2
  81. package/dist/types/theme-config.d.ts +6 -6
  82. package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
  83. package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
  84. package/dist/types-ts4.5/artifacts/palettes-raw/palette.d.ts +1 -1
  85. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  86. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  87. package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
  88. package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  89. package/dist/types-ts4.5/artifacts/themes/atlassian-light.d.ts +2 -2
  90. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +266 -266
  91. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  92. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  93. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  94. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  95. package/dist/types-ts4.5/entry-points/palettes-raw.d.ts +0 -1
  96. package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
  97. package/dist/types-ts4.5/entry-points/tokens-raw.d.ts +0 -2
  98. package/dist/types-ts4.5/theme-config.d.ts +4 -8
  99. package/figma/atlassian-dark-increased-contrast.json +292 -292
  100. package/figma/atlassian-dark.json +297 -297
  101. package/figma/atlassian-light-increased-contrast.json +220 -220
  102. package/figma/atlassian-light.json +268 -268
  103. package/package.json +5 -5
  104. package/dist/cjs/artifacts/themes/atlassian-dark-brand-refresh.js +0 -12
  105. package/dist/cjs/artifacts/themes/atlassian-light-brand-refresh.js +0 -12
  106. package/dist/es2019/artifacts/themes/atlassian-dark-brand-refresh.js +0 -401
  107. package/dist/es2019/artifacts/themes/atlassian-light-brand-refresh.js +0 -401
  108. package/dist/esm/artifacts/themes/atlassian-dark-brand-refresh.js +0 -6
  109. package/dist/esm/artifacts/themes/atlassian-light-brand-refresh.js +0 -6
  110. package/dist/types/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
  111. package/dist/types/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
  112. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
  113. package/dist/types-ts4.5/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
  114. package/figma/atlassian-dark-brand-refresh.json +0 -3558
  115. 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;
@@ -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', 'light-brand-refresh', 'dark', 'dark-future', 'dark-increased-contrast', 'dark-brand-refresh', 'legacy-light', 'legacy-dark', 'spacing', 'shape', 'typography', 'typography-adg3', 'typography-modernized', 'typography-refreshed'];
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::023110f136ad929098f2d5a341b7ad7c>>
6
+ * @codegen <<SignedSource::a4300b2e54a0be0fd9143a9438bedc56>>
7
7
  * @codegenCommand yarn build tokens
8
8
  */
9
9
  var tokenValues = {
10
- 'color.text.brand': '#579DFF',
11
- 'elevation.surface.overlay': '#282E33',
12
- 'color.background.selected': '#1C2B41',
13
- 'color.text.selected': '#579DFF',
14
- 'color.border.brand': '#579DFF',
15
- 'color.chart.brand': '#388BFF',
16
- 'color.text.inverse': '#1D2125'
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::9975d8c2d3b07e5b405782c2d24fab5f>>
6
+ * @codegen <<SignedSource::9bb4cd1746b9d02e7d3b431f3310479f>>
7
7
  * @codegenCommand yarn build tokens
8
8
  */
9
9
  var tokenValues = {
10
- 'color.text.brand': '#0C66E4',
11
- 'elevation.surface.sunken': '#F7F8F9',
12
- 'color.background.selected': '#E9F2FF',
13
- 'color.text.selected': '#0C66E4',
14
- 'color.border.brand': '#0C66E4',
15
- 'color.chart.brand': '#1D7AFC',
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;