@thecb/components 4.0.2 → 4.0.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/dist/index.cjs.js +21 -12
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +38353 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormLayouts.theme.js +2 -2
- package/src/components/atoms/heading/Heading.js +3 -1
- package/src/components/atoms/labeled-amount/LabeledAmount.js +3 -1
- package/src/components/molecules/module/Module.js +1 -2
- package/src/components/molecules/module/Module.theme.js +1 -1
- package/src/components/molecules/payment-details/PaymentDetails.js +3 -2
- package/src/components/molecules/radio-section/RadioSection.js +1 -0
- package/.tool-versions +0 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
FIREFLY_GREY,
|
|
3
3
|
MATISSE_BLUE,
|
|
4
4
|
WHITE,
|
|
5
5
|
SEASHELL_WHITE,
|
|
@@ -23,7 +23,7 @@ const inputBackgroundColor = {
|
|
|
23
23
|
disabled: `${SEASHELL_WHITE}`
|
|
24
24
|
};
|
|
25
25
|
const color = { default: `${MINESHAFT_GREY}`, disabled: `${DUSTY_GREY}` };
|
|
26
|
-
const labelColor = { default: `${
|
|
26
|
+
const labelColor = { default: `${FIREFLY_GREY}`, disabled: `${FIREFLY_GREY}` };
|
|
27
27
|
const borderColor = { default: `${GREY_CHATEAU}`, disabled: `${GREY_CHATEAU}` };
|
|
28
28
|
const lineHeight = { default: "1rem", disabled: "1rem" };
|
|
29
29
|
const fontSize = { default: "0.875rem", disabled: "0.875rem" };
|
|
@@ -15,12 +15,14 @@ const Heading = ({
|
|
|
15
15
|
extraStyles = ``,
|
|
16
16
|
className,
|
|
17
17
|
variant = "h1",
|
|
18
|
+
as = "h1",
|
|
18
19
|
dataQa,
|
|
19
20
|
children,
|
|
20
21
|
...rest
|
|
21
22
|
}) => (
|
|
22
23
|
<HeadingText
|
|
23
|
-
|
|
24
|
+
variant={variant}
|
|
25
|
+
as={as}
|
|
24
26
|
weight={weight}
|
|
25
27
|
color={color}
|
|
26
28
|
margin={margin}
|
|
@@ -5,12 +5,13 @@ import { Stack } from "../layouts";
|
|
|
5
5
|
import Heading from "../heading";
|
|
6
6
|
import Paragraph from "../paragraph";
|
|
7
7
|
|
|
8
|
-
const LabeledAmount = ({ variant = "pL", label, amount, themeValues }) => {
|
|
8
|
+
const LabeledAmount = ({ variant = "pL", label, amount, themeValues, as }) => {
|
|
9
9
|
const LabeledAmountText = variant === "h6" ? Heading : Paragraph;
|
|
10
10
|
return (
|
|
11
11
|
<Stack direction="row">
|
|
12
12
|
<LabeledAmountText
|
|
13
13
|
variant={variant}
|
|
14
|
+
as={as}
|
|
14
15
|
weight={themeValues.fontWeight}
|
|
15
16
|
extraStyles="text-align: start; flex: 3;"
|
|
16
17
|
>
|
|
@@ -18,6 +19,7 @@ const LabeledAmount = ({ variant = "pL", label, amount, themeValues }) => {
|
|
|
18
19
|
</LabeledAmountText>
|
|
19
20
|
<LabeledAmountText
|
|
20
21
|
variant={variant}
|
|
22
|
+
as={as}
|
|
21
23
|
weight={themeValues.fontWeight}
|
|
22
24
|
extraStyles="text-align: end; flex: 1;"
|
|
23
25
|
>
|
|
@@ -16,12 +16,11 @@ const Module = ({
|
|
|
16
16
|
<Fragment>
|
|
17
17
|
{heading && (
|
|
18
18
|
<Heading
|
|
19
|
-
variant={variant === "default" ? "h5" : "
|
|
19
|
+
variant={variant === "default" ? "h5" : "h2"}
|
|
20
20
|
weight={themeValues.fontWeight}
|
|
21
21
|
color={themeValues.fontColor}
|
|
22
22
|
margin={`${spacing} 0 ${themeValues.titleSpacing} 0`}
|
|
23
23
|
textAlign={themeValues.textAlign}
|
|
24
|
-
aria-level={variant === "default" ? "3" : "1"}
|
|
25
24
|
>
|
|
26
25
|
{heading}
|
|
27
26
|
</Heading>
|
|
@@ -5,7 +5,7 @@ const fontWeight = { default: "600", largeTitle: "700" };
|
|
|
5
5
|
const fontColor = { default: CHARADE_GREY, largeTitle: CHARADE_GREY };
|
|
6
6
|
const lineHeight = { default: "2rem", largeTitle: "2rem" };
|
|
7
7
|
const textAlign = { default: "left", largeTitle: "left" };
|
|
8
|
-
const titleType = { default: "h5", largeTitle: "
|
|
8
|
+
const titleType = { default: "h5", largeTitle: "h1" };
|
|
9
9
|
const titleSpacing = { default: "0.5rem", largeTitle: "1.125rem" };
|
|
10
10
|
const boxShadow = {
|
|
11
11
|
default:
|
|
@@ -31,6 +31,7 @@ const PaymentDetailsContent = ({
|
|
|
31
31
|
</Box>
|
|
32
32
|
<SolidDivider />
|
|
33
33
|
<LabeledAmount
|
|
34
|
+
as="h2"
|
|
34
35
|
variant={themeValues.labeledAmountTotal}
|
|
35
36
|
label="Total"
|
|
36
37
|
amount={displayCurrency(total)}
|
|
@@ -123,14 +124,14 @@ const PaymentDetails = ({
|
|
|
123
124
|
) : isCollapsible ? (
|
|
124
125
|
<Box width="100%" padding="none">
|
|
125
126
|
<Cluster justify="space-between" align="center">
|
|
126
|
-
<Heading variant="
|
|
127
|
+
<Heading variant="h5" weight="700" as="h1">
|
|
127
128
|
{titleText}
|
|
128
129
|
</Heading>
|
|
129
130
|
{displayCurrency(total)}
|
|
130
131
|
</Cluster>
|
|
131
132
|
</Box>
|
|
132
133
|
) : (
|
|
133
|
-
<Heading variant="h3" weight="700" margin="1rem 0 0 0">
|
|
134
|
+
<Heading as="h1" variant="h3" weight="700" margin="1rem 0 0 0">
|
|
134
135
|
{titleText}
|
|
135
136
|
</Heading>
|
|
136
137
|
);
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|