@npm_leadtech/legal-lib-components 7.39.1 → 7.40.0
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/src/components/atoms/Divider/Divider.js +4 -2
- package/dist/src/components/atoms/Divider/Divider.styled.js +0 -6
- package/dist/src/components/atoms/Divider/Divider.styled.ts +0 -6
- package/dist/src/components/atoms/Divider/Divider.tsx +6 -10
- package/dist/src/components/organisms/MenuItems/MenuItems.js +1 -1
- package/dist/src/components/organisms/MenuItems/MenuItems.tsx +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DividerStyled } from './Divider.styled';
|
|
3
3
|
const Divider = ({ containerClass, lineClass, text, image }) => {
|
|
4
|
-
|
|
4
|
+
if (text?.length === 0 || image?.length === 0)
|
|
5
|
+
return null;
|
|
6
|
+
return (_jsxs(DividerStyled, { className: `divider ${containerClass ?? ''}`, children: [_jsx("div", { className: `divider__line ${lineClass ?? ''}` }), text !== undefined && _jsx("p", { className: 'divider__word', children: text }), image !== undefined && _jsx("img", { className: 'divider__image', src: image, alt: '', role: 'img' }), _jsx("div", { className: `divider__line ${lineClass ?? ''}` })] }));
|
|
5
7
|
};
|
|
6
8
|
export default Divider;
|
|
@@ -11,12 +11,6 @@ export const DividerStyled = styled.div `
|
|
|
11
11
|
border-bottom: 1px solid var(--neutral-neutral-4);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
&__line--complete {
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 0px;
|
|
17
|
-
border-bottom: 1px solid var(--neutral-neutral-4);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
&__word,
|
|
21
15
|
&__image {
|
|
22
16
|
width: fit-content;
|
|
@@ -12,12 +12,6 @@ export const DividerStyled = styled.div`
|
|
|
12
12
|
border-bottom: 1px solid var(--neutral-neutral-4);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
&__line--complete {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 0px;
|
|
18
|
-
border-bottom: 1px solid var(--neutral-neutral-4);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
15
|
&__word,
|
|
22
16
|
&__image {
|
|
23
17
|
width: fit-content;
|
|
@@ -4,18 +4,14 @@ import { type DividerProps } from './DividerProps.types'
|
|
|
4
4
|
import { DividerStyled } from './Divider.styled'
|
|
5
5
|
|
|
6
6
|
const Divider: FC<DividerProps> = ({ containerClass, lineClass, text, image }) => {
|
|
7
|
+
if (text?.length === 0 || image?.length === 0) return null
|
|
8
|
+
|
|
7
9
|
return (
|
|
8
10
|
<DividerStyled className={`divider ${containerClass ?? ''}`}>
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div className={`divider__line ${lineClass ?? ''}`}></div>
|
|
14
|
-
{text !== undefined && <p className='divider__word'>{text}</p>}
|
|
15
|
-
{image !== undefined && <img className='divider__image' src={image} alt='' role='img'></img>}
|
|
16
|
-
<div className={`divider__line ${lineClass ?? ''}`}></div>
|
|
17
|
-
</>
|
|
18
|
-
)}
|
|
11
|
+
<div className={`divider__line ${lineClass ?? ''}`}></div>
|
|
12
|
+
{text !== undefined && <p className='divider__word'>{text}</p>}
|
|
13
|
+
{image !== undefined && <img className='divider__image' src={image} alt='' role='img'></img>}
|
|
14
|
+
<div className={`divider__line ${lineClass ?? ''}`}></div>
|
|
19
15
|
</DividerStyled>
|
|
20
16
|
)
|
|
21
17
|
}
|
|
@@ -6,5 +6,5 @@ import { RatafiaLandingIcon } from '../../atoms/RatafiaLandingIcon';
|
|
|
6
6
|
import arrowDown from '../../../../images/svg/arrow-down.svg';
|
|
7
7
|
export const MenuItems = ({ hasProducts, seeAllDocumentsText, setCookiePolicyFunc, routes, finalMenu, configVars, navMenuItems, extraMenu }) => {
|
|
8
8
|
return (_jsxs(MenuItemsStyled, { children: [hasProducts && (_jsxs("div", { className: 'navigation-pane__products', children: [_jsxs("div", { className: 'navigation-pane__products__container', children: [_jsx("p", { className: 'navigation-pane__products__title', children: 'Documents' }), _jsx("img", { src: arrowDown, alt: 'arrow-down' })] }), _jsxs("div", { className: 'products__list', children: [_jsx("div", { className: 'menu-mobile-wrapper', children: _jsx(DocumentListMenu, { routes: routes, seeAllLegalDocs: seeAllDocumentsText?.seeAllLegalDocs ?? '', seeAllTypeDocs: seeAllDocumentsText?.seeAllTypeDocs ?? '', finalMenu: finalMenu, hasSubCategoryPage: configVars.HAS_SUBCATEGORY_PAGE, setCookiePolicyFunc: setCookiePolicyFunc }) }), _jsx("div", { className: 'menu-desktop-wrapper', children: _jsx(DocumentMainMenu, { seeAllTypeDocs: seeAllDocumentsText?.seeAllTypeDocs ?? '', allLegalDocs: seeAllDocumentsText?.allLegalDocs ?? '', allTypeDocs: seeAllDocumentsText?.allTypeDocs ?? '', setCookiePolicyFunc: setCookiePolicyFunc, routes: routes, hasSubCategoryPage: configVars.HAS_SUBCATEGORY_PAGE, finalMenu: finalMenu }) })] })] })), !!navMenuItems &&
|
|
9
|
-
navMenuItems.map((item) => (_jsx("div", { className: `navigation-pane__link`, children: _jsxs("a", { className: `navigation-pane__link__title`, title: item.title, "data-qa": item.dataQa, href: item.href, children: [_jsx("p", { children: item.label }), item.label === '
|
|
9
|
+
navMenuItems.map((item) => (_jsx("div", { className: `navigation-pane__link`, children: _jsxs("a", { className: `navigation-pane__link__title`, title: item.title, "data-qa": item.dataQa, href: item.href, children: [_jsx("p", { children: item.label }), item.label.toLowerCase() === 'lawgenius' && _jsx(RatafiaLandingIcon, {})] }) }, item.title))), !!extraMenu && extraMenu?.items?.length > 0 && (_jsxs("div", { className: 'navigation-pane__resources', children: [_jsxs("div", { className: 'navigation-pane__resources__container', children: [_jsx("p", { className: 'navigation-pane__resources__title', children: extraMenu.title }), _jsx("img", { src: arrowDown, alt: 'arrow-down' })] }), _jsx("ul", { className: 'resources__list', children: extraMenu.items.map((item) => (_jsx("li", { className: 'menu-items-li', children: _jsx("a", { title: item.title, "data-qa": item.dataQa, href: item.href, children: item.label }) }, item.title))) })] }))] }));
|
|
10
10
|
};
|
|
@@ -55,7 +55,7 @@ export const MenuItems: React.FC<MenuItemsProps> = ({
|
|
|
55
55
|
<div className={`navigation-pane__link`} key={item.title}>
|
|
56
56
|
<a className={`navigation-pane__link__title`} title={item.title} data-qa={item.dataQa} href={item.href}>
|
|
57
57
|
<p>{item.label}</p>
|
|
58
|
-
{item.label === '
|
|
58
|
+
{item.label.toLowerCase() === 'lawgenius' && <RatafiaLandingIcon />}
|
|
59
59
|
</a>
|
|
60
60
|
</div>
|
|
61
61
|
))}
|