@atlaskit/tokens 0.10.28 → 0.10.30

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/css/atlassian-dark.css +298 -2
  3. package/css/atlassian-legacy-dark.css +298 -2
  4. package/css/atlassian-legacy-light.css +298 -2
  5. package/css/atlassian-light.css +298 -2
  6. package/css/atlassian-spacing.css +66 -3
  7. package/dist/cjs/artifacts/rename-mapping/atlassian-spacing.js +254 -2
  8. package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
  9. package/dist/cjs/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
  10. package/dist/cjs/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
  11. package/dist/cjs/constants.js +4 -13
  12. package/dist/cjs/get-token.js +1 -1
  13. package/dist/cjs/index.js +8 -0
  14. package/dist/cjs/set-global-theme.js +30 -4
  15. package/dist/cjs/theme-change-observer.js +3 -2
  16. package/dist/cjs/theme-config.js +95 -0
  17. package/dist/cjs/tokens/atlassian-spacing/spacing.js +218 -5
  18. package/dist/cjs/tokens/default/spacing/spacing.js +612 -11
  19. package/dist/cjs/version.json +1 -1
  20. package/dist/es2019/artifacts/rename-mapping/atlassian-spacing.js +254 -2
  21. package/dist/es2019/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
  22. package/dist/es2019/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
  23. package/dist/es2019/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
  24. package/dist/es2019/constants.js +2 -10
  25. package/dist/es2019/get-token.js +1 -1
  26. package/dist/es2019/index.js +1 -0
  27. package/dist/es2019/set-global-theme.js +25 -5
  28. package/dist/es2019/theme-change-observer.js +5 -3
  29. package/dist/es2019/theme-config.js +87 -0
  30. package/dist/es2019/tokens/atlassian-spacing/spacing.js +218 -5
  31. package/dist/es2019/tokens/default/spacing/spacing.js +612 -11
  32. package/dist/es2019/version.json +1 -1
  33. package/dist/esm/artifacts/rename-mapping/atlassian-spacing.js +254 -2
  34. package/dist/esm/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
  35. package/dist/esm/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
  36. package/dist/esm/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
  37. package/dist/esm/constants.js +2 -10
  38. package/dist/esm/get-token.js +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/set-global-theme.js +28 -5
  41. package/dist/esm/theme-change-observer.js +5 -3
  42. package/dist/esm/theme-config.js +87 -0
  43. package/dist/esm/tokens/atlassian-spacing/spacing.js +218 -5
  44. package/dist/esm/tokens/default/spacing/spacing.js +612 -11
  45. package/dist/esm/version.json +1 -1
  46. package/dist/types/artifacts/rename-mapping/atlassian-spacing.d.ts +1 -1
  47. package/dist/types/artifacts/token-default-values.d.ts +64 -1
  48. package/dist/types/artifacts/token-names.d.ts +64 -1
  49. package/dist/types/artifacts/tokens-raw/atlassian-spacing.d.ts +32 -3
  50. package/dist/types/artifacts/typescript/atlassian-spacing-token-default-values.d.ts +65 -2
  51. package/dist/types/artifacts/typescript/atlassian-spacing-token-names.d.ts +129 -3
  52. package/dist/types/constants.d.ts +1 -8
  53. package/dist/types/index.d.ts +2 -1
  54. package/dist/types/set-global-theme.d.ts +2 -2
  55. package/dist/types/theme-change-observer.d.ts +4 -3
  56. package/dist/types/theme-config.d.ts +53 -0
  57. package/dist/types/types.d.ts +104 -6
  58. package/dist/types-ts4.0/artifacts/rename-mapping/atlassian-spacing.d.ts +1 -1
  59. package/dist/types-ts4.0/artifacts/token-default-values.d.ts +64 -1
  60. package/dist/types-ts4.0/artifacts/token-names.d.ts +64 -1
  61. package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-spacing.d.ts +32 -3
  62. package/dist/types-ts4.0/artifacts/typescript/atlassian-spacing-token-default-values.d.ts +65 -2
  63. package/dist/types-ts4.0/artifacts/typescript/atlassian-spacing-token-names.d.ts +129 -3
  64. package/dist/types-ts4.0/constants.d.ts +1 -14
  65. package/dist/types-ts4.0/index.d.ts +2 -1
  66. package/dist/types-ts4.0/set-global-theme.d.ts +2 -2
  67. package/dist/types-ts4.0/theme-change-observer.d.ts +4 -3
  68. package/dist/types-ts4.0/theme-config.d.ts +53 -0
  69. package/dist/types-ts4.0/types.d.ts +104 -6
  70. package/package.json +3 -3
  71. package/report.api.md +180 -17
  72. package/tmp/api-report-tmp.d.ts +164 -10
@@ -11,11 +11,10 @@ exports.default = void 0;
11
11
  * Token names mapped to their value in the default Atlassian themes ('light spacing').
12
12
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
13
13
  *
14
- * @codegen <<SignedSource::e575bc332dcc60d3fe9e378605bc9100>>
14
+ * @codegen <<SignedSource::05c2fcc3d0dba0931605dc98f7540009>>
15
15
  * @codegenCommand yarn build tokens
16
16
  */
17
17
  var defaultTokenValues = {
18
- 'spacing.container.gutter': '8px',
19
18
  'spacing.scale.0': '0px',
20
19
  'spacing.scale.100': '8px',
21
20
  'spacing.scale.150': '12px',
@@ -27,7 +26,71 @@ var defaultTokenValues = {
27
26
  'spacing.scale.600': '48px',
28
27
  'spacing.scale.025': '2px',
29
28
  'spacing.scale.050': '4px',
30
- 'spacing.scale.075': '6px'
29
+ 'spacing.scale.075': '6px',
30
+ 'spacing.scaleLinear.0': '0px',
31
+ 'spacing.scaleLinear.100': '2px',
32
+ 'spacing.scaleLinear.200': '4px',
33
+ 'spacing.scaleLinear.300': '6px',
34
+ 'spacing.scaleLinear.400': '8px',
35
+ 'spacing.scaleLinear.500': '12px',
36
+ 'spacing.scaleLinear.600': '16px',
37
+ 'spacing.scaleLinear.700': '20px',
38
+ 'spacing.scaleLinear.800': '24px',
39
+ 'spacing.scaleLinear.900': '32px',
40
+ 'spacing.scaleLinear.1000': '40px',
41
+ 'spacing.scaleLinear.1100': '48px',
42
+ 'spacing.pixel.0': '0px',
43
+ 'spacing.pixel.2': '2px',
44
+ 'spacing.pixel.4': '4px',
45
+ 'spacing.pixel.6': '6px',
46
+ 'spacing.pixel.8': '8px',
47
+ 'spacing.pixel.12': '12px',
48
+ 'spacing.pixel.16': '16px',
49
+ 'spacing.pixel.20': '20px',
50
+ 'spacing.pixel.24': '24px',
51
+ 'spacing.pixel.32': '32px',
52
+ 'spacing.pixel.40': '40px',
53
+ 'spacing.pixel.48': '48px',
54
+ 'spacing.size.none': '0px',
55
+ 'spacing.size.xxxxSmall': '2px',
56
+ 'spacing.size.xxxSmall': '4px',
57
+ 'spacing.size.xxSmall': '6px',
58
+ 'spacing.size.xsmall': '8px',
59
+ 'spacing.size.small': '12px',
60
+ 'spacing.size.medium': '16px',
61
+ 'spacing.size.large': '20px',
62
+ 'spacing.size.xlarge': '24px',
63
+ 'spacing.size.xxlarge': '32px',
64
+ 'spacing.size.xxxlarge': '40px',
65
+ 'spacing.size.xxxxlarge': '48px',
66
+ 'spacing.ecl.element.2': '2px',
67
+ 'spacing.ecl.element.4': '4px',
68
+ 'spacing.ecl.element.6': '6px',
69
+ 'spacing.ecl.element.8': '8px',
70
+ 'spacing.ecl.container.12': '12px',
71
+ 'spacing.ecl.container.16': '16px',
72
+ 'spacing.ecl.container.20': '20px',
73
+ 'spacing.ecl.container.24': '24px',
74
+ 'spacing.ecl.layout.32': '32px',
75
+ 'spacing.ecl.layout.40': '40px',
76
+ 'spacing.ecl.layout.64': '48px',
77
+ 'spacing.ccc.component.2': '2px',
78
+ 'spacing.ccc.component.4': '4px',
79
+ 'spacing.ccc.component.6': '6px',
80
+ 'spacing.ccc.component.8': '8px',
81
+ 'spacing.ccc.content.12': '12px',
82
+ 'spacing.ccc.content.16': '16px',
83
+ 'spacing.ccc.content.20': '20px',
84
+ 'spacing.ccc.content.24': '24px',
85
+ 'spacing.ccc.container.32': '32px',
86
+ 'spacing.ccc.container.40': '40px',
87
+ 'spacing.ccc.container.48': '48px',
88
+ 'spacing.gap.100': '8px',
89
+ 'spacing.gap.200': '16px',
90
+ 'spacing.gap.300': '24px',
91
+ 'spacing.inset.100': '8px',
92
+ 'spacing.inset.200': '16px',
93
+ 'spacing.inset.300': '24px'
31
94
  };
32
95
  var _default = defaultTokenValues;
33
96
  exports.default = _default;
@@ -7,11 +7,10 @@ exports.default = void 0;
7
7
 
8
8
  /**
9
9
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
10
- * @codegen <<SignedSource::873e77ae05fb3ff2730f5f6110aaeae3>>
10
+ * @codegen <<SignedSource::1808e289835f4813ce4782e16cce419d>>
11
11
  * @codegenCommand yarn build tokens
12
12
  */
13
13
  var tokens = {
14
- 'spacing.container.gutter': '--ds-container-gutter',
15
14
  'spacing.scale.0': '--ds-scale-0',
16
15
  'spacing.scale.100': '--ds-scale-100',
17
16
  'spacing.scale.150': '--ds-scale-150',
@@ -23,7 +22,71 @@ var tokens = {
23
22
  'spacing.scale.600': '--ds-scale-600',
24
23
  'spacing.scale.025': '--ds-scale-025',
25
24
  'spacing.scale.050': '--ds-scale-050',
26
- 'spacing.scale.075': '--ds-scale-075'
25
+ 'spacing.scale.075': '--ds-scale-075',
26
+ 'spacing.scaleLinear.0': '--ds-scaleLinear-0',
27
+ 'spacing.scaleLinear.100': '--ds-scaleLinear-100',
28
+ 'spacing.scaleLinear.200': '--ds-scaleLinear-200',
29
+ 'spacing.scaleLinear.300': '--ds-scaleLinear-300',
30
+ 'spacing.scaleLinear.400': '--ds-scaleLinear-400',
31
+ 'spacing.scaleLinear.500': '--ds-scaleLinear-500',
32
+ 'spacing.scaleLinear.600': '--ds-scaleLinear-600',
33
+ 'spacing.scaleLinear.700': '--ds-scaleLinear-700',
34
+ 'spacing.scaleLinear.800': '--ds-scaleLinear-800',
35
+ 'spacing.scaleLinear.900': '--ds-scaleLinear-900',
36
+ 'spacing.scaleLinear.1000': '--ds-scaleLinear-1000',
37
+ 'spacing.scaleLinear.1100': '--ds-scaleLinear-1100',
38
+ 'spacing.pixel.0': '--ds-pixel-0',
39
+ 'spacing.pixel.2': '--ds-pixel-2',
40
+ 'spacing.pixel.4': '--ds-pixel-4',
41
+ 'spacing.pixel.6': '--ds-pixel-6',
42
+ 'spacing.pixel.8': '--ds-pixel-8',
43
+ 'spacing.pixel.12': '--ds-pixel-12',
44
+ 'spacing.pixel.16': '--ds-pixel-16',
45
+ 'spacing.pixel.20': '--ds-pixel-20',
46
+ 'spacing.pixel.24': '--ds-pixel-24',
47
+ 'spacing.pixel.32': '--ds-pixel-32',
48
+ 'spacing.pixel.40': '--ds-pixel-40',
49
+ 'spacing.pixel.48': '--ds-pixel-48',
50
+ 'spacing.size.none': '--ds-size-none',
51
+ 'spacing.size.xxxxSmall': '--ds-size-xxxxSmall',
52
+ 'spacing.size.xxxSmall': '--ds-size-xxxSmall',
53
+ 'spacing.size.xxSmall': '--ds-size-xxSmall',
54
+ 'spacing.size.xsmall': '--ds-size-xsmall',
55
+ 'spacing.size.small': '--ds-size-small',
56
+ 'spacing.size.medium': '--ds-size-medium',
57
+ 'spacing.size.large': '--ds-size-large',
58
+ 'spacing.size.xlarge': '--ds-size-xlarge',
59
+ 'spacing.size.xxlarge': '--ds-size-xxlarge',
60
+ 'spacing.size.xxxlarge': '--ds-size-xxxlarge',
61
+ 'spacing.size.xxxxlarge': '--ds-size-xxxxlarge',
62
+ 'spacing.ecl.element.2': '--ds-ecl-element-2',
63
+ 'spacing.ecl.element.4': '--ds-ecl-element-4',
64
+ 'spacing.ecl.element.6': '--ds-ecl-element-6',
65
+ 'spacing.ecl.element.8': '--ds-ecl-element-8',
66
+ 'spacing.ecl.container.12': '--ds-ecl-container-12',
67
+ 'spacing.ecl.container.16': '--ds-ecl-container-16',
68
+ 'spacing.ecl.container.20': '--ds-ecl-container-20',
69
+ 'spacing.ecl.container.24': '--ds-ecl-container-24',
70
+ 'spacing.ecl.layout.32': '--ds-ecl-layout-32',
71
+ 'spacing.ecl.layout.40': '--ds-ecl-layout-40',
72
+ 'spacing.ecl.layout.64': '--ds-ecl-layout-64',
73
+ 'spacing.ccc.component.2': '--ds-ccc-component-2',
74
+ 'spacing.ccc.component.4': '--ds-ccc-component-4',
75
+ 'spacing.ccc.component.6': '--ds-ccc-component-6',
76
+ 'spacing.ccc.component.8': '--ds-ccc-component-8',
77
+ 'spacing.ccc.content.12': '--ds-ccc-content-12',
78
+ 'spacing.ccc.content.16': '--ds-ccc-content-16',
79
+ 'spacing.ccc.content.20': '--ds-ccc-content-20',
80
+ 'spacing.ccc.content.24': '--ds-ccc-content-24',
81
+ 'spacing.ccc.container.32': '--ds-ccc-container-32',
82
+ 'spacing.ccc.container.40': '--ds-ccc-container-40',
83
+ 'spacing.ccc.container.48': '--ds-ccc-container-48',
84
+ 'spacing.gap.100': '--ds-gap-100',
85
+ 'spacing.gap.200': '--ds-gap-200',
86
+ 'spacing.gap.300': '--ds-gap-300',
87
+ 'spacing.inset.100': '--ds-inset-100',
88
+ 'spacing.inset.200': '--ds-inset-200',
89
+ 'spacing.inset.300': '--ds-inset-300'
27
90
  };
28
91
  var _default = tokens;
29
92
  exports.default = _default;
@@ -3,25 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_NAME_MAP = exports.THEME_DATA_ATTRIBUTE = exports.THEMES = exports.DEFAULT_THEME = exports.CSS_VAR_FULL = exports.CSS_PREFIX = void 0;
7
- var THEMES = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing'];
8
- exports.THEMES = THEMES;
6
+ exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.DEFAULT_THEME = exports.CSS_VAR_FULL = exports.CSS_PREFIX = exports.COLOR_MODE_ATTRIBUTE = void 0;
9
7
  var THEME_DATA_ATTRIBUTE = 'data-theme';
10
8
  exports.THEME_DATA_ATTRIBUTE = THEME_DATA_ATTRIBUTE;
9
+ var COLOR_MODE_ATTRIBUTE = 'data-color-mode';
10
+ exports.COLOR_MODE_ATTRIBUTE = COLOR_MODE_ATTRIBUTE;
11
11
  var DEFAULT_THEME = 'light spacing';
12
12
  exports.DEFAULT_THEME = DEFAULT_THEME;
13
13
  var CSS_PREFIX = 'ds';
14
14
  exports.CSS_PREFIX = CSS_PREFIX;
15
- var CSS_VAR_FULL = ['opacity']; // Maps the longer theme name to a shorthand used in css/code
16
-
15
+ var CSS_VAR_FULL = ['opacity'];
17
16
  exports.CSS_VAR_FULL = CSS_VAR_FULL;
18
- var THEME_NAME_MAP = {
19
- 'atlassian-light': 'light',
20
- 'atlassian-dark': 'dark',
21
- 'atlassian-legacy-light': 'legacy-light',
22
- 'atlassian-legacy-dark': 'legacy-dark',
23
- 'atlassian-spacing': 'spacing'
24
- };
25
- exports.THEME_NAME_MAP = THEME_NAME_MAP;
26
17
  var TOKEN_NOT_FOUND_CSS_VAR = "--".concat(CSS_PREFIX, "-token-not-found");
27
18
  exports.TOKEN_NOT_FOUND_CSS_VAR = TOKEN_NOT_FOUND_CSS_VAR;
@@ -14,7 +14,7 @@ var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
14
14
  var _constants = require("./constants");
15
15
 
16
16
  var name = "@atlaskit/tokens";
17
- var version = "0.10.28";
17
+ var version = "0.10.30";
18
18
 
19
19
  function token(path, fallback) {
20
20
  var token = _tokenNames.default[path];
package/dist/cjs/index.js CHANGED
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "setGlobalTheme", {
17
17
  return _setGlobalTheme.default;
18
18
  }
19
19
  });
20
+ Object.defineProperty(exports, "themeConfig", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _themeConfig.default;
24
+ }
25
+ });
20
26
  Object.defineProperty(exports, "token", {
21
27
  enumerable: true,
22
28
  get: function get() {
@@ -34,4 +40,6 @@ var _getToken = _interopRequireDefault(require("./get-token"));
34
40
 
35
41
  var _setGlobalTheme = _interopRequireDefault(require("./set-global-theme"));
36
42
 
43
+ var _themeConfig = _interopRequireDefault(require("./theme-config"));
44
+
37
45
  var _themeChangeObserver = require("./theme-change-observer");
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -7,15 +9,39 @@ exports.default = void 0;
7
9
 
8
10
  var _constants = require("./constants");
9
11
 
10
- var setGlobalTheme = function setGlobalTheme(theme) {
12
+ var _themeConfig = _interopRequireDefault(require("./theme-config"));
13
+
14
+ var setGlobalTheme = function setGlobalTheme(themeId) {
15
+ var shouldMatchSystem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
16
+ var theme = Object.values(_themeConfig.default).find(function (_ref) {
17
+ var id = _ref.id;
18
+ return id === themeId;
19
+ });
20
+
11
21
  if (process.env.NODE_ENV !== 'production') {
12
- if (!_constants.THEMES.includes(theme)) {
13
- throw new Error("setGlobalTheme only accepts themes: ".concat(_constants.THEMES.join(', ')));
22
+ if (!theme) {
23
+ var themeIds = Object.values(_themeConfig.default).map(function (_ref2) {
24
+ var id = _ref2.id;
25
+ return id;
26
+ });
27
+ throw new Error("setGlobalTheme only accepts themes: ".concat(themeIds.join(', ')));
14
28
  }
15
29
  }
16
30
 
31
+ if (!theme) {
32
+ return;
33
+ }
34
+
17
35
  var element = document.documentElement;
18
- element.setAttribute('data-theme', theme);
36
+ element.setAttribute(_constants.THEME_DATA_ATTRIBUTE, theme.id);
37
+
38
+ if (theme.attributes.type === 'color') {
39
+ element.setAttribute(_constants.COLOR_MODE_ATTRIBUTE, theme.attributes.mode);
40
+ }
41
+
42
+ if (shouldMatchSystem) {
43
+ element.setAttribute(_constants.COLOR_MODE_ATTRIBUTE, 'auto');
44
+ }
19
45
  };
20
46
 
21
47
  var _default = setGlobalTheme;
@@ -20,7 +20,7 @@ var _react = require("react");
20
20
  var _constants = require("./constants");
21
21
 
22
22
  var getGlobalTheme = function getGlobalTheme() {
23
- return typeof document !== 'undefined' ? document.documentElement.getAttribute(_constants.THEME_DATA_ATTRIBUTE) : null;
23
+ return typeof document !== 'undefined' ? document.documentElement.getAttribute(_constants.COLOR_MODE_ATTRIBUTE) : null;
24
24
  };
25
25
  /**
26
26
  * A MutationObserver which watches the `<html>` element for changes to the theme.
@@ -41,6 +41,7 @@ var ThemeMutationObserver = /*#__PURE__*/function () {
41
41
  function ThemeMutationObserver(callback) {
42
42
  (0, _classCallCheck2.default)(this, ThemeMutationObserver);
43
43
  (0, _defineProperty2.default)(this, "observer", null);
44
+ (0, _defineProperty2.default)(this, "mediaObserver", null);
44
45
  this.callback = callback;
45
46
  }
46
47
 
@@ -56,7 +57,7 @@ var ThemeMutationObserver = /*#__PURE__*/function () {
56
57
  }
57
58
 
58
59
  this.observer.observe(document.documentElement, {
59
- attributeFilter: [_constants.THEME_DATA_ATTRIBUTE]
60
+ attributeFilter: [_constants.COLOR_MODE_ATTRIBUTE]
60
61
  });
61
62
  }
62
63
  }, {
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ /**
9
+ * This file contains the source of truth for themes and all associated meta data.
10
+ */
11
+
12
+ /**
13
+ * Themes: The internal identifier of a theme.
14
+ * These ids are what the actual theme files/folders are called.
15
+ * style-dictionary will attempt to locate these in the file-system.
16
+ */
17
+
18
+ /**
19
+ * Theme kinds: The type of theme.
20
+ * Some themes are entirely focused on Color, whilst others are purely focused on spacing.
21
+ * In the future other types may be introduced such as typography.
22
+ */
23
+
24
+ /**
25
+ * Theme modes: The general purpose of a theme.
26
+ * This attr is used to apply the appropriate system-preference media selector
27
+ * It may also be used as a selector for mode-specific overrides such as light/dark images.
28
+ * The idea is there may exist many color themes, but every theme must either fit into light or dark.
29
+ */
30
+
31
+ /**
32
+ * Theme ids: The value that will mounted to the DOM as a data attr
33
+ * For example: `data-theme="light"
34
+ *
35
+ * These ids must be kebab case
36
+ */
37
+
38
+ /**
39
+ * Palettes: The set of base tokens a given theme may be populated with.
40
+ * For example: legacy light & dark themes use the "legacyPalette" containing colors from our
41
+ * previous color set.
42
+ */
43
+
44
+ /**
45
+ * ThemeConfig: the source of truth for all theme meta-data.
46
+ * This object should be used whenever interfacing with themes.
47
+ */
48
+ var themeConfig = {
49
+ 'atlassian-light': {
50
+ id: 'light',
51
+ displayName: 'Light Theme',
52
+ palette: 'defaultPalette',
53
+ attributes: {
54
+ type: 'color',
55
+ mode: 'light'
56
+ }
57
+ },
58
+ 'atlassian-dark': {
59
+ id: 'dark',
60
+ displayName: 'Dark Theme',
61
+ palette: 'defaultPalette',
62
+ attributes: {
63
+ type: 'color',
64
+ mode: 'dark'
65
+ }
66
+ },
67
+ 'atlassian-legacy-light': {
68
+ id: 'legacy-light',
69
+ displayName: 'Light Theme (legacy)',
70
+ palette: 'legacyPalette',
71
+ attributes: {
72
+ type: 'color',
73
+ mode: 'light'
74
+ }
75
+ },
76
+ 'atlassian-legacy-dark': {
77
+ id: 'legacy-dark',
78
+ displayName: 'Dark Theme (legacy)',
79
+ palette: 'legacyPalette',
80
+ attributes: {
81
+ type: 'color',
82
+ mode: 'dark'
83
+ }
84
+ },
85
+ 'atlassian-spacing': {
86
+ id: 'spacing',
87
+ displayName: 'Atlassian Spacing',
88
+ palette: 'spacingScale',
89
+ attributes: {
90
+ type: 'spacing'
91
+ }
92
+ }
93
+ };
94
+ var _default = themeConfig;
95
+ exports.default = _default;
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var spacing = {
8
8
  spacing: {
9
- container: {
10
- gutter: {
11
- value: 'Space100'
12
- }
13
- },
14
9
  scale: {
15
10
  '0': {
16
11
  value: 'Space0'
@@ -48,6 +43,224 @@ var spacing = {
48
43
  '600': {
49
44
  value: 'Space600'
50
45
  }
46
+ },
47
+ scaleLinear: {
48
+ '0': {
49
+ value: 'Space0'
50
+ },
51
+ '100': {
52
+ value: 'Space025'
53
+ },
54
+ '200': {
55
+ value: 'Space050'
56
+ },
57
+ '300': {
58
+ value: 'Space075'
59
+ },
60
+ '400': {
61
+ value: 'Space100'
62
+ },
63
+ '500': {
64
+ value: 'Space150'
65
+ },
66
+ '600': {
67
+ value: 'Space200'
68
+ },
69
+ '700': {
70
+ value: 'Space250'
71
+ },
72
+ '800': {
73
+ value: 'Space300'
74
+ },
75
+ '900': {
76
+ value: 'Space400'
77
+ },
78
+ '1000': {
79
+ value: 'Space500'
80
+ },
81
+ '1100': {
82
+ value: 'Space600'
83
+ }
84
+ },
85
+ pixel: {
86
+ '0': {
87
+ value: 'Space0'
88
+ },
89
+ '2': {
90
+ value: 'Space025'
91
+ },
92
+ '4': {
93
+ value: 'Space050'
94
+ },
95
+ '6': {
96
+ value: 'Space075'
97
+ },
98
+ '8': {
99
+ value: 'Space100'
100
+ },
101
+ '12': {
102
+ value: 'Space150'
103
+ },
104
+ '16': {
105
+ value: 'Space200'
106
+ },
107
+ '20': {
108
+ value: 'Space250'
109
+ },
110
+ '24': {
111
+ value: 'Space300'
112
+ },
113
+ '32': {
114
+ value: 'Space400'
115
+ },
116
+ '40': {
117
+ value: 'Space500'
118
+ },
119
+ '48': {
120
+ value: 'Space600'
121
+ }
122
+ },
123
+ size: {
124
+ none: {
125
+ value: 'Space0'
126
+ },
127
+ xxxxSmall: {
128
+ value: 'Space025'
129
+ },
130
+ xxxSmall: {
131
+ value: 'Space050'
132
+ },
133
+ xxSmall: {
134
+ value: 'Space075'
135
+ },
136
+ xsmall: {
137
+ value: 'Space100'
138
+ },
139
+ small: {
140
+ value: 'Space150'
141
+ },
142
+ medium: {
143
+ value: 'Space200'
144
+ },
145
+ large: {
146
+ value: 'Space250'
147
+ },
148
+ xlarge: {
149
+ value: 'Space300'
150
+ },
151
+ xxlarge: {
152
+ value: 'Space400'
153
+ },
154
+ xxxlarge: {
155
+ value: 'Space500'
156
+ },
157
+ xxxxlarge: {
158
+ value: 'Space600'
159
+ }
160
+ },
161
+ ecl: {
162
+ element: {
163
+ '2': {
164
+ value: 'Space025'
165
+ },
166
+ '4': {
167
+ value: 'Space050'
168
+ },
169
+ '6': {
170
+ value: 'Space075'
171
+ },
172
+ '8': {
173
+ value: 'Space100'
174
+ }
175
+ },
176
+ container: {
177
+ '12': {
178
+ value: 'Space150'
179
+ },
180
+ '16': {
181
+ value: 'Space200'
182
+ },
183
+ '20': {
184
+ value: 'Space250'
185
+ },
186
+ '24': {
187
+ value: 'Space300'
188
+ }
189
+ },
190
+ layout: {
191
+ '32': {
192
+ value: 'Space400'
193
+ },
194
+ '40': {
195
+ value: 'Space500'
196
+ },
197
+ '64': {
198
+ value: 'Space600'
199
+ }
200
+ }
201
+ },
202
+ ccc: {
203
+ component: {
204
+ '2': {
205
+ value: 'Space025'
206
+ },
207
+ '4': {
208
+ value: 'Space050'
209
+ },
210
+ '6': {
211
+ value: 'Space075'
212
+ },
213
+ '8': {
214
+ value: 'Space100'
215
+ }
216
+ },
217
+ content: {
218
+ '12': {
219
+ value: 'Space150'
220
+ },
221
+ '16': {
222
+ value: 'Space200'
223
+ },
224
+ '20': {
225
+ value: 'Space250'
226
+ },
227
+ '24': {
228
+ value: 'Space300'
229
+ }
230
+ },
231
+ container: {
232
+ '32': {
233
+ value: 'Space400'
234
+ },
235
+ '40': {
236
+ value: 'Space500'
237
+ },
238
+ '48': {
239
+ value: 'Space600'
240
+ }
241
+ }
242
+ },
243
+ gap: {
244
+ 100: {
245
+ value: 'Space100'
246
+ },
247
+ 200: {
248
+ value: 'Space200'
249
+ },
250
+ 300: {
251
+ value: 'Space300'
252
+ }
253
+ },
254
+ inset: {
255
+ 100: {
256
+ value: 'Space100'
257
+ },
258
+ 200: {
259
+ value: 'Space200'
260
+ },
261
+ 300: {
262
+ value: 'Space300'
263
+ }
51
264
  }
52
265
  }
53
266
  };