@atlaskit/tokens 1.34.0 → 1.34.1
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 +6 -0
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/utils/get-theme-preferences.js +9 -6
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/utils/get-theme-preferences.js +9 -6
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/utils/get-theme-preferences.js +9 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 1.34.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#68792](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68792) [`89564a857049`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/89564a857049) - Add light border as default option
|
|
8
|
+
|
|
3
9
|
## 1.34.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var name = "@atlaskit/tokens";
|
|
11
|
-
var version = "1.34.
|
|
11
|
+
var version = "1.34.1";
|
|
12
12
|
/**
|
|
13
13
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
14
14
|
* resulting CSS Custom Property.
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -9,7 +9,7 @@ var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
var name = "@atlaskit/tokens";
|
|
12
|
-
var version = "1.34.
|
|
12
|
+
var version = "1.34.1";
|
|
13
13
|
/**
|
|
14
14
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
15
15
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -45,14 +45,17 @@ var getThemePreferences = exports.getThemePreferences = function getThemePrefere
|
|
|
45
45
|
return (0, _toConsumableArray2.default)(new Set(themePreferences));
|
|
46
46
|
};
|
|
47
47
|
var getThemeOverridePreferences = exports.getThemeOverridePreferences = function getThemeOverridePreferences(themeState) {
|
|
48
|
-
var colorMode = themeState.colorMode
|
|
49
|
-
dark = themeState.dark,
|
|
50
|
-
light = themeState.light;
|
|
48
|
+
var colorMode = themeState.colorMode;
|
|
51
49
|
var themeOverridePreferences = [];
|
|
52
|
-
var themePreferences = colorMode === 'auto' ? [light, dark] : [themeState[colorMode]];
|
|
53
50
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu')) {
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
if (colorMode === 'auto') {
|
|
52
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
53
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
54
|
+
} else if (colorMode === 'dark') {
|
|
55
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
56
|
+
} else {
|
|
57
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
58
|
+
}
|
|
56
59
|
}
|
|
57
60
|
return (0, _toConsumableArray2.default)(new Set(themeOverridePreferences));
|
|
58
61
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
const name = "@atlaskit/tokens";
|
|
4
|
-
const version = "1.34.
|
|
4
|
+
const version = "1.34.1";
|
|
5
5
|
/**
|
|
6
6
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
7
7
|
* resulting CSS Custom Property.
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
4
4
|
const name = "@atlaskit/tokens";
|
|
5
|
-
const version = "1.34.
|
|
5
|
+
const version = "1.34.1";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
8
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -40,15 +40,18 @@ export const getThemePreferences = themeState => {
|
|
|
40
40
|
};
|
|
41
41
|
export const getThemeOverridePreferences = themeState => {
|
|
42
42
|
const {
|
|
43
|
-
colorMode
|
|
44
|
-
dark,
|
|
45
|
-
light
|
|
43
|
+
colorMode
|
|
46
44
|
} = themeState;
|
|
47
45
|
const themeOverridePreferences = [];
|
|
48
|
-
const themePreferences = colorMode === 'auto' ? [light, dark] : [themeState[colorMode]];
|
|
49
46
|
if (getBooleanFF('platform.design-system-team.border-checkbox_nyoiu')) {
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
if (colorMode === 'auto') {
|
|
48
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
49
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
50
|
+
} else if (colorMode === 'dark') {
|
|
51
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
52
|
+
} else {
|
|
53
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
54
|
+
}
|
|
52
55
|
}
|
|
53
56
|
return [...new Set(themeOverridePreferences)];
|
|
54
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
var name = "@atlaskit/tokens";
|
|
4
|
-
var version = "1.34.
|
|
4
|
+
var version = "1.34.1";
|
|
5
5
|
/**
|
|
6
6
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
7
7
|
* resulting CSS Custom Property.
|
package/dist/esm/get-token.js
CHANGED
|
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import tokens from './artifacts/token-names';
|
|
3
3
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
4
4
|
var name = "@atlaskit/tokens";
|
|
5
|
-
var version = "1.34.
|
|
5
|
+
var version = "1.34.1";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
8
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -38,14 +38,17 @@ export var getThemePreferences = function getThemePreferences(themeState) {
|
|
|
38
38
|
return _toConsumableArray(new Set(themePreferences));
|
|
39
39
|
};
|
|
40
40
|
export var getThemeOverridePreferences = function getThemeOverridePreferences(themeState) {
|
|
41
|
-
var colorMode = themeState.colorMode
|
|
42
|
-
dark = themeState.dark,
|
|
43
|
-
light = themeState.light;
|
|
41
|
+
var colorMode = themeState.colorMode;
|
|
44
42
|
var themeOverridePreferences = [];
|
|
45
|
-
var themePreferences = colorMode === 'auto' ? [light, dark] : [themeState[colorMode]];
|
|
46
43
|
if (getBooleanFF('platform.design-system-team.border-checkbox_nyoiu')) {
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
if (colorMode === 'auto') {
|
|
45
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
46
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
47
|
+
} else if (colorMode === 'dark') {
|
|
48
|
+
themeOverridePreferences.push('dark-new-input-border');
|
|
49
|
+
} else {
|
|
50
|
+
themeOverridePreferences.push('light-new-input-border');
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
return _toConsumableArray(new Set(themeOverridePreferences));
|
|
51
54
|
};
|
package/package.json
CHANGED