@bundle-stats/ui 4.2.1 → 4.2.3-beta.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/lib/app/app.js +17 -5
- package/lib/app/app.js.map +1 -1
- package/lib/components/index.js +3 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/insight-icon/index.js +18 -0
- package/lib/components/insight-icon/index.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.js +25 -0
- package/lib/components/insight-icon/insight-icon.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.module.css +24 -0
- package/lib/components/insights/insights.js +6 -13
- package/lib/components/insights/insights.js.map +1 -1
- package/lib/components/insights/insights.module.css +0 -21
- package/lib/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/lib/components/summary/summary.js +1 -1
- package/lib/components/summary/summary.js.map +1 -1
- package/lib/components/summary/summary.module.css +0 -8
- package/lib/css/variables.css +2 -0
- package/lib/layout/box/box.js +2 -22
- package/lib/layout/box/box.js.map +1 -1
- package/lib/layout/box/box.module.css +11 -0
- package/lib/layout/box/index.js +15 -3
- package/lib/layout/box/index.js.map +1 -1
- package/lib/ui/container/container.js +1 -10
- package/lib/ui/container/container.js.map +1 -1
- package/lib/ui/container/index.js +15 -3
- package/lib/ui/container/index.js.map +1 -1
- package/lib/ui/dropdown/dropdown.module.css +1 -2
- package/lib/ui/filters/filters.module.css +1 -5
- package/lib/ui/input/input.module.css +3 -4
- package/lib-esm/app/app.js +18 -6
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/components/index.js +1 -0
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/insight-icon/index.js +2 -0
- package/lib-esm/components/insight-icon/index.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.js +18 -0
- package/lib-esm/components/insight-icon/insight-icon.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.module.css +24 -0
- package/lib-esm/components/insights/insights.js +7 -14
- package/lib-esm/components/insights/insights.js.map +1 -1
- package/lib-esm/components/insights/insights.module.css +0 -21
- package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/lib-esm/components/summary/summary.js +1 -1
- package/lib-esm/components/summary/summary.js.map +1 -1
- package/lib-esm/components/summary/summary.module.css +0 -8
- package/lib-esm/css/variables.css +2 -0
- package/lib-esm/layout/box/box.js +3 -23
- package/lib-esm/layout/box/box.js.map +1 -1
- package/lib-esm/layout/box/box.module.css +11 -0
- package/lib-esm/layout/box/index.js +1 -1
- package/lib-esm/layout/box/index.js.map +1 -1
- package/lib-esm/ui/container/container.js +1 -10
- package/lib-esm/ui/container/container.js.map +1 -1
- package/lib-esm/ui/container/index.js +1 -1
- package/lib-esm/ui/container/index.js.map +1 -1
- package/lib-esm/ui/dropdown/dropdown.module.css +1 -2
- package/lib-esm/ui/filters/filters.module.css +1 -5
- package/lib-esm/ui/input/input.module.css +3 -4
- package/package.json +5 -5
- package/src/app/app.jsx +21 -10
- package/src/components/index.js +1 -0
- package/src/components/insight-icon/index.ts +1 -0
- package/src/components/insight-icon/insight-icon.module.css +24 -0
- package/src/components/insight-icon/insight-icon.tsx +27 -0
- package/src/components/insights/insights.module.css +0 -21
- package/src/components/insights/insights.stories.tsx +26 -22
- package/src/components/insights/insights.tsx +8 -19
- package/src/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/src/components/summary/summary.jsx +1 -0
- package/src/components/summary/summary.module.css +0 -8
- package/src/css/variables.css +2 -0
- package/src/layout/box/box.module.css +11 -0
- package/src/layout/box/box.stories.tsx +44 -0
- package/src/layout/box/box.tsx +46 -0
- package/src/layout/box/index.ts +1 -0
- package/src/ui/container/container.stories.tsx +29 -0
- package/src/ui/container/container.tsx +19 -0
- package/src/ui/container/index.ts +1 -0
- package/src/ui/dropdown/dropdown.module.css +1 -2
- package/src/ui/filters/filters.module.css +1 -5
- package/src/ui/input/input.module.css +3 -4
- package/types/components/index.d.ts +1 -0
- package/types/components/insight-icon/index.d.ts +1 -0
- package/types/components/insight-icon/insight-icon.d.ts +7 -0
- package/types/components/insights/insights.d.ts +2 -2
- package/types/layout/box/box.d.ts +11 -25
- package/types/layout/box/index.d.ts +1 -1
- package/types/ui/container/container.d.ts +5 -17
- package/types/ui/container/index.d.ts +1 -1
- package/src/layout/box/box.jsx +0 -67
- package/src/layout/box/index.js +0 -1
- package/src/ui/container/container.jsx +0 -24
- package/src/ui/container/index.js +0 -1
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { InsightType, getInsightList } from '@bundle-stats/utils';
|
|
2
|
+
import { JobInsightsInfo, getInsightList } from '@bundle-stats/utils';
|
|
4
3
|
|
|
5
4
|
import { FlexStack } from '../../layout/flex-stack';
|
|
6
5
|
import { Stack } from '../../layout/stack';
|
|
7
|
-
import { Icon } from '../../ui/icon';
|
|
8
6
|
import { ComponentLink } from '../component-link';
|
|
7
|
+
import { InsightIcon } from '../insight-icon';
|
|
9
8
|
// @ts-ignore
|
|
10
9
|
import css from './insights.module.css';
|
|
11
10
|
|
|
12
|
-
const InsightTypeIconMap = new Map([
|
|
13
|
-
[InsightType.ERROR, Icon.ICONS.ERROR],
|
|
14
|
-
[InsightType.WARNING, Icon.ICONS.WARNING],
|
|
15
|
-
[InsightType.INFO, Icon.ICONS.INFO],
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
11
|
interface InsightsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
-
|
|
20
|
-
newPackages: any;
|
|
12
|
+
insights: JobInsightsInfo;
|
|
21
13
|
customComponentLink?: React.ElementType;
|
|
22
14
|
}
|
|
23
15
|
|
|
24
16
|
export const Insights = (props: InsightsProps) => {
|
|
25
17
|
const {
|
|
26
|
-
|
|
27
|
-
newPackages,
|
|
18
|
+
insights,
|
|
28
19
|
customComponentLink: CustomComponentLink = ComponentLink,
|
|
29
20
|
...restProps
|
|
30
21
|
} = props;
|
|
31
22
|
|
|
32
|
-
const
|
|
23
|
+
const insightList = getInsightList(insights);
|
|
33
24
|
|
|
34
25
|
return (
|
|
35
26
|
<Stack space="xxsmall" {...restProps}>
|
|
36
|
-
{
|
|
37
|
-
const glyph = InsightTypeIconMap.get(insight.type);
|
|
27
|
+
{insightList.map(({ name, insight, link }) => {
|
|
38
28
|
const { text } = insight.data as { text: string };
|
|
39
|
-
|
|
40
29
|
return (
|
|
41
30
|
<FlexStack
|
|
42
31
|
key={name}
|
|
@@ -44,9 +33,9 @@ export const Insights = (props: InsightsProps) => {
|
|
|
44
33
|
alignItems="center"
|
|
45
34
|
as={CustomComponentLink}
|
|
46
35
|
{...link}
|
|
47
|
-
className={
|
|
36
|
+
className={css.entry}
|
|
48
37
|
>
|
|
49
|
-
|
|
38
|
+
<InsightIcon type={insight.type} className={css.icon} />
|
|
50
39
|
<span>{text}</span>
|
|
51
40
|
</FlexStack>
|
|
52
41
|
);
|
package/src/css/variables.css
CHANGED
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
border-radius: 0 0 var(--radius-medium) var(--radius-medium);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.outlineHover {
|
|
19
|
+
transition: var(--transition-out);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.outlineHover:focus,
|
|
23
|
+
.outlineHover:active,
|
|
24
|
+
.outlineHover:hover {
|
|
25
|
+
box-shadow: var(--outline-hover);
|
|
26
|
+
transition: var(--transition-in);
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
.padding-xxxsmall {
|
|
19
30
|
padding: var(--space-xxxsmall);
|
|
20
31
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { getWrapperDecorator } from '../../stories';
|
|
4
|
+
import { Box } from '.';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Layout/Box',
|
|
8
|
+
component: Box,
|
|
9
|
+
decorators: [getWrapperDecorator()],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const Template = (props: any) => <Box style={{ border: '1px dotted magenta' }} {...props}>Lorem ipsum</Box>;
|
|
13
|
+
|
|
14
|
+
export const Default = Template.bind({});
|
|
15
|
+
|
|
16
|
+
export const WithPadding = Template.bind({});
|
|
17
|
+
WithPadding.args = {
|
|
18
|
+
padding: 'medium',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const WithHorizontalPadding = Template.bind({});
|
|
22
|
+
WithHorizontalPadding.args = {
|
|
23
|
+
horizontalPadding: 'medium',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const WithVerticalPadding = Template.bind({});
|
|
27
|
+
WithVerticalPadding.args = {
|
|
28
|
+
verticalPadding: 'medium',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithHorizontalAndVerticalPadding = Template.bind({});
|
|
32
|
+
WithHorizontalAndVerticalPadding.args = {
|
|
33
|
+
padding: ['xxsmall', 'medium'],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const WithOutline = Template.bind({});
|
|
37
|
+
WithOutline.args = {
|
|
38
|
+
outline: true,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const WithOutlineHover = Template.bind({});
|
|
42
|
+
WithOutlineHover.args = {
|
|
43
|
+
outlineHover: true,
|
|
44
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { NO_SPACE, SPACES } from '../../constants';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import css from './box.module.css';
|
|
7
|
+
|
|
8
|
+
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
as?: React.ElementType;
|
|
10
|
+
padding?: typeof SPACES | Array<typeof SPACES>;
|
|
11
|
+
horizontalPadding?: string;
|
|
12
|
+
verticalPadding?: string;
|
|
13
|
+
outline?: boolean;
|
|
14
|
+
outlineHover?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Box = (props: BoxProps) => {
|
|
18
|
+
const {
|
|
19
|
+
className = '',
|
|
20
|
+
as: Component = 'div',
|
|
21
|
+
padding = NO_SPACE,
|
|
22
|
+
horizontalPadding = '',
|
|
23
|
+
verticalPadding = '',
|
|
24
|
+
outline = false,
|
|
25
|
+
outlineHover = false,
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
|
|
29
|
+
const [resolvedPadding, resolvedVerticalPadding, resolvedHorizontalPadding] = Array.isArray(
|
|
30
|
+
padding,
|
|
31
|
+
)
|
|
32
|
+
? [null, ...padding]
|
|
33
|
+
: [padding, verticalPadding, horizontalPadding];
|
|
34
|
+
|
|
35
|
+
const rootClassName = cx(
|
|
36
|
+
css.root,
|
|
37
|
+
className,
|
|
38
|
+
resolvedPadding && css[`padding-${resolvedPadding}`],
|
|
39
|
+
resolvedVerticalPadding && css[`vertical-padding-${resolvedVerticalPadding}`],
|
|
40
|
+
resolvedHorizontalPadding && css[`horizontal-padding-${resolvedHorizontalPadding}`],
|
|
41
|
+
outline && css.outline,
|
|
42
|
+
outlineHover && css.outlineHover,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
return <Component {...restProps} className={rootClassName} />;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './box';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Container } from '.';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'UI/Container',
|
|
7
|
+
component: Container,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Default = () => (
|
|
11
|
+
<Container style={{ background: 'white' }}>
|
|
12
|
+
<div
|
|
13
|
+
style={{
|
|
14
|
+
background: 'white',
|
|
15
|
+
padding: '24px',
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
Content
|
|
19
|
+
</div>
|
|
20
|
+
</Container>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
Default.decorators = [
|
|
24
|
+
(Story: React.FunctionComponent) => (
|
|
25
|
+
<div style={{ background: 'hotpink' }}>
|
|
26
|
+
<Story />
|
|
27
|
+
</div>
|
|
28
|
+
),
|
|
29
|
+
];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import css from './container.module.css';
|
|
6
|
+
|
|
7
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Container = ({
|
|
12
|
+
as: Component = 'div',
|
|
13
|
+
className = '',
|
|
14
|
+
...restProps
|
|
15
|
+
}: ContainerProps) => (
|
|
16
|
+
<Component className={cx(css.root, className)}>
|
|
17
|
+
<div className={css.inner} {...restProps} />
|
|
18
|
+
</Component>
|
|
19
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './container';
|
|
@@ -83,11 +83,7 @@
|
|
|
83
83
|
.filterStandalone:active .filterCheckbox,
|
|
84
84
|
.filterStandalone:focus .filterCheckbox {
|
|
85
85
|
z-index: var(--layout-xlow); /* show collapsed border */
|
|
86
|
-
box-shadow: var(--
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.filterStandalone:hover .filterCheckbox {
|
|
90
|
-
border-color: var(--color-outline-dark);
|
|
86
|
+
box-shadow: var(--outline-hover);
|
|
91
87
|
color: var(--color-text);
|
|
92
88
|
}
|
|
93
89
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.root {
|
|
2
|
-
border: 1px solid var(--color-outline)
|
|
3
|
-
border-radius:
|
|
2
|
+
border: 1px solid var(--color-outline);
|
|
3
|
+
border-radius: var(--radius-small);
|
|
4
4
|
color: var(--color-text-light);
|
|
5
5
|
width: 100%;
|
|
6
6
|
transition: var(--transition-in);
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.root:focus {
|
|
28
|
-
|
|
29
|
-
box-shadow: var(--shadow-layer);
|
|
28
|
+
box-shadow: var(--outline-hover);
|
|
30
29
|
color: inherit;
|
|
31
30
|
transition: var(--transition-out);
|
|
32
31
|
}
|
|
@@ -6,6 +6,7 @@ export { BundlePackages } from "./bundle-packages";
|
|
|
6
6
|
export { BundleModules } from "./bundle-modules";
|
|
7
7
|
export { ComponentLink } from "./component-link";
|
|
8
8
|
export { Delta } from "./delta";
|
|
9
|
+
export { InsightIcon } from "./insight-icon";
|
|
9
10
|
export { Insights } from "./insights";
|
|
10
11
|
export { JobName } from "./job-name";
|
|
11
12
|
export { JobHeader } from "./job-header";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './insight-icon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { JobInsightsInfo } from '@bundle-stats/utils';
|
|
2
3
|
interface InsightsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
|
|
4
|
-
newPackages: any;
|
|
4
|
+
insights: JobInsightsInfo;
|
|
5
5
|
customComponentLink?: React.ElementType;
|
|
6
6
|
}
|
|
7
7
|
export declare const Insights: (props: InsightsProps) => JSX.Element;
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
const className_1: PropTypes.Requireable<string>;
|
|
13
|
-
export { className_1 as className };
|
|
14
|
-
const as_1: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
15
|
-
export { as_1 as as };
|
|
16
|
-
export const padding: PropTypes.Requireable<NonNullable<string | (string | null | undefined)[] | null | undefined>>;
|
|
17
|
-
const horizontalPadding_1: PropTypes.Requireable<string>;
|
|
18
|
-
export { horizontalPadding_1 as horizontalPadding };
|
|
19
|
-
const verticalPadding_1: PropTypes.Requireable<string>;
|
|
20
|
-
export { verticalPadding_1 as verticalPadding };
|
|
21
|
-
const outline_1: PropTypes.Requireable<boolean>;
|
|
22
|
-
export { outline_1 as outline };
|
|
23
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SPACES } from '../../constants';
|
|
3
|
+
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
padding?: typeof SPACES | Array<typeof SPACES>;
|
|
6
|
+
horizontalPadding?: string;
|
|
7
|
+
verticalPadding?: string;
|
|
8
|
+
outline?: boolean;
|
|
9
|
+
outlineHover?: boolean;
|
|
24
10
|
}
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
export declare const Box: (props: BoxProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './box';
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
as: any;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
export namespace Container {
|
|
7
|
-
namespace defaultProps {
|
|
8
|
-
const className: string;
|
|
9
|
-
const as: string;
|
|
10
|
-
}
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
const className_1: PropTypes.Requireable<string>;
|
|
13
|
-
export { className_1 as className };
|
|
14
|
-
const as_1: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
15
|
-
export { as_1 as as };
|
|
16
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
as?: React.ElementType;
|
|
17
4
|
}
|
|
18
|
-
|
|
5
|
+
export declare const Container: ({ as: Component, className, ...restProps }: ContainerProps) => JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './container';
|
package/src/layout/box/box.jsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
import { NO_SPACE, SPACES } from '../../constants';
|
|
6
|
-
import css from './box.module.css';
|
|
7
|
-
|
|
8
|
-
export const Box = (props) => {
|
|
9
|
-
const {
|
|
10
|
-
className,
|
|
11
|
-
as: Component,
|
|
12
|
-
padding,
|
|
13
|
-
horizontalPadding,
|
|
14
|
-
verticalPadding,
|
|
15
|
-
outline,
|
|
16
|
-
...restProps
|
|
17
|
-
} = props;
|
|
18
|
-
|
|
19
|
-
const [resolvedPadding, resolvedVerticalPadding, resolvedHorizontalPadding] = Array.isArray(
|
|
20
|
-
padding,
|
|
21
|
-
)
|
|
22
|
-
? [null, ...padding]
|
|
23
|
-
: [padding, verticalPadding, horizontalPadding];
|
|
24
|
-
|
|
25
|
-
const rootClassName = cx(
|
|
26
|
-
css.root,
|
|
27
|
-
className,
|
|
28
|
-
resolvedPadding && css[`padding-${resolvedPadding}`],
|
|
29
|
-
resolvedVerticalPadding && css[`vertical-padding-${resolvedVerticalPadding}`],
|
|
30
|
-
resolvedHorizontalPadding && css[`horizontal-padding-${resolvedHorizontalPadding}`],
|
|
31
|
-
outline && css.outline,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return <Component {...restProps} className={rootClassName} />;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
Box.defaultProps = {
|
|
38
|
-
className: '',
|
|
39
|
-
as: 'div',
|
|
40
|
-
padding: NO_SPACE,
|
|
41
|
-
horizontalPadding: '',
|
|
42
|
-
verticalPadding: '',
|
|
43
|
-
outline: false,
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
Box.propTypes = {
|
|
47
|
-
/** Adopted child class name */
|
|
48
|
-
className: PropTypes.string,
|
|
49
|
-
|
|
50
|
-
/** Rendered component */
|
|
51
|
-
as: PropTypes.elementType,
|
|
52
|
-
|
|
53
|
-
/** Padding space size */
|
|
54
|
-
padding: PropTypes.oneOfType([
|
|
55
|
-
PropTypes.oneOf(SPACES),
|
|
56
|
-
PropTypes.arrayOf(PropTypes.oneOf(SPACES)),
|
|
57
|
-
]),
|
|
58
|
-
|
|
59
|
-
/** Horizonatl padding space size */
|
|
60
|
-
horizontalPadding: PropTypes.oneOf(SPACES),
|
|
61
|
-
|
|
62
|
-
/** Vertical padding space size */
|
|
63
|
-
verticalPadding: PropTypes.oneOf(SPACES),
|
|
64
|
-
|
|
65
|
-
/** Outline flag */
|
|
66
|
-
outline: PropTypes.bool,
|
|
67
|
-
};
|
package/src/layout/box/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Box } from './box';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
import css from './container.module.css';
|
|
6
|
-
|
|
7
|
-
export const Container = ({ className, as: Component, ...restProps }) => (
|
|
8
|
-
<Component className={cx(css.root, className)}>
|
|
9
|
-
<div className={css.inner} {...restProps} />
|
|
10
|
-
</Component>
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
Container.defaultProps = {
|
|
14
|
-
className: '',
|
|
15
|
-
as: 'div',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
Container.propTypes = {
|
|
19
|
-
/** Adopted child class name */
|
|
20
|
-
className: PropTypes.string,
|
|
21
|
-
|
|
22
|
-
/** Custom component */
|
|
23
|
-
as: PropTypes.elementType,
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Container } from './container';
|