@atlaskit/tokens 0.12.0 → 0.13.1
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 +12 -0
- package/dist/cjs/entry-points/tokens-raw.js +17 -1
- package/dist/cjs/get-token-value.js +57 -0
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/theme-change-observer.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/entry-points/tokens-raw.js +3 -1
- package/dist/es2019/get-token-value.js +44 -0
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/theme-change-observer.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/entry-points/tokens-raw.js +3 -1
- package/dist/esm/get-token-value.js +45 -0
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/theme-change-observer.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/entry-points/tokens-raw.d.ts +2 -0
- package/dist/types/get-token-value.d.ts +25 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -3
- package/report.api.md +9 -0
- package/tmp/api-report-tmp.d.ts +6 -0
- package/dist/cjs/entry-points/spacing-raw.js +0 -15
- package/dist/cjs/entry-points/typography-raw.js +0 -15
- package/dist/es2019/entry-points/spacing-raw.js +0 -1
- package/dist/es2019/entry-points/typography-raw.js +0 -1
- package/dist/esm/entry-points/spacing-raw.js +0 -1
- package/dist/esm/entry-points/typography-raw.js +0 -1
- package/dist/types/entry-points/spacing-raw.d.ts +0 -1
- package/dist/types/entry-points/typography-raw.d.ts +0 -1
- package/spacing-raw/package.json +0 -17
- package/typography-raw/package.json +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 0.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a5eed85fe2e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a5eed85fe2e) - Added a new `getTokenValue()` API - it accepts a dot-separated token name and a fallback value, and returns the current computed CSS value for the resulting CSS Custom Property. This should be used when the CSS cascade isn't available, eg. `<canvas>` elements, JS charting libraries, etc.
|
|
8
|
+
|
|
9
|
+
## 0.13.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`00c057bdd71`](https://bitbucket.org/atlassian/atlassian-frontend/commits/00c057bdd71) - Removes spacing-raw & typography-raw entrypoints in favor of tokens-raw
|
|
14
|
+
|
|
3
15
|
## 0.12.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -17,7 +17,23 @@ Object.defineProperty(exports, "light", {
|
|
|
17
17
|
return _atlassianLight.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
Object.defineProperty(exports, "spacing", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _atlassianSpacing.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "typography", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _atlassianTypography.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
20
32
|
|
|
21
33
|
var _atlassianLight = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-light"));
|
|
22
34
|
|
|
23
|
-
var _atlassianDark = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-dark"));
|
|
35
|
+
var _atlassianDark = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-dark"));
|
|
36
|
+
|
|
37
|
+
var _atlassianSpacing = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-spacing"));
|
|
38
|
+
|
|
39
|
+
var _atlassianTypography = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-typography"));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
11
|
+
|
|
12
|
+
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
13
|
+
|
|
14
|
+
var name = "@atlaskit/tokens";
|
|
15
|
+
var version = "0.13.1";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
19
|
+
* resulting CSS Custom Property.
|
|
20
|
+
* This should be used for when the CSS cascade isn't available, eg. `<canvas>` elements, JS charting libraries, etc.
|
|
21
|
+
*
|
|
22
|
+
* Note: these values change depending on the theme so consider pairing them with `useThemeObserver` in React, or the
|
|
23
|
+
* `ThemeMutationObserver` class elsewhere.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} path - A dot-separated token name (example: `'color.background.brand'` or `'spacing.scale.100'`).
|
|
26
|
+
* @param {string} [fallback] - The fallback value that should render when token CSS is not present in your app.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```
|
|
30
|
+
* const theme = useThemeObserver();
|
|
31
|
+
*
|
|
32
|
+
* useEffect(() => {
|
|
33
|
+
* const lineColor = getTokenValue('color.background.accent.blue.subtle', B400);
|
|
34
|
+
* }, [theme]);
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
function getTokenValue(tokenId) {
|
|
39
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
40
|
+
var token = _tokenNames.default[tokenId];
|
|
41
|
+
var tokenValue = fallback;
|
|
42
|
+
|
|
43
|
+
if (process.env.NODE_ENV !== 'production' && !token) {
|
|
44
|
+
(0, _warnOnce.default)("Unknown token id at path: ".concat(tokenId, " for ").concat(name, "@").concat(version));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof window === 'undefined') {
|
|
48
|
+
return tokenValue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
tokenValue = window.getComputedStyle(document.documentElement).getPropertyValue(token);
|
|
52
|
+
tokenValue = tokenValue || fallback;
|
|
53
|
+
return tokenValue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var _default = getTokenValue;
|
|
57
|
+
exports.default = _default;
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -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.
|
|
17
|
+
var version = "0.13.1";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,6 +11,12 @@ Object.defineProperty(exports, "ThemeMutationObserver", {
|
|
|
11
11
|
return _themeChangeObserver.ThemeMutationObserver;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "getTokenValue", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _getTokenValue.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
14
20
|
Object.defineProperty(exports, "setGlobalTheme", {
|
|
15
21
|
enumerable: true,
|
|
16
22
|
get: function get() {
|
|
@@ -38,6 +44,8 @@ Object.defineProperty(exports, "useThemeObserver", {
|
|
|
38
44
|
|
|
39
45
|
var _getToken = _interopRequireDefault(require("./get-token"));
|
|
40
46
|
|
|
47
|
+
var _getTokenValue = _interopRequireDefault(require("./get-token-value"));
|
|
48
|
+
|
|
41
49
|
var _setGlobalTheme = _interopRequireDefault(require("./set-global-theme"));
|
|
42
50
|
|
|
43
51
|
var _themeConfig = _interopRequireDefault(require("./theme-config"));
|
|
@@ -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.
|
|
23
|
+
return typeof document !== 'undefined' ? document.documentElement.getAttribute(_constants.THEME_DATA_ATTRIBUTE) : null;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* A MutationObserver which watches the `<html>` element for changes to the theme.
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as light } from '../artifacts/tokens-raw/atlassian-light';
|
|
2
|
-
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
2
|
+
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
3
|
+
export { default as spacing } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
4
|
+
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
|
+
import tokens from './artifacts/token-names';
|
|
3
|
+
const name = "@atlaskit/tokens";
|
|
4
|
+
const version = "0.13.1";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
8
|
+
* resulting CSS Custom Property.
|
|
9
|
+
* This should be used for when the CSS cascade isn't available, eg. `<canvas>` elements, JS charting libraries, etc.
|
|
10
|
+
*
|
|
11
|
+
* Note: these values change depending on the theme so consider pairing them with `useThemeObserver` in React, or the
|
|
12
|
+
* `ThemeMutationObserver` class elsewhere.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} path - A dot-separated token name (example: `'color.background.brand'` or `'spacing.scale.100'`).
|
|
15
|
+
* @param {string} [fallback] - The fallback value that should render when token CSS is not present in your app.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```
|
|
19
|
+
* const theme = useThemeObserver();
|
|
20
|
+
*
|
|
21
|
+
* useEffect(() => {
|
|
22
|
+
* const lineColor = getTokenValue('color.background.accent.blue.subtle', B400);
|
|
23
|
+
* }, [theme]);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
function getTokenValue(tokenId, fallback = '') {
|
|
28
|
+
let token = tokens[tokenId];
|
|
29
|
+
let tokenValue = fallback;
|
|
30
|
+
|
|
31
|
+
if (process.env.NODE_ENV !== 'production' && !token) {
|
|
32
|
+
warnOnce(`Unknown token id at path: ${tokenId} for ${name}@${version}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (typeof window === 'undefined') {
|
|
36
|
+
return tokenValue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
tokenValue = window.getComputedStyle(document.documentElement).getPropertyValue(token);
|
|
40
|
+
tokenValue = tokenValue || fallback;
|
|
41
|
+
return tokenValue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default getTokenValue;
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -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 = "0.
|
|
5
|
+
const version = "0.13.1";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as token } from './get-token';
|
|
2
|
+
export { default as getTokenValue } from './get-token-value';
|
|
2
3
|
export { default as setGlobalTheme } from './set-global-theme';
|
|
3
4
|
export { default as themeConfig } from './theme-config';
|
|
4
5
|
export { useThemeObserver, ThemeMutationObserver } from './theme-change-observer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { THEME_DATA_ATTRIBUTE } from './constants';
|
|
4
4
|
|
|
5
|
-
const getGlobalTheme = () => typeof document !== 'undefined' ? document.documentElement.getAttribute(
|
|
5
|
+
const getGlobalTheme = () => typeof document !== 'undefined' ? document.documentElement.getAttribute(THEME_DATA_ATTRIBUTE) : null;
|
|
6
6
|
/**
|
|
7
7
|
* A MutationObserver which watches the `<html>` element for changes to the theme.
|
|
8
8
|
*
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as light } from '../artifacts/tokens-raw/atlassian-light';
|
|
2
|
-
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
2
|
+
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
3
|
+
export { default as spacing } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
4
|
+
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
2
|
+
import tokens from './artifacts/token-names';
|
|
3
|
+
var name = "@atlaskit/tokens";
|
|
4
|
+
var version = "0.13.1";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
8
|
+
* resulting CSS Custom Property.
|
|
9
|
+
* This should be used for when the CSS cascade isn't available, eg. `<canvas>` elements, JS charting libraries, etc.
|
|
10
|
+
*
|
|
11
|
+
* Note: these values change depending on the theme so consider pairing them with `useThemeObserver` in React, or the
|
|
12
|
+
* `ThemeMutationObserver` class elsewhere.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} path - A dot-separated token name (example: `'color.background.brand'` or `'spacing.scale.100'`).
|
|
15
|
+
* @param {string} [fallback] - The fallback value that should render when token CSS is not present in your app.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```
|
|
19
|
+
* const theme = useThemeObserver();
|
|
20
|
+
*
|
|
21
|
+
* useEffect(() => {
|
|
22
|
+
* const lineColor = getTokenValue('color.background.accent.blue.subtle', B400);
|
|
23
|
+
* }, [theme]);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
function getTokenValue(tokenId) {
|
|
28
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
29
|
+
var token = tokens[tokenId];
|
|
30
|
+
var tokenValue = fallback;
|
|
31
|
+
|
|
32
|
+
if (process.env.NODE_ENV !== 'production' && !token) {
|
|
33
|
+
warnOnce("Unknown token id at path: ".concat(tokenId, " for ").concat(name, "@").concat(version));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (typeof window === 'undefined') {
|
|
37
|
+
return tokenValue;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
tokenValue = window.getComputedStyle(document.documentElement).getPropertyValue(token);
|
|
41
|
+
tokenValue = tokenValue || fallback;
|
|
42
|
+
return tokenValue;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default getTokenValue;
|
package/dist/esm/get-token.js
CHANGED
|
@@ -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 = "0.
|
|
5
|
+
var version = "0.13.1";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as token } from './get-token';
|
|
2
|
+
export { default as getTokenValue } from './get-token-value';
|
|
2
3
|
export { default as setGlobalTheme } from './set-global-theme';
|
|
3
4
|
export { default as themeConfig } from './theme-config';
|
|
4
5
|
export { useThemeObserver, ThemeMutationObserver } from './theme-change-observer';
|
|
@@ -3,10 +3,10 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { THEME_DATA_ATTRIBUTE } from './constants';
|
|
7
7
|
|
|
8
8
|
var getGlobalTheme = function getGlobalTheme() {
|
|
9
|
-
return typeof document !== 'undefined' ? document.documentElement.getAttribute(
|
|
9
|
+
return typeof document !== 'undefined' ? document.documentElement.getAttribute(THEME_DATA_ATTRIBUTE) : null;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* A MutationObserver which watches the `<html>` element for changes to the theme.
|
package/dist/esm/version.json
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as light } from '../artifacts/tokens-raw/atlassian-light';
|
|
2
2
|
export { default as dark } from '../artifacts/tokens-raw/atlassian-dark';
|
|
3
|
+
export { default as spacing } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
4
|
+
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import tokens from './artifacts/token-names';
|
|
2
|
+
declare type Tokens = typeof tokens;
|
|
3
|
+
/**
|
|
4
|
+
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
5
|
+
* resulting CSS Custom Property.
|
|
6
|
+
* This should be used for when the CSS cascade isn't available, eg. `<canvas>` elements, JS charting libraries, etc.
|
|
7
|
+
*
|
|
8
|
+
* Note: these values change depending on the theme so consider pairing them with `useThemeObserver` in React, or the
|
|
9
|
+
* `ThemeMutationObserver` class elsewhere.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} path - A dot-separated token name (example: `'color.background.brand'` or `'spacing.scale.100'`).
|
|
12
|
+
* @param {string} [fallback] - The fallback value that should render when token CSS is not present in your app.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```
|
|
16
|
+
* const theme = useThemeObserver();
|
|
17
|
+
*
|
|
18
|
+
* useEffect(() => {
|
|
19
|
+
* const lineColor = getTokenValue('color.background.accent.blue.subtle', B400);
|
|
20
|
+
* }, [theme]);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
declare function getTokenValue<T extends keyof Tokens>(tokenId: T, fallback?: string): string;
|
|
25
|
+
export default getTokenValue;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as token } from './get-token';
|
|
2
|
+
export { default as getTokenValue } from './get-token-value';
|
|
2
3
|
export { default as setGlobalTheme } from './set-global-theme';
|
|
3
4
|
export type { CSSToken } from './artifacts/token-names';
|
|
4
5
|
export type { Themes, ThemeIds } from './theme-config';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"author": "Atlassian Pty Ltd",
|
|
5
5
|
"description": "Design tokens are the single source of truth to name and store design decisions.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,8 +38,6 @@
|
|
|
38
38
|
"./tokens-raw": "./src/entry-points/tokens-raw.tsx",
|
|
39
39
|
"./token-ids": "./src/entry-points/token-ids.tsx",
|
|
40
40
|
"./token-names": "./src/entry-points/token-names.tsx",
|
|
41
|
-
"./spacing-raw": "./src/entry-points/spacing-raw.tsx",
|
|
42
|
-
"./typography-raw": "./src/entry-points/typography-raw.tsx",
|
|
43
41
|
"./rename-mapping": "./src/entry-points/rename-mapping.tsx",
|
|
44
42
|
"./babel-plugin": "./src/entry-points/babel-plugin.tsx",
|
|
45
43
|
"./css/atlassian-light.css": "./css/atlassian-light.css",
|
|
@@ -101,6 +99,7 @@
|
|
|
101
99
|
"prettier": "^2.7.0",
|
|
102
100
|
"react": "^16.8.0",
|
|
103
101
|
"react-use-clipboard": "^1.0.0",
|
|
102
|
+
"recharts": "^1.8.5",
|
|
104
103
|
"style-dictionary": "^3.0.0",
|
|
105
104
|
"ts-node": "^10.9.1",
|
|
106
105
|
"typescript": "4.5.5"
|
package/report.api.md
CHANGED
|
@@ -418,6 +418,12 @@ type CSSTokenMap = {
|
|
|
418
418
|
// @public
|
|
419
419
|
type ExtensionThemeId = ThemeIds;
|
|
420
420
|
|
|
421
|
+
// @public
|
|
422
|
+
export function getTokenValue<T extends keyof Tokens_2>(
|
|
423
|
+
tokenId: T,
|
|
424
|
+
fallback?: string,
|
|
425
|
+
): string;
|
|
426
|
+
|
|
421
427
|
// @public
|
|
422
428
|
type Palettes =
|
|
423
429
|
| 'defaultPalette'
|
|
@@ -899,6 +905,9 @@ const tokens: {
|
|
|
899
905
|
readonly 'font.lineHeight.600': '--ds-font-lineHeight-600';
|
|
900
906
|
};
|
|
901
907
|
|
|
908
|
+
// @public (undocumented)
|
|
909
|
+
type Tokens_2 = typeof tokens;
|
|
910
|
+
|
|
902
911
|
// @public
|
|
903
912
|
export const useThemeObserver: () => ThemeIds | null;
|
|
904
913
|
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -407,6 +407,9 @@ type CSSTokenMap = {
|
|
|
407
407
|
// @public
|
|
408
408
|
type ExtensionThemeId = ThemeIds;
|
|
409
409
|
|
|
410
|
+
// @public
|
|
411
|
+
export function getTokenValue<T extends keyof Tokens_2>(tokenId: T, fallback?: string): string;
|
|
412
|
+
|
|
410
413
|
// @public
|
|
411
414
|
type Palettes = 'defaultPalette' | 'legacyPalette' | 'spacingScale' | 'typographyPalette';
|
|
412
415
|
|
|
@@ -862,6 +865,9 @@ const tokens: {
|
|
|
862
865
|
readonly 'font.lineHeight.600': "--ds-font-lineHeight-600";
|
|
863
866
|
};
|
|
864
867
|
|
|
868
|
+
// @public (undocumented)
|
|
869
|
+
type Tokens_2 = typeof tokens;
|
|
870
|
+
|
|
865
871
|
// @public
|
|
866
872
|
export const useThemeObserver: () => ThemeIds | null;
|
|
867
873
|
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _atlassianSpacing.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
var _atlassianSpacing = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-spacing"));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _atlassianTypography.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
var _atlassianTypography = _interopRequireDefault(require("../artifacts/tokens-raw/atlassian-typography"));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../artifacts/tokens-raw/atlassian-typography';
|
package/spacing-raw/package.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/tokens/spacing-raw",
|
|
3
|
-
"main": "../dist/cjs/entry-points/spacing-raw.js",
|
|
4
|
-
"module": "../dist/esm/entry-points/spacing-raw.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/entry-points/spacing-raw.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../dist/types/entry-points/spacing-raw.d.ts",
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.0 <4.5": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.0/entry-points/spacing-raw.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/tokens/typography-raw",
|
|
3
|
-
"main": "../dist/cjs/entry-points/typography-raw.js",
|
|
4
|
-
"module": "../dist/esm/entry-points/typography-raw.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/entry-points/typography-raw.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../dist/types/entry-points/typography-raw.d.ts",
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.0 <4.5": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.0/entry-points/typography-raw.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|