@thecb/components 7.8.0-beta.0 → 7.8.1
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 +823 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +140 -1
- package/dist/index.esm.js +808 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +4 -3
- package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +14 -0
- package/src/components/atoms/icons/ArrowDownCircleIconSmall.d.ts +12 -0
- package/src/components/atoms/icons/ArrowDownCircleIconSmall.js +50 -0
- package/src/components/atoms/icons/ArrowLeftCircleIconMedium.d.ts +12 -0
- package/src/components/atoms/icons/ArrowLeftCircleIconMedium.js +50 -0
- package/src/components/atoms/icons/ArrowLeftCircleIconSmall.d.ts +12 -0
- package/src/components/atoms/icons/ArrowLeftCircleIconSmall.js +49 -0
- package/src/components/atoms/icons/ArrowRightCircleIconSmall.d.ts +12 -0
- package/src/components/atoms/icons/ArrowRightCircleIconSmall.js +42 -0
- package/src/components/atoms/icons/ArrowUpCircleIconSmall.d.ts +12 -0
- package/src/components/atoms/icons/ArrowUpCircleIconSmall.js +50 -0
- package/src/components/atoms/icons/BankIconLarge.d.ts +9 -0
- package/src/components/atoms/icons/BankIconLarge.js +34 -0
- package/src/components/atoms/icons/ChargebackIconMedium.d.ts +10 -0
- package/src/components/atoms/icons/ChargebackIconMedium.js +37 -0
- package/src/components/atoms/icons/ChargebackIconSmall.d.ts +10 -0
- package/src/components/atoms/icons/ChargebackIconSmall.js +37 -0
- package/src/components/atoms/icons/ChargebackReversalIconMedium.d.ts +12 -0
- package/src/components/atoms/icons/ChargebackReversalIconMedium.js +37 -0
- package/src/components/atoms/icons/ChargebackReversalIconSmall.d.ts +12 -0
- package/src/components/atoms/icons/ChargebackReversalIconSmall.js +37 -0
- package/src/components/atoms/icons/RefundIconMedium.d.ts +10 -0
- package/src/components/atoms/icons/RefundIconMedium.js +43 -0
- package/src/components/atoms/icons/RefundIconSmall.d.ts +10 -0
- package/src/components/atoms/icons/RefundIconSmall.js +43 -0
- package/src/components/atoms/icons/SuccessfulIconMedium.d.ts +9 -0
- package/src/components/atoms/icons/SuccessfulIconMedium.js +56 -0
- package/src/components/atoms/icons/SuccessfulIconSmall.d.ts +9 -0
- package/src/components/atoms/icons/SuccessfulIconSmall.js +64 -0
- package/src/components/atoms/icons/XCircleIconMedium.d.ts +10 -0
- package/src/components/atoms/icons/XCircleIconMedium.js +43 -0
- package/src/components/atoms/icons/XCircleIconSmall.d.ts +10 -0
- package/src/components/atoms/icons/XCircleIconSmall.js +43 -0
- package/src/components/atoms/icons/index.d.ts +16 -0
- package/src/components/atoms/icons/index.js +33 -1
- package/src/components/atoms/searchable-select/SearchableSelect.js +30 -32
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +7 -4
- package/src/components/molecules/module/Module.js +22 -13
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { Fragment, memo } from "react";
|
|
2
2
|
import { themeComponent } from "../../../util/themeUtils";
|
|
3
3
|
import { fallbackValues } from "./Module.theme";
|
|
4
|
-
import Heading from "../../atoms/heading";
|
|
5
4
|
import Title from "../../atoms/title";
|
|
6
|
-
import { Box } from "../../atoms/layouts";
|
|
5
|
+
import { Box, Cluster } from "../../atoms/layouts";
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
New (01/22) - updated <Module /> to use <Title /> atom
|
|
@@ -25,6 +24,8 @@ const Module = ({
|
|
|
25
24
|
variant = "default",
|
|
26
25
|
fontSize,
|
|
27
26
|
as,
|
|
27
|
+
titleID = "",
|
|
28
|
+
rightTitleContent,
|
|
28
29
|
children
|
|
29
30
|
}) => {
|
|
30
31
|
const themedFontSize =
|
|
@@ -37,20 +38,28 @@ const Module = ({
|
|
|
37
38
|
const themedElemType =
|
|
38
39
|
variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
39
40
|
const computedElemType = as || themedElemType;
|
|
41
|
+
const headingText = (
|
|
42
|
+
<Title
|
|
43
|
+
weight={themeValues.fontWeight}
|
|
44
|
+
color={themeValues.fontColor}
|
|
45
|
+
margin={`${spacing} 0 ${themeValues.titleSpacing} 0`}
|
|
46
|
+
textAlign={themeValues.textAlign}
|
|
47
|
+
as={computedElemType}
|
|
48
|
+
extraStyles={`font-size: ${computedFontSize};`}
|
|
49
|
+
id={titleID}
|
|
50
|
+
>
|
|
51
|
+
{heading}
|
|
52
|
+
</Title>
|
|
53
|
+
);
|
|
40
54
|
|
|
41
55
|
return (
|
|
42
56
|
<Fragment>
|
|
43
|
-
{heading &&
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
as={computedElemType}
|
|
50
|
-
extraStyles={`font-size: ${computedFontSize};`}
|
|
51
|
-
>
|
|
52
|
-
{heading}
|
|
53
|
-
</Title>
|
|
57
|
+
{heading && !rightTitleContent && headingText}
|
|
58
|
+
{heading && rightTitleContent && (
|
|
59
|
+
<Cluster justify="space-between" align="center" nowrap>
|
|
60
|
+
{headingText}
|
|
61
|
+
{rightTitleContent}
|
|
62
|
+
</Cluster>
|
|
54
63
|
)}
|
|
55
64
|
<Box padding={`0 0 ${spacingBottom}`}>
|
|
56
65
|
<Box
|