@thecb/components 4.1.22 → 4.1.24
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
CHANGED
|
@@ -34492,7 +34492,10 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
34492
34492
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
34493
34493
|
children = _ref.children,
|
|
34494
34494
|
_ref$customTitle = _ref.customTitle,
|
|
34495
|
-
customTitle = _ref$customTitle === void 0 ? false : _ref$customTitle
|
|
34495
|
+
customTitle = _ref$customTitle === void 0 ? false : _ref$customTitle,
|
|
34496
|
+
_ref$stackTitle = _ref.stackTitle,
|
|
34497
|
+
stackTitle = _ref$stackTitle === void 0 ? false : _ref$stackTitle,
|
|
34498
|
+
stackTitleContent = _ref.stackTitleContent;
|
|
34496
34499
|
|
|
34497
34500
|
var handleKeyDown = function handleKeyDown(e) {
|
|
34498
34501
|
if (e.keyCode === 13) {
|
|
@@ -34536,8 +34539,8 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
34536
34539
|
hoverStyles: "outline: none;",
|
|
34537
34540
|
animate: isOpen ? "open" : "closed",
|
|
34538
34541
|
positionTransition: true
|
|
34539
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
34540
|
-
childGap: isOpen ? "0.5rem" : "0rem"
|
|
34542
|
+
}, stackTitle && /*#__PURE__*/React__default.createElement(React.Fragment, null, stackTitleContent), /*#__PURE__*/React__default.createElement(Stack, {
|
|
34543
|
+
childGap: isOpen && !isMobile ? "0.5rem" : "0rem"
|
|
34541
34544
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
34542
34545
|
padding: customPadding ? customPadding : "0",
|
|
34543
34546
|
background: themeValues.headingBackgroundColor,
|
|
@@ -34931,10 +34934,11 @@ var TableListItem = function TableListItem(_ref) {
|
|
|
34931
34934
|
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit,
|
|
34932
34935
|
_ref$canRemove = _ref.canRemove,
|
|
34933
34936
|
canRemove = _ref$canRemove === void 0 ? false : _ref$canRemove,
|
|
34934
|
-
isMobile = _ref.isMobile
|
|
34937
|
+
isMobile = _ref.isMobile,
|
|
34938
|
+
borderTopItem = _ref.borderTopItem;
|
|
34935
34939
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
34936
34940
|
padding: "0px",
|
|
34937
|
-
extraStyles: "&:last-child {\n > * {\n border-bottom: none;\n }\n }"
|
|
34941
|
+
extraStyles: "&:last-child {\n > * {\n border-bottom: none;\n }\n }\n ".concat(isMobile && borderTopItem && "&:first-child {\n > * {\n border-top: 1px solid ".concat(GHOST_GREY, ";\n }\n }"), "\n ")
|
|
34938
34942
|
}, /*#__PURE__*/React__default.createElement(ItemWrapper, null, /*#__PURE__*/React__default.createElement(EditableTableListItem, {
|
|
34939
34943
|
isMobile: isMobile
|
|
34940
34944
|
}, /*#__PURE__*/React__default.createElement(TableItemKey, {
|
|
@@ -38262,7 +38266,11 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
38262
38266
|
padding: "0 0.25rem 0 0"
|
|
38263
38267
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
38264
38268
|
childGap: "0"
|
|
38265
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
38269
|
+
}, isMobile && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
38270
|
+
variant: "pS",
|
|
38271
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
38272
|
+
textAlign: "left"
|
|
38273
|
+
}, "Amount Due"), /*#__PURE__*/React__default.createElement(AmountCallout$1, {
|
|
38266
38274
|
amount: displayCurrency(totalAmountDue),
|
|
38267
38275
|
textAlign: isMobile ? "left" : "right"
|
|
38268
38276
|
}), autoPayEnabled && /*#__PURE__*/React__default.createElement(AutopayModalModule, {
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { Fragment } from "react";
|
|
2
2
|
import { fallbackValues } from "./CollapsibleSection.theme";
|
|
3
3
|
import { AnimatePresence } from "framer-motion";
|
|
4
4
|
import { themeComponent } from "../../../util/themeUtils";
|
|
@@ -19,7 +19,9 @@ const CollapsibleSection = ({
|
|
|
19
19
|
initiallyOpen = true,
|
|
20
20
|
openHeight = "auto",
|
|
21
21
|
children,
|
|
22
|
-
customTitle = false
|
|
22
|
+
customTitle = false,
|
|
23
|
+
stackTitle = false,
|
|
24
|
+
stackTitleContent
|
|
23
25
|
}) => {
|
|
24
26
|
const handleKeyDown = e => {
|
|
25
27
|
if (e.keyCode === 13) {
|
|
@@ -68,7 +70,8 @@ const CollapsibleSection = ({
|
|
|
68
70
|
animate={isOpen ? "open" : "closed"}
|
|
69
71
|
positionTransition
|
|
70
72
|
>
|
|
71
|
-
|
|
73
|
+
{stackTitle && <Fragment>{stackTitleContent}</Fragment>}
|
|
74
|
+
<Stack childGap={isOpen && !isMobile ? "0.5rem" : "0rem"}>
|
|
72
75
|
<Box
|
|
73
76
|
padding={customPadding ? customPadding : "0"}
|
|
74
77
|
background={themeValues.headingBackgroundColor}
|
|
@@ -9,14 +9,15 @@ import {
|
|
|
9
9
|
} from "./EditableTable.styled";
|
|
10
10
|
import { Box } from "../../atoms/layouts";
|
|
11
11
|
import Text from "../../atoms/text";
|
|
12
|
-
import { CHARADE_GREY } from "../../../constants/colors";
|
|
12
|
+
import { CHARADE_GREY, GHOST_GREY } from "../../../constants/colors";
|
|
13
13
|
|
|
14
14
|
const TableListItem = ({
|
|
15
15
|
title,
|
|
16
16
|
value,
|
|
17
17
|
canEdit = false,
|
|
18
18
|
canRemove = false,
|
|
19
|
-
isMobile
|
|
19
|
+
isMobile,
|
|
20
|
+
borderTopItem
|
|
20
21
|
}) => (
|
|
21
22
|
<Box
|
|
22
23
|
padding="0px"
|
|
@@ -24,7 +25,15 @@ const TableListItem = ({
|
|
|
24
25
|
> * {
|
|
25
26
|
border-bottom: none;
|
|
26
27
|
}
|
|
28
|
+
}
|
|
29
|
+
${isMobile &&
|
|
30
|
+
borderTopItem &&
|
|
31
|
+
`&:first-child {
|
|
32
|
+
> * {
|
|
33
|
+
border-top: 1px solid ${GHOST_GREY};
|
|
34
|
+
}
|
|
27
35
|
}`}
|
|
36
|
+
`}
|
|
28
37
|
>
|
|
29
38
|
<ItemWrapper>
|
|
30
39
|
<EditableTableListItem isMobile={isMobile}>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import AmountCallout from "../../../atoms/amount-callout";
|
|
3
3
|
import { Box, Stack } from "../../../atoms/layouts";
|
|
4
|
+
import Text from "../../../atoms/text";
|
|
5
|
+
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
4
6
|
import { displayCurrency } from "../../../../util/general";
|
|
5
7
|
import { AutopayModalModule } from "./AutopayModalModule";
|
|
6
8
|
|
|
@@ -19,6 +21,11 @@ const AmountModule = ({
|
|
|
19
21
|
return (
|
|
20
22
|
<Box padding="0 0.25rem 0 0">
|
|
21
23
|
<Stack childGap="0">
|
|
24
|
+
{isMobile && (
|
|
25
|
+
<Text variant="pS" weight={FONT_WEIGHT_SEMIBOLD} textAlign="left">
|
|
26
|
+
Amount Due
|
|
27
|
+
</Text>
|
|
28
|
+
)}
|
|
22
29
|
<AmountCallout
|
|
23
30
|
amount={displayCurrency(totalAmountDue)}
|
|
24
31
|
textAlign={isMobile ? "left" : "right"}
|