@atlaskit/tokens 6.3.3 → 6.4.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/tokens
2
2
 
3
+ ## 6.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`25ac893657f27`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/25ac893657f27) -
8
+ Extending `setGlobalTheme` to accept a function as an argument to update theme properties without
9
+ reinitializing defaults. For example this can be used when switching color mode:
10
+
11
+ ```
12
+ setGlobalTheme((themeState) => ({
13
+ ...themeState,
14
+ colorMode: themeState.colorMode === 'light' ? 'dark' : 'light',
15
+ }));
16
+ ```
17
+
3
18
  ## 6.3.3
4
19
 
5
20
  ### Patch Changes
@@ -7,8 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _getGlobalTheme = _interopRequireDefault(require("./get-global-theme"));
12
14
  var _themeConfig = require("./theme-config");
13
15
  var _colorUtils = require("./utils/color-utils");
14
16
  var _configurePage = _interopRequireDefault(require("./utils/configure-page"));
@@ -19,6 +21,8 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
19
21
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
20
22
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21
23
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
24
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
26
  /**
23
27
  * Sets the theme globally at runtime. This updates the `data-theme` and `data-color-mode` attributes on your page's <html> tag.
24
28
  *
@@ -42,7 +46,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
42
46
  */
43
47
  var setGlobalTheme = /*#__PURE__*/function () {
44
48
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
45
- var _ref2,
49
+ var nextThemeState,
50
+ themeLoader,
51
+ _ref2,
46
52
  _ref2$colorMode,
47
53
  colorMode,
48
54
  _ref2$contrastMode,
@@ -59,7 +65,6 @@ var setGlobalTheme = /*#__PURE__*/function () {
59
65
  typography,
60
66
  _ref2$UNSAFE_themeOpt,
61
67
  UNSAFE_themeOptions,
62
- themeLoader,
63
68
  themeState,
64
69
  themePreferences,
65
70
  loadingStrategy,
@@ -75,9 +80,11 @@ var setGlobalTheme = /*#__PURE__*/function () {
75
80
  return _regenerator.default.wrap(function _callee3$(_context3) {
76
81
  while (1) switch (_context3.prev = _context3.next) {
77
82
  case 0:
78
- _ref2 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography']() : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt;
83
+ nextThemeState = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
79
84
  themeLoader = _args3.length > 1 ? _args3[1] : undefined;
80
- // CLEANUP: Remove. This blocks application of increased contrast themes
85
+ _ref2 = typeof nextThemeState === 'function' ? nextThemeState(_objectSpread(_objectSpread({}, _themeConfig.themeStateDefaults), {}, {
86
+ typography: _themeConfig.themeStateDefaults['typography']()
87
+ }, (0, _getGlobalTheme.default)())) : nextThemeState, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography']() : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt; // CLEANUP: Remove. This blocks application of increased contrast themes
81
88
  // without the feature flag enabled.
82
89
  if (!(0, _platformFeatureFlags.fg)('platform_increased-contrast-themes')) {
83
90
  if (light === 'light-increased-contrast') {
@@ -150,44 +157,44 @@ var setGlobalTheme = /*#__PURE__*/function () {
150
157
  }))());
151
158
  }
152
159
  }
153
- _context3.next = 10;
160
+ _context3.next = 11;
154
161
  return Promise.all(loadingTasks);
155
- case 10:
162
+ case 11:
156
163
  // Load override themes after standard themes
157
164
  themeOverridePreferences = (0, _getThemePreferences.getThemeOverridePreferences)(themeState);
158
165
  _iterator = _createForOfIteratorHelper(themeOverridePreferences);
159
- _context3.prev = 12;
166
+ _context3.prev = 13;
160
167
  _iterator.s();
161
- case 14:
168
+ case 15:
162
169
  if ((_step = _iterator.n()).done) {
163
- _context3.next = 20;
170
+ _context3.next = 21;
164
171
  break;
165
172
  }
166
173
  themeId = _step.value;
167
- _context3.next = 18;
174
+ _context3.next = 19;
168
175
  return loadingStrategy(themeId);
169
- case 18:
170
- _context3.next = 14;
176
+ case 19:
177
+ _context3.next = 15;
171
178
  break;
172
- case 20:
173
- _context3.next = 25;
179
+ case 21:
180
+ _context3.next = 26;
174
181
  break;
175
- case 22:
176
- _context3.prev = 22;
177
- _context3.t0 = _context3["catch"](12);
182
+ case 23:
183
+ _context3.prev = 23;
184
+ _context3.t0 = _context3["catch"](13);
178
185
  _iterator.e(_context3.t0);
179
- case 25:
180
- _context3.prev = 25;
186
+ case 26:
187
+ _context3.prev = 26;
181
188
  _iterator.f();
182
- return _context3.finish(25);
183
- case 28:
189
+ return _context3.finish(26);
190
+ case 29:
184
191
  autoUnbind = (0, _configurePage.default)(themeState);
185
192
  return _context3.abrupt("return", autoUnbind);
186
- case 30:
193
+ case 31:
187
194
  case "end":
188
195
  return _context3.stop();
189
196
  }
190
- }, _callee3, null, [[12, 22, 25, 28]]);
197
+ }, _callee3, null, [[13, 23, 26, 29]]);
191
198
  }));
192
199
  return function setGlobalTheme() {
193
200
  return _ref.apply(this, arguments);
@@ -1,4 +1,5 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
+ import getGlobalTheme from './get-global-theme';
2
3
  import { themeStateDefaults } from './theme-config';
3
4
  import { isValidBrandHex } from './utils/color-utils';
4
5
  import configurePage from './utils/configure-page';
@@ -27,16 +28,22 @@ import { loadAndAppendThemeCss } from './utils/theme-loading';
27
28
  * setGlobalTheme({colorMode: 'auto', light: 'light', dark: 'dark', spacing: 'spacing'});
28
29
  * ```
29
30
  */
30
- const setGlobalTheme = async ({
31
- colorMode = themeStateDefaults['colorMode'],
32
- contrastMode = themeStateDefaults['contrastMode'],
33
- dark = themeStateDefaults['dark'],
34
- light = themeStateDefaults['light'],
35
- shape = themeStateDefaults['shape'],
36
- spacing = themeStateDefaults['spacing'],
37
- typography = themeStateDefaults['typography'](),
38
- UNSAFE_themeOptions = themeStateDefaults['UNSAFE_themeOptions']
39
- } = {}, themeLoader) => {
31
+ const setGlobalTheme = async (nextThemeState = {}, themeLoader) => {
32
+ let {
33
+ colorMode = themeStateDefaults['colorMode'],
34
+ contrastMode = themeStateDefaults['contrastMode'],
35
+ dark = themeStateDefaults['dark'],
36
+ light = themeStateDefaults['light'],
37
+ shape = themeStateDefaults['shape'],
38
+ spacing = themeStateDefaults['spacing'],
39
+ typography = themeStateDefaults['typography'](),
40
+ UNSAFE_themeOptions = themeStateDefaults['UNSAFE_themeOptions']
41
+ } = typeof nextThemeState === 'function' ? nextThemeState({
42
+ ...themeStateDefaults,
43
+ typography: themeStateDefaults['typography'](),
44
+ ...getGlobalTheme()
45
+ }) : nextThemeState;
46
+
40
47
  // CLEANUP: Remove. This blocks application of increased contrast themes
41
48
  // without the feature flag enabled.
42
49
  if (!fg('platform_increased-contrast-themes')) {
@@ -1,9 +1,13 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
3
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
3
4
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
5
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
+ import getGlobalTheme from './get-global-theme';
7
11
  import { themeStateDefaults } from './theme-config';
8
12
  import { isValidBrandHex } from './utils/color-utils';
9
13
  import configurePage from './utils/configure-page';
@@ -34,7 +38,9 @@ import { loadAndAppendThemeCss } from './utils/theme-loading';
34
38
  */
35
39
  var setGlobalTheme = /*#__PURE__*/function () {
36
40
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
37
- var _ref2,
41
+ var nextThemeState,
42
+ themeLoader,
43
+ _ref2,
38
44
  _ref2$colorMode,
39
45
  colorMode,
40
46
  _ref2$contrastMode,
@@ -51,7 +57,6 @@ var setGlobalTheme = /*#__PURE__*/function () {
51
57
  typography,
52
58
  _ref2$UNSAFE_themeOpt,
53
59
  UNSAFE_themeOptions,
54
- themeLoader,
55
60
  themeState,
56
61
  themePreferences,
57
62
  loadingStrategy,
@@ -67,9 +72,11 @@ var setGlobalTheme = /*#__PURE__*/function () {
67
72
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
68
73
  while (1) switch (_context3.prev = _context3.next) {
69
74
  case 0:
70
- _ref2 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? themeStateDefaults['typography']() : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt;
75
+ nextThemeState = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
71
76
  themeLoader = _args3.length > 1 ? _args3[1] : undefined;
72
- // CLEANUP: Remove. This blocks application of increased contrast themes
77
+ _ref2 = typeof nextThemeState === 'function' ? nextThemeState(_objectSpread(_objectSpread({}, themeStateDefaults), {}, {
78
+ typography: themeStateDefaults['typography']()
79
+ }, getGlobalTheme())) : nextThemeState, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? themeStateDefaults['typography']() : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt; // CLEANUP: Remove. This blocks application of increased contrast themes
73
80
  // without the feature flag enabled.
74
81
  if (!fg('platform_increased-contrast-themes')) {
75
82
  if (light === 'light-increased-contrast') {
@@ -140,44 +147,44 @@ var setGlobalTheme = /*#__PURE__*/function () {
140
147
  }))());
141
148
  }
142
149
  }
143
- _context3.next = 10;
150
+ _context3.next = 11;
144
151
  return Promise.all(loadingTasks);
145
- case 10:
152
+ case 11:
146
153
  // Load override themes after standard themes
147
154
  themeOverridePreferences = getThemeOverridePreferences(themeState);
148
155
  _iterator = _createForOfIteratorHelper(themeOverridePreferences);
149
- _context3.prev = 12;
156
+ _context3.prev = 13;
150
157
  _iterator.s();
151
- case 14:
158
+ case 15:
152
159
  if ((_step = _iterator.n()).done) {
153
- _context3.next = 20;
160
+ _context3.next = 21;
154
161
  break;
155
162
  }
156
163
  themeId = _step.value;
157
- _context3.next = 18;
164
+ _context3.next = 19;
158
165
  return loadingStrategy(themeId);
159
- case 18:
160
- _context3.next = 14;
166
+ case 19:
167
+ _context3.next = 15;
161
168
  break;
162
- case 20:
163
- _context3.next = 25;
169
+ case 21:
170
+ _context3.next = 26;
164
171
  break;
165
- case 22:
166
- _context3.prev = 22;
167
- _context3.t0 = _context3["catch"](12);
172
+ case 23:
173
+ _context3.prev = 23;
174
+ _context3.t0 = _context3["catch"](13);
168
175
  _iterator.e(_context3.t0);
169
- case 25:
170
- _context3.prev = 25;
176
+ case 26:
177
+ _context3.prev = 26;
171
178
  _iterator.f();
172
- return _context3.finish(25);
173
- case 28:
179
+ return _context3.finish(26);
180
+ case 29:
174
181
  autoUnbind = configurePage(themeState);
175
182
  return _context3.abrupt("return", autoUnbind);
176
- case 30:
183
+ case 31:
177
184
  case "end":
178
185
  return _context3.stop();
179
186
  }
180
- }, _callee3, null, [[12, 22, 25, 28]]);
187
+ }, _callee3, null, [[13, 23, 26, 29]]);
181
188
  }));
182
189
  return function setGlobalTheme() {
183
190
  return _ref.apply(this, arguments);
@@ -21,5 +21,5 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
21
21
  * setGlobalTheme({colorMode: 'auto', light: 'light', dark: 'dark', spacing: 'spacing'});
22
22
  * ```
23
23
  */
24
- declare const setGlobalTheme: ({ colorMode, contrastMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: (id: ThemeIdsWithOverrides) => void | Promise<void>) => Promise<UnbindFn>;
24
+ declare const setGlobalTheme: (nextThemeState?: Partial<ThemeState> | ((themeState: ThemeState) => ThemeState), themeLoader?: (id: ThemeIdsWithOverrides) => void | Promise<void>) => Promise<UnbindFn>;
25
25
  export default setGlobalTheme;
@@ -21,5 +21,5 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
21
21
  * setGlobalTheme({colorMode: 'auto', light: 'light', dark: 'dark', spacing: 'spacing'});
22
22
  * ```
23
23
  */
24
- declare const setGlobalTheme: ({ colorMode, contrastMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: (id: ThemeIdsWithOverrides) => void | Promise<void>) => Promise<UnbindFn>;
24
+ declare const setGlobalTheme: (nextThemeState?: Partial<ThemeState> | ((themeState: ThemeState) => ThemeState), themeLoader?: (id: ThemeIdsWithOverrides) => void | Promise<void>) => Promise<UnbindFn>;
25
25
  export default setGlobalTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "6.3.3",
3
+ "version": "6.4.0",
4
4
  "description": "Design tokens are the single source of truth to name and store design decisions.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/docs": "^11.1.0",
53
53
  "@atlaskit/dropdown-menu": "^16.3.0",
54
54
  "@atlaskit/dynamic-table": "^18.2.0",
55
- "@atlaskit/form": "^14.1.0",
55
+ "@atlaskit/form": "^14.2.0",
56
56
  "@atlaskit/grid": "^0.18.0",
57
57
  "@atlaskit/heading": "^5.2.0",
58
58
  "@atlaskit/icon": "^28.3.0",