@atlaskit/tokens 3.1.0 → 3.3.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 +27 -0
- package/dist/cjs/artifacts/themes/atlassian-typography-modernized.js +2 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-modernized.js +17 -17
- package/dist/cjs/get-token-analytics.js +57 -0
- package/dist/cjs/get-token.js +4 -0
- package/dist/es2019/artifacts/themes/atlassian-typography-modernized.js +9 -9
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-modernized.js +17 -17
- package/dist/es2019/get-token-analytics.js +37 -0
- package/dist/es2019/get-token.js +4 -0
- package/dist/esm/artifacts/themes/atlassian-typography-modernized.js +2 -2
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-modernized.js +17 -17
- package/dist/esm/get-token-analytics.js +50 -0
- package/dist/esm/get-token.js +4 -0
- package/dist/types/artifacts/themes/atlassian-typography-modernized.d.ts +2 -2
- package/dist/types/artifacts/tokens-raw/atlassian-typography-modernized.d.ts +1 -1
- package/dist/types/get-token-analytics.d.ts +11 -0
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography-modernized.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-modernized.d.ts +1 -1
- package/dist/types-ts4.5/get-token-analytics.d.ts +11 -0
- package/figma/atlassian-typography-modernized.json +1 -1
- package/package.json +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 3.2.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#102495](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102495)
|
|
20
|
+
[`cf97e4ada8d52`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cf97e4ada8d52) -
|
|
21
|
+
Modernized typography theme now applies a font weight of 653 for bold instead of 700. This
|
|
22
|
+
includes heading tokens and the individual `font.weight.bold` token.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [#105744](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105744)
|
|
27
|
+
[`bc9ed5e4ee94d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc9ed5e4ee94d) -
|
|
28
|
+
Updated 'ak-postbuild' script to also build '@atlaskit/platform-feature-flags'
|
|
29
|
+
|
|
3
30
|
## 3.1.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::04ce6f89b744c2a0ec7cf592807e1ba2>>
|
|
10
10
|
* @codegenCommand yarn build tokens
|
|
11
11
|
*/
|
|
12
|
-
var _default = exports.default = "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal
|
|
12
|
+
var _default = exports.default = "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal 653 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xlarge: normal 653 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-large: normal 653 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-medium: normal 653 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-small: normal 653 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xsmall: normal 653 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xxsmall: normal 653 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-UNSAFE_small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-code: normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-weight-regular: 400;\n --ds-font-weight-medium: 500;\n --ds-font-weight-semibold: 600;\n --ds-font-weight-bold: 653;\n --ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-code: ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-family-brand-heading: \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-brand-body: \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n}\n";
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::355fb0bf4ef3f45e232f8637a1fa195f>>
|
|
10
10
|
* @codegenCommand yarn build tokens
|
|
11
11
|
*/
|
|
12
12
|
var tokens = [{
|
|
@@ -38,7 +38,7 @@ var tokens = [{
|
|
|
38
38
|
"introduced": "1.14.0",
|
|
39
39
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
40
40
|
},
|
|
41
|
-
"value": "normal
|
|
41
|
+
"value": "normal 653 32px/36px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
42
42
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
43
43
|
"isSource": true,
|
|
44
44
|
"original": {
|
|
@@ -49,7 +49,7 @@ var tokens = [{
|
|
|
49
49
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
50
50
|
},
|
|
51
51
|
"value": {
|
|
52
|
-
"fontWeight": "
|
|
52
|
+
"fontWeight": "FontWeight653",
|
|
53
53
|
"fontSize": "FontSize32",
|
|
54
54
|
"lineHeight": "LineHeight36",
|
|
55
55
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -67,7 +67,7 @@ var tokens = [{
|
|
|
67
67
|
"introduced": "1.14.0",
|
|
68
68
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
69
69
|
},
|
|
70
|
-
"value": "normal
|
|
70
|
+
"value": "normal 653 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
71
71
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
72
72
|
"isSource": true,
|
|
73
73
|
"original": {
|
|
@@ -78,7 +78,7 @@ var tokens = [{
|
|
|
78
78
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
79
79
|
},
|
|
80
80
|
"value": {
|
|
81
|
-
"fontWeight": "
|
|
81
|
+
"fontWeight": "FontWeight653",
|
|
82
82
|
"fontSize": "FontSize28",
|
|
83
83
|
"lineHeight": "LineHeight32",
|
|
84
84
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -96,7 +96,7 @@ var tokens = [{
|
|
|
96
96
|
"introduced": "1.14.0",
|
|
97
97
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
98
98
|
},
|
|
99
|
-
"value": "normal
|
|
99
|
+
"value": "normal 653 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
100
100
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
101
101
|
"isSource": true,
|
|
102
102
|
"original": {
|
|
@@ -107,7 +107,7 @@ var tokens = [{
|
|
|
107
107
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
108
108
|
},
|
|
109
109
|
"value": {
|
|
110
|
-
"fontWeight": "
|
|
110
|
+
"fontWeight": "FontWeight653",
|
|
111
111
|
"fontSize": "FontSize24",
|
|
112
112
|
"lineHeight": "LineHeight28",
|
|
113
113
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -125,7 +125,7 @@ var tokens = [{
|
|
|
125
125
|
"introduced": "1.14.0",
|
|
126
126
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
127
127
|
},
|
|
128
|
-
"value": "normal
|
|
128
|
+
"value": "normal 653 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
129
129
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
130
130
|
"isSource": true,
|
|
131
131
|
"original": {
|
|
@@ -136,7 +136,7 @@ var tokens = [{
|
|
|
136
136
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
137
137
|
},
|
|
138
138
|
"value": {
|
|
139
|
-
"fontWeight": "
|
|
139
|
+
"fontWeight": "FontWeight653",
|
|
140
140
|
"fontSize": "FontSize20",
|
|
141
141
|
"lineHeight": "LineHeight24",
|
|
142
142
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -154,7 +154,7 @@ var tokens = [{
|
|
|
154
154
|
"introduced": "1.14.0",
|
|
155
155
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
156
156
|
},
|
|
157
|
-
"value": "normal
|
|
157
|
+
"value": "normal 653 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
158
158
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
159
159
|
"isSource": true,
|
|
160
160
|
"original": {
|
|
@@ -165,7 +165,7 @@ var tokens = [{
|
|
|
165
165
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
166
166
|
},
|
|
167
167
|
"value": {
|
|
168
|
-
"fontWeight": "
|
|
168
|
+
"fontWeight": "FontWeight653",
|
|
169
169
|
"fontSize": "FontSize16",
|
|
170
170
|
"lineHeight": "LineHeight20",
|
|
171
171
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -183,7 +183,7 @@ var tokens = [{
|
|
|
183
183
|
"introduced": "1.14.0",
|
|
184
184
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
185
185
|
},
|
|
186
|
-
"value": "normal
|
|
186
|
+
"value": "normal 653 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
187
187
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
188
188
|
"isSource": true,
|
|
189
189
|
"original": {
|
|
@@ -194,7 +194,7 @@ var tokens = [{
|
|
|
194
194
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
195
195
|
},
|
|
196
196
|
"value": {
|
|
197
|
-
"fontWeight": "
|
|
197
|
+
"fontWeight": "FontWeight653",
|
|
198
198
|
"fontSize": "FontSize14",
|
|
199
199
|
"lineHeight": "LineHeight20",
|
|
200
200
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -212,7 +212,7 @@ var tokens = [{
|
|
|
212
212
|
"introduced": "1.14.0",
|
|
213
213
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
214
214
|
},
|
|
215
|
-
"value": "normal
|
|
215
|
+
"value": "normal 653 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
216
216
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
217
217
|
"isSource": true,
|
|
218
218
|
"original": {
|
|
@@ -223,7 +223,7 @@ var tokens = [{
|
|
|
223
223
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
224
224
|
},
|
|
225
225
|
"value": {
|
|
226
|
-
"fontWeight": "
|
|
226
|
+
"fontWeight": "FontWeight653",
|
|
227
227
|
"fontSize": "FontSize12",
|
|
228
228
|
"lineHeight": "LineHeight16",
|
|
229
229
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -452,7 +452,7 @@ var tokens = [{
|
|
|
452
452
|
"introduced": "0.10.33",
|
|
453
453
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
454
454
|
},
|
|
455
|
-
"value": "
|
|
455
|
+
"value": "653",
|
|
456
456
|
"filePath": "schema/themes/atlassian-typography-modernized/font-weight.tsx",
|
|
457
457
|
"isSource": true,
|
|
458
458
|
"original": {
|
|
@@ -462,7 +462,7 @@ var tokens = [{
|
|
|
462
462
|
"introduced": "0.10.33",
|
|
463
463
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
464
464
|
},
|
|
465
|
-
"value": "
|
|
465
|
+
"value": "FontWeight653"
|
|
466
466
|
},
|
|
467
467
|
"name": "font.weight.bold",
|
|
468
468
|
"path": ["font", "weight", "bold"],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.recordTokenCall = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
// Extend the Window interface to include optional analyticsWebClient
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Records a token call event to the analytics service. This is used to track which tokens are being used at runtime as they should be substituted by the values by @atlaskit/tokens/babel-plugin at build time.
|
|
14
|
+
* @param token - The token that was called.
|
|
15
|
+
* @param fallback - The fallback value that was used.
|
|
16
|
+
*/
|
|
17
|
+
var recordTokenCall = exports.recordTokenCall = /*#__PURE__*/function () {
|
|
18
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(token, fallback) {
|
|
19
|
+
var _window, analyticsClient, isThemeEnabled;
|
|
20
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
21
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
try {
|
|
24
|
+
// TODO: window.analyticsWebClient is a property specific to Jira. It is not available in the other products. We might consider to register a dedicated analytics client for logging token calls for each product to enable cohesive experience across different products.
|
|
25
|
+
analyticsClient = (_window = window) === null || _window === void 0 ? void 0 : _window.analyticsWebClient;
|
|
26
|
+
if (analyticsClient) {
|
|
27
|
+
// Check for a <style> element with a data-theme attribute in the document
|
|
28
|
+
isThemeEnabled = !!document.querySelector('style[data-theme]'); // when such property exists, we are using it to send this event https://data-portal.internal.atlassian.com/analytics/registry/75682 which is registered specifically for Jira.
|
|
29
|
+
analyticsClient.sendEvent({
|
|
30
|
+
type: 'TRACK',
|
|
31
|
+
payload: {
|
|
32
|
+
action: 'called_at_runtime',
|
|
33
|
+
actionSubject: 'token',
|
|
34
|
+
source: 'design-system',
|
|
35
|
+
attributes: {
|
|
36
|
+
url: window.location.href,
|
|
37
|
+
token: token,
|
|
38
|
+
fallback: fallback,
|
|
39
|
+
isThemeEnabled: isThemeEnabled
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
} catch (e) {
|
|
45
|
+
// eslint-disable-next-line no-console
|
|
46
|
+
console.error(e);
|
|
47
|
+
}
|
|
48
|
+
case 1:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
return function recordTokenCall(_x, _x2) {
|
|
55
|
+
return _ref.apply(this, arguments);
|
|
56
|
+
};
|
|
57
|
+
}();
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -9,6 +9,7 @@ var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
10
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
11
11
|
var _constants = require("./constants");
|
|
12
|
+
var _getTokenAnalytics = require("./get-token-analytics");
|
|
12
13
|
/**
|
|
13
14
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
14
15
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -32,6 +33,9 @@ var _constants = require("./constants");
|
|
|
32
33
|
*
|
|
33
34
|
*/
|
|
34
35
|
function token(path, fallback) {
|
|
36
|
+
if ((0, _platformFeatureFlags.fg)('platform-token-runtime-call-tracking')) {
|
|
37
|
+
(0, _getTokenAnalytics.recordTokenCall)(path, fallback);
|
|
38
|
+
}
|
|
35
39
|
var token = _tokenNames.default[path];
|
|
36
40
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production') {
|
|
37
41
|
if (!token) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::04ce6f89b744c2a0ec7cf592807e1ba2>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
export default `
|
|
7
7
|
html[data-theme~="typography:typography-modernized"] {
|
|
8
8
|
--ds-UNSAFE-textTransformUppercase: uppercase;
|
|
9
|
-
--ds-font-heading-xxlarge: normal
|
|
10
|
-
--ds-font-heading-xlarge: normal
|
|
11
|
-
--ds-font-heading-large: normal
|
|
12
|
-
--ds-font-heading-medium: normal
|
|
13
|
-
--ds-font-heading-small: normal
|
|
14
|
-
--ds-font-heading-xsmall: normal
|
|
15
|
-
--ds-font-heading-xxsmall: normal
|
|
9
|
+
--ds-font-heading-xxlarge: normal 653 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
10
|
+
--ds-font-heading-xlarge: normal 653 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
11
|
+
--ds-font-heading-large: normal 653 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
12
|
+
--ds-font-heading-medium: normal 653 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
13
|
+
--ds-font-heading-small: normal 653 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
14
|
+
--ds-font-heading-xsmall: normal 653 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
15
|
+
--ds-font-heading-xxsmall: normal 653 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
16
16
|
--ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
17
17
|
--ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
18
18
|
--ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
@@ -21,7 +21,7 @@ html[data-theme~="typography:typography-modernized"] {
|
|
|
21
21
|
--ds-font-weight-regular: 400;
|
|
22
22
|
--ds-font-weight-medium: 500;
|
|
23
23
|
--ds-font-weight-semibold: 600;
|
|
24
|
-
--ds-font-weight-bold:
|
|
24
|
+
--ds-font-weight-bold: 653;
|
|
25
25
|
--ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
26
26
|
--ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
27
27
|
--ds-font-family-code: ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::355fb0bf4ef3f45e232f8637a1fa195f>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
const tokens = [{
|
|
@@ -32,7 +32,7 @@ const tokens = [{
|
|
|
32
32
|
"introduced": "1.14.0",
|
|
33
33
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
34
34
|
},
|
|
35
|
-
"value": "normal
|
|
35
|
+
"value": "normal 653 32px/36px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
36
36
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
37
37
|
"isSource": true,
|
|
38
38
|
"original": {
|
|
@@ -43,7 +43,7 @@ const tokens = [{
|
|
|
43
43
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
44
44
|
},
|
|
45
45
|
"value": {
|
|
46
|
-
"fontWeight": "
|
|
46
|
+
"fontWeight": "FontWeight653",
|
|
47
47
|
"fontSize": "FontSize32",
|
|
48
48
|
"lineHeight": "LineHeight36",
|
|
49
49
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -61,7 +61,7 @@ const tokens = [{
|
|
|
61
61
|
"introduced": "1.14.0",
|
|
62
62
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
63
63
|
},
|
|
64
|
-
"value": "normal
|
|
64
|
+
"value": "normal 653 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
65
65
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
66
66
|
"isSource": true,
|
|
67
67
|
"original": {
|
|
@@ -72,7 +72,7 @@ const tokens = [{
|
|
|
72
72
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
73
73
|
},
|
|
74
74
|
"value": {
|
|
75
|
-
"fontWeight": "
|
|
75
|
+
"fontWeight": "FontWeight653",
|
|
76
76
|
"fontSize": "FontSize28",
|
|
77
77
|
"lineHeight": "LineHeight32",
|
|
78
78
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -90,7 +90,7 @@ const tokens = [{
|
|
|
90
90
|
"introduced": "1.14.0",
|
|
91
91
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
92
92
|
},
|
|
93
|
-
"value": "normal
|
|
93
|
+
"value": "normal 653 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
94
94
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
95
95
|
"isSource": true,
|
|
96
96
|
"original": {
|
|
@@ -101,7 +101,7 @@ const tokens = [{
|
|
|
101
101
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
102
102
|
},
|
|
103
103
|
"value": {
|
|
104
|
-
"fontWeight": "
|
|
104
|
+
"fontWeight": "FontWeight653",
|
|
105
105
|
"fontSize": "FontSize24",
|
|
106
106
|
"lineHeight": "LineHeight28",
|
|
107
107
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -119,7 +119,7 @@ const tokens = [{
|
|
|
119
119
|
"introduced": "1.14.0",
|
|
120
120
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
121
121
|
},
|
|
122
|
-
"value": "normal
|
|
122
|
+
"value": "normal 653 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
123
123
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
124
124
|
"isSource": true,
|
|
125
125
|
"original": {
|
|
@@ -130,7 +130,7 @@ const tokens = [{
|
|
|
130
130
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
131
131
|
},
|
|
132
132
|
"value": {
|
|
133
|
-
"fontWeight": "
|
|
133
|
+
"fontWeight": "FontWeight653",
|
|
134
134
|
"fontSize": "FontSize20",
|
|
135
135
|
"lineHeight": "LineHeight24",
|
|
136
136
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -148,7 +148,7 @@ const tokens = [{
|
|
|
148
148
|
"introduced": "1.14.0",
|
|
149
149
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
150
150
|
},
|
|
151
|
-
"value": "normal
|
|
151
|
+
"value": "normal 653 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
152
152
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
153
153
|
"isSource": true,
|
|
154
154
|
"original": {
|
|
@@ -159,7 +159,7 @@ const tokens = [{
|
|
|
159
159
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
160
160
|
},
|
|
161
161
|
"value": {
|
|
162
|
-
"fontWeight": "
|
|
162
|
+
"fontWeight": "FontWeight653",
|
|
163
163
|
"fontSize": "FontSize16",
|
|
164
164
|
"lineHeight": "LineHeight20",
|
|
165
165
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -177,7 +177,7 @@ const tokens = [{
|
|
|
177
177
|
"introduced": "1.14.0",
|
|
178
178
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
179
179
|
},
|
|
180
|
-
"value": "normal
|
|
180
|
+
"value": "normal 653 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
181
181
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
182
182
|
"isSource": true,
|
|
183
183
|
"original": {
|
|
@@ -188,7 +188,7 @@ const tokens = [{
|
|
|
188
188
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
189
189
|
},
|
|
190
190
|
"value": {
|
|
191
|
-
"fontWeight": "
|
|
191
|
+
"fontWeight": "FontWeight653",
|
|
192
192
|
"fontSize": "FontSize14",
|
|
193
193
|
"lineHeight": "LineHeight20",
|
|
194
194
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -206,7 +206,7 @@ const tokens = [{
|
|
|
206
206
|
"introduced": "1.14.0",
|
|
207
207
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
208
208
|
},
|
|
209
|
-
"value": "normal
|
|
209
|
+
"value": "normal 653 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
210
210
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
211
211
|
"isSource": true,
|
|
212
212
|
"original": {
|
|
@@ -217,7 +217,7 @@ const tokens = [{
|
|
|
217
217
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
218
218
|
},
|
|
219
219
|
"value": {
|
|
220
|
-
"fontWeight": "
|
|
220
|
+
"fontWeight": "FontWeight653",
|
|
221
221
|
"fontSize": "FontSize12",
|
|
222
222
|
"lineHeight": "LineHeight16",
|
|
223
223
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -446,7 +446,7 @@ const tokens = [{
|
|
|
446
446
|
"introduced": "0.10.33",
|
|
447
447
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
448
448
|
},
|
|
449
|
-
"value": "
|
|
449
|
+
"value": "653",
|
|
450
450
|
"filePath": "schema/themes/atlassian-typography-modernized/font-weight.tsx",
|
|
451
451
|
"isSource": true,
|
|
452
452
|
"original": {
|
|
@@ -456,7 +456,7 @@ const tokens = [{
|
|
|
456
456
|
"introduced": "0.10.33",
|
|
457
457
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
458
458
|
},
|
|
459
|
-
"value": "
|
|
459
|
+
"value": "FontWeight653"
|
|
460
460
|
},
|
|
461
461
|
"name": "font.weight.bold",
|
|
462
462
|
"path": ["font", "weight", "bold"],
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Extend the Window interface to include optional analyticsWebClient
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Records a token call event to the analytics service. This is used to track which tokens are being used at runtime as they should be substituted by the values by @atlaskit/tokens/babel-plugin at build time.
|
|
5
|
+
* @param token - The token that was called.
|
|
6
|
+
* @param fallback - The fallback value that was used.
|
|
7
|
+
*/
|
|
8
|
+
export const recordTokenCall = async (token, fallback) => {
|
|
9
|
+
try {
|
|
10
|
+
var _window;
|
|
11
|
+
// TODO: window.analyticsWebClient is a property specific to Jira. It is not available in the other products. We might consider to register a dedicated analytics client for logging token calls for each product to enable cohesive experience across different products.
|
|
12
|
+
const analyticsClient = (_window = window) === null || _window === void 0 ? void 0 : _window.analyticsWebClient;
|
|
13
|
+
if (analyticsClient) {
|
|
14
|
+
// Check for a <style> element with a data-theme attribute in the document
|
|
15
|
+
const isThemeEnabled = !!document.querySelector('style[data-theme]');
|
|
16
|
+
|
|
17
|
+
// when such property exists, we are using it to send this event https://data-portal.internal.atlassian.com/analytics/registry/75682 which is registered specifically for Jira.
|
|
18
|
+
analyticsClient.sendEvent({
|
|
19
|
+
type: 'TRACK',
|
|
20
|
+
payload: {
|
|
21
|
+
action: 'called_at_runtime',
|
|
22
|
+
actionSubject: 'token',
|
|
23
|
+
source: 'design-system',
|
|
24
|
+
attributes: {
|
|
25
|
+
url: window.location.href,
|
|
26
|
+
token,
|
|
27
|
+
fallback,
|
|
28
|
+
isThemeEnabled
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.error(e);
|
|
36
|
+
}
|
|
37
|
+
};
|
package/dist/es2019/get-token.js
CHANGED
|
@@ -2,6 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import tokens from './artifacts/token-names';
|
|
4
4
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
5
|
+
import { recordTokenCall } from './get-token-analytics';
|
|
5
6
|
/**
|
|
6
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
7
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -25,6 +26,9 @@ import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
|
25
26
|
*
|
|
26
27
|
*/
|
|
27
28
|
function token(path, fallback) {
|
|
29
|
+
if (fg('platform-token-runtime-call-tracking')) {
|
|
30
|
+
recordTokenCall(path, fallback);
|
|
31
|
+
}
|
|
28
32
|
let token = tokens[path];
|
|
29
33
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production') {
|
|
30
34
|
if (!token) {
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::04ce6f89b744c2a0ec7cf592807e1ba2>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
|
-
export default "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal
|
|
6
|
+
export default "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal 653 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xlarge: normal 653 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-large: normal 653 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-medium: normal 653 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-small: normal 653 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xsmall: normal 653 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xxsmall: normal 653 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-UNSAFE_small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-code: normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-weight-regular: 400;\n --ds-font-weight-medium: 500;\n --ds-font-weight-semibold: 600;\n --ds-font-weight-bold: 653;\n --ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-code: ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-family-brand-heading: \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-brand-body: \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n}\n";
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::355fb0bf4ef3f45e232f8637a1fa195f>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
var tokens = [{
|
|
@@ -32,7 +32,7 @@ var tokens = [{
|
|
|
32
32
|
"introduced": "1.14.0",
|
|
33
33
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
34
34
|
},
|
|
35
|
-
"value": "normal
|
|
35
|
+
"value": "normal 653 32px/36px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
36
36
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
37
37
|
"isSource": true,
|
|
38
38
|
"original": {
|
|
@@ -43,7 +43,7 @@ var tokens = [{
|
|
|
43
43
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H900 to Heading XXL."
|
|
44
44
|
},
|
|
45
45
|
"value": {
|
|
46
|
-
"fontWeight": "
|
|
46
|
+
"fontWeight": "FontWeight653",
|
|
47
47
|
"fontSize": "FontSize32",
|
|
48
48
|
"lineHeight": "LineHeight36",
|
|
49
49
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -61,7 +61,7 @@ var tokens = [{
|
|
|
61
61
|
"introduced": "1.14.0",
|
|
62
62
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
63
63
|
},
|
|
64
|
-
"value": "normal
|
|
64
|
+
"value": "normal 653 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
65
65
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
66
66
|
"isSource": true,
|
|
67
67
|
"original": {
|
|
@@ -72,7 +72,7 @@ var tokens = [{
|
|
|
72
72
|
"description": "For overlapping brand with product promotions, such as marketplace content. Migrate instances of H800 to Heading XL."
|
|
73
73
|
},
|
|
74
74
|
"value": {
|
|
75
|
-
"fontWeight": "
|
|
75
|
+
"fontWeight": "FontWeight653",
|
|
76
76
|
"fontSize": "FontSize28",
|
|
77
77
|
"lineHeight": "LineHeight32",
|
|
78
78
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -90,7 +90,7 @@ var tokens = [{
|
|
|
90
90
|
"introduced": "1.14.0",
|
|
91
91
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
92
92
|
},
|
|
93
|
-
"value": "normal
|
|
93
|
+
"value": "normal 653 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
94
94
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
95
95
|
"isSource": true,
|
|
96
96
|
"original": {
|
|
@@ -101,7 +101,7 @@ var tokens = [{
|
|
|
101
101
|
"description": "Product page titles, such as forms. Migrate instances of H700 to Heading L."
|
|
102
102
|
},
|
|
103
103
|
"value": {
|
|
104
|
-
"fontWeight": "
|
|
104
|
+
"fontWeight": "FontWeight653",
|
|
105
105
|
"fontSize": "FontSize24",
|
|
106
106
|
"lineHeight": "LineHeight28",
|
|
107
107
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -119,7 +119,7 @@ var tokens = [{
|
|
|
119
119
|
"introduced": "1.14.0",
|
|
120
120
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
121
121
|
},
|
|
122
|
-
"value": "normal
|
|
122
|
+
"value": "normal 653 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
123
123
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
124
124
|
"isSource": true,
|
|
125
125
|
"original": {
|
|
@@ -130,7 +130,7 @@ var tokens = [{
|
|
|
130
130
|
"description": "Headers in large components, such as modal dialogs. Migrate instances of H600 to Heading M."
|
|
131
131
|
},
|
|
132
132
|
"value": {
|
|
133
|
-
"fontWeight": "
|
|
133
|
+
"fontWeight": "FontWeight653",
|
|
134
134
|
"fontSize": "FontSize20",
|
|
135
135
|
"lineHeight": "LineHeight24",
|
|
136
136
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -148,7 +148,7 @@ var tokens = [{
|
|
|
148
148
|
"introduced": "1.14.0",
|
|
149
149
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
150
150
|
},
|
|
151
|
-
"value": "normal
|
|
151
|
+
"value": "normal 653 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
152
152
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
153
153
|
"isSource": true,
|
|
154
154
|
"original": {
|
|
@@ -159,7 +159,7 @@ var tokens = [{
|
|
|
159
159
|
"description": "For headers in small components where space is limited. Migrate instances of H500 to Heading S."
|
|
160
160
|
},
|
|
161
161
|
"value": {
|
|
162
|
-
"fontWeight": "
|
|
162
|
+
"fontWeight": "FontWeight653",
|
|
163
163
|
"fontSize": "FontSize16",
|
|
164
164
|
"lineHeight": "LineHeight20",
|
|
165
165
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -177,7 +177,7 @@ var tokens = [{
|
|
|
177
177
|
"introduced": "1.14.0",
|
|
178
178
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
179
179
|
},
|
|
180
|
-
"value": "normal
|
|
180
|
+
"value": "normal 653 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
181
181
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
182
182
|
"isSource": true,
|
|
183
183
|
"original": {
|
|
@@ -188,7 +188,7 @@ var tokens = [{
|
|
|
188
188
|
"description": "For headers in small components where space is limited. Migrate instances of H400 to Heading XS."
|
|
189
189
|
},
|
|
190
190
|
"value": {
|
|
191
|
-
"fontWeight": "
|
|
191
|
+
"fontWeight": "FontWeight653",
|
|
192
192
|
"fontSize": "FontSize14",
|
|
193
193
|
"lineHeight": "LineHeight20",
|
|
194
194
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -206,7 +206,7 @@ var tokens = [{
|
|
|
206
206
|
"introduced": "1.14.0",
|
|
207
207
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
208
208
|
},
|
|
209
|
-
"value": "normal
|
|
209
|
+
"value": "normal 653 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
210
210
|
"filePath": "schema/themes/atlassian-typography-modernized/theme.tsx",
|
|
211
211
|
"isSource": true,
|
|
212
212
|
"original": {
|
|
@@ -217,7 +217,7 @@ var tokens = [{
|
|
|
217
217
|
"description": "For headers in fine print or tight spaces. Use sparingly. Migrate instances of H100, H200 and H300 to Heading XXS."
|
|
218
218
|
},
|
|
219
219
|
"value": {
|
|
220
|
-
"fontWeight": "
|
|
220
|
+
"fontWeight": "FontWeight653",
|
|
221
221
|
"fontSize": "FontSize12",
|
|
222
222
|
"lineHeight": "LineHeight16",
|
|
223
223
|
"fontFamily": "FontFamilyWebSans",
|
|
@@ -446,7 +446,7 @@ var tokens = [{
|
|
|
446
446
|
"introduced": "0.10.33",
|
|
447
447
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
448
448
|
},
|
|
449
|
-
"value": "
|
|
449
|
+
"value": "653",
|
|
450
450
|
"filePath": "schema/themes/atlassian-typography-modernized/font-weight.tsx",
|
|
451
451
|
"isSource": true,
|
|
452
452
|
"original": {
|
|
@@ -456,7 +456,7 @@ var tokens = [{
|
|
|
456
456
|
"introduced": "0.10.33",
|
|
457
457
|
"description": "Use sparingly for emphasising text, such as in a lozenge."
|
|
458
458
|
},
|
|
459
|
-
"value": "
|
|
459
|
+
"value": "FontWeight653"
|
|
460
460
|
},
|
|
461
461
|
"name": "font.weight.bold",
|
|
462
462
|
"path": ["font", "weight", "bold"],
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
// Extend the Window interface to include optional analyticsWebClient
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Records a token call event to the analytics service. This is used to track which tokens are being used at runtime as they should be substituted by the values by @atlaskit/tokens/babel-plugin at build time.
|
|
7
|
+
* @param token - The token that was called.
|
|
8
|
+
* @param fallback - The fallback value that was used.
|
|
9
|
+
*/
|
|
10
|
+
export var recordTokenCall = /*#__PURE__*/function () {
|
|
11
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(token, fallback) {
|
|
12
|
+
var _window, analyticsClient, isThemeEnabled;
|
|
13
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
14
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15
|
+
case 0:
|
|
16
|
+
try {
|
|
17
|
+
// TODO: window.analyticsWebClient is a property specific to Jira. It is not available in the other products. We might consider to register a dedicated analytics client for logging token calls for each product to enable cohesive experience across different products.
|
|
18
|
+
analyticsClient = (_window = window) === null || _window === void 0 ? void 0 : _window.analyticsWebClient;
|
|
19
|
+
if (analyticsClient) {
|
|
20
|
+
// Check for a <style> element with a data-theme attribute in the document
|
|
21
|
+
isThemeEnabled = !!document.querySelector('style[data-theme]'); // when such property exists, we are using it to send this event https://data-portal.internal.atlassian.com/analytics/registry/75682 which is registered specifically for Jira.
|
|
22
|
+
analyticsClient.sendEvent({
|
|
23
|
+
type: 'TRACK',
|
|
24
|
+
payload: {
|
|
25
|
+
action: 'called_at_runtime',
|
|
26
|
+
actionSubject: 'token',
|
|
27
|
+
source: 'design-system',
|
|
28
|
+
attributes: {
|
|
29
|
+
url: window.location.href,
|
|
30
|
+
token: token,
|
|
31
|
+
fallback: fallback,
|
|
32
|
+
isThemeEnabled: isThemeEnabled
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
} catch (e) {
|
|
38
|
+
// eslint-disable-next-line no-console
|
|
39
|
+
console.error(e);
|
|
40
|
+
}
|
|
41
|
+
case 1:
|
|
42
|
+
case "end":
|
|
43
|
+
return _context.stop();
|
|
44
|
+
}
|
|
45
|
+
}, _callee);
|
|
46
|
+
}));
|
|
47
|
+
return function recordTokenCall(_x, _x2) {
|
|
48
|
+
return _ref.apply(this, arguments);
|
|
49
|
+
};
|
|
50
|
+
}();
|
package/dist/esm/get-token.js
CHANGED
|
@@ -2,6 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import tokens from './artifacts/token-names';
|
|
4
4
|
import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
5
|
+
import { recordTokenCall } from './get-token-analytics';
|
|
5
6
|
/**
|
|
6
7
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
7
8
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -25,6 +26,9 @@ import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
|
|
|
25
26
|
*
|
|
26
27
|
*/
|
|
27
28
|
function token(path, fallback) {
|
|
29
|
+
if (fg('platform-token-runtime-call-tracking')) {
|
|
30
|
+
recordTokenCall(path, fallback);
|
|
31
|
+
}
|
|
28
32
|
var token = tokens[path];
|
|
29
33
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production') {
|
|
30
34
|
if (!token) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::04ce6f89b744c2a0ec7cf592807e1ba2>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal
|
|
6
|
+
declare const _default: "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal 653 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xlarge: normal 653 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-large: normal 653 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-medium: normal 653 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-small: normal 653 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xsmall: normal 653 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xxsmall: normal 653 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-UNSAFE_small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-code: normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-weight-regular: 400;\n --ds-font-weight-medium: 500;\n --ds-font-weight-semibold: 600;\n --ds-font-weight-bold: 653;\n --ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-code: ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-family-brand-heading: \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-brand-body: \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n}\n";
|
|
7
7
|
export default _default;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::355fb0bf4ef3f45e232f8637a1fa195f>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
declare const tokens: ({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
analyticsWebClient?: any;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Records a token call event to the analytics service. This is used to track which tokens are being used at runtime as they should be substituted by the values by @atlaskit/tokens/babel-plugin at build time.
|
|
8
|
+
* @param token - The token that was called.
|
|
9
|
+
* @param fallback - The fallback value that was used.
|
|
10
|
+
*/
|
|
11
|
+
export declare const recordTokenCall: <T extends "color.text" | "color.text.accent.lime" | "color.text.accent.lime.bolder" | "color.text.accent.red" | "color.text.accent.red.bolder" | "color.text.accent.orange" | "color.text.accent.orange.bolder" | "color.text.accent.yellow" | "color.text.accent.yellow.bolder" | "color.text.accent.green" | "color.text.accent.green.bolder" | "color.text.accent.teal" | "color.text.accent.teal.bolder" | "color.text.accent.blue" | "color.text.accent.blue.bolder" | "color.text.accent.purple" | "color.text.accent.purple.bolder" | "color.text.accent.magenta" | "color.text.accent.magenta.bolder" | "color.text.accent.gray" | "color.text.accent.gray.bolder" | "color.text.disabled" | "color.text.inverse" | "color.text.selected" | "color.text.brand" | "color.text.danger" | "color.text.warning" | "color.text.warning.inverse" | "color.text.success" | "color.text.discovery" | "color.text.information" | "color.text.subtlest" | "color.text.subtle" | "color.link" | "color.link.pressed" | "color.link.visited" | "color.link.visited.pressed" | "color.icon" | "color.icon.accent.lime" | "color.icon.accent.red" | "color.icon.accent.orange" | "color.icon.accent.yellow" | "color.icon.accent.green" | "color.icon.accent.teal" | "color.icon.accent.blue" | "color.icon.accent.purple" | "color.icon.accent.magenta" | "color.icon.accent.gray" | "color.icon.disabled" | "color.icon.inverse" | "color.icon.selected" | "color.icon.brand" | "color.icon.danger" | "color.icon.warning" | "color.icon.warning.inverse" | "color.icon.success" | "color.icon.discovery" | "color.icon.information" | "color.icon.subtlest" | "color.icon.subtle" | "color.border" | "color.border.accent.lime" | "color.border.accent.red" | "color.border.accent.orange" | "color.border.accent.yellow" | "color.border.accent.green" | "color.border.accent.teal" | "color.border.accent.blue" | "color.border.accent.purple" | "color.border.accent.magenta" | "color.border.accent.gray" | "color.border.disabled" | "color.border.focused" | "color.border.input" | "color.border.inverse" | "color.border.selected" | "color.border.brand" | "color.border.danger" | "color.border.warning" | "color.border.success" | "color.border.discovery" | "color.border.information" | "color.border.bold" | "color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "color.interaction.hovered" | "color.interaction.pressed" | "color.skeleton" | "color.skeleton.subtle" | "color.chart.categorical.1" | "color.chart.categorical.1.hovered" | "color.chart.categorical.2" | "color.chart.categorical.2.hovered" | "color.chart.categorical.3" | "color.chart.categorical.3.hovered" | "color.chart.categorical.4" | "color.chart.categorical.4.hovered" | "color.chart.categorical.5" | "color.chart.categorical.5.hovered" | "color.chart.categorical.6" | "color.chart.categorical.6.hovered" | "color.chart.categorical.7" | "color.chart.categorical.7.hovered" | "color.chart.categorical.8" | "color.chart.categorical.8.hovered" | "color.chart.lime.bold" | "color.chart.lime.bold.hovered" | "color.chart.lime.bolder" | "color.chart.lime.bolder.hovered" | "color.chart.lime.boldest" | "color.chart.lime.boldest.hovered" | "color.chart.neutral" | "color.chart.neutral.hovered" | "color.chart.red.bold" | "color.chart.red.bold.hovered" | "color.chart.red.bolder" | "color.chart.red.bolder.hovered" | "color.chart.red.boldest" | "color.chart.red.boldest.hovered" | "color.chart.orange.bold" | "color.chart.orange.bold.hovered" | "color.chart.orange.bolder" | "color.chart.orange.bolder.hovered" | "color.chart.orange.boldest" | "color.chart.orange.boldest.hovered" | "color.chart.yellow.bold" | "color.chart.yellow.bold.hovered" | "color.chart.yellow.bolder" | "color.chart.yellow.bolder.hovered" | "color.chart.yellow.boldest" | "color.chart.yellow.boldest.hovered" | "color.chart.green.bold" | "color.chart.green.bold.hovered" | "color.chart.green.bolder" | "color.chart.green.bolder.hovered" | "color.chart.green.boldest" | "color.chart.green.boldest.hovered" | "color.chart.teal.bold" | "color.chart.teal.bold.hovered" | "color.chart.teal.bolder" | "color.chart.teal.bolder.hovered" | "color.chart.teal.boldest" | "color.chart.teal.boldest.hovered" | "color.chart.blue.bold" | "color.chart.blue.bold.hovered" | "color.chart.blue.bolder" | "color.chart.blue.bolder.hovered" | "color.chart.blue.boldest" | "color.chart.blue.boldest.hovered" | "color.chart.purple.bold" | "color.chart.purple.bold.hovered" | "color.chart.purple.bolder" | "color.chart.purple.bolder.hovered" | "color.chart.purple.boldest" | "color.chart.purple.boldest.hovered" | "color.chart.magenta.bold" | "color.chart.magenta.bold.hovered" | "color.chart.magenta.bolder" | "color.chart.magenta.bolder.hovered" | "color.chart.magenta.boldest" | "color.chart.magenta.boldest.hovered" | "color.chart.gray.bold" | "color.chart.gray.bold.hovered" | "color.chart.gray.bolder" | "color.chart.gray.bolder.hovered" | "color.chart.gray.boldest" | "color.chart.gray.boldest.hovered" | "color.chart.brand" | "color.chart.brand.hovered" | "color.chart.danger" | "color.chart.danger.hovered" | "color.chart.danger.bold" | "color.chart.danger.bold.hovered" | "color.chart.warning" | "color.chart.warning.hovered" | "color.chart.warning.bold" | "color.chart.warning.bold.hovered" | "color.chart.success" | "color.chart.success.hovered" | "color.chart.success.bold" | "color.chart.success.bold.hovered" | "color.chart.discovery" | "color.chart.discovery.hovered" | "color.chart.discovery.bold" | "color.chart.discovery.bold.hovered" | "color.chart.information" | "color.chart.information.hovered" | "color.chart.information.bold" | "color.chart.information.bold.hovered" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "elevation.shadow.overflow" | "elevation.shadow.overflow.perimeter" | "elevation.shadow.overflow.spread" | "elevation.shadow.overlay" | "elevation.shadow.raised" | "opacity.disabled" | "opacity.loading" | "utility.UNSAFE.textTransformUppercase" | "utility.UNSAFE.transparent" | "utility.elevation.surface.current" | "border.radius.050" | "border.radius" | "border.radius.100" | "border.radius.200" | "border.radius.300" | "border.radius.400" | "border.radius.circle" | "border.width" | "border.width.0" | "border.width.indicator" | "border.width.outline" | "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" | "space.negative.025" | "space.negative.050" | "space.negative.075" | "space.negative.100" | "space.negative.150" | "space.negative.200" | "space.negative.250" | "space.negative.300" | "space.negative.400" | "font.heading.xxlarge" | "font.heading.xlarge" | "font.heading.large" | "font.heading.medium" | "font.heading.small" | "font.heading.xsmall" | "font.heading.xxsmall" | "font.body.large" | "font.body" | "font.body.small" | "font.body.UNSAFE_small" | "font.code" | "font.weight.regular" | "font.weight.medium" | "font.weight.semibold" | "font.weight.bold" | "font.family.heading" | "font.family.body" | "font.family.code" | "font.family.brand.heading" | "font.family.brand.body">(token: T, fallback?: string) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::04ce6f89b744c2a0ec7cf592807e1ba2>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal
|
|
6
|
+
declare const _default: "\nhtml[data-theme~=\"typography:typography-modernized\"] {\n --ds-UNSAFE-textTransformUppercase: uppercase;\n --ds-font-heading-xxlarge: normal 653 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xlarge: normal 653 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-large: normal 653 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-medium: normal 653 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-small: normal 653 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xsmall: normal 653 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-heading-xxsmall: normal 653 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-body-UNSAFE_small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-code: normal 400 0.875em/1 ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-weight-regular: 400;\n --ds-font-weight-medium: 500;\n --ds-font-weight-semibold: 600;\n --ds-font-weight-bold: 653;\n --ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-code: ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace;\n --ds-font-family-brand-heading: \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n --ds-font-family-brand-body: \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif;\n}\n";
|
|
7
7
|
export default _default;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::355fb0bf4ef3f45e232f8637a1fa195f>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
declare const tokens: ({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
analyticsWebClient?: any;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Records a token call event to the analytics service. This is used to track which tokens are being used at runtime as they should be substituted by the values by @atlaskit/tokens/babel-plugin at build time.
|
|
8
|
+
* @param token - The token that was called.
|
|
9
|
+
* @param fallback - The fallback value that was used.
|
|
10
|
+
*/
|
|
11
|
+
export declare const recordTokenCall: <T extends "color.text" | "color.text.accent.lime" | "color.text.accent.lime.bolder" | "color.text.accent.red" | "color.text.accent.red.bolder" | "color.text.accent.orange" | "color.text.accent.orange.bolder" | "color.text.accent.yellow" | "color.text.accent.yellow.bolder" | "color.text.accent.green" | "color.text.accent.green.bolder" | "color.text.accent.teal" | "color.text.accent.teal.bolder" | "color.text.accent.blue" | "color.text.accent.blue.bolder" | "color.text.accent.purple" | "color.text.accent.purple.bolder" | "color.text.accent.magenta" | "color.text.accent.magenta.bolder" | "color.text.accent.gray" | "color.text.accent.gray.bolder" | "color.text.disabled" | "color.text.inverse" | "color.text.selected" | "color.text.brand" | "color.text.danger" | "color.text.warning" | "color.text.warning.inverse" | "color.text.success" | "color.text.discovery" | "color.text.information" | "color.text.subtlest" | "color.text.subtle" | "color.link" | "color.link.pressed" | "color.link.visited" | "color.link.visited.pressed" | "color.icon" | "color.icon.accent.lime" | "color.icon.accent.red" | "color.icon.accent.orange" | "color.icon.accent.yellow" | "color.icon.accent.green" | "color.icon.accent.teal" | "color.icon.accent.blue" | "color.icon.accent.purple" | "color.icon.accent.magenta" | "color.icon.accent.gray" | "color.icon.disabled" | "color.icon.inverse" | "color.icon.selected" | "color.icon.brand" | "color.icon.danger" | "color.icon.warning" | "color.icon.warning.inverse" | "color.icon.success" | "color.icon.discovery" | "color.icon.information" | "color.icon.subtlest" | "color.icon.subtle" | "color.border" | "color.border.accent.lime" | "color.border.accent.red" | "color.border.accent.orange" | "color.border.accent.yellow" | "color.border.accent.green" | "color.border.accent.teal" | "color.border.accent.blue" | "color.border.accent.purple" | "color.border.accent.magenta" | "color.border.accent.gray" | "color.border.disabled" | "color.border.focused" | "color.border.input" | "color.border.inverse" | "color.border.selected" | "color.border.brand" | "color.border.danger" | "color.border.warning" | "color.border.success" | "color.border.discovery" | "color.border.information" | "color.border.bold" | "color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "color.interaction.hovered" | "color.interaction.pressed" | "color.skeleton" | "color.skeleton.subtle" | "color.chart.categorical.1" | "color.chart.categorical.1.hovered" | "color.chart.categorical.2" | "color.chart.categorical.2.hovered" | "color.chart.categorical.3" | "color.chart.categorical.3.hovered" | "color.chart.categorical.4" | "color.chart.categorical.4.hovered" | "color.chart.categorical.5" | "color.chart.categorical.5.hovered" | "color.chart.categorical.6" | "color.chart.categorical.6.hovered" | "color.chart.categorical.7" | "color.chart.categorical.7.hovered" | "color.chart.categorical.8" | "color.chart.categorical.8.hovered" | "color.chart.lime.bold" | "color.chart.lime.bold.hovered" | "color.chart.lime.bolder" | "color.chart.lime.bolder.hovered" | "color.chart.lime.boldest" | "color.chart.lime.boldest.hovered" | "color.chart.neutral" | "color.chart.neutral.hovered" | "color.chart.red.bold" | "color.chart.red.bold.hovered" | "color.chart.red.bolder" | "color.chart.red.bolder.hovered" | "color.chart.red.boldest" | "color.chart.red.boldest.hovered" | "color.chart.orange.bold" | "color.chart.orange.bold.hovered" | "color.chart.orange.bolder" | "color.chart.orange.bolder.hovered" | "color.chart.orange.boldest" | "color.chart.orange.boldest.hovered" | "color.chart.yellow.bold" | "color.chart.yellow.bold.hovered" | "color.chart.yellow.bolder" | "color.chart.yellow.bolder.hovered" | "color.chart.yellow.boldest" | "color.chart.yellow.boldest.hovered" | "color.chart.green.bold" | "color.chart.green.bold.hovered" | "color.chart.green.bolder" | "color.chart.green.bolder.hovered" | "color.chart.green.boldest" | "color.chart.green.boldest.hovered" | "color.chart.teal.bold" | "color.chart.teal.bold.hovered" | "color.chart.teal.bolder" | "color.chart.teal.bolder.hovered" | "color.chart.teal.boldest" | "color.chart.teal.boldest.hovered" | "color.chart.blue.bold" | "color.chart.blue.bold.hovered" | "color.chart.blue.bolder" | "color.chart.blue.bolder.hovered" | "color.chart.blue.boldest" | "color.chart.blue.boldest.hovered" | "color.chart.purple.bold" | "color.chart.purple.bold.hovered" | "color.chart.purple.bolder" | "color.chart.purple.bolder.hovered" | "color.chart.purple.boldest" | "color.chart.purple.boldest.hovered" | "color.chart.magenta.bold" | "color.chart.magenta.bold.hovered" | "color.chart.magenta.bolder" | "color.chart.magenta.bolder.hovered" | "color.chart.magenta.boldest" | "color.chart.magenta.boldest.hovered" | "color.chart.gray.bold" | "color.chart.gray.bold.hovered" | "color.chart.gray.bolder" | "color.chart.gray.bolder.hovered" | "color.chart.gray.boldest" | "color.chart.gray.boldest.hovered" | "color.chart.brand" | "color.chart.brand.hovered" | "color.chart.danger" | "color.chart.danger.hovered" | "color.chart.danger.bold" | "color.chart.danger.bold.hovered" | "color.chart.warning" | "color.chart.warning.hovered" | "color.chart.warning.bold" | "color.chart.warning.bold.hovered" | "color.chart.success" | "color.chart.success.hovered" | "color.chart.success.bold" | "color.chart.success.bold.hovered" | "color.chart.discovery" | "color.chart.discovery.hovered" | "color.chart.discovery.bold" | "color.chart.discovery.bold.hovered" | "color.chart.information" | "color.chart.information.hovered" | "color.chart.information.bold" | "color.chart.information.bold.hovered" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "elevation.shadow.overflow" | "elevation.shadow.overflow.perimeter" | "elevation.shadow.overflow.spread" | "elevation.shadow.overlay" | "elevation.shadow.raised" | "opacity.disabled" | "opacity.loading" | "utility.UNSAFE.textTransformUppercase" | "utility.UNSAFE.transparent" | "utility.elevation.surface.current" | "border.radius.050" | "border.radius" | "border.radius.100" | "border.radius.200" | "border.radius.300" | "border.radius.400" | "border.radius.circle" | "border.width" | "border.width.0" | "border.width.indicator" | "border.width.outline" | "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" | "space.negative.025" | "space.negative.050" | "space.negative.075" | "space.negative.100" | "space.negative.150" | "space.negative.200" | "space.negative.250" | "space.negative.300" | "space.negative.400" | "font.heading.xxlarge" | "font.heading.xlarge" | "font.heading.large" | "font.heading.medium" | "font.heading.small" | "font.heading.xsmall" | "font.heading.xxsmall" | "font.body.large" | "font.body" | "font.body.small" | "font.body.UNSAFE_small" | "font.code" | "font.weight.regular" | "font.weight.medium" | "font.weight.semibold" | "font.weight.bold" | "font.family.heading" | "font.family.body" | "font.family.code" | "font.family.brand.heading" | "font.family.brand.body">(token: T, fallback?: string) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Design tokens are the single source of truth to name and store design decisions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"prebuilt": "yes | cp -R $(npx repo-root)/packages/design-system/tokens/dist/cjs/* $(npx repo-root)/packages/design-system/tokens/prebuilt/",
|
|
29
|
-
"ak-postbuild": "yarn prebuilt && (cd $(npx repo-root) && yarn build @atlassian/codegen -d cjs,esm,es2019) && yarn workspace @atlaskit/tokens codegen-tokens && yarn workspace @atlaskit/tokens check-clean-git",
|
|
29
|
+
"ak-postbuild": "yarn prebuilt && (cd $(npx repo-root) && yarn build @atlaskit/platform-feature-flags -d cjs,esm,es2019 && yarn build @atlassian/codegen -d cjs,esm,es2019) && yarn workspace @atlaskit/tokens codegen-tokens && yarn workspace @atlaskit/tokens check-clean-git",
|
|
30
30
|
"check-clean-git": "git diff --exit-code -- packages/design-system/tokens/ || (echo 'tokens are out of date, run yarn build tokens' && false)",
|
|
31
31
|
"codegen-tokens": "run-ts ./scripts/style-dictionary/build.tsx && cd $(npx repo-root)/packages/design-system/primitives && yarn codegen-styles && cd $(npx repo-root)/packages/design-system/ds-explorations && yarn codegen-styles && cd $(npx repo-root)/packages/design-system/heading && yarn codegen"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/ds-lib": "^3.
|
|
34
|
+
"@atlaskit/ds-lib": "^3.5.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@babel/traverse": "^7.23.2",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@af/accessibility-testing": "*",
|
|
46
46
|
"@af/formatting": "*",
|
|
47
|
-
"@atlaskit/button": "^20.
|
|
48
|
-
"@atlaskit/calendar": "^16.
|
|
49
|
-
"@atlaskit/checkbox": "^15.
|
|
50
|
-
"@atlaskit/radio": "^7.
|
|
51
|
-
"@atlaskit/textfield": "^6.
|
|
52
|
-
"@atlaskit/tooltip": "^19.
|
|
47
|
+
"@atlaskit/button": "^20.4.0",
|
|
48
|
+
"@atlaskit/calendar": "^16.3.0",
|
|
49
|
+
"@atlaskit/checkbox": "^15.3.0",
|
|
50
|
+
"@atlaskit/radio": "^7.2.0",
|
|
51
|
+
"@atlaskit/textfield": "^6.8.0",
|
|
52
|
+
"@atlaskit/tooltip": "^19.1.0",
|
|
53
53
|
"@atlaskit/visual-regression": "*",
|
|
54
54
|
"@atlassian/codegen": "^0.1.0",
|
|
55
55
|
"@atlassian/feature-flags-test-utils": "*",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@emotion/react": "^11.7.1",
|
|
59
59
|
"@hypermod/utils": "^0.4.2",
|
|
60
60
|
"@testing-library/dom": "^10.1.0",
|
|
61
|
-
"@testing-library/react": "^
|
|
61
|
+
"@testing-library/react": "^13.4.0",
|
|
62
62
|
"@testing-library/react-hooks": "^8.0.1",
|
|
63
63
|
"@testing-library/user-event": "^14.4.3",
|
|
64
64
|
"@types/chrome": "^0.0.171",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"postcss": "^8.4.7",
|
|
73
73
|
"postcss-less": "^6.0.0",
|
|
74
74
|
"prettier": "^3.2.5",
|
|
75
|
-
"react": "^
|
|
75
|
+
"react": "^18.2.0",
|
|
76
76
|
"react-use-clipboard": "^1.0.0",
|
|
77
77
|
"react-window": "^1.8.8",
|
|
78
78
|
"recharts": "^1.8.5",
|
|
@@ -131,6 +131,9 @@
|
|
|
131
131
|
"platform-component-visual-refresh": {
|
|
132
132
|
"type": "boolean"
|
|
133
133
|
},
|
|
134
|
+
"platform-token-runtime-call-tracking": {
|
|
135
|
+
"type": "boolean"
|
|
136
|
+
},
|
|
134
137
|
"platform-default-typography-modernized": {
|
|
135
138
|
"type": "boolean"
|
|
136
139
|
}
|