@atlaskit/tokens 1.54.1 → 1.56.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 (95) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/artifacts/generated-pairs.js +2 -2
  3. package/dist/cjs/artifacts/palettes-raw/palette-brand-refresh.js +2257 -0
  4. package/dist/cjs/artifacts/theme-import-map.js +13 -1
  5. package/dist/cjs/artifacts/themes/atlassian-dark-brand-refresh.js +12 -0
  6. package/dist/cjs/artifacts/themes/atlassian-light-brand-refresh.js +12 -0
  7. package/dist/cjs/artifacts/themes/atlassian-typography-minor3.js +2 -2
  8. package/dist/cjs/artifacts/token-default-values.js +2 -1
  9. package/dist/cjs/artifacts/token-names.js +2 -1
  10. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-brand-refresh.js +8727 -0
  11. package/dist/cjs/artifacts/tokens-raw/atlassian-light-brand-refresh.js +8689 -0
  12. package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +9 -17
  13. package/dist/cjs/artifacts/tokens-raw/atlassian-typography-minor3.js +9 -17
  14. package/dist/cjs/get-theme-styles.js +4 -1
  15. package/dist/cjs/get-token-value.js +8 -2
  16. package/dist/cjs/get-token.js +8 -2
  17. package/dist/cjs/set-global-theme.js +1 -1
  18. package/dist/cjs/theme-config.js +19 -1
  19. package/dist/cjs/utils/get-theme-preferences.js +2 -2
  20. package/dist/cjs/utils/theme-loading.js +7 -3
  21. package/dist/es2019/artifacts/generated-pairs.js +2 -2
  22. package/dist/es2019/artifacts/palettes-raw/palette-brand-refresh.js +2251 -0
  23. package/dist/es2019/artifacts/theme-import-map.js +6 -2
  24. package/dist/es2019/artifacts/themes/atlassian-dark-brand-refresh.js +401 -0
  25. package/dist/es2019/artifacts/themes/atlassian-light-brand-refresh.js +401 -0
  26. package/dist/es2019/artifacts/themes/atlassian-typography-minor3.js +1 -7
  27. package/dist/es2019/artifacts/token-default-values.js +2 -1
  28. package/dist/es2019/artifacts/token-names.js +2 -1
  29. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-brand-refresh.js +8721 -0
  30. package/dist/es2019/artifacts/tokens-raw/atlassian-light-brand-refresh.js +8683 -0
  31. package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +9 -17
  32. package/dist/es2019/artifacts/tokens-raw/atlassian-typography-minor3.js +9 -17
  33. package/dist/es2019/get-theme-styles.js +3 -2
  34. package/dist/es2019/get-token-value.js +8 -2
  35. package/dist/es2019/get-token.js +8 -2
  36. package/dist/es2019/set-global-theme.js +2 -2
  37. package/dist/es2019/theme-config.js +19 -1
  38. package/dist/es2019/utils/get-theme-preferences.js +3 -3
  39. package/dist/es2019/utils/theme-loading.js +4 -0
  40. package/dist/esm/artifacts/generated-pairs.js +2 -2
  41. package/dist/esm/artifacts/palettes-raw/palette-brand-refresh.js +2251 -0
  42. package/dist/esm/artifacts/theme-import-map.js +9 -1
  43. package/dist/esm/artifacts/themes/atlassian-dark-brand-refresh.js +6 -0
  44. package/dist/esm/artifacts/themes/atlassian-light-brand-refresh.js +6 -0
  45. package/dist/esm/artifacts/themes/atlassian-typography-minor3.js +2 -2
  46. package/dist/esm/artifacts/token-default-values.js +2 -1
  47. package/dist/esm/artifacts/token-names.js +2 -1
  48. package/dist/esm/artifacts/tokens-raw/atlassian-dark-brand-refresh.js +8721 -0
  49. package/dist/esm/artifacts/tokens-raw/atlassian-light-brand-refresh.js +8683 -0
  50. package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +9 -17
  51. package/dist/esm/artifacts/tokens-raw/atlassian-typography-minor3.js +9 -17
  52. package/dist/esm/get-theme-styles.js +5 -2
  53. package/dist/esm/get-token-value.js +8 -2
  54. package/dist/esm/get-token.js +8 -2
  55. package/dist/esm/set-global-theme.js +2 -2
  56. package/dist/esm/theme-config.js +19 -1
  57. package/dist/esm/utils/get-theme-preferences.js +3 -3
  58. package/dist/esm/utils/theme-loading.js +7 -3
  59. package/dist/types/artifacts/generated-pairs.d.ts +1 -1
  60. package/dist/types/artifacts/palettes-raw/palette-brand-refresh.d.ts +41 -0
  61. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  62. package/dist/types/artifacts/themes/atlassian-dark-brand-refresh.d.ts +7 -0
  63. package/dist/types/artifacts/themes/atlassian-light-brand-refresh.d.ts +7 -0
  64. package/dist/types/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
  65. package/dist/types/artifacts/token-default-values.d.ts +2 -1
  66. package/dist/types/artifacts/token-names.d.ts +3 -1
  67. package/dist/types/artifacts/tokens-raw/atlassian-dark-brand-refresh.d.ts +109 -0
  68. package/dist/types/artifacts/tokens-raw/atlassian-light-brand-refresh.d.ts +89 -0
  69. package/dist/types/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -40
  70. package/dist/types/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -40
  71. package/dist/types/artifacts/types-internal.d.ts +2 -2
  72. package/dist/types/artifacts/types.d.ts +2 -2
  73. package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -2
  74. package/dist/types/theme-config.d.ts +6 -6
  75. package/dist/types/types.d.ts +23 -18
  76. package/dist/types-ts4.5/artifacts/generated-pairs.d.ts +1 -1
  77. package/dist/types-ts4.5/artifacts/palettes-raw/palette-brand-refresh.d.ts +41 -0
  78. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  79. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-brand-refresh.d.ts +7 -0
  80. package/dist/types-ts4.5/artifacts/themes/atlassian-light-brand-refresh.d.ts +7 -0
  81. package/dist/types-ts4.5/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
  82. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +2 -1
  83. package/dist/types-ts4.5/artifacts/token-names.d.ts +3 -1
  84. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-brand-refresh.d.ts +109 -0
  85. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-brand-refresh.d.ts +89 -0
  86. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -40
  87. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -40
  88. package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
  89. package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
  90. package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -2
  91. package/dist/types-ts4.5/theme-config.d.ts +8 -4
  92. package/dist/types-ts4.5/types.d.ts +23 -18
  93. package/figma/atlassian-dark-brand-refresh.json +3558 -0
  94. package/figma/atlassian-light-brand-refresh.json +3537 -0
  95. package/package.json +5 -1
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  /**
8
8
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
- * @codegen <<SignedSource::f7c730817ba1e1c9992dce2fbc46dc93>>
9
+ * @codegen <<SignedSource::4e47e59f97f2e7d43911658468035bca>>
10
10
  * @codegenCommand yarn build tokens
11
11
  */
12
12
  var tokens = [{
@@ -156,8 +156,7 @@ var tokens = [{
156
156
  "group": "typography",
157
157
  "state": "active",
158
158
  "introduced": "1.14.0",
159
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL.",
160
- "responsiveSmallerVariant": "font.heading.xlarge"
159
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
161
160
  },
162
161
  "value": "normal 500 35px/40px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
163
162
  "filePath": "schema/themes/atlassian-typography-adg3/theme.tsx",
@@ -167,8 +166,7 @@ var tokens = [{
167
166
  "group": "typography",
168
167
  "state": "active",
169
168
  "introduced": "1.14.0",
170
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL.",
171
- "responsiveSmallerVariant": "font.heading.xlarge"
169
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
172
170
  },
173
171
  "value": {
174
172
  "fontWeight": "FontWeight500",
@@ -187,8 +185,7 @@ var tokens = [{
187
185
  "group": "typography",
188
186
  "state": "active",
189
187
  "introduced": "1.14.0",
190
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL.",
191
- "responsiveSmallerVariant": "font.heading.large"
188
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
192
189
  },
193
190
  "value": "normal 600 29px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
194
191
  "filePath": "schema/themes/atlassian-typography-adg3/theme.tsx",
@@ -198,8 +195,7 @@ var tokens = [{
198
195
  "group": "typography",
199
196
  "state": "active",
200
197
  "introduced": "1.14.0",
201
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL.",
202
- "responsiveSmallerVariant": "font.heading.large"
198
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
203
199
  },
204
200
  "value": {
205
201
  "fontWeight": "FontWeight600",
@@ -218,8 +214,7 @@ var tokens = [{
218
214
  "group": "typography",
219
215
  "state": "active",
220
216
  "introduced": "1.14.0",
221
- "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L.",
222
- "responsiveSmallerVariant": "font.heading.medium"
217
+ "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
223
218
  },
224
219
  "value": "normal 500 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
225
220
  "filePath": "schema/themes/atlassian-typography-adg3/theme.tsx",
@@ -229,8 +224,7 @@ var tokens = [{
229
224
  "group": "typography",
230
225
  "state": "active",
231
226
  "introduced": "1.14.0",
232
- "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L.",
233
- "responsiveSmallerVariant": "font.heading.medium"
227
+ "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
234
228
  },
235
229
  "value": {
236
230
  "fontWeight": "FontWeight500",
@@ -249,8 +243,7 @@ var tokens = [{
249
243
  "group": "typography",
250
244
  "state": "active",
251
245
  "introduced": "1.14.0",
252
- "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M.",
253
- "responsiveSmallerVariant": "font.heading.small"
246
+ "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
254
247
  },
255
248
  "value": "normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
256
249
  "filePath": "schema/themes/atlassian-typography-adg3/theme.tsx",
@@ -260,8 +253,7 @@ var tokens = [{
260
253
  "group": "typography",
261
254
  "state": "active",
262
255
  "introduced": "1.14.0",
263
- "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M.",
264
- "responsiveSmallerVariant": "font.heading.small"
256
+ "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
265
257
  },
266
258
  "value": {
267
259
  "fontWeight": "FontWeight500",
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  /**
8
8
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
- * @codegen <<SignedSource::12bdee9d76f2380829d25e57e552d655>>
9
+ * @codegen <<SignedSource::9266e08ae662e609b2e76306cf8df17e>>
10
10
  * @codegenCommand yarn build tokens
11
11
  */
12
12
  var tokens = [{
@@ -156,8 +156,7 @@ var tokens = [{
156
156
  "group": "typography",
157
157
  "state": "active",
158
158
  "introduced": "1.14.0",
159
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL.",
160
- "responsiveSmallerVariant": "font.heading.xlarge"
159
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
161
160
  },
162
161
  "value": "normal 700 32px/36px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
163
162
  "filePath": "schema/themes/atlassian-typography-minor3/theme.tsx",
@@ -167,8 +166,7 @@ var tokens = [{
167
166
  "group": "typography",
168
167
  "state": "active",
169
168
  "introduced": "1.14.0",
170
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL.",
171
- "responsiveSmallerVariant": "font.heading.xlarge"
169
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
172
170
  },
173
171
  "value": {
174
172
  "fontWeight": "FontWeight700",
@@ -187,8 +185,7 @@ var tokens = [{
187
185
  "group": "typography",
188
186
  "state": "active",
189
187
  "introduced": "1.14.0",
190
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL.",
191
- "responsiveSmallerVariant": "font.heading.large"
188
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
192
189
  },
193
190
  "value": "normal 700 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
194
191
  "filePath": "schema/themes/atlassian-typography-minor3/theme.tsx",
@@ -198,8 +195,7 @@ var tokens = [{
198
195
  "group": "typography",
199
196
  "state": "active",
200
197
  "introduced": "1.14.0",
201
- "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL.",
202
- "responsiveSmallerVariant": "font.heading.large"
198
+ "description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
203
199
  },
204
200
  "value": {
205
201
  "fontWeight": "FontWeight700",
@@ -218,8 +214,7 @@ var tokens = [{
218
214
  "group": "typography",
219
215
  "state": "active",
220
216
  "introduced": "1.14.0",
221
- "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L.",
222
- "responsiveSmallerVariant": "font.heading.medium"
217
+ "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
223
218
  },
224
219
  "value": "normal 700 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
225
220
  "filePath": "schema/themes/atlassian-typography-minor3/theme.tsx",
@@ -229,8 +224,7 @@ var tokens = [{
229
224
  "group": "typography",
230
225
  "state": "active",
231
226
  "introduced": "1.14.0",
232
- "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L.",
233
- "responsiveSmallerVariant": "font.heading.medium"
227
+ "description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
234
228
  },
235
229
  "value": {
236
230
  "fontWeight": "FontWeight700",
@@ -249,8 +243,7 @@ var tokens = [{
249
243
  "group": "typography",
250
244
  "state": "active",
251
245
  "introduced": "1.14.0",
252
- "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M.",
253
- "responsiveSmallerVariant": "font.heading.small"
246
+ "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
254
247
  },
255
248
  "value": "normal 700 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
256
249
  "filePath": "schema/themes/atlassian-typography-minor3/theme.tsx",
@@ -260,8 +253,7 @@ var tokens = [{
260
253
  "group": "typography",
261
254
  "state": "active",
262
255
  "introduced": "1.14.0",
263
- "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M.",
264
- "responsiveSmallerVariant": "font.heading.small"
256
+ "description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
265
257
  },
266
258
  "value": {
267
259
  "fontWeight": "FontWeight700",
@@ -43,11 +43,14 @@ var getThemeStyles = /*#__PURE__*/function () {
43
43
  themePreferences = _themeConfig.themeIdsWithOverrides;
44
44
 
45
45
  // CLEANUP: Remove
46
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
46
+ if (!(0, _platformFeatureFlags.fg)('platform.design-system-team.increased-contrast-themes')) {
47
47
  themePreferences = themePreferences.filter(function (n) {
48
48
  return n !== 'light-increased-contrast' && n !== 'dark-increased-contrast';
49
49
  });
50
50
  }
51
+ themePreferences = themePreferences.filter(function (n) {
52
+ return n !== 'light-brand-refresh' && n !== 'dark-brand-refresh';
53
+ });
51
54
  } else {
52
55
  themeState = {
53
56
  colorMode: (preferences === null || preferences === void 0 ? void 0 : preferences.colorMode) || _themeConfig.themeStateDefaults['colorMode'],
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
10
  var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
10
11
  /**
11
12
  * Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
@@ -32,8 +33,13 @@ function getTokenValue(tokenId) {
32
33
  var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
33
34
  var token = _tokenNames.default[tokenId];
34
35
  var tokenValue = fallback;
35
- if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !token) {
36
- (0, _warnOnce.default)("Unknown token id at path: ".concat(tokenId, " in @atlaskit/tokens"));
36
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production') {
37
+ if (!token) {
38
+ (0, _warnOnce.default)("Unknown token id at path: ".concat(tokenId, " in @atlaskit/tokens"));
39
+ }
40
+ if (token === '--ds-icon-subtlest' && !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh')) {
41
+ (0, _warnOnce.default)("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");
42
+ }
37
43
  }
38
44
  if (typeof window === 'undefined') {
39
45
  return tokenValue;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
10
  var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
10
11
  var _constants = require("./constants");
11
12
  /**
@@ -32,8 +33,13 @@ var _constants = require("./constants");
32
33
  */
33
34
  function token(path, fallback) {
34
35
  var token = _tokenNames.default[path];
35
- if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !token) {
36
- (0, _warnOnce.default)("Unknown token id at path: ".concat(path, " in @atlaskit/tokens"));
36
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production') {
37
+ if (!token) {
38
+ (0, _warnOnce.default)("Unknown token id at path: ".concat(path, " in @atlaskit/tokens"));
39
+ }
40
+ if (token === '--ds-icon-subtlest' && !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh')) {
41
+ (0, _warnOnce.default)("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");
42
+ }
37
43
  }
38
44
 
39
45
  // 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
@@ -80,7 +80,7 @@ var setGlobalTheme = /*#__PURE__*/function () {
80
80
  themeLoader = _args3.length > 1 ? _args3[1] : undefined;
81
81
  // CLEANUP: Remove. This blocks application of increased contrast themes
82
82
  // without the feature flag enabled.
83
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
83
+ if (!(0, _platformFeatureFlags.fg)('platform.design-system-team.increased-contrast-themes')) {
84
84
  if (light === 'light-increased-contrast') {
85
85
  light = 'light';
86
86
  }
@@ -44,7 +44,7 @@ var themeContrastModes = exports.themeContrastModes = ['more', 'no-preference',
44
44
  *
45
45
  * These ids must be kebab case
46
46
  */
47
- var themeIds = exports.themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'legacy-light', 'legacy-dark', 'spacing', 'shape', 'typography-adg3', 'typography-minor3'];
47
+ var themeIds = exports.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-adg3', 'typography-minor3'];
48
48
  /**
49
49
  * Theme override ids: the equivalent of themeIds for theme overrides.
50
50
  * Theme overrides are temporary and there may not be any defined at times.
@@ -179,6 +179,24 @@ var themeConfig = {
179
179
  attributes: {
180
180
  type: 'typography'
181
181
  }
182
+ },
183
+ 'atlassian-light-brand-refresh': {
184
+ id: 'light-brand-refresh',
185
+ displayName: 'Light theme (Brand refresh)',
186
+ palette: 'brandRefreshPalette',
187
+ attributes: {
188
+ type: 'color',
189
+ mode: 'light'
190
+ }
191
+ },
192
+ 'atlassian-dark-brand-refresh': {
193
+ id: 'dark-brand-refresh',
194
+ displayName: 'Dark theme (Brand refresh)',
195
+ palette: 'brandRefreshPalette',
196
+ attributes: {
197
+ type: 'color',
198
+ mode: 'dark'
199
+ }
182
200
  }
183
201
  };
184
202
 
@@ -19,7 +19,7 @@ var getThemePreferences = exports.getThemePreferences = function getThemePrefere
19
19
  var autoColorModeThemes = [light, dark];
20
20
  var themePreferences = [];
21
21
  if (colorMode === 'auto') {
22
- if (contrastMode !== 'no-preference' && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
22
+ if (contrastMode !== 'no-preference' && (0, _platformFeatureFlags.fg)('platform.design-system-team.increased-contrast-themes')) {
23
23
  autoColorModeThemes.forEach(function (normalTheme) {
24
24
  var increasedContrastTheme = (0, _getIncreasedContrastTheme.default)(normalTheme);
25
25
  if (increasedContrastTheme) {
@@ -30,7 +30,7 @@ var getThemePreferences = exports.getThemePreferences = function getThemePrefere
30
30
  themePreferences.push.apply(themePreferences, autoColorModeThemes);
31
31
  } else {
32
32
  themePreferences.push(themeState[colorMode]);
33
- if (contrastMode !== 'no-preference' && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
33
+ if (contrastMode !== 'no-preference' && (0, _platformFeatureFlags.fg)('platform.design-system-team.increased-contrast-themes')) {
34
34
  var increasedContrastTheme = (0, _getIncreasedContrastTheme.default)(themeState[colorMode]);
35
35
  if (increasedContrastTheme) {
36
36
  themePreferences.push(increasedContrastTheme);
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.moreContrastMediaQuery = exports.loadThemeCss = exports.loadAndAppendThemeCss = exports.darkModeMediaQuery = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _themeImportMap = _interopRequireDefault(require("../artifacts/theme-import-map"));
11
12
  var _constants = require("../constants");
12
13
  var loadAndAppendThemeCss = exports.loadAndAppendThemeCss = /*#__PURE__*/function () {
@@ -51,13 +52,16 @@ var loadThemeCss = exports.loadThemeCss = /*#__PURE__*/function () {
51
52
  return _regenerator.default.wrap(function _callee2$(_context2) {
52
53
  while (1) switch (_context2.prev = _context2.next) {
53
54
  case 0:
54
- _context2.next = 2;
55
+ if ((themeId === 'light' || themeId === 'dark') && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh')) {
56
+ themeId += '-brand-refresh';
57
+ }
58
+ _context2.next = 3;
55
59
  return _themeImportMap.default[themeId]();
56
- case 2:
60
+ case 3:
57
61
  _yield$themeImportMap = _context2.sent;
58
62
  themeCss = _yield$themeImportMap.default;
59
63
  return _context2.abrupt("return", themeCss);
60
- case 5:
64
+ case 6:
61
65
  case "end":
62
66
  return _context2.stop();
63
67
  }