@kaizen/design-tokens 10.8.6 → 10.8.8

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.
@@ -48,7 +48,8 @@ function makeCSSVariableTheme(theme, printValue) {
48
48
  var leafKey = leafPath[leafPath.length - 1];
49
49
  var pathWithoutLast = leafPath.slice(0, leafPath.length - 1);
50
50
  var leafObject = pathWithoutLast.reduce(function (child, segment) {
51
- return child[segment] || (child[segment] = {});
51
+ var _a;
52
+ return (_a = child[segment]) !== null && _a !== void 0 ? _a : child[segment] = {};
52
53
  }, augmentedTheme);
53
54
  if (!leafKey) {
54
55
  throw new Error('leafKey is undefined');
@@ -46,7 +46,8 @@ function makeCSSVariableTheme(theme, printValue) {
46
46
  var leafKey = leafPath[leafPath.length - 1];
47
47
  var pathWithoutLast = leafPath.slice(0, leafPath.length - 1);
48
48
  var leafObject = pathWithoutLast.reduce(function (child, segment) {
49
- return child[segment] || (child[segment] = {});
49
+ var _a;
50
+ return (_a = child[segment]) !== null && _a !== void 0 ? _a : child[segment] = {};
50
51
  }, augmentedTheme);
51
52
  if (!leafKey) {
52
53
  throw new Error('leafKey is undefined');
@@ -1,2 +1,2 @@
1
- import { TokenStructure } from '../types';
1
+ import { type TokenStructure } from '../types';
2
2
  export declare const tokens: TokenStructure;
@@ -1,4 +1,4 @@
1
- import { Theme as BaseTheme } from './types';
1
+ import { type Theme as BaseTheme } from './types';
2
2
  /**
3
3
  * Use this class to set and apply themes, and to access or subscribe to the currently active one.
4
4
  * This class fulfills the idea of theming and runtime theme switching by relying on CSS variables,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ThemeManager } from './ThemeManager';
3
- import { Theme } from './types';
3
+ import { type Theme } from './types';
4
4
  export declare const ThemeContext: React.Context<Theme>;
5
5
  /**
6
6
  * Wrap your application in this provider using a ThemeManager, to synchronise it with a react context.
@@ -1,4 +1,4 @@
1
- import { DeepMapObjectLeafs } from '../types';
1
+ import { type DeepMapObjectLeafs } from '../types';
2
2
  /**
3
3
  * This function could use a new name during a breaking change
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DeepMapObjectLeafs } from '../types';
1
+ import { type DeepMapObjectLeafs } from '../types';
2
2
  /**
3
3
  * This allows you to map the leaf nodes of an object, and you're provided the path to that leaf as well as the value as parameters to your mapper function.
4
4
  * This function was build to support mapping theme values to their respective CSS variable identifiers.
@@ -1,4 +1,4 @@
1
- import { Theme } from '../types';
1
+ import { type Theme } from '../types';
2
2
  /**
3
3
  * @deprecated
4
4
  * - Not needed if you are using `KaizenProvider` from `@kaizen/components` or `defaultPreset` from next-services.
@@ -1,4 +1,4 @@
1
- import { DeepMapObjectLeafs } from '../legacy/types';
1
+ import { type DeepMapObjectLeafs } from '../legacy/types';
2
2
  /**
3
3
  * This function could use a new name during a breaking change
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DeepMapObjectLeafs } from '../legacy/types';
1
+ import { type DeepMapObjectLeafs } from '../legacy/types';
2
2
  /**
3
3
  * This allows you to map the leaf nodes of an object, and you're provided the path to that leaf as well as the value as parameters to your mapper function.
4
4
  * This function was build to support mapping theme values to their respective CSS variable identifiers.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kaizen/design-tokens",
3
3
  "description": "Tokens used in the Kaizen Design System",
4
- "version": "10.8.6",
4
+ "version": "10.8.8",
5
5
  "homepage": "https://github.com/cultureamp/kaizen-design-system/tree/main/packages/design-tokens",
6
6
  "repository": {
7
7
  "type": "git",
@@ -35,15 +35,15 @@
35
35
  "json-to-flat-sass": "^1.0.0",
36
36
  "lodash.flatmap": "^4.5.0",
37
37
  "object-to-css-variables": "^0.2.1",
38
- "postcss": "^8.4.49",
38
+ "postcss": "^8.5.3",
39
39
  "prettier": "*",
40
40
  "react": "^18.3.1",
41
41
  "react-highlight": "^0.15.0",
42
42
  "react-map-interaction": "^2.1.0",
43
- "rollup": "^4.28.0",
43
+ "rollup": "^4.35.0",
44
44
  "tslib": "^2.8.1",
45
45
  "tsx": "^4.19.2",
46
- "@kaizen/package-bundler": "2.0.3"
46
+ "@kaizen/package-bundler": "2.0.5"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^17.0.0 || ^18.0.0"