@atlaskit/css 0.19.1 → 0.19.3

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,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.1",
3
+ "version": "0.19.3",
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": "^10.0.0",
47
+ "@atlaskit/tokens": "^12.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": "^17.1.0",
56
+ "@atlaskit/button": "^23.11.0",
57
+ "@atlaskit/ds-lib": "^7.0.0",
58
+ "@atlaskit/primitives": "^18.1.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",