@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.
- package/CHANGELOG.md +67 -0
- package/css/atlassian-dark.css +298 -2
- package/css/atlassian-legacy-dark.css +298 -2
- package/css/atlassian-legacy-light.css +298 -2
- package/css/atlassian-light.css +298 -2
- package/css/atlassian-spacing.css +66 -3
- package/dist/cjs/artifacts/rename-mapping/atlassian-spacing.js +254 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
- package/dist/cjs/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
- package/dist/cjs/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
- package/dist/cjs/constants.js +4 -13
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/set-global-theme.js +30 -4
- package/dist/cjs/theme-change-observer.js +3 -2
- package/dist/cjs/theme-config.js +95 -0
- package/dist/cjs/tokens/atlassian-spacing/spacing.js +218 -5
- package/dist/cjs/tokens/default/spacing/spacing.js +612 -11
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/rename-mapping/atlassian-spacing.js +254 -2
- package/dist/es2019/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
- package/dist/es2019/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
- package/dist/es2019/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
- package/dist/es2019/constants.js +2 -10
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/set-global-theme.js +25 -5
- package/dist/es2019/theme-change-observer.js +5 -3
- package/dist/es2019/theme-config.js +87 -0
- package/dist/es2019/tokens/atlassian-spacing/spacing.js +218 -5
- package/dist/es2019/tokens/default/spacing/spacing.js +612 -11
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/rename-mapping/atlassian-spacing.js +254 -2
- package/dist/esm/artifacts/tokens-raw/atlassian-spacing.js +1493 -24
- package/dist/esm/artifacts/typescript/atlassian-spacing-token-default-values.js +66 -3
- package/dist/esm/artifacts/typescript/atlassian-spacing-token-names.js +66 -3
- package/dist/esm/constants.js +2 -10
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/set-global-theme.js +28 -5
- package/dist/esm/theme-change-observer.js +5 -3
- package/dist/esm/theme-config.js +87 -0
- package/dist/esm/tokens/atlassian-spacing/spacing.js +218 -5
- package/dist/esm/tokens/default/spacing/spacing.js +612 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/rename-mapping/atlassian-spacing.d.ts +1 -1
- package/dist/types/artifacts/token-default-values.d.ts +64 -1
- package/dist/types/artifacts/token-names.d.ts +64 -1
- package/dist/types/artifacts/tokens-raw/atlassian-spacing.d.ts +32 -3
- package/dist/types/artifacts/typescript/atlassian-spacing-token-default-values.d.ts +65 -2
- package/dist/types/artifacts/typescript/atlassian-spacing-token-names.d.ts +129 -3
- package/dist/types/constants.d.ts +1 -8
- package/dist/types/index.d.ts +2 -1
- package/dist/types/set-global-theme.d.ts +2 -2
- package/dist/types/theme-change-observer.d.ts +4 -3
- package/dist/types/theme-config.d.ts +53 -0
- package/dist/types/types.d.ts +104 -6
- package/dist/types-ts4.0/artifacts/rename-mapping/atlassian-spacing.d.ts +1 -1
- package/dist/types-ts4.0/artifacts/token-default-values.d.ts +64 -1
- package/dist/types-ts4.0/artifacts/token-names.d.ts +64 -1
- package/dist/types-ts4.0/artifacts/tokens-raw/atlassian-spacing.d.ts +32 -3
- package/dist/types-ts4.0/artifacts/typescript/atlassian-spacing-token-default-values.d.ts +65 -2
- package/dist/types-ts4.0/artifacts/typescript/atlassian-spacing-token-names.d.ts +129 -3
- package/dist/types-ts4.0/constants.d.ts +1 -14
- package/dist/types-ts4.0/index.d.ts +2 -1
- package/dist/types-ts4.0/set-global-theme.d.ts +2 -2
- package/dist/types-ts4.0/theme-change-observer.d.ts +4 -3
- package/dist/types-ts4.0/theme-config.d.ts +53 -0
- package/dist/types-ts4.0/types.d.ts +104 -6
- package/package.json +3 -3
- package/report.api.md +180 -17
- package/tmp/api-report-tmp.d.ts +164 -10
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const defaultTokens: {
|
|
2
|
-
'spacing.container.gutter': "8px";
|
|
3
2
|
'spacing.scale.0': "0px";
|
|
4
3
|
'spacing.scale.100': "8px";
|
|
5
4
|
'spacing.scale.150': "12px";
|
|
@@ -12,6 +11,70 @@ declare const defaultTokens: {
|
|
|
12
11
|
'spacing.scale.025': "2px";
|
|
13
12
|
'spacing.scale.050': "4px";
|
|
14
13
|
'spacing.scale.075': "6px";
|
|
14
|
+
'spacing.scaleLinear.0': "0px";
|
|
15
|
+
'spacing.scaleLinear.100': "2px";
|
|
16
|
+
'spacing.scaleLinear.200': "4px";
|
|
17
|
+
'spacing.scaleLinear.300': "6px";
|
|
18
|
+
'spacing.scaleLinear.400': "8px";
|
|
19
|
+
'spacing.scaleLinear.500': "12px";
|
|
20
|
+
'spacing.scaleLinear.600': "16px";
|
|
21
|
+
'spacing.scaleLinear.700': "20px";
|
|
22
|
+
'spacing.scaleLinear.800': "24px";
|
|
23
|
+
'spacing.scaleLinear.900': "32px";
|
|
24
|
+
'spacing.scaleLinear.1000': "40px";
|
|
25
|
+
'spacing.scaleLinear.1100': "48px";
|
|
26
|
+
'spacing.pixel.0': "0px";
|
|
27
|
+
'spacing.pixel.2': "2px";
|
|
28
|
+
'spacing.pixel.4': "4px";
|
|
29
|
+
'spacing.pixel.6': "6px";
|
|
30
|
+
'spacing.pixel.8': "8px";
|
|
31
|
+
'spacing.pixel.12': "12px";
|
|
32
|
+
'spacing.pixel.16': "16px";
|
|
33
|
+
'spacing.pixel.20': "20px";
|
|
34
|
+
'spacing.pixel.24': "24px";
|
|
35
|
+
'spacing.pixel.32': "32px";
|
|
36
|
+
'spacing.pixel.40': "40px";
|
|
37
|
+
'spacing.pixel.48': "48px";
|
|
38
|
+
'spacing.size.none': "0px";
|
|
39
|
+
'spacing.size.xxxxSmall': "2px";
|
|
40
|
+
'spacing.size.xxxSmall': "4px";
|
|
41
|
+
'spacing.size.xxSmall': "6px";
|
|
42
|
+
'spacing.size.xsmall': "8px";
|
|
43
|
+
'spacing.size.small': "12px";
|
|
44
|
+
'spacing.size.medium': "16px";
|
|
45
|
+
'spacing.size.large': "20px";
|
|
46
|
+
'spacing.size.xlarge': "24px";
|
|
47
|
+
'spacing.size.xxlarge': "32px";
|
|
48
|
+
'spacing.size.xxxlarge': "40px";
|
|
49
|
+
'spacing.size.xxxxlarge': "48px";
|
|
50
|
+
'spacing.ecl.element.2': "2px";
|
|
51
|
+
'spacing.ecl.element.4': "4px";
|
|
52
|
+
'spacing.ecl.element.6': "6px";
|
|
53
|
+
'spacing.ecl.element.8': "8px";
|
|
54
|
+
'spacing.ecl.container.12': "12px";
|
|
55
|
+
'spacing.ecl.container.16': "16px";
|
|
56
|
+
'spacing.ecl.container.20': "20px";
|
|
57
|
+
'spacing.ecl.container.24': "24px";
|
|
58
|
+
'spacing.ecl.layout.32': "32px";
|
|
59
|
+
'spacing.ecl.layout.40': "40px";
|
|
60
|
+
'spacing.ecl.layout.64': "48px";
|
|
61
|
+
'spacing.ccc.component.2': "2px";
|
|
62
|
+
'spacing.ccc.component.4': "4px";
|
|
63
|
+
'spacing.ccc.component.6': "6px";
|
|
64
|
+
'spacing.ccc.component.8': "8px";
|
|
65
|
+
'spacing.ccc.content.12': "12px";
|
|
66
|
+
'spacing.ccc.content.16': "16px";
|
|
67
|
+
'spacing.ccc.content.20': "20px";
|
|
68
|
+
'spacing.ccc.content.24': "24px";
|
|
69
|
+
'spacing.ccc.container.32': "32px";
|
|
70
|
+
'spacing.ccc.container.40': "40px";
|
|
71
|
+
'spacing.ccc.container.48': "48px";
|
|
72
|
+
'spacing.gap.100': "8px";
|
|
73
|
+
'spacing.gap.200': "16px";
|
|
74
|
+
'spacing.gap.300': "24px";
|
|
75
|
+
'spacing.inset.100': "8px";
|
|
76
|
+
'spacing.inset.200': "16px";
|
|
77
|
+
'spacing.inset.300': "24px";
|
|
15
78
|
'color.text.accent.blue': "#0055CC";
|
|
16
79
|
'color.text.accent.blue.bolder': "#09326C";
|
|
17
80
|
'color.text.accent.red': "#AE2A19";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CSSTokenMap as AtlassianLightCSSTokenMap } from './typescript/atlassian-light-token-names';
|
|
2
2
|
import { CSSTokenMap as AtlassianSpacingCSSTokenMap } from './typescript/atlassian-spacing-token-names';
|
|
3
3
|
declare const tokens: {
|
|
4
|
-
readonly 'spacing.container.gutter': "--ds-container-gutter";
|
|
5
4
|
readonly 'spacing.scale.0': "--ds-scale-0";
|
|
6
5
|
readonly 'spacing.scale.100': "--ds-scale-100";
|
|
7
6
|
readonly 'spacing.scale.150': "--ds-scale-150";
|
|
@@ -14,6 +13,70 @@ declare const tokens: {
|
|
|
14
13
|
readonly 'spacing.scale.025': "--ds-scale-025";
|
|
15
14
|
readonly 'spacing.scale.050': "--ds-scale-050";
|
|
16
15
|
readonly 'spacing.scale.075': "--ds-scale-075";
|
|
16
|
+
readonly 'spacing.scaleLinear.0': "--ds-scaleLinear-0";
|
|
17
|
+
readonly 'spacing.scaleLinear.100': "--ds-scaleLinear-100";
|
|
18
|
+
readonly 'spacing.scaleLinear.200': "--ds-scaleLinear-200";
|
|
19
|
+
readonly 'spacing.scaleLinear.300': "--ds-scaleLinear-300";
|
|
20
|
+
readonly 'spacing.scaleLinear.400': "--ds-scaleLinear-400";
|
|
21
|
+
readonly 'spacing.scaleLinear.500': "--ds-scaleLinear-500";
|
|
22
|
+
readonly 'spacing.scaleLinear.600': "--ds-scaleLinear-600";
|
|
23
|
+
readonly 'spacing.scaleLinear.700': "--ds-scaleLinear-700";
|
|
24
|
+
readonly 'spacing.scaleLinear.800': "--ds-scaleLinear-800";
|
|
25
|
+
readonly 'spacing.scaleLinear.900': "--ds-scaleLinear-900";
|
|
26
|
+
readonly 'spacing.scaleLinear.1000': "--ds-scaleLinear-1000";
|
|
27
|
+
readonly 'spacing.scaleLinear.1100': "--ds-scaleLinear-1100";
|
|
28
|
+
readonly 'spacing.pixel.0': "--ds-pixel-0";
|
|
29
|
+
readonly 'spacing.pixel.2': "--ds-pixel-2";
|
|
30
|
+
readonly 'spacing.pixel.4': "--ds-pixel-4";
|
|
31
|
+
readonly 'spacing.pixel.6': "--ds-pixel-6";
|
|
32
|
+
readonly 'spacing.pixel.8': "--ds-pixel-8";
|
|
33
|
+
readonly 'spacing.pixel.12': "--ds-pixel-12";
|
|
34
|
+
readonly 'spacing.pixel.16': "--ds-pixel-16";
|
|
35
|
+
readonly 'spacing.pixel.20': "--ds-pixel-20";
|
|
36
|
+
readonly 'spacing.pixel.24': "--ds-pixel-24";
|
|
37
|
+
readonly 'spacing.pixel.32': "--ds-pixel-32";
|
|
38
|
+
readonly 'spacing.pixel.40': "--ds-pixel-40";
|
|
39
|
+
readonly 'spacing.pixel.48': "--ds-pixel-48";
|
|
40
|
+
readonly 'spacing.size.none': "--ds-size-none";
|
|
41
|
+
readonly 'spacing.size.xxxxSmall': "--ds-size-xxxxSmall";
|
|
42
|
+
readonly 'spacing.size.xxxSmall': "--ds-size-xxxSmall";
|
|
43
|
+
readonly 'spacing.size.xxSmall': "--ds-size-xxSmall";
|
|
44
|
+
readonly 'spacing.size.xsmall': "--ds-size-xsmall";
|
|
45
|
+
readonly 'spacing.size.small': "--ds-size-small";
|
|
46
|
+
readonly 'spacing.size.medium': "--ds-size-medium";
|
|
47
|
+
readonly 'spacing.size.large': "--ds-size-large";
|
|
48
|
+
readonly 'spacing.size.xlarge': "--ds-size-xlarge";
|
|
49
|
+
readonly 'spacing.size.xxlarge': "--ds-size-xxlarge";
|
|
50
|
+
readonly 'spacing.size.xxxlarge': "--ds-size-xxxlarge";
|
|
51
|
+
readonly 'spacing.size.xxxxlarge': "--ds-size-xxxxlarge";
|
|
52
|
+
readonly 'spacing.ecl.element.2': "--ds-ecl-element-2";
|
|
53
|
+
readonly 'spacing.ecl.element.4': "--ds-ecl-element-4";
|
|
54
|
+
readonly 'spacing.ecl.element.6': "--ds-ecl-element-6";
|
|
55
|
+
readonly 'spacing.ecl.element.8': "--ds-ecl-element-8";
|
|
56
|
+
readonly 'spacing.ecl.container.12': "--ds-ecl-container-12";
|
|
57
|
+
readonly 'spacing.ecl.container.16': "--ds-ecl-container-16";
|
|
58
|
+
readonly 'spacing.ecl.container.20': "--ds-ecl-container-20";
|
|
59
|
+
readonly 'spacing.ecl.container.24': "--ds-ecl-container-24";
|
|
60
|
+
readonly 'spacing.ecl.layout.32': "--ds-ecl-layout-32";
|
|
61
|
+
readonly 'spacing.ecl.layout.40': "--ds-ecl-layout-40";
|
|
62
|
+
readonly 'spacing.ecl.layout.64': "--ds-ecl-layout-64";
|
|
63
|
+
readonly 'spacing.ccc.component.2': "--ds-ccc-component-2";
|
|
64
|
+
readonly 'spacing.ccc.component.4': "--ds-ccc-component-4";
|
|
65
|
+
readonly 'spacing.ccc.component.6': "--ds-ccc-component-6";
|
|
66
|
+
readonly 'spacing.ccc.component.8': "--ds-ccc-component-8";
|
|
67
|
+
readonly 'spacing.ccc.content.12': "--ds-ccc-content-12";
|
|
68
|
+
readonly 'spacing.ccc.content.16': "--ds-ccc-content-16";
|
|
69
|
+
readonly 'spacing.ccc.content.20': "--ds-ccc-content-20";
|
|
70
|
+
readonly 'spacing.ccc.content.24': "--ds-ccc-content-24";
|
|
71
|
+
readonly 'spacing.ccc.container.32': "--ds-ccc-container-32";
|
|
72
|
+
readonly 'spacing.ccc.container.40': "--ds-ccc-container-40";
|
|
73
|
+
readonly 'spacing.ccc.container.48': "--ds-ccc-container-48";
|
|
74
|
+
readonly 'spacing.gap.100': "--ds-gap-100";
|
|
75
|
+
readonly 'spacing.gap.200': "--ds-gap-200";
|
|
76
|
+
readonly 'spacing.gap.300': "--ds-gap-300";
|
|
77
|
+
readonly 'spacing.inset.100': "--ds-inset-100";
|
|
78
|
+
readonly 'spacing.inset.200': "--ds-inset-200";
|
|
79
|
+
readonly 'spacing.inset.300': "--ds-inset-300";
|
|
17
80
|
readonly 'color.text.accent.blue': "--ds-text-accent-blue";
|
|
18
81
|
readonly 'color.text.accent.blue.bolder': "--ds-text-accent-blue-bolder";
|
|
19
82
|
readonly 'color.text.accent.red': "--ds-text-accent-red";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::3c9107056e9324e57c042a3aafb4188c>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
declare const tokens: ({
|
|
7
7
|
attributes: {
|
|
8
8
|
group: string;
|
|
9
9
|
state: string;
|
|
10
|
-
replacement: string;
|
|
11
10
|
introduced: string;
|
|
12
11
|
description: string;
|
|
12
|
+
suggest?: undefined;
|
|
13
|
+
replacement?: undefined;
|
|
13
14
|
};
|
|
14
15
|
value: string;
|
|
15
16
|
filePath: string;
|
|
@@ -18,9 +19,10 @@ declare const tokens: ({
|
|
|
18
19
|
attributes: {
|
|
19
20
|
group: string;
|
|
20
21
|
state: string;
|
|
21
|
-
replacement: string;
|
|
22
22
|
introduced: string;
|
|
23
23
|
description: string;
|
|
24
|
+
suggest?: undefined;
|
|
25
|
+
replacement?: undefined;
|
|
24
26
|
};
|
|
25
27
|
value: string;
|
|
26
28
|
};
|
|
@@ -30,6 +32,7 @@ declare const tokens: ({
|
|
|
30
32
|
attributes: {
|
|
31
33
|
group: string;
|
|
32
34
|
state: string;
|
|
35
|
+
suggest: string[];
|
|
33
36
|
introduced: string;
|
|
34
37
|
description: string;
|
|
35
38
|
replacement?: undefined;
|
|
@@ -41,6 +44,7 @@ declare const tokens: ({
|
|
|
41
44
|
attributes: {
|
|
42
45
|
group: string;
|
|
43
46
|
state: string;
|
|
47
|
+
suggest: string[];
|
|
44
48
|
introduced: string;
|
|
45
49
|
description: string;
|
|
46
50
|
replacement?: undefined;
|
|
@@ -49,5 +53,30 @@ declare const tokens: ({
|
|
|
49
53
|
};
|
|
50
54
|
name: string;
|
|
51
55
|
path: string[];
|
|
56
|
+
} | {
|
|
57
|
+
attributes: {
|
|
58
|
+
group: string;
|
|
59
|
+
state: string;
|
|
60
|
+
replacement: string;
|
|
61
|
+
introduced: string;
|
|
62
|
+
description: string;
|
|
63
|
+
suggest?: undefined;
|
|
64
|
+
};
|
|
65
|
+
value: string;
|
|
66
|
+
filePath: string;
|
|
67
|
+
isSource: boolean;
|
|
68
|
+
original: {
|
|
69
|
+
attributes: {
|
|
70
|
+
group: string;
|
|
71
|
+
state: string;
|
|
72
|
+
replacement: string;
|
|
73
|
+
introduced: string;
|
|
74
|
+
description: string;
|
|
75
|
+
suggest?: undefined;
|
|
76
|
+
};
|
|
77
|
+
value: string;
|
|
78
|
+
};
|
|
79
|
+
name: string;
|
|
80
|
+
path: string[];
|
|
52
81
|
})[];
|
|
53
82
|
export default tokens;
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* Token names mapped to their value in the default Atlassian themes ('light spacing').
|
|
5
5
|
* These default values are used by the Babel plugin to optionally provide automatic fallbacks.
|
|
6
6
|
*
|
|
7
|
-
* @codegen <<SignedSource::
|
|
7
|
+
* @codegen <<SignedSource::05c2fcc3d0dba0931605dc98f7540009>>
|
|
8
8
|
* @codegenCommand yarn build tokens
|
|
9
9
|
*/
|
|
10
10
|
declare const defaultTokenValues: {
|
|
11
|
-
readonly 'spacing.container.gutter': "8px";
|
|
12
11
|
readonly 'spacing.scale.0': "0px";
|
|
13
12
|
readonly 'spacing.scale.100': "8px";
|
|
14
13
|
readonly 'spacing.scale.150': "12px";
|
|
@@ -21,5 +20,69 @@ declare const defaultTokenValues: {
|
|
|
21
20
|
readonly 'spacing.scale.025': "2px";
|
|
22
21
|
readonly 'spacing.scale.050': "4px";
|
|
23
22
|
readonly 'spacing.scale.075': "6px";
|
|
23
|
+
readonly 'spacing.scaleLinear.0': "0px";
|
|
24
|
+
readonly 'spacing.scaleLinear.100': "2px";
|
|
25
|
+
readonly 'spacing.scaleLinear.200': "4px";
|
|
26
|
+
readonly 'spacing.scaleLinear.300': "6px";
|
|
27
|
+
readonly 'spacing.scaleLinear.400': "8px";
|
|
28
|
+
readonly 'spacing.scaleLinear.500': "12px";
|
|
29
|
+
readonly 'spacing.scaleLinear.600': "16px";
|
|
30
|
+
readonly 'spacing.scaleLinear.700': "20px";
|
|
31
|
+
readonly 'spacing.scaleLinear.800': "24px";
|
|
32
|
+
readonly 'spacing.scaleLinear.900': "32px";
|
|
33
|
+
readonly 'spacing.scaleLinear.1000': "40px";
|
|
34
|
+
readonly 'spacing.scaleLinear.1100': "48px";
|
|
35
|
+
readonly 'spacing.pixel.0': "0px";
|
|
36
|
+
readonly 'spacing.pixel.2': "2px";
|
|
37
|
+
readonly 'spacing.pixel.4': "4px";
|
|
38
|
+
readonly 'spacing.pixel.6': "6px";
|
|
39
|
+
readonly 'spacing.pixel.8': "8px";
|
|
40
|
+
readonly 'spacing.pixel.12': "12px";
|
|
41
|
+
readonly 'spacing.pixel.16': "16px";
|
|
42
|
+
readonly 'spacing.pixel.20': "20px";
|
|
43
|
+
readonly 'spacing.pixel.24': "24px";
|
|
44
|
+
readonly 'spacing.pixel.32': "32px";
|
|
45
|
+
readonly 'spacing.pixel.40': "40px";
|
|
46
|
+
readonly 'spacing.pixel.48': "48px";
|
|
47
|
+
readonly 'spacing.size.none': "0px";
|
|
48
|
+
readonly 'spacing.size.xxxxSmall': "2px";
|
|
49
|
+
readonly 'spacing.size.xxxSmall': "4px";
|
|
50
|
+
readonly 'spacing.size.xxSmall': "6px";
|
|
51
|
+
readonly 'spacing.size.xsmall': "8px";
|
|
52
|
+
readonly 'spacing.size.small': "12px";
|
|
53
|
+
readonly 'spacing.size.medium': "16px";
|
|
54
|
+
readonly 'spacing.size.large': "20px";
|
|
55
|
+
readonly 'spacing.size.xlarge': "24px";
|
|
56
|
+
readonly 'spacing.size.xxlarge': "32px";
|
|
57
|
+
readonly 'spacing.size.xxxlarge': "40px";
|
|
58
|
+
readonly 'spacing.size.xxxxlarge': "48px";
|
|
59
|
+
readonly 'spacing.ecl.element.2': "2px";
|
|
60
|
+
readonly 'spacing.ecl.element.4': "4px";
|
|
61
|
+
readonly 'spacing.ecl.element.6': "6px";
|
|
62
|
+
readonly 'spacing.ecl.element.8': "8px";
|
|
63
|
+
readonly 'spacing.ecl.container.12': "12px";
|
|
64
|
+
readonly 'spacing.ecl.container.16': "16px";
|
|
65
|
+
readonly 'spacing.ecl.container.20': "20px";
|
|
66
|
+
readonly 'spacing.ecl.container.24': "24px";
|
|
67
|
+
readonly 'spacing.ecl.layout.32': "32px";
|
|
68
|
+
readonly 'spacing.ecl.layout.40': "40px";
|
|
69
|
+
readonly 'spacing.ecl.layout.64': "48px";
|
|
70
|
+
readonly 'spacing.ccc.component.2': "2px";
|
|
71
|
+
readonly 'spacing.ccc.component.4': "4px";
|
|
72
|
+
readonly 'spacing.ccc.component.6': "6px";
|
|
73
|
+
readonly 'spacing.ccc.component.8': "8px";
|
|
74
|
+
readonly 'spacing.ccc.content.12': "12px";
|
|
75
|
+
readonly 'spacing.ccc.content.16': "16px";
|
|
76
|
+
readonly 'spacing.ccc.content.20': "20px";
|
|
77
|
+
readonly 'spacing.ccc.content.24': "24px";
|
|
78
|
+
readonly 'spacing.ccc.container.32': "32px";
|
|
79
|
+
readonly 'spacing.ccc.container.40': "40px";
|
|
80
|
+
readonly 'spacing.ccc.container.48': "48px";
|
|
81
|
+
readonly 'spacing.gap.100': "8px";
|
|
82
|
+
readonly 'spacing.gap.200': "16px";
|
|
83
|
+
readonly 'spacing.gap.300': "24px";
|
|
84
|
+
readonly 'spacing.inset.100': "8px";
|
|
85
|
+
readonly 'spacing.inset.200': "16px";
|
|
86
|
+
readonly 'spacing.inset.300': "24px";
|
|
24
87
|
};
|
|
25
88
|
export default defaultTokenValues;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::1808e289835f4813ce4782e16cce419d>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
declare const tokens: {
|
|
7
|
-
readonly 'spacing.container.gutter': "--ds-container-gutter";
|
|
8
7
|
readonly 'spacing.scale.0': "--ds-scale-0";
|
|
9
8
|
readonly 'spacing.scale.100': "--ds-scale-100";
|
|
10
9
|
readonly 'spacing.scale.150': "--ds-scale-150";
|
|
@@ -17,9 +16,72 @@ declare const tokens: {
|
|
|
17
16
|
readonly 'spacing.scale.025': "--ds-scale-025";
|
|
18
17
|
readonly 'spacing.scale.050': "--ds-scale-050";
|
|
19
18
|
readonly 'spacing.scale.075': "--ds-scale-075";
|
|
19
|
+
readonly 'spacing.scaleLinear.0': "--ds-scaleLinear-0";
|
|
20
|
+
readonly 'spacing.scaleLinear.100': "--ds-scaleLinear-100";
|
|
21
|
+
readonly 'spacing.scaleLinear.200': "--ds-scaleLinear-200";
|
|
22
|
+
readonly 'spacing.scaleLinear.300': "--ds-scaleLinear-300";
|
|
23
|
+
readonly 'spacing.scaleLinear.400': "--ds-scaleLinear-400";
|
|
24
|
+
readonly 'spacing.scaleLinear.500': "--ds-scaleLinear-500";
|
|
25
|
+
readonly 'spacing.scaleLinear.600': "--ds-scaleLinear-600";
|
|
26
|
+
readonly 'spacing.scaleLinear.700': "--ds-scaleLinear-700";
|
|
27
|
+
readonly 'spacing.scaleLinear.800': "--ds-scaleLinear-800";
|
|
28
|
+
readonly 'spacing.scaleLinear.900': "--ds-scaleLinear-900";
|
|
29
|
+
readonly 'spacing.scaleLinear.1000': "--ds-scaleLinear-1000";
|
|
30
|
+
readonly 'spacing.scaleLinear.1100': "--ds-scaleLinear-1100";
|
|
31
|
+
readonly 'spacing.pixel.0': "--ds-pixel-0";
|
|
32
|
+
readonly 'spacing.pixel.2': "--ds-pixel-2";
|
|
33
|
+
readonly 'spacing.pixel.4': "--ds-pixel-4";
|
|
34
|
+
readonly 'spacing.pixel.6': "--ds-pixel-6";
|
|
35
|
+
readonly 'spacing.pixel.8': "--ds-pixel-8";
|
|
36
|
+
readonly 'spacing.pixel.12': "--ds-pixel-12";
|
|
37
|
+
readonly 'spacing.pixel.16': "--ds-pixel-16";
|
|
38
|
+
readonly 'spacing.pixel.20': "--ds-pixel-20";
|
|
39
|
+
readonly 'spacing.pixel.24': "--ds-pixel-24";
|
|
40
|
+
readonly 'spacing.pixel.32': "--ds-pixel-32";
|
|
41
|
+
readonly 'spacing.pixel.40': "--ds-pixel-40";
|
|
42
|
+
readonly 'spacing.pixel.48': "--ds-pixel-48";
|
|
43
|
+
readonly 'spacing.size.none': "--ds-size-none";
|
|
44
|
+
readonly 'spacing.size.xxxxSmall': "--ds-size-xxxxSmall";
|
|
45
|
+
readonly 'spacing.size.xxxSmall': "--ds-size-xxxSmall";
|
|
46
|
+
readonly 'spacing.size.xxSmall': "--ds-size-xxSmall";
|
|
47
|
+
readonly 'spacing.size.xsmall': "--ds-size-xsmall";
|
|
48
|
+
readonly 'spacing.size.small': "--ds-size-small";
|
|
49
|
+
readonly 'spacing.size.medium': "--ds-size-medium";
|
|
50
|
+
readonly 'spacing.size.large': "--ds-size-large";
|
|
51
|
+
readonly 'spacing.size.xlarge': "--ds-size-xlarge";
|
|
52
|
+
readonly 'spacing.size.xxlarge': "--ds-size-xxlarge";
|
|
53
|
+
readonly 'spacing.size.xxxlarge': "--ds-size-xxxlarge";
|
|
54
|
+
readonly 'spacing.size.xxxxlarge': "--ds-size-xxxxlarge";
|
|
55
|
+
readonly 'spacing.ecl.element.2': "--ds-ecl-element-2";
|
|
56
|
+
readonly 'spacing.ecl.element.4': "--ds-ecl-element-4";
|
|
57
|
+
readonly 'spacing.ecl.element.6': "--ds-ecl-element-6";
|
|
58
|
+
readonly 'spacing.ecl.element.8': "--ds-ecl-element-8";
|
|
59
|
+
readonly 'spacing.ecl.container.12': "--ds-ecl-container-12";
|
|
60
|
+
readonly 'spacing.ecl.container.16': "--ds-ecl-container-16";
|
|
61
|
+
readonly 'spacing.ecl.container.20': "--ds-ecl-container-20";
|
|
62
|
+
readonly 'spacing.ecl.container.24': "--ds-ecl-container-24";
|
|
63
|
+
readonly 'spacing.ecl.layout.32': "--ds-ecl-layout-32";
|
|
64
|
+
readonly 'spacing.ecl.layout.40': "--ds-ecl-layout-40";
|
|
65
|
+
readonly 'spacing.ecl.layout.64': "--ds-ecl-layout-64";
|
|
66
|
+
readonly 'spacing.ccc.component.2': "--ds-ccc-component-2";
|
|
67
|
+
readonly 'spacing.ccc.component.4': "--ds-ccc-component-4";
|
|
68
|
+
readonly 'spacing.ccc.component.6': "--ds-ccc-component-6";
|
|
69
|
+
readonly 'spacing.ccc.component.8': "--ds-ccc-component-8";
|
|
70
|
+
readonly 'spacing.ccc.content.12': "--ds-ccc-content-12";
|
|
71
|
+
readonly 'spacing.ccc.content.16': "--ds-ccc-content-16";
|
|
72
|
+
readonly 'spacing.ccc.content.20': "--ds-ccc-content-20";
|
|
73
|
+
readonly 'spacing.ccc.content.24': "--ds-ccc-content-24";
|
|
74
|
+
readonly 'spacing.ccc.container.32': "--ds-ccc-container-32";
|
|
75
|
+
readonly 'spacing.ccc.container.40': "--ds-ccc-container-40";
|
|
76
|
+
readonly 'spacing.ccc.container.48': "--ds-ccc-container-48";
|
|
77
|
+
readonly 'spacing.gap.100': "--ds-gap-100";
|
|
78
|
+
readonly 'spacing.gap.200': "--ds-gap-200";
|
|
79
|
+
readonly 'spacing.gap.300': "--ds-gap-300";
|
|
80
|
+
readonly 'spacing.inset.100': "--ds-inset-100";
|
|
81
|
+
readonly 'spacing.inset.200': "--ds-inset-200";
|
|
82
|
+
readonly 'spacing.inset.300': "--ds-inset-300";
|
|
20
83
|
};
|
|
21
84
|
export declare type CSSTokenMap = {
|
|
22
|
-
'spacing.container.gutter': 'var(--ds-container-gutter)';
|
|
23
85
|
'spacing.scale.0': 'var(--ds-scale-0)';
|
|
24
86
|
'spacing.scale.100': 'var(--ds-scale-100)';
|
|
25
87
|
'spacing.scale.150': 'var(--ds-scale-150)';
|
|
@@ -32,5 +94,69 @@ export declare type CSSTokenMap = {
|
|
|
32
94
|
'spacing.scale.025': 'var(--ds-scale-025)';
|
|
33
95
|
'spacing.scale.050': 'var(--ds-scale-050)';
|
|
34
96
|
'spacing.scale.075': 'var(--ds-scale-075)';
|
|
97
|
+
'spacing.scaleLinear.0': 'var(--ds-scaleLinear-0)';
|
|
98
|
+
'spacing.scaleLinear.100': 'var(--ds-scaleLinear-100)';
|
|
99
|
+
'spacing.scaleLinear.200': 'var(--ds-scaleLinear-200)';
|
|
100
|
+
'spacing.scaleLinear.300': 'var(--ds-scaleLinear-300)';
|
|
101
|
+
'spacing.scaleLinear.400': 'var(--ds-scaleLinear-400)';
|
|
102
|
+
'spacing.scaleLinear.500': 'var(--ds-scaleLinear-500)';
|
|
103
|
+
'spacing.scaleLinear.600': 'var(--ds-scaleLinear-600)';
|
|
104
|
+
'spacing.scaleLinear.700': 'var(--ds-scaleLinear-700)';
|
|
105
|
+
'spacing.scaleLinear.800': 'var(--ds-scaleLinear-800)';
|
|
106
|
+
'spacing.scaleLinear.900': 'var(--ds-scaleLinear-900)';
|
|
107
|
+
'spacing.scaleLinear.1000': 'var(--ds-scaleLinear-1000)';
|
|
108
|
+
'spacing.scaleLinear.1100': 'var(--ds-scaleLinear-1100)';
|
|
109
|
+
'spacing.pixel.0': 'var(--ds-pixel-0)';
|
|
110
|
+
'spacing.pixel.2': 'var(--ds-pixel-2)';
|
|
111
|
+
'spacing.pixel.4': 'var(--ds-pixel-4)';
|
|
112
|
+
'spacing.pixel.6': 'var(--ds-pixel-6)';
|
|
113
|
+
'spacing.pixel.8': 'var(--ds-pixel-8)';
|
|
114
|
+
'spacing.pixel.12': 'var(--ds-pixel-12)';
|
|
115
|
+
'spacing.pixel.16': 'var(--ds-pixel-16)';
|
|
116
|
+
'spacing.pixel.20': 'var(--ds-pixel-20)';
|
|
117
|
+
'spacing.pixel.24': 'var(--ds-pixel-24)';
|
|
118
|
+
'spacing.pixel.32': 'var(--ds-pixel-32)';
|
|
119
|
+
'spacing.pixel.40': 'var(--ds-pixel-40)';
|
|
120
|
+
'spacing.pixel.48': 'var(--ds-pixel-48)';
|
|
121
|
+
'spacing.size.none': 'var(--ds-size-none)';
|
|
122
|
+
'spacing.size.xxxxSmall': 'var(--ds-size-xxxxSmall)';
|
|
123
|
+
'spacing.size.xxxSmall': 'var(--ds-size-xxxSmall)';
|
|
124
|
+
'spacing.size.xxSmall': 'var(--ds-size-xxSmall)';
|
|
125
|
+
'spacing.size.xsmall': 'var(--ds-size-xsmall)';
|
|
126
|
+
'spacing.size.small': 'var(--ds-size-small)';
|
|
127
|
+
'spacing.size.medium': 'var(--ds-size-medium)';
|
|
128
|
+
'spacing.size.large': 'var(--ds-size-large)';
|
|
129
|
+
'spacing.size.xlarge': 'var(--ds-size-xlarge)';
|
|
130
|
+
'spacing.size.xxlarge': 'var(--ds-size-xxlarge)';
|
|
131
|
+
'spacing.size.xxxlarge': 'var(--ds-size-xxxlarge)';
|
|
132
|
+
'spacing.size.xxxxlarge': 'var(--ds-size-xxxxlarge)';
|
|
133
|
+
'spacing.ecl.element.2': 'var(--ds-ecl-element-2)';
|
|
134
|
+
'spacing.ecl.element.4': 'var(--ds-ecl-element-4)';
|
|
135
|
+
'spacing.ecl.element.6': 'var(--ds-ecl-element-6)';
|
|
136
|
+
'spacing.ecl.element.8': 'var(--ds-ecl-element-8)';
|
|
137
|
+
'spacing.ecl.container.12': 'var(--ds-ecl-container-12)';
|
|
138
|
+
'spacing.ecl.container.16': 'var(--ds-ecl-container-16)';
|
|
139
|
+
'spacing.ecl.container.20': 'var(--ds-ecl-container-20)';
|
|
140
|
+
'spacing.ecl.container.24': 'var(--ds-ecl-container-24)';
|
|
141
|
+
'spacing.ecl.layout.32': 'var(--ds-ecl-layout-32)';
|
|
142
|
+
'spacing.ecl.layout.40': 'var(--ds-ecl-layout-40)';
|
|
143
|
+
'spacing.ecl.layout.64': 'var(--ds-ecl-layout-64)';
|
|
144
|
+
'spacing.ccc.component.2': 'var(--ds-ccc-component-2)';
|
|
145
|
+
'spacing.ccc.component.4': 'var(--ds-ccc-component-4)';
|
|
146
|
+
'spacing.ccc.component.6': 'var(--ds-ccc-component-6)';
|
|
147
|
+
'spacing.ccc.component.8': 'var(--ds-ccc-component-8)';
|
|
148
|
+
'spacing.ccc.content.12': 'var(--ds-ccc-content-12)';
|
|
149
|
+
'spacing.ccc.content.16': 'var(--ds-ccc-content-16)';
|
|
150
|
+
'spacing.ccc.content.20': 'var(--ds-ccc-content-20)';
|
|
151
|
+
'spacing.ccc.content.24': 'var(--ds-ccc-content-24)';
|
|
152
|
+
'spacing.ccc.container.32': 'var(--ds-ccc-container-32)';
|
|
153
|
+
'spacing.ccc.container.40': 'var(--ds-ccc-container-40)';
|
|
154
|
+
'spacing.ccc.container.48': 'var(--ds-ccc-container-48)';
|
|
155
|
+
'spacing.gap.100': 'var(--ds-gap-100)';
|
|
156
|
+
'spacing.gap.200': 'var(--ds-gap-200)';
|
|
157
|
+
'spacing.gap.300': 'var(--ds-gap-300)';
|
|
158
|
+
'spacing.inset.100': 'var(--ds-inset-100)';
|
|
159
|
+
'spacing.inset.200': 'var(--ds-inset-200)';
|
|
160
|
+
'spacing.inset.300': 'var(--ds-inset-300)';
|
|
35
161
|
};
|
|
36
162
|
export default tokens;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
export declare const THEMES: readonly ["light", "dark", "legacy-light", "legacy-dark", "spacing"];
|
|
2
1
|
export declare const THEME_DATA_ATTRIBUTE = "data-theme";
|
|
2
|
+
export declare const COLOR_MODE_ATTRIBUTE = "data-color-mode";
|
|
3
3
|
export declare const DEFAULT_THEME = "light spacing";
|
|
4
4
|
export declare const CSS_PREFIX = "ds";
|
|
5
5
|
export declare const CSS_VAR_FULL: string[];
|
|
6
|
-
export declare const THEME_NAME_MAP: {
|
|
7
|
-
'atlassian-light': string;
|
|
8
|
-
'atlassian-dark': string;
|
|
9
|
-
'atlassian-legacy-light': string;
|
|
10
|
-
'atlassian-legacy-dark': string;
|
|
11
|
-
'atlassian-spacing': string;
|
|
12
|
-
};
|
|
13
6
|
export declare const TOKEN_NOT_FOUND_CSS_VAR: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as token } from './get-token';
|
|
2
2
|
export { default as setGlobalTheme } from './set-global-theme';
|
|
3
3
|
export type { CSSToken } from './artifacts/token-names';
|
|
4
|
-
export type { Themes } from './
|
|
4
|
+
export type { Themes, ThemeIds } from './theme-config';
|
|
5
|
+
export { default as themeConfig } from './theme-config';
|
|
5
6
|
export { useThemeObserver, ThemeMutationObserver, } from './theme-change-observer';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const setGlobalTheme: (
|
|
1
|
+
import { ThemeIds } from './theme-config';
|
|
2
|
+
declare const setGlobalTheme: (themeId: ThemeIds, shouldMatchSystem?: boolean) => void;
|
|
3
3
|
export default setGlobalTheme;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeIds } from './theme-config';
|
|
2
2
|
/**
|
|
3
3
|
* A MutationObserver which watches the `<html>` element for changes to the theme.
|
|
4
4
|
*
|
|
@@ -15,7 +15,8 @@ import { Themes } from './types';
|
|
|
15
15
|
export declare class ThemeMutationObserver {
|
|
16
16
|
private callback;
|
|
17
17
|
observer: MutationObserver | null;
|
|
18
|
-
|
|
18
|
+
mediaObserver: any;
|
|
19
|
+
constructor(callback: (theme: ThemeIds | null) => unknown);
|
|
19
20
|
observe(): void;
|
|
20
21
|
disconnect(): void;
|
|
21
22
|
}
|
|
@@ -32,4 +33,4 @@ export declare class ThemeMutationObserver {
|
|
|
32
33
|
* }, [theme]);
|
|
33
34
|
* ```
|
|
34
35
|
*/
|
|
35
|
-
export declare const useThemeObserver: () =>
|
|
36
|
+
export declare const useThemeObserver: () => ThemeIds | null;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the source of truth for themes and all associated meta data.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Themes: The internal identifier of a theme.
|
|
6
|
+
* These ids are what the actual theme files/folders are called.
|
|
7
|
+
* style-dictionary will attempt to locate these in the file-system.
|
|
8
|
+
*/
|
|
9
|
+
export declare type Themes = 'atlassian-light' | 'atlassian-dark' | 'atlassian-legacy-light' | 'atlassian-legacy-dark' | 'atlassian-spacing';
|
|
10
|
+
export declare type ThemeFileNames = Themes;
|
|
11
|
+
/**
|
|
12
|
+
* Theme kinds: The type of theme.
|
|
13
|
+
* Some themes are entirely focused on Color, whilst others are purely focused on spacing.
|
|
14
|
+
* In the future other types may be introduced such as typography.
|
|
15
|
+
*/
|
|
16
|
+
export declare type ThemeKinds = 'color' | 'spacing';
|
|
17
|
+
/**
|
|
18
|
+
* Theme modes: The general purpose of a theme.
|
|
19
|
+
* This attr is used to apply the appropriate system-preference media selector
|
|
20
|
+
* It may also be used as a selector for mode-specific overrides such as light/dark images.
|
|
21
|
+
* The idea is there may exist many color themes, but every theme must either fit into light or dark.
|
|
22
|
+
*/
|
|
23
|
+
export declare type ThemeColorModes = 'light' | 'dark';
|
|
24
|
+
/**
|
|
25
|
+
* Theme ids: The value that will mounted to the DOM as a data attr
|
|
26
|
+
* For example: `data-theme="light"
|
|
27
|
+
*
|
|
28
|
+
* These ids must be kebab case
|
|
29
|
+
*/
|
|
30
|
+
export declare type ThemeIds = 'light' | 'dark' | 'legacy-light' | 'legacy-dark' | 'spacing';
|
|
31
|
+
/**
|
|
32
|
+
* Palettes: The set of base tokens a given theme may be populated with.
|
|
33
|
+
* For example: legacy light & dark themes use the "legacyPalette" containing colors from our
|
|
34
|
+
* previous color set.
|
|
35
|
+
*/
|
|
36
|
+
export declare type Palettes = 'defaultPalette' | 'legacyPalette' | 'spacingScale';
|
|
37
|
+
/**
|
|
38
|
+
* ThemeConfig: the source of truth for all theme meta-data.
|
|
39
|
+
* This object should be used whenever interfacing with themes.
|
|
40
|
+
*/
|
|
41
|
+
interface ThemeConfig {
|
|
42
|
+
id: ThemeIds;
|
|
43
|
+
displayName: string;
|
|
44
|
+
palette: Palettes;
|
|
45
|
+
attributes: {
|
|
46
|
+
type: 'color';
|
|
47
|
+
mode: ThemeColorModes;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'spacing';
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
declare const themeConfig: Record<Themes, ThemeConfig>;
|
|
53
|
+
export default themeConfig;
|