@atlaskit/tokens 4.4.1 → 4.5.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,13 @@
1
1
  # @atlaskit/tokens
2
2
 
3
+ ## 4.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#126172](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/126172)
8
+ [`38625fdee341d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38625fdee341d) -
9
+ Exclude border.radius tokens from shouldForceAutoFallback mode
10
+
3
11
  ## 4.4.1
4
12
 
5
13
  ### Patch Changes
@@ -98,7 +98,8 @@ function plugin() {
98
98
  }
99
99
 
100
100
  // Handle fallbacks
101
- var fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
101
+ // The border.radius tokens are skipped in shouldForceAutoFallback mode because these tokens are not enabled in the live products and enforcing default values on them will override all the fallback values that are currently being used to render the actual UI.
102
+ var fallback = state.opts.shouldForceAutoFallback && !tokenName.startsWith('border.radius') ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
102
103
  if (t.isStringLiteral(fallback)) {
103
104
  // String literals can be concatenated into css variable call
104
105
  // Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
@@ -88,7 +88,8 @@ export default function plugin() {
88
88
  }
89
89
 
90
90
  // Handle fallbacks
91
- const fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
91
+ // The border.radius tokens are skipped in shouldForceAutoFallback mode because these tokens are not enabled in the live products and enforcing default values on them will override all the fallback values that are currently being used to render the actual UI.
92
+ const fallback = state.opts.shouldForceAutoFallback && !tokenName.startsWith('border.radius') ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
92
93
  if (t.isStringLiteral(fallback)) {
93
94
  // String literals can be concatenated into css variable call
94
95
  // Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
@@ -88,7 +88,8 @@ export default function plugin() {
88
88
  }
89
89
 
90
90
  // Handle fallbacks
91
- var fallback = state.opts.shouldForceAutoFallback ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
91
+ // The border.radius tokens are skipped in shouldForceAutoFallback mode because these tokens are not enabled in the live products and enforcing default values on them will override all the fallback values that are currently being used to render the actual UI.
92
+ var fallback = state.opts.shouldForceAutoFallback && !tokenName.startsWith('border.radius') ? t.stringLiteral(getDefaultFallback(tokenName, state.opts.defaultTheme)) : path.node.arguments[1];
92
93
  if (t.isStringLiteral(fallback)) {
93
94
  // String literals can be concatenated into css variable call
94
95
  // Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "4.4.1",
3
+ "version": "4.5.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/"