@npm_leadtech/legal-lib-components 7.106.1 → 7.106.3
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/__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 +76 -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/src/components/sections/AppHeader/AppHeader.styled.js +8 -0
- package/dist/src/components/sections/AppHeader/AppHeader.styled.ts +8 -0
- package/dist/src/components/sections/Header/Header.styled.js +0 -2
- package/dist/src/components/sections/Header/Header.styled.ts +0 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8205 1.28252C14.5643 0.572493 13.5602 0.572493 13.304 1.28252L12.9295 2.32031C12.8481 2.54592 12.6704 2.72356 12.4448 2.80497L11.407 3.17946C10.697 3.43567 10.697 4.43983 11.407 4.69604L12.4448 5.07053C12.6704 5.15194 12.8481 5.32958 12.9295 5.55519L13.304 6.59298C13.5602 7.303 14.5643 7.303 14.8205 6.59298L15.195 5.55519C15.2764 5.32958 15.4541 5.15194 15.6797 5.07053L16.7175 4.69604C17.4275 4.43983 17.4275 3.43567 16.7175 3.17946L15.6797 2.80497C15.4541 2.72356 15.2764 2.54592 15.195 2.32031L14.8205 1.28252ZM9.03846 4.77127C8.52604 3.35122 6.51773 3.35122 6.0053 4.77127L5.15122 7.13813C4.9884 7.58935 4.63312 7.94463 4.1819 8.10745L1.81504 8.96153C0.394985 9.47396 0.394987 11.4823 1.81504 11.9947L4.1819 12.8488C4.63312 13.0116 4.9884 13.3669 5.15122 13.8181L6.0053 16.185C6.51773 17.605 8.52604 17.605 9.03846 16.185L9.89254 13.8181C10.0554 13.3669 10.4107 13.0116 10.8619 12.8488L13.2287 11.9947C14.6488 11.4823 14.6488 9.47396 13.2287 8.96153L10.8619 8.10745C10.4107 7.94463 10.0554 7.58935 9.89254 7.13813L9.03846 4.77127Z" fill="#05646E"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.60002 11.925L3.97502 9.29998C3.68508 9.01003 3.21497 9.01003 2.92502 9.29998C2.63507 9.58992 2.63507 10.06 2.92502 10.35L6.40002 13.825C6.51048 13.9354 6.68957 13.9354 6.80002 13.825L15.075 5.54997C15.365 5.26003 15.365 4.78993 15.075 4.49998C14.7851 4.21003 14.315 4.21003 14.025 4.49998L6.60002 11.925Z" fill="#05646E"/>
|
|
3
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.0001 14.3917L13.1211 16.2755C13.8784 16.7325 14.8126 16.0536 14.6117 15.1921L13.7834 11.6417L16.542 9.25197C17.2106 8.67276 16.8532 7.5745 15.9718 7.49972L12.3417 7.19175L10.9208 3.83912C10.5762 3.02609 9.42395 3.02609 9.07936 3.83912L7.65841 7.19175L4.02838 7.49972C3.14695 7.5745 2.78954 8.67276 3.45814 9.25197L6.21675 11.6417L5.38849 15.1921C5.18753 16.0536 6.12177 16.7325 6.87908 16.2755L10.0001 14.3917Z" fill="#F2BD6A"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, fireEvent, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { ArrowRight } from '../ArrowRight'
|
|
5
|
+
|
|
6
|
+
describe('ArrowRight', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the right arrow svg and its path', () => {
|
|
10
|
+
const { container } = render(<ArrowRight />)
|
|
11
|
+
|
|
12
|
+
expect(container.querySelector('svg')).toHaveAttribute('viewBox', '0 0 492.004 492.004')
|
|
13
|
+
expect(container.querySelector('svg path')).toBeInTheDocument()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test('forwards className and invokes onClick from the svg', () => {
|
|
17
|
+
const handleClick = jest.fn()
|
|
18
|
+
const { container } = render(<ArrowRight className='custom-arrow' onClick={handleClick} />)
|
|
19
|
+
const svg = container.querySelector('svg') as SVGSVGElement
|
|
20
|
+
|
|
21
|
+
expect(svg).toHaveClass('custom-arrow')
|
|
22
|
+
fireEvent.click(svg)
|
|
23
|
+
expect(handleClick).toHaveBeenCalledTimes(1)
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { BalanceSvg } from '../Balance'
|
|
5
|
+
|
|
6
|
+
describe('BalanceSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders its balance artwork with the default fill', () => {
|
|
10
|
+
const { container } = render(<BalanceSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 20 20')
|
|
14
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#05646E')
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
test('forwards a custom class and path fill', () => {
|
|
18
|
+
const { container } = render(<BalanceSvg className='balance-icon' fill='#123456' />)
|
|
19
|
+
const svg = container.querySelector('svg')
|
|
20
|
+
|
|
21
|
+
expect(svg).toHaveClass('balance-icon')
|
|
22
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#123456')
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { ChevronExpandLess } from '../ChevronExpandLess'
|
|
5
|
+
|
|
6
|
+
describe('ChevronExpandLess', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 24px upward chevron with its path fill', () => {
|
|
10
|
+
const { container } = render(<ChevronExpandLess />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#1E2021')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { ChevronExpandMore } from '../ChevronExpandMore'
|
|
5
|
+
|
|
6
|
+
describe('ChevronExpandMore', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the expand-more svg with its default class and fill', () => {
|
|
10
|
+
const { container } = render(<ChevronExpandMore />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveClass('chevron-expand-more')
|
|
14
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
15
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#1E2021')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
test('applies a custom fill to the chevron path', () => {
|
|
19
|
+
const { container } = render(<ChevronExpandMore fill='tomato' />)
|
|
20
|
+
|
|
21
|
+
expect(container.querySelector('svg path')).toHaveAttribute('fill', 'tomato')
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { ChevronRight } from '../ChevronRight'
|
|
5
|
+
|
|
6
|
+
describe('ChevronRight', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the right-facing 24px chevron and its path', () => {
|
|
10
|
+
const { container } = render(<ChevronRight />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('g path')).toBeInTheDocument()
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { ChevronRight24px } from '../ChevronRight24px'
|
|
5
|
+
|
|
6
|
+
describe('ChevronRight24px', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the chevron with its expected dimensions and class', () => {
|
|
10
|
+
const { container } = render(<ChevronRight24px />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg).toHaveClass('chevron-right24px')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
test('renders the masked chevron shape with its main fill class', () => {
|
|
20
|
+
const { container } = render(<ChevronRight24px />)
|
|
21
|
+
|
|
22
|
+
expect(container.querySelector('svg defs path')).toBeInTheDocument()
|
|
23
|
+
expect(container.querySelector('svg mask use')).toBeInTheDocument()
|
|
24
|
+
expect(container.querySelector('svg .main-fill')).toHaveAttribute('fill', '#3D4042')
|
|
25
|
+
})
|
|
26
|
+
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { CloseIcon } from '../CloseIcon'
|
|
5
|
+
|
|
6
|
+
describe('CloseIcon', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the close path in its 9px svg', () => {
|
|
10
|
+
const { container } = render(<CloseIcon />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '9')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '9')
|
|
15
|
+
expect(svg?.querySelector('path')).toBeInTheDocument()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
test('forwards a custom class to the svg', () => {
|
|
19
|
+
const { container } = render(<CloseIcon className='close-control' />)
|
|
20
|
+
|
|
21
|
+
expect(container.querySelector('svg')).toHaveClass('close-control')
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Delete24p } from '../Delete24p'
|
|
5
|
+
|
|
6
|
+
describe('Delete24p', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the delete artwork in its 24px svg viewport', () => {
|
|
10
|
+
const { container } = render(<Delete24p />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 16 16')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('forwards a custom class to the svg', () => {
|
|
21
|
+
const { container } = render(<Delete24p className='delete-control' />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg')).toHaveClass('delete-control')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Done24px } from '../Done24px'
|
|
5
|
+
|
|
6
|
+
describe('Done24px', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the compact checkmark svg', () => {
|
|
10
|
+
const { container } = render(<Done24px />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '12')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '9')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 12 9')
|
|
16
|
+
expect(svg?.querySelector('path')).toBeInTheDocument()
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
test('forwards a custom className', () => {
|
|
20
|
+
const { container } = render(<Done24px className='success-check' />)
|
|
21
|
+
|
|
22
|
+
expect(container.querySelector('svg')).toHaveClass('success-check')
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Done24pxOutline } from '../Done24pxoutlined'
|
|
5
|
+
|
|
6
|
+
describe('Done24pxOutline', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 16-unit checkmark with its outlined shape definition', () => {
|
|
10
|
+
const { container } = render(<Done24pxOutline />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '100%')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '100%')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 16 16')
|
|
16
|
+
expect(svg?.querySelector('defs polygon')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('applies the brand fill to the masked checkmark', () => {
|
|
21
|
+
const { container } = render(<Done24pxOutline />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg g[mask]')).toHaveAttribute('fill', '#05646E')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Edit24p } from '../Edit24p'
|
|
5
|
+
|
|
6
|
+
describe('Edit24p', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 24px edit icon with a 16-unit artwork viewport', () => {
|
|
10
|
+
const { container } = render(<Edit24p />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 16 16')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('forwards a custom className', () => {
|
|
21
|
+
const { container } = render(<Edit24p className='edit-action' />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg')).toHaveClass('edit-action')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { EditText24px } from '../EditText24px'
|
|
5
|
+
|
|
6
|
+
describe('EditText24px', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the 24px text-edit icon and its named artwork layer', () => {
|
|
10
|
+
const { container } = render(<EditText24px />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('#edit-text-svg')).toHaveAttribute('fill', '#1E2021')
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('forwards a custom className', () => {
|
|
21
|
+
const { container } = render(<EditText24px className='edit-text-action' />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg')).toHaveClass('edit-text-action')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { EmploymentIcon } from '../EmploymentIcon'
|
|
5
|
+
|
|
6
|
+
describe('EmploymentIcon', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the employment artwork at 20px with its branded path', () => {
|
|
10
|
+
const { container } = render(<EmploymentIcon />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
const path = svg?.querySelector('#icon-employment')
|
|
13
|
+
|
|
14
|
+
expect(svg).toHaveAttribute('width', '20px')
|
|
15
|
+
expect(svg).toHaveAttribute('height', '20px')
|
|
16
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 20 20')
|
|
17
|
+
expect(path).toHaveAttribute('fill', '#078080')
|
|
18
|
+
})
|
|
19
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Eye24pxOptimized } from '../Eye24pxOptimized'
|
|
5
|
+
|
|
6
|
+
describe('Eye24pxOptimized', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 24px eye icon with its masked eye shape', () => {
|
|
10
|
+
const { container } = render(<Eye24pxOptimized />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('uses the neutral icon fill and forwards a className', () => {
|
|
21
|
+
const { container } = render(<Eye24pxOptimized className='password-visibility' />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg')).toHaveClass('password-visibility')
|
|
24
|
+
expect(container.querySelector('svg g[mask]')).toHaveAttribute('fill', '#6D7275')
|
|
25
|
+
})
|
|
26
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { GdprLockSvg } from '../GdprLockSvg'
|
|
5
|
+
|
|
6
|
+
describe('GdprLockSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the lock and badge using the default fills', () => {
|
|
10
|
+
const { container } = render(<GdprLockSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
const paths = svg?.querySelectorAll('path')
|
|
13
|
+
|
|
14
|
+
expect(svg).toHaveAttribute('width', '20')
|
|
15
|
+
expect(svg).toHaveAttribute('height', '20')
|
|
16
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 20 20')
|
|
17
|
+
expect(paths).toHaveLength(2)
|
|
18
|
+
expect(paths?.[0]).toHaveAttribute('fill', 'white')
|
|
19
|
+
expect(paths?.[1]).toHaveAttribute('fill', '#024DA1')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
test('applies custom class and independent fills', () => {
|
|
23
|
+
const { container } = render(<GdprLockSvg className='privacy-lock' fill='black' fill2='gold' />)
|
|
24
|
+
const svg = container.querySelector('svg')
|
|
25
|
+
const paths = svg?.querySelectorAll('path')
|
|
26
|
+
|
|
27
|
+
expect(svg).toHaveClass('privacy-lock')
|
|
28
|
+
expect(paths?.[0]).toHaveAttribute('fill', 'black')
|
|
29
|
+
expect(paths?.[1]).toHaveAttribute('fill', 'gold')
|
|
30
|
+
})
|
|
31
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { IconDuplicate24px } from '../IconDuplicate24px'
|
|
5
|
+
|
|
6
|
+
describe('IconDuplicate24px', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 24px duplicate icon and its masked shape', () => {
|
|
10
|
+
const { container } = render(<IconDuplicate24px />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('forwards a custom class to the svg', () => {
|
|
21
|
+
const { container } = render(<IconDuplicate24px className='duplicate-control' />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg')).toHaveClass('duplicate-control')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { IconWeb } from '../IconWeb'
|
|
5
|
+
|
|
6
|
+
describe('IconWeb', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the web icon in its 24px viewport', () => {
|
|
10
|
+
const { container } = render(<IconWeb />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('renders the icon using its named fill layer', () => {
|
|
21
|
+
const { container } = render(<IconWeb />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('.icon-web-24-p')).toHaveAttribute('fill', '#000')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { InfoError24pxOutlined } from '../InfoError24pxOutlined'
|
|
5
|
+
|
|
6
|
+
describe('InfoError24pxOutlined', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the titled info-error icon with default viewBox', () => {
|
|
10
|
+
const { container } = render(<InfoError24pxOutlined />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '100%')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '100%')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('title')).toHaveTextContent('icon/info-error_24px_outlined')
|
|
17
|
+
expect(svg?.querySelector('use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('accepts a custom class, fill, and viewBox', () => {
|
|
21
|
+
const { container } = render(<InfoError24pxOutlined className='warning-icon' fill='orange' viewBox='0 0 16 16' />)
|
|
22
|
+
const svg = container.querySelector('svg')
|
|
23
|
+
|
|
24
|
+
expect(svg).toHaveClass('warning-icon')
|
|
25
|
+
expect(svg).toHaveAttribute('fill', 'orange')
|
|
26
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 16 16')
|
|
27
|
+
})
|
|
28
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { InfoLocationSvg } from '../InfoLocationSvg'
|
|
5
|
+
|
|
6
|
+
describe('InfoLocationSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the location artwork and its map-pin path', () => {
|
|
10
|
+
const { container } = render(<InfoLocationSvg />)
|
|
11
|
+
const svgs = container.querySelectorAll('svg')
|
|
12
|
+
|
|
13
|
+
expect(svgs).toHaveLength(2)
|
|
14
|
+
expect(svgs[0]).toHaveAttribute('width', '20')
|
|
15
|
+
expect(svgs[0]).toHaveAttribute('height', '20')
|
|
16
|
+
expect(svgs[0]).toHaveAttribute('viewBox', '0 0 20 20')
|
|
17
|
+
expect(svgs[1].querySelector('path')).toHaveAttribute('fill', '#02374A')
|
|
18
|
+
})
|
|
19
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { InfoMailSvg } from '../InfoMailSvg'
|
|
5
|
+
|
|
6
|
+
describe('InfoMailSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the 20px informational mail artwork', () => {
|
|
10
|
+
const { container } = render(<InfoMailSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '20')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '20')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 20 20')
|
|
16
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#02374A')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { InfoPhoneSvg } from '../InfoPhoneSvg'
|
|
5
|
+
|
|
6
|
+
describe('InfoPhoneSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the 20px phone artwork with the expected path fill', () => {
|
|
10
|
+
const { container } = render(<InfoPhoneSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '20')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '20')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 20 20')
|
|
16
|
+
expect(svg?.querySelector('path')).toHaveAttribute('fill', '#02374A')
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { LogoutSvg } from '../LogoutSvg'
|
|
5
|
+
|
|
6
|
+
describe('LogoutSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders a 24px logout icon with its masked shape', () => {
|
|
10
|
+
const { container } = render(<LogoutSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('defs path')).toBeInTheDocument()
|
|
17
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('uses the neutral logout artwork color', () => {
|
|
21
|
+
const { container } = render(<LogoutSvg />)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('svg g[mask]')).toHaveAttribute('fill', '#B5BABD')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { MailSvg } from '../MailSvg'
|
|
5
|
+
|
|
6
|
+
describe('MailSvg', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the email icon with its expected dimensions and default class', () => {
|
|
10
|
+
const { container } = render(<MailSvg />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg).toHaveClass('email-icon')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
test('renders the envelope path with its default fill', () => {
|
|
20
|
+
const { container } = render(<MailSvg />)
|
|
21
|
+
|
|
22
|
+
expect(container.querySelector('svg #path')).toHaveAttribute('fill', '#1E2021')
|
|
23
|
+
expect(container.querySelector('svg #path')).toHaveAttribute('fill-rule', 'evenodd')
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cleanup, render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { MenuCollapse24p } from '../MenuCollapse24p'
|
|
5
|
+
|
|
6
|
+
describe('MenuCollapse24p', () => {
|
|
7
|
+
afterEach(cleanup)
|
|
8
|
+
|
|
9
|
+
test('renders the menu icon at 24px and includes its description', () => {
|
|
10
|
+
const { container } = render(<MenuCollapse24p />)
|
|
11
|
+
const svg = container.querySelector('svg')
|
|
12
|
+
|
|
13
|
+
expect(svg).toHaveAttribute('width', '24px')
|
|
14
|
+
expect(svg).toHaveAttribute('height', '24px')
|
|
15
|
+
expect(svg).toHaveAttribute('viewBox', '0 0 24 24')
|
|
16
|
+
expect(svg?.querySelector('title')).toHaveTextContent('735FFC4F-7DB9-4268-8987-12A1D38D3294')
|
|
17
|
+
expect(svg?.querySelector('desc')).toHaveTextContent('Created with sketchtool.')
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test('forwards className and renders the neutral fill layer', () => {
|
|
21
|
+
const { container } = render(<MenuCollapse24p className='menu-more' />)
|
|
22
|
+
const svg = container.querySelector('svg')
|
|
23
|
+
|
|
24
|
+
expect(svg).toHaveClass('menu-more')
|
|
25
|
+
expect(svg?.querySelector('g[mask]')).toHaveAttribute('fill', '#6D7275')
|
|
26
|
+
expect(svg?.querySelector('mask use')).toBeInTheDocument()
|
|
27
|
+
})
|
|
28
|
+
})
|