@atlaskit/primitives 0.9.0 → 0.9.2
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 +12 -0
- package/README.md +6 -2
- package/box/package.json +2 -2
- package/constellation/box/code.mdx +6 -2
- package/constellation/box/usage.mdx +30 -0
- package/constellation/inline/code.mdx +1 -1
- package/constellation/inline/usage.mdx +36 -0
- package/constellation/overview/images/box-usage-example.png +0 -0
- package/constellation/overview/images/inline-usage-example.png +0 -0
- package/constellation/overview/images/stack-usage-example.png +0 -0
- package/constellation/overview/index.mdx +66 -0
- package/constellation/stack/code.mdx +1 -1
- package/constellation/stack/usage.mdx +31 -0
- package/constellation/xcss/examples.mdx +21 -0
- package/constellation/xcss/logo.png +0 -0
- package/constellation/xcss/migration.mdx +142 -0
- package/constellation/xcss/usage.mdx +115 -0
- package/dist/cjs/components/box.js +1 -1
- package/dist/cjs/components/inline.js +1 -1
- package/dist/cjs/components/internal/base-box.js +1 -1
- package/dist/cjs/components/stack.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/{internal → xcss}/style-maps.partial.js +13 -43
- package/dist/cjs/{internal → xcss}/xcss.js +38 -26
- package/dist/es2019/components/box.js +1 -1
- package/dist/es2019/components/inline.js +1 -1
- package/dist/es2019/components/internal/base-box.js +1 -1
- package/dist/es2019/components/stack.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/{internal → xcss}/style-maps.partial.js +12 -40
- package/dist/es2019/{internal → xcss}/xcss.js +38 -25
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/inline.js +1 -1
- package/dist/esm/components/internal/base-box.js +1 -1
- package/dist/esm/components/stack.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/{internal → xcss}/style-maps.partial.js +12 -40
- package/dist/esm/{internal → xcss}/xcss.js +39 -27
- package/dist/types/components/box.d.ts +2 -2
- package/dist/types/components/inline.d.ts +7 -7
- package/dist/types/components/internal/base-box.d.ts +15 -14
- package/dist/types/components/stack.d.ts +6 -6
- package/dist/types/components/types.d.ts +3 -3
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/responsive/types.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/{internal → xcss}/style-maps.partial.d.ts +81 -130
- package/dist/types/xcss/xcss.d.ts +57 -0
- package/extract-react-types/box-props.tsx +95 -0
- package/extract-react-types/inline-props.tsx +86 -1
- package/extract-react-types/stack-props.tsx +70 -1
- package/inline/package.json +2 -2
- package/package.json +25 -8
- package/report.api.md +94 -354
- package/responsive/package.json +2 -2
- package/scripts/codegen-file-templates/dimensions.tsx +17 -16
- package/scripts/codegen-styles.tsx +2 -2
- package/scripts/spacing-codegen-template.tsx +24 -91
- package/stack/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +649 -0
- package/constellation/overview/examples.mdx +0 -7
- package/dist/cjs/components/internal/extract-react-types/inline-props.js +0 -7
- package/dist/cjs/components/internal/extract-react-types/stack-props.js +0 -7
- package/dist/es2019/components/internal/extract-react-types/inline-props.js +0 -1
- package/dist/es2019/components/internal/extract-react-types/stack-props.js +0 -1
- package/dist/esm/components/internal/extract-react-types/inline-props.js +0 -1
- package/dist/esm/components/internal/extract-react-types/stack-props.js +0 -1
- package/dist/types/components/internal/extract-react-types/inline-props.d.ts +0 -2
- package/dist/types/components/internal/extract-react-types/stack-props.d.ts +0 -2
- package/dist/types/internal/xcss.d.ts +0 -50
|
@@ -1,3 +1,72 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
AlignBlock,
|
|
5
|
+
AlignInline,
|
|
6
|
+
Grow,
|
|
7
|
+
Spread,
|
|
8
|
+
} from '../src/components/stack';
|
|
9
|
+
|
|
10
|
+
type Space =
|
|
11
|
+
| 'space.0'
|
|
12
|
+
| 'space.025'
|
|
13
|
+
| 'space.050'
|
|
14
|
+
| 'space.075'
|
|
15
|
+
| 'space.100'
|
|
16
|
+
| 'space.150'
|
|
17
|
+
| 'space.200'
|
|
18
|
+
| 'space.250'
|
|
19
|
+
| 'space.300'
|
|
20
|
+
| 'space.400'
|
|
21
|
+
| 'space.500'
|
|
22
|
+
| 'space.600'
|
|
23
|
+
| 'space.800'
|
|
24
|
+
| 'space.1000';
|
|
25
|
+
|
|
26
|
+
interface StackProps<T extends ElementType = 'div'> {
|
|
27
|
+
/**
|
|
28
|
+
* The DOM element to render as the Stack. Defaults to `div`.
|
|
29
|
+
*/
|
|
30
|
+
as?: 'div' | 'span' | 'ul' | 'ol';
|
|
31
|
+
/**
|
|
32
|
+
* Used to align children along the main axis.
|
|
33
|
+
*/
|
|
34
|
+
alignBlock?: AlignBlock;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Used to align children along the cross axis.
|
|
38
|
+
*/
|
|
39
|
+
alignInline?: AlignInline;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Used to distribute the children along the main axis.
|
|
43
|
+
*/
|
|
44
|
+
spread?: Spread;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Used to set whether the container should grow to fill the available space.
|
|
48
|
+
*/
|
|
49
|
+
grow?: Grow;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Represents the space between each child.
|
|
53
|
+
*/
|
|
54
|
+
space?: Space;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests.
|
|
58
|
+
*/
|
|
59
|
+
testId?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Elements to be rendered inside the Stack.
|
|
63
|
+
*/
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Forwarded ref element
|
|
68
|
+
*/
|
|
69
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
70
|
+
}
|
|
2
71
|
|
|
3
72
|
export default function Stack(_: StackProps) {}
|
package/inline/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"folder": "overview",
|
|
27
27
|
"slug": "primitives/overview",
|
|
28
28
|
"status": {
|
|
29
|
-
"type": "
|
|
29
|
+
"type": "closed-beta"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"slug": "primitives/box",
|
|
36
36
|
"id": "@atlaskit/primitives/box",
|
|
37
37
|
"status": {
|
|
38
|
-
"type": "
|
|
38
|
+
"type": "closed-beta"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"slug": "primitives/inline",
|
|
45
45
|
"id": "@atlaskit/primitives/inline",
|
|
46
46
|
"status": {
|
|
47
|
-
"type": "
|
|
47
|
+
"type": "closed-beta"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -53,7 +53,16 @@
|
|
|
53
53
|
"slug": "primitives/stack",
|
|
54
54
|
"id": "@atlaskit/primitives/stack",
|
|
55
55
|
"status": {
|
|
56
|
-
"type": "
|
|
56
|
+
"type": "closed-beta"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"title": "xCSS",
|
|
61
|
+
"folder": "xcss",
|
|
62
|
+
"slug": "primitives/xcss",
|
|
63
|
+
"id": "@atlaskit/primitives/xcss",
|
|
64
|
+
"status": {
|
|
65
|
+
"type": "closed-beta"
|
|
57
66
|
}
|
|
58
67
|
}
|
|
59
68
|
]
|
|
@@ -66,6 +75,14 @@
|
|
|
66
75
|
"module": "dist/esm/index.js",
|
|
67
76
|
"module:es2019": "dist/es2019/index.js",
|
|
68
77
|
"types": "dist/types/index.d.ts",
|
|
78
|
+
"typesVersions": {
|
|
79
|
+
">=4.5 <4.9": {
|
|
80
|
+
"*": [
|
|
81
|
+
"dist/types-ts4.5/*",
|
|
82
|
+
"dist/types-ts4.5/index.d.ts"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
69
86
|
"sideEffects": false,
|
|
70
87
|
"atlaskit:src": "src/index.tsx",
|
|
71
88
|
"af:exports": {
|
|
@@ -77,7 +94,7 @@
|
|
|
77
94
|
},
|
|
78
95
|
"dependencies": {
|
|
79
96
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
80
|
-
"@atlaskit/tokens": "^1.
|
|
97
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
81
98
|
"@babel/runtime": "^7.0.0",
|
|
82
99
|
"@emotion/react": "^11.7.1",
|
|
83
100
|
"@emotion/serialize": "^1.1.0"
|
|
@@ -107,13 +124,13 @@
|
|
|
107
124
|
"@atlaskit/webdriver-runner": "*",
|
|
108
125
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
109
126
|
"@atlassian/codegen": "^0.1.0",
|
|
110
|
-
"@atlassian/gemini-visual-regression": "^0.0.
|
|
127
|
+
"@atlassian/gemini-visual-regression": "^0.0.12",
|
|
111
128
|
"@testing-library/react": "^12.1.5",
|
|
112
129
|
"csstype": "^3.1.0",
|
|
113
130
|
"prettier": "^2.8.0",
|
|
114
131
|
"react-dom": "^16.8.0",
|
|
115
132
|
"ts-node": "^10.9.1",
|
|
116
|
-
"typescript": "4.
|
|
133
|
+
"typescript": "~4.9.5",
|
|
117
134
|
"wait-for-expect": "^1.2.0"
|
|
118
135
|
},
|
|
119
136
|
"techstack": {
|