@npm_leadtech/legal-lib-components 7.12.15 → 7.12.16
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/organisms/NavMenu/NavMenu.js +2 -2
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.d.ts +1 -1
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.js +2 -2
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.ts +2 -2
- package/dist/src/components/organisms/NavMenu/NavMenu.tsx +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { LanguageSelector } from '../LanguageSelector';
|
|
3
3
|
import { MenuItems } from '../MenuItems';
|
|
4
4
|
import { NavMenuStyled } from './NavMenu.styled';
|
|
@@ -6,5 +6,5 @@ import { NavMobileContactBar } from '../../molecules/NavMobileContactBar';
|
|
|
6
6
|
import { PhoneIcon } from '../../../../images/componentsSvg/PhoneIcon';
|
|
7
7
|
import { SearchBar } from '../../../components/molecules/SearchBar/SearchBar';
|
|
8
8
|
export const NavMenu = ({ isLeftNavHidden, isHeaderProductsHidden, isSearchBarHidden, isResourcesHidden, showHeaderPhone, toggleMenuOpen, isMenuOpen, languageSelectorProps, configVars, searchableProducts, finalMenu, userActions, menuStrings, routes, searchBarTexts, sitePhone, handleResultClick, languageSelectorConfigEnabled, isJonSnow, isMobile, triggerMenuClose, triggerMenuOpen, setCookiePolicyFunc, navMenuItems, extraMenu }) => {
|
|
9
|
-
return (_jsx(
|
|
9
|
+
return (_jsx(_Fragment, { children: isMobile ? (_jsxs(NavMenuStyled, { 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, isMobile: isMobile, configVars: configVars, navMenuItems: navMenuItems, extraMenu: extraMenu }), !isJonSnow && _jsx(NavMobileContactBar, { phone: sitePhone })] }))] })) : (_jsxs(NavMenuStyled, { 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, isMobile: isMobile, configVars: configVars, 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] })] })) }));
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const NavMenuStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<
|
|
1
|
+
export declare const NavMenuStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { device, size } from '../../../globalStyles/breakpoints';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
export const NavMenuStyled = styled.
|
|
3
|
+
export const NavMenuStyled = styled.nav `
|
|
4
4
|
width: 100%;
|
|
5
5
|
.navigation-pane {
|
|
6
6
|
&__spacer {
|
|
@@ -366,7 +366,7 @@ export const NavMenuStyled = styled.div `
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
.--is-open .--is-mobile .navigation-pane {
|
|
369
|
-
|
|
369
|
+
.navigation-pane__wrapper {
|
|
370
370
|
width: 100%;
|
|
371
371
|
margin-top: 3rem;
|
|
372
372
|
left: 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { device, size } from '../../../globalStyles/breakpoints'
|
|
2
2
|
import styled from 'styled-components'
|
|
3
3
|
|
|
4
|
-
export const NavMenuStyled = styled.
|
|
4
|
+
export const NavMenuStyled = styled.nav`
|
|
5
5
|
width: 100%;
|
|
6
6
|
.navigation-pane {
|
|
7
7
|
&__spacer {
|
|
@@ -367,7 +367,7 @@ export const NavMenuStyled = styled.div`
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
.--is-open .--is-mobile .navigation-pane {
|
|
370
|
-
|
|
370
|
+
.navigation-pane__wrapper {
|
|
371
371
|
width: 100%;
|
|
372
372
|
margin-top: 3rem;
|
|
373
373
|
left: 0;
|
|
@@ -37,9 +37,9 @@ export const NavMenu: React.FC<NavMenuProps> = ({
|
|
|
37
37
|
extraMenu
|
|
38
38
|
}) => {
|
|
39
39
|
return (
|
|
40
|
-
|
|
40
|
+
<>
|
|
41
41
|
{isMobile ? (
|
|
42
|
-
<
|
|
42
|
+
<NavMenuStyled
|
|
43
43
|
itemScope
|
|
44
44
|
itemType='https://www.schema.org/SiteNavigationElement'
|
|
45
45
|
className={`navigation-pane --is-mobile ${isHeaderProductsHidden ? '--no-products' : ''}`}
|
|
@@ -77,9 +77,9 @@ export const NavMenu: React.FC<NavMenuProps> = ({
|
|
|
77
77
|
{!isJonSnow && <NavMobileContactBar phone={sitePhone} />}
|
|
78
78
|
</div>
|
|
79
79
|
)}
|
|
80
|
-
</
|
|
80
|
+
</NavMenuStyled>
|
|
81
81
|
) : (
|
|
82
|
-
<
|
|
82
|
+
<NavMenuStyled className={`navigation-pane --is-desktop ${isHeaderProductsHidden ? '--no-products' : ''}`}>
|
|
83
83
|
{!isLeftNavHidden && (
|
|
84
84
|
<div className='left-nav'>
|
|
85
85
|
<MenuItems
|
|
@@ -114,8 +114,8 @@ export const NavMenu: React.FC<NavMenuProps> = ({
|
|
|
114
114
|
{languageSelectorConfigEnabled && languageSelectorProps && <LanguageSelector {...languageSelectorProps} />}
|
|
115
115
|
{userActions}
|
|
116
116
|
</div>
|
|
117
|
-
</
|
|
117
|
+
</NavMenuStyled>
|
|
118
118
|
)}
|
|
119
|
-
|
|
119
|
+
</>
|
|
120
120
|
)
|
|
121
121
|
}
|