@atlaskit/tokens 2.1.0 → 2.2.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 +10 -0
- package/dist/cjs/enable-global-theme.js +1 -1
- package/dist/cjs/get-theme-html-attrs.js +1 -1
- package/dist/cjs/get-theme-styles.js +1 -1
- package/dist/cjs/set-global-theme.js +1 -1
- package/dist/cjs/theme-config.js +12 -1
- package/dist/es2019/enable-global-theme.js +1 -1
- package/dist/es2019/get-theme-html-attrs.js +1 -1
- package/dist/es2019/get-theme-styles.js +1 -1
- package/dist/es2019/set-global-theme.js +1 -1
- package/dist/es2019/theme-config.js +13 -1
- package/dist/esm/enable-global-theme.js +1 -1
- package/dist/esm/get-theme-html-attrs.js +1 -1
- package/dist/esm/get-theme-styles.js +1 -1
- package/dist/esm/set-global-theme.js +1 -1
- package/dist/esm/theme-config.js +13 -1
- package/dist/types/theme-config.d.ts +8 -1
- package/dist/types-ts4.5/theme-config.d.ts +8 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#160957](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/160957)
|
|
8
|
+
[`d0fdd33f28249`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d0fdd33f28249) -
|
|
9
|
+
[ux] Default typography theme changed to modernized behind feature flag
|
|
10
|
+
`platform-default-typography-modernized`. If testing is successful the change will be available in
|
|
11
|
+
a later release.
|
|
12
|
+
|
|
3
13
|
## 2.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -44,7 +44,7 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
44
44
|
_ref$spacing = _ref.spacing,
|
|
45
45
|
spacing = _ref$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref$spacing,
|
|
46
46
|
_ref$typography = _ref.typography,
|
|
47
|
-
typography = _ref$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref$typography,
|
|
47
|
+
typography = _ref$typography === void 0 ? _themeConfig.themeStateDefaults['typography']() : _ref$typography,
|
|
48
48
|
_ref$UNSAFE_themeOpti = _ref.UNSAFE_themeOptions,
|
|
49
49
|
UNSAFE_themeOptions = _ref$UNSAFE_themeOpti === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref$UNSAFE_themeOpti;
|
|
50
50
|
var themeLoader = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -47,7 +47,7 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
47
47
|
_ref$spacing = _ref.spacing,
|
|
48
48
|
spacing = _ref$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref$spacing,
|
|
49
49
|
_ref$typography = _ref.typography,
|
|
50
|
-
typography = _ref$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref$typography,
|
|
50
|
+
typography = _ref$typography === void 0 ? _themeConfig.themeStateDefaults['typography']() : _ref$typography,
|
|
51
51
|
_ref$UNSAFE_themeOpti = _ref.UNSAFE_themeOptions,
|
|
52
52
|
UNSAFE_themeOptions = _ref$UNSAFE_themeOpti === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref$UNSAFE_themeOpti;
|
|
53
53
|
var themeAttribute = (0, _themeStateTransformer.themeObjectToString)({
|
|
@@ -59,7 +59,7 @@ var getThemeStyles = /*#__PURE__*/function () {
|
|
|
59
59
|
light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || _themeConfig.themeStateDefaults['light'],
|
|
60
60
|
shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || _themeConfig.themeStateDefaults['shape'],
|
|
61
61
|
spacing: (preferences === null || preferences === void 0 ? void 0 : preferences.spacing) || _themeConfig.themeStateDefaults['spacing'],
|
|
62
|
-
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || _themeConfig.themeStateDefaults['typography']
|
|
62
|
+
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || _themeConfig.themeStateDefaults['typography']()
|
|
63
63
|
};
|
|
64
64
|
themePreferences = (0, _getThemePreferences.getThemePreferences)(themeState);
|
|
65
65
|
themeOverridePreferences = (0, _getThemePreferences.getThemeOverridePreferences)(themeState);
|
|
@@ -76,7 +76,7 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
76
76
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
77
77
|
while (1) switch (_context3.prev = _context3.next) {
|
|
78
78
|
case 0:
|
|
79
|
-
_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;
|
|
79
|
+
_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;
|
|
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.
|
package/dist/cjs/theme-config.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.themeStateDefaults = exports.themeOverrideIds = exports.themeIdsWithOverrides = exports.themeIds = exports.themeContrastModes = exports.themeColorModes = exports.default = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
/**
|
|
8
9
|
* This file contains the source of truth for themes and all associated meta data.
|
|
9
10
|
*/
|
|
@@ -216,6 +217,11 @@ var themeConfig = {
|
|
|
216
217
|
* ThemeState: the standard representation of an app's current theme and preferences
|
|
217
218
|
*/
|
|
218
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Can't evaluate typography feature flags at the module level,
|
|
222
|
+
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
223
|
+
*/
|
|
224
|
+
|
|
219
225
|
/**
|
|
220
226
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
221
227
|
*/
|
|
@@ -226,7 +232,12 @@ var themeStateDefaults = exports.themeStateDefaults = {
|
|
|
226
232
|
light: 'light',
|
|
227
233
|
shape: undefined,
|
|
228
234
|
spacing: 'spacing',
|
|
229
|
-
typography:
|
|
235
|
+
typography: function typography() {
|
|
236
|
+
if ((0, _platformFeatureFlags.fg)('platform-default-typography-modernized')) {
|
|
237
|
+
return 'typography-modernized';
|
|
238
|
+
}
|
|
239
|
+
return undefined;
|
|
240
|
+
},
|
|
230
241
|
UNSAFE_themeOptions: undefined
|
|
231
242
|
};
|
|
232
243
|
|
|
@@ -30,7 +30,7 @@ const enableGlobalTheme = ({
|
|
|
30
30
|
light = themeStateDefaults['light'],
|
|
31
31
|
shape = themeStateDefaults['shape'],
|
|
32
32
|
spacing = themeStateDefaults['spacing'],
|
|
33
|
-
typography = themeStateDefaults['typography'],
|
|
33
|
+
typography = themeStateDefaults['typography'](),
|
|
34
34
|
UNSAFE_themeOptions = themeStateDefaults['UNSAFE_themeOptions']
|
|
35
35
|
} = {}, themeLoader) => {
|
|
36
36
|
const themeState = {
|
|
@@ -28,7 +28,7 @@ const getThemeHtmlAttrs = ({
|
|
|
28
28
|
contrastMode = themeStateDefaults['contrastMode'],
|
|
29
29
|
shape = themeStateDefaults['shape'],
|
|
30
30
|
spacing = themeStateDefaults['spacing'],
|
|
31
|
-
typography = themeStateDefaults['typography'],
|
|
31
|
+
typography = themeStateDefaults['typography'](),
|
|
32
32
|
UNSAFE_themeOptions = themeStateDefaults['UNSAFE_themeOptions']
|
|
33
33
|
} = {}) => {
|
|
34
34
|
const themeAttribute = themeObjectToString({
|
|
@@ -38,7 +38,7 @@ const getThemeStyles = async preferences => {
|
|
|
38
38
|
light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || themeStateDefaults['light'],
|
|
39
39
|
shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || themeStateDefaults['shape'],
|
|
40
40
|
spacing: (preferences === null || preferences === void 0 ? void 0 : preferences.spacing) || themeStateDefaults['spacing'],
|
|
41
|
-
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || themeStateDefaults['typography']
|
|
41
|
+
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || themeStateDefaults['typography']()
|
|
42
42
|
};
|
|
43
43
|
themePreferences = getThemePreferences(themeState);
|
|
44
44
|
themeOverridePreferences = getThemeOverridePreferences(themeState);
|
|
@@ -34,7 +34,7 @@ const setGlobalTheme = async ({
|
|
|
34
34
|
light = themeStateDefaults['light'],
|
|
35
35
|
shape = themeStateDefaults['shape'],
|
|
36
36
|
spacing = themeStateDefaults['spacing'],
|
|
37
|
-
typography = themeStateDefaults['typography'],
|
|
37
|
+
typography = themeStateDefaults['typography'](),
|
|
38
38
|
UNSAFE_themeOptions = themeStateDefaults['UNSAFE_themeOptions']
|
|
39
39
|
} = {}, themeLoader) => {
|
|
40
40
|
// CLEANUP: Remove. This blocks application of increased contrast themes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* This file contains the source of truth for themes and all associated meta data.
|
|
3
5
|
*/
|
|
@@ -210,6 +212,11 @@ const themeConfig = {
|
|
|
210
212
|
* ThemeState: the standard representation of an app's current theme and preferences
|
|
211
213
|
*/
|
|
212
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Can't evaluate typography feature flags at the module level,
|
|
217
|
+
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
218
|
+
*/
|
|
219
|
+
|
|
213
220
|
/**
|
|
214
221
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
215
222
|
*/
|
|
@@ -220,7 +227,12 @@ export const themeStateDefaults = {
|
|
|
220
227
|
light: 'light',
|
|
221
228
|
shape: undefined,
|
|
222
229
|
spacing: 'spacing',
|
|
223
|
-
typography:
|
|
230
|
+
typography: () => {
|
|
231
|
+
if (fg('platform-default-typography-modernized')) {
|
|
232
|
+
return 'typography-modernized';
|
|
233
|
+
}
|
|
234
|
+
return undefined;
|
|
235
|
+
},
|
|
224
236
|
UNSAFE_themeOptions: undefined
|
|
225
237
|
};
|
|
226
238
|
|
|
@@ -38,7 +38,7 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
38
38
|
_ref$spacing = _ref.spacing,
|
|
39
39
|
spacing = _ref$spacing === void 0 ? themeStateDefaults['spacing'] : _ref$spacing,
|
|
40
40
|
_ref$typography = _ref.typography,
|
|
41
|
-
typography = _ref$typography === void 0 ? themeStateDefaults['typography'] : _ref$typography,
|
|
41
|
+
typography = _ref$typography === void 0 ? themeStateDefaults['typography']() : _ref$typography,
|
|
42
42
|
_ref$UNSAFE_themeOpti = _ref.UNSAFE_themeOptions,
|
|
43
43
|
UNSAFE_themeOptions = _ref$UNSAFE_themeOpti === void 0 ? themeStateDefaults['UNSAFE_themeOptions'] : _ref$UNSAFE_themeOpti;
|
|
44
44
|
var themeLoader = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -40,7 +40,7 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
40
40
|
_ref$spacing = _ref.spacing,
|
|
41
41
|
spacing = _ref$spacing === void 0 ? themeStateDefaults['spacing'] : _ref$spacing,
|
|
42
42
|
_ref$typography = _ref.typography,
|
|
43
|
-
typography = _ref$typography === void 0 ? themeStateDefaults['typography'] : _ref$typography,
|
|
43
|
+
typography = _ref$typography === void 0 ? themeStateDefaults['typography']() : _ref$typography,
|
|
44
44
|
_ref$UNSAFE_themeOpti = _ref.UNSAFE_themeOptions,
|
|
45
45
|
UNSAFE_themeOptions = _ref$UNSAFE_themeOpti === void 0 ? themeStateDefaults['UNSAFE_themeOptions'] : _ref$UNSAFE_themeOpti;
|
|
46
46
|
var themeAttribute = themeObjectToString({
|
|
@@ -49,7 +49,7 @@ var getThemeStyles = /*#__PURE__*/function () {
|
|
|
49
49
|
light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || themeStateDefaults['light'],
|
|
50
50
|
shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || themeStateDefaults['shape'],
|
|
51
51
|
spacing: (preferences === null || preferences === void 0 ? void 0 : preferences.spacing) || themeStateDefaults['spacing'],
|
|
52
|
-
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || themeStateDefaults['typography']
|
|
52
|
+
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || themeStateDefaults['typography']()
|
|
53
53
|
};
|
|
54
54
|
themePreferences = getThemePreferences(themeState);
|
|
55
55
|
themeOverridePreferences = getThemeOverridePreferences(themeState);
|
|
@@ -67,7 +67,7 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
67
67
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
68
68
|
while (1) switch (_context3.prev = _context3.next) {
|
|
69
69
|
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;
|
|
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;
|
|
71
71
|
themeLoader = _args3.length > 1 ? _args3[1] : undefined;
|
|
72
72
|
// CLEANUP: Remove. This blocks application of increased contrast themes
|
|
73
73
|
// without the feature flag enabled.
|
package/dist/esm/theme-config.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* This file contains the source of truth for themes and all associated meta data.
|
|
3
5
|
*/
|
|
@@ -210,6 +212,11 @@ var themeConfig = {
|
|
|
210
212
|
* ThemeState: the standard representation of an app's current theme and preferences
|
|
211
213
|
*/
|
|
212
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Can't evaluate typography feature flags at the module level,
|
|
217
|
+
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
218
|
+
*/
|
|
219
|
+
|
|
213
220
|
/**
|
|
214
221
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
215
222
|
*/
|
|
@@ -220,7 +227,12 @@ export var themeStateDefaults = {
|
|
|
220
227
|
light: 'light',
|
|
221
228
|
shape: undefined,
|
|
222
229
|
spacing: 'spacing',
|
|
223
|
-
typography:
|
|
230
|
+
typography: function typography() {
|
|
231
|
+
if (fg('platform-default-typography-modernized')) {
|
|
232
|
+
return 'typography-modernized';
|
|
233
|
+
}
|
|
234
|
+
return undefined;
|
|
235
|
+
},
|
|
224
236
|
UNSAFE_themeOptions: undefined
|
|
225
237
|
};
|
|
226
238
|
|
|
@@ -124,10 +124,17 @@ export interface ThemeState {
|
|
|
124
124
|
typography?: Extract<ThemeIds, 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed'>;
|
|
125
125
|
UNSAFE_themeOptions?: ThemeOptionsSchema;
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Can't evaluate typography feature flags at the module level,
|
|
129
|
+
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
130
|
+
*/
|
|
131
|
+
interface ThemeStateDefaults extends Omit<ThemeState, 'typography'> {
|
|
132
|
+
typography: () => ThemeState['typography'];
|
|
133
|
+
}
|
|
127
134
|
/**
|
|
128
135
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
129
136
|
*/
|
|
130
|
-
export declare const themeStateDefaults:
|
|
137
|
+
export declare const themeStateDefaults: ThemeStateDefaults;
|
|
131
138
|
/**
|
|
132
139
|
* Represents theme state once mounted to the page
|
|
133
140
|
* (the page doesn't have an "auto" color mode, it's either light or dark)
|
|
@@ -165,10 +165,17 @@ export interface ThemeState {
|
|
|
165
165
|
typography?: Extract<ThemeIds, 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed'>;
|
|
166
166
|
UNSAFE_themeOptions?: ThemeOptionsSchema;
|
|
167
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Can't evaluate typography feature flags at the module level,
|
|
170
|
+
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
171
|
+
*/
|
|
172
|
+
interface ThemeStateDefaults extends Omit<ThemeState, 'typography'> {
|
|
173
|
+
typography: () => ThemeState['typography'];
|
|
174
|
+
}
|
|
168
175
|
/**
|
|
169
176
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
170
177
|
*/
|
|
171
|
-
export declare const themeStateDefaults:
|
|
178
|
+
export declare const themeStateDefaults: ThemeStateDefaults;
|
|
172
179
|
/**
|
|
173
180
|
* Represents theme state once mounted to the page
|
|
174
181
|
* (the page doesn't have an "auto" color mode, it's either light or dark)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.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/"
|
|
@@ -130,6 +130,9 @@
|
|
|
130
130
|
},
|
|
131
131
|
"platform-component-visual-refresh": {
|
|
132
132
|
"type": "boolean"
|
|
133
|
+
},
|
|
134
|
+
"platform-default-typography-modernized": {
|
|
135
|
+
"type": "boolean"
|
|
133
136
|
}
|
|
134
137
|
},
|
|
135
138
|
"homepage": "https://atlassian.design/components/tokens"
|