@atlaskit/tokens 1.56.3 → 1.57.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 +9 -0
- package/dist/cjs/babel-plugin/plugin.js +1 -1
- package/dist/es2019/babel-plugin/plugin.js +1 -1
- package/dist/esm/babel-plugin/plugin.js +1 -1
- package/dist/types/babel-plugin/plugin.d.ts +1 -0
- package/dist/types-ts4.5/babel-plugin/plugin.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 1.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#126723](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126723)
|
|
8
|
+
[`b637fc4edb5b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b637fc4edb5b9) -
|
|
9
|
+
[ux] tokens-babel-plugin accepts `shouldForceAutoFallback` which overrides fallback values
|
|
10
|
+
regardless of provided fallback.
|
|
11
|
+
|
|
3
12
|
## 1.56.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -106,7 +106,7 @@ function plugin() {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// Handle fallbacks
|
|
109
|
-
var fallback = path.node.arguments[1];
|
|
109
|
+
var fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
|
|
110
110
|
if (t.isStringLiteral(fallback)) {
|
|
111
111
|
// String literals can be concatenated into css variable call
|
|
112
112
|
// Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
|
|
@@ -88,7 +88,7 @@ export default function plugin() {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// Handle fallbacks
|
|
91
|
-
const fallback = path.node.arguments[1];
|
|
91
|
+
const fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
|
|
92
92
|
if (t.isStringLiteral(fallback)) {
|
|
93
93
|
// String literals can be concatenated into css variable call
|
|
94
94
|
// Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
|
|
@@ -96,7 +96,7 @@ export default function plugin() {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// Handle fallbacks
|
|
99
|
-
var fallback = path.node.arguments[1];
|
|
99
|
+
var fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
|
|
100
100
|
if (t.isStringLiteral(fallback)) {
|
|
101
101
|
// String literals can be concatenated into css variable call
|
|
102
102
|
// Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
|
package/package.json
CHANGED