@npm_leadtech/legal-lib-components 7.69.2 → 7.69.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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import './RatafiaLandingIcon.scss';
3
- const RatafiaLandingIcon = ({ itemLabel }) => {
4
- const label = itemLabel?.toLowerCase() === 'copilot' ? 'KI' : 'AI';
3
+ const RatafiaLandingIcon = ({ strapiLocale }) => {
4
+ const label = strapiLocale === 'en-DE' ? 'KI' : 'AI';
5
5
  return _jsx("span", { className: 'ratafia-landing-icon sans-serif --bold-weight', children: label });
6
6
  };
7
7
  export default RatafiaLandingIcon;
@@ -3,8 +3,8 @@ import React from 'react'
3
3
  import { type RatafiaLandingIconProps } from './RatafiaLandingIconProps.types'
4
4
  import './RatafiaLandingIcon.scss'
5
5
 
6
- const RatafiaLandingIcon: React.FC<RatafiaLandingIconProps> = ({ itemLabel }) => {
7
- const label = itemLabel?.toLowerCase() === 'copilot' ? 'KI' : 'AI'
6
+ const RatafiaLandingIcon: React.FC<RatafiaLandingIconProps> = ({ strapiLocale }) => {
7
+ const label = strapiLocale === 'en-DE' ? 'KI' : 'AI'
8
8
  return <span className={'ratafia-landing-icon sans-serif --bold-weight'}>{label}</span>
9
9
  }
10
10
 
@@ -1,3 +1,3 @@
1
1
  export interface RatafiaLandingIconProps {
2
- itemLabel?: string;
2
+ strapiLocale: string;
3
3
  }
@@ -1,3 +1,3 @@
1
1
  export interface RatafiaLandingIconProps {
2
- itemLabel?: string
2
+ strapiLocale: string
3
3
  }
@@ -4,10 +4,10 @@ import { DocumentMainMenu } from '../../../components/organisms/DocumentMainMenu
4
4
  import { MenuItemsStyled } from './MenuItems.styled';
5
5
  import { RatafiaLandingIcon } from '../../atoms/RatafiaLandingIcon';
6
6
  import arrowDown from '../../../../images/svg/arrow-down.svg';
7
- export const MenuItems = ({ hasProducts, seeAllDocumentsText, setCookiePolicyFunc, routes, finalMenu, configVars, documentsMenuItems, navMenuItems, extraMenu }) => {
7
+ export const MenuItems = ({ hasProducts, seeAllDocumentsText, setCookiePolicyFunc, routes, finalMenu, configVars, documentsMenuItems, navMenuItems, extraMenu, strapiLocale }) => {
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: documentsMenuItems?.title }), _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
9
  navMenuItems.map((item) => {
10
10
  const showIcon = ['lawgenius', 'copilot'].includes(item.label.toLowerCase());
11
- return (_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 }), showIcon && _jsx(RatafiaLandingIcon, { itemLabel: item.label })] }) }, item.title));
11
+ return (_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 }), showIcon && _jsx(RatafiaLandingIcon, { strapiLocale: strapiLocale })] }) }, item.title));
12
12
  }), !!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))) })] }))] }));
13
13
  };
@@ -16,7 +16,8 @@ export const MenuItems: React.FC<MenuItemsProps> = ({
16
16
  configVars,
17
17
  documentsMenuItems,
18
18
  navMenuItems,
19
- extraMenu
19
+ extraMenu,
20
+ strapiLocale
20
21
  }) => {
21
22
  return (
22
23
  <MenuItemsStyled>
@@ -58,7 +59,7 @@ export const MenuItems: React.FC<MenuItemsProps> = ({
58
59
  <div className={`navigation-pane__link`} key={item.title}>
59
60
  <a className={`navigation-pane__link__title`} title={item.title} data-qa={item.dataQa} href={item.href}>
60
61
  <p>{item.label}</p>
61
- {showIcon && <RatafiaLandingIcon itemLabel={item.label} />}
62
+ {showIcon && <RatafiaLandingIcon strapiLocale={strapiLocale} />}
62
63
  </a>
63
64
  </div>
64
65
  )
@@ -46,4 +46,5 @@ export interface MenuItemsProps {
46
46
  label: string;
47
47
  }[];
48
48
  };
49
+ strapiLocale: string;
49
50
  }
@@ -47,4 +47,5 @@ export interface MenuItemsProps {
47
47
  label: string
48
48
  }[]
49
49
  }
50
+ strapiLocale: string
50
51
  }
@@ -5,6 +5,6 @@ import { NavMenuStyled } from './NavMenu.styled';
5
5
  import { NavMobileContactBar } from '../../molecules/NavMobileContactBar';
6
6
  import { PhoneIcon } from '../../../../images/componentsSvg/PhoneIcon';
7
7
  import { SearchBar } from '../../../components/molecules/SearchBar/SearchBar';
8
- export const NavMenu = ({ isLeftNavHidden, isHeaderProductsHidden, isSearchBarHidden, isResourcesHidden, showHeaderPhone, toggleMenuOpen, isMenuOpen, languageSelectorProps, configVars, searchableProducts, finalMenu, userActions, menuStrings, routes, searchBarTexts, sitePhone, handleResultClick, languageSelectorConfigEnabled, isJonSnow, triggerMenuClose, triggerMenuOpen, setCookiePolicyFunc, documentsMenuItems, navMenuItems, extraMenu }) => {
9
- return (_jsxs(NavMenuStyled, { children: [_jsxs("nav", { itemScope: true, itemType: 'https://www.schema.org/SiteNavigationElement', className: `navigation-pane --is-mobile ${isHeaderProductsHidden ? '--no-products' : ''}`, children: [_jsx("div", { onClick: toggleMenuOpen, onKeyDown: toggleMenuOpen, className: 'navigation-pane__trigger sans-serif --small', children: !isMenuOpen ? triggerMenuOpen : triggerMenuClose }), isMenuOpen && (_jsxs("div", { className: 'navigation-pane__wrapper', children: [userActions, !isSearchBarHidden && (_jsx(SearchBar, { products: searchableProducts, searchBarTexts: searchBarTexts, routes: routes, handleResultClick: handleResultClick })), _jsx(MenuItems, { hasProducts: !isHeaderProductsHidden, isResourcesHidden: isResourcesHidden, seeAllDocumentsText: menuStrings, setCookiePolicyFunc: setCookiePolicyFunc, routes: routes, finalMenu: finalMenu, configVars: configVars, documentsMenuItems: documentsMenuItems, navMenuItems: navMenuItems, extraMenu: extraMenu }), !isJonSnow && sitePhone && _jsx(NavMobileContactBar, { phone: sitePhone })] }))] }), _jsxs("nav", { className: `navigation-pane --is-desktop ${isHeaderProductsHidden ? '--no-products' : ''}`, children: [!isLeftNavHidden && (_jsx("div", { className: 'left-nav', children: _jsx(MenuItems, { hasProducts: !isHeaderProductsHidden, isResourcesHidden: isResourcesHidden, seeAllDocumentsText: menuStrings, setCookiePolicyFunc: setCookiePolicyFunc, routes: routes, finalMenu: finalMenu, configVars: configVars, documentsMenuItems: documentsMenuItems, navMenuItems: navMenuItems, extraMenu: extraMenu }) })), _jsxs("div", { className: 'right-nav', children: [showHeaderPhone && (_jsxs("div", { className: 'header-phone', children: [_jsx(PhoneIcon, {}), _jsxs("b", { children: [sitePhone, " "] })] })), !isSearchBarHidden && (_jsx(SearchBar, { products: searchableProducts, searchBarTexts: searchBarTexts, routes: routes, handleResultClick: handleResultClick })), languageSelectorConfigEnabled && languageSelectorProps && _jsx(LanguageSelector, { ...languageSelectorProps }), userActions] })] })] }));
8
+ export const NavMenu = ({ isLeftNavHidden, isHeaderProductsHidden, isSearchBarHidden, isResourcesHidden, showHeaderPhone, toggleMenuOpen, isMenuOpen, languageSelectorProps, configVars, searchableProducts, finalMenu, userActions, menuStrings, routes, searchBarTexts, sitePhone, handleResultClick, languageSelectorConfigEnabled, isJonSnow, triggerMenuClose, triggerMenuOpen, setCookiePolicyFunc, documentsMenuItems, navMenuItems, extraMenu, strapiLocale }) => {
9
+ return (_jsxs(NavMenuStyled, { children: [_jsxs("nav", { itemScope: true, itemType: 'https://www.schema.org/SiteNavigationElement', className: `navigation-pane --is-mobile ${isHeaderProductsHidden ? '--no-products' : ''}`, children: [_jsx("div", { onClick: toggleMenuOpen, onKeyDown: toggleMenuOpen, className: 'navigation-pane__trigger sans-serif --small', children: !isMenuOpen ? triggerMenuOpen : triggerMenuClose }), isMenuOpen && (_jsxs("div", { className: 'navigation-pane__wrapper', children: [userActions, !isSearchBarHidden && (_jsx(SearchBar, { products: searchableProducts, searchBarTexts: searchBarTexts, routes: routes, handleResultClick: handleResultClick })), _jsx(MenuItems, { hasProducts: !isHeaderProductsHidden, isResourcesHidden: isResourcesHidden, seeAllDocumentsText: menuStrings, setCookiePolicyFunc: setCookiePolicyFunc, routes: routes, finalMenu: finalMenu, configVars: configVars, documentsMenuItems: documentsMenuItems, navMenuItems: navMenuItems, extraMenu: extraMenu, strapiLocale: strapiLocale }), !isJonSnow && sitePhone && _jsx(NavMobileContactBar, { phone: sitePhone })] }))] }), _jsxs("nav", { className: `navigation-pane --is-desktop ${isHeaderProductsHidden ? '--no-products' : ''}`, children: [!isLeftNavHidden && (_jsx("div", { className: 'left-nav', children: _jsx(MenuItems, { hasProducts: !isHeaderProductsHidden, isResourcesHidden: isResourcesHidden, seeAllDocumentsText: menuStrings, setCookiePolicyFunc: setCookiePolicyFunc, routes: routes, finalMenu: finalMenu, configVars: configVars, documentsMenuItems: documentsMenuItems, navMenuItems: navMenuItems, extraMenu: extraMenu, strapiLocale: strapiLocale }) })), _jsxs("div", { className: 'right-nav', children: [showHeaderPhone && (_jsxs("div", { className: 'header-phone', children: [_jsx(PhoneIcon, {}), _jsxs("b", { children: [sitePhone, " "] })] })), !isSearchBarHidden && (_jsx(SearchBar, { products: searchableProducts, searchBarTexts: searchBarTexts, routes: routes, handleResultClick: handleResultClick })), languageSelectorConfigEnabled && languageSelectorProps && _jsx(LanguageSelector, { ...languageSelectorProps }), userActions] })] })] }));
10
10
  };
@@ -34,7 +34,8 @@ export const NavMenu: React.FC<NavMenuProps> = ({
34
34
  setCookiePolicyFunc,
35
35
  documentsMenuItems,
36
36
  navMenuItems,
37
- extraMenu
37
+ extraMenu,
38
+ strapiLocale
38
39
  }) => {
39
40
  return (
40
41
  <NavMenuStyled>
@@ -72,6 +73,7 @@ export const NavMenu: React.FC<NavMenuProps> = ({
72
73
  documentsMenuItems={documentsMenuItems}
73
74
  navMenuItems={navMenuItems}
74
75
  extraMenu={extraMenu}
76
+ strapiLocale={strapiLocale}
75
77
  />
76
78
  {!isJonSnow && sitePhone && <NavMobileContactBar phone={sitePhone} />}
77
79
  </div>
@@ -91,6 +93,7 @@ export const NavMenu: React.FC<NavMenuProps> = ({
91
93
  documentsMenuItems={documentsMenuItems}
92
94
  navMenuItems={navMenuItems}
93
95
  extraMenu={extraMenu}
96
+ strapiLocale={strapiLocale}
94
97
  />
95
98
  </div>
96
99
  )}
@@ -81,4 +81,5 @@ export interface NavMenuProps {
81
81
  label: string;
82
82
  }[];
83
83
  };
84
+ strapiLocale: string;
84
85
  }
@@ -83,4 +83,5 @@ export interface NavMenuProps {
83
83
  label: string
84
84
  }[]
85
85
  }
86
+ strapiLocale: string
86
87
  }
@@ -4,8 +4,8 @@ import { Logo, TopBar } from '../../atoms';
4
4
  import { HeaderStyled } from './Header.styled';
5
5
  import { NavMenu } from '../../organisms/NavMenu';
6
6
  const Header = forwardRef(({ mainHeaderProps, topBarProps, navMenuProps }, ref) => {
7
- const { classnames, siteName } = mainHeaderProps;
8
- return (_jsxs(HeaderStyled, { className: `header ${classnames}`, ref: ref, id: 'header', children: [_jsx(TopBar, { ...topBarProps }), _jsxs("span", { itemScope: true, itemType: 'https://www.schema.org/Brand', className: 'flex header__inner', children: [_jsx("a", { "data-qa": 'Header_Logo', className: 'header__logo', href: '/', children: _jsx(Logo, { siteName: siteName, width: '188', height: '32' }) }), _jsx(NavMenu, { ...navMenuProps })] })] }));
7
+ const { classnames, siteName, strapiLocale } = mainHeaderProps;
8
+ return (_jsxs(HeaderStyled, { className: `header ${classnames}`, ref: ref, id: 'header', children: [_jsx(TopBar, { ...topBarProps }), _jsxs("span", { itemScope: true, itemType: 'https://www.schema.org/Brand', className: 'flex header__inner', children: [_jsx("a", { "data-qa": 'Header_Logo', className: 'header__logo', href: '/', children: _jsx(Logo, { siteName: siteName, width: '188', height: '32' }) }), _jsx(NavMenu, { ...navMenuProps, strapiLocale: strapiLocale })] })] }));
9
9
  });
10
10
  Header.displayName = 'Header';
11
11
  export default Header;
@@ -7,8 +7,7 @@ import { NavMenu } from '../../organisms/NavMenu'
7
7
 
8
8
  const Header = forwardRef<HTMLDivElement, HeaderProps>(
9
9
  ({ mainHeaderProps, topBarProps, navMenuProps }, ref): ReactElement => {
10
- const { classnames, siteName } = mainHeaderProps
11
-
10
+ const { classnames, siteName, strapiLocale } = mainHeaderProps
12
11
  return (
13
12
  <HeaderStyled className={`header ${classnames}`} ref={ref} id='header'>
14
13
  <TopBar {...topBarProps} />
@@ -16,7 +15,7 @@ const Header = forwardRef<HTMLDivElement, HeaderProps>(
16
15
  <a data-qa={'Header_Logo'} className='header__logo' href='/'>
17
16
  <Logo siteName={siteName} width='188' height='32' />
18
17
  </a>
19
- <NavMenu {...navMenuProps} />
18
+ <NavMenu {...navMenuProps} strapiLocale={strapiLocale} />
20
19
  </span>
21
20
  </HeaderStyled>
22
21
  )
@@ -25,6 +25,7 @@ export interface HeaderProps {
25
25
  classnames?: string;
26
26
  hide?: boolean;
27
27
  siteName: string;
28
+ strapiLocale: string;
28
29
  };
29
30
  topBarProps: {
30
31
  hide?: boolean;
@@ -30,6 +30,7 @@ export interface HeaderProps {
30
30
  classnames?: string
31
31
  hide?: boolean
32
32
  siteName: string
33
+ strapiLocale: string
33
34
  }
34
35
  topBarProps: {
35
36
  hide?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.69.2",
3
+ "version": "7.69.3",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",