@atlaskit/primitives 0.1.0 → 0.2.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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/components/box.js +80 -6
- package/dist/cjs/components/inline.partial.js +22 -46
- package/dist/cjs/components/internal/base-box.partial.js +822 -0
- package/dist/cjs/components/stack.partial.js +22 -46
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.js +75 -1
- package/dist/es2019/components/inline.partial.js +20 -20
- package/dist/es2019/components/internal/base-box.partial.js +839 -0
- package/dist/es2019/components/stack.partial.js +20 -20
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.js +77 -1
- package/dist/esm/components/inline.partial.js +21 -46
- package/dist/esm/components/internal/base-box.partial.js +817 -0
- package/dist/esm/components/stack.partial.js +21 -46
- package/dist/esm/index.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.d.ts +10 -1
- package/dist/types/components/inline.partial.d.ts +18 -16
- package/dist/types/components/internal/base-box.partial.d.ts +483 -0
- package/dist/types/components/stack.partial.d.ts +18 -16
- package/dist/types/components/types.d.ts +8 -1
- package/dist/types/index.d.ts +3 -3
- package/package.json +2 -3
- package/report.api.md +505 -46
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +204 -0
- package/scripts/codegen-styles.tsx +31 -16
- package/scripts/color-codegen-template.tsx +10 -7
- package/scripts/dimension-codegen-template.tsx +14 -2
- package/scripts/misc-codegen-template.tsx +1 -1
- package/scripts/spacing-codegen-template.tsx +37 -33
- package/tmp/api-report-tmp.d.ts +466 -46
- package/dist/cjs/components/internal/box.partial.js +0 -605
- package/dist/es2019/components/internal/box.partial.js +0 -597
- package/dist/esm/components/internal/box.partial.js +0 -600
- package/dist/types/components/internal/box.partial.d.ts +0 -348
|
@@ -36,29 +36,31 @@ export declare type Spread = 'space-between';
|
|
|
36
36
|
export declare type Grow = 'hug' | 'fill';
|
|
37
37
|
/**
|
|
38
38
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
39
|
-
* @codegen <<SignedSource::
|
|
39
|
+
* @codegen <<SignedSource::0e30ffcc6aef7932f9d8ff2543327236>>
|
|
40
40
|
* @codegenId spacing
|
|
41
41
|
* @codegenCommand yarn codegen-styles
|
|
42
42
|
* @codegenParams ["space"]
|
|
43
43
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::167d3b69b159ae33e74d4ea5ab7eade6>>
|
|
44
44
|
*/
|
|
45
45
|
declare const spaceMap: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
[k: string]: {
|
|
47
|
+
readonly '0': import("@emotion/react").SerializedStyles;
|
|
48
|
+
readonly '025': import("@emotion/react").SerializedStyles;
|
|
49
|
+
readonly '050': import("@emotion/react").SerializedStyles;
|
|
50
|
+
readonly '075': import("@emotion/react").SerializedStyles;
|
|
51
|
+
readonly '100': import("@emotion/react").SerializedStyles;
|
|
52
|
+
readonly '150': import("@emotion/react").SerializedStyles;
|
|
53
|
+
readonly '200': import("@emotion/react").SerializedStyles;
|
|
54
|
+
readonly '250': import("@emotion/react").SerializedStyles;
|
|
55
|
+
readonly '300': import("@emotion/react").SerializedStyles;
|
|
56
|
+
readonly '400': import("@emotion/react").SerializedStyles;
|
|
57
|
+
readonly '500': import("@emotion/react").SerializedStyles;
|
|
58
|
+
readonly '600': import("@emotion/react").SerializedStyles;
|
|
59
|
+
readonly '800': import("@emotion/react").SerializedStyles;
|
|
60
|
+
readonly '1000': import("@emotion/react").SerializedStyles;
|
|
61
|
+
};
|
|
60
62
|
};
|
|
61
|
-
export declare type Space = keyof typeof spaceMap;
|
|
63
|
+
export declare type Space = keyof typeof spaceMap.gap;
|
|
62
64
|
/**
|
|
63
65
|
* __Stack__
|
|
64
66
|
*
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Restricted set of inline styles to be applied to the primitive.
|
|
4
|
+
* Should be avoided where possible, in favor of the pre-defined props and values on the primitive itself.
|
|
5
|
+
* Tokens should be used where possible.
|
|
6
|
+
*/
|
|
7
|
+
export declare type CustomStyles = Pick<CSSProperties, 'flexBasis' | 'flex' | 'width' | 'height' | 'minWidth' | 'maxWidth' | 'minHeight' | 'maxHeight' | 'insetInlineStart' | 'insetInlineEnd' | 'insetBlockStart' | 'float' | 'margin' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInline' | 'marginBlock' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'paddingBottom'>;
|
|
2
8
|
export interface BasePrimitiveProps {
|
|
3
9
|
/**
|
|
4
10
|
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
@@ -7,7 +13,8 @@ export interface BasePrimitiveProps {
|
|
|
7
13
|
/**
|
|
8
14
|
* Inline styles to be applied to the primitive.
|
|
9
15
|
* Marked as "unsafe" because any CSS properties can be provided here without any extra control or validation, including those that would be better managed by the primitive itself via props.
|
|
10
|
-
* Effectively equivalent to the standard `style` prop but marked with a special name
|
|
16
|
+
* Effectively equivalent to the standard `style` prop but marked with a special name.
|
|
17
|
+
* Used only internally.
|
|
11
18
|
*/
|
|
12
19
|
UNSAFE_style?: CSSProperties;
|
|
13
20
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { default as
|
|
1
|
+
export { Box, type BoxProps } from './components/box';
|
|
2
|
+
export { default as Inline, type InlineProps, } from './components/inline.partial';
|
|
3
|
+
export { default as Stack, type StackProps } from './components/stack.partial';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"./inline": "./src/components/inline.partial.tsx"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@atlaskit/
|
|
41
|
-
"@atlaskit/tokens": "^1.1.0",
|
|
40
|
+
"@atlaskit/tokens": "^1.2.0",
|
|
42
41
|
"@babel/runtime": "^7.0.0",
|
|
43
42
|
"@emotion/react": "^11.7.1"
|
|
44
43
|
},
|