@atlaskit/tokens 13.1.1 → 13.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 +35 -0
- package/codemods/css-to-design-tokens/lib/legacy-colors.tsx +0 -1
- package/dist/cjs/artifacts/generated-pairs.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
- package/dist/cjs/artifacts/themes/atlassian-light.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +123 -92
- package/dist/cjs/artifacts/token-names.js +123 -92
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3621 -2939
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +3399 -2717
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3553 -2871
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +3365 -2683
- package/dist/cjs/entry-points/token-metadata.codegen.js +1807 -1528
- package/dist/cjs/utils/token-order.js +1 -1
- package/dist/cjs/utils/token-usage-guidelines.js +14 -1
- package/dist/es2019/artifacts/generated-pairs.js +2 -2
- package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +123 -92
- package/dist/es2019/artifacts/themes/atlassian-dark.js +123 -92
- package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +123 -92
- package/dist/es2019/artifacts/themes/atlassian-light.js +123 -92
- package/dist/es2019/artifacts/token-default-values.js +123 -92
- package/dist/es2019/artifacts/token-names.js +123 -92
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3621 -2939
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +3399 -2717
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3553 -2871
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +3365 -2683
- package/dist/es2019/entry-points/token-metadata.codegen.js +1807 -1528
- package/dist/es2019/utils/token-order.js +1 -1
- package/dist/es2019/utils/token-usage-guidelines.js +14 -1
- package/dist/esm/artifacts/generated-pairs.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-dark.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-light.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +123 -92
- package/dist/esm/artifacts/token-names.js +123 -92
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +3621 -2939
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +3399 -2717
- package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +3553 -2871
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +3365 -2683
- package/dist/esm/entry-points/token-metadata.codegen.js +1807 -1528
- package/dist/esm/utils/token-order.js +1 -1
- package/dist/esm/utils/token-usage-guidelines.js +14 -1
- package/dist/types/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-light.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +123 -92
- package/dist/types/artifacts/token-names.d.ts +245 -183
- package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/artifacts/types-internal.d.ts +2 -2
- package/dist/types/artifacts/types.d.ts +2 -2
- package/dist/types/entry-points/css-type-schema.codegen.d.ts +6 -6
- package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types/types.d.ts +98 -15
- package/dist/types-ts4.5/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-light.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +123 -92
- package/dist/types-ts4.5/artifacts/token-names.d.ts +245 -183
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
- package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +6 -6
- package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +98 -15
- package/figma/atlassian-dark-increased-contrast.json +1383 -1104
- package/figma/atlassian-dark.json +1382 -1103
- package/figma/atlassian-light-increased-contrast.json +1383 -1104
- package/figma/atlassian-light.json +1383 -1104
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const tokenOrder = [{
|
|
5
5
|
path: 'color',
|
|
6
|
-
subpaths: ['
|
|
6
|
+
subpaths: ['background', 'border', 'text', 'icon', 'link', 'interaction', 'skeleton', 'blanket', 'chart', 'rovo',
|
|
7
7
|
// deleted ↓
|
|
8
8
|
'accent', 'iconBorder', 'overlay']
|
|
9
9
|
}, {
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
const getTokenCategoryId = tokenId => {
|
|
2
|
+
if (tokenId.startsWith('color.rovo.background.')) {
|
|
3
|
+
return tokenId.replace('color.rovo.background.', 'color.background.');
|
|
4
|
+
}
|
|
5
|
+
if (tokenId.startsWith('color.rovo.border.')) {
|
|
6
|
+
return tokenId.replace('color.rovo.border.', 'color.border.');
|
|
7
|
+
}
|
|
8
|
+
if (tokenId.startsWith('color.rovo.icon.')) {
|
|
9
|
+
return tokenId.replace('color.rovo.icon.', 'color.icon.');
|
|
10
|
+
}
|
|
11
|
+
return tokenId;
|
|
12
|
+
};
|
|
1
13
|
export const getTokenUsageGuidelines = tokenId => {
|
|
14
|
+
const tokenCategoryId = getTokenCategoryId(tokenId);
|
|
2
15
|
const tokenTypes = Object.keys(usageMappings);
|
|
3
|
-
const foundType = tokenTypes.find(type =>
|
|
16
|
+
const foundType = tokenTypes.find(type => tokenCategoryId.startsWith(type));
|
|
4
17
|
if (foundType && usageMappings[foundType]) {
|
|
5
18
|
return usageMappings[foundType];
|
|
6
19
|
}
|