@npm_leadtech/legal-lib-components 7.106.2 → 7.106.5
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/images/BenefitsCheckout/benefits-ai.svg +3 -0
- package/dist/images/BenefitsCheckout/benefits-check.svg +3 -0
- package/dist/images/CheckoutSummary/checkout-summary-document-56586a.png +0 -0
- package/dist/images/SocialProofBar/social-proof-avatar-01-avatar-1.png +0 -0
- package/dist/images/SocialProofBar/social-proof-avatar-02-avatar-2.png +0 -0
- package/dist/images/SocialProofBar/social-proof-avatar-03-avatar-3.png +0 -0
- package/dist/images/SocialProofBar/social-proof-avatar-04-avatar-4.png +0 -0
- package/dist/images/SocialProofBar/social-proof-avatar-05-avatar-5.png +0 -0
- package/dist/images/SocialProofBar/social-proof-star.svg +3 -0
- package/dist/images/componentsSvg/LockOutlineIcon.d.ts +7 -0
- package/dist/images/componentsSvg/LockOutlineIcon.js +2 -0
- package/dist/images/componentsSvg/LockOutlineIcon.tsx +19 -0
- package/dist/images/componentsSvg/__tests__/ArrowRight.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/Balance.test.tsx +24 -0
- package/dist/images/componentsSvg/__tests__/ChevronExpandLess.test.tsx +18 -0
- package/dist/images/componentsSvg/__tests__/ChevronExpandMore.test.tsx +23 -0
- package/dist/images/componentsSvg/__tests__/ChevronRight.test.tsx +18 -0
- package/dist/images/componentsSvg/__tests__/ChevronRight24px.test.tsx +26 -0
- package/dist/images/componentsSvg/__tests__/CloseIcon.test.tsx +23 -0
- package/dist/images/componentsSvg/__tests__/Delete24p.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/Done24px.test.tsx +24 -0
- package/dist/images/componentsSvg/__tests__/Done24pxoutlined.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/Edit24p.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/EditText24px.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/EmploymentIcon.test.tsx +19 -0
- package/dist/images/componentsSvg/__tests__/Eye24pxOptimized.test.tsx +26 -0
- package/dist/images/componentsSvg/__tests__/GdprLockSvg.test.tsx +31 -0
- package/dist/images/componentsSvg/__tests__/IconDuplicate24px.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/IconWeb.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/InfoError24pxOutlined.test.tsx +28 -0
- package/dist/images/componentsSvg/__tests__/InfoLocationSvg.test.tsx +19 -0
- package/dist/images/componentsSvg/__tests__/InfoMailSvg.test.tsx +18 -0
- package/dist/images/componentsSvg/__tests__/InfoPhoneSvg.test.tsx +18 -0
- package/dist/images/componentsSvg/__tests__/LogoutSvg.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/MailSvg.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/MenuCollapse24p.test.tsx +28 -0
- package/dist/images/componentsSvg/__tests__/NewDocumentSvg.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/NewRelease24p.test.tsx +24 -0
- package/dist/images/componentsSvg/__tests__/PhoneIcon.test.tsx +28 -0
- package/dist/images/componentsSvg/__tests__/PhoneIcon24px.test.tsx +29 -0
- package/dist/images/componentsSvg/__tests__/RatafiaIcon24px.test.tsx +24 -0
- package/dist/images/componentsSvg/__tests__/SearchIcon.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/Sign24px.test.tsx +24 -0
- package/dist/images/componentsSvg/__tests__/SslShieldSvg.test.tsx +25 -0
- package/dist/images/componentsSvg/__tests__/SymbolDoc.test.tsx +28 -0
- package/dist/images/componentsSvg/__tests__/Time24px.test.tsx +24 -0
- package/dist/images/componentsSvg/flags/__tests__/CAFlag.test.tsx +26 -0
- package/dist/images/componentsSvg/flags/__tests__/DEFlag.test.tsx +30 -0
- package/dist/images/componentsSvg/flags/__tests__/GBFlag.test.tsx +28 -0
- package/dist/images/componentsSvg/flags/__tests__/USFlag.test.tsx +27 -0
- package/dist/images/componentsSvg/generalCategories/__tests__/BusinessIconCategory.test.tsx +25 -0
- package/dist/images/componentsSvg/generalCategories/__tests__/EmploymentIconCategory.test.tsx +24 -0
- package/dist/images/componentsSvg/generalCategories/__tests__/FinanceIconCategory.test.tsx +25 -0
- package/dist/images/componentsSvg/generalCategories/__tests__/PersonalFamilyIconCategory.test.tsx +26 -0
- package/dist/images/componentsSvg/generalCategories/__tests__/RealEstateIconCategory.test.tsx +25 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.d.ts +3 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.js +13 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.styled.d.ts +1 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.styled.js +56 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.styled.ts +58 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckout.tsx +34 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckoutProps.types.d.ts +10 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckoutProps.types.js +1 -0
- package/dist/src/components/molecules/BenefitsCheckout/BenefitsCheckoutProps.types.ts +12 -0
- package/dist/src/components/molecules/BenefitsCheckout/index.d.ts +2 -0
- package/dist/src/components/molecules/BenefitsCheckout/index.js +1 -0
- package/dist/src/components/molecules/BenefitsCheckout/index.ts +6 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.d.ts +3 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.js +24 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.styled.d.ts +1 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.styled.js +194 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.styled.ts +198 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummary.tsx +59 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummaryProps.types.d.ts +10 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummaryProps.types.js +1 -0
- package/dist/src/components/molecules/CheckoutSummary/CheckoutSummaryProps.types.ts +11 -0
- package/dist/src/components/molecules/CheckoutSummary/index.d.ts +2 -0
- package/dist/src/components/molecules/CheckoutSummary/index.js +1 -0
- package/dist/src/components/molecules/CheckoutSummary/index.ts +2 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.d.ts +3 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.js +11 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.styled.d.ts +1 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.styled.js +115 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.styled.ts +117 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBar.tsx +43 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBarProps.types.d.ts +8 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBarProps.types.js +1 -0
- package/dist/src/components/molecules/SocialProofBar/SocialProofBarProps.types.ts +8 -0
- package/dist/src/components/molecules/SocialProofBar/index.d.ts +2 -0
- package/dist/src/components/molecules/SocialProofBar/index.js +1 -0
- package/dist/src/components/molecules/SocialProofBar/index.ts +2 -0
- package/dist/src/components/molecules/index.d.ts +3 -0
- package/dist/src/components/molecules/index.js +3 -0
- package/dist/src/components/molecules/index.ts +3 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
import { size } from '../../../globalStyles/breakpoints'
|
|
4
|
+
|
|
5
|
+
export const BenefitsCheckoutStyled = styled.section`
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
display: flex;
|
|
8
|
+
width: 100%;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
gap: 0.625rem;
|
|
12
|
+
padding: 1.5rem;
|
|
13
|
+
border-radius: 1rem;
|
|
14
|
+
background: var(--neutral-neutral-6);
|
|
15
|
+
font-family: var(--font-main);
|
|
16
|
+
|
|
17
|
+
.benefits-checkout {
|
|
18
|
+
&__title {
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: var(--neutral-neutral-2);
|
|
21
|
+
font-size: 0.875rem;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
line-height: 1.125rem;
|
|
24
|
+
letter-spacing: -0.0214em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__list {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: 0.5rem;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
list-style: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__item {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
gap: 0.5rem;
|
|
40
|
+
color: var(--neutral-neutral-2);
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
line-height: 1.125rem;
|
|
44
|
+
letter-spacing: -0.0214em;
|
|
45
|
+
|
|
46
|
+
img {
|
|
47
|
+
display: block;
|
|
48
|
+
width: 1.125rem;
|
|
49
|
+
height: 1.125rem;
|
|
50
|
+
flex: 0 0 1.125rem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (max-width: ${size.tab}) {
|
|
56
|
+
padding: 1rem;
|
|
57
|
+
}
|
|
58
|
+
`
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { type FC, useId } from 'react'
|
|
2
|
+
|
|
3
|
+
import { type BenefitsCheckoutProps } from './BenefitsCheckoutProps.types'
|
|
4
|
+
import { BenefitsCheckoutStyled } from './BenefitsCheckout.styled'
|
|
5
|
+
import aiIcon from '../../../../images/BenefitsCheckout/benefits-ai.svg'
|
|
6
|
+
import checkIcon from '../../../../images/BenefitsCheckout/benefits-check.svg'
|
|
7
|
+
|
|
8
|
+
const iconByType = {
|
|
9
|
+
ai: aiIcon,
|
|
10
|
+
check: checkIcon
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const BenefitsCheckout: FC<BenefitsCheckoutProps> = ({ title, benefits, className }) => {
|
|
14
|
+
const titleId = useId()
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<BenefitsCheckoutStyled
|
|
18
|
+
className={['benefits-checkout', className].filter(Boolean).join(' ')}
|
|
19
|
+
aria-labelledby={titleId}
|
|
20
|
+
>
|
|
21
|
+
<h2 className='benefits-checkout__title' id={titleId}>
|
|
22
|
+
{title}
|
|
23
|
+
</h2>
|
|
24
|
+
<ul className='benefits-checkout__list'>
|
|
25
|
+
{benefits.map((benefit, index) => (
|
|
26
|
+
<li className='benefits-checkout__item' key={`${benefit.icon ?? 'check'}-${index}-${benefit.text}`}>
|
|
27
|
+
<img src={iconByType[benefit.icon ?? 'check']} alt='' aria-hidden='true' />
|
|
28
|
+
<span>{benefit.text}</span>
|
|
29
|
+
</li>
|
|
30
|
+
))}
|
|
31
|
+
</ul>
|
|
32
|
+
</BenefitsCheckoutStyled>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type BenefitsCheckoutIcon = 'check' | 'ai';
|
|
2
|
+
export interface CheckoutBenefit {
|
|
3
|
+
text: string;
|
|
4
|
+
icon?: BenefitsCheckoutIcon;
|
|
5
|
+
}
|
|
6
|
+
export interface BenefitsCheckoutProps {
|
|
7
|
+
title: string;
|
|
8
|
+
benefits: readonly CheckoutBenefit[];
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type BenefitsCheckoutIcon = 'check' | 'ai'
|
|
2
|
+
|
|
3
|
+
export interface CheckoutBenefit {
|
|
4
|
+
text: string
|
|
5
|
+
icon?: BenefitsCheckoutIcon
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface BenefitsCheckoutProps {
|
|
9
|
+
title: string
|
|
10
|
+
benefits: readonly CheckoutBenefit[]
|
|
11
|
+
className?: string
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BenefitsCheckout } from './BenefitsCheckout';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CheckoutSummaryStyled } from './CheckoutSummary.styled';
|
|
4
|
+
import { BalanceSvg } from '../../../../images/componentsSvg/Balance';
|
|
5
|
+
import { LockOutlineIcon } from '../../../../images/componentsSvg/LockOutlineIcon';
|
|
6
|
+
import checkoutSummaryDocument from '../../../../images/CheckoutSummary/checkout-summary-document-56586a.png';
|
|
7
|
+
const hasPreviewContent = (content) => {
|
|
8
|
+
if (content == null || typeof content === 'boolean')
|
|
9
|
+
return false;
|
|
10
|
+
if (typeof content === 'string')
|
|
11
|
+
return content.trim().length > 0;
|
|
12
|
+
if (typeof content === 'number')
|
|
13
|
+
return true;
|
|
14
|
+
if (Array.isArray(content))
|
|
15
|
+
return content.some(hasPreviewContent);
|
|
16
|
+
if (React.isValidElement(content)) {
|
|
17
|
+
return content.type === React.Fragment ? hasPreviewContent(content.props.children) : true;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
};
|
|
21
|
+
export const CheckoutSummary = ({ documentName, documentDescription, verificationLabel, totalDueLabel, totalDueAmount, previewImage, className }) => {
|
|
22
|
+
const previewContent = hasPreviewContent(previewImage) ? previewImage : _jsx("img", { src: checkoutSummaryDocument, alt: '' });
|
|
23
|
+
return (_jsxs(CheckoutSummaryStyled, { className: ['checkout-summary', className].filter(Boolean).join(' '), children: [_jsxs("div", { className: 'checkout-summary__document', children: [_jsxs("div", { className: 'checkout-summary__preview', "aria-hidden": 'true', children: [previewContent, _jsx("span", { className: 'checkout-summary__preview-lock', children: _jsx(LockOutlineIcon, {}) })] }), _jsxs("div", { className: 'checkout-summary__content', children: [_jsxs("span", { className: 'checkout-summary__verification', children: [_jsx(BalanceSvg, { fill: '#936C2F' }), _jsx("span", { children: verificationLabel })] }), _jsx("h2", { className: 'checkout-summary__name', children: documentName }), _jsx("p", { className: 'checkout-summary__description', children: documentDescription })] })] }), _jsx("dl", { className: 'checkout-summary__pricing', children: _jsxs("div", { className: 'checkout-summary__total', children: [_jsx("dt", { children: totalDueLabel }), _jsx("dd", { children: totalDueAmount })] }) })] }));
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CheckoutSummaryStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { size } from '../../../globalStyles/breakpoints';
|
|
3
|
+
const mobileStyles = css `
|
|
4
|
+
gap: 1rem;
|
|
5
|
+
padding: 0.5rem 0.5rem 1rem;
|
|
6
|
+
|
|
7
|
+
.checkout-summary {
|
|
8
|
+
&__document {
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__content {
|
|
13
|
+
gap: 0.25rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__verification {
|
|
17
|
+
gap: 0.125rem;
|
|
18
|
+
padding: 0.125rem;
|
|
19
|
+
font-size: 0.625rem;
|
|
20
|
+
line-height: 0.875rem;
|
|
21
|
+
letter-spacing: -0.03em;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__name {
|
|
25
|
+
font-size: 0.875rem;
|
|
26
|
+
line-height: 1.125rem;
|
|
27
|
+
letter-spacing: -0.0214em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__pricing {
|
|
31
|
+
gap: 0.5rem;
|
|
32
|
+
padding: 0 0.5rem;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
const desktopStyles = css `
|
|
37
|
+
gap: 1.5rem;
|
|
38
|
+
padding: 1.5rem;
|
|
39
|
+
|
|
40
|
+
.checkout-summary {
|
|
41
|
+
&__document {
|
|
42
|
+
gap: 1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__content {
|
|
46
|
+
gap: 0.5rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__pricing {
|
|
50
|
+
gap: 1rem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
export const CheckoutSummaryStyled = styled.div `
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: flex;
|
|
57
|
+
width: 100%;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
align-items: stretch;
|
|
60
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
61
|
+
border-radius: 1rem;
|
|
62
|
+
background: var(--others-white);
|
|
63
|
+
|
|
64
|
+
${desktopStyles}
|
|
65
|
+
|
|
66
|
+
@media (max-width: ${size.tab}) {
|
|
67
|
+
${mobileStyles}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.checkout-summary {
|
|
71
|
+
&__document {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
display: flex;
|
|
74
|
+
width: 100%;
|
|
75
|
+
align-items: center;
|
|
76
|
+
padding: 0.5rem;
|
|
77
|
+
border-radius: 0.5rem;
|
|
78
|
+
background: var(--secondary-main-light-4);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__preview {
|
|
82
|
+
position: relative;
|
|
83
|
+
width: 4.8125rem;
|
|
84
|
+
height: 6.25rem;
|
|
85
|
+
flex: 0 0 4.8125rem;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
88
|
+
border-radius: 0.25rem;
|
|
89
|
+
background: var(--others-white);
|
|
90
|
+
|
|
91
|
+
> :not(.checkout-summary__preview-lock) {
|
|
92
|
+
display: block;
|
|
93
|
+
width: 100%;
|
|
94
|
+
height: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
img {
|
|
98
|
+
object-fit: cover;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__preview-lock {
|
|
103
|
+
position: absolute;
|
|
104
|
+
inset: 0;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
color: var(--neutral-neutral-1);
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
|
|
111
|
+
svg {
|
|
112
|
+
box-sizing: content-box;
|
|
113
|
+
padding: 0.25rem;
|
|
114
|
+
border-radius: 0.25rem;
|
|
115
|
+
background: var(--neutral-neutral-4);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__content {
|
|
120
|
+
display: flex;
|
|
121
|
+
min-width: 0;
|
|
122
|
+
flex: 1;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__verification {
|
|
128
|
+
box-sizing: border-box;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
max-width: 100%;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
gap: 0.25rem;
|
|
134
|
+
padding: 0.25rem;
|
|
135
|
+
border-radius: 0.25rem;
|
|
136
|
+
background: var(--secondary-main-light-2);
|
|
137
|
+
color: var(--neutral-neutral-1);
|
|
138
|
+
font-family: var(--font-main);
|
|
139
|
+
font-size: 0.75rem;
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
line-height: 1rem;
|
|
142
|
+
letter-spacing: -0.025em;
|
|
143
|
+
text-transform: uppercase;
|
|
144
|
+
|
|
145
|
+
svg {
|
|
146
|
+
flex: 0 0 auto;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&__name {
|
|
151
|
+
margin: 0;
|
|
152
|
+
color: var(--neutral-neutral-1);
|
|
153
|
+
font-family: var(--font-main);
|
|
154
|
+
font-size: 1rem;
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
line-height: 1.375rem;
|
|
157
|
+
letter-spacing: -0.0188em;
|
|
158
|
+
overflow-wrap: anywhere;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__description {
|
|
162
|
+
margin: 0;
|
|
163
|
+
color: var(--neutral-neutral-2);
|
|
164
|
+
font-family: var(--font-main);
|
|
165
|
+
font-size: 0.75rem;
|
|
166
|
+
font-weight: 400;
|
|
167
|
+
line-height: 1rem;
|
|
168
|
+
letter-spacing: -0.025em;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&__pricing {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
margin: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&__total {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: space-between;
|
|
181
|
+
gap: 1rem;
|
|
182
|
+
color: var(--neutral-neutral-1);
|
|
183
|
+
font-family: var(--font-main);
|
|
184
|
+
font-size: 1rem;
|
|
185
|
+
font-weight: 700;
|
|
186
|
+
line-height: 1.375rem;
|
|
187
|
+
|
|
188
|
+
dt,
|
|
189
|
+
dd {
|
|
190
|
+
margin: 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
`;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
import { size } from '../../../globalStyles/breakpoints'
|
|
4
|
+
|
|
5
|
+
const mobileStyles = css`
|
|
6
|
+
gap: 1rem;
|
|
7
|
+
padding: 0.5rem 0.5rem 1rem;
|
|
8
|
+
|
|
9
|
+
.checkout-summary {
|
|
10
|
+
&__document {
|
|
11
|
+
gap: 0.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__content {
|
|
15
|
+
gap: 0.25rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__verification {
|
|
19
|
+
gap: 0.125rem;
|
|
20
|
+
padding: 0.125rem;
|
|
21
|
+
font-size: 0.625rem;
|
|
22
|
+
line-height: 0.875rem;
|
|
23
|
+
letter-spacing: -0.03em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__name {
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
line-height: 1.125rem;
|
|
29
|
+
letter-spacing: -0.0214em;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__pricing {
|
|
33
|
+
gap: 0.5rem;
|
|
34
|
+
padding: 0 0.5rem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`
|
|
38
|
+
|
|
39
|
+
const desktopStyles = css`
|
|
40
|
+
gap: 1.5rem;
|
|
41
|
+
padding: 1.5rem;
|
|
42
|
+
|
|
43
|
+
.checkout-summary {
|
|
44
|
+
&__document {
|
|
45
|
+
gap: 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__content {
|
|
49
|
+
gap: 0.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__pricing {
|
|
53
|
+
gap: 1rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`
|
|
57
|
+
|
|
58
|
+
export const CheckoutSummaryStyled = styled.div`
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
display: flex;
|
|
61
|
+
width: 100%;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
align-items: stretch;
|
|
64
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
65
|
+
border-radius: 1rem;
|
|
66
|
+
background: var(--others-white);
|
|
67
|
+
|
|
68
|
+
${desktopStyles}
|
|
69
|
+
|
|
70
|
+
@media (max-width: ${size.tab}) {
|
|
71
|
+
${mobileStyles}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.checkout-summary {
|
|
75
|
+
&__document {
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
display: flex;
|
|
78
|
+
width: 100%;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding: 0.5rem;
|
|
81
|
+
border-radius: 0.5rem;
|
|
82
|
+
background: var(--secondary-main-light-4);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__preview {
|
|
86
|
+
position: relative;
|
|
87
|
+
width: 4.8125rem;
|
|
88
|
+
height: 6.25rem;
|
|
89
|
+
flex: 0 0 4.8125rem;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
border: 1px solid var(--neutral-neutral-4);
|
|
92
|
+
border-radius: 0.25rem;
|
|
93
|
+
background: var(--others-white);
|
|
94
|
+
|
|
95
|
+
> :not(.checkout-summary__preview-lock) {
|
|
96
|
+
display: block;
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
img {
|
|
102
|
+
object-fit: cover;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&__preview-lock {
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 0;
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
color: var(--neutral-neutral-1);
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
|
|
115
|
+
svg {
|
|
116
|
+
box-sizing: content-box;
|
|
117
|
+
padding: 0.25rem;
|
|
118
|
+
border-radius: 0.25rem;
|
|
119
|
+
background: var(--neutral-neutral-4);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__content {
|
|
124
|
+
display: flex;
|
|
125
|
+
min-width: 0;
|
|
126
|
+
flex: 1;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
align-items: flex-start;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&__verification {
|
|
132
|
+
box-sizing: border-box;
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
gap: 0.25rem;
|
|
138
|
+
padding: 0.25rem;
|
|
139
|
+
border-radius: 0.25rem;
|
|
140
|
+
background: var(--secondary-main-light-2);
|
|
141
|
+
color: var(--neutral-neutral-1);
|
|
142
|
+
font-family: var(--font-main);
|
|
143
|
+
font-size: 0.75rem;
|
|
144
|
+
font-weight: 700;
|
|
145
|
+
line-height: 1rem;
|
|
146
|
+
letter-spacing: -0.025em;
|
|
147
|
+
text-transform: uppercase;
|
|
148
|
+
|
|
149
|
+
svg {
|
|
150
|
+
flex: 0 0 auto;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&__name {
|
|
155
|
+
margin: 0;
|
|
156
|
+
color: var(--neutral-neutral-1);
|
|
157
|
+
font-family: var(--font-main);
|
|
158
|
+
font-size: 1rem;
|
|
159
|
+
font-weight: 700;
|
|
160
|
+
line-height: 1.375rem;
|
|
161
|
+
letter-spacing: -0.0188em;
|
|
162
|
+
overflow-wrap: anywhere;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__description {
|
|
166
|
+
margin: 0;
|
|
167
|
+
color: var(--neutral-neutral-2);
|
|
168
|
+
font-family: var(--font-main);
|
|
169
|
+
font-size: 0.75rem;
|
|
170
|
+
font-weight: 400;
|
|
171
|
+
line-height: 1rem;
|
|
172
|
+
letter-spacing: -0.025em;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__pricing {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
margin: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&__total {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: space-between;
|
|
185
|
+
gap: 1rem;
|
|
186
|
+
color: var(--neutral-neutral-1);
|
|
187
|
+
font-family: var(--font-main);
|
|
188
|
+
font-size: 1rem;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
line-height: 1.375rem;
|
|
191
|
+
|
|
192
|
+
dt,
|
|
193
|
+
dd {
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { type FC } from 'react'
|
|
2
|
+
|
|
3
|
+
import { type CheckoutSummaryProps } from './CheckoutSummaryProps.types'
|
|
4
|
+
import { CheckoutSummaryStyled } from './CheckoutSummary.styled'
|
|
5
|
+
|
|
6
|
+
import { BalanceSvg } from '../../../../images/componentsSvg/Balance'
|
|
7
|
+
import { LockOutlineIcon } from '../../../../images/componentsSvg/LockOutlineIcon'
|
|
8
|
+
import checkoutSummaryDocument from '../../../../images/CheckoutSummary/checkout-summary-document-56586a.png'
|
|
9
|
+
|
|
10
|
+
const hasPreviewContent = (content: React.ReactNode): boolean => {
|
|
11
|
+
if (content == null || typeof content === 'boolean') return false
|
|
12
|
+
if (typeof content === 'string') return content.trim().length > 0
|
|
13
|
+
if (typeof content === 'number') return true
|
|
14
|
+
if (Array.isArray(content)) return content.some(hasPreviewContent)
|
|
15
|
+
if (React.isValidElement<{ children?: React.ReactNode }>(content)) {
|
|
16
|
+
return content.type === React.Fragment ? hasPreviewContent(content.props.children) : true
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return false
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const CheckoutSummary: FC<CheckoutSummaryProps> = ({
|
|
23
|
+
documentName,
|
|
24
|
+
documentDescription,
|
|
25
|
+
verificationLabel,
|
|
26
|
+
totalDueLabel,
|
|
27
|
+
totalDueAmount,
|
|
28
|
+
previewImage,
|
|
29
|
+
className
|
|
30
|
+
}) => {
|
|
31
|
+
const previewContent = hasPreviewContent(previewImage) ? previewImage : <img src={checkoutSummaryDocument} alt='' />
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<CheckoutSummaryStyled className={['checkout-summary', className].filter(Boolean).join(' ')}>
|
|
35
|
+
<div className='checkout-summary__document'>
|
|
36
|
+
<div className='checkout-summary__preview' aria-hidden='true'>
|
|
37
|
+
{previewContent}
|
|
38
|
+
<span className='checkout-summary__preview-lock'>
|
|
39
|
+
<LockOutlineIcon />
|
|
40
|
+
</span>
|
|
41
|
+
</div>
|
|
42
|
+
<div className='checkout-summary__content'>
|
|
43
|
+
<span className='checkout-summary__verification'>
|
|
44
|
+
<BalanceSvg fill={'#936C2F'} />
|
|
45
|
+
<span>{verificationLabel}</span>
|
|
46
|
+
</span>
|
|
47
|
+
<h2 className='checkout-summary__name'>{documentName}</h2>
|
|
48
|
+
<p className='checkout-summary__description'>{documentDescription}</p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<dl className='checkout-summary__pricing'>
|
|
52
|
+
<div className='checkout-summary__total'>
|
|
53
|
+
<dt>{totalDueLabel}</dt>
|
|
54
|
+
<dd>{totalDueAmount}</dd>
|
|
55
|
+
</div>
|
|
56
|
+
</dl>
|
|
57
|
+
</CheckoutSummaryStyled>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface CheckoutSummaryProps {
|
|
3
|
+
documentName: string;
|
|
4
|
+
documentDescription: string;
|
|
5
|
+
verificationLabel: string;
|
|
6
|
+
totalDueLabel: string;
|
|
7
|
+
totalDueAmount: string;
|
|
8
|
+
previewImage?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CheckoutSummaryProps {
|
|
4
|
+
documentName: string
|
|
5
|
+
documentDescription: string
|
|
6
|
+
verificationLabel: string
|
|
7
|
+
totalDueLabel: string
|
|
8
|
+
totalDueAmount: string
|
|
9
|
+
previewImage?: ReactNode
|
|
10
|
+
className?: string
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CheckoutSummary } from './CheckoutSummary';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SocialProofBarStyled } from './SocialProofBar.styled';
|
|
3
|
+
import avatar01 from '../../../../images/SocialProofBar/social-proof-avatar-01-avatar-1.png';
|
|
4
|
+
import avatar02 from '../../../../images/SocialProofBar/social-proof-avatar-02-avatar-2.png';
|
|
5
|
+
import avatar03 from '../../../../images/SocialProofBar/social-proof-avatar-03-avatar-3.png';
|
|
6
|
+
import avatar04 from '../../../../images/SocialProofBar/social-proof-avatar-04-avatar-4.png';
|
|
7
|
+
import avatar05 from '../../../../images/SocialProofBar/social-proof-avatar-05-avatar-5.png';
|
|
8
|
+
import ratingStar from '../../../../images/SocialProofBar/social-proof-star.svg';
|
|
9
|
+
const defaultAvatarImages = [avatar01, avatar02, avatar03, avatar04, avatar05];
|
|
10
|
+
const ratingStarIndices = [0, 1, 2, 3, 4];
|
|
11
|
+
export const SocialProofBar = ({ title, documentCount, activityText, ratingLabel, avatarImages = defaultAvatarImages, className }) => (_jsxs(SocialProofBarStyled, { className: ['social-proof-bar', className].filter(Boolean).join(' '), children: [_jsx("div", { className: 'social-proof-bar__avatars', "aria-hidden": 'true', children: avatarImages.slice(0, 5).map((avatar, index) => (_jsx("img", { src: avatar, alt: '' }, `${index}-${avatar}`))) }), _jsxs("div", { className: 'social-proof-bar__content', children: [_jsxs("div", { className: 'social-proof-bar__header', children: [_jsx("span", { className: 'social-proof-bar__title', children: title }), _jsx("span", { className: 'social-proof-bar__rating', role: 'img', "aria-label": ratingLabel, children: ratingStarIndices.map((index) => (_jsx("img", { src: ratingStar, alt: '' }, index))) })] }), _jsxs("p", { className: 'social-proof-bar__activity', children: [_jsx("strong", { children: documentCount }), " ", activityText] })] })] }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SocialProofBarStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|