@npm_leadtech/legal-lib-components 5.58.3 → 5.58.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { RatafiaResultTabStyled } from './RatafiaResultTab.styled';
3
- const RatafiaResultTab = ({ title, icon, activeIcon, isActive, handleOnClick }) => {
4
- return (_jsxs(RatafiaResultTabStyled, { className: `ratafia-result-tab${isActive ? ' --is-active' : ''}`, onClick: handleOnClick, children: [isActive ? (_jsx(_Fragment, { children: icon !== null && _jsx("div", { className: 'ratafia-result-tab__icon', children: activeIcon }) })) : (_jsx(_Fragment, { children: icon !== null && _jsx("div", { className: 'ratafia-result-tab__icon', children: icon }) })), _jsx("p", { className: 'sans-serif --medium ratafia-result-tab__title', children: title })] }));
3
+ const RatafiaResultTab = ({ title, icon, activeIcon, isActive, handleOnClick, dataQa }) => {
4
+ return (_jsxs(RatafiaResultTabStyled, { className: `ratafia-result-tab${isActive ? ' --is-active' : ''}`, onClick: handleOnClick, "data-qa": dataQa, children: [isActive ? (_jsx(_Fragment, { children: icon !== null && _jsx("div", { className: 'ratafia-result-tab__icon', children: activeIcon }) })) : (_jsx(_Fragment, { children: icon !== null && _jsx("div", { className: 'ratafia-result-tab__icon', children: icon }) })), _jsx("p", { className: 'sans-serif --medium ratafia-result-tab__title', children: title })] }));
5
5
  };
6
6
  export default RatafiaResultTab;
@@ -7,7 +7,7 @@ export const RatafiaResultTabStyled = styled.div `
7
7
  gap: 0.25rem;
8
8
  flex: 1 0 0;
9
9
 
10
- border-radius: var(--global-border-radius);
10
+ border-radius: var(--s-border-radius);
11
11
  background: var(--neutral-neutral-6);
12
12
 
13
13
  cursor: default;
@@ -8,7 +8,7 @@ export const RatafiaResultTabStyled = styled.div`
8
8
  gap: 0.25rem;
9
9
  flex: 1 0 0;
10
10
 
11
- border-radius: var(--global-border-radius);
11
+ border-radius: var(--s-border-radius);
12
12
  background: var(--neutral-neutral-6);
13
13
 
14
14
  cursor: default;
@@ -3,9 +3,13 @@ import React, { type FC } from 'react'
3
3
  import { RatafiaResultTabProps } from './RatafiaResultTabProps.types'
4
4
  import { RatafiaResultTabStyled } from './RatafiaResultTab.styled'
5
5
 
6
- const RatafiaResultTab: FC<RatafiaResultTabProps> = ({ title, icon, activeIcon, isActive, handleOnClick }) => {
6
+ const RatafiaResultTab: FC<RatafiaResultTabProps> = ({ title, icon, activeIcon, isActive, handleOnClick, dataQa }) => {
7
7
  return (
8
- <RatafiaResultTabStyled className={`ratafia-result-tab${isActive ? ' --is-active' : ''}`} onClick={handleOnClick}>
8
+ <RatafiaResultTabStyled
9
+ className={`ratafia-result-tab${isActive ? ' --is-active' : ''}`}
10
+ onClick={handleOnClick}
11
+ data-qa={dataQa}
12
+ >
9
13
  {isActive ? (
10
14
  <>{icon !== null && <div className='ratafia-result-tab__icon'>{activeIcon}</div>}</>
11
15
  ) : (
@@ -5,4 +5,5 @@ export interface RatafiaResultTabProps {
5
5
  activeIcon?: React.ReactNode;
6
6
  isActive: boolean;
7
7
  handleOnClick?: () => void;
8
+ dataQa: string;
8
9
  }
@@ -5,4 +5,5 @@ export interface RatafiaResultTabProps {
5
5
  activeIcon?: React.ReactNode
6
6
  isActive: boolean
7
7
  handleOnClick?: () => void
8
+ dataQa: string
8
9
  }
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { RatafiaResultCardList } from '../../molecules';
3
3
  import { RatafiaResultContentStyled } from './RatafiaResultContent.styled';
4
+ import RatafiaResultTabList from '../../molecules/RatafiaResultTabList/RatafiaResultTabList';
4
5
  import { RatafiaReviewResult } from '../../atoms';
5
6
  export const RatafiaResultContent = ({ result, review }) => {
6
- return (_jsxs(RatafiaResultContentStyled, { children: [_jsx("h2", { ref: result?.documentNameRef, className: 'sans-serif --bold-weight ratafia-result-content__document-name', children: result?.documentName }), _jsxs("div", { className: 'ratafia-result-content__content', children: [result !== null && _jsx(RatafiaResultCardList, { keyFacts: result.keyFacts }), _jsx(RatafiaReviewResult, { ...review })] })] }));
7
+ return (_jsxs(RatafiaResultContentStyled, { children: [_jsx("h2", { ref: result?.documentNameRef, className: 'sans-serif --bold-weight ratafia-result-content__document-name', children: result?.documentName }), result?.tabs && (_jsx("div", { className: 'ratafia-result-content__tabs', children: _jsx(RatafiaResultTabList, { tabs: result.tabs }) })), _jsxs("div", { className: 'ratafia-result-content__content', children: [result !== null && _jsx(RatafiaResultCardList, { keyFacts: result.keyFacts }), _jsx(RatafiaReviewResult, { ...review })] })] }));
7
8
  };
8
9
  export default RatafiaResultContent;
@@ -6,15 +6,19 @@ export const RatafiaResultContentStyled = styled.div `
6
6
  align-items: flex-start;
7
7
  flex: 1 0 0;
8
8
  align-self: stretch;
9
- gap: var(--global-gap);
10
9
 
11
10
  .ratafia-result-content__document-name {
12
11
  color: var(--neutral-neutral-2);
13
12
  font-size: 1rem;
13
+ margin-bottom: 1rem;
14
14
  @media ${device['portrait-tablets']} {
15
15
  font-size: 1.125rem;
16
16
  }
17
17
  }
18
+ .ratafia-result-content__tabs {
19
+ width: 100%;
20
+ margin-bottom: 0.5rem;
21
+ }
18
22
  .ratafia-result-content__content {
19
23
  overflow: hidden;
20
24
  width: 100%;
@@ -7,15 +7,19 @@ export const RatafiaResultContentStyled = styled.div`
7
7
  align-items: flex-start;
8
8
  flex: 1 0 0;
9
9
  align-self: stretch;
10
- gap: var(--global-gap);
11
10
 
12
11
  .ratafia-result-content__document-name {
13
12
  color: var(--neutral-neutral-2);
14
13
  font-size: 1rem;
14
+ margin-bottom: 1rem;
15
15
  @media ${device['portrait-tablets']} {
16
16
  font-size: 1.125rem;
17
17
  }
18
18
  }
19
+ .ratafia-result-content__tabs {
20
+ width: 100%;
21
+ margin-bottom: 0.5rem;
22
+ }
19
23
  .ratafia-result-content__content {
20
24
  overflow: hidden;
21
25
  width: 100%;
@@ -3,6 +3,7 @@ import React from 'react'
3
3
  import { RatafiaResultCardList } from '../../molecules'
4
4
  import { type RatafiaResultContentProps } from './RatafiaResultContentProps.types'
5
5
  import { RatafiaResultContentStyled } from './RatafiaResultContent.styled'
6
+ import RatafiaResultTabList from '../../molecules/RatafiaResultTabList/RatafiaResultTabList'
6
7
  import { RatafiaReviewResult } from '../../atoms'
7
8
 
8
9
  export const RatafiaResultContent: React.FC<RatafiaResultContentProps> = ({ result, review }) => {
@@ -11,6 +12,11 @@ export const RatafiaResultContent: React.FC<RatafiaResultContentProps> = ({ resu
11
12
  <h2 ref={result?.documentNameRef} className='sans-serif --bold-weight ratafia-result-content__document-name'>
12
13
  {result?.documentName}
13
14
  </h2>
15
+ {result?.tabs && (
16
+ <div className='ratafia-result-content__tabs'>
17
+ <RatafiaResultTabList tabs={result.tabs} />
18
+ </div>
19
+ )}
14
20
  <div className='ratafia-result-content__content'>
15
21
  {result !== null && <RatafiaResultCardList keyFacts={result.keyFacts} />}
16
22
  <RatafiaReviewResult {...review} />
@@ -1,11 +1,13 @@
1
- import type { RatafiaResultCardProps, RatafiaReviewResultProps } from '../../atoms';
2
1
  import React from 'react';
2
+ import type { RatafiaResultCardProps, RatafiaReviewResultProps } from '../../atoms';
3
+ import { type RatafiaResultTabProps } from '../../atoms';
3
4
  export interface RatafiaResultContentProps {
4
5
  result: RatafiaResultProps | null;
5
6
  review: RatafiaReviewResultProps;
6
7
  }
7
8
  export interface RatafiaResultProps {
8
9
  documentName: string;
10
+ tabs: RatafiaResultTabProps[];
9
11
  keyFacts: RatafiaResultCardProps[];
10
12
  documentNameRef?: React.RefObject<HTMLHeadingElement>;
11
13
  }
@@ -1,6 +1,8 @@
1
- import type { RatafiaResultCardProps, RatafiaReviewResultProps } from '../../atoms'
2
1
  import React from 'react'
3
2
 
3
+ import type { RatafiaResultCardProps, RatafiaReviewResultProps } from '../../atoms'
4
+ import { type RatafiaResultTabProps } from '../../atoms'
5
+
4
6
  export interface RatafiaResultContentProps {
5
7
  result: RatafiaResultProps | null
6
8
  review: RatafiaReviewResultProps
@@ -8,6 +10,7 @@ export interface RatafiaResultContentProps {
8
10
 
9
11
  export interface RatafiaResultProps {
10
12
  documentName: string
13
+ tabs: RatafiaResultTabProps[]
11
14
  keyFacts: RatafiaResultCardProps[]
12
15
  documentNameRef?: React.RefObject<HTMLHeadingElement>
13
16
  }
@@ -1,10 +1,10 @@
1
- import type { DisclaimerRatafiaProps, ReviewKeyFactsResultRatafiaProps } from '../../atoms';
1
+ import type { DisclaimerRatafiaProps, RatafiaReviewResultProps } from '../../atoms';
2
2
  import { type HeaderRatafiaProps } from '../../molecules';
3
- import { type KeyFactsResultProps } from '../../organisms';
3
+ import { type RatafiaResultProps } from '../../organisms';
4
4
  export interface RatafiaResultPageProps {
5
5
  header: HeaderRatafiaProps;
6
- resultContent: KeyFactsResultProps;
7
- reviewContent: ReviewKeyFactsResultRatafiaProps;
6
+ resultContent: RatafiaResultProps;
7
+ reviewContent: RatafiaReviewResultProps;
8
8
  disclaimer: DisclaimerRatafiaProps;
9
9
  cta: RatafiaResultCta;
10
10
  loadingIcon?: React.ReactNode;
@@ -1,12 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import type { DisclaimerRatafiaProps, ReviewKeyFactsResultRatafiaProps } from '../../atoms'
2
+ import type { DisclaimerRatafiaProps, RatafiaReviewResultProps } from '../../atoms'
3
3
  import { type HeaderRatafiaProps } from '../../molecules'
4
- import { type KeyFactsResultProps } from '../../organisms'
4
+ import { type RatafiaResultProps } from '../../organisms'
5
5
 
6
6
  export interface RatafiaResultPageProps {
7
7
  header: HeaderRatafiaProps
8
- resultContent: KeyFactsResultProps
9
- reviewContent: ReviewKeyFactsResultRatafiaProps
8
+ resultContent: RatafiaResultProps
9
+ reviewContent: RatafiaReviewResultProps
10
10
  disclaimer: DisclaimerRatafiaProps
11
11
  cta: RatafiaResultCta
12
12
  loadingIcon?: React.ReactNode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.58.3",
3
+ "version": "5.58.5",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",