@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.
Files changed (159) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
  3. package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
  4. package/dist/cjs/artifacts/palettes-raw/typography-palette.js +277 -37
  5. package/dist/cjs/artifacts/theme-import-map.js +10 -4
  6. package/dist/cjs/artifacts/themes/atlassian-typography-adg3.js +13 -0
  7. package/dist/cjs/artifacts/themes/atlassian-typography.js +2 -2
  8. package/dist/cjs/artifacts/token-default-values.js +26 -2
  9. package/dist/cjs/artifacts/token-names.js +22 -1
  10. package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +1084 -0
  11. package/dist/cjs/artifacts/tokens-raw/atlassian-typography.js +465 -253
  12. package/dist/cjs/babel-plugin/plugin.js +34 -3
  13. package/dist/cjs/constants.js +1 -3
  14. package/dist/cjs/entry-points/tokens-raw.js +2 -2
  15. package/dist/cjs/get-token-value.js +1 -1
  16. package/dist/cjs/get-token.js +1 -1
  17. package/dist/cjs/palettes/typography-palette.js +121 -16
  18. package/dist/cjs/theme-config.js +12 -4
  19. package/dist/cjs/tokens/atlassian-typography/font-family.js +11 -2
  20. package/dist/cjs/tokens/atlassian-typography/theme.js +140 -0
  21. package/dist/cjs/tokens/atlassian-typography/utils.js +29 -0
  22. package/dist/cjs/tokens/atlassian-typography-adg3/font-family.js +29 -0
  23. package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.js +8 -8
  24. package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.js +4 -4
  25. package/dist/cjs/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
  26. package/dist/cjs/tokens/atlassian-typography-adg3/theme.js +140 -0
  27. package/dist/cjs/tokens/atlassian-typography-adg3/utils.js +29 -0
  28. package/dist/cjs/tokens/default/typography/font-family.js +24 -0
  29. package/dist/cjs/tokens/default/typography/font.js +133 -0
  30. package/dist/cjs/tokens/default/typography/letter-spacing.js +54 -0
  31. package/dist/cjs/tokens/default/typography/line-height.js +8 -0
  32. package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
  33. package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
  34. package/dist/es2019/artifacts/palettes-raw/typography-palette.js +277 -37
  35. package/dist/es2019/artifacts/theme-import-map.js +6 -4
  36. package/dist/es2019/artifacts/themes/atlassian-typography-adg3.js +50 -0
  37. package/dist/es2019/artifacts/themes/atlassian-typography.js +23 -21
  38. package/dist/es2019/artifacts/token-default-values.js +26 -2
  39. package/dist/es2019/artifacts/token-names.js +22 -1
  40. package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +1077 -0
  41. package/dist/es2019/artifacts/tokens-raw/atlassian-typography.js +465 -253
  42. package/dist/es2019/babel-plugin/plugin.js +34 -4
  43. package/dist/es2019/constants.js +0 -1
  44. package/dist/es2019/entry-points/tokens-raw.js +1 -1
  45. package/dist/es2019/get-token-value.js +1 -1
  46. package/dist/es2019/get-token.js +1 -1
  47. package/dist/es2019/palettes/typography-palette.js +123 -17
  48. package/dist/es2019/theme-config.js +12 -4
  49. package/dist/es2019/tokens/atlassian-typography/font-family.js +11 -2
  50. package/dist/es2019/tokens/atlassian-typography/theme.js +133 -0
  51. package/dist/es2019/tokens/atlassian-typography/utils.js +22 -0
  52. package/dist/es2019/tokens/atlassian-typography-adg3/font-family.js +22 -0
  53. package/dist/es2019/tokens/atlassian-typography-adg3/font-size.js +31 -0
  54. package/dist/es2019/tokens/atlassian-typography-adg3/font-weight.js +19 -0
  55. package/dist/es2019/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
  56. package/dist/es2019/tokens/atlassian-typography-adg3/theme.js +133 -0
  57. package/dist/es2019/tokens/atlassian-typography-adg3/utils.js +22 -0
  58. package/dist/es2019/tokens/default/typography/font-family.js +24 -0
  59. package/dist/es2019/tokens/default/typography/font.js +126 -0
  60. package/dist/es2019/tokens/default/typography/letter-spacing.js +47 -0
  61. package/dist/es2019/tokens/default/typography/line-height.js +8 -0
  62. package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +2 -2
  63. package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +2 -2
  64. package/dist/esm/artifacts/palettes-raw/typography-palette.js +277 -37
  65. package/dist/esm/artifacts/theme-import-map.js +8 -4
  66. package/dist/esm/artifacts/themes/atlassian-typography-adg3.js +6 -0
  67. package/dist/esm/artifacts/themes/atlassian-typography.js +2 -2
  68. package/dist/esm/artifacts/token-default-values.js +26 -2
  69. package/dist/esm/artifacts/token-names.js +22 -1
  70. package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +1077 -0
  71. package/dist/esm/artifacts/tokens-raw/atlassian-typography.js +465 -253
  72. package/dist/esm/babel-plugin/plugin.js +34 -3
  73. package/dist/esm/constants.js +0 -1
  74. package/dist/esm/entry-points/tokens-raw.js +1 -1
  75. package/dist/esm/get-token-value.js +1 -1
  76. package/dist/esm/get-token.js +1 -1
  77. package/dist/esm/palettes/typography-palette.js +121 -16
  78. package/dist/esm/theme-config.js +12 -4
  79. package/dist/esm/tokens/atlassian-typography/font-family.js +11 -2
  80. package/dist/esm/tokens/atlassian-typography/theme.js +133 -0
  81. package/dist/esm/tokens/atlassian-typography/utils.js +22 -0
  82. package/dist/esm/tokens/atlassian-typography-adg3/font-family.js +22 -0
  83. package/dist/esm/tokens/atlassian-typography-adg3/font-size.js +31 -0
  84. package/dist/esm/tokens/atlassian-typography-adg3/font-weight.js +19 -0
  85. package/dist/esm/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.js +3 -0
  86. package/dist/esm/tokens/atlassian-typography-adg3/theme.js +133 -0
  87. package/dist/esm/tokens/atlassian-typography-adg3/utils.js +22 -0
  88. package/dist/esm/tokens/default/typography/font-family.js +24 -0
  89. package/dist/esm/tokens/default/typography/font.js +126 -0
  90. package/dist/esm/tokens/default/typography/letter-spacing.js +47 -0
  91. package/dist/esm/tokens/default/typography/line-height.js +8 -0
  92. package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +2 -2
  93. package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +2 -2
  94. package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
  95. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  96. package/dist/types/artifacts/themes/atlassian-typography-adg3.d.ts +7 -0
  97. package/dist/types/artifacts/themes/atlassian-typography.d.ts +2 -2
  98. package/dist/types/artifacts/token-default-values.d.ts +26 -2
  99. package/dist/types/artifacts/token-names.d.ts +43 -1
  100. package/dist/types/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +101 -0
  101. package/dist/types/artifacts/tokens-raw/atlassian-typography.d.ts +111 -3
  102. package/dist/types/artifacts/types-internal.d.ts +2 -2
  103. package/dist/types/artifacts/types.d.ts +2 -2
  104. package/dist/types/babel-plugin/plugin.d.ts +3 -0
  105. package/dist/types/constants.d.ts +0 -1
  106. package/dist/types/entry-points/tokens-raw.d.ts +1 -1
  107. package/dist/types/palettes/typography-palette.d.ts +8 -6
  108. package/dist/types/theme-config.d.ts +4 -4
  109. package/dist/types/tokens/atlassian-typography/theme.d.ts +10 -0
  110. package/dist/types/tokens/atlassian-typography/utils.d.ts +4 -0
  111. package/dist/types/tokens/atlassian-typography-adg3/font-family.d.ts +4 -0
  112. package/dist/types/tokens/atlassian-typography-adg3/theme.d.ts +10 -0
  113. package/dist/types/tokens/atlassian-typography-adg3/utils.d.ts +4 -0
  114. package/dist/types/tokens/default/typography/font.d.ts +20 -0
  115. package/dist/types/tokens/default/typography/letter-spacing.d.ts +4 -0
  116. package/dist/types/types.d.ts +111 -22
  117. package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +2 -2
  118. package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +2 -2
  119. package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
  120. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  121. package/dist/types-ts4.5/artifacts/themes/atlassian-typography-adg3.d.ts +7 -0
  122. package/dist/types-ts4.5/artifacts/themes/atlassian-typography.d.ts +2 -2
  123. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +26 -2
  124. package/dist/types-ts4.5/artifacts/token-names.d.ts +43 -1
  125. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +101 -0
  126. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography.d.ts +111 -3
  127. package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
  128. package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
  129. package/dist/types-ts4.5/babel-plugin/plugin.d.ts +3 -0
  130. package/dist/types-ts4.5/constants.d.ts +0 -1
  131. package/dist/types-ts4.5/entry-points/tokens-raw.d.ts +1 -1
  132. package/dist/types-ts4.5/palettes/typography-palette.d.ts +8 -6
  133. package/dist/types-ts4.5/theme-config.d.ts +5 -3
  134. package/dist/types-ts4.5/tokens/atlassian-typography/theme.d.ts +10 -0
  135. package/dist/types-ts4.5/tokens/atlassian-typography/utils.d.ts +4 -0
  136. package/dist/types-ts4.5/tokens/atlassian-typography-adg3/font-family.d.ts +4 -0
  137. package/dist/types-ts4.5/tokens/atlassian-typography-adg3/theme.d.ts +10 -0
  138. package/dist/types-ts4.5/tokens/atlassian-typography-adg3/utils.d.ts +4 -0
  139. package/dist/types-ts4.5/tokens/default/typography/font.d.ts +20 -0
  140. package/dist/types-ts4.5/tokens/default/typography/letter-spacing.d.ts +4 -0
  141. package/dist/types-ts4.5/types.d.ts +111 -22
  142. package/figma/atlassian-typography-adg3.json +150 -0
  143. package/figma/atlassian-typography.json +19 -82
  144. package/package.json +1 -1
  145. package/report.api.md +60 -2
  146. package/tmp/api-report-tmp.d.ts +49 -7
  147. package/dist/cjs/version.json +0 -7
  148. package/dist/es2019/tokens/atlassian-typography/font-size.js +0 -31
  149. package/dist/es2019/tokens/atlassian-typography/font-weight.js +0 -19
  150. package/dist/es2019/version.json +0 -7
  151. package/dist/esm/tokens/atlassian-typography/font-size.js +0 -31
  152. package/dist/esm/tokens/atlassian-typography/font-weight.js +0 -19
  153. package/dist/esm/version.json +0 -7
  154. /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.d.ts +0 -0
  155. /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.d.ts +0 -0
  156. /package/dist/types/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.d.ts +0 -0
  157. /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/font-size.d.ts +0 -0
  158. /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/font-weight.d.ts +0 -0
  159. /package/dist/types-ts4.5/tokens/{atlassian-typography → atlassian-typography-adg3}/line-height.d.ts +0 -0
@@ -1,6 +1,35 @@
1
1
  import * as t from '@babel/types';
2
- import tokenDefaultValues from '../artifacts/token-default-values';
3
2
  import tokenNames from '../artifacts/token-names';
3
+ import legacyLight from '../artifacts/tokens-raw/atlassian-legacy-light';
4
+ import light from '../artifacts/tokens-raw/atlassian-light';
5
+ // Convert raw tokens to key-value pairs { token: value }
6
+ const getThemeValues = theme => {
7
+ const tokensToMap = theme === 'light' ? light : legacyLight;
8
+ return tokensToMap.reduce((formatted, rawToken) => {
9
+ let value;
10
+ if (typeof rawToken.value === 'string') {
11
+ value = rawToken.value;
12
+ } else if (typeof rawToken.value === 'number') {
13
+ value = rawToken.value.toString();
14
+ } else {
15
+ // If it's a box shadow, it'll be an array of values that needs to be
16
+ // formatted to look like '0px 0px 8px #091e4229, 0px 0px 1px #091e421F'
17
+ value = rawToken.value.reduce((prev, curr, index) => {
18
+ let value = `${curr.offset.x}px ${curr.offset.y}px ${curr.radius}px ${curr.color}`;
19
+ if (index === 0) {
20
+ value += `, `;
21
+ }
22
+ return prev + value;
23
+ }, '');
24
+ }
25
+ return {
26
+ ...formatted,
27
+ [rawToken.cleanName]: value
28
+ };
29
+ }, {});
30
+ };
31
+ const lightValues = getThemeValues('light');
32
+ const legacyLightValues = getThemeValues('legacy-light');
4
33
  export default function plugin() {
5
34
  return {
6
35
  visitor: {
@@ -37,7 +66,7 @@ export default function plugin() {
37
66
  // if no fallback is set, optionally find one from the default theme
38
67
  if (path.node.arguments.length < 2) {
39
68
  if (state.opts.shouldUseAutoFallback) {
40
- replacementNode = t.stringLiteral(`var(${cssTokenValue}, ${getDefaultFallback(tokenName)})`);
69
+ replacementNode = t.stringLiteral(`var(${cssTokenValue}, ${getDefaultFallback(tokenName, state.opts.defaultTheme)})`);
41
70
  } else {
42
71
  replacementNode = t.stringLiteral(`var(${cssTokenValue})`);
43
72
  }
@@ -101,8 +130,9 @@ export default function plugin() {
101
130
  }
102
131
  };
103
132
  }
104
- function getDefaultFallback(tokenName) {
105
- return tokenDefaultValues[tokenName];
133
+ function getDefaultFallback(tokenName, theme = 'light') {
134
+ const tokens = theme === 'legacy-light' ? legacyLightValues : lightValues;
135
+ return tokens[tokenName];
106
136
  }
107
137
  function getNonAliasedImportName(node) {
108
138
  if (t.isIdentifier(node.imported)) {
@@ -1,7 +1,6 @@
1
1
  export const THEME_DATA_ATTRIBUTE = 'data-theme';
2
2
  export const COLOR_MODE_ATTRIBUTE = 'data-color-mode';
3
3
  export const CUSTOM_THEME_ATTRIBUTE = 'data-custom-theme';
4
- export const DEFAULT_THEME = 'light';
5
4
  export const CSS_PREFIX = 'ds';
6
5
  export const CSS_VAR_FULL = ['opacity', 'font', 'space', 'border'];
7
6
  export const TOKEN_NOT_FOUND_CSS_VAR = `--${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
  const name = "@atlaskit/tokens";
4
- const version = "1.14.1";
4
+ const 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.
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
2
2
  import tokens from './artifacts/token-names';
3
3
  import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
4
4
  const name = "@atlaskit/tokens";
5
- const version = "1.14.1";
5
+ const 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,5 +1,45 @@
1
+ const letterSpacingScale = {
2
+ letterSpacing: {
3
+ LetterSpacing0: {
4
+ value: '0',
5
+ attributes: {
6
+ group: 'typography'
7
+ }
8
+ },
9
+ LetterSpacing100: {
10
+ value: '-0.003em',
11
+ attributes: {
12
+ group: 'typography'
13
+ }
14
+ },
15
+ LetterSpacing200: {
16
+ value: '-0.006em',
17
+ attributes: {
18
+ group: 'typography'
19
+ }
20
+ },
21
+ LetterSpacing300: {
22
+ value: '-0.008em',
23
+ attributes: {
24
+ group: 'typography'
25
+ }
26
+ },
27
+ LetterSpacing400: {
28
+ value: '-0.01em',
29
+ attributes: {
30
+ group: 'typography'
31
+ }
32
+ }
33
+ }
34
+ };
1
35
  const lineHeightScale = {
2
36
  lineHeight: {
37
+ LineHeight1: {
38
+ value: '1',
39
+ attributes: {
40
+ group: 'typography'
41
+ }
42
+ },
3
43
  LineHeight100: {
4
44
  value: 16,
5
45
  attributes: {
@@ -40,25 +80,25 @@ const lineHeightScale = {
40
80
  };
41
81
  const fontWeightScale = {
42
82
  fontWeight: {
43
- FontWeightRegular: {
83
+ FontWeight400: {
44
84
  value: '400',
45
85
  attributes: {
46
86
  group: 'typography'
47
87
  }
48
88
  },
49
- FontWeightMedium: {
89
+ FontWeight500: {
50
90
  value: '500',
51
91
  attributes: {
52
92
  group: 'typography'
53
93
  }
54
94
  },
55
- FontWeightSemiBold: {
95
+ FontWeight600: {
56
96
  value: '600',
57
97
  attributes: {
58
98
  group: 'typography'
59
99
  }
60
100
  },
61
- FontWeightBold: {
101
+ FontWeight700: {
62
102
  value: '700',
63
103
  attributes: {
64
104
  group: 'typography'
@@ -68,14 +108,55 @@ const fontWeightScale = {
68
108
  };
69
109
  const fontFamilyPalette = {
70
110
  fontFamily: {
71
- FontFamilySans: {
72
- value: `-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`,
111
+ FontFamilyCharlie: {
112
+ value: 'Charlie Sans',
113
+ attributes: {
114
+ group: 'typography'
115
+ }
116
+ },
117
+ LegacyFontFamilyWebSans: {
118
+ value: `-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif`,
119
+ attributes: {
120
+ group: 'typography'
121
+ }
122
+ },
123
+ /**
124
+ * @see https://infinnie.github.io/blog/2017/systemui.html
125
+ * @see https://github.com/twbs/bootstrap/pull/22377
126
+ * @see https://fonts.google.com/knowledge/glossary/system_font_web_safe_font
127
+ */
128
+ FontFamilyWebSans: {
129
+ value: `ui-sans-serif, \"Segoe UI\", system-ui, Ubuntu, \"Helvetica Neue\", sans-serif`,
73
130
  attributes: {
74
131
  group: 'typography'
75
132
  }
76
133
  },
77
- FontFamilyMonospace: {
78
- value: `"SFMono-Medium", "SF Mono", "Segoe UI Mono", "Roboto Mono", "Ubuntu Mono", Menlo, Consolas, Courier, monospace`,
134
+ FontFamilyiOSSans: {
135
+ value: 'SF Pro',
136
+ attributes: {
137
+ group: 'typography'
138
+ }
139
+ },
140
+ FontFamilyAndroidSans: {
141
+ value: 'Roboto',
142
+ attributes: {
143
+ group: 'typography'
144
+ }
145
+ },
146
+ FontFamilyWebMono: {
147
+ value: `ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace`,
148
+ attributes: {
149
+ group: 'typography'
150
+ }
151
+ },
152
+ FontFamilyiOSMono: {
153
+ value: 'SF Mono',
154
+ attributes: {
155
+ group: 'typography'
156
+ }
157
+ },
158
+ FontFamilyAndroidMono: {
159
+ value: 'Roboto Mono',
79
160
  attributes: {
80
161
  group: 'typography'
81
162
  }
@@ -84,53 +165,77 @@ const fontFamilyPalette = {
84
165
  };
85
166
  const fontSizeScale = {
86
167
  fontSize: {
87
- FontSize050: {
168
+ FontSizeCode: {
169
+ value: '0.875em',
170
+ attributes: {
171
+ group: 'typography'
172
+ }
173
+ },
174
+ FontSize11: {
88
175
  value: 11,
89
176
  attributes: {
90
177
  group: 'typography'
91
178
  }
92
179
  },
93
- FontSize075: {
180
+ FontSize12: {
94
181
  value: 12,
95
182
  attributes: {
96
183
  group: 'typography'
97
184
  }
98
185
  },
99
- FontSize100: {
186
+ FontSize14: {
100
187
  value: 14,
101
188
  attributes: {
102
189
  group: 'typography'
103
190
  }
104
191
  },
105
- FontSize200: {
192
+ FontSize16: {
106
193
  value: 16,
107
194
  attributes: {
108
195
  group: 'typography'
109
196
  }
110
197
  },
111
- FontSize300: {
198
+ FontSize20: {
112
199
  value: 20,
113
200
  attributes: {
114
201
  group: 'typography'
115
202
  }
116
203
  },
117
- FontSize400: {
204
+ FontSize24: {
118
205
  value: 24,
119
206
  attributes: {
120
207
  group: 'typography'
121
208
  }
122
209
  },
123
- FontSize500: {
210
+ FontSize28: {
211
+ value: 28,
212
+ attributes: {
213
+ group: 'typography'
214
+ }
215
+ },
216
+ LegacyFontSize29: {
124
217
  value: 29,
125
218
  attributes: {
126
219
  group: 'typography'
127
220
  }
128
221
  },
129
- FontSize600: {
222
+ LegacyFontSize35: {
130
223
  value: 35,
131
224
  attributes: {
132
225
  group: 'typography'
133
226
  }
227
+ },
228
+ FontSize36: {
229
+ value: 36,
230
+ attributes: {
231
+ group: 'typography'
232
+ }
233
+ },
234
+ FontSize48: {
235
+ value: 48,
236
+ attributes: {
237
+ group: 'typography'
238
+ }
134
239
  }
135
240
  }
136
241
  };
@@ -139,7 +244,8 @@ const typographyPalette = {
139
244
  ...fontSizeScale,
140
245
  ...fontWeightScale,
141
246
  ...fontFamilyPalette,
142
- ...lineHeightScale
247
+ ...lineHeightScale,
248
+ ...letterSpacingScale
143
249
  }
144
250
  };
145
251
  export default typographyPalette;
@@ -34,7 +34,7 @@ export const themeColorModes = ['light', 'dark', 'auto'];
34
34
  *
35
35
  * These ids must be kebab case
36
36
  */
37
- export const themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape'];
37
+ export const 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 @@ const themeConfig = {
104
104
  type: 'spacing'
105
105
  }
106
106
  },
107
- 'atlassian-typography': {
108
- id: 'typography',
109
- displayName: 'Atlassian Typography',
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 @@ const 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 @@ const font = {
2
2
  font: {
3
3
  family: {
4
4
  sans: {
5
- value: 'FontFamilySans'
5
+ value: 'FontFamilyWebSans'
6
6
  },
7
7
  monospace: {
8
- value: 'FontFamilyMonospace'
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
+ const 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
+ const 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
+ const 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
+ const 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
+ const 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;
@@ -1,6 +1,9 @@
1
1
  const font = {
2
2
  font: {
3
3
  lineHeight: {
4
+ '1': {
5
+ value: 'LineHeight1'
6
+ },
4
7
  '100': {
5
8
  value: 'LineHeight100'
6
9
  },