@atlaskit/tokens 1.14.1 → 1.15.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 +12 -0
- package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
- package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
- package/dist/cjs/artifacts/palettes-raw/typography-palette.js +277 -37
- package/dist/cjs/artifacts/theme-import-map.js +10 -4
- package/dist/cjs/artifacts/themes/atlassian-typography-adg3.js +13 -0
- package/dist/cjs/artifacts/themes/atlassian-typography.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +26 -2
- package/dist/cjs/artifacts/token-names.js +22 -1
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +1084 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography.js +465 -253
- package/dist/cjs/babel-plugin/plugin.js +34 -3
- package/dist/cjs/constants.js +1 -3
- package/dist/cjs/entry-points/tokens-raw.js +2 -2
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/palettes/typography-palette.js +121 -16
- package/dist/cjs/theme-config.js +12 -4
- package/dist/cjs/tokens/atlassian-typography/font-family.js +11 -2
- package/dist/cjs/tokens/atlassian-typography/theme.js +140 -0
- package/dist/cjs/tokens/atlassian-typography/utils.js +29 -0
- package/dist/cjs/tokens/atlassian-typography-adg3/font-family.js +29 -0
- package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.js +8 -8
- package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.js +4 -4
- package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
- package/dist/cjs/tokens/atlassian-typography-adg3/theme.js +140 -0
- package/dist/cjs/tokens/atlassian-typography-adg3/utils.js +29 -0
- package/dist/cjs/tokens/default/typography/font-family.js +24 -0
- package/dist/cjs/tokens/default/typography/font.js +133 -0
- package/dist/cjs/tokens/default/typography/letter-spacing.js +54 -0
- package/dist/cjs/tokens/default/typography/line-height.js +8 -0
- package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
- package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
- package/dist/es2019/artifacts/palettes-raw/typography-palette.js +277 -37
- package/dist/es2019/artifacts/theme-import-map.js +6 -4
- package/dist/es2019/artifacts/themes/atlassian-typography-adg3.js +50 -0
- package/dist/es2019/artifacts/themes/atlassian-typography.js +23 -21
- package/dist/es2019/artifacts/token-default-values.js +26 -2
- package/dist/es2019/artifacts/token-names.js +22 -1
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +1077 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography.js +465 -253
- package/dist/es2019/babel-plugin/plugin.js +34 -4
- package/dist/es2019/constants.js +0 -1
- package/dist/es2019/entry-points/tokens-raw.js +1 -1
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/palettes/typography-palette.js +123 -17
- package/dist/es2019/theme-config.js +12 -4
- package/dist/es2019/tokens/atlassian-typography/font-family.js +11 -2
- package/dist/es2019/tokens/atlassian-typography/theme.js +133 -0
- package/dist/es2019/tokens/atlassian-typography/utils.js +22 -0
- package/dist/es2019/tokens/atlassian-typography-adg3/font-family.js +22 -0
- package/dist/es2019/tokens/atlassian-typography-adg3/font-size.js +31 -0
- package/dist/es2019/tokens/atlassian-typography-adg3/font-weight.js +19 -0
- package/dist/es2019/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
- package/dist/es2019/tokens/atlassian-typography-adg3/theme.js +133 -0
- package/dist/es2019/tokens/atlassian-typography-adg3/utils.js +22 -0
- package/dist/es2019/tokens/default/typography/font-family.js +24 -0
- package/dist/es2019/tokens/default/typography/font.js +126 -0
- package/dist/es2019/tokens/default/typography/letter-spacing.js +47 -0
- package/dist/es2019/tokens/default/typography/line-height.js +8 -0
- package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
- package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
- package/dist/esm/artifacts/palettes-raw/typography-palette.js +277 -37
- package/dist/esm/artifacts/theme-import-map.js +8 -4
- package/dist/esm/artifacts/themes/atlassian-typography-adg3.js +6 -0
- package/dist/esm/artifacts/themes/atlassian-typography.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +26 -2
- package/dist/esm/artifacts/token-names.js +22 -1
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +1077 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-typography.js +465 -253
- package/dist/esm/babel-plugin/plugin.js +34 -3
- package/dist/esm/constants.js +0 -1
- package/dist/esm/entry-points/tokens-raw.js +1 -1
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/palettes/typography-palette.js +121 -16
- package/dist/esm/theme-config.js +12 -4
- package/dist/esm/tokens/atlassian-typography/font-family.js +11 -2
- package/dist/esm/tokens/atlassian-typography/theme.js +133 -0
- package/dist/esm/tokens/atlassian-typography/utils.js +22 -0
- package/dist/esm/tokens/atlassian-typography-adg3/font-family.js +22 -0
- package/dist/esm/tokens/atlassian-typography-adg3/font-size.js +31 -0
- package/dist/esm/tokens/atlassian-typography-adg3/font-weight.js +19 -0
- package/dist/esm/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
- package/dist/esm/tokens/atlassian-typography-adg3/theme.js +133 -0
- package/dist/esm/tokens/atlassian-typography-adg3/utils.js +22 -0
- package/dist/esm/tokens/default/typography/font-family.js +24 -0
- package/dist/esm/tokens/default/typography/font.js +126 -0
- package/dist/esm/tokens/default/typography/letter-spacing.js +47 -0
- package/dist/esm/tokens/default/typography/line-height.js +8 -0
- package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +2 -2
- package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +2 -2
- package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-typography-adg3.d.ts +7 -0
- package/dist/types/artifacts/themes/atlassian-typography.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +26 -2
- package/dist/types/artifacts/token-names.d.ts +43 -1
- package/dist/types/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +101 -0
- package/dist/types/artifacts/tokens-raw/atlassian-typography.d.ts +111 -3
- package/dist/types/artifacts/types-internal.d.ts +2 -2
- package/dist/types/artifacts/types.d.ts +2 -2
- package/dist/types/babel-plugin/plugin.d.ts +3 -0
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/entry-points/tokens-raw.d.ts +1 -1
- package/dist/types/palettes/typography-palette.d.ts +8 -6
- package/dist/types/theme-config.d.ts +4 -4
- package/dist/types/tokens/atlassian-typography/theme.d.ts +10 -0
- package/dist/types/tokens/atlassian-typography/utils.d.ts +4 -0
- package/dist/types/tokens/atlassian-typography-adg3/font-family.d.ts +4 -0
- package/dist/types/tokens/atlassian-typography-adg3/theme.d.ts +10 -0
- package/dist/types/tokens/atlassian-typography-adg3/utils.d.ts +4 -0
- package/dist/types/tokens/default/typography/font.d.ts +20 -0
- package/dist/types/tokens/default/typography/letter-spacing.d.ts +4 -0
- package/dist/types/types.d.ts +111 -22
- package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography-adg3.d.ts +7 -0
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +26 -2
- package/dist/types-ts4.5/artifacts/token-names.d.ts +43 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +101 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography.d.ts +111 -3
- package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
- package/dist/types-ts4.5/babel-plugin/plugin.d.ts +3 -0
- package/dist/types-ts4.5/constants.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/tokens-raw.d.ts +1 -1
- package/dist/types-ts4.5/palettes/typography-palette.d.ts +8 -6
- package/dist/types-ts4.5/theme-config.d.ts +5 -3
- package/dist/types-ts4.5/tokens/atlassian-typography/theme.d.ts +10 -0
- package/dist/types-ts4.5/tokens/atlassian-typography/utils.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/font-family.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/theme.d.ts +10 -0
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/utils.d.ts +4 -0
- package/dist/types-ts4.5/tokens/default/typography/font.d.ts +20 -0
- package/dist/types-ts4.5/tokens/default/typography/letter-spacing.d.ts +4 -0
- package/dist/types-ts4.5/types.d.ts +111 -22
- package/figma/atlassian-typography-adg3.json +150 -0
- package/figma/atlassian-typography.json +19 -82
- package/package.json +1 -1
- package/report.api.md +60 -2
- package/tmp/api-report-tmp.d.ts +49 -7
- package/dist/cjs/version.json +0 -7
- package/dist/es2019/tokens/atlassian-typography/font-size.js +0 -31
- package/dist/es2019/tokens/atlassian-typography/font-weight.js +0 -19
- package/dist/es2019/version.json +0 -7
- package/dist/esm/tokens/atlassian-typography/font-size.js +0 -31
- package/dist/esm/tokens/atlassian-typography/font-weight.js +0 -19
- package/dist/esm/version.json +0 -7
- /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.d.ts +0 -0
- /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.d.ts +0 -0
- /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.d.ts +0 -0
- /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.d.ts +0 -0
- /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.d.ts +0 -0
- /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.d.ts +0 -0
|
@@ -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
|
-
|
|
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)) {
|
package/dist/esm/constants.js
CHANGED
|
@@ -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,5 +1,5 @@
|
|
|
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
3
|
export { default as spacing } from '../artifacts/tokens-raw/atlassian-spacing';
|
|
4
|
-
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography';
|
|
4
|
+
export { default as typography } from '../artifacts/tokens-raw/atlassian-typography-adg3';
|
|
5
5
|
export { default as shape } from '../artifacts/tokens-raw/atlassian-shape';
|
|
@@ -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.
|
|
4
|
+
var version = "1.15.0";
|
|
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.
|
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 = "1.
|
|
5
|
+
var version = "1.15.0";
|
|
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,8 +1,48 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
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
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; }
|
|
4
|
+
var letterSpacingScale = {
|
|
5
|
+
letterSpacing: {
|
|
6
|
+
LetterSpacing0: {
|
|
7
|
+
value: '0',
|
|
8
|
+
attributes: {
|
|
9
|
+
group: 'typography'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
LetterSpacing100: {
|
|
13
|
+
value: '-0.003em',
|
|
14
|
+
attributes: {
|
|
15
|
+
group: 'typography'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
LetterSpacing200: {
|
|
19
|
+
value: '-0.006em',
|
|
20
|
+
attributes: {
|
|
21
|
+
group: 'typography'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
LetterSpacing300: {
|
|
25
|
+
value: '-0.008em',
|
|
26
|
+
attributes: {
|
|
27
|
+
group: 'typography'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
LetterSpacing400: {
|
|
31
|
+
value: '-0.01em',
|
|
32
|
+
attributes: {
|
|
33
|
+
group: 'typography'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
4
38
|
var lineHeightScale = {
|
|
5
39
|
lineHeight: {
|
|
40
|
+
LineHeight1: {
|
|
41
|
+
value: '1',
|
|
42
|
+
attributes: {
|
|
43
|
+
group: 'typography'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
6
46
|
LineHeight100: {
|
|
7
47
|
value: 16,
|
|
8
48
|
attributes: {
|
|
@@ -43,25 +83,25 @@ var lineHeightScale = {
|
|
|
43
83
|
};
|
|
44
84
|
var fontWeightScale = {
|
|
45
85
|
fontWeight: {
|
|
46
|
-
|
|
86
|
+
FontWeight400: {
|
|
47
87
|
value: '400',
|
|
48
88
|
attributes: {
|
|
49
89
|
group: 'typography'
|
|
50
90
|
}
|
|
51
91
|
},
|
|
52
|
-
|
|
92
|
+
FontWeight500: {
|
|
53
93
|
value: '500',
|
|
54
94
|
attributes: {
|
|
55
95
|
group: 'typography'
|
|
56
96
|
}
|
|
57
97
|
},
|
|
58
|
-
|
|
98
|
+
FontWeight600: {
|
|
59
99
|
value: '600',
|
|
60
100
|
attributes: {
|
|
61
101
|
group: 'typography'
|
|
62
102
|
}
|
|
63
103
|
},
|
|
64
|
-
|
|
104
|
+
FontWeight700: {
|
|
65
105
|
value: '700',
|
|
66
106
|
attributes: {
|
|
67
107
|
group: 'typography'
|
|
@@ -71,14 +111,55 @@ var fontWeightScale = {
|
|
|
71
111
|
};
|
|
72
112
|
var fontFamilyPalette = {
|
|
73
113
|
fontFamily: {
|
|
74
|
-
|
|
114
|
+
FontFamilyCharlie: {
|
|
115
|
+
value: 'Charlie Sans',
|
|
116
|
+
attributes: {
|
|
117
|
+
group: 'typography'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
LegacyFontFamilyWebSans: {
|
|
75
121
|
value: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif",
|
|
76
122
|
attributes: {
|
|
77
123
|
group: 'typography'
|
|
78
124
|
}
|
|
79
125
|
},
|
|
80
|
-
|
|
81
|
-
|
|
126
|
+
/**
|
|
127
|
+
* @see https://infinnie.github.io/blog/2017/systemui.html
|
|
128
|
+
* @see https://github.com/twbs/bootstrap/pull/22377
|
|
129
|
+
* @see https://fonts.google.com/knowledge/glossary/system_font_web_safe_font
|
|
130
|
+
*/
|
|
131
|
+
FontFamilyWebSans: {
|
|
132
|
+
value: "ui-sans-serif, \"Segoe UI\", system-ui, Ubuntu, \"Helvetica Neue\", sans-serif",
|
|
133
|
+
attributes: {
|
|
134
|
+
group: 'typography'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
FontFamilyiOSSans: {
|
|
138
|
+
value: 'SF Pro',
|
|
139
|
+
attributes: {
|
|
140
|
+
group: 'typography'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
FontFamilyAndroidSans: {
|
|
144
|
+
value: 'Roboto',
|
|
145
|
+
attributes: {
|
|
146
|
+
group: 'typography'
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
FontFamilyWebMono: {
|
|
150
|
+
value: "ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace",
|
|
151
|
+
attributes: {
|
|
152
|
+
group: 'typography'
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
FontFamilyiOSMono: {
|
|
156
|
+
value: 'SF Mono',
|
|
157
|
+
attributes: {
|
|
158
|
+
group: 'typography'
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
FontFamilyAndroidMono: {
|
|
162
|
+
value: 'Roboto Mono',
|
|
82
163
|
attributes: {
|
|
83
164
|
group: 'typography'
|
|
84
165
|
}
|
|
@@ -87,57 +168,81 @@ var fontFamilyPalette = {
|
|
|
87
168
|
};
|
|
88
169
|
var fontSizeScale = {
|
|
89
170
|
fontSize: {
|
|
90
|
-
|
|
171
|
+
FontSizeCode: {
|
|
172
|
+
value: '0.875em',
|
|
173
|
+
attributes: {
|
|
174
|
+
group: 'typography'
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
FontSize11: {
|
|
91
178
|
value: 11,
|
|
92
179
|
attributes: {
|
|
93
180
|
group: 'typography'
|
|
94
181
|
}
|
|
95
182
|
},
|
|
96
|
-
|
|
183
|
+
FontSize12: {
|
|
97
184
|
value: 12,
|
|
98
185
|
attributes: {
|
|
99
186
|
group: 'typography'
|
|
100
187
|
}
|
|
101
188
|
},
|
|
102
|
-
|
|
189
|
+
FontSize14: {
|
|
103
190
|
value: 14,
|
|
104
191
|
attributes: {
|
|
105
192
|
group: 'typography'
|
|
106
193
|
}
|
|
107
194
|
},
|
|
108
|
-
|
|
195
|
+
FontSize16: {
|
|
109
196
|
value: 16,
|
|
110
197
|
attributes: {
|
|
111
198
|
group: 'typography'
|
|
112
199
|
}
|
|
113
200
|
},
|
|
114
|
-
|
|
201
|
+
FontSize20: {
|
|
115
202
|
value: 20,
|
|
116
203
|
attributes: {
|
|
117
204
|
group: 'typography'
|
|
118
205
|
}
|
|
119
206
|
},
|
|
120
|
-
|
|
207
|
+
FontSize24: {
|
|
121
208
|
value: 24,
|
|
122
209
|
attributes: {
|
|
123
210
|
group: 'typography'
|
|
124
211
|
}
|
|
125
212
|
},
|
|
126
|
-
|
|
213
|
+
FontSize28: {
|
|
214
|
+
value: 28,
|
|
215
|
+
attributes: {
|
|
216
|
+
group: 'typography'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
LegacyFontSize29: {
|
|
127
220
|
value: 29,
|
|
128
221
|
attributes: {
|
|
129
222
|
group: 'typography'
|
|
130
223
|
}
|
|
131
224
|
},
|
|
132
|
-
|
|
225
|
+
LegacyFontSize35: {
|
|
133
226
|
value: 35,
|
|
134
227
|
attributes: {
|
|
135
228
|
group: 'typography'
|
|
136
229
|
}
|
|
230
|
+
},
|
|
231
|
+
FontSize36: {
|
|
232
|
+
value: 36,
|
|
233
|
+
attributes: {
|
|
234
|
+
group: 'typography'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
FontSize48: {
|
|
238
|
+
value: 48,
|
|
239
|
+
attributes: {
|
|
240
|
+
group: 'typography'
|
|
241
|
+
}
|
|
137
242
|
}
|
|
138
243
|
}
|
|
139
244
|
};
|
|
140
245
|
var typographyPalette = {
|
|
141
|
-
typography: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, fontSizeScale), fontWeightScale), fontFamilyPalette), lineHeightScale)
|
|
246
|
+
typography: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, fontSizeScale), fontWeightScale), fontFamilyPalette), lineHeightScale), letterSpacingScale)
|
|
142
247
|
};
|
|
143
248
|
export default typographyPalette;
|
package/dist/esm/theme-config.js
CHANGED
|
@@ -34,7 +34,7 @@ export var themeColorModes = ['light', 'dark', 'auto'];
|
|
|
34
34
|
*
|
|
35
35
|
* These ids must be kebab case
|
|
36
36
|
*/
|
|
37
|
-
export var themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape'];
|
|
37
|
+
export var themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape', 'typography-adg3'];
|
|
38
38
|
/**
|
|
39
39
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
40
40
|
* Theme overrides are temporary and there may not be any defined at times.
|
|
@@ -104,9 +104,9 @@ var themeConfig = {
|
|
|
104
104
|
type: 'spacing'
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
'atlassian-typography': {
|
|
108
|
-
id: 'typography',
|
|
109
|
-
displayName: '
|
|
107
|
+
'atlassian-typography-adg3': {
|
|
108
|
+
id: 'typography-adg3',
|
|
109
|
+
displayName: 'ADG3 Typography',
|
|
110
110
|
palette: 'typographyPalette',
|
|
111
111
|
attributes: {
|
|
112
112
|
type: 'typography'
|
|
@@ -139,6 +139,14 @@ var themeConfig = {
|
|
|
139
139
|
type: 'color',
|
|
140
140
|
mode: 'dark'
|
|
141
141
|
}
|
|
142
|
+
},
|
|
143
|
+
'atlassian-typography': {
|
|
144
|
+
id: 'typography',
|
|
145
|
+
displayName: 'Atlassian Typography',
|
|
146
|
+
palette: 'typographyPalette',
|
|
147
|
+
attributes: {
|
|
148
|
+
type: 'typography'
|
|
149
|
+
}
|
|
142
150
|
}
|
|
143
151
|
};
|
|
144
152
|
|
|
@@ -2,10 +2,19 @@ var font = {
|
|
|
2
2
|
font: {
|
|
3
3
|
family: {
|
|
4
4
|
sans: {
|
|
5
|
-
value: '
|
|
5
|
+
value: 'FontFamilyWebSans'
|
|
6
6
|
},
|
|
7
7
|
monospace: {
|
|
8
|
-
value: '
|
|
8
|
+
value: 'FontFamilyWebMono'
|
|
9
|
+
},
|
|
10
|
+
product: {
|
|
11
|
+
value: 'FontFamilyWebSans'
|
|
12
|
+
},
|
|
13
|
+
brand: {
|
|
14
|
+
value: 'FontFamilyCharlie'
|
|
15
|
+
},
|
|
16
|
+
code: {
|
|
17
|
+
value: 'FontFamilyWebMono'
|
|
9
18
|
}
|
|
10
19
|
}
|
|
11
20
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
var typography = {
|
|
2
|
+
font: {
|
|
3
|
+
heading: {
|
|
4
|
+
xxl: {
|
|
5
|
+
value: {
|
|
6
|
+
fontWeight: 'FontWeight700',
|
|
7
|
+
fontSize: 'FontSize36',
|
|
8
|
+
lineHeight: 'LineHeight600',
|
|
9
|
+
fontFamily: 'FontFamilyWebSans',
|
|
10
|
+
fontStyle: 'normal',
|
|
11
|
+
letterSpacing: 'LetterSpacing0'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
xl: {
|
|
15
|
+
value: {
|
|
16
|
+
fontWeight: 'FontWeight700',
|
|
17
|
+
fontSize: 'FontSize28',
|
|
18
|
+
lineHeight: 'LineHeight500',
|
|
19
|
+
fontFamily: 'FontFamilyWebSans',
|
|
20
|
+
fontStyle: 'normal',
|
|
21
|
+
letterSpacing: 'LetterSpacing0'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
lg: {
|
|
25
|
+
value: {
|
|
26
|
+
fontWeight: 'FontWeight700',
|
|
27
|
+
fontSize: 'FontSize24',
|
|
28
|
+
lineHeight: 'LineHeight400',
|
|
29
|
+
fontFamily: 'FontFamilyWebSans',
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
letterSpacing: 'LetterSpacing0'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
value: {
|
|
36
|
+
fontWeight: 'FontWeight700',
|
|
37
|
+
fontSize: 'FontSize20',
|
|
38
|
+
lineHeight: 'LineHeight300',
|
|
39
|
+
fontFamily: 'FontFamilyWebSans',
|
|
40
|
+
fontStyle: 'normal',
|
|
41
|
+
letterSpacing: 'LetterSpacing0'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
sm: {
|
|
45
|
+
value: {
|
|
46
|
+
fontWeight: 'FontWeight700',
|
|
47
|
+
fontSize: 'FontSize16',
|
|
48
|
+
lineHeight: 'LineHeight200',
|
|
49
|
+
fontFamily: 'FontFamilyWebSans',
|
|
50
|
+
fontStyle: 'normal',
|
|
51
|
+
letterSpacing: 'LetterSpacing0'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
xs: {
|
|
55
|
+
value: {
|
|
56
|
+
fontWeight: 'FontWeight700',
|
|
57
|
+
fontSize: 'FontSize14',
|
|
58
|
+
lineHeight: 'LineHeight100',
|
|
59
|
+
fontFamily: 'FontFamilyWebSans',
|
|
60
|
+
fontStyle: 'normal',
|
|
61
|
+
letterSpacing: 'LetterSpacing0'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
xxs: {
|
|
65
|
+
value: {
|
|
66
|
+
fontWeight: 'FontWeight700',
|
|
67
|
+
fontSize: 'FontSize12',
|
|
68
|
+
lineHeight: 'LineHeight100',
|
|
69
|
+
fontFamily: 'FontFamilyWebSans',
|
|
70
|
+
fontStyle: 'normal',
|
|
71
|
+
letterSpacing: 'LetterSpacing0'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
code: {
|
|
76
|
+
'[default]': {
|
|
77
|
+
value: {
|
|
78
|
+
fontWeight: 'FontWeight400',
|
|
79
|
+
fontSize: 'FontSizeCode',
|
|
80
|
+
lineHeight: 'LineHeight1',
|
|
81
|
+
fontFamily: 'FontFamilyWebMono',
|
|
82
|
+
fontStyle: 'normal',
|
|
83
|
+
letterSpacing: 'LetterSpacing0'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
body: {
|
|
88
|
+
'[default]': {
|
|
89
|
+
value: {
|
|
90
|
+
fontWeight: 'FontWeight400',
|
|
91
|
+
fontSize: 'FontSize14',
|
|
92
|
+
lineHeight: 'LineHeight200',
|
|
93
|
+
fontFamily: 'FontFamilyWebSans',
|
|
94
|
+
fontStyle: 'normal',
|
|
95
|
+
letterSpacing: 'LetterSpacing0'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
sm: {
|
|
99
|
+
value: {
|
|
100
|
+
fontWeight: 'FontWeight400',
|
|
101
|
+
fontSize: 'FontSize11',
|
|
102
|
+
lineHeight: 'LineHeight200',
|
|
103
|
+
fontFamily: 'FontFamilyWebSans',
|
|
104
|
+
fontStyle: 'normal',
|
|
105
|
+
letterSpacing: 'LetterSpacing0'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
ui: {
|
|
110
|
+
'[default]': {
|
|
111
|
+
value: {
|
|
112
|
+
fontWeight: 'FontWeight400',
|
|
113
|
+
fontSize: 'FontSize14',
|
|
114
|
+
lineHeight: 'LineHeight1',
|
|
115
|
+
fontFamily: 'FontFamilyWebSans',
|
|
116
|
+
fontStyle: 'normal',
|
|
117
|
+
letterSpacing: 'LetterSpacing0'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
sm: {
|
|
121
|
+
value: {
|
|
122
|
+
fontWeight: 'FontWeight400',
|
|
123
|
+
fontSize: 'FontSize11',
|
|
124
|
+
lineHeight: 'LineHeight1',
|
|
125
|
+
fontFamily: 'FontFamilyWebSans',
|
|
126
|
+
fontStyle: 'normal',
|
|
127
|
+
letterSpacing: 'LetterSpacing0'
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
export default typography;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var font = {
|
|
2
|
+
font: {
|
|
3
|
+
letterSpacing: {
|
|
4
|
+
'0': {
|
|
5
|
+
value: 'LetterSpacing0'
|
|
6
|
+
},
|
|
7
|
+
'100': {
|
|
8
|
+
value: 'LetterSpacing0'
|
|
9
|
+
},
|
|
10
|
+
'200': {
|
|
11
|
+
value: 'LetterSpacing0'
|
|
12
|
+
},
|
|
13
|
+
'300': {
|
|
14
|
+
value: 'LetterSpacing0'
|
|
15
|
+
},
|
|
16
|
+
'400': {
|
|
17
|
+
value: 'LetterSpacing0'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default font;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var font = {
|
|
2
|
+
font: {
|
|
3
|
+
family: {
|
|
4
|
+
sans: {
|
|
5
|
+
value: 'LegacyFontFamilyWebSans'
|
|
6
|
+
},
|
|
7
|
+
monospace: {
|
|
8
|
+
value: 'FontFamilyWebMono'
|
|
9
|
+
},
|
|
10
|
+
product: {
|
|
11
|
+
value: 'FontFamilyWebSans'
|
|
12
|
+
},
|
|
13
|
+
brand: {
|
|
14
|
+
value: 'FontFamilyCharlie'
|
|
15
|
+
},
|
|
16
|
+
code: {
|
|
17
|
+
value: 'FontFamilyWebMono'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export default font;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var font = {
|
|
2
|
+
font: {
|
|
3
|
+
size: {
|
|
4
|
+
'050': {
|
|
5
|
+
value: 'FontSize11'
|
|
6
|
+
},
|
|
7
|
+
'075': {
|
|
8
|
+
value: 'FontSize12'
|
|
9
|
+
},
|
|
10
|
+
'100': {
|
|
11
|
+
value: 'FontSize14'
|
|
12
|
+
},
|
|
13
|
+
'200': {
|
|
14
|
+
value: 'FontSize16'
|
|
15
|
+
},
|
|
16
|
+
'300': {
|
|
17
|
+
value: 'FontSize20'
|
|
18
|
+
},
|
|
19
|
+
'400': {
|
|
20
|
+
value: 'FontSize24'
|
|
21
|
+
},
|
|
22
|
+
'500': {
|
|
23
|
+
value: 'LegacyFontSize29'
|
|
24
|
+
},
|
|
25
|
+
'600': {
|
|
26
|
+
value: 'LegacyFontSize35'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default font;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var font = {
|
|
2
|
+
font: {
|
|
3
|
+
weight: {
|
|
4
|
+
regular: {
|
|
5
|
+
value: 'FontWeight400'
|
|
6
|
+
},
|
|
7
|
+
medium: {
|
|
8
|
+
value: 'FontWeight500'
|
|
9
|
+
},
|
|
10
|
+
semibold: {
|
|
11
|
+
value: 'FontWeight600'
|
|
12
|
+
},
|
|
13
|
+
bold: {
|
|
14
|
+
value: 'FontWeight700'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export default font;
|