@atlaskit/tokens 1.56.3 → 1.58.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,30 @@
1
1
  # @atlaskit/tokens
2
2
 
3
+ ## 1.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#127511](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/127511)
8
+ [`db30e29344013`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/db30e29344013) -
9
+ Widening range of `react` and `react-dom` peer dependencies from `^16.8.0 || ^17.0.0 || ~18.2.0`
10
+ to the wider range of ``^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).
11
+
12
+ This change has been done to enable usage of `react@18.3` as well as to have a consistent peer
13
+ dependency range for `react` and `react-dom` for `/platform` packages.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
19
+ ## 1.57.0
20
+
21
+ ### Minor Changes
22
+
23
+ - [#126723](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126723)
24
+ [`b637fc4edb5b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b637fc4edb5b9) -
25
+ [ux] tokens-babel-plugin accepts `shouldForceAutoFallback` which overrides fallback values
26
+ regardless of provided fallback.
27
+
3
28
  ## 1.56.3
4
29
 
5
30
  ### 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
@@ -7,6 +7,7 @@ export default function plugin(): {
7
7
  enter(path: NodePath<t.Program>, state: {
8
8
  opts: {
9
9
  shouldUseAutoFallback?: boolean;
10
+ shouldForceAutoFallback?: boolean;
10
11
  defaultTheme?: DefaultColorTheme;
11
12
  };
12
13
  }): void;
@@ -7,6 +7,7 @@ export default function plugin(): {
7
7
  enter(path: NodePath<t.Program>, state: {
8
8
  opts: {
9
9
  shouldUseAutoFallback?: boolean;
10
+ shouldForceAutoFallback?: boolean;
10
11
  defaultTheme?: DefaultColorTheme;
11
12
  };
12
13
  }): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "1.56.3",
3
+ "version": "1.58.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/"
@@ -35,7 +35,7 @@
35
35
  "codegen-tokens": "ts-node --project $(npx repo-root)/tsconfig.node.json ./scripts/style-dictionary/build && cd $(npx repo-root)/packages/design-system/primitives && yarn codegen-styles && cd $(npx repo-root)/packages/design-system/ds-explorations && yarn codegen-styles && cd $(npx repo-root)/packages/design-system/heading && yarn codegen"
36
36
  },
37
37
  "dependencies": {
38
- "@atlaskit/ds-lib": "^2.3.0",
38
+ "@atlaskit/ds-lib": "^2.4.0",
39
39
  "@atlaskit/platform-feature-flags": "^0.3.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "@babel/traverse": "^7.23.2",
@@ -43,17 +43,17 @@
43
43
  "bind-event-listener": "^3.0.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
46
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@af/accessibility-testing": "*",
50
50
  "@af/formatting": "*",
51
- "@atlaskit/button": "^19.1.0",
52
- "@atlaskit/calendar": "^14.4.0",
53
- "@atlaskit/checkbox": "^13.5.0",
54
- "@atlaskit/radio": "^6.4.0",
55
- "@atlaskit/textfield": "^6.4.0",
56
- "@atlaskit/tooltip": "^18.5.0",
51
+ "@atlaskit/button": "^19.2.0",
52
+ "@atlaskit/calendar": "^14.5.0",
53
+ "@atlaskit/checkbox": "^13.7.0",
54
+ "@atlaskit/radio": "^6.5.0",
55
+ "@atlaskit/textfield": "^6.5.0",
56
+ "@atlaskit/tooltip": "^18.7.0",
57
57
  "@atlaskit/visual-regression": "*",
58
58
  "@atlassian/codegen": "^0.1.0",
59
59
  "@atlassian/feature-flags-test-utils": "*",