@atlaskit/tokens 1.14.1 → 1.14.2

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,11 @@
1
1
  # @atlaskit/tokens
2
2
 
3
+ ## 1.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8e1667c2c03`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8e1667c2c03) - Adds the ability to specify a fallback theme in the tokens Babel plugin via the `defaultTheme` option. Also adds 'legacy-light' as one of the available themes, while keeping 'light' as the default if nothing is provided.
8
+
3
9
  ## 1.14.1
4
10
 
5
11
  ### Patch Changes
@@ -7,10 +7,13 @@ exports.default = void 0;
7
7
  /**
8
8
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
9
  *
10
+ * DEPRECATED, PLEASE DO NOT USE.
11
+ * Default values can now be based on either light or legacy-light themes, whereas this only contains light theme values.
12
+ *
10
13
  * Token names mapped to their value in the default Atlassian themes ('light').
11
14
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
12
15
  *
13
- * @codegen <<SignedSource::cd2ec139d4552898a3fc16a50aac159c>>
16
+ * @codegen <<SignedSource::b5a6322ad7a59d086ea12e85ec78c8f0>>
14
17
  * @codegenCommand yarn build tokens
15
18
  */
16
19
  var defaultTokenValues = {
@@ -6,11 +6,40 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = plugin;
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
10
  var t = _interopRequireWildcard(require("@babel/types"));
10
- var _tokenDefaultValues = _interopRequireDefault(require("../artifacts/token-default-values"));
11
11
  var _tokenNames = _interopRequireDefault(require("../artifacts/token-names"));
12
+ var _atlassianLegacyLight = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-legacy-light"));
13
+ var _atlassianLight = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-light"));
12
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
+ // Convert raw tokens to key-value pairs { token: value }
19
+ var getThemeValues = function getThemeValues(theme) {
20
+ var tokensToMap = theme === 'light' ? _atlassianLight.default : _atlassianLegacyLight.default;
21
+ return tokensToMap.reduce(function (formatted, rawToken) {
22
+ var value;
23
+ if (typeof rawToken.value === 'string') {
24
+ value = rawToken.value;
25
+ } else if (typeof rawToken.value === 'number') {
26
+ value = rawToken.value.toString();
27
+ } else {
28
+ // If it's a box shadow, it'll be an array of values that needs to be
29
+ // formatted to look like '0px 0px 8px #091e4229, 0px 0px 1px #091e421F'
30
+ value = rawToken.value.reduce(function (prev, curr, index) {
31
+ var value = "".concat(curr.offset.x, "px ").concat(curr.offset.y, "px ").concat(curr.radius, "px ").concat(curr.color);
32
+ if (index === 0) {
33
+ value += ", ";
34
+ }
35
+ return prev + value;
36
+ }, '');
37
+ }
38
+ return _objectSpread(_objectSpread({}, formatted), {}, (0, _defineProperty2.default)({}, rawToken.cleanName, value));
39
+ }, {});
40
+ };
41
+ var lightValues = getThemeValues('light');
42
+ var legacyLightValues = getThemeValues('legacy-light');
14
43
  function plugin() {
15
44
  return {
16
45
  visitor: {
@@ -55,7 +84,7 @@ function plugin() {
55
84
  // if no fallback is set, optionally find one from the default theme
56
85
  if (path.node.arguments.length < 2) {
57
86
  if (state.opts.shouldUseAutoFallback) {
58
- replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName), ")"));
87
+ replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName, state.opts.defaultTheme), ")"));
59
88
  } else {
60
89
  replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ")"));
61
90
  }
@@ -120,7 +149,9 @@ function plugin() {
120
149
  };
121
150
  }
122
151
  function getDefaultFallback(tokenName) {
123
- return _tokenDefaultValues.default[tokenName];
152
+ var theme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'light';
153
+ var tokens = theme === 'legacy-light' ? legacyLightValues : lightValues;
154
+ return tokens[tokenName];
124
155
  }
125
156
  function getNonAliasedImportName(node) {
126
157
  if (t.isIdentifier(node.imported)) {
@@ -3,15 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.DEFAULT_THEME = exports.CUSTOM_THEME_ATTRIBUTE = exports.CSS_VAR_FULL = exports.CSS_PREFIX = exports.COLOR_MODE_ATTRIBUTE = void 0;
6
+ exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.CUSTOM_THEME_ATTRIBUTE = exports.CSS_VAR_FULL = exports.CSS_PREFIX = exports.COLOR_MODE_ATTRIBUTE = void 0;
7
7
  var THEME_DATA_ATTRIBUTE = 'data-theme';
8
8
  exports.THEME_DATA_ATTRIBUTE = THEME_DATA_ATTRIBUTE;
9
9
  var COLOR_MODE_ATTRIBUTE = 'data-color-mode';
10
10
  exports.COLOR_MODE_ATTRIBUTE = COLOR_MODE_ATTRIBUTE;
11
11
  var CUSTOM_THEME_ATTRIBUTE = 'data-custom-theme';
12
12
  exports.CUSTOM_THEME_ATTRIBUTE = CUSTOM_THEME_ATTRIBUTE;
13
- var DEFAULT_THEME = 'light';
14
- exports.DEFAULT_THEME = DEFAULT_THEME;
15
13
  var CSS_PREFIX = 'ds';
16
14
  exports.CSS_PREFIX = CSS_PREFIX;
17
15
  var CSS_VAR_FULL = ['opacity', 'font', 'space', 'border'];
@@ -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.14.1";
11
+ var version = "1.14.2";
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.
@@ -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.14.1";
12
+ var version = "1.14.2";
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.
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
3
  *
4
+ * DEPRECATED, PLEASE DO NOT USE.
5
+ * Default values can now be based on either light or legacy-light themes, whereas this only contains light theme values.
6
+ *
4
7
  * Token names mapped to their value in the default Atlassian themes ('light').
5
8
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
6
9
  *
7
- * @codegen <<SignedSource::cd2ec139d4552898a3fc16a50aac159c>>
10
+ * @codegen <<SignedSource::b5a6322ad7a59d086ea12e85ec78c8f0>>
8
11
  * @codegenCommand yarn build tokens
9
12
  */
10
13
  const defaultTokenValues = {
@@ -1,6 +1,35 @@
1
1
  import * as t from '@babel/types';
2
- import tokenDefaultValues from '../artifacts/token-default-values';
3
2
  import tokenNames from '../artifacts/token-names';
3
+ import legacyLight from '../artifacts/tokens-raw/atlassian-legacy-light';
4
+ import light from '../artifacts/tokens-raw/atlassian-light';
5
+ // Convert raw tokens to key-value pairs { token: value }
6
+ const getThemeValues = theme => {
7
+ const tokensToMap = theme === 'light' ? light : legacyLight;
8
+ return tokensToMap.reduce((formatted, rawToken) => {
9
+ let value;
10
+ if (typeof rawToken.value === 'string') {
11
+ value = rawToken.value;
12
+ } else if (typeof rawToken.value === 'number') {
13
+ value = rawToken.value.toString();
14
+ } else {
15
+ // If it's a box shadow, it'll be an array of values that needs to be
16
+ // formatted to look like '0px 0px 8px #091e4229, 0px 0px 1px #091e421F'
17
+ value = rawToken.value.reduce((prev, curr, index) => {
18
+ let value = `${curr.offset.x}px ${curr.offset.y}px ${curr.radius}px ${curr.color}`;
19
+ if (index === 0) {
20
+ value += `, `;
21
+ }
22
+ return prev + value;
23
+ }, '');
24
+ }
25
+ return {
26
+ ...formatted,
27
+ [rawToken.cleanName]: value
28
+ };
29
+ }, {});
30
+ };
31
+ const lightValues = getThemeValues('light');
32
+ const legacyLightValues = getThemeValues('legacy-light');
4
33
  export default function plugin() {
5
34
  return {
6
35
  visitor: {
@@ -37,7 +66,7 @@ export default function plugin() {
37
66
  // if no fallback is set, optionally find one from the default theme
38
67
  if (path.node.arguments.length < 2) {
39
68
  if (state.opts.shouldUseAutoFallback) {
40
- replacementNode = t.stringLiteral(`var(${cssTokenValue}, ${getDefaultFallback(tokenName)})`);
69
+ replacementNode = t.stringLiteral(`var(${cssTokenValue}, ${getDefaultFallback(tokenName, state.opts.defaultTheme)})`);
41
70
  } else {
42
71
  replacementNode = t.stringLiteral(`var(${cssTokenValue})`);
43
72
  }
@@ -101,8 +130,9 @@ export default function plugin() {
101
130
  }
102
131
  };
103
132
  }
104
- function getDefaultFallback(tokenName) {
105
- return tokenDefaultValues[tokenName];
133
+ function getDefaultFallback(tokenName, theme = 'light') {
134
+ const tokens = theme === 'legacy-light' ? legacyLightValues : lightValues;
135
+ return tokens[tokenName];
106
136
  }
107
137
  function getNonAliasedImportName(node) {
108
138
  if (t.isIdentifier(node.imported)) {
@@ -1,7 +1,6 @@
1
1
  export const THEME_DATA_ATTRIBUTE = 'data-theme';
2
2
  export const COLOR_MODE_ATTRIBUTE = 'data-color-mode';
3
3
  export const CUSTOM_THEME_ATTRIBUTE = 'data-custom-theme';
4
- export const DEFAULT_THEME = 'light';
5
4
  export const CSS_PREFIX = 'ds';
6
5
  export const CSS_VAR_FULL = ['opacity', 'font', 'space', 'border'];
7
6
  export const TOKEN_NOT_FOUND_CSS_VAR = `--${CSS_PREFIX}-token-not-found`;
@@ -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.14.1";
4
+ const version = "1.14.2";
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.
@@ -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.14.1";
5
+ const version = "1.14.2";
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.
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
3
  *
4
+ * DEPRECATED, PLEASE DO NOT USE.
5
+ * Default values can now be based on either light or legacy-light themes, whereas this only contains light theme values.
6
+ *
4
7
  * Token names mapped to their value in the default Atlassian themes ('light').
5
8
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
6
9
  *
7
- * @codegen <<SignedSource::cd2ec139d4552898a3fc16a50aac159c>>
10
+ * @codegen <<SignedSource::b5a6322ad7a59d086ea12e85ec78c8f0>>
8
11
  * @codegenCommand yarn build tokens
9
12
  */
10
13
  var defaultTokenValues = {
@@ -1,6 +1,35 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
4
  import * as t from '@babel/types';
2
- import tokenDefaultValues from '../artifacts/token-default-values';
3
5
  import tokenNames from '../artifacts/token-names';
6
+ import legacyLight from '../artifacts/tokens-raw/atlassian-legacy-light';
7
+ import light from '../artifacts/tokens-raw/atlassian-light';
8
+ // Convert raw tokens to key-value pairs { token: value }
9
+ var getThemeValues = function getThemeValues(theme) {
10
+ var tokensToMap = theme === 'light' ? light : legacyLight;
11
+ return tokensToMap.reduce(function (formatted, rawToken) {
12
+ var value;
13
+ if (typeof rawToken.value === 'string') {
14
+ value = rawToken.value;
15
+ } else if (typeof rawToken.value === 'number') {
16
+ value = rawToken.value.toString();
17
+ } else {
18
+ // If it's a box shadow, it'll be an array of values that needs to be
19
+ // formatted to look like '0px 0px 8px #091e4229, 0px 0px 1px #091e421F'
20
+ value = rawToken.value.reduce(function (prev, curr, index) {
21
+ var value = "".concat(curr.offset.x, "px ").concat(curr.offset.y, "px ").concat(curr.radius, "px ").concat(curr.color);
22
+ if (index === 0) {
23
+ value += ", ";
24
+ }
25
+ return prev + value;
26
+ }, '');
27
+ }
28
+ return _objectSpread(_objectSpread({}, formatted), {}, _defineProperty({}, rawToken.cleanName, value));
29
+ }, {});
30
+ };
31
+ var lightValues = getThemeValues('light');
32
+ var legacyLightValues = getThemeValues('legacy-light');
4
33
  export default function plugin() {
5
34
  return {
6
35
  visitor: {
@@ -45,7 +74,7 @@ export default function plugin() {
45
74
  // if no fallback is set, optionally find one from the default theme
46
75
  if (path.node.arguments.length < 2) {
47
76
  if (state.opts.shouldUseAutoFallback) {
48
- replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName), ")"));
77
+ replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName, state.opts.defaultTheme), ")"));
49
78
  } else {
50
79
  replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ")"));
51
80
  }
@@ -110,7 +139,9 @@ export default function plugin() {
110
139
  };
111
140
  }
112
141
  function getDefaultFallback(tokenName) {
113
- return tokenDefaultValues[tokenName];
142
+ var theme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'light';
143
+ var tokens = theme === 'legacy-light' ? legacyLightValues : lightValues;
144
+ return tokens[tokenName];
114
145
  }
115
146
  function getNonAliasedImportName(node) {
116
147
  if (t.isIdentifier(node.imported)) {
@@ -1,7 +1,6 @@
1
1
  export var THEME_DATA_ATTRIBUTE = 'data-theme';
2
2
  export var COLOR_MODE_ATTRIBUTE = 'data-color-mode';
3
3
  export var CUSTOM_THEME_ATTRIBUTE = 'data-custom-theme';
4
- export var DEFAULT_THEME = 'light';
5
4
  export var CSS_PREFIX = 'ds';
6
5
  export var CSS_VAR_FULL = ['opacity', 'font', 'space', 'border'];
7
6
  export var TOKEN_NOT_FOUND_CSS_VAR = "--".concat(CSS_PREFIX, "-token-not-found");
@@ -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.14.1";
4
+ var version = "1.14.2";
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.
@@ -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.14.1";
5
+ var version = "1.14.2";
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.
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
3
  *
4
+ * DEPRECATED, PLEASE DO NOT USE.
5
+ * Default values can now be based on either light or legacy-light themes, whereas this only contains light theme values.
6
+ *
4
7
  * Token names mapped to their value in the default Atlassian themes ('light').
5
8
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
6
9
  *
7
- * @codegen <<SignedSource::cd2ec139d4552898a3fc16a50aac159c>>
10
+ * @codegen <<SignedSource::b5a6322ad7a59d086ea12e85ec78c8f0>>
8
11
  * @codegenCommand yarn build tokens
9
12
  */
10
13
  declare const defaultTokenValues: {
@@ -1,14 +1,17 @@
1
1
  import { NodePath } from '@babel/traverse';
2
2
  import * as t from '@babel/types';
3
+ type DefaultTheme = 'light' | 'legacy-light';
3
4
  export default function plugin(): {
4
5
  visitor: {
5
6
  Program: {
6
7
  enter(path: NodePath<t.Program>, state: {
7
8
  opts: {
8
9
  shouldUseAutoFallback?: boolean;
10
+ defaultTheme?: DefaultTheme;
9
11
  };
10
12
  }): void;
11
13
  exit(path: NodePath<t.Program>): void;
12
14
  };
13
15
  };
14
16
  };
17
+ export {};
@@ -1,7 +1,6 @@
1
1
  export declare const THEME_DATA_ATTRIBUTE = "data-theme";
2
2
  export declare const COLOR_MODE_ATTRIBUTE = "data-color-mode";
3
3
  export declare const CUSTOM_THEME_ATTRIBUTE = "data-custom-theme";
4
- export declare const DEFAULT_THEME = "light";
5
4
  export declare const CSS_PREFIX = "ds";
6
5
  export declare const CSS_VAR_FULL: string[];
7
6
  export declare const TOKEN_NOT_FOUND_CSS_VAR: string;
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
3
  *
4
+ * DEPRECATED, PLEASE DO NOT USE.
5
+ * Default values can now be based on either light or legacy-light themes, whereas this only contains light theme values.
6
+ *
4
7
  * Token names mapped to their value in the default Atlassian themes ('light').
5
8
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
6
9
  *
7
- * @codegen <<SignedSource::cd2ec139d4552898a3fc16a50aac159c>>
10
+ * @codegen <<SignedSource::b5a6322ad7a59d086ea12e85ec78c8f0>>
8
11
  * @codegenCommand yarn build tokens
9
12
  */
10
13
  declare const defaultTokenValues: {
@@ -1,14 +1,17 @@
1
1
  import { NodePath } from '@babel/traverse';
2
2
  import * as t from '@babel/types';
3
+ type DefaultTheme = 'light' | 'legacy-light';
3
4
  export default function plugin(): {
4
5
  visitor: {
5
6
  Program: {
6
7
  enter(path: NodePath<t.Program>, state: {
7
8
  opts: {
8
9
  shouldUseAutoFallback?: boolean;
10
+ defaultTheme?: DefaultTheme;
9
11
  };
10
12
  }): void;
11
13
  exit(path: NodePath<t.Program>): void;
12
14
  };
13
15
  };
14
16
  };
17
+ export {};
@@ -1,7 +1,6 @@
1
1
  export declare const THEME_DATA_ATTRIBUTE = "data-theme";
2
2
  export declare const COLOR_MODE_ATTRIBUTE = "data-color-mode";
3
3
  export declare const CUSTOM_THEME_ATTRIBUTE = "data-custom-theme";
4
- export declare const DEFAULT_THEME = "light";
5
4
  export declare const CSS_PREFIX = "ds";
6
5
  export declare const CSS_VAR_FULL: string[];
7
6
  export declare const TOKEN_NOT_FOUND_CSS_VAR: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
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/"
@@ -1,7 +0,0 @@
1
- {
2
- "name": "@atlaskit/tokens",
3
- "version": "1.14.1",
4
- "sideEffects": [
5
- "**/*.css"
6
- ]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "@atlaskit/tokens",
3
- "version": "1.14.1",
4
- "sideEffects": [
5
- "**/*.css"
6
- ]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "@atlaskit/tokens",
3
- "version": "1.14.1",
4
- "sideEffects": [
5
- "**/*.css"
6
- ]
7
- }