@atlaskit/primitives 5.7.0 → 6.1.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.
@@ -1,4 +1,4 @@
1
- import { SerializedStyles } from '@emotion/react';
1
+ import { type SerializedStyles } from '@emotion/react';
2
2
  /**
3
3
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
4
4
  * @codegen <<SignedSource::7af6097e56f7fb03635b6f8aaf121b02>>
@@ -23,7 +23,7 @@ export type Dimension = keyof typeof dimensionMap;
23
23
  */
24
24
  /**
25
25
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
26
- * @codegen <<SignedSource::f8111b846d3e3be67331853f10d1b568>>
26
+ * @codegen <<SignedSource::aa8558eb2395e9d078e38d8b3b4e0bed>>
27
27
  * @codegenId spacing
28
28
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
29
29
  * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
@@ -88,10 +88,10 @@ export type AllSpace = keyof typeof allSpaceMap;
88
88
  */
89
89
  /**
90
90
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
91
- * @codegen <<SignedSource::7e2103695ffbc3573276b7ef3408c91b>>
91
+ * @codegen <<SignedSource::04aa48c107cf876807c6af948860857f>>
92
92
  * @codegenId inverse-colors
93
93
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
94
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::eface03157c2df5c1b3b305911d3ed4d>>
94
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
95
95
  */
96
96
  export declare const inverseColorMap: {
97
97
  readonly 'color.background.neutral.bold': "color.text.inverse";
@@ -127,11 +127,11 @@ export declare const inverseColorMap: {
127
127
  */
128
128
  /**
129
129
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
130
- * @codegen <<SignedSource::b219b05d38339a7cd427cbf5de4ad327>>
130
+ * @codegen <<SignedSource::8a5d63089926d91b7cb79b7ddd40463b>>
131
131
  * @codegenId elevation
132
132
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
133
133
  * @codegenParams ["opacity", "shadow", "surface"]
134
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::eface03157c2df5c1b3b305911d3ed4d>>
134
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
135
135
  */
136
136
  export declare const opacityMap: {
137
137
  readonly 'opacity.disabled': "var(--ds-opacity-disabled)";
@@ -164,11 +164,11 @@ export type SurfaceColor = keyof typeof surfaceColorMap;
164
164
  */
165
165
  /**
166
166
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
167
- * @codegen <<SignedSource::75cecbb153ddd5bdd2cb0c5e9a07107d>>
167
+ * @codegen <<SignedSource::369117f6459016ec330d166ba9f4ad03>>
168
168
  * @codegenId colors
169
169
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
170
170
  * @codegenParams ["border", "background", "text", "fill"]
171
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::eface03157c2df5c1b3b305911d3ed4d>>
171
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
172
172
  */
173
173
  export declare const borderColorMap: {
174
174
  readonly 'color.border': "var(--ds-border)";
@@ -488,7 +488,7 @@ export type Layer = keyof typeof layerMap;
488
488
  */
489
489
  /**
490
490
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
491
- * @codegen <<SignedSource::d44c306cfe2334f9664fc122aa7d9fe6>>
491
+ * @codegen <<SignedSource::8093f6eb366669dce5007011a3fd7814>>
492
492
  * @codegenId border
493
493
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
494
494
  * @codegenParams ["width", "radius"]
@@ -516,7 +516,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
516
516
  */
517
517
  /**
518
518
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
519
- * @codegen <<SignedSource::fc79aec30729db169f29271e3fe7725d>>
519
+ * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
520
520
  * @codegenId typography
521
521
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
522
522
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "5.7.0",
3
+ "version": "6.1.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -103,7 +103,7 @@
103
103
  "slug": "primitives/pressable",
104
104
  "id": "@atlaskit/primitives/pressable",
105
105
  "status": {
106
- "type": "closed-beta"
106
+ "type": "beta"
107
107
  }
108
108
  },
109
109
  {
@@ -128,8 +128,8 @@
128
128
  "@atlaskit/css": "^0.1.0",
129
129
  "@atlaskit/ds-lib": "^2.3.0",
130
130
  "@atlaskit/interaction-context": "^2.1.0",
131
- "@atlaskit/tokens": "^1.44.0",
132
- "@atlaskit/visually-hidden": "^1.2.4",
131
+ "@atlaskit/tokens": "^1.45.0",
132
+ "@atlaskit/visually-hidden": "^1.3.0",
133
133
  "@babel/runtime": "^7.0.0",
134
134
  "@emotion/react": "^11.7.1",
135
135
  "@emotion/serialize": "^1.1.0",
@@ -141,16 +141,16 @@
141
141
  },
142
142
  "devDependencies": {
143
143
  "@af/accessibility-testing": "*",
144
+ "@af/formatting": "*",
144
145
  "@atlaskit/ssr": "*",
145
- "@atlaskit/toggle": "^13.0.0",
146
- "@atlaskit/tooltip": "^18.2.1",
146
+ "@atlaskit/toggle": "^13.1.0",
147
+ "@atlaskit/tooltip": "^18.3.0",
147
148
  "@atlaskit/visual-regression": "*",
148
149
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
149
150
  "@atlassian/codegen": "^0.1.0",
150
151
  "@testing-library/react": "^12.1.5",
151
152
  "@testing-library/react-hooks": "^8.0.1",
152
153
  "csstype": "^3.1.0",
153
- "prettier": "^2.8.0",
154
154
  "react-dom": "^16.8.0",
155
155
  "ts-node": "^10.9.1",
156
156
  "typescript": "~5.4.2",
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import { shape as tokens } from '@atlaskit/tokens/tokens-raw';
5
3
 
6
4
  import { capitalize, constructTokenFunctionCall } from './utils';
@@ -47,8 +45,7 @@ export const createBorderStylesFromTemplate = (
47
45
 
48
46
  const { filterFn, objectName } = tokenStyles[property];
49
47
 
50
- return (
51
- prettier.format(
48
+ return (format(
52
49
  `
53
50
  export const ${objectName}Map = {
54
51
  ${activeTokens
@@ -63,12 +60,7 @@ export const ${objectName}Map = {
63
60
  })
64
61
  .join(',\n\t')}
65
62
  } as const;`,
66
- {
67
- singleQuote: true,
68
- parser: 'typescript',
69
- trailingComma: 'all',
70
- plugins: [parserTypeScript],
71
- },
63
+ 'typescript',
72
64
  ) +
73
65
  `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
74
66
  );
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import {
5
3
  legacyLightTokens as legacyTokens,
6
4
  light as tokens,
@@ -76,8 +74,7 @@ export const createColorStylesFromTemplate = (
76
74
 
77
75
  const { filterFn, objectName } = tokenStyles[colorProperty];
78
76
 
79
- return (
80
- prettier.format(
77
+ return (format(
81
78
  `
82
79
  export const ${objectName}Map = {
83
80
  ${activeTokens
@@ -92,12 +89,7 @@ export const ${objectName}Map = {
92
89
  })
93
90
  .join(',\n\t')}
94
91
  } as const;`,
95
- {
96
- singleQuote: true,
97
- parser: 'typescript',
98
- trailingComma: 'all',
99
- plugins: [parserTypeScript],
100
- },
92
+ 'typescript',
101
93
  ) +
102
94
  `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
103
95
  );
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
5
3
  import {
6
4
  legacyLightTokens as legacyTokens,
@@ -66,8 +64,7 @@ export const createElevationStylesFromTemplate = (
66
64
 
67
65
  const { filterFn, objectName } = tokenStyles[property];
68
66
 
69
- return (
70
- prettier.format(
67
+ return (format(
71
68
  `
72
69
  export const ${objectName}Map = {
73
70
  ${activeTokens
@@ -82,12 +79,7 @@ export const ${objectName}Map = {
82
79
  })
83
80
  .join(',\n\t')}
84
81
  } as const;`,
85
- {
86
- singleQuote: true,
87
- parser: 'typescript',
88
- trailingComma: 'all',
89
- plugins: [parserTypeScript],
90
- },
82
+ 'typescript',
91
83
  ) +
92
84
  `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
93
85
  );
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import { light as tokens } from '@atlaskit/tokens/tokens-raw';
5
3
 
6
4
  import { compose, isAccent, not, pick } from './utils';
@@ -28,7 +26,7 @@ const activeTokens = tokens
28
26
  .map(t => ({ ...t, token: t.token.replaceAll('.[default]', '') }));
29
27
 
30
28
  export const createInverseColorMapTemplate = () => {
31
- return prettier.format(
29
+ return format(
32
30
  `
33
31
  export const inverseColorMap = {
34
32
  ${activeTokens
@@ -43,11 +41,6 @@ export const inverseColorMap = {
43
41
  })
44
42
  .join(',\n\t')}
45
43
  } as const;`,
46
- {
47
- singleQuote: true,
48
- parser: 'typescript',
49
- trailingComma: 'all',
50
- plugins: [parserTypeScript],
51
- },
44
+ 'typescript',
52
45
  );
53
46
  };
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import { spacing as tokens } from '@atlaskit/tokens/tokens-raw';
5
3
 
6
4
  import { constructTokenFunctionCall } from './utils';
@@ -43,10 +41,5 @@ export const createSpacingStylesFromTemplate = () => {
43
41
  `export type AllSpace = keyof typeof allSpaceMap;\n`,
44
42
  ].join('\n');
45
43
 
46
- return prettier.format(output, {
47
- singleQuote: true,
48
- trailingComma: 'all',
49
- parser: 'typescript',
50
- plugins: [parserTypeScript],
51
- });
44
+ return format(output, 'typescript');
52
45
  };
@@ -1,6 +1,4 @@
1
- import prettier from 'prettier';
2
- import parserTypeScript from 'prettier/parser-typescript';
3
-
1
+ import format from '@af/formatting/sync';
4
2
  import { typographyAdg3 as tokens } from '@atlaskit/tokens/tokens-raw';
5
3
 
6
4
  import { capitalize, constructTokenFunctionCall } from './utils';
@@ -67,7 +65,7 @@ export const createTypographyStylesFromTemplate = () => {
67
65
  const { filterFn, objectName } = typographyProperty;
68
66
 
69
67
  return (
70
- prettier.format(
68
+ format(
71
69
  `
72
70
  export const ${objectName}Map = {
73
71
  ${activeTokens
@@ -84,12 +82,7 @@ ${activeTokens
84
82
  })
85
83
  .join(',\n\t')}
86
84
  };`,
87
- {
88
- singleQuote: true,
89
- trailingComma: 'all',
90
- parser: 'typescript',
91
- plugins: [parserTypeScript],
92
- },
85
+ 'typescript',
93
86
  ) +
94
87
  `\nexport type ${capitalize(
95
88
  objectName,