@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/tokens
|
|
2
2
|
|
|
3
|
+
## 11.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6df6d2b1f286b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6df6d2b1f286b) -
|
|
8
|
+
Added motion values to tokens babel plugin
|
|
9
|
+
|
|
10
|
+
## 11.2.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`4927c4a64f704`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4927c4a64f704) -
|
|
15
|
+
Added new set of experimental motion design tokens
|
|
16
|
+
|
|
3
17
|
## 11.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import cssToDesignTokens from './css-to-design-tokens/transform';
|
|
2
2
|
import removeFallbacksColor from './remove-fallbacks-color/transform';
|
|
3
|
+
import removeFallbacks from './remove-fallbacks/transform';
|
|
3
4
|
import themeToDesignTokens from './theme-to-design-tokens/transform';
|
|
4
5
|
|
|
5
6
|
const config: {
|
|
@@ -7,12 +8,14 @@ const config: {
|
|
|
7
8
|
'theme-to-design-tokens': typeof themeToDesignTokens;
|
|
8
9
|
'css-to-design-tokens': typeof cssToDesignTokens;
|
|
9
10
|
'remove-fallbacks-color': typeof removeFallbacksColor;
|
|
11
|
+
'remove-fallbacks': typeof removeFallbacks;
|
|
10
12
|
};
|
|
11
13
|
} = {
|
|
12
14
|
presets: {
|
|
13
15
|
'theme-to-design-tokens': themeToDesignTokens,
|
|
14
16
|
'css-to-design-tokens': cssToDesignTokens,
|
|
15
17
|
'remove-fallbacks-color': removeFallbacksColor,
|
|
18
|
+
'remove-fallbacks': removeFallbacks,
|
|
16
19
|
},
|
|
17
20
|
};
|
|
18
21
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { hasImportDeclaration } from '@hypermod/utils';
|
|
2
|
+
import type { API, FileInfo } from 'jscodeshift';
|
|
3
|
+
|
|
4
|
+
export default async function transformer(file: FileInfo, api: API): Promise<string> {
|
|
5
|
+
const j = api.jscodeshift;
|
|
6
|
+
const source = j(file.source);
|
|
7
|
+
|
|
8
|
+
if (!hasImportDeclaration(j, source, '@atlaskit/tokens')) {
|
|
9
|
+
return file.source;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let fileHasChanges = false;
|
|
13
|
+
source.find(j.CallExpression, { callee: { name: 'token' } }).forEach((path) => {
|
|
14
|
+
if (
|
|
15
|
+
path.node.arguments.length > 1 &&
|
|
16
|
+
j.StringLiteral.check(path.node.arguments[0]) &&
|
|
17
|
+
!/^radius\./.test(path.node.arguments[0].value)
|
|
18
|
+
) {
|
|
19
|
+
// Remove the second argument
|
|
20
|
+
path.node.arguments.splice(1, 1);
|
|
21
|
+
fileHasChanges = true
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return fileHasChanges ? source.toSource({ useTabs: true }) : file.source;
|
|
26
|
+
}
|