@atlaskit/tokens 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/css/atlassian-spacing.css +17 -13
  3. package/dist/cjs/artifacts/palettes-raw/spacing-scale.js +249 -1
  4. package/dist/cjs/artifacts/rename-mapping/atlassian-spacing.js +1 -49
  5. package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +323 -213
  6. package/dist/cjs/artifacts/typescript/atlassian-spacing-token-default-values.js +17 -13
  7. package/dist/cjs/artifacts/typescript/atlassian-spacing-token-names.js +17 -13
  8. package/dist/cjs/constants.js +1 -1
  9. package/dist/cjs/get-token.js +1 -1
  10. package/dist/cjs/palettes/spacing-scale.js +96 -76
  11. package/dist/cjs/theme-config.js +6 -0
  12. package/dist/cjs/tokens/atlassian-spacing/spacing.js +65 -44
  13. package/dist/cjs/tokens/default/spacing/spacing.js +167 -116
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/artifacts/palettes-raw/spacing-scale.js +249 -1
  16. package/dist/es2019/artifacts/rename-mapping/atlassian-spacing.js +1 -49
  17. package/dist/es2019/artifacts/tokens-raw/atlassian-spacing.js +323 -213
  18. package/dist/es2019/artifacts/typescript/atlassian-spacing-token-default-values.js +17 -13
  19. package/dist/es2019/artifacts/typescript/atlassian-spacing-token-names.js +17 -13
  20. package/dist/es2019/constants.js +1 -1
  21. package/dist/es2019/get-token.js +1 -1
  22. package/dist/es2019/palettes/spacing-scale.js +95 -76
  23. package/dist/es2019/theme-config.js +6 -0
  24. package/dist/es2019/tokens/atlassian-spacing/spacing.js +64 -44
  25. package/dist/es2019/tokens/default/spacing/spacing.js +166 -116
  26. package/dist/es2019/version.json +1 -1
  27. package/dist/esm/artifacts/palettes-raw/spacing-scale.js +249 -1
  28. package/dist/esm/artifacts/rename-mapping/atlassian-spacing.js +1 -49
  29. package/dist/esm/artifacts/tokens-raw/atlassian-spacing.js +323 -213
  30. package/dist/esm/artifacts/typescript/atlassian-spacing-token-default-values.js +17 -13
  31. package/dist/esm/artifacts/typescript/atlassian-spacing-token-names.js +17 -13
  32. package/dist/esm/constants.js +1 -1
  33. package/dist/esm/get-token.js +1 -1
  34. package/dist/esm/palettes/spacing-scale.js +95 -76
  35. package/dist/esm/theme-config.js +6 -0
  36. package/dist/esm/tokens/atlassian-spacing/spacing.js +64 -44
  37. package/dist/esm/tokens/default/spacing/spacing.js +166 -116
  38. package/dist/esm/version.json +1 -1
  39. package/dist/types/artifacts/palettes-raw/spacing-scale.d.ts +22 -3
  40. package/dist/types/artifacts/rename-mapping/atlassian-spacing.d.ts +1 -1
  41. package/dist/types/artifacts/token-default-values.d.ts +16 -12
  42. package/dist/types/artifacts/token-names.d.ts +16 -12
  43. package/dist/types/artifacts/tokens-raw/atlassian-spacing.d.ts +61 -1
  44. package/dist/types/artifacts/typescript/atlassian-spacing-token-default-values.d.ts +17 -13
  45. package/dist/types/artifacts/typescript/atlassian-spacing-token-names.d.ts +33 -25
  46. package/dist/types/artifacts/typescript/atlassian-spacing-types-internal.d.ts +2 -2
  47. package/dist/types/artifacts/typescript/atlassian-spacing-types.d.ts +2 -2
  48. package/dist/types/palettes/spacing-scale.d.ts +94 -4
  49. package/dist/types/theme-config.d.ts +9 -1
  50. package/dist/types/tokens/atlassian-spacing/spacing.d.ts +8 -2
  51. package/dist/types/tokens/default/spacing/spacing.d.ts +6 -2
  52. package/dist/types/types.d.ts +92 -81
  53. package/package.json +2 -3
  54. package/report.api.md +40 -26
  55. package/tmp/api-report-tmp.d.ts +38 -25
  56. package/dist/cjs/entry-points/init.js +0 -9
  57. package/dist/es2019/entry-points/init.js +0 -4
  58. package/dist/esm/entry-points/init.js +0 -4
  59. package/dist/types/entry-points/init.d.ts +0 -4
  60. package/init/package.json +0 -17
@@ -4,10 +4,24 @@
4
4
  * Token names mapped to their value in the default Atlassian themes ('light').
5
5
  * These default values are used by the Babel plugin to optionally provide automatic fallbacks.
6
6
  *
7
- * @codegen <<SignedSource::6774c0c721b46e66ada20e02efc078c0>>
7
+ * @codegen <<SignedSource::58e461c6792689bbf53af618a63e94d0>>
8
8
  * @codegenCommand yarn build tokens
9
9
  */
10
10
  declare const defaultTokenValues: {
11
+ readonly 'space.0': "0";
12
+ readonly 'space.100': "0.5rem";
13
+ readonly 'space.150': "0.75rem";
14
+ readonly 'space.200': "1rem";
15
+ readonly 'space.250': "1.25rem";
16
+ readonly 'space.300': "1.5rem";
17
+ readonly 'space.400': "2rem";
18
+ readonly 'space.500': "2.5rem";
19
+ readonly 'space.600': "3rem";
20
+ readonly 'space.800': "4rem";
21
+ readonly 'space.1000': "5rem";
22
+ readonly 'space.025': "0.125rem";
23
+ readonly 'space.050': "0.25rem";
24
+ readonly 'space.075': "0.375rem";
11
25
  readonly 'spacing.scale.0': "0";
12
26
  readonly 'spacing.scale.100': "0.5rem";
13
27
  readonly 'spacing.scale.150': "0.75rem";
@@ -17,6 +31,8 @@ declare const defaultTokenValues: {
17
31
  readonly 'spacing.scale.400': "2rem";
18
32
  readonly 'spacing.scale.500': "2.5rem";
19
33
  readonly 'spacing.scale.600': "3rem";
34
+ readonly 'spacing.scale.800': "4rem";
35
+ readonly 'spacing.scale.1000': "5rem";
20
36
  readonly 'spacing.scale.025': "0.125rem";
21
37
  readonly 'spacing.scale.050': "0.25rem";
22
38
  readonly 'spacing.scale.075': "0.375rem";
@@ -32,18 +48,6 @@ declare const defaultTokenValues: {
32
48
  readonly 'spacing.scaleLinear.900': "2rem";
33
49
  readonly 'spacing.scaleLinear.1000': "2.5rem";
34
50
  readonly 'spacing.scaleLinear.1100': "3rem";
35
- readonly 'spacing.pixel.0': "0";
36
- readonly 'spacing.pixel.2': "0.125rem";
37
- readonly 'spacing.pixel.4': "0.25rem";
38
- readonly 'spacing.pixel.6': "0.375rem";
39
- readonly 'spacing.pixel.8': "0.5rem";
40
- readonly 'spacing.pixel.12': "0.75rem";
41
- readonly 'spacing.pixel.16': "1rem";
42
- readonly 'spacing.pixel.20': "1.25rem";
43
- readonly 'spacing.pixel.24': "1.5rem";
44
- readonly 'spacing.pixel.32': "2rem";
45
- readonly 'spacing.pixel.40': "2.5rem";
46
- readonly 'spacing.pixel.48': "3rem";
47
51
  readonly 'spacing.size.none': "0";
48
52
  readonly 'spacing.size.xxxxSmall': "0.125rem";
49
53
  readonly 'spacing.size.xxxSmall': "0.25rem";
@@ -1,9 +1,23 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::1808e289835f4813ce4782e16cce419d>>
3
+ * @codegen <<SignedSource::32eee2b724a024fa87bb7b5638096758>>
4
4
  * @codegenCommand yarn build tokens
5
5
  */
6
6
  declare const tokens: {
7
+ readonly 'space.0': "--ds-space-0";
8
+ readonly 'space.100': "--ds-space-100";
9
+ readonly 'space.150': "--ds-space-150";
10
+ readonly 'space.200': "--ds-space-200";
11
+ readonly 'space.250': "--ds-space-250";
12
+ readonly 'space.300': "--ds-space-300";
13
+ readonly 'space.400': "--ds-space-400";
14
+ readonly 'space.500': "--ds-space-500";
15
+ readonly 'space.600': "--ds-space-600";
16
+ readonly 'space.800': "--ds-space-800";
17
+ readonly 'space.1000': "--ds-space-1000";
18
+ readonly 'space.025': "--ds-space-025";
19
+ readonly 'space.050': "--ds-space-050";
20
+ readonly 'space.075': "--ds-space-075";
7
21
  readonly 'spacing.scale.0': "--ds-scale-0";
8
22
  readonly 'spacing.scale.100': "--ds-scale-100";
9
23
  readonly 'spacing.scale.150': "--ds-scale-150";
@@ -13,6 +27,8 @@ declare const tokens: {
13
27
  readonly 'spacing.scale.400': "--ds-scale-400";
14
28
  readonly 'spacing.scale.500': "--ds-scale-500";
15
29
  readonly 'spacing.scale.600': "--ds-scale-600";
30
+ readonly 'spacing.scale.800': "--ds-scale-800";
31
+ readonly 'spacing.scale.1000': "--ds-scale-1000";
16
32
  readonly 'spacing.scale.025': "--ds-scale-025";
17
33
  readonly 'spacing.scale.050': "--ds-scale-050";
18
34
  readonly 'spacing.scale.075': "--ds-scale-075";
@@ -28,18 +44,6 @@ declare const tokens: {
28
44
  readonly 'spacing.scaleLinear.900': "--ds-scaleLinear-900";
29
45
  readonly 'spacing.scaleLinear.1000': "--ds-scaleLinear-1000";
30
46
  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
47
  readonly 'spacing.size.none': "--ds-size-none";
44
48
  readonly 'spacing.size.xxxxSmall': "--ds-size-xxxxSmall";
45
49
  readonly 'spacing.size.xxxSmall': "--ds-size-xxxSmall";
@@ -82,6 +86,20 @@ declare const tokens: {
82
86
  readonly 'spacing.inset.300': "--ds-inset-300";
83
87
  };
84
88
  export declare type CSSTokenMap = {
89
+ 'space.0': 'var(--ds-space-0)';
90
+ 'space.100': 'var(--ds-space-100)';
91
+ 'space.150': 'var(--ds-space-150)';
92
+ 'space.200': 'var(--ds-space-200)';
93
+ 'space.250': 'var(--ds-space-250)';
94
+ 'space.300': 'var(--ds-space-300)';
95
+ 'space.400': 'var(--ds-space-400)';
96
+ 'space.500': 'var(--ds-space-500)';
97
+ 'space.600': 'var(--ds-space-600)';
98
+ 'space.800': 'var(--ds-space-800)';
99
+ 'space.1000': 'var(--ds-space-1000)';
100
+ 'space.025': 'var(--ds-space-025)';
101
+ 'space.050': 'var(--ds-space-050)';
102
+ 'space.075': 'var(--ds-space-075)';
85
103
  'spacing.scale.0': 'var(--ds-scale-0)';
86
104
  'spacing.scale.100': 'var(--ds-scale-100)';
87
105
  'spacing.scale.150': 'var(--ds-scale-150)';
@@ -91,6 +109,8 @@ export declare type CSSTokenMap = {
91
109
  'spacing.scale.400': 'var(--ds-scale-400)';
92
110
  'spacing.scale.500': 'var(--ds-scale-500)';
93
111
  'spacing.scale.600': 'var(--ds-scale-600)';
112
+ 'spacing.scale.800': 'var(--ds-scale-800)';
113
+ 'spacing.scale.1000': 'var(--ds-scale-1000)';
94
114
  'spacing.scale.025': 'var(--ds-scale-025)';
95
115
  'spacing.scale.050': 'var(--ds-scale-050)';
96
116
  'spacing.scale.075': 'var(--ds-scale-075)';
@@ -106,18 +126,6 @@ export declare type CSSTokenMap = {
106
126
  'spacing.scaleLinear.900': 'var(--ds-scaleLinear-900)';
107
127
  'spacing.scaleLinear.1000': 'var(--ds-scaleLinear-1000)';
108
128
  '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
129
  'spacing.size.none': 'var(--ds-size-none)';
122
130
  'spacing.size.xxxxSmall': 'var(--ds-size-xxxxSmall)';
123
131
  'spacing.size.xxxSmall': 'var(--ds-size-xxxSmall)';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::953f5e0300c6d0043915d01d2974af58>>
3
+ * @codegen <<SignedSource::2dde377cb0c1b5bb3f5d438e666d4e11>>
4
4
  * @codegenCommand yarn build tokens
5
5
  */
6
- export declare type InternalTokenIds = 'spacing.scale.0' | 'spacing.scale.100' | 'spacing.scale.150' | 'spacing.scale.200' | 'spacing.scale.250' | 'spacing.scale.300' | 'spacing.scale.400' | 'spacing.scale.500' | 'spacing.scale.600' | 'spacing.scale.025' | 'spacing.scale.050' | 'spacing.scale.075';
6
+ export declare type InternalTokenIds = 'space.0' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000' | 'space.025' | 'space.050' | 'space.075' | 'spacing.scale.0' | 'spacing.scale.100' | 'spacing.scale.150' | 'spacing.scale.200' | 'spacing.scale.250' | 'spacing.scale.300' | 'spacing.scale.400' | 'spacing.scale.500' | 'spacing.scale.600' | 'spacing.scale.800' | 'spacing.scale.1000' | 'spacing.scale.025' | 'spacing.scale.050' | 'spacing.scale.075';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::0a5838a760fffb6bbb598305116da533>>
3
+ * @codegen <<SignedSource::9719232f8d820690bb6cc29cda1b7f89>>
4
4
  * @codegenCommand yarn build tokens
5
5
  */
6
- export declare type ActiveTokens = 'spacing.scale.0' | 'spacing.scale.100' | 'spacing.scale.150' | 'spacing.scale.200' | 'spacing.scale.250' | 'spacing.scale.300' | 'spacing.scale.400' | 'spacing.scale.500' | 'spacing.scale.600' | 'spacing.scale.025' | 'spacing.scale.050' | 'spacing.scale.075';
6
+ export declare type ActiveTokens = 'space.0' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000' | 'space.025' | 'space.050' | 'space.075' | 'spacing.scale.0' | 'spacing.scale.100' | 'spacing.scale.150' | 'spacing.scale.200' | 'spacing.scale.250' | 'spacing.scale.300' | 'spacing.scale.400' | 'spacing.scale.500' | 'spacing.scale.600' | 'spacing.scale.800' | 'spacing.scale.1000' | 'spacing.scale.025' | 'spacing.scale.050' | 'spacing.scale.075';
@@ -1,5 +1,95 @@
1
1
  import type { SpacingScaleTokenSchema } from '../types';
2
- export declare type ScaleValues = 'Space0' | 'Space025' | 'Space050' | 'Space075' | 'Space100' | 'Space150' | 'Space200' | 'Space250' | 'Space300' | 'Space400' | 'Space500' | 'Space600';
3
- export declare type BaseToken = keyof SpacingScaleTokenSchema<ScaleValues>['spacing']['scale'];
4
- declare const scale: SpacingScaleTokenSchema<ScaleValues>;
5
- export default scale;
2
+ /**
3
+ * Types are inferred from the base tokens below
4
+ */
5
+ export declare type SpacingPaletteToken = keyof typeof baseSpacingTokens;
6
+ declare const baseSpacingTokens: {
7
+ readonly Space0: {
8
+ readonly value: "0";
9
+ readonly attributes: {
10
+ readonly group: "scale";
11
+ };
12
+ };
13
+ readonly Space025: {
14
+ readonly value: "0.125rem";
15
+ readonly attributes: {
16
+ readonly group: "scale";
17
+ };
18
+ };
19
+ readonly Space050: {
20
+ readonly value: "0.25rem";
21
+ readonly attributes: {
22
+ readonly group: "scale";
23
+ };
24
+ };
25
+ readonly Space075: {
26
+ readonly value: "0.375rem";
27
+ readonly attributes: {
28
+ readonly group: "scale";
29
+ };
30
+ };
31
+ readonly Space100: {
32
+ readonly value: "0.5rem";
33
+ readonly attributes: {
34
+ readonly group: "scale";
35
+ };
36
+ };
37
+ readonly Space150: {
38
+ readonly value: "0.75rem";
39
+ readonly attributes: {
40
+ readonly group: "scale";
41
+ };
42
+ };
43
+ readonly Space200: {
44
+ readonly value: "1rem";
45
+ readonly attributes: {
46
+ readonly group: "scale";
47
+ };
48
+ };
49
+ readonly Space250: {
50
+ readonly value: "1.25rem";
51
+ readonly attributes: {
52
+ readonly group: "scale";
53
+ };
54
+ };
55
+ readonly Space300: {
56
+ readonly value: "1.5rem";
57
+ readonly attributes: {
58
+ readonly group: "scale";
59
+ };
60
+ };
61
+ readonly Space400: {
62
+ readonly value: "2rem";
63
+ readonly attributes: {
64
+ readonly group: "scale";
65
+ };
66
+ };
67
+ readonly Space500: {
68
+ readonly value: "2.5rem";
69
+ readonly attributes: {
70
+ readonly group: "scale";
71
+ };
72
+ };
73
+ readonly Space600: {
74
+ readonly value: "3rem";
75
+ readonly attributes: {
76
+ readonly group: "scale";
77
+ };
78
+ };
79
+ readonly Space800: {
80
+ readonly value: "4rem";
81
+ readonly attributes: {
82
+ readonly group: "scale";
83
+ };
84
+ readonly pixelValue: "64px";
85
+ };
86
+ readonly Space1000: {
87
+ readonly value: "5rem";
88
+ readonly attributes: {
89
+ readonly group: "scale";
90
+ };
91
+ readonly pixelValue: "80px";
92
+ };
93
+ };
94
+ declare const spacingPalette: SpacingScaleTokenSchema<SpacingPaletteToken>;
95
+ export default spacingPalette;
@@ -28,6 +28,12 @@ export declare type ThemeColorModes = 'light' | 'dark';
28
28
  * These ids must be kebab case
29
29
  */
30
30
  export declare type ThemeIds = 'light' | 'dark' | 'legacy-light' | 'legacy-dark' | 'spacing' | 'typography';
31
+ /**
32
+ * Theme to use a base. This will create the theme as
33
+ * an extension with all token values marked as optional
34
+ * to allow tokens to be overridden as required.
35
+ */
36
+ export declare type ExtensionThemeId = ThemeIds;
31
37
  /**
32
38
  * Palettes: The set of base tokens a given theme may be populated with.
33
39
  * For example: legacy light & dark themes use the "legacyPalette" containing colors from our
@@ -42,13 +48,15 @@ interface ThemeConfig {
42
48
  id: ThemeIds;
43
49
  displayName: string;
44
50
  palette: Palettes;
45
- attributes: {
51
+ attributes: ({
46
52
  type: 'color';
47
53
  mode: ThemeColorModes;
48
54
  } | {
49
55
  type: 'spacing';
50
56
  } | {
51
57
  type: 'typography';
58
+ }) & {
59
+ extends?: ExtensionThemeId;
52
60
  };
53
61
  }
54
62
  declare const themeConfig: Record<Themes, ThemeConfig>;
@@ -1,4 +1,10 @@
1
- import { BaseToken } from '../../palettes/spacing-scale';
2
1
  import type { SpacingTokenSchema, ValueSchema } from '../../types';
3
- declare const spacing: ValueSchema<SpacingTokenSchema<BaseToken>>;
2
+ /**
3
+ * The spacing value schema is specifically designed to dictate the
4
+ * possible values a specific key-token pair will have.
5
+ *
6
+ * This is combined with the attribute schema.
7
+ * @link 'file:../default/spacing/spacing.tsx'
8
+ */
9
+ declare const spacing: ValueSchema<SpacingTokenSchema>;
4
10
  export default spacing;
@@ -1,4 +1,8 @@
1
- import type { BaseToken } from '../../../palettes/spacing-scale';
2
1
  import type { AttributeSchema, SpacingTokenSchema } from '../../../types';
3
- declare const spacing: AttributeSchema<SpacingTokenSchema<BaseToken>>;
2
+ /**
3
+ * The spacing attribute schema governs the non-value specific metadata to apply to the
4
+ * spacing theme. This governs the name, description and state
5
+ * of a token.
6
+ */
7
+ declare const spacing: AttributeSchema<SpacingTokenSchema>;
4
8
  export default spacing;
@@ -1,4 +1,5 @@
1
- import { InternalTokenIds } from './artifacts/types-internal';
1
+ import type { InternalTokenIds } from './artifacts/types-internal';
2
+ import type { SpacingPaletteToken } from './palettes/spacing-scale';
2
3
  export declare type Groups = 'raw' | 'paint' | 'shadow' | 'palette' | 'opacity' | 'spacing' | 'scale' | 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight';
3
4
  export declare type ActiveTokenState = 'active';
4
5
  export declare type DeprecatedTokenState = 'deprecated';
@@ -37,6 +38,7 @@ export interface DesignToken<TValue, Group extends Groups> extends Token<TValue,
37
38
  group: Group;
38
39
  description: string;
39
40
  introduced: string;
41
+ pixelValue?: Group extends 'spacing' ? string : never;
40
42
  suggest?: string[];
41
43
  } | {
42
44
  state: DeprecatedTokenState;
@@ -69,7 +71,11 @@ declare type Id<T> = {} & {
69
71
  declare type DeepOmit<T extends any, K extends PropertyKey> = Omit<{
70
72
  [P in keyof T]: OmitDistributive<T[P], K>;
71
73
  }, K>;
74
+ declare type DeepPartial<T> = T extends object ? {
75
+ [P in keyof T]?: DeepPartial<T[P]>;
76
+ } : T;
72
77
  export declare type ValueSchema<Schema extends object> = DeepOmit<Schema, 'attributes'>;
78
+ export declare type ExtendedValueSchema<Schema extends object> = DeepPartial<ValueSchema<Schema>>;
73
79
  export declare type AttributeSchema<Schema extends object> = DeepOmit<Schema, 'value'>;
74
80
  export interface PaletteToken extends BaseToken<string, 'palette'> {
75
81
  attributes: {
@@ -96,7 +102,7 @@ export declare type ShadowToken<BaseToken> = DesignToken<Array<{
96
102
  inset?: boolean;
97
103
  }>, 'shadow'>;
98
104
  export declare type OpacityToken = DesignToken<string, 'opacity'>;
99
- export declare type SpacingToken<BaseToken> = DesignToken<BaseToken, 'spacing'>;
105
+ export declare type SpacingToken = DesignToken<SpacingPaletteToken, 'spacing'>;
100
106
  export declare type FontSizeToken<BaseToken> = DesignToken<BaseToken, 'fontSize'>;
101
107
  export declare type FontWeightToken<BaseToken> = DesignToken<BaseToken, 'fontWeight'>;
102
108
  export declare type FontFamilyToken<BaseToken> = DesignToken<BaseToken, 'fontFamily'>;
@@ -120,6 +126,7 @@ export interface PaletteColorTokenSchema<PaletteValues extends string> {
120
126
  };
121
127
  }
122
128
  export interface SpacingScaleTokenSchema<ScaleValues extends string> {
129
+ space: Record<ScaleValues, ScaleToken>;
123
130
  spacing: {
124
131
  scale: Record<ScaleValues, ScaleToken>;
125
132
  };
@@ -692,121 +699,125 @@ export interface DeprecatedTokenSchema<BaseToken> {
692
699
  export declare type ElevationTokenSchema<BaseToken> = SurfaceTokenSchema<BaseToken> & ShadowTokenSchema<BaseToken>;
693
700
  export declare type ColorTokenSchema<BaseToken> = BackgroundColorTokenSchema<BaseToken> & BorderColorTokenSchema<BaseToken> & IconColorTokenSchema<BaseToken> & TextColorTokenSchema<BaseToken> & AccentColorTokenSchema<BaseToken> & UtilTokenSchema<BaseToken>;
694
701
  export declare type TokenSchema<BaseToken> = ColorTokenSchema<BaseToken> & ElevationTokenSchema<BaseToken>;
695
- export interface SpacingTokenSchema<BaseToken> {
702
+ export interface SpacingTokenSchema {
703
+ space: {
704
+ '0': SpacingToken;
705
+ '025': SpacingToken;
706
+ '050': SpacingToken;
707
+ '075': SpacingToken;
708
+ '100': SpacingToken;
709
+ '150': SpacingToken;
710
+ '200': SpacingToken;
711
+ '250': SpacingToken;
712
+ '300': SpacingToken;
713
+ '400': SpacingToken;
714
+ '500': SpacingToken;
715
+ '600': SpacingToken;
716
+ '800': SpacingToken;
717
+ '1000': SpacingToken;
718
+ };
696
719
  spacing: {
697
720
  scale: {
698
- '0': SpacingToken<BaseToken>;
699
- '025': SpacingToken<BaseToken>;
700
- '050': SpacingToken<BaseToken>;
701
- '075': SpacingToken<BaseToken>;
702
- '100': SpacingToken<BaseToken>;
703
- '150': SpacingToken<BaseToken>;
704
- '200': SpacingToken<BaseToken>;
705
- '250': SpacingToken<BaseToken>;
706
- '300': SpacingToken<BaseToken>;
707
- '400': SpacingToken<BaseToken>;
708
- '500': SpacingToken<BaseToken>;
709
- '600': SpacingToken<BaseToken>;
721
+ '0': SpacingToken;
722
+ '025': SpacingToken;
723
+ '050': SpacingToken;
724
+ '075': SpacingToken;
725
+ '100': SpacingToken;
726
+ '150': SpacingToken;
727
+ '200': SpacingToken;
728
+ '250': SpacingToken;
729
+ '300': SpacingToken;
730
+ '400': SpacingToken;
731
+ '500': SpacingToken;
732
+ '600': SpacingToken;
733
+ '800': SpacingToken;
734
+ '1000': SpacingToken;
710
735
  };
711
736
  scaleLinear: {
712
- '0': SpacingToken<BaseToken>;
713
- '100': SpacingToken<BaseToken>;
714
- '200': SpacingToken<BaseToken>;
715
- '300': SpacingToken<BaseToken>;
716
- '400': SpacingToken<BaseToken>;
717
- '500': SpacingToken<BaseToken>;
718
- '600': SpacingToken<BaseToken>;
719
- '700': SpacingToken<BaseToken>;
720
- '800': SpacingToken<BaseToken>;
721
- '900': SpacingToken<BaseToken>;
722
- '1000': SpacingToken<BaseToken>;
723
- '1100': SpacingToken<BaseToken>;
724
- };
725
- pixel: {
726
- '0': SpacingToken<BaseToken>;
727
- '2': SpacingToken<BaseToken>;
728
- '4': SpacingToken<BaseToken>;
729
- '6': SpacingToken<BaseToken>;
730
- '8': SpacingToken<BaseToken>;
731
- '12': SpacingToken<BaseToken>;
732
- '16': SpacingToken<BaseToken>;
733
- '20': SpacingToken<BaseToken>;
734
- '24': SpacingToken<BaseToken>;
735
- '32': SpacingToken<BaseToken>;
736
- '40': SpacingToken<BaseToken>;
737
- '48': SpacingToken<BaseToken>;
737
+ '0': SpacingToken;
738
+ '100': SpacingToken;
739
+ '200': SpacingToken;
740
+ '300': SpacingToken;
741
+ '400': SpacingToken;
742
+ '500': SpacingToken;
743
+ '600': SpacingToken;
744
+ '700': SpacingToken;
745
+ '800': SpacingToken;
746
+ '900': SpacingToken;
747
+ '1000': SpacingToken;
748
+ '1100': SpacingToken;
738
749
  };
739
750
  size: {
740
- none: SpacingToken<BaseToken>;
741
- xxxxSmall: SpacingToken<BaseToken>;
742
- xxxSmall: SpacingToken<BaseToken>;
743
- xxSmall: SpacingToken<BaseToken>;
744
- xsmall: SpacingToken<BaseToken>;
745
- small: SpacingToken<BaseToken>;
746
- medium: SpacingToken<BaseToken>;
747
- large: SpacingToken<BaseToken>;
748
- xlarge: SpacingToken<BaseToken>;
749
- xxlarge: SpacingToken<BaseToken>;
750
- xxxlarge: SpacingToken<BaseToken>;
751
- xxxxlarge: SpacingToken<BaseToken>;
751
+ none: SpacingToken;
752
+ xxxxSmall: SpacingToken;
753
+ xxxSmall: SpacingToken;
754
+ xxSmall: SpacingToken;
755
+ xsmall: SpacingToken;
756
+ small: SpacingToken;
757
+ medium: SpacingToken;
758
+ large: SpacingToken;
759
+ xlarge: SpacingToken;
760
+ xxlarge: SpacingToken;
761
+ xxxlarge: SpacingToken;
762
+ xxxxlarge: SpacingToken;
752
763
  };
753
764
  ecl: {
754
765
  element: {
755
- '2': SpacingToken<BaseToken>;
756
- '4': SpacingToken<BaseToken>;
757
- '6': SpacingToken<BaseToken>;
758
- '8': SpacingToken<BaseToken>;
766
+ '2': SpacingToken;
767
+ '4': SpacingToken;
768
+ '6': SpacingToken;
769
+ '8': SpacingToken;
759
770
  };
760
771
  container: {
761
- '12': SpacingToken<BaseToken>;
762
- '16': SpacingToken<BaseToken>;
763
- '20': SpacingToken<BaseToken>;
764
- '24': SpacingToken<BaseToken>;
772
+ '12': SpacingToken;
773
+ '16': SpacingToken;
774
+ '20': SpacingToken;
775
+ '24': SpacingToken;
765
776
  };
766
777
  layout: {
767
- '32': SpacingToken<BaseToken>;
768
- '40': SpacingToken<BaseToken>;
769
- '64': SpacingToken<BaseToken>;
778
+ '32': SpacingToken;
779
+ '40': SpacingToken;
780
+ '64': SpacingToken;
770
781
  };
771
782
  };
772
783
  ccc: {
773
784
  component: {
774
- '2': SpacingToken<BaseToken>;
775
- '4': SpacingToken<BaseToken>;
776
- '6': SpacingToken<BaseToken>;
777
- '8': SpacingToken<BaseToken>;
785
+ '2': SpacingToken;
786
+ '4': SpacingToken;
787
+ '6': SpacingToken;
788
+ '8': SpacingToken;
778
789
  };
779
790
  content: {
780
- '12': SpacingToken<BaseToken>;
781
- '16': SpacingToken<BaseToken>;
782
- '20': SpacingToken<BaseToken>;
783
- '24': SpacingToken<BaseToken>;
791
+ '12': SpacingToken;
792
+ '16': SpacingToken;
793
+ '20': SpacingToken;
794
+ '24': SpacingToken;
784
795
  };
785
796
  container: {
786
- '32': SpacingToken<BaseToken>;
787
- '40': SpacingToken<BaseToken>;
788
- '48': SpacingToken<BaseToken>;
797
+ '32': SpacingToken;
798
+ '40': SpacingToken;
799
+ '48': SpacingToken;
789
800
  };
790
801
  };
791
802
  gap: {
792
- 100: {
803
+ '100': {
793
804
  value: 'Space100';
794
805
  };
795
- 200: {
806
+ '200': {
796
807
  value: 'Space200';
797
808
  };
798
- 300: {
809
+ '300': {
799
810
  value: 'Space300';
800
811
  };
801
812
  };
802
813
  inset: {
803
- 100: {
814
+ '100': {
804
815
  value: 'Space100';
805
816
  };
806
- 200: {
817
+ '200': {
807
818
  value: 'Space200';
808
819
  };
809
- 300: {
820
+ '300': {
810
821
  value: 'Space300';
811
822
  };
812
823
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
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",
@@ -41,7 +41,6 @@
41
41
  "./spacing-raw": "./src/entry-points/spacing-raw.tsx",
42
42
  "./rename-mapping": "./src/entry-points/rename-mapping.tsx",
43
43
  "./babel-plugin": "./src/entry-points/babel-plugin.tsx",
44
- "./init": "./src/entry-points/init.tsx",
45
44
  "./css/atlassian-light.css": "./css/atlassian-light.css",
46
45
  "./css/atlassian-dark.css": "./css/atlassian-dark.css",
47
46
  "./css/atlassian-legacy-light.css": "./css/atlassian-legacy-light.css",
@@ -71,7 +70,7 @@
71
70
  "@atlaskit/code": "^14.4.0",
72
71
  "@atlaskit/docs": "^9.0.10",
73
72
  "@atlaskit/dropdown-menu": "^11.5.0",
74
- "@atlaskit/ds-explorations": "^1.2.0",
73
+ "@atlaskit/ds-explorations": "^1.3.0",
75
74
  "@atlaskit/dynamic-table": "^14.8.0",
76
75
  "@atlaskit/empty-state": "^7.4.0",
77
76
  "@atlaskit/focus-ring": "^1.2.0",