@atlaskit/primitives 0.9.1 → 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 +6 -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/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/usage.mdx +31 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +13 -43
- package/dist/cjs/xcss/xcss.js +19 -19
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +12 -40
- package/dist/es2019/xcss/xcss.js +20 -20
- package/dist/esm/version.json +1 -1
- package/dist/esm/xcss/style-maps.partial.js +12 -40
- package/dist/esm/xcss/xcss.js +20 -20
- 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 +2 -2
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/responsive/types.d.ts +4 -4
- package/dist/types/xcss/style-maps.partial.d.ts +79 -131
- package/dist/types/xcss/xcss.d.ts +11 -11
- 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 +18 -10
- package/report.api.md +87 -350
- 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 +74 -99
- package/constellation/overview/examples.mdx +0 -7
|
@@ -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,7 @@
|
|
|
53
53
|
"slug": "primitives/stack",
|
|
54
54
|
"id": "@atlaskit/primitives/stack",
|
|
55
55
|
"status": {
|
|
56
|
-
"type": "
|
|
56
|
+
"type": "closed-beta"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"slug": "primitives/xcss",
|
|
63
63
|
"id": "@atlaskit/primitives/xcss",
|
|
64
64
|
"status": {
|
|
65
|
-
"type": "
|
|
65
|
+
"type": "closed-beta"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
]
|
|
@@ -75,6 +75,14 @@
|
|
|
75
75
|
"module": "dist/esm/index.js",
|
|
76
76
|
"module:es2019": "dist/es2019/index.js",
|
|
77
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
|
+
},
|
|
78
86
|
"sideEffects": false,
|
|
79
87
|
"atlaskit:src": "src/index.tsx",
|
|
80
88
|
"af:exports": {
|
|
@@ -86,7 +94,7 @@
|
|
|
86
94
|
},
|
|
87
95
|
"dependencies": {
|
|
88
96
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
89
|
-
"@atlaskit/tokens": "^1.
|
|
97
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
90
98
|
"@babel/runtime": "^7.0.0",
|
|
91
99
|
"@emotion/react": "^11.7.1",
|
|
92
100
|
"@emotion/serialize": "^1.1.0"
|
|
@@ -116,13 +124,13 @@
|
|
|
116
124
|
"@atlaskit/webdriver-runner": "*",
|
|
117
125
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
118
126
|
"@atlassian/codegen": "^0.1.0",
|
|
119
|
-
"@atlassian/gemini-visual-regression": "^0.0.
|
|
127
|
+
"@atlassian/gemini-visual-regression": "^0.0.12",
|
|
120
128
|
"@testing-library/react": "^12.1.5",
|
|
121
129
|
"csstype": "^3.1.0",
|
|
122
130
|
"prettier": "^2.8.0",
|
|
123
131
|
"react-dom": "^16.8.0",
|
|
124
132
|
"ts-node": "^10.9.1",
|
|
125
|
-
"typescript": "4.
|
|
133
|
+
"typescript": "~4.9.5",
|
|
126
134
|
"wait-for-expect": "^1.2.0"
|
|
127
135
|
},
|
|
128
136
|
"techstack": {
|
|
@@ -151,4 +159,4 @@
|
|
|
151
159
|
}
|
|
152
160
|
},
|
|
153
161
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
154
|
-
}
|
|
162
|
+
}
|