@thecb/components 6.3.1-beta.2 → 6.3.1-beta.3
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/README.md +39 -0
- package/dist/index.cjs.js +475 -398
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +17 -23
- package/dist/index.esm.js +473 -395
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card/Card.js +11 -20
- package/src/components/atoms/card/index.d.ts +1 -0
- package/src/components/atoms/display-card/DisplayCard.js +1 -1
- package/src/components/atoms/layouts/Switcher.d.ts +17 -0
- package/src/components/atoms/layouts/index.d.ts +1 -0
- package/src/components/molecules/index.d.ts +0 -2
- package/src/components/molecules/index.js +0 -2
- package/src/components/molecules/card-with-header/CardWithHeader.js +0 -34
- package/src/components/molecules/card-with-header/CardWithHeader.theme.js +0 -9
- package/src/components/molecules/card-with-header/index.d.ts +0 -11
- package/src/components/molecules/card-with-header/index.js +0 -2
- package/src/components/molecules/welcome-card/WelcomeCard.js +0 -64
- package/src/components/molecules/welcome-card/WelcomeCard.theme.js +0 -15
- package/src/components/molecules/welcome-card/index.d.ts +0 -15
- package/src/components/molecules/welcome-card/index.js +0 -3
package/package.json
CHANGED
|
@@ -3,23 +3,18 @@ import React, { Fragment } from "react";
|
|
|
3
3
|
import { themeComponent } from "../../../util/themeUtils";
|
|
4
4
|
import withWindowSize from "../../withWindowSize";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Cover } from "../layouts";
|
|
7
7
|
import BoxWithShadow from "../box-with-shadow";
|
|
8
8
|
import { fallbackValues } from "./Card.theme";
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
</Box>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const Card = ({ themeValues, variant, children, extraStyles, ...props }) => {
|
|
10
|
+
const Card = ({
|
|
11
|
+
themeValues,
|
|
12
|
+
variant,
|
|
13
|
+
children,
|
|
14
|
+
extraStyles,
|
|
15
|
+
width = "276px",
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
23
18
|
return (
|
|
24
19
|
<BoxWithShadow
|
|
25
20
|
variant="baseStandard"
|
|
@@ -27,15 +22,11 @@ const Card = ({ themeValues, variant, children, extraStyles, ...props }) => {
|
|
|
27
22
|
borderRadius="4px"
|
|
28
23
|
padding="0"
|
|
29
24
|
margin="0"
|
|
30
|
-
|
|
31
|
-
minHeight="100%"
|
|
32
|
-
minWidth={variant !== "vertical" && "276px"}
|
|
25
|
+
minWidth={width}
|
|
33
26
|
extraStyles={extraStyles}
|
|
34
27
|
{...props}
|
|
35
28
|
>
|
|
36
|
-
<Cover
|
|
37
|
-
<CardVariantSwitcher variant={variant}>{children}</CardVariantSwitcher>
|
|
38
|
-
</Cover>
|
|
29
|
+
<Cover>{children}</Cover>
|
|
39
30
|
</BoxWithShadow>
|
|
40
31
|
);
|
|
41
32
|
};
|
|
@@ -7,7 +7,7 @@ import Cluster from "../layouts/Cluster";
|
|
|
7
7
|
import ButtonWithAction from "../button-with-action";
|
|
8
8
|
import ButtonWithLink from "../button-with-link";
|
|
9
9
|
import { WHITE, CHARADE_GREY, STORM_GREY } from "../../../constants/colors";
|
|
10
|
-
import
|
|
10
|
+
import Popover from "../../molecules/popover";
|
|
11
11
|
|
|
12
12
|
const DisplayCard = ({
|
|
13
13
|
title,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Expand from "../../../util/expand";
|
|
3
|
+
|
|
4
|
+
export interface SwitcherProps {
|
|
5
|
+
breakpoint?: string;
|
|
6
|
+
childGap?: string;
|
|
7
|
+
largeChild?: string;
|
|
8
|
+
largeChildSize?: string;
|
|
9
|
+
maxChildren?: string;
|
|
10
|
+
maxChildrenOnly?: boolean;
|
|
11
|
+
padding?: string;
|
|
12
|
+
extraStyles?: string;
|
|
13
|
+
constrainMobile?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Switcher: React.FC<Expand<SwitcherProps> &
|
|
17
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as AddressForm } from "./address-form";
|
|
2
|
-
export { default as CardWithHeader } from "./card-with-header";
|
|
3
2
|
export { default as ChangePasswordForm } from "./change-password-form";
|
|
4
3
|
export { default as CollapsibleSection } from "./collapsible-section";
|
|
5
4
|
export { default as EditNameForm } from "./edit-name-form";
|
|
@@ -35,6 +34,5 @@ export { default as TabSidebar } from "./tab-sidebar";
|
|
|
35
34
|
export { default as TermsAndConditions } from "./terms-and-conditions";
|
|
36
35
|
export { default as TermsAndConditionsModal } from "./terms-and-conditions-modal";
|
|
37
36
|
export { default as Timeout } from "./timeout";
|
|
38
|
-
export { default as WelcomeCard } from "./welcome-card";
|
|
39
37
|
export { default as WelcomeModule } from "./welcome-module";
|
|
40
38
|
export { default as WorkflowTile } from "./workflow-tile";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { fallbackValues } from "./CardWithHeader.theme";
|
|
4
|
-
import { themeComponent } from "../../../util/themeUtils";
|
|
5
|
-
|
|
6
|
-
import { Box, Card, Title } from "../../atoms";
|
|
7
|
-
|
|
8
|
-
const CardWithHeader = ({
|
|
9
|
-
themeValues,
|
|
10
|
-
children,
|
|
11
|
-
header,
|
|
12
|
-
extraStyles,
|
|
13
|
-
variant,
|
|
14
|
-
...props
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<Card extraStyles={extraStyles} {...props}>
|
|
18
|
-
<Box
|
|
19
|
-
padding="24px"
|
|
20
|
-
background={themeValues.headerBackgroundColor}
|
|
21
|
-
extraStyles={`
|
|
22
|
-
border-radius: 4px 4px 0 0;
|
|
23
|
-
`}
|
|
24
|
-
>
|
|
25
|
-
<Title variant="small" color={themeValues.headerTextColor}>
|
|
26
|
-
{header}
|
|
27
|
-
</Title>
|
|
28
|
-
</Box>
|
|
29
|
-
<Box padding="24px">{children}</Box>
|
|
30
|
-
</Card>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export default themeComponent(CardWithHeader, "CardWithHeader", fallbackValues);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Expand from "../../../util/expand";
|
|
3
|
-
|
|
4
|
-
export interface CardWithHeaderProps {
|
|
5
|
-
header: string;
|
|
6
|
-
extraStyles?: string;
|
|
7
|
-
variant?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const CardWithHeader: React.FC<Expand<CardWithHeaderProps> &
|
|
11
|
-
React.HTMLAttributes<HTMLElement>>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { fallbackValues } from "./WelcomeCard.theme";
|
|
4
|
-
import { themeComponent } from "../../../util/themeUtils";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
Box,
|
|
8
|
-
ButtonWithLink,
|
|
9
|
-
Card,
|
|
10
|
-
Cover,
|
|
11
|
-
Paragraph,
|
|
12
|
-
Title
|
|
13
|
-
} from "../../atoms";
|
|
14
|
-
|
|
15
|
-
const WelcomeCard = ({
|
|
16
|
-
themeValues,
|
|
17
|
-
title,
|
|
18
|
-
text,
|
|
19
|
-
buttonText,
|
|
20
|
-
url,
|
|
21
|
-
imageSrc,
|
|
22
|
-
newTab,
|
|
23
|
-
variant
|
|
24
|
-
}) => {
|
|
25
|
-
return (
|
|
26
|
-
<Card variant={variant}>
|
|
27
|
-
{imageSrc && (
|
|
28
|
-
<Cover>
|
|
29
|
-
<img
|
|
30
|
-
src={imageSrc}
|
|
31
|
-
style={{
|
|
32
|
-
background: `${themeValues.imageBackgroundColor}`,
|
|
33
|
-
objectFit: "none",
|
|
34
|
-
height: "150px"
|
|
35
|
-
}}
|
|
36
|
-
/>
|
|
37
|
-
</Cover>
|
|
38
|
-
)}
|
|
39
|
-
<Box padding="24px">
|
|
40
|
-
<Title
|
|
41
|
-
variant="small"
|
|
42
|
-
color={themeValues.titleColor}
|
|
43
|
-
weight={themeValues.titleWeight}
|
|
44
|
-
>
|
|
45
|
-
{title}
|
|
46
|
-
</Title>
|
|
47
|
-
<Paragraph color={themeValues.textColor}>{text}</Paragraph>
|
|
48
|
-
{url && buttonText && (
|
|
49
|
-
<Box extraStyles="margin-top: 4rem; padding: 0">
|
|
50
|
-
<ButtonWithLink
|
|
51
|
-
extraStyles="margin: 0; width: 100%"
|
|
52
|
-
linkExtraStyles="text-decoration:none"
|
|
53
|
-
url={url}
|
|
54
|
-
text={buttonText}
|
|
55
|
-
newTab={newTab}
|
|
56
|
-
/>
|
|
57
|
-
</Box>
|
|
58
|
-
)}
|
|
59
|
-
</Box>
|
|
60
|
-
</Card>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default themeComponent(WelcomeCard, "WelcomeCard", fallbackValues);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BRIGHT_GREY, INFO_BLUE } from "../../../constants/colors";
|
|
2
|
-
|
|
3
|
-
import { FONT_WEIGHT_BOLD } from "../../../constants/style_constants";
|
|
4
|
-
|
|
5
|
-
const titleColor = BRIGHT_GREY;
|
|
6
|
-
const textColor = BRIGHT_GREY;
|
|
7
|
-
const titleWeight = FONT_WEIGHT_BOLD;
|
|
8
|
-
const imageBackgroundColor = INFO_BLUE;
|
|
9
|
-
|
|
10
|
-
export const fallbackValues = {
|
|
11
|
-
textColor,
|
|
12
|
-
titleColor,
|
|
13
|
-
titleWeight,
|
|
14
|
-
imageBackgroundColor
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Expand from "../../../util/expand";
|
|
3
|
-
|
|
4
|
-
export interface WelcomeCardProps {
|
|
5
|
-
title: string;
|
|
6
|
-
text: string;
|
|
7
|
-
url?: string;
|
|
8
|
-
buttonText?: string;
|
|
9
|
-
imageSrc?: string;
|
|
10
|
-
newTab?: boolean;
|
|
11
|
-
variant?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const WelcomeCard: React.FC<Expand<WelcomeCardProps> &
|
|
15
|
-
React.HTMLAttributes<HTMLElement>>;
|