@atlaskit/primitives 14.11.3 → 14.12.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 (43) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/anchor/package.json +1 -1
  3. package/box/package.json +1 -1
  4. package/codemods/compiled-fork-stage1/transform.tsx +329 -59
  5. package/compiled/package.json +1 -1
  6. package/dist/cjs/compiled/components/anchor.js +1 -1
  7. package/dist/cjs/compiled/components/pressable.js +1 -1
  8. package/dist/cjs/components/anchor.js +1 -1
  9. package/dist/cjs/components/pressable.js +1 -1
  10. package/dist/cjs/xcss/style-maps.partial.js +23 -5
  11. package/dist/es2019/compiled/components/anchor.js +1 -1
  12. package/dist/es2019/compiled/components/pressable.js +1 -1
  13. package/dist/es2019/components/anchor.js +1 -1
  14. package/dist/es2019/components/pressable.js +1 -1
  15. package/dist/es2019/xcss/style-maps.partial.js +23 -5
  16. package/dist/esm/compiled/components/anchor.js +1 -1
  17. package/dist/esm/compiled/components/pressable.js +1 -1
  18. package/dist/esm/components/anchor.js +1 -1
  19. package/dist/esm/components/pressable.js +1 -1
  20. package/dist/esm/xcss/style-maps.partial.js +23 -5
  21. package/dist/types/compiled/responsive/use-media-query.d.ts +1 -1
  22. package/dist/types/responsive/build-media-query-css.d.ts +12 -2
  23. package/dist/types/responsive/use-media-query.d.ts +1 -1
  24. package/dist/types/utils/has-text-ancestor-context.d.ts +0 -1
  25. package/dist/types/utils/surface-provider.d.ts +0 -1
  26. package/dist/types/xcss/style-maps.partial.d.ts +12 -4
  27. package/dist/types/xcss/xcss.d.ts +87 -9
  28. package/dist/types-ts4.5/compiled/responsive/use-media-query.d.ts +1 -1
  29. package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +12 -2
  30. package/dist/types-ts4.5/responsive/use-media-query.d.ts +1 -1
  31. package/dist/types-ts4.5/utils/has-text-ancestor-context.d.ts +0 -1
  32. package/dist/types-ts4.5/utils/surface-provider.d.ts +0 -1
  33. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +12 -4
  34. package/dist/types-ts4.5/xcss/xcss.d.ts +87 -9
  35. package/inline/package.json +1 -1
  36. package/metric-text/package.json +1 -1
  37. package/package.json +12 -14
  38. package/pressable/package.json +1 -1
  39. package/responsive/package.json +1 -1
  40. package/scripts/codegen-styles.tsx +3 -3
  41. package/scripts/{border-codegen-template.tsx → shape-codegen-template.tsx} +4 -3
  42. package/stack/package.json +1 -1
  43. package/text/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 14.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fcd8f46058cd2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fcd8f46058cd2) -
8
+ Added new border radius tokens available via xcss.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 14.11.4
15
+
16
+ ### Patch Changes
17
+
18
+ - [`31c57f650ba07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31c57f650ba07) -
19
+ Improving tests for server side rendering and hydration
20
+ - Updated dependencies
21
+
3
22
  ## 14.11.3
4
23
 
5
24
  ### Patch Changes
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/components/anchor.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/components/anchor.d.ts"
14
14
  ]
package/box/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/components/box.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/components/box.d.ts"
14
14
  ]
@@ -1,4 +1,10 @@
1
- import type { API, FileInfo, JSXAttribute } from 'jscodeshift';
1
+ import type {
2
+ API,
3
+ FileInfo,
4
+ ImportSpecifier,
5
+ JSXAttribute,
6
+ VariableDeclaration,
7
+ } from 'jscodeshift';
2
8
 
3
9
  const ANCHOR_PRESSABLE_XCSS_PROPS = [
4
10
  'backgroundColor',
@@ -13,28 +19,12 @@ const ANCHOR_PRESSABLE_XCSS_PROPS = [
13
19
 
14
20
  const GRID_XCSS_PROPS = ['templateRows', 'templateColumns', 'templateAreas'];
15
21
 
22
+ const PRIMITIVES_IMPORT_SOURCES = ['@atlaskit/primitives', '@atlaskit/primitives/compiled'];
23
+
16
24
  function transform(file: FileInfo, { jscodeshift: j }: API) {
17
25
  const root = j(file.source);
18
26
  let needsCssMapImport = false;
19
27
 
20
- // Check if any import from '@atlaskit/primitives' contains 'xcss'
21
- const hasDescopedImport = root
22
- .find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
23
- .some((path) => {
24
- return path.node.specifiers!.some((specifier) => {
25
- if (!j.ImportSpecifier.check(specifier)) {
26
- return false;
27
- }
28
-
29
- return ['xcss', 'media', 'XCSS'].includes(specifier.imported.name);
30
- });
31
- });
32
-
33
- // If 'xcss' is imported, return the original source without transformations
34
- if (hasDescopedImport) {
35
- return file.source;
36
- }
37
-
38
28
  // If Box primitive is used with spread props, return the original source without transformations
39
29
  const hasBoxPrimitiveWithSpreadProps = root
40
30
  .find(j.JSXElement, { openingElement: { name: { name: 'Box' } } })
@@ -48,6 +38,144 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
48
38
  return file.source;
49
39
  }
50
40
 
41
+ // Check if xcss is imported
42
+ const hasXcssImport = root
43
+ .find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
44
+ .some(
45
+ (path) =>
46
+ path.node.specifiers?.some(
47
+ (specifier) => j.ImportSpecifier.check(specifier) && specifier.imported.name === 'xcss',
48
+ ) ?? false,
49
+ );
50
+
51
+ // Check if media is imported
52
+ const hasMediaImport = root
53
+ .find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
54
+ .some(
55
+ (path) =>
56
+ path.node.specifiers?.some(
57
+ (specifier) => j.ImportSpecifier.check(specifier) && specifier.imported.name === 'media',
58
+ ) ?? false,
59
+ );
60
+
61
+ // If media is imported, return the original source without transformations
62
+ if (hasMediaImport) {
63
+ return file.source;
64
+ }
65
+
66
+ // If xcss is imported, check if there's only one other primitive component
67
+ if (hasXcssImport) {
68
+ const primitiveImports =
69
+ root
70
+ .find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
71
+ .get()
72
+ .node.specifiers?.filter(
73
+ (specifier: ImportSpecifier) =>
74
+ j.ImportSpecifier.check(specifier) && specifier.imported.name !== 'xcss',
75
+ ) ?? [];
76
+
77
+ // If there's only one other primitive component, skip the file
78
+ if (primitiveImports.length === 1) {
79
+ return file.source;
80
+ }
81
+
82
+ // Otherwise, split the imports but keep components that use xcss
83
+ root
84
+ .find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } })
85
+ .forEach((path) => {
86
+ // Skip type imports
87
+ if (path.node.importKind === 'type') {
88
+ return;
89
+ }
90
+
91
+ const xcssSpecifiers =
92
+ path.node.specifiers?.filter(
93
+ (specifier) => j.ImportSpecifier.check(specifier) && specifier.imported.name === 'xcss',
94
+ ) ?? [];
95
+ const otherSpecifiers =
96
+ path.node.specifiers?.filter(
97
+ (specifier) => j.ImportSpecifier.check(specifier) && specifier.imported.name !== 'xcss',
98
+ ) ?? [];
99
+
100
+ // Find components that use xcss
101
+ const componentsUsingXcss = new Set<string>();
102
+ root.find(j.JSXElement).forEach((jsxPath) => {
103
+ if (!j.JSXIdentifier.check(jsxPath.node.openingElement.name)) {
104
+ return;
105
+ }
106
+
107
+ const elementName = jsxPath.node.openingElement.name.name;
108
+ const attributes = jsxPath.node.openingElement.attributes || [];
109
+ const hasXcssProp = attributes.some(
110
+ (attr) =>
111
+ j.JSXAttribute.check(attr) &&
112
+ j.JSXIdentifier.check(attr.name) &&
113
+ attr.name.name === 'xcss',
114
+ );
115
+
116
+ if (hasXcssProp) {
117
+ componentsUsingXcss.add(elementName);
118
+ }
119
+ });
120
+
121
+ // Split specifiers based on xcss usage
122
+ const specifiersToKeep = otherSpecifiers.filter(
123
+ (specifier) =>
124
+ j.ImportSpecifier.check(specifier) && componentsUsingXcss.has(specifier.imported.name),
125
+ );
126
+ const specifiersToMove = otherSpecifiers.filter(
127
+ (specifier) =>
128
+ j.ImportSpecifier.check(specifier) && !componentsUsingXcss.has(specifier.imported.name),
129
+ );
130
+
131
+ if (specifiersToMove.length > 0) {
132
+ // Add new import for components that don't use xcss
133
+ path.insertAfter(
134
+ j.importDeclaration(specifiersToMove, j.literal('@atlaskit/primitives/compiled')),
135
+ );
136
+ }
137
+
138
+ // Update original import to include xcss and components that use it
139
+ path.node.specifiers = [...xcssSpecifiers, ...specifiersToKeep];
140
+ });
141
+
142
+ return root.toSource({ quote: 'single' });
143
+ }
144
+
145
+ // Check if any component uses xcss
146
+ const hasXcssUsage = root.find(j.JSXElement).some((path) => {
147
+ if (!j.JSXIdentifier.check(path.node.openingElement.name)) {
148
+ return false;
149
+ }
150
+
151
+ const elementName = path.node.openingElement.name.name;
152
+ const isPrimitiveComponent = PRIMITIVES_IMPORT_SOURCES.some((importSource) =>
153
+ root.find(j.ImportDeclaration, { source: { value: importSource } }).some((importPath) => {
154
+ return importPath.node.specifiers!.some((specifier) => {
155
+ if (!j.ImportSpecifier.check(specifier)) {
156
+ return false;
157
+ }
158
+ return specifier.local?.name === elementName;
159
+ });
160
+ }),
161
+ );
162
+
163
+ if (!isPrimitiveComponent) {
164
+ return false;
165
+ }
166
+
167
+ const attributes = path.node.openingElement.attributes || [];
168
+ return attributes.some(
169
+ (attr) =>
170
+ j.JSXAttribute.check(attr) && j.JSXIdentifier.check(attr.name) && attr.name.name === 'xcss',
171
+ );
172
+ });
173
+
174
+ // If any component uses xcss, return the original source without transformations
175
+ if (hasXcssUsage) {
176
+ return file.source;
177
+ }
178
+
51
179
  // Has @atlaskit/primitives import?
52
180
  const hasPrimitivesImport =
53
181
  root.find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } }).length > 0;
@@ -56,9 +184,57 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
56
184
  return file.source;
57
185
  }
58
186
 
187
+ // Check if any component has mixed xcss usage by looking at JSX elements directly
188
+ const componentXcssUsage = new Map<string, boolean>();
189
+ const hasMixedXcssUsage = root.find(j.JSXElement).some((path) => {
190
+ if (!j.JSXIdentifier.check(path.node.openingElement.name)) {
191
+ return false;
192
+ }
193
+
194
+ const elementName = path.node.openingElement.name.name;
195
+ const isPrimitiveComponent = PRIMITIVES_IMPORT_SOURCES.some((importSource) =>
196
+ root.find(j.ImportDeclaration, { source: { value: importSource } }).some((importPath) => {
197
+ return importPath.node.specifiers!.some((specifier) => {
198
+ if (!j.ImportSpecifier.check(specifier)) {
199
+ return false;
200
+ }
201
+ return specifier.local?.name === elementName;
202
+ });
203
+ }),
204
+ );
205
+
206
+ if (!isPrimitiveComponent) {
207
+ return false;
208
+ }
209
+
210
+ const attributes = path.node.openingElement.attributes || [];
211
+ const props = attributes.filter((attr) => j.JSXAttribute.check(attr)) as Array<JSXAttribute>;
212
+ const hasXcssProp = props.some(
213
+ (prop) => j.JSXIdentifier.check(prop.name) && prop.name.name === 'xcss',
214
+ );
215
+
216
+ // Track xcss usage for this component type
217
+ if (!componentXcssUsage.has(elementName)) {
218
+ componentXcssUsage.set(elementName, hasXcssProp);
219
+ } else if (componentXcssUsage.get(elementName) !== hasXcssProp) {
220
+ // If we've seen this component before and the xcss usage is different, we have mixed usage
221
+ return true;
222
+ }
223
+
224
+ return false;
225
+ });
226
+
227
+ // If there's mixed xcss usage, don't transform anything
228
+ if (hasMixedXcssUsage) {
229
+ return file.source;
230
+ }
231
+
59
232
  // Find all import declarations from '@atlaskit/primitives'
60
233
  root.find(j.ImportDeclaration, { source: { value: '@atlaskit/primitives' } }).forEach((path) => {
61
- // Change the import to '@atlaskit/primitives/compiled'
234
+ // Skip type imports
235
+ if (path.node.importKind === 'type') {
236
+ return;
237
+ }
62
238
  path.node.source = j.literal('@atlaskit/primitives/compiled');
63
239
  });
64
240
 
@@ -77,21 +253,70 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
77
253
  }
78
254
  }
79
255
 
80
- // Find JSX elements for Grid, Anchor and Pressable
81
- root.find(j.JSXElement).forEach((path) => {
256
+ // Find all existing cssMap declarations
257
+ const existingCssMapDeclarations = new Map<string, string>();
258
+ root.find(j.VariableDeclaration).forEach((path) => {
259
+ const declaration = path.node.declarations[0];
260
+ if (
261
+ j.VariableDeclarator.check(declaration) &&
262
+ j.Identifier.check(declaration.id) &&
263
+ j.CallExpression.check(declaration.init) &&
264
+ j.Identifier.check(declaration.init.callee) &&
265
+ declaration.init.callee.name === cssMapName
266
+ ) {
267
+ existingCssMapDeclarations.set(declaration.id.name, declaration.id.name);
268
+ }
269
+ });
270
+
271
+ // Find all JSX elements
272
+ const jsxElements = root.find(j.JSXElement).paths();
273
+ const processedComponentTypes = new Map<
274
+ string,
275
+ { name: string; declaration: VariableDeclaration }
276
+ >();
277
+
278
+ // Add token import if needed
279
+ let needsTokenImport = false;
280
+
281
+ jsxElements.forEach((path) => {
82
282
  if (!j.JSXIdentifier.check(path.node.openingElement.name)) {
83
283
  return;
84
284
  }
85
285
 
86
286
  const elementName = path.node.openingElement.name.name;
87
- if (elementName !== 'Grid' && elementName !== 'Anchor' && elementName !== 'Pressable') {
287
+
288
+ // Find if this component is imported from @atlaskit/primitives or @atlaskit/primitives/compiled
289
+ const isPrimitiveComponent = PRIMITIVES_IMPORT_SOURCES.some((importSource) =>
290
+ root.find(j.ImportDeclaration, { source: { value: importSource } }).some((importPath) => {
291
+ return importPath.node.specifiers!.some((specifier) => {
292
+ if (!j.ImportSpecifier.check(specifier)) {
293
+ return false;
294
+ }
295
+ return specifier.local?.name === elementName;
296
+ });
297
+ }),
298
+ );
299
+
300
+ if (!isPrimitiveComponent) {
88
301
  return;
89
302
  }
90
303
 
91
304
  const attributes = path.node.openingElement.attributes || [];
92
305
  const props = attributes.filter((attr) => j.JSXAttribute.check(attr)) as Array<JSXAttribute>;
93
306
 
94
- const xcssProps = elementName === 'Grid' ? GRID_XCSS_PROPS : ANCHOR_PRESSABLE_XCSS_PROPS;
307
+ // Skip if component already has xcss prop
308
+ const hasXcss = props.some(
309
+ (prop) => j.JSXIdentifier.check(prop.name) && prop.name.name === 'xcss',
310
+ );
311
+
312
+ if (hasXcss) {
313
+ return;
314
+ }
315
+
316
+ const xcssProps =
317
+ elementName === 'Grid'
318
+ ? [...GRID_XCSS_PROPS, ...ANCHOR_PRESSABLE_XCSS_PROPS]
319
+ : ANCHOR_PRESSABLE_XCSS_PROPS;
95
320
  const propsToTransform = props.filter(
96
321
  (prop) => j.JSXIdentifier.check(prop.name) && xcssProps.includes(prop.name.name),
97
322
  );
@@ -105,6 +330,45 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
105
330
  // Create styles variable name
106
331
  const stylesName = `${elementName.toLowerCase()}Styles`;
107
332
 
333
+ // Skip if we've already processed this component type
334
+ if (processedComponentTypes.has(elementName)) {
335
+ // Use existing styles
336
+ const existingStyles = processedComponentTypes.get(elementName)!;
337
+ // Remove transformed props and add xcss prop
338
+ propsToTransform.forEach((prop) => {
339
+ const index = attributes.indexOf(prop);
340
+ attributes.splice(index, 1);
341
+ });
342
+ attributes.push(
343
+ j.jsxAttribute(
344
+ j.jsxIdentifier('xcss'),
345
+ j.jsxExpressionContainer(
346
+ j.memberExpression(j.identifier(existingStyles.name), j.identifier('root')),
347
+ ),
348
+ ),
349
+ );
350
+ return;
351
+ }
352
+
353
+ // Skip if we already have a cssMap declaration for this component type
354
+ if (existingCssMapDeclarations.has(stylesName)) {
355
+ // Remove transformed props and add xcss prop
356
+ propsToTransform.forEach((prop) => {
357
+ const index = attributes.indexOf(prop);
358
+ attributes.splice(index, 1);
359
+ });
360
+
361
+ attributes.push(
362
+ j.jsxAttribute(
363
+ j.jsxIdentifier('xcss'),
364
+ j.jsxExpressionContainer(
365
+ j.memberExpression(j.identifier(stylesName), j.identifier('root')),
366
+ ),
367
+ ),
368
+ );
369
+ return;
370
+ }
371
+
108
372
  // Create cssMap declaration
109
373
  const styleObj = j.objectExpression(
110
374
  propsToTransform.map((prop) => {
@@ -127,6 +391,15 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
127
391
  return j.objectProperty(j.identifier(cssPropName), prop.value.expression);
128
392
  }
129
393
 
394
+ // Only wrap string values in token() if they're not grid props
395
+ if (j.StringLiteral.check(prop.value) && !propName.startsWith('template')) {
396
+ needsTokenImport = true;
397
+ return j.objectProperty(
398
+ j.identifier(cssPropName),
399
+ j.callExpression(j.identifier('token'), [prop.value]),
400
+ );
401
+ }
402
+
130
403
  return j.objectProperty(j.identifier(cssPropName), prop.value);
131
404
  }),
132
405
  );
@@ -140,50 +413,35 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
140
413
  ),
141
414
  ]);
142
415
 
143
- const importDeclaration = root.find(j.ImportDeclaration, {
144
- source: { value: '@atlaskit/primitives/compiled' },
145
- });
146
-
147
- if (importDeclaration.length > 0) {
148
- // insert after the last import declaration
149
- const imports = root.find(j.ImportDeclaration);
150
- const lastImport = imports.at(imports.length - 1);
151
-
152
- const cssMapDeclaration = root
153
- .find(j.VariableDeclaration)
154
- // @ts-expect-error
155
- .filter((path) => path.node.declarations[0].id.name === stylesName);
156
-
157
- if (lastImport && !cssMapDeclaration.length) {
158
- lastImport.insertAfter(cssMapDecl);
159
- }
160
- }
416
+ processedComponentTypes.set(elementName, { name: stylesName, declaration: cssMapDecl });
161
417
 
162
- // Remove transformed props and add xcss prop
418
+ // Remove all props and add xcss prop
163
419
  propsToTransform.forEach((prop) => {
164
420
  const index = attributes.indexOf(prop);
165
421
  attributes.splice(index, 1);
166
422
  });
167
423
 
168
- const existingXcss = props.find(
169
- (prop) => j.JSXIdentifier.check(prop.name) && prop.name.name === 'xcss',
170
- );
171
-
172
- const xcssValue = existingXcss
173
- ? j.arrayExpression([
424
+ attributes.push(
425
+ j.jsxAttribute(
426
+ j.jsxIdentifier('xcss'),
427
+ j.jsxExpressionContainer(
174
428
  j.memberExpression(j.identifier(stylesName), j.identifier('root')),
175
- // @ts-expect-error
176
- existingXcss.value.expression,
177
- ])
178
- : j.memberExpression(j.identifier(stylesName), j.identifier('root'));
179
-
180
- if (existingXcss) {
181
- existingXcss.value = j.jsxExpressionContainer(xcssValue);
182
- } else {
183
- attributes.push(j.jsxAttribute(j.jsxIdentifier('xcss'), j.jsxExpressionContainer(xcssValue)));
184
- }
429
+ ),
430
+ ),
431
+ );
185
432
  });
186
433
 
434
+ // Insert cssMap declarations after the last import declaration
435
+ const imports = root.find(j.ImportDeclaration);
436
+ const lastImport = imports.at(imports.length - 1);
437
+
438
+ if (lastImport) {
439
+ // Insert declarations in the order they were first encountered
440
+ Array.from(processedComponentTypes.values()).forEach(({ declaration }) => {
441
+ lastImport.insertAfter(declaration);
442
+ });
443
+ }
444
+
187
445
  // Add cssMap import if needed
188
446
  if (needsCssMapImport && cssMapImport.length === 0) {
189
447
  root
@@ -196,6 +454,18 @@ function transform(file: FileInfo, { jscodeshift: j }: API) {
196
454
  );
197
455
  }
198
456
 
457
+ // Add token import if needed
458
+ if (needsTokenImport) {
459
+ root
460
+ .get()
461
+ .node.program.body.unshift(
462
+ j.importDeclaration(
463
+ [j.importSpecifier(j.identifier('token'))],
464
+ j.literal('@atlaskit/tokens'),
465
+ ),
466
+ );
467
+ }
468
+
199
469
  return root.toSource({ quote: 'single' });
200
470
  }
201
471
 
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/compiled/index.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/compiled/index.d.ts"
14
14
  ]
@@ -71,7 +71,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
71
71
  action: 'clicked',
72
72
  componentName: componentName || 'Anchor',
73
73
  packageName: "@atlaskit/primitives",
74
- packageVersion: "14.11.2",
74
+ packageVersion: "14.11.4",
75
75
  analyticsData: analyticsContext,
76
76
  actionSubject: 'link'
77
77
  });
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
61
61
  action: 'clicked',
62
62
  componentName: componentName || 'Pressable',
63
63
  packageName: "@atlaskit/primitives",
64
- packageVersion: "14.11.2",
64
+ packageVersion: "14.11.4",
65
65
  analyticsData: analyticsContext,
66
66
  actionSubject: 'button'
67
67
  });
@@ -104,7 +104,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
104
104
  action: 'clicked',
105
105
  componentName: componentName || 'Anchor',
106
106
  packageName: "@atlaskit/primitives",
107
- packageVersion: "14.11.2",
107
+ packageVersion: "14.11.4",
108
108
  analyticsData: analyticsContext,
109
109
  actionSubject: 'link'
110
110
  });
@@ -95,7 +95,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
95
95
  action: 'clicked',
96
96
  componentName: componentName || 'Pressable',
97
97
  packageName: "@atlaskit/primitives",
98
- packageVersion: "14.11.2",
98
+ packageVersion: "14.11.4",
99
99
  analyticsData: analyticsContext,
100
100
  actionSubject: 'button'
101
101
  });
@@ -474,26 +474,44 @@ var layerMap = exports.layerMap = {
474
474
 
475
475
  /**
476
476
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
477
- * @codegen <<SignedSource::957baf1fa3fc3fe5eb06b497a7ba6599>>
477
+ * @codegen <<SignedSource::71788d573ebf1ca2644ef177172c9ecf>>
478
478
  * @codegenId border
479
479
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
480
480
  * @codegenParams ["width", "radius"]
481
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::80457377fd80c31f5dfcb5cc743d7016>>
481
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::6496556b3439a7f18f8b7a7a3ec59bb9>>
482
482
  */
483
483
  var borderWidthMap = exports.borderWidthMap = {
484
484
  'border.width': "var(--ds-border-width, 1px)",
485
+ // @deprecated
485
486
  'border.width.0': "var(--ds-border-width-0, 0px)",
487
+ // @deprecated
486
488
  'border.width.indicator': "var(--ds-border-width-indicator, 3px)",
487
- 'border.width.outline': "var(--ds-border-width-outline, 2px)"
489
+ // @deprecated
490
+ 'border.width.outline': "var(--ds-border-width-outline, 2px)",
491
+ 'border.width.selected': "var(--ds-border-width-selected, 2px)",
492
+ 'border.width.focused': "var(--ds-border-width-focused, 2px)"
488
493
  };
489
494
  var borderRadiusMap = exports.borderRadiusMap = {
490
- 'border.radius.050': "var(--ds-border-radius-050, 2px)",
495
+ 'radius.xsmall': "var(--ds-radius-xsmall, 2px)",
496
+ 'radius.small': "var(--ds-radius-small, 3px)",
497
+ 'radius.medium': "var(--ds-radius-medium, 6px)",
498
+ 'radius.large': "var(--ds-radius-large, 8px)",
499
+ 'radius.xlarge': "var(--ds-radius-xlarge, 12px)",
500
+ 'radius.full': "var(--ds-radius-full, 9999px)",
501
+ // @deprecated
491
502
  'border.radius': "var(--ds-border-radius, 3px)",
503
+ // @deprecated
504
+ 'border.radius.050': "var(--ds-border-radius-050, 2px)",
505
+ // @deprecated
492
506
  'border.radius.100': "var(--ds-border-radius-100, 3px)",
507
+ // @deprecated
493
508
  'border.radius.200': "var(--ds-border-radius-200, 8px)",
509
+ // @deprecated
494
510
  'border.radius.300': "var(--ds-border-radius-300, 12px)",
511
+ // @deprecated
495
512
  'border.radius.400': "var(--ds-border-radius-400, 16px)",
496
- 'border.radius.circle': "var(--ds-border-radius-circle, 32032px)"
513
+ // @deprecated
514
+ 'border.radius.circle': "var(--ds-border-radius-circle, 9999px)"
497
515
  };
498
516
  /**
499
517
  * @codegenEnd
@@ -57,7 +57,7 @@ const AnchorNoRef = ({
57
57
  action: 'clicked',
58
58
  componentName: componentName || 'Anchor',
59
59
  packageName: "@atlaskit/primitives",
60
- packageVersion: "14.11.2",
60
+ packageVersion: "14.11.4",
61
61
  analyticsData: analyticsContext,
62
62
  actionSubject: 'link'
63
63
  });
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
48
48
  action: 'clicked',
49
49
  componentName: componentName || 'Pressable',
50
50
  packageName: "@atlaskit/primitives",
51
- packageVersion: "14.11.2",
51
+ packageVersion: "14.11.4",
52
52
  analyticsData: analyticsContext,
53
53
  actionSubject: 'button'
54
54
  });
@@ -94,7 +94,7 @@ const AnchorNoRef = ({
94
94
  action: 'clicked',
95
95
  componentName: componentName || 'Anchor',
96
96
  packageName: "@atlaskit/primitives",
97
- packageVersion: "14.11.2",
97
+ packageVersion: "14.11.4",
98
98
  analyticsData: analyticsContext,
99
99
  actionSubject: 'link'
100
100
  });
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
85
85
  action: 'clicked',
86
86
  componentName: componentName || 'Pressable',
87
87
  packageName: "@atlaskit/primitives",
88
- packageVersion: "14.11.2",
88
+ packageVersion: "14.11.4",
89
89
  analyticsData: analyticsContext,
90
90
  actionSubject: 'button'
91
91
  });