@atlaskit/css 0.19.2 → 0.19.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/css
2
2
 
3
+ ## 0.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.19.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 0.19.2
4
16
 
5
17
  ### Patch Changes
@@ -47,8 +47,11 @@ const styleMaps = {
47
47
  ...textWeightMap,
48
48
  };
49
49
 
50
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
51
- export default function transformer(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) {
50
+ export default function transformer(
51
+ fileInfo: FileInfo,
52
+ { jscodeshift: j }: API,
53
+ _options: Options,
54
+ ): string | undefined {
52
55
  const base = j(fileInfo.source);
53
56
 
54
57
  // replace xcss with cssMap
@@ -1373,7 +1373,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
1373
1373
 
1374
1374
  /**
1375
1375
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
1376
- * @codegen <<SignedSource::64331f0b8b5e2f090a3aad153d92deb6>>
1376
+ * @codegen <<SignedSource::6dffa08c1104af4093361cb0f7e37996>>
1377
1377
  * @codegenId typography
1378
1378
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
1379
1379
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -1382,7 +1382,6 @@ export type BorderRadius = keyof typeof borderRadiusMap;
1382
1382
  */
1383
1383
  export const fontMap: {
1384
1384
  'font.body': 'var(--ds-font-body)';
1385
- 'font.body.UNSAFE_small': 'var(--ds-font-body-UNSAFE_small)';
1386
1385
  'font.body.large': 'var(--ds-font-body-large)';
1387
1386
  'font.body.small': 'var(--ds-font-body-small)';
1388
1387
  'font.code': 'var(--ds-font-code)';
@@ -1401,11 +1400,6 @@ export const fontMap: {
1401
1400
  'font.body',
1402
1401
  'normal 400 14px/20px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1403
1402
  ),
1404
- // @deprecated
1405
- 'font.body.UNSAFE_small': token(
1406
- 'font.body.UNSAFE_small',
1407
- 'normal 400 12px/16px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1408
- ),
1409
1403
  'font.body.large': token(
1410
1404
  'font.body.large',
1411
1405
  'normal 400 16px/24px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
@@ -1513,7 +1507,7 @@ export type FontFamily = keyof typeof fontFamilyMap;
1513
1507
 
1514
1508
  /**
1515
1509
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
1516
- * @codegen <<SignedSource::aeebc24b95e2189021f1d98f1715a6a0>>
1510
+ * @codegen <<SignedSource::b67a50fa5abb078032598ba819a6f691>>
1517
1511
  * @codegenId text
1518
1512
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
1519
1513
  * @codegenDependency ../../../primitives/scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
@@ -1521,7 +1515,6 @@ export type FontFamily = keyof typeof fontFamilyMap;
1521
1515
  */
1522
1516
  export const textSizeMap: {
1523
1517
  medium: 'var(--ds-font-body)';
1524
- UNSAFE_small: 'var(--ds-font-body-UNSAFE_small)';
1525
1518
  large: 'var(--ds-font-body-large)';
1526
1519
  small: 'var(--ds-font-body-small)';
1527
1520
  } = {
@@ -1529,10 +1522,6 @@ export const textSizeMap: {
1529
1522
  'font.body',
1530
1523
  'normal 400 14px/20px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1531
1524
  ),
1532
- UNSAFE_small: token(
1533
- 'font.body.UNSAFE_small',
1534
- 'normal 400 12px/16px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1535
- ),
1536
1525
  large: token(
1537
1526
  'font.body.large',
1538
1527
  'normal 400 16px/24px "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
@@ -1,6 +1,11 @@
1
1
  import primitivesEmotionToCompiled from './0.5.2-primitives-emotion-to-compiled';
2
2
 
3
- const config = {
3
+ const config: {
4
+ presets: {
5
+ 'primitives-emotion-to-compiled': typeof primitivesEmotionToCompiled;
6
+ };
7
+ dependencies: string[];
8
+ } = {
4
9
  presets: {
5
10
  'primitives-emotion-to-compiled': primitivesEmotionToCompiled,
6
11
  },
@@ -18,7 +18,7 @@ import SectionMessage from '@atlaskit/section-message';
18
18
 
19
19
  We have a codemod available to support this migration, but there are some breaking changes between
20
20
  Emotion and Compiled, such as dynamic styles or imports. Please use the
21
- [UI Styling Standard ESLint Plugin](/components/eslint-plugin-ui-styling-standard/) to guide you.
21
+ [UI Styling Standard ESLint Plugin](/components/eslint-plugin-ui-styling-standard) to guide you.
22
22
 
23
23
  ## Codemod
24
24
 
@@ -34,7 +34,7 @@ For configuration details, see our
34
34
  at Atlassian.
35
35
 
36
36
  This is a strictly bounded variant designed to align the use of
37
- [Design System tokens](<(/components/tokens/all-tokens)>) and properties. You cannot use arbitrary
37
+ [Design System tokens](/components/tokens/all-tokens) and properties. You cannot use arbitrary
38
38
  values, such as `color: 'rgba(123, 45, 67)'` nor `padding: 8`. Typically, only tokenized values are
39
39
  allowed. Additionally, there are some restrictions, such as `zIndex`, which only supports a limited
40
40
  set of numeric values.
package/css.docs.tsx ADDED
@@ -0,0 +1,86 @@
1
+ import path from 'path';
2
+
3
+ import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
4
+
5
+ const documentation: ComponentStructuredContentSource[] = [
6
+ {
7
+ name: 'css',
8
+ description: 'A typed variant of Compiled CSS-in-JS adhering to the Atlassian Design System.',
9
+ status: 'open-beta',
10
+ import: {
11
+ name: 'css',
12
+ package: '@atlaskit/css',
13
+ type: 'named',
14
+ packagePath: path.resolve(__dirname),
15
+ packageJson: require('./package.json'),
16
+ },
17
+ usageGuidelines: [
18
+ 'Prefer `cssMap` for CSS-in-JS styling',
19
+ "Use typescript to infer most things, eg. which media queries you're allowed to use",
20
+ 'If the typescript bounding is too restrictive, you can use the `@compiled/react` library instead',
21
+ ],
22
+ examples: [
23
+ {
24
+ name: 'Css',
25
+ description: 'Css example',
26
+ source: path.resolve(__dirname, './examples/ai/css.tsx'),
27
+ },
28
+ ],
29
+ keywords: ['css', 'styles', 'theme', 'styling', 'utilities'],
30
+ categories: ['utility'],
31
+ },
32
+ {
33
+ name: 'cssMap',
34
+ description: 'A typed variant of Compiled CSS-in-JS adhering to the Atlassian Design System.',
35
+ status: 'open-beta',
36
+ import: {
37
+ name: 'cssMap',
38
+ package: '@atlaskit/css',
39
+ type: 'named',
40
+ packagePath: path.resolve(__dirname),
41
+ packageJson: require('./package.json'),
42
+ },
43
+ usageGuidelines: [
44
+ 'This is the primary way to define styles in a more structured manner than `css`',
45
+ "Use typescript to infer most things, eg. which media queries you're allowed to use",
46
+ 'If the typescript bounding is too restrictive, you can use the `@compiled/react` library instead',
47
+ 'You MUST use this when working with an `xcss` prop as `css` does not work there',
48
+ ],
49
+ examples: [
50
+ {
51
+ name: 'Css Map',
52
+ description: 'Css Map example',
53
+ source: path.resolve(__dirname, './examples/ai/css-map.tsx'),
54
+ },
55
+ ],
56
+ keywords: ['css', 'styles', 'theme', 'styling', 'utilities'],
57
+ categories: ['utility'],
58
+ },
59
+ {
60
+ name: 'cx',
61
+ description: 'A function for combining styles in an `xcss` prop to maintain correct typing.',
62
+ status: 'open-beta',
63
+ import: {
64
+ name: 'cx',
65
+ package: '@atlaskit/css',
66
+ type: 'named',
67
+ packagePath: path.resolve(__dirname),
68
+ packageJson: require('./package.json'),
69
+ },
70
+ usageGuidelines: [
71
+ 'Use this to combine styles in an `xcss` prop to maintain correct typing, eg. `cx(styles.root, styles.bordered)`',
72
+ 'This is not required for native elements which should use `[]` instead, eg. `[styles.root, styles.bordered]`',
73
+ ],
74
+ examples: [
75
+ {
76
+ name: 'Cx',
77
+ description: 'Cx example',
78
+ source: path.resolve(__dirname, './examples/ai/cx.tsx'),
79
+ },
80
+ ],
81
+ keywords: ['css', 'styles', 'theme', 'styling', 'utilities'],
82
+ categories: ['utility'],
83
+ },
84
+ ];
85
+
86
+ export default documentation;
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { createStrictAPI } from '@compiled/react';
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { createStrictAPI } from '@compiled/react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/css",
3
- "version": "0.19.2",
3
+ "version": "0.19.4",
4
4
  "description": "Style components backed by Atlassian Design System design tokens powered by Compiled CSS-in-JS.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,18 +44,19 @@
44
44
  ],
45
45
  "atlaskit:src": "src/index.tsx",
46
46
  "dependencies": {
47
- "@atlaskit/tokens": "^11.0.0",
47
+ "@atlaskit/tokens": "^13.0.0",
48
48
  "@babel/runtime": "^7.0.0",
49
- "@compiled/react": "^0.18.6"
49
+ "@compiled/react": "^0.20.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "^18.2.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@af/visual-regression": "workspace:^",
56
- "@atlaskit/button": "^23.9.0",
57
- "@atlaskit/ds-lib": "^5.3.0",
58
- "@atlaskit/primitives": "^18.0.0",
56
+ "@atlaskit/button": "^23.11.0",
57
+ "@atlaskit/ds-lib": "^7.0.0",
58
+ "@atlaskit/primitives": "^19.0.0",
59
+ "@atlassian/structured-docs-types": "workspace:^",
59
60
  "@emotion/react": "^11.7.1",
60
61
  "@testing-library/react": "^16.3.0",
61
62
  "@types/jscodeshift": "^0.11.0",