@atlaskit/ds-explorations 1.1.0 → 1.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 +7 -0
- package/dist/cjs/components/inline.partial.js +40 -17
- package/dist/cjs/components/stack.partial.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/inline.partial.js +30 -7
- package/dist/es2019/components/stack.partial.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/inline.partial.js +39 -15
- package/dist/esm/components/stack.partial.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +5 -5
- package/dist/types/components/inline.partial.d.ts +12 -3
- package/dist/types/components/stack.partial.d.ts +5 -4
- package/dist/types/components/types.d.ts +0 -1
- package/inline/package.json +15 -0
- package/package.json +4 -2
- package/report.api.md +8 -12
- package/src/components/box.partial.tsx +5 -4
- package/src/components/inline.partial.tsx +65 -44
- package/src/components/stack.partial.tsx +34 -32
- package/src/components/types.tsx +0 -2
- package/stack/package.json +15 -0
- package/tmp/api-report-tmp.d.ts +6 -10
- package/dist/types-ts4.0/components/box.partial.d.ts +0 -303
- package/dist/types-ts4.0/components/inline.partial.d.ts +0 -86
- package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +0 -49
- package/dist/types-ts4.0/components/stack.partial.d.ts +0 -80
- package/dist/types-ts4.0/components/surface-provider.d.ts +0 -15
- package/dist/types-ts4.0/components/text.partial.d.ts +0 -135
- package/dist/types-ts4.0/components/types.d.ts +0 -14
- package/dist/types-ts4.0/index.d.ts +0 -7
- package/dist/types-ts4.0/internal/color-map.d.ts +0 -36
- package/dist/types-ts4.0/internal/role-to-element.d.ts +0 -32
- package/dist/types-ts4.0/internal/spacing-scale.d.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ds-explorations
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e6fb7598867`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e6fb7598867) - Exposes additional public entrypoints for `Inline` and `Stack`.
|
|
8
|
+
Loosens the types of `children` for the `Inline`, `Stack` and `Box` as it was causing unexpected friction.
|
|
9
|
+
|
|
3
10
|
## 1.1.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -11,8 +9,6 @@ var _react = require("react");
|
|
|
11
9
|
|
|
12
10
|
var _react2 = require("@emotion/react");
|
|
13
11
|
|
|
14
|
-
var _text = _interopRequireDefault(require("./text.partial"));
|
|
15
|
-
|
|
16
12
|
/** @jsx jsx */
|
|
17
13
|
var flexAlignItemsMap = {
|
|
18
14
|
center: (0, _react2.css)({
|
|
@@ -61,33 +57,60 @@ var baseStyles = (0, _react2.css)({
|
|
|
61
57
|
boxSizing: 'border-box',
|
|
62
58
|
flexDirection: 'row'
|
|
63
59
|
});
|
|
60
|
+
var dividerStyles = (0, _react2.css)({
|
|
61
|
+
margin: '0 -2px',
|
|
62
|
+
color: "var(--ds-text-subtle, #42526E)",
|
|
63
|
+
pointerEvents: 'none'
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
var Divider = function Divider(_ref) {
|
|
67
|
+
var children = _ref.children;
|
|
68
|
+
return (0, _react2.jsx)("span", {
|
|
69
|
+
css: dividerStyles
|
|
70
|
+
}, children);
|
|
71
|
+
};
|
|
64
72
|
/**
|
|
65
73
|
* __Inline__
|
|
66
74
|
*
|
|
67
75
|
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
68
76
|
* Renders a `div` by default.
|
|
69
77
|
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* const App = () => (
|
|
81
|
+
* <Inline gap="space.100">
|
|
82
|
+
* <Button />
|
|
83
|
+
* <Button />
|
|
84
|
+
* </Inline>
|
|
85
|
+
* )
|
|
86
|
+
* ```
|
|
70
87
|
*/
|
|
71
88
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
|
|
90
|
+
var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
91
|
+
var gap = _ref2.gap,
|
|
92
|
+
alignItems = _ref2.alignItems,
|
|
93
|
+
justifyContent = _ref2.justifyContent,
|
|
94
|
+
flexWrap = _ref2.flexWrap,
|
|
95
|
+
divider = _ref2.divider,
|
|
96
|
+
UNSAFE_style = _ref2.UNSAFE_style,
|
|
97
|
+
children = _ref2.children,
|
|
98
|
+
testId = _ref2.testId;
|
|
99
|
+
var dividerComponent = typeof divider === 'string' ? (0, _react2.jsx)(Divider, null, divider) : divider;
|
|
100
|
+
|
|
101
|
+
var childrenArray = _react.Children.toArray(children).filter(Boolean);
|
|
102
|
+
|
|
82
103
|
return (0, _react2.jsx)("div", {
|
|
83
104
|
style: UNSAFE_style,
|
|
84
105
|
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
85
106
|
"data-testid": testId,
|
|
86
107
|
ref: ref
|
|
87
|
-
},
|
|
88
|
-
return (0, _react2.jsx)(_react.Fragment,
|
|
108
|
+
}, childrenArray.map(function (child, index) {
|
|
109
|
+
return (0, _react2.jsx)(_react.Fragment, {
|
|
110
|
+
key: index
|
|
111
|
+
}, divider && index > 0 ? dividerComponent : null, child);
|
|
89
112
|
}));
|
|
90
|
-
});
|
|
113
|
+
}));
|
|
91
114
|
Inline.displayName = 'Inline';
|
|
92
115
|
var _default = Inline;
|
|
93
116
|
/**
|
|
@@ -65,7 +65,7 @@ var baseStyles = (0, _react2.css)({
|
|
|
65
65
|
*
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
|
-
var Stack = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
68
|
+
var Stack = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
69
69
|
var gap = _ref.gap,
|
|
70
70
|
alignItems = _ref.alignItems,
|
|
71
71
|
justifyContent = _ref.justifyContent,
|
|
@@ -79,7 +79,7 @@ var Stack = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
79
79
|
"data-testid": testId,
|
|
80
80
|
ref: ref
|
|
81
81
|
}, children);
|
|
82
|
-
});
|
|
82
|
+
}));
|
|
83
83
|
Stack.displayName = 'Stack';
|
|
84
84
|
var _default = Stack;
|
|
85
85
|
/**
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Children, forwardRef, Fragment } from 'react';
|
|
2
|
+
import { Children, forwardRef, Fragment, memo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import Text from './text.partial';
|
|
5
4
|
const flexAlignItemsMap = {
|
|
6
5
|
center: css({
|
|
7
6
|
alignItems: 'center'
|
|
@@ -49,15 +48,36 @@ const baseStyles = css({
|
|
|
49
48
|
boxSizing: 'border-box',
|
|
50
49
|
flexDirection: 'row'
|
|
51
50
|
});
|
|
51
|
+
const dividerStyles = css({
|
|
52
|
+
margin: '0 -2px',
|
|
53
|
+
color: "var(--ds-text-subtle, #42526E)",
|
|
54
|
+
pointerEvents: 'none'
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const Divider = ({
|
|
58
|
+
children
|
|
59
|
+
}) => jsx("span", {
|
|
60
|
+
css: dividerStyles
|
|
61
|
+
}, children);
|
|
52
62
|
/**
|
|
53
63
|
* __Inline__
|
|
54
64
|
*
|
|
55
65
|
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
56
66
|
* Renders a `div` by default.
|
|
57
67
|
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* const App = () => (
|
|
71
|
+
* <Inline gap="space.100">
|
|
72
|
+
* <Button />
|
|
73
|
+
* <Button />
|
|
74
|
+
* </Inline>
|
|
75
|
+
* )
|
|
76
|
+
* ```
|
|
58
77
|
*/
|
|
59
78
|
|
|
60
|
-
|
|
79
|
+
|
|
80
|
+
const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
61
81
|
gap,
|
|
62
82
|
alignItems,
|
|
63
83
|
justifyContent,
|
|
@@ -67,16 +87,19 @@ const Inline = /*#__PURE__*/forwardRef(({
|
|
|
67
87
|
children,
|
|
68
88
|
testId
|
|
69
89
|
}, ref) => {
|
|
70
|
-
const dividerComponent = typeof divider === 'string' ? jsx(
|
|
90
|
+
const dividerComponent = typeof divider === 'string' ? jsx(Divider, null, divider) : divider;
|
|
91
|
+
const childrenArray = Children.toArray(children).filter(Boolean);
|
|
71
92
|
return jsx("div", {
|
|
72
93
|
style: UNSAFE_style,
|
|
73
94
|
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
74
95
|
"data-testid": testId,
|
|
75
96
|
ref: ref
|
|
76
|
-
},
|
|
77
|
-
return jsx(Fragment,
|
|
97
|
+
}, childrenArray.map((child, index) => {
|
|
98
|
+
return jsx(Fragment, {
|
|
99
|
+
key: index
|
|
100
|
+
}, divider && index > 0 ? dividerComponent : null, child);
|
|
78
101
|
}));
|
|
79
|
-
});
|
|
102
|
+
}));
|
|
80
103
|
Inline.displayName = 'Inline';
|
|
81
104
|
export default Inline;
|
|
82
105
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import { forwardRef, memo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
const flexAlignItemsMap = {
|
|
5
5
|
center: css({
|
|
@@ -56,7 +56,7 @@ const baseStyles = css({
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
const Stack = /*#__PURE__*/forwardRef(({
|
|
59
|
+
const Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
60
60
|
gap,
|
|
61
61
|
alignItems,
|
|
62
62
|
justifyContent,
|
|
@@ -71,7 +71,7 @@ const Stack = /*#__PURE__*/forwardRef(({
|
|
|
71
71
|
"data-testid": testId,
|
|
72
72
|
ref: ref
|
|
73
73
|
}, children);
|
|
74
|
-
});
|
|
74
|
+
}));
|
|
75
75
|
Stack.displayName = 'Stack';
|
|
76
76
|
export default Stack;
|
|
77
77
|
/**
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Children, forwardRef, Fragment } from 'react';
|
|
2
|
+
import { Children, forwardRef, Fragment, memo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import Text from './text.partial';
|
|
5
4
|
var flexAlignItemsMap = {
|
|
6
5
|
center: css({
|
|
7
6
|
alignItems: 'center'
|
|
@@ -49,33 +48,58 @@ var baseStyles = css({
|
|
|
49
48
|
boxSizing: 'border-box',
|
|
50
49
|
flexDirection: 'row'
|
|
51
50
|
});
|
|
51
|
+
var dividerStyles = css({
|
|
52
|
+
margin: '0 -2px',
|
|
53
|
+
color: "var(--ds-text-subtle, #42526E)",
|
|
54
|
+
pointerEvents: 'none'
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var Divider = function Divider(_ref) {
|
|
58
|
+
var children = _ref.children;
|
|
59
|
+
return jsx("span", {
|
|
60
|
+
css: dividerStyles
|
|
61
|
+
}, children);
|
|
62
|
+
};
|
|
52
63
|
/**
|
|
53
64
|
* __Inline__
|
|
54
65
|
*
|
|
55
66
|
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
56
67
|
* Renders a `div` by default.
|
|
57
68
|
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* const App = () => (
|
|
72
|
+
* <Inline gap="space.100">
|
|
73
|
+
* <Button />
|
|
74
|
+
* <Button />
|
|
75
|
+
* </Inline>
|
|
76
|
+
* )
|
|
77
|
+
* ```
|
|
58
78
|
*/
|
|
59
79
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
|
|
81
|
+
var Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
82
|
+
var gap = _ref2.gap,
|
|
83
|
+
alignItems = _ref2.alignItems,
|
|
84
|
+
justifyContent = _ref2.justifyContent,
|
|
85
|
+
flexWrap = _ref2.flexWrap,
|
|
86
|
+
divider = _ref2.divider,
|
|
87
|
+
UNSAFE_style = _ref2.UNSAFE_style,
|
|
88
|
+
children = _ref2.children,
|
|
89
|
+
testId = _ref2.testId;
|
|
90
|
+
var dividerComponent = typeof divider === 'string' ? jsx(Divider, null, divider) : divider;
|
|
91
|
+
var childrenArray = Children.toArray(children).filter(Boolean);
|
|
70
92
|
return jsx("div", {
|
|
71
93
|
style: UNSAFE_style,
|
|
72
94
|
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
73
95
|
"data-testid": testId,
|
|
74
96
|
ref: ref
|
|
75
|
-
},
|
|
76
|
-
return jsx(Fragment,
|
|
97
|
+
}, childrenArray.map(function (child, index) {
|
|
98
|
+
return jsx(Fragment, {
|
|
99
|
+
key: index
|
|
100
|
+
}, divider && index > 0 ? dividerComponent : null, child);
|
|
77
101
|
}));
|
|
78
|
-
});
|
|
102
|
+
}));
|
|
79
103
|
Inline.displayName = 'Inline';
|
|
80
104
|
export default Inline;
|
|
81
105
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import { forwardRef, memo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
var flexAlignItemsMap = {
|
|
5
5
|
center: css({
|
|
@@ -56,7 +56,7 @@ var baseStyles = css({
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
var Stack = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
59
|
+
var Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
60
60
|
var gap = _ref.gap,
|
|
61
61
|
alignItems = _ref.alignItems,
|
|
62
62
|
justifyContent = _ref.justifyContent,
|
|
@@ -70,7 +70,7 @@ var Stack = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
70
70
|
"data-testid": testId,
|
|
71
71
|
ref: ref
|
|
72
72
|
}, children);
|
|
73
|
-
});
|
|
73
|
+
}));
|
|
74
74
|
Stack.displayName = 'Stack';
|
|
75
75
|
export default Stack;
|
|
76
76
|
/**
|
package/dist/esm/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, FC, ReactElement } from 'react';
|
|
3
|
-
import type { BasePrimitiveProps
|
|
2
|
+
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, FC, ReactElement, ReactNode } from 'react';
|
|
3
|
+
import type { BasePrimitiveProps } from './types';
|
|
4
4
|
declare type PropsToOmit = 'as' | 'className' | 'style';
|
|
5
5
|
export declare type BoxProps<T extends ElementType = 'div'> = Omit<ComponentPropsWithoutRef<T>, PropsToOmit> & BasePrimitiveProps & BoxPropsBase<T>;
|
|
6
6
|
declare type BoxPropsBase<T extends ElementType> = {
|
|
@@ -11,7 +11,7 @@ declare type BoxPropsBase<T extends ElementType> = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Elements to be rendered inside the Box.
|
|
13
13
|
*/
|
|
14
|
-
children?:
|
|
14
|
+
children?: ReactNode;
|
|
15
15
|
/**
|
|
16
16
|
* The HTML className attribute.
|
|
17
17
|
*
|
|
@@ -68,11 +68,11 @@ declare type BoxPropsBase<T extends ElementType> = {
|
|
|
68
68
|
*/
|
|
69
69
|
padding?: Padding;
|
|
70
70
|
/**
|
|
71
|
-
* Token representing CSS `
|
|
71
|
+
* Token representing CSS `paddingBlock`.
|
|
72
72
|
*/
|
|
73
73
|
paddingBlock?: PaddingBlock;
|
|
74
74
|
/**
|
|
75
|
-
* Token representing CSS `
|
|
75
|
+
* Token representing CSS `paddingInline`.
|
|
76
76
|
*/
|
|
77
77
|
paddingInline?: PaddingInline;
|
|
78
78
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import type { BasePrimitiveProps
|
|
3
|
+
import type { BasePrimitiveProps } from './types';
|
|
4
4
|
interface InlineProps extends BasePrimitiveProps {
|
|
5
5
|
/**
|
|
6
6
|
* Used to align children along the cross axis.
|
|
@@ -26,7 +26,7 @@ interface InlineProps extends BasePrimitiveProps {
|
|
|
26
26
|
/**
|
|
27
27
|
* Elements to be rendered inside the Inline.
|
|
28
28
|
*/
|
|
29
|
-
children:
|
|
29
|
+
children: ReactNode;
|
|
30
30
|
}
|
|
31
31
|
declare type FlexAlignItems = keyof typeof flexAlignItemsMap;
|
|
32
32
|
declare const flexAlignItemsMap: {
|
|
@@ -55,8 +55,17 @@ declare const flexWrapMap: {
|
|
|
55
55
|
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
56
56
|
* Renders a `div` by default.
|
|
57
57
|
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* const App = () => (
|
|
61
|
+
* <Inline gap="space.100">
|
|
62
|
+
* <Button />
|
|
63
|
+
* <Button />
|
|
64
|
+
* </Inline>
|
|
65
|
+
* )
|
|
66
|
+
* ```
|
|
58
67
|
*/
|
|
59
|
-
declare const Inline: import("react").ForwardRefExoticComponent<InlineProps & import("react").RefAttributes<HTMLDivElement
|
|
68
|
+
declare const Inline: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<InlineProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
60
69
|
export default Inline;
|
|
61
70
|
/**
|
|
62
71
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BasePrimitiveProps } from './types';
|
|
3
4
|
interface StackProps extends BasePrimitiveProps {
|
|
4
5
|
/**
|
|
5
6
|
* Used to align children along the cross axis.
|
|
@@ -20,7 +21,7 @@ interface StackProps extends BasePrimitiveProps {
|
|
|
20
21
|
/**
|
|
21
22
|
* Elements to be rendered inside the Stack.
|
|
22
23
|
*/
|
|
23
|
-
children:
|
|
24
|
+
children: ReactNode;
|
|
24
25
|
}
|
|
25
26
|
declare type FlexAlignItems = keyof typeof flexAlignItemsMap;
|
|
26
27
|
declare const flexAlignItemsMap: {
|
|
@@ -50,7 +51,7 @@ declare const flexWrapMap: {
|
|
|
50
51
|
* Renders a `div` by default.
|
|
51
52
|
*
|
|
52
53
|
*/
|
|
53
|
-
declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement
|
|
54
|
+
declare const Stack: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
54
55
|
export default Stack;
|
|
55
56
|
/**
|
|
56
57
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/ds-explorations/inline",
|
|
3
|
+
"main": "../dist/cjs/components/inline.partial.js",
|
|
4
|
+
"module": "../dist/esm/components/inline.partial.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/components/inline.partial.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/components/inline.partial.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/components/inline.partial.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ds-explorations",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "An experimental package for exploration and validation of spacing / typography foundations.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"atlassian": {
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"af:exports": {
|
|
35
35
|
".": "./src/index.tsx",
|
|
36
36
|
"./box": "./src/components/box.partial.tsx",
|
|
37
|
-
"./text": "./src/components/text.partial.tsx"
|
|
37
|
+
"./text": "./src/components/text.partial.tsx",
|
|
38
|
+
"./stack": "./src/components/stack.partial.tsx",
|
|
39
|
+
"./inline": "./src/components/inline.partial.tsx"
|
|
38
40
|
},
|
|
39
41
|
"dependencies": {
|
|
40
42
|
"@atlaskit/tokens": "^0.10.3",
|
package/report.api.md
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
<!--SECTION START: Main Entry Types-->
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
|
-
/// <reference types="react" />
|
|
18
|
-
|
|
19
17
|
import { ComponentPropsWithoutRef } from 'react';
|
|
20
18
|
import { ComponentPropsWithRef } from 'react';
|
|
21
19
|
import type { CSSProperties } from 'react';
|
|
@@ -23,6 +21,7 @@ import { ElementType } from 'react';
|
|
|
23
21
|
import { FC } from 'react';
|
|
24
22
|
import { ForwardRefExoticComponent } from 'react';
|
|
25
23
|
import { jsx } from '@emotion/react';
|
|
24
|
+
import { MemoExoticComponent } from 'react';
|
|
26
25
|
import { ReactElement } from 'react';
|
|
27
26
|
import { ReactNode } from 'react';
|
|
28
27
|
import { RefAttributes } from 'react';
|
|
@@ -161,7 +160,7 @@ type BoxComponent<T extends ElementType = 'div'> = (<
|
|
|
161
160
|
// @public (undocumented)
|
|
162
161
|
type BoxPropsBase<T extends ElementType> = {
|
|
163
162
|
as?: T;
|
|
164
|
-
children?:
|
|
163
|
+
children?: ReactNode;
|
|
165
164
|
className?: string;
|
|
166
165
|
backgroundColor?: BackgroundColor;
|
|
167
166
|
borderStyle?: BorderStyle;
|
|
@@ -351,7 +350,7 @@ const heightMap: {
|
|
|
351
350
|
// @public (undocumented)
|
|
352
351
|
interface InlineProps extends BasePrimitiveProps {
|
|
353
352
|
alignItems?: FlexAlignItems_2;
|
|
354
|
-
children:
|
|
353
|
+
children: ReactNode;
|
|
355
354
|
divider?: ReactNode;
|
|
356
355
|
flexWrap?: FlexWrap;
|
|
357
356
|
gap: ColumnGap;
|
|
@@ -383,9 +382,6 @@ const lineHeightMap: {
|
|
|
383
382
|
'40px': SerializedStyles;
|
|
384
383
|
};
|
|
385
384
|
|
|
386
|
-
// @public (undocumented)
|
|
387
|
-
type NonTextChildren = (JSX.Element | false | null)[] | JSX.Element;
|
|
388
|
-
|
|
389
385
|
// @public (undocumented)
|
|
390
386
|
type Overflow = keyof typeof overflowMap;
|
|
391
387
|
|
|
@@ -486,7 +482,7 @@ const rowGapMap: {
|
|
|
486
482
|
// @public (undocumented)
|
|
487
483
|
interface StackProps extends BasePrimitiveProps {
|
|
488
484
|
alignItems?: FlexAlignItems_3;
|
|
489
|
-
children:
|
|
485
|
+
children: ReactNode;
|
|
490
486
|
flexWrap?: FlexWrap_2;
|
|
491
487
|
gap: RowGap;
|
|
492
488
|
justifyContent?: FlexJustifyContent_3;
|
|
@@ -544,9 +540,9 @@ export type UNSAFE_BoxProps<T extends ElementType = 'div'> = Omit<
|
|
|
544
540
|
BoxPropsBase<T>;
|
|
545
541
|
|
|
546
542
|
// @public
|
|
547
|
-
export const UNSAFE_Inline: ForwardRefExoticComponent<
|
|
543
|
+
export const UNSAFE_Inline: MemoExoticComponent<ForwardRefExoticComponent<
|
|
548
544
|
InlineProps & RefAttributes<HTMLDivElement>
|
|
549
|
-
|
|
545
|
+
>>;
|
|
550
546
|
|
|
551
547
|
// @public (undocumented)
|
|
552
548
|
export const UNSAFE_InteractionSurface: ({
|
|
@@ -556,9 +552,9 @@ export const UNSAFE_InteractionSurface: ({
|
|
|
556
552
|
}: InteractionSurfaceProps) => jsx.JSX.Element;
|
|
557
553
|
|
|
558
554
|
// @public
|
|
559
|
-
export const UNSAFE_Stack: ForwardRefExoticComponent<
|
|
555
|
+
export const UNSAFE_Stack: MemoExoticComponent<ForwardRefExoticComponent<
|
|
560
556
|
StackProps & RefAttributes<HTMLDivElement>
|
|
561
|
-
|
|
557
|
+
>>;
|
|
562
558
|
|
|
563
559
|
// @internal
|
|
564
560
|
export const UNSAFE_Text: FC<UNSAFE_TextProps>;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FC,
|
|
7
7
|
forwardRef,
|
|
8
8
|
ReactElement,
|
|
9
|
+
ReactNode,
|
|
9
10
|
} from 'react';
|
|
10
11
|
|
|
11
12
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,7 +14,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
13
14
|
import { token } from '@atlaskit/tokens';
|
|
14
15
|
|
|
15
16
|
import { SurfaceContext } from './surface-provider';
|
|
16
|
-
import type { BasePrimitiveProps
|
|
17
|
+
import type { BasePrimitiveProps } from './types';
|
|
17
18
|
|
|
18
19
|
type PropsToOmit = 'as' | 'className' | 'style';
|
|
19
20
|
|
|
@@ -32,7 +33,7 @@ type BoxPropsBase<T extends ElementType> = {
|
|
|
32
33
|
/**
|
|
33
34
|
* Elements to be rendered inside the Box.
|
|
34
35
|
*/
|
|
35
|
-
children?:
|
|
36
|
+
children?: ReactNode;
|
|
36
37
|
/**
|
|
37
38
|
* The HTML className attribute.
|
|
38
39
|
*
|
|
@@ -89,11 +90,11 @@ type BoxPropsBase<T extends ElementType> = {
|
|
|
89
90
|
*/
|
|
90
91
|
padding?: Padding;
|
|
91
92
|
/**
|
|
92
|
-
* Token representing CSS `
|
|
93
|
+
* Token representing CSS `paddingBlock`.
|
|
93
94
|
*/
|
|
94
95
|
paddingBlock?: PaddingBlock;
|
|
95
96
|
/**
|
|
96
|
-
* Token representing CSS `
|
|
97
|
+
* Token representing CSS `paddingInline`.
|
|
97
98
|
*/
|
|
98
99
|
paddingInline?: PaddingInline;
|
|
99
100
|
/**
|