@thecb/components 10.4.0 → 10.4.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 +3006 -2925
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3006 -2925
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/molecules/payment-details/PaymentDetails.js +51 -14
- package/src/components/molecules/payment-details/PaymentDetails.stories.js +2 -0
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
Binary file
|
|
@@ -13,7 +13,8 @@ import Title from "../../atoms/title";
|
|
|
13
13
|
import SolidDivider from "../../atoms/solid-divider";
|
|
14
14
|
import {
|
|
15
15
|
FONT_WEIGHT_BOLD,
|
|
16
|
-
FONT_WEIGHT_REGULAR
|
|
16
|
+
FONT_WEIGHT_REGULAR,
|
|
17
|
+
FONT_WEIGHT_SEMIBOLD
|
|
17
18
|
} from "../../../constants/style_constants";
|
|
18
19
|
import { ATHENS_GREY } from "../../../constants/colors";
|
|
19
20
|
import ButtonWithAction from "../../atoms/button-with-action";
|
|
@@ -33,9 +34,12 @@ const PaymentDetailsContent = ({
|
|
|
33
34
|
voidableTransactionDetails,
|
|
34
35
|
voidableAmountPaid,
|
|
35
36
|
partialVoidAction,
|
|
36
|
-
remainingBalance
|
|
37
|
+
remainingBalance,
|
|
38
|
+
agencySubheading,
|
|
39
|
+
isCollapsible
|
|
37
40
|
}) => (
|
|
38
41
|
<Stack childGap="16px">
|
|
42
|
+
{isCollapsible && agencySubheading}
|
|
39
43
|
{lineItemElems}
|
|
40
44
|
{hasVoidablePaymentsSection && (
|
|
41
45
|
<Box background={ATHENS_GREY}>
|
|
@@ -255,7 +259,9 @@ const PaymentDetails = ({
|
|
|
255
259
|
remainingBalance = false,
|
|
256
260
|
// end partial void section
|
|
257
261
|
isLoading = false,
|
|
258
|
-
isError = false
|
|
262
|
+
isError = false,
|
|
263
|
+
multiCartEnabled = false,
|
|
264
|
+
agencyDisplayName
|
|
259
265
|
}) => {
|
|
260
266
|
const [isOpen, setIsOpen] = useState(initiallyOpen);
|
|
261
267
|
const fees = _fees
|
|
@@ -284,6 +290,30 @@ const PaymentDetails = ({
|
|
|
284
290
|
/>
|
|
285
291
|
</Fragment>
|
|
286
292
|
));
|
|
293
|
+
const agencySubheading = (
|
|
294
|
+
<>
|
|
295
|
+
{multiCartEnabled && agencyDisplayName && (
|
|
296
|
+
<Cluster
|
|
297
|
+
justify="space-between"
|
|
298
|
+
align="center"
|
|
299
|
+
style={{ margin: isCollapsible ? "0" : "0.5rem 0" }}
|
|
300
|
+
>
|
|
301
|
+
<Title
|
|
302
|
+
weight={FONT_WEIGHT_REGULAR}
|
|
303
|
+
as="h3"
|
|
304
|
+
extraStyles={`font-size: 1rem;`}
|
|
305
|
+
>
|
|
306
|
+
{agencyDisplayName}
|
|
307
|
+
</Title>
|
|
308
|
+
{lineItems?.length && (
|
|
309
|
+
<Text variant="pS" color={themeValues.text} weight="400">
|
|
310
|
+
{`${lineItems.length} item${lineItems.length > 1 ? "s" : ""}`}
|
|
311
|
+
</Text>
|
|
312
|
+
)}
|
|
313
|
+
</Cluster>
|
|
314
|
+
)}
|
|
315
|
+
</>
|
|
316
|
+
);
|
|
287
317
|
const content = isCollapsible ? (
|
|
288
318
|
<Stack childGap="0">
|
|
289
319
|
<Box padding="4.5px" />
|
|
@@ -301,7 +331,9 @@ const PaymentDetails = ({
|
|
|
301
331
|
voidableTransactionDetails,
|
|
302
332
|
voidableAmountPaid,
|
|
303
333
|
partialVoidAction,
|
|
304
|
-
remainingBalance
|
|
334
|
+
remainingBalance,
|
|
335
|
+
agencySubheading,
|
|
336
|
+
isCollapsible
|
|
305
337
|
}}
|
|
306
338
|
/>
|
|
307
339
|
</Stack>
|
|
@@ -318,7 +350,9 @@ const PaymentDetails = ({
|
|
|
318
350
|
voidableTransactionDetails,
|
|
319
351
|
voidableAmountPaid,
|
|
320
352
|
partialVoidAction,
|
|
321
|
-
remainingBalance
|
|
353
|
+
remainingBalance,
|
|
354
|
+
agencySubheading,
|
|
355
|
+
isCollapsible
|
|
322
356
|
}}
|
|
323
357
|
/>
|
|
324
358
|
);
|
|
@@ -345,15 +379,18 @@ const PaymentDetails = ({
|
|
|
345
379
|
</Cluster>
|
|
346
380
|
</Box>
|
|
347
381
|
) : (
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
382
|
+
<>
|
|
383
|
+
<Title
|
|
384
|
+
as="h2"
|
|
385
|
+
weight={FONT_WEIGHT_BOLD}
|
|
386
|
+
margin="1rem 0 0 0"
|
|
387
|
+
extraStyles={`font-size: 1.75rem;`}
|
|
388
|
+
id="payment-details-title"
|
|
389
|
+
>
|
|
390
|
+
{titleText}
|
|
391
|
+
</Title>
|
|
392
|
+
{agencySubheading}
|
|
393
|
+
</>
|
|
357
394
|
);
|
|
358
395
|
return isCollapsible ? (
|
|
359
396
|
<Collapsible
|
|
@@ -160,6 +160,8 @@ export const paymentDetails = () => (
|
|
|
160
160
|
collapsibleOnMobile={boolean("collapsibleOnMobile", false, "props")}
|
|
161
161
|
initiallyOpen={boolean("initiallyOpen", true, "props")}
|
|
162
162
|
hideTitle={boolean("hideTitle", false, "props")}
|
|
163
|
+
multiCartEnabled={true}
|
|
164
|
+
agencyDisplayName="Office of Charitable Trust"
|
|
163
165
|
/>
|
|
164
166
|
);
|
|
165
167
|
|