@atlaskit/tokens 11.1.1 → 11.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 +14 -0
- package/codemods/hypermod.config.tsx +3 -0
- package/codemods/remove-fallbacks/transform.tsx +26 -0
- package/dist/cjs/artifacts/palettes-raw/motion-palette.js +414 -63
- package/dist/cjs/artifacts/replacement-mapping.js +51 -3
- package/dist/cjs/artifacts/themes/atlassian-motion.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +25 -9
- package/dist/cjs/artifacts/token-names.js +19 -3
- package/dist/cjs/artifacts/tokens-raw/atlassian-motion.js +527 -47
- package/dist/cjs/babel-plugin/plugin.js +5 -0
- package/dist/cjs/entry-points/token-metadata.codegen.js +2342 -470
- package/dist/cjs/utils/token-usage-guidelines.js +117 -0
- package/dist/es2019/artifacts/palettes-raw/motion-palette.js +414 -63
- package/dist/es2019/artifacts/replacement-mapping.js +51 -3
- package/dist/es2019/artifacts/themes/atlassian-motion.js +119 -15
- package/dist/es2019/artifacts/token-default-values.js +25 -9
- package/dist/es2019/artifacts/token-names.js +19 -3
- package/dist/es2019/artifacts/tokens-raw/atlassian-motion.js +527 -47
- package/dist/es2019/babel-plugin/plugin.js +5 -0
- package/dist/es2019/entry-points/token-metadata.codegen.js +2342 -470
- package/dist/es2019/utils/token-usage-guidelines.js +109 -0
- package/dist/esm/artifacts/palettes-raw/motion-palette.js +414 -63
- package/dist/esm/artifacts/replacement-mapping.js +51 -3
- package/dist/esm/artifacts/themes/atlassian-motion.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +25 -9
- package/dist/esm/artifacts/token-names.js +19 -3
- package/dist/esm/artifacts/tokens-raw/atlassian-motion.js +527 -47
- package/dist/esm/babel-plugin/plugin.js +5 -0
- package/dist/esm/entry-points/token-metadata.codegen.js +2342 -470
- package/dist/esm/utils/token-usage-guidelines.js +111 -0
- package/dist/types/artifacts/palettes-raw/motion-palette.d.ts +5 -3
- package/dist/types/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-motion.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +25 -9
- package/dist/types/artifacts/token-names.d.ts +37 -5
- package/dist/types/artifacts/tokens-raw/atlassian-motion.d.ts +5 -3
- package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -2
- package/dist/types/entry-points/token-metadata.codegen.d.ts +6 -2
- package/dist/types/types.d.ts +31 -2
- package/dist/types/utils/token-usage-guidelines.d.ts +8 -0
- package/dist/types-ts4.5/artifacts/palettes-raw/motion-palette.d.ts +5 -3
- package/dist/types-ts4.5/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-motion.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +25 -9
- package/dist/types-ts4.5/artifacts/token-names.d.ts +37 -5
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-motion.d.ts +5 -3
- package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -2
- package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +6 -2
- package/dist/types-ts4.5/types.d.ts +31 -2
- package/dist/types-ts4.5/utils/token-usage-guidelines.d.ts +8 -0
- package/package.json +12 -11
- package/tokens.docs.tsx +52 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as t from '@babel/types';
|
|
2
2
|
import tokenNames from '../artifacts/token-names';
|
|
3
3
|
import light from '../artifacts/tokens-raw/atlassian-light';
|
|
4
|
+
import motion from '../artifacts/tokens-raw/atlassian-motion';
|
|
4
5
|
import shape from '../artifacts/tokens-raw/atlassian-shape';
|
|
5
6
|
import spacing from '../artifacts/tokens-raw/atlassian-spacing';
|
|
6
7
|
import typography from '../artifacts/tokens-raw/atlassian-typography';
|
|
@@ -173,6 +174,7 @@ const lightValues = getThemeValues(light);
|
|
|
173
174
|
const shapeValues = getThemeValues(shape);
|
|
174
175
|
const spacingValues = getThemeValues(spacing);
|
|
175
176
|
const typographyValues = getThemeValues(typography);
|
|
177
|
+
const motionValues = getThemeValues(motion);
|
|
176
178
|
function getDefaultFallback(tokenName) {
|
|
177
179
|
if (shapeValues[tokenName]) {
|
|
178
180
|
return shapeValues[tokenName];
|
|
@@ -183,6 +185,9 @@ function getDefaultFallback(tokenName) {
|
|
|
183
185
|
if (typographyValues[tokenName]) {
|
|
184
186
|
return typographyValues[tokenName];
|
|
185
187
|
}
|
|
188
|
+
if (motionValues[tokenName]) {
|
|
189
|
+
return motionValues[tokenName];
|
|
190
|
+
}
|
|
186
191
|
return lightValues[tokenName];
|
|
187
192
|
}
|
|
188
193
|
function getNonAliasedImportName(node) {
|