@atlaskit/primitives 17.1.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/compiled/components/anchor.js +1 -1
  3. package/dist/cjs/compiled/components/metric-text.compiled.css +3 -3
  4. package/dist/cjs/compiled/components/metric-text.js +3 -3
  5. package/dist/cjs/compiled/components/pressable.js +1 -1
  6. package/dist/cjs/compiled/components/text.compiled.css +5 -5
  7. package/dist/cjs/compiled/components/text.js +6 -6
  8. package/dist/cjs/components/anchor.js +1 -1
  9. package/dist/cjs/components/pressable.js +1 -1
  10. package/dist/cjs/components/text.js +1 -1
  11. package/dist/cjs/xcss/style-maps.partial.js +321 -320
  12. package/dist/es2019/compiled/components/anchor.js +1 -1
  13. package/dist/es2019/compiled/components/metric-text.compiled.css +3 -3
  14. package/dist/es2019/compiled/components/metric-text.js +3 -3
  15. package/dist/es2019/compiled/components/pressable.js +1 -1
  16. package/dist/es2019/compiled/components/text.compiled.css +5 -5
  17. package/dist/es2019/compiled/components/text.js +6 -6
  18. package/dist/es2019/components/anchor.js +1 -1
  19. package/dist/es2019/components/pressable.js +1 -1
  20. package/dist/es2019/components/text.js +1 -1
  21. package/dist/es2019/xcss/style-maps.partial.js +321 -320
  22. package/dist/esm/compiled/components/anchor.js +1 -1
  23. package/dist/esm/compiled/components/metric-text.compiled.css +3 -3
  24. package/dist/esm/compiled/components/metric-text.js +3 -3
  25. package/dist/esm/compiled/components/pressable.js +1 -1
  26. package/dist/esm/compiled/components/text.compiled.css +5 -5
  27. package/dist/esm/compiled/components/text.js +6 -6
  28. package/dist/esm/components/anchor.js +1 -1
  29. package/dist/esm/components/pressable.js +1 -1
  30. package/dist/esm/components/text.js +1 -1
  31. package/dist/esm/xcss/style-maps.partial.js +321 -320
  32. package/dist/types/xcss/style-maps.partial.d.ts +12 -12
  33. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +12 -12
  34. package/package.json +5 -5
  35. package/scripts/color-codegen-template.tsx +5 -8
  36. package/scripts/elevation-codegen-template.tsx +5 -8
  37. package/scripts/text-codegen-template.tsx +2 -2
  38. package/scripts/typography-codegen-template.tsx +7 -4
@@ -25,10 +25,10 @@ export type Dimension = keyof typeof dimensionMap;
25
25
  */
26
26
  /**
27
27
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
28
- * @codegen <<SignedSource::513f6a7e264ea3f9fe56eda322a28f64>>
28
+ * @codegen <<SignedSource::c9b68acdd57654884efd2f5087890624>>
29
29
  * @codegenId spacing
30
30
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
31
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
31
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
32
32
  */
33
33
  export declare const positiveSpaceMap: {
34
34
  'space.0': 'var(--ds-space-0)';
@@ -90,10 +90,10 @@ export type AllSpace = keyof typeof allSpaceMap;
90
90
  */
91
91
  /**
92
92
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
93
- * @codegen <<SignedSource::ee66de6d864a28baee9a085f01a27db6>>
93
+ * @codegen <<SignedSource::cefa2c59e15e6a3749ef38fa86c6adea>>
94
94
  * @codegenId inverse-colors
95
95
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
96
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
96
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
97
97
  */
98
98
  export declare const inverseColorMap: {
99
99
  'color.background.neutral.bold': 'color.text.inverse';
@@ -129,11 +129,11 @@ export declare const inverseColorMap: {
129
129
  */
130
130
  /**
131
131
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
132
- * @codegen <<SignedSource::9532ccca897f438d49bda552ccfad635>>
132
+ * @codegen <<SignedSource::c673d53a0a31524e65f1c7051579eae5>>
133
133
  * @codegenId elevation
134
134
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
135
135
  * @codegenParams ["opacity", "shadow", "surface"]
136
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
136
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
137
137
  */
138
138
  export declare const opacityMap: {
139
139
  'opacity.disabled': 'var(--ds-opacity-disabled)';
@@ -166,11 +166,11 @@ export type SurfaceColor = keyof typeof surfaceColorMap;
166
166
  */
167
167
  /**
168
168
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
169
- * @codegen <<SignedSource::5a98ba062e79517dbd51ee8599abebac>>
169
+ * @codegen <<SignedSource::fa88ed1ec5a817750b0348ca36dbb5f1>>
170
170
  * @codegenId colors
171
171
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
172
172
  * @codegenParams ["border", "background", "text", "fill"]
173
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
173
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
174
174
  */
175
175
  export declare const borderColorMap: {
176
176
  'color.border': 'var(--ds-border)';
@@ -514,11 +514,11 @@ export type Layer = keyof typeof layerMap;
514
514
  */
515
515
  /**
516
516
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
517
- * @codegen <<SignedSource::2db762824a4c50f25f7829537dee1f49>>
517
+ * @codegen <<SignedSource::6ab2b394dd5a830d6966e333e20b1473>>
518
518
  * @codegenId border
519
519
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
520
520
  * @codegenParams ["width", "radius"]
521
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::6683952932c4ad145144ebc086a2548e>>
521
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::8817f4073995e5dc9c2bb766316632d6>>
522
522
  */
523
523
  export declare const borderWidthMap: {
524
524
  'border.width': 'var(--ds-border-width)';
@@ -542,7 +542,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
542
542
  */
543
543
  /**
544
544
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
545
- * @codegen <<SignedSource::ab32bc819d015e7451c245e6a77eba28>>
545
+ * @codegen <<SignedSource::64331f0b8b5e2f090a3aad153d92deb6>>
546
546
  * @codegenId typography
547
547
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
548
548
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -587,7 +587,7 @@ export type FontFamily = keyof typeof fontFamilyMap;
587
587
  */
588
588
  /**
589
589
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
590
- * @codegen <<SignedSource::379f638b84496f34817234c7f3c58f74>>
590
+ * @codegen <<SignedSource::aeebc24b95e2189021f1d98f1715a6a0>>
591
591
  * @codegenId text
592
592
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
593
593
  * @codegenDependency ../../../primitives/scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
@@ -25,10 +25,10 @@ export type Dimension = keyof typeof dimensionMap;
25
25
  */
26
26
  /**
27
27
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
28
- * @codegen <<SignedSource::513f6a7e264ea3f9fe56eda322a28f64>>
28
+ * @codegen <<SignedSource::c9b68acdd57654884efd2f5087890624>>
29
29
  * @codegenId spacing
30
30
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
31
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
31
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
32
32
  */
33
33
  export declare const positiveSpaceMap: {
34
34
  'space.0': 'var(--ds-space-0)';
@@ -90,10 +90,10 @@ export type AllSpace = keyof typeof allSpaceMap;
90
90
  */
91
91
  /**
92
92
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
93
- * @codegen <<SignedSource::ee66de6d864a28baee9a085f01a27db6>>
93
+ * @codegen <<SignedSource::cefa2c59e15e6a3749ef38fa86c6adea>>
94
94
  * @codegenId inverse-colors
95
95
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
96
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
96
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
97
97
  */
98
98
  export declare const inverseColorMap: {
99
99
  'color.background.neutral.bold': 'color.text.inverse';
@@ -129,11 +129,11 @@ export declare const inverseColorMap: {
129
129
  */
130
130
  /**
131
131
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
132
- * @codegen <<SignedSource::9532ccca897f438d49bda552ccfad635>>
132
+ * @codegen <<SignedSource::c673d53a0a31524e65f1c7051579eae5>>
133
133
  * @codegenId elevation
134
134
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
135
135
  * @codegenParams ["opacity", "shadow", "surface"]
136
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
136
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
137
137
  */
138
138
  export declare const opacityMap: {
139
139
  'opacity.disabled': 'var(--ds-opacity-disabled)';
@@ -166,11 +166,11 @@ export type SurfaceColor = keyof typeof surfaceColorMap;
166
166
  */
167
167
  /**
168
168
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
169
- * @codegen <<SignedSource::5a98ba062e79517dbd51ee8599abebac>>
169
+ * @codegen <<SignedSource::fa88ed1ec5a817750b0348ca36dbb5f1>>
170
170
  * @codegenId colors
171
171
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
172
172
  * @codegenParams ["border", "background", "text", "fill"]
173
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::6ba535fc3d46f6c8a7b6384ed59ec8d6>>
173
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::38a7d4716f6999a6bdda9e4fe2bca6a1>>
174
174
  */
175
175
  export declare const borderColorMap: {
176
176
  'color.border': 'var(--ds-border)';
@@ -514,11 +514,11 @@ export type Layer = keyof typeof layerMap;
514
514
  */
515
515
  /**
516
516
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
517
- * @codegen <<SignedSource::2db762824a4c50f25f7829537dee1f49>>
517
+ * @codegen <<SignedSource::6ab2b394dd5a830d6966e333e20b1473>>
518
518
  * @codegenId border
519
519
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
520
520
  * @codegenParams ["width", "radius"]
521
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::6683952932c4ad145144ebc086a2548e>>
521
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::8817f4073995e5dc9c2bb766316632d6>>
522
522
  */
523
523
  export declare const borderWidthMap: {
524
524
  'border.width': 'var(--ds-border-width)';
@@ -542,7 +542,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
542
542
  */
543
543
  /**
544
544
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
545
- * @codegen <<SignedSource::ab32bc819d015e7451c245e6a77eba28>>
545
+ * @codegen <<SignedSource::64331f0b8b5e2f090a3aad153d92deb6>>
546
546
  * @codegenId typography
547
547
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
548
548
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -587,7 +587,7 @@ export type FontFamily = keyof typeof fontFamilyMap;
587
587
  */
588
588
  /**
589
589
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
590
- * @codegen <<SignedSource::379f638b84496f34817234c7f3c58f74>>
590
+ * @codegen <<SignedSource::aeebc24b95e2189021f1d98f1715a6a0>>
591
591
  * @codegenId text
592
592
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
593
593
  * @codegenDependency ../../../primitives/scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "17.1.0",
3
+ "version": "18.0.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -133,11 +133,11 @@
133
133
  },
134
134
  "dependencies": {
135
135
  "@atlaskit/analytics-next": "^11.1.0",
136
- "@atlaskit/app-provider": "^3.3.0",
136
+ "@atlaskit/app-provider": "^4.0.0",
137
137
  "@atlaskit/css": "^0.19.0",
138
138
  "@atlaskit/ds-lib": "^5.3.0",
139
139
  "@atlaskit/interaction-context": "^3.1.0",
140
- "@atlaskit/tokens": "^9.1.0",
140
+ "@atlaskit/tokens": "^11.0.0",
141
141
  "@atlaskit/visually-hidden": "^3.0.0",
142
142
  "@babel/runtime": "^7.0.0",
143
143
  "@compiled/react": "^0.18.6",
@@ -158,12 +158,12 @@
158
158
  "@atlaskit/button": "^23.9.0",
159
159
  "@atlaskit/checkbox": "^17.3.0",
160
160
  "@atlaskit/code": "^17.4.0",
161
- "@atlaskit/docs": "^11.2.0",
161
+ "@atlaskit/docs": "^11.3.0",
162
162
  "@atlaskit/dropdown-menu": "^16.4.0",
163
163
  "@atlaskit/flag": "^17.8.0",
164
164
  "@atlaskit/form": "^15.3.0",
165
165
  "@atlaskit/heading": "^5.2.0",
166
- "@atlaskit/icon": "^29.4.0",
166
+ "@atlaskit/icon": "^30.0.0",
167
167
  "@atlaskit/icon-object": "^7.4.0",
168
168
  "@atlaskit/image": "^3.0.0",
169
169
  "@atlaskit/link": "^3.3.0",
@@ -1,5 +1,5 @@
1
1
  import format from '@af/formatting/sync';
2
- import { legacyLightTokens as legacyTokens, light as tokens } from '@atlaskit/tokens/tokens-raw';
2
+ import { light as tokens } from '@atlaskit/tokens/tokens-raw';
3
3
 
4
4
  import {
5
5
  capitalize,
@@ -48,15 +48,12 @@ const tokenStyles = {
48
48
  },
49
49
  } as const;
50
50
 
51
- const bothTokens = tokens.map((t, i) => [t, legacyTokens[i]]);
52
-
53
- const activeTokens = bothTokens
54
- .filter(([t]) => t.attributes.state !== 'deleted')
55
- .map((t) => t)
51
+ const activeTokens = tokens
52
+ .filter((t) => t.attributes.state !== 'deleted')
56
53
  .map(
57
- ([t, legacy]): Token => ({
54
+ (t): Token => ({
58
55
  token: t.name,
59
- fallback: legacy.value as string | ShadowDefinition,
56
+ fallback: t.value as string | ShadowDefinition,
60
57
  isDeprecated: t.attributes.state === 'deprecated',
61
58
  }),
62
59
  );
@@ -1,6 +1,6 @@
1
1
  import format from '@af/formatting/sync';
2
2
  import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
3
- import { legacyLightTokens as legacyTokens, light as tokens } from '@atlaskit/tokens/tokens-raw';
3
+ import { light as tokens } from '@atlaskit/tokens/tokens-raw';
4
4
 
5
5
  import {
6
6
  capitalize,
@@ -37,15 +37,12 @@ const tokenStyles = {
37
37
  },
38
38
  } as const;
39
39
 
40
- const bothTokens = tokens.map((t, i) => [t, legacyTokens[i]]);
41
-
42
- const activeTokens = bothTokens
43
- .filter(([t]) => t.attributes.state !== 'deleted')
44
- .map((t) => t)
40
+ const activeTokens = tokens
41
+ .filter((t) => t.attributes.state !== 'deleted')
45
42
  .map(
46
- ([t, legacy]): Token => ({
43
+ (t): Token => ({
47
44
  token: t.name,
48
- fallback: legacy.value as string | ShadowDefinition,
45
+ fallback: t.value as string | ShadowDefinition,
49
46
  isDeprecated: t.attributes.state === 'deprecated',
50
47
  }),
51
48
  );
@@ -1,5 +1,5 @@
1
1
  import format from '@af/formatting/sync';
2
- import { typographyAdg3 as tokens } from '@atlaskit/tokens/tokens-raw';
2
+ import { typography as tokens } from '@atlaskit/tokens/tokens-raw';
3
3
 
4
4
  import { capitalize, constructTokenFunctionCall, generateTypeDefs } from './utils';
5
5
 
@@ -9,7 +9,7 @@ type Token = {
9
9
  };
10
10
 
11
11
  const activeTokens: Token[] = tokens
12
- .filter((t) => t.attributes.state === 'active')
12
+ .filter((t) => t.attributes.state !== 'deleted')
13
13
  .map((t) => ({
14
14
  name: t.name,
15
15
  fallback: t.value,
@@ -1,18 +1,20 @@
1
1
  import format from '@af/formatting/sync';
2
- import { typographyAdg3 as tokens } from '@atlaskit/tokens/tokens-raw';
2
+ import { typography as tokens } from '@atlaskit/tokens/tokens-raw';
3
3
 
4
4
  import { capitalize, constructTokenFunctionCall, generateTypeDefs } from './utils';
5
5
 
6
6
  type Token = {
7
7
  name: string;
8
8
  fallback: string;
9
+ isDeprecated: boolean;
9
10
  };
10
11
 
11
12
  const activeTokens: Token[] = tokens
12
- .filter((t) => t.attributes.state === 'active')
13
+ .filter((t) => t.attributes.state !== 'deleted')
13
14
  .map((t) => ({
14
15
  name: t.name,
15
16
  fallback: t.value,
17
+ isDeprecated: t.attributes.state === 'deprecated',
16
18
  }));
17
19
 
18
20
  const typographyProperties = [
@@ -62,8 +64,9 @@ ${activeTokens
62
64
  .sort((a, b) => (a.name < b.name ? -1 : 1))
63
65
  .map((token) => {
64
66
  return `
65
- '${token.name}': ${constructTokenFunctionCall(token.name, token.fallback)}
66
- `.trim();
67
+ ${token.isDeprecated ? '// @deprecated' : ''}
68
+ '${token.name}': ${constructTokenFunctionCall(token.name, token.fallback)}
69
+ `.trim();
67
70
  })
68
71
  .join(',\n\t')}
69
72
  };`,