@atlaskit/tokens 7.1.1 → 8.1.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 (154) hide show
  1. package/CHANGELOG.md +34 -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/palettes-raw/shape-palette.js +1 -16
  6. package/dist/cjs/artifacts/theme-import-map.js +1 -13
  7. package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  8. package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
  9. package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  10. package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
  11. package/dist/cjs/artifacts/themes/atlassian-shape.js +2 -2
  12. package/dist/cjs/artifacts/token-default-values.js +267 -266
  13. package/dist/cjs/artifacts/token-names.js +2 -1
  14. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  15. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +436 -436
  16. package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  17. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +375 -375
  18. package/dist/cjs/artifacts/tokens-raw/atlassian-shape.js +25 -1
  19. package/dist/cjs/entry-points/palettes-raw.js +0 -7
  20. package/dist/cjs/entry-points/token-metadata.codegen.js +271 -266
  21. package/dist/cjs/entry-points/tokens-raw.js +0 -14
  22. package/dist/cjs/get-theme-styles.js +0 -3
  23. package/dist/cjs/get-token-value.js +0 -4
  24. package/dist/cjs/get-token.js +0 -4
  25. package/dist/cjs/theme-config.js +1 -19
  26. package/dist/cjs/utils/theme-loading.js +3 -7
  27. package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
  28. package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
  29. package/dist/es2019/artifacts/palettes-raw/palette.js +147 -147
  30. package/dist/es2019/artifacts/palettes-raw/shape-palette.js +1 -16
  31. package/dist/es2019/artifacts/theme-import-map.js +2 -6
  32. package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +289 -289
  33. package/dist/es2019/artifacts/themes/atlassian-dark.js +294 -294
  34. package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +218 -218
  35. package/dist/es2019/artifacts/themes/atlassian-light.js +266 -266
  36. package/dist/es2019/artifacts/themes/atlassian-shape.js +2 -1
  37. package/dist/es2019/artifacts/token-default-values.js +267 -266
  38. package/dist/es2019/artifacts/token-names.js +2 -1
  39. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  40. package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +436 -436
  41. package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  42. package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +375 -375
  43. package/dist/es2019/artifacts/tokens-raw/atlassian-shape.js +25 -1
  44. package/dist/es2019/entry-points/palettes-raw.js +0 -1
  45. package/dist/es2019/entry-points/token-metadata.codegen.js +271 -266
  46. package/dist/es2019/entry-points/tokens-raw.js +0 -2
  47. package/dist/es2019/get-theme-styles.js +0 -1
  48. package/dist/es2019/get-token-value.js +0 -4
  49. package/dist/es2019/get-token.js +0 -4
  50. package/dist/es2019/theme-config.js +1 -19
  51. package/dist/es2019/utils/theme-loading.js +0 -4
  52. package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +8 -8
  53. package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +7 -7
  54. package/dist/esm/artifacts/palettes-raw/palette.js +147 -147
  55. package/dist/esm/artifacts/palettes-raw/shape-palette.js +1 -16
  56. package/dist/esm/artifacts/theme-import-map.js +1 -9
  57. package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
  58. package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
  59. package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
  60. package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
  61. package/dist/esm/artifacts/themes/atlassian-shape.js +2 -2
  62. package/dist/esm/artifacts/token-default-values.js +267 -266
  63. package/dist/esm/artifacts/token-names.js +2 -1
  64. package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +401 -401
  65. package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +436 -436
  66. package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +273 -273
  67. package/dist/esm/artifacts/tokens-raw/atlassian-light.js +375 -375
  68. package/dist/esm/artifacts/tokens-raw/atlassian-shape.js +25 -1
  69. package/dist/esm/entry-points/palettes-raw.js +0 -1
  70. package/dist/esm/entry-points/token-metadata.codegen.js +271 -266
  71. package/dist/esm/entry-points/tokens-raw.js +0 -2
  72. package/dist/esm/get-theme-styles.js +0 -3
  73. package/dist/esm/get-token-value.js +0 -4
  74. package/dist/esm/get-token.js +0 -4
  75. package/dist/esm/theme-config.js +1 -19
  76. package/dist/esm/utils/theme-loading.js +3 -7
  77. package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
  78. package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
  79. package/dist/types/artifacts/palettes-raw/palette.d.ts +1 -1
  80. package/dist/types/artifacts/palettes-raw/shape-palette.d.ts +1 -1
  81. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  82. package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  83. package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
  84. package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  85. package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
  86. package/dist/types/artifacts/themes/atlassian-shape.d.ts +2 -2
  87. package/dist/types/artifacts/token-default-values.d.ts +267 -266
  88. package/dist/types/artifacts/token-names.d.ts +3 -1
  89. package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  90. package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  91. package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  92. package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  93. package/dist/types/artifacts/tokens-raw/atlassian-shape.d.ts +1 -1
  94. package/dist/types/artifacts/types-internal.d.ts +2 -2
  95. package/dist/types/artifacts/types.d.ts +2 -2
  96. package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -2
  97. package/dist/types/entry-points/palettes-raw.d.ts +0 -1
  98. package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
  99. package/dist/types/entry-points/tokens-raw.d.ts +0 -2
  100. package/dist/types/theme-config.d.ts +6 -6
  101. package/dist/types/types.d.ts +1 -0
  102. package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +8 -8
  103. package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +7 -7
  104. package/dist/types-ts4.5/artifacts/palettes-raw/palette.d.ts +1 -1
  105. package/dist/types-ts4.5/artifacts/palettes-raw/shape-palette.d.ts +1 -1
  106. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  107. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
  108. package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
  109. package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
  110. package/dist/types-ts4.5/artifacts/themes/atlassian-light.d.ts +2 -2
  111. package/dist/types-ts4.5/artifacts/themes/atlassian-shape.d.ts +2 -2
  112. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +267 -266
  113. package/dist/types-ts4.5/artifacts/token-names.d.ts +3 -1
  114. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
  115. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
  116. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
  117. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
  118. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-shape.d.ts +1 -1
  119. package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
  120. package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
  121. package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -2
  122. package/dist/types-ts4.5/entry-points/palettes-raw.d.ts +0 -1
  123. package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
  124. package/dist/types-ts4.5/entry-points/tokens-raw.d.ts +0 -2
  125. package/dist/types-ts4.5/theme-config.d.ts +4 -8
  126. package/dist/types-ts4.5/types.d.ts +1 -0
  127. package/figma/atlassian-dark-increased-contrast.json +292 -292
  128. package/figma/atlassian-dark.json +297 -297
  129. package/figma/atlassian-light-increased-contrast.json +220 -220
  130. package/figma/atlassian-light.json +268 -268
  131. package/figma/atlassian-shape.json +12 -0
  132. package/package.json +11 -11
  133. package/dist/cjs/artifacts/themes/atlassian-dark-brand-refresh.js +0 -12
  134. package/dist/cjs/artifacts/themes/atlassian-light-brand-refresh.js +0 -12
  135. package/dist/cjs/artifacts/tokens-raw/atlassian-shape-rounder.js +0 -252
  136. package/dist/cjs/artifacts/tokens-raw/atlassian-shape-roundest.js +0 -252
  137. package/dist/es2019/artifacts/themes/atlassian-dark-brand-refresh.js +0 -401
  138. package/dist/es2019/artifacts/themes/atlassian-light-brand-refresh.js +0 -401
  139. package/dist/es2019/artifacts/tokens-raw/atlassian-shape-rounder.js +0 -246
  140. package/dist/es2019/artifacts/tokens-raw/atlassian-shape-roundest.js +0 -246
  141. package/dist/esm/artifacts/themes/atlassian-dark-brand-refresh.js +0 -6
  142. package/dist/esm/artifacts/themes/atlassian-light-brand-refresh.js +0 -6
  143. package/dist/esm/artifacts/tokens-raw/atlassian-shape-rounder.js +0 -246
  144. package/dist/esm/artifacts/tokens-raw/atlassian-shape-roundest.js +0 -246
  145. package/dist/types/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
  146. package/dist/types/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
  147. package/dist/types/artifacts/tokens-raw/atlassian-shape-rounder.d.ts +0 -30
  148. package/dist/types/artifacts/tokens-raw/atlassian-shape-roundest.d.ts +0 -30
  149. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-brand-refresh.d.ts +0 -7
  150. package/dist/types-ts4.5/artifacts/themes/atlassian-light-brand-refresh.d.ts +0 -7
  151. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-shape-rounder.d.ts +0 -30
  152. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-shape-roundest.d.ts +0 -30
  153. package/figma/atlassian-dark-brand-refresh.json +0 -3558
  154. 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;