@npm_leadtech/legal-lib-components 7.106.11 → 7.106.12

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/README.md CHANGED
@@ -51,3 +51,9 @@ npx sonarqube-scanner -Dsonar.host.url=http://sonar.legal-contracts.com:9000 -Ds
51
51
  ```
52
52
 
53
53
  - Ejecutar en consola `yarn sonar`
54
+
55
+ yarn reinstall-force && yarn build && git add . && git commit -m "checkout" --allow-empty && npm config set tag-version-prefix ''
56
+ npm version patch -m "Update patch version number" && git push && git push --tags
57
+ npm publish
58
+
59
+ yarn upgrade @npm_leadtech/legal-lib-components --latest
@@ -0,0 +1,2 @@
1
+ import { type FC } from 'react';
2
+ export declare const BenefitsAi: FC;
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const BenefitsAi = () => (_jsx("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', children: _jsx("path", { fillRule: 'evenodd', clipRule: '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: 'var(--primary-main-light-1)' }) }));
@@ -0,0 +1,12 @@
1
+ import React, { type FC } from 'react'
2
+
3
+ export const BenefitsAi: FC = () => (
4
+ <svg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'>
5
+ <path
6
+ fillRule='evenodd'
7
+ clipRule='evenodd'
8
+ 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'
9
+ fill='var(--primary-main-light-1)'
10
+ />
11
+ </svg>
12
+ )
@@ -0,0 +1,2 @@
1
+ import { type FC } from 'react';
2
+ export declare const BenefitsCheck: FC;
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const BenefitsCheck = () => (_jsx("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', children: _jsx("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: 'var(--primary-main-light-1)' }) }));
@@ -0,0 +1,10 @@
1
+ import React, { type FC } from 'react'
2
+
3
+ export const BenefitsCheck: FC = () => (
4
+ <svg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'>
5
+ <path
6
+ 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'
7
+ fill='var(--primary-main-light-1)'
8
+ />
9
+ </svg>
10
+ )
@@ -0,0 +1,18 @@
1
+ import { cleanup, render } from '@testing-library/react'
2
+ import React from 'react'
3
+
4
+ import { BenefitsAi } from '../BenefitsAi'
5
+
6
+ describe('BenefitsAi', () => {
7
+ afterEach(cleanup)
8
+
9
+ test('renders the 18x18 ai icon svg with the themed fill', () => {
10
+ const { container } = render(<BenefitsAi />)
11
+ const svg = container.querySelector('svg')
12
+
13
+ expect(svg).toHaveAttribute('width', '18')
14
+ expect(svg).toHaveAttribute('height', '18')
15
+ expect(svg).toHaveAttribute('viewBox', '0 0 18 18')
16
+ expect(svg?.querySelector('path[fill="var(--primary-main-light-1)"]')).toBeInTheDocument()
17
+ })
18
+ })
@@ -0,0 +1,18 @@
1
+ import { cleanup, render } from '@testing-library/react'
2
+ import React from 'react'
3
+
4
+ import { BenefitsCheck } from '../BenefitsCheck'
5
+
6
+ describe('BenefitsCheck', () => {
7
+ afterEach(cleanup)
8
+
9
+ test('renders the 18x18 check icon svg with the themed fill', () => {
10
+ const { container } = render(<BenefitsCheck />)
11
+ const svg = container.querySelector('svg')
12
+
13
+ expect(svg).toHaveAttribute('width', '18')
14
+ expect(svg).toHaveAttribute('height', '18')
15
+ expect(svg).toHaveAttribute('viewBox', '0 0 18 18')
16
+ expect(svg?.querySelector('path[fill="var(--primary-main-light-1)"]')).toBeInTheDocument()
17
+ })
18
+ })
@@ -1,13 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId } from 'react';
3
+ import { BenefitsAi } from '../../../../images/componentsSvg/BenefitsAi';
4
+ import { BenefitsCheck } from '../../../../images/componentsSvg/BenefitsCheck';
3
5
  import { BenefitsCheckoutStyled } from './BenefitsCheckout.styled';
4
- import aiIcon from '../../../../images/BenefitsCheckout/benefits-ai.svg';
5
- import checkIcon from '../../../../images/BenefitsCheckout/benefits-check.svg';
6
6
  const iconByType = {
7
- ai: aiIcon,
8
- check: checkIcon
7
+ ai: BenefitsAi,
8
+ check: BenefitsCheck
9
9
  };
10
10
  export const BenefitsCheckout = ({ title, benefits, className }) => {
11
11
  const titleId = useId();
12
- return (_jsxs(BenefitsCheckoutStyled, { className: ['benefits-checkout', className].filter(Boolean).join(' '), "aria-labelledby": titleId, children: [_jsx("h2", { className: 'benefits-checkout__title', id: titleId, children: title }), _jsx("ul", { className: 'benefits-checkout__list', children: benefits.map((benefit, index) => (_jsxs("li", { className: 'benefits-checkout__item', children: [_jsx("img", { src: iconByType[benefit.icon ?? 'check'], alt: '', "aria-hidden": 'true' }), _jsx("span", { children: benefit.text })] }, `${benefit.icon ?? 'check'}-${index}-${benefit.text}`))) })] }));
12
+ return (_jsxs(BenefitsCheckoutStyled, { className: ['benefits-checkout', className].filter(Boolean).join(' '), "aria-labelledby": titleId, children: [_jsx("h2", { className: 'benefits-checkout__title', id: titleId, children: title }), _jsx("ul", { className: 'benefits-checkout__list', children: benefits.map((benefit, index) => {
13
+ const Icon = iconByType[benefit.icon ?? 'check'];
14
+ return (_jsxs("li", { className: 'benefits-checkout__item', children: [_jsx(Icon, {}), _jsx("span", { children: benefit.text })] }, `${benefit.icon ?? 'check'}-${index}-${benefit.text}`));
15
+ }) })] }));
13
16
  };
@@ -41,7 +41,7 @@ export const BenefitsCheckoutStyled = styled.section `
41
41
  line-height: 1.125rem;
42
42
  letter-spacing: -0.0214em;
43
43
 
44
- img {
44
+ svg {
45
45
  display: block;
46
46
  width: 1.125rem;
47
47
  height: 1.125rem;
@@ -43,7 +43,7 @@ export const BenefitsCheckoutStyled = styled.section`
43
43
  line-height: 1.125rem;
44
44
  letter-spacing: -0.0214em;
45
45
 
46
- img {
46
+ svg {
47
47
  display: block;
48
48
  width: 1.125rem;
49
49
  height: 1.125rem;
@@ -1,13 +1,13 @@
1
1
  import React, { type FC, useId } from 'react'
2
2
 
3
+ import { BenefitsAi } from '../../../../images/componentsSvg/BenefitsAi'
4
+ import { BenefitsCheck } from '../../../../images/componentsSvg/BenefitsCheck'
3
5
  import { type BenefitsCheckoutProps } from './BenefitsCheckoutProps.types'
4
6
  import { BenefitsCheckoutStyled } from './BenefitsCheckout.styled'
5
- import aiIcon from '../../../../images/BenefitsCheckout/benefits-ai.svg'
6
- import checkIcon from '../../../../images/BenefitsCheckout/benefits-check.svg'
7
7
 
8
8
  const iconByType = {
9
- ai: aiIcon,
10
- check: checkIcon
9
+ ai: BenefitsAi,
10
+ check: BenefitsCheck
11
11
  }
12
12
 
13
13
  export const BenefitsCheckout: FC<BenefitsCheckoutProps> = ({ title, benefits, className }) => {
@@ -22,12 +22,16 @@ export const BenefitsCheckout: FC<BenefitsCheckoutProps> = ({ title, benefits, c
22
22
  {title}
23
23
  </h2>
24
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
- ))}
25
+ {benefits.map((benefit, index) => {
26
+ const Icon = iconByType[benefit.icon ?? 'check']
27
+
28
+ return (
29
+ <li className='benefits-checkout__item' key={`${benefit.icon ?? 'check'}-${index}-${benefit.text}`}>
30
+ <Icon />
31
+ <span>{benefit.text}</span>
32
+ </li>
33
+ )
34
+ })}
31
35
  </ul>
32
36
  </BenefitsCheckoutStyled>
33
37
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.106.11",
3
+ "version": "7.106.12",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",