@npm_leadtech/legal-lib-components 7.15.0 → 7.16.1
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/css/styles.css +30 -15
- package/dist/images/componentsSvg/SearchIcon.d.ts +4 -0
- package/dist/images/componentsSvg/SearchIcon.js +4 -0
- package/dist/images/componentsSvg/SearchIcon.tsx +26 -0
- package/dist/images/svg/arrow-down.svg +3 -0
- package/dist/images/svg/business-type.svg +3 -0
- package/dist/images/svg/clear-24-px.svg +14 -0
- package/dist/images/svg/men.svg +5 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.d.ts +3 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.js +24 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.styled.d.ts +1 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.styled.js +147 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.styled.ts +149 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInput.tsx +60 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInputProps.types.d.ts +8 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInputProps.types.js +2 -0
- package/dist/src/components/atoms/DropdownInput/DropdownInputProps.types.ts +10 -0
- package/dist/src/components/atoms/DropdownInput/index.d.ts +2 -0
- package/dist/src/components/atoms/DropdownInput/index.js +1 -0
- package/dist/src/components/atoms/DropdownInput/index.ts +2 -0
- package/dist/src/components/atoms/MenuItemsDeprecated/MenuItemsDeprecated.d.ts +4 -0
- package/dist/src/components/atoms/{MenuItems/MenuItems.js → MenuItemsDeprecated/MenuItemsDeprecated.js} +4 -4
- package/dist/src/components/atoms/MenuItemsDeprecated/MenuItemsDeprecated.styled.d.ts +1 -0
- package/dist/src/components/atoms/{MenuItems/MenuItems.styled.js → MenuItemsDeprecated/MenuItemsDeprecated.styled.js} +1 -1
- package/dist/src/components/atoms/{MenuItems/MenuItems.styled.ts → MenuItemsDeprecated/MenuItemsDeprecated.styled.ts} +1 -1
- package/dist/src/components/atoms/{MenuItems/MenuItems.tsx → MenuItemsDeprecated/MenuItemsDeprecated.tsx} +12 -6
- package/dist/src/components/atoms/{MenuItems/MenuItemProps.types.d.ts → MenuItemsDeprecated/MenuItemsDeprecatedProps.types.d.ts} +1 -1
- package/dist/src/components/atoms/{MenuItems/MenuItemProps.types.ts → MenuItemsDeprecated/MenuItemsDeprecatedProps.types.ts} +1 -1
- package/dist/src/components/atoms/MenuItemsDeprecated/index.d.ts +2 -0
- package/dist/src/components/atoms/MenuItemsDeprecated/index.js +1 -0
- package/dist/src/components/atoms/MenuItemsDeprecated/index.ts +2 -0
- package/dist/src/components/atoms/SidemenuTab/SidemenuTab.js +2 -2
- package/dist/src/components/atoms/SidemenuTab/SidemenuTab.tsx +2 -2
- package/dist/src/components/atoms/TopBar/TopBar.styled.js +48 -1
- package/dist/src/components/atoms/TopBar/TopBar.styled.ts +48 -1
- package/dist/src/components/atoms/TopBar/TopBar.tsx +1 -1
- package/dist/src/components/atoms/index.d.ts +2 -2
- package/dist/src/components/atoms/index.js +2 -2
- package/dist/src/components/atoms/index.ts +2 -2
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.d.ts +3 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.js +6 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.styled.d.ts +1 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.styled.js +18 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.styled.ts +19 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenu.tsx +22 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenuProps.types.d.ts +8 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenuProps.types.js +1 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/AllTypeDocumentsItemMenuProps.types.ts +9 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/index.d.ts +2 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/index.js +1 -0
- package/dist/src/components/molecules/AllTypeDocumentsItemMenu/index.ts +2 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.d.ts +3 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.js +7 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.styled.d.ts +1 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.styled.js +20 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.styled.ts +21 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSection.tsx +35 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSectionProps.types.d.ts +16 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSectionProps.types.js +1 -0
- package/dist/src/components/molecules/DocumentListMenuSection/DocumentListMenuSectionProps.types.ts +18 -0
- package/dist/src/components/molecules/DocumentListMenuSection/index.d.ts +2 -0
- package/dist/src/components/molecules/DocumentListMenuSection/index.js +1 -0
- package/dist/src/components/molecules/DocumentListMenuSection/index.ts +2 -0
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSection.js +2 -2
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSection.tsx +2 -2
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSectionProps.types.d.ts +1 -1
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSectionProps.types.ts +1 -1
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.d.ts +3 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.js +5 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.styled.d.ts +1 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.styled.js +26 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.styled.ts +27 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitle.tsx +17 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitleProps.types.d.ts +4 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitleProps.types.js +1 -0
- package/dist/src/components/molecules/MenuSectionTitle/MenuSectionTitleProps.types.ts +4 -0
- package/dist/src/components/molecules/MenuSectionTitle/index.d.ts +2 -0
- package/dist/src/components/molecules/MenuSectionTitle/index.js +1 -0
- package/dist/src/components/molecules/MenuSectionTitle/index.ts +2 -0
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.js +2 -2
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.tsx +2 -2
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.d.ts +4 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.js +7 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.styled.d.ts +1 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.styled.js +34 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.styled.ts +35 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBar.tsx +23 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBarProps.types.d.ts +4 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBarProps.types.js +1 -0
- package/dist/src/components/molecules/NavMobileContactBar/NavMobileContactBarProps.types.ts +4 -0
- package/dist/src/components/molecules/NavMobileContactBar/index.d.ts +2 -0
- package/dist/src/components/molecules/NavMobileContactBar/index.js +1 -0
- package/dist/src/components/molecules/NavMobileContactBar/index.ts +2 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.d.ts +3 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.js +5 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.styled.d.ts +1 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.styled.js +18 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.styled.ts +19 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenu.tsx +25 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenuProps.types.d.ts +8 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenuProps.types.js +1 -0
- package/dist/src/components/molecules/ProductListMenu/ProductListMenuProps.types.ts +9 -0
- package/dist/src/components/molecules/ProductListMenu/index.d.ts +2 -0
- package/dist/src/components/molecules/ProductListMenu/index.js +1 -0
- package/dist/src/components/molecules/ProductListMenu/index.ts +2 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.d.ts +3 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.js +33 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.styled.d.ts +1 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.styled.js +62 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.styled.ts +63 -0
- package/dist/src/components/molecules/SearchBar/SearchBar.tsx +72 -0
- package/dist/src/components/molecules/SearchBar/SearchBarProps.types.d.ts +37 -0
- package/dist/src/components/molecules/SearchBar/SearchBarProps.types.js +1 -0
- package/dist/src/components/molecules/SearchBar/SearchBarProps.types.ts +41 -0
- package/dist/src/components/molecules/SearchBar/index.d.ts +2 -0
- package/dist/src/components/molecules/SearchBar/index.js +1 -0
- package/dist/src/components/molecules/SearchBar/index.ts +2 -0
- package/dist/src/components/molecules/TextInput/TextInput.scss +31 -15
- package/dist/src/components/molecules/TextInput/stories/TextInput.stories.tsx +13 -2
- package/dist/src/components/molecules/TooltipMenu/TooltipMenu.js +2 -2
- package/dist/src/components/molecules/TooltipMenu/TooltipMenu.tsx +2 -2
- package/dist/src/components/molecules/index.d.ts +5 -0
- package/dist/src/components/molecules/index.js +5 -0
- package/dist/src/components/molecules/index.ts +5 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.d.ts +3 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.js +7 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.styled.d.ts +1 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.styled.js +67 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.styled.ts +68 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenu.tsx +47 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenuProps.types.d.ts +21 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenuProps.types.js +1 -0
- package/dist/src/components/organisms/DocumentListMenu/DocumentListMenuProps.types.ts +24 -0
- package/dist/src/components/organisms/DocumentListMenu/index.d.ts +2 -0
- package/dist/src/components/organisms/DocumentListMenu/index.js +1 -0
- package/dist/src/components/organisms/DocumentListMenu/index.ts +2 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.d.ts +3 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.js +11 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.styled.d.ts +1 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.styled.js +94 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.styled.ts +95 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenu.tsx +59 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenuProps.types.d.ts +22 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenuProps.types.js +1 -0
- package/dist/src/components/organisms/DocumentMainMenu/DocumentMainMenuProps.types.ts +25 -0
- package/dist/src/components/organisms/DocumentMainMenu/index.d.ts +2 -0
- package/dist/src/components/organisms/DocumentMainMenu/index.js +1 -0
- package/dist/src/components/organisms/DocumentMainMenu/index.ts +2 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.d.ts +4 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.js +7 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.styled.d.ts +1 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.styled.js +27 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.styled.ts +28 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenu.tsx +21 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenuProps.types.d.ts +7 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenuProps.types.js +1 -0
- package/dist/src/components/organisms/DocumentSubMenu/DocumentSubMenuProps.types.ts +8 -0
- package/dist/src/components/organisms/DocumentSubMenu/index.d.ts +2 -0
- package/dist/src/components/organisms/DocumentSubMenu/index.js +1 -0
- package/dist/src/components/organisms/DocumentSubMenu/index.ts +2 -0
- package/dist/src/components/organisms/MenuItems/MenuItems.d.ts +3 -0
- package/dist/src/components/organisms/MenuItems/MenuItems.js +10 -0
- package/dist/src/components/{atoms → organisms}/MenuItems/MenuItems.styled.d.ts +1 -1
- package/dist/src/components/organisms/MenuItems/MenuItems.styled.js +719 -0
- package/dist/src/components/organisms/MenuItems/MenuItems.styled.ts +723 -0
- package/dist/src/components/organisms/MenuItems/MenuItems.tsx +81 -0
- package/dist/src/components/organisms/MenuItems/MenuItemsProps.types.d.ts +45 -0
- package/dist/src/components/organisms/MenuItems/MenuItemsProps.types.js +1 -0
- package/dist/src/components/organisms/MenuItems/MenuItemsProps.types.ts +46 -0
- package/dist/src/components/organisms/MenuItems/index.d.ts +2 -0
- package/dist/src/components/organisms/MenuItems/index.js +1 -0
- package/dist/src/components/organisms/MenuItems/index.ts +2 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.d.ts +3 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.js +10 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.d.ts +1 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.js +644 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.styled.ts +648 -0
- package/dist/src/components/organisms/NavMenu/NavMenu.tsx +121 -0
- package/dist/src/components/organisms/NavMenu/NavMenuProps.types.d.ts +80 -0
- package/dist/src/components/organisms/NavMenu/NavMenuProps.types.js +1 -0
- package/dist/src/components/organisms/NavMenu/NavMenuProps.types.ts +82 -0
- package/dist/src/components/organisms/NavMenu/index.d.ts +2 -0
- package/dist/src/components/organisms/NavMenu/index.js +1 -0
- package/dist/src/components/organisms/NavMenu/index.ts +2 -0
- package/dist/src/components/organisms/index.d.ts +4 -0
- package/dist/src/components/organisms/index.js +4 -0
- package/dist/src/components/organisms/index.ts +4 -0
- package/dist/src/components/sections/Header/Header.d.ts +4 -0
- package/dist/src/components/sections/Header/Header.js +11 -0
- package/dist/src/components/sections/Header/Header.styled.d.ts +1 -0
- package/dist/src/components/sections/Header/Header.styled.js +136 -0
- package/dist/src/components/sections/Header/Header.styled.ts +137 -0
- package/dist/src/components/sections/Header/Header.tsx +28 -0
- package/dist/src/components/sections/Header/HeaderProps.types.d.ts +97 -0
- package/dist/src/components/sections/Header/HeaderProps.types.js +1 -0
- package/dist/src/components/sections/Header/HeaderProps.types.ts +101 -0
- package/dist/src/components/sections/Header/index.d.ts +2 -0
- package/dist/src/components/sections/Header/index.js +1 -0
- package/dist/src/components/sections/Header/index.ts +2 -0
- package/dist/src/components/sections/index.d.ts +1 -0
- package/dist/src/components/sections/index.js +1 -0
- package/dist/src/components/sections/index.ts +1 -0
- package/dist/src/hooks/useWindowSize.d.ts +6 -0
- package/dist/src/hooks/useWindowSize.js +43 -0
- package/dist/src/hooks/useWindowSize.tsx +51 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/components/atoms/MenuItems/MenuItems.d.ts +0 -4
- package/dist/src/components/atoms/MenuItems/index.d.ts +0 -2
- package/dist/src/components/atoms/MenuItems/index.js +0 -1
- package/dist/src/components/atoms/MenuItems/index.ts +0 -2
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.d.ts +0 -7
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.js +0 -10
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.styled.d.ts +0 -1
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.styled.js +0 -49
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.styled.ts +0 -50
- package/dist/src/components/atoms/TopBarMobile/TopBarMobile.tsx +0 -22
- package/dist/src/components/atoms/TopBarMobile/index.d.ts +0 -1
- package/dist/src/components/atoms/TopBarMobile/index.js +0 -1
- package/dist/src/components/atoms/TopBarMobile/index.ts +0 -1
- /package/dist/src/components/atoms/{MenuItems/MenuItemProps.types.js → MenuItemsDeprecated/MenuItemsDeprecatedProps.types.js} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints'
|
|
2
|
+
import styled from 'styled-components'
|
|
3
|
+
|
|
4
|
+
export const MenuSectionTitleStyled = styled.div`
|
|
5
|
+
&.menu-section-title-container {
|
|
6
|
+
background-color: var(--neutral-neutral-5);
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
align-items: center;
|
|
11
|
+
padding: 1rem;
|
|
12
|
+
|
|
13
|
+
@media ${device.laptop} {
|
|
14
|
+
justify-content: left;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.menu-section-title__icon {
|
|
18
|
+
margin-right: 0.5rem;
|
|
19
|
+
width: 1rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.jumbotron__title {
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
margin-left: 1rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { MenuSectionTitleProps } from './MenuSectionTitleProps.types'
|
|
4
|
+
import { MenuSectionTitleStyled } from './MenuSectionTitle.styled'
|
|
5
|
+
|
|
6
|
+
export const MenuSectionTitle: React.FC<MenuSectionTitleProps> = ({ icon, title }) => {
|
|
7
|
+
return (
|
|
8
|
+
<MenuSectionTitleStyled className='menu-section-title-container'>
|
|
9
|
+
<div className='menu-section-title__icon'>
|
|
10
|
+
<img src={icon} alt={title} />
|
|
11
|
+
</div>
|
|
12
|
+
<div className=''>
|
|
13
|
+
<div className='jumbotron__title'>{title}</div>
|
|
14
|
+
</div>
|
|
15
|
+
</MenuSectionTitleStyled>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuSectionTitle } from './MenuSectionTitle';
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { MenuItemsDeprecated } from '../../atoms';
|
|
6
6
|
import { NavBarDropDownStyled } from './NavBarDropDown.styled';
|
|
7
7
|
import { useIntersectionObserver } from '../../../hooks';
|
|
8
8
|
let scrollPosition = 0;
|
|
@@ -63,5 +63,5 @@ export const NavBarDropDown = ({ isOpen, list, hasBullets = true, initialActiveC
|
|
|
63
63
|
useEffect(() => {
|
|
64
64
|
setEnableScrollbarOnClose(() => enableScrollbarOnClose);
|
|
65
65
|
}, []);
|
|
66
|
-
return (_jsx(_Fragment, { children: isOpen ? (_jsxs(NavBarDropDownStyled, { className: 'navbar-drop-down__container', children: [_jsx("div", { className: 'navbar-drop-down__container__menu_items', children: _jsx(
|
|
66
|
+
return (_jsx(_Fragment, { children: isOpen ? (_jsxs(NavBarDropDownStyled, { className: 'navbar-drop-down__container', children: [_jsx("div", { className: 'navbar-drop-down__container__menu_items', children: _jsx(MenuItemsDeprecated, { list: list, hasBullets: hasBullets, initialActiveContent: initialActiveContent }) }), _jsx("div", { ref: ref, className: 'navbar-drop-down__container__shadow', onClick: closeMenu })] })) : null }));
|
|
67
67
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
3
|
import React, { type FC, useEffect } from 'react'
|
|
4
|
-
import {
|
|
4
|
+
import { MenuItemsDeprecated } from '../../atoms'
|
|
5
5
|
import { type NavBarDropDownProps } from './NavBarDropDownProps.types'
|
|
6
6
|
import { NavBarDropDownStyled } from './NavBarDropDown.styled'
|
|
7
7
|
import { useIntersectionObserver } from '../../../hooks'
|
|
@@ -87,7 +87,7 @@ export const NavBarDropDown: FC<NavBarDropDownProps> = ({
|
|
|
87
87
|
{isOpen ? (
|
|
88
88
|
<NavBarDropDownStyled className='navbar-drop-down__container'>
|
|
89
89
|
<div className='navbar-drop-down__container__menu_items'>
|
|
90
|
-
<
|
|
90
|
+
<MenuItemsDeprecated list={list} hasBullets={hasBullets} initialActiveContent={initialActiveContent} />
|
|
91
91
|
</div>
|
|
92
92
|
<div ref={ref} className='navbar-drop-down__container__shadow' onClick={closeMenu}></div>
|
|
93
93
|
</NavBarDropDownStyled>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../atoms/Button';
|
|
3
|
+
import { NavMobileContactBarStyled } from './NavMobileContactBar.styled';
|
|
4
|
+
const NavMobileContactBar = ({ phone, schedule }) => {
|
|
5
|
+
return (_jsxs(NavMobileContactBarStyled, { className: 'nav-mobile-contact-bar', children: [_jsx(Button, { centered: true, isExternal: true, link: `tel:${phone}`, gtmTag: 'clicked_phone_menu', givenClass: 'nav-mobile-contact-bar_phone e-button e-button--link e-button--primary-1 e-button--center', label: phone, dataQa: 'nav_mobile_contact_phone' }), schedule && _jsx("p", { className: 'nav-mobile-contact-bar_schedule', children: schedule })] }));
|
|
6
|
+
};
|
|
7
|
+
export default NavMobileContactBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NavMobileContactBarStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import phoneIconSvg from '../../../../images/svg/icon-web-24px.svg';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const NavMobileContactBarStyled = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-flow: column;
|
|
6
|
+
border-top: 1px solid get-color(neutral, neutral-4);
|
|
7
|
+
padding: 1.5rem 0;
|
|
8
|
+
margin: 0 1.5rem;
|
|
9
|
+
|
|
10
|
+
&:last-child {
|
|
11
|
+
border-top: none;
|
|
12
|
+
padding-top: 0px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.nav-mobile-contact-bar_phone {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
&:before {
|
|
21
|
+
content: '';
|
|
22
|
+
width: 20px;
|
|
23
|
+
height: 20px;
|
|
24
|
+
background: url(${phoneIconSvg}) no-repeat center center / contain;
|
|
25
|
+
margin-right: 0.5rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nav-mobile-contact-bar_schedule {
|
|
30
|
+
color: get-color(neutral, neutral-2);
|
|
31
|
+
text-align: center;
|
|
32
|
+
margin: 0.5rem auto;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import phoneIconSvg from '../../../../images/svg/icon-web-24px.svg'
|
|
2
|
+
import styled from 'styled-components'
|
|
3
|
+
|
|
4
|
+
export const NavMobileContactBarStyled = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-flow: column;
|
|
7
|
+
border-top: 1px solid get-color(neutral, neutral-4);
|
|
8
|
+
padding: 1.5rem 0;
|
|
9
|
+
margin: 0 1.5rem;
|
|
10
|
+
|
|
11
|
+
&:last-child {
|
|
12
|
+
border-top: none;
|
|
13
|
+
padding-top: 0px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.nav-mobile-contact-bar_phone {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
width: 100%;
|
|
20
|
+
|
|
21
|
+
&:before {
|
|
22
|
+
content: '';
|
|
23
|
+
width: 20px;
|
|
24
|
+
height: 20px;
|
|
25
|
+
background: url(${phoneIconSvg}) no-repeat center center / contain;
|
|
26
|
+
margin-right: 0.5rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.nav-mobile-contact-bar_schedule {
|
|
31
|
+
color: get-color(neutral, neutral-2);
|
|
32
|
+
text-align: center;
|
|
33
|
+
margin: 0.5rem auto;
|
|
34
|
+
}
|
|
35
|
+
`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Button } from '../../atoms/Button'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { type NavMobileContactBarProps } from './NavMobileContactBarProps.types'
|
|
5
|
+
import { NavMobileContactBarStyled } from './NavMobileContactBar.styled'
|
|
6
|
+
const NavMobileContactBar: React.FC<NavMobileContactBarProps> = ({ phone, schedule }) => {
|
|
7
|
+
return (
|
|
8
|
+
<NavMobileContactBarStyled className='nav-mobile-contact-bar'>
|
|
9
|
+
<Button
|
|
10
|
+
centered
|
|
11
|
+
isExternal
|
|
12
|
+
link={`tel:${phone}`}
|
|
13
|
+
gtmTag='clicked_phone_menu'
|
|
14
|
+
givenClass='nav-mobile-contact-bar_phone e-button e-button--link e-button--primary-1 e-button--center'
|
|
15
|
+
label={phone}
|
|
16
|
+
dataQa={'nav_mobile_contact_phone'}
|
|
17
|
+
/>
|
|
18
|
+
{schedule && <p className='nav-mobile-contact-bar_schedule'>{schedule}</p>}
|
|
19
|
+
</NavMobileContactBarStyled>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default NavMobileContactBar
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NavMobileContactBar } from './NavMobileContactBar';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ProductListMenuStyled } from './ProductListMenu.styled';
|
|
3
|
+
export const ProductListMenu = ({ slug, linkText, categoryUrl, routes, setCookiePolicyFunc }) => {
|
|
4
|
+
return (_jsx(ProductListMenuStyled, { className: 'products__list__section__li', children: _jsx("a", { title: linkText, "data-qa": `${slug}_Document_List`, onClick: () => setCookiePolicyFunc, href: routes.CUSTOM_URL_FROM_TARGET_ADDRESS(categoryUrl ? `${categoryUrl}/${slug}` : slug), children: linkText }) }));
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ProductListMenuStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const ProductListMenuStyled = styled.li `
|
|
3
|
+
list-style: none;
|
|
4
|
+
margin-top: 1rem;
|
|
5
|
+
padding: 0.25rem 1.5rem 0.25rem 1.5rem;
|
|
6
|
+
|
|
7
|
+
&.all-item {
|
|
8
|
+
font-weight: bold;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:last-child {
|
|
12
|
+
margin-bottom: 1.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: var(--primary-main-light-5);
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const ProductListMenuStyled = styled.li`
|
|
4
|
+
list-style: none;
|
|
5
|
+
margin-top: 1rem;
|
|
6
|
+
padding: 0.25rem 1.5rem 0.25rem 1.5rem;
|
|
7
|
+
|
|
8
|
+
&.all-item {
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:last-child {
|
|
13
|
+
margin-bottom: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
background-color: var(--primary-main-light-5);
|
|
18
|
+
}
|
|
19
|
+
`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { type ProductListMenuProps } from './ProductListMenuProps.types'
|
|
4
|
+
import { ProductListMenuStyled } from './ProductListMenu.styled'
|
|
5
|
+
|
|
6
|
+
export const ProductListMenu: React.FC<ProductListMenuProps> = ({
|
|
7
|
+
slug,
|
|
8
|
+
linkText,
|
|
9
|
+
categoryUrl,
|
|
10
|
+
routes,
|
|
11
|
+
setCookiePolicyFunc
|
|
12
|
+
}) => {
|
|
13
|
+
return (
|
|
14
|
+
<ProductListMenuStyled className='products__list__section__li'>
|
|
15
|
+
<a
|
|
16
|
+
title={linkText}
|
|
17
|
+
data-qa={`${slug}_Document_List`}
|
|
18
|
+
onClick={() => setCookiePolicyFunc}
|
|
19
|
+
href={routes.CUSTOM_URL_FROM_TARGET_ADDRESS(categoryUrl ? `${categoryUrl}/${slug}` : slug)}
|
|
20
|
+
>
|
|
21
|
+
{linkText}
|
|
22
|
+
</a>
|
|
23
|
+
</ProductListMenuStyled>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Routes } from '../../sections/Header/HeaderProps.types';
|
|
2
|
+
export interface ProductListMenuProps {
|
|
3
|
+
slug: string;
|
|
4
|
+
linkText: string;
|
|
5
|
+
categoryUrl?: string;
|
|
6
|
+
routes: Routes;
|
|
7
|
+
setCookiePolicyFunc: (url?: string, setCookiePolicyAccepted?: boolean) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Routes } from '../../sections/Header/HeaderProps.types'
|
|
2
|
+
|
|
3
|
+
export interface ProductListMenuProps {
|
|
4
|
+
slug: string
|
|
5
|
+
linkText: string
|
|
6
|
+
categoryUrl?: string
|
|
7
|
+
routes: Routes
|
|
8
|
+
setCookiePolicyFunc: (url?: string, setCookiePolicyAccepted?: boolean) => void
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductListMenu } from './ProductListMenu';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { DropdownInput } from '../../atoms/DropdownInput/DropdownInput';
|
|
4
|
+
import { SearchIcon } from '../../../../images/componentsSvg/SearchIcon';
|
|
5
|
+
import { useWindowSize } from '../../../hooks/useWindowSize';
|
|
6
|
+
import { SearchBarStyled } from './SearchBar.styled';
|
|
7
|
+
export const SearchBar = ({ products, searchBarTexts, routes, handleResultClick }) => {
|
|
8
|
+
const [results, setResults] = useState([]);
|
|
9
|
+
const windowSize = useWindowSize();
|
|
10
|
+
const _placeholder = windowSize.width === null || windowSize.width >= 720 ? '' : searchBarTexts.placeholder;
|
|
11
|
+
const searchFunction = (text) => {
|
|
12
|
+
const searchTerm = text.toLowerCase();
|
|
13
|
+
const productsFiltered = products.filter((item) => item.linkText.toLowerCase().includes(searchTerm));
|
|
14
|
+
const results = productsFiltered
|
|
15
|
+
.map((item) => {
|
|
16
|
+
const product = item.linkText;
|
|
17
|
+
const preMatch = product.slice(0, product.toLowerCase().indexOf(searchTerm));
|
|
18
|
+
const match = product.slice(product.toLowerCase().indexOf(searchTerm), preMatch.length + searchTerm.length);
|
|
19
|
+
const postMatch = product.slice(product.toLowerCase().indexOf(searchTerm) + searchTerm.length, product.length);
|
|
20
|
+
const link = item.categoryUrl ? `${item.categoryUrl}/${item.slug}` : item.slug;
|
|
21
|
+
return (_jsx("li", { className: 'dropdown_input__item', children: _jsxs("a", { href: routes.CUSTOM_URL_FROM_TARGET_ADDRESS(link), className: 'dropdown_input__link', onClick: (e) => {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
handleResultClick(product, routes.CUSTOM_URL_FROM_TARGET_ADDRESS(link));
|
|
24
|
+
}, title: product, children: [preMatch, _jsx("strong", { className: 'dropdown_input__link__emphasis', children: match }), postMatch] }, item.linkText) }, searchBarTexts.title));
|
|
25
|
+
})
|
|
26
|
+
.slice(0, 9);
|
|
27
|
+
results.push(_jsx("li", { className: 'dropdown_input__item', children: _jsx("a", { className: 'dropdown_input__link--all', title: searchBarTexts.title, href: routes.LEGAL_DOCUMENTS, children: searchBarTexts.title }) }, searchBarTexts.title));
|
|
28
|
+
setResults(results);
|
|
29
|
+
};
|
|
30
|
+
return (_jsx(SearchBarStyled, { children: _jsx(DropdownInput, { name: 'search', className: 'search', placeholder: _placeholder, icon: _jsx(SearchIcon, {}), onChange: (text) => {
|
|
31
|
+
searchFunction(text);
|
|
32
|
+
}, results: results }) }));
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SearchBarStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const SearchBarStyled = styled.div `
|
|
4
|
+
.dropdown_input {
|
|
5
|
+
.search {
|
|
6
|
+
width: calc(100% - 3rem);
|
|
7
|
+
margin: 0 1.5rem;
|
|
8
|
+
|
|
9
|
+
@media ${device['landscape-tablets']} {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media ${device['landscape-tablets']} {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 10rem;
|
|
16
|
+
margin: 0 1.5rem 0 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media ${device['desktop']} {
|
|
20
|
+
width: 14rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dropdown_input__results {
|
|
24
|
+
transition: all 0.25s;
|
|
25
|
+
min-width: 100%;
|
|
26
|
+
width: max-content;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dropdown_input__link {
|
|
30
|
+
color: var(--neutral-neutral-3);
|
|
31
|
+
animation: newLine 0.5s;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
color: var(--others-black);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__emphasis {
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: normal;
|
|
40
|
+
color: var(--others-black);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--all {
|
|
44
|
+
font-weight: bold;
|
|
45
|
+
animation: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes newLine {
|
|
52
|
+
0% {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
line-height: 0rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
100% {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
line-height: 1.5rem;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints'
|
|
2
|
+
import styled from 'styled-components'
|
|
3
|
+
|
|
4
|
+
export const SearchBarStyled = styled.div`
|
|
5
|
+
.dropdown_input {
|
|
6
|
+
.search {
|
|
7
|
+
width: calc(100% - 3rem);
|
|
8
|
+
margin: 0 1.5rem;
|
|
9
|
+
|
|
10
|
+
@media ${device['landscape-tablets']} {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media ${device['landscape-tablets']} {
|
|
15
|
+
display: block;
|
|
16
|
+
width: 10rem;
|
|
17
|
+
margin: 0 1.5rem 0 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@media ${device['desktop']} {
|
|
21
|
+
width: 14rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dropdown_input__results {
|
|
25
|
+
transition: all 0.25s;
|
|
26
|
+
min-width: 100%;
|
|
27
|
+
width: max-content;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dropdown_input__link {
|
|
31
|
+
color: var(--neutral-neutral-3);
|
|
32
|
+
animation: newLine 0.5s;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
color: var(--others-black);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__emphasis {
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: normal;
|
|
41
|
+
color: var(--others-black);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--all {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
animation: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes newLine {
|
|
53
|
+
0% {
|
|
54
|
+
opacity: 0;
|
|
55
|
+
line-height: 0rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
100% {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
line-height: 1.5rem;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { DropdownInput } from '../../atoms/DropdownInput/DropdownInput'
|
|
4
|
+
import { SearchIcon } from '../../../../images/componentsSvg/SearchIcon'
|
|
5
|
+
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
6
|
+
|
|
7
|
+
import { type SearchBarProps } from './SearchBarProps.types'
|
|
8
|
+
import { SearchBarStyled } from './SearchBar.styled'
|
|
9
|
+
|
|
10
|
+
export const SearchBar: React.FC<SearchBarProps> = ({ products, searchBarTexts, routes, handleResultClick }) => {
|
|
11
|
+
const [results, setResults] = useState<React.JSX.Element[]>([])
|
|
12
|
+
|
|
13
|
+
const windowSize = useWindowSize()
|
|
14
|
+
const _placeholder = windowSize.width === null || windowSize.width >= 720 ? '' : searchBarTexts.placeholder
|
|
15
|
+
const searchFunction = (text: string): void => {
|
|
16
|
+
const searchTerm = text.toLowerCase()
|
|
17
|
+
|
|
18
|
+
const productsFiltered = products.filter((item) => item.linkText.toLowerCase().includes(searchTerm))
|
|
19
|
+
const results = productsFiltered
|
|
20
|
+
.map((item) => {
|
|
21
|
+
const product = item.linkText
|
|
22
|
+
const preMatch = product.slice(0, product.toLowerCase().indexOf(searchTerm))
|
|
23
|
+
const match = product.slice(product.toLowerCase().indexOf(searchTerm), preMatch.length + searchTerm.length)
|
|
24
|
+
const postMatch = product.slice(product.toLowerCase().indexOf(searchTerm) + searchTerm.length, product.length)
|
|
25
|
+
const link = item.categoryUrl ? `${item.categoryUrl}/${item.slug}` : item.slug
|
|
26
|
+
return (
|
|
27
|
+
<li key={searchBarTexts.title} className='dropdown_input__item'>
|
|
28
|
+
<a
|
|
29
|
+
href={routes.CUSTOM_URL_FROM_TARGET_ADDRESS(link)}
|
|
30
|
+
className='dropdown_input__link'
|
|
31
|
+
key={item.linkText}
|
|
32
|
+
onClick={(e) => {
|
|
33
|
+
e.preventDefault()
|
|
34
|
+
handleResultClick(product, routes.CUSTOM_URL_FROM_TARGET_ADDRESS(link))
|
|
35
|
+
}}
|
|
36
|
+
title={product}
|
|
37
|
+
>
|
|
38
|
+
{preMatch}
|
|
39
|
+
<strong className='dropdown_input__link__emphasis'>{match}</strong>
|
|
40
|
+
{postMatch}
|
|
41
|
+
</a>
|
|
42
|
+
</li>
|
|
43
|
+
)
|
|
44
|
+
})
|
|
45
|
+
.slice(0, 9)
|
|
46
|
+
|
|
47
|
+
results.push(
|
|
48
|
+
<li key={searchBarTexts.title} className='dropdown_input__item'>
|
|
49
|
+
<a className='dropdown_input__link--all' title={searchBarTexts.title} href={routes.LEGAL_DOCUMENTS}>
|
|
50
|
+
{searchBarTexts.title}
|
|
51
|
+
</a>
|
|
52
|
+
</li>
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
setResults(results)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<SearchBarStyled>
|
|
60
|
+
<DropdownInput
|
|
61
|
+
name='search'
|
|
62
|
+
className='search'
|
|
63
|
+
placeholder={_placeholder}
|
|
64
|
+
icon={<SearchIcon />}
|
|
65
|
+
onChange={(text: string) => {
|
|
66
|
+
searchFunction(text)
|
|
67
|
+
}}
|
|
68
|
+
results={results}
|
|
69
|
+
/>
|
|
70
|
+
</SearchBarStyled>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface Products {
|
|
2
|
+
categoryUrl?: string;
|
|
3
|
+
isFeatured?: boolean;
|
|
4
|
+
popularOrder: number;
|
|
5
|
+
jumboTitle: string;
|
|
6
|
+
linkText: string;
|
|
7
|
+
slug: string;
|
|
8
|
+
footerPopularDocument?: boolean;
|
|
9
|
+
logoImgBig?: string;
|
|
10
|
+
logoImgSmall?: string;
|
|
11
|
+
categoryProduct?: {
|
|
12
|
+
name: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface StrapiSearchBar {
|
|
17
|
+
title: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Routes {
|
|
21
|
+
CUSTOM_URL_FROM_APP_SUBDOMAIN: (url: string) => string;
|
|
22
|
+
CUSTOM_URL_FROM_TARGET_ADDRESS: (url: string) => string;
|
|
23
|
+
LEGAL_DOCUMENTS: string;
|
|
24
|
+
LEGAL_DOCUMENTS_WITH_HASH: (category: string) => string;
|
|
25
|
+
LEGAL_DOCUMENTS_WITH_CATEGORY: (category: string) => string;
|
|
26
|
+
LOGIN: string;
|
|
27
|
+
MY_DOCUMENTS: string;
|
|
28
|
+
REGISTER: string;
|
|
29
|
+
RATAFIA_LOGIN: string;
|
|
30
|
+
SIGN_EDITOR: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SearchBarProps {
|
|
33
|
+
products: Products[];
|
|
34
|
+
searchBarTexts: StrapiSearchBar;
|
|
35
|
+
routes: Routes;
|
|
36
|
+
handleResultClick: (product: string, link: string) => void;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|