@ubnt/store.core 10.15.0-alpha.3 → 10.15.0-alpha.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.
- package/CHANGELOG.md +8 -0
- package/lib/assets/ai-360.jpg +0 -0
- package/lib/assets/ai-3602.jpg +0 -0
- package/lib/assets/ai-turret.jpg +0 -0
- package/lib/assets/ai-turret2.jpg +0 -0
- package/lib/assets/close.svg +1 -3
- package/lib/assets/close2.svg +3 -1
- package/lib/assets/compact.svg +2 -2
- package/lib/assets/compact3.svg +2 -2
- package/lib/assets/g2-reader-pro.jpg +0 -0
- package/lib/assets/g2-reader-pro2.jpg +0 -0
- package/lib/assets/g3-reader-flex.jpg +0 -0
- package/lib/assets/g3-reader-flex2.jpg +0 -0
- package/lib/assets/g3-reader-pro.jpg +0 -0
- package/lib/assets/g3-reader-pro2.jpg +0 -0
- package/lib/assets/g3-starter-kit-pro.jpg +0 -0
- package/lib/assets/g3-starter-kit-pro2.jpg +0 -0
- package/lib/assets/g3-starter-kit.jpg +0 -0
- package/lib/assets/g3-starter-kit2.jpg +0 -0
- package/lib/assets/g4-ptz.jpg +0 -0
- package/lib/assets/g4-ptz2.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz2.jpg +0 -0
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/reader-lite.jpg +0 -0
- package/lib/assets/reader-lite2.jpg +0 -0
- package/lib/assets/u6-extender.jpg +0 -0
- package/lib/assets/u6-extender2.jpg +0 -0
- package/lib/assets/u6-in-wall.jpg +0 -0
- package/lib/assets/u6-in-wall2.jpg +0 -0
- package/lib/assets/u7-pro-wall.jpg +0 -0
- package/lib/assets/u7-pro-wall2.jpg +0 -0
- package/lib/assets/udr2.jpg +0 -0
- package/lib/assets/udr3.jpg +0 -0
- package/lib/components/CustomImage/CustomImage.js +1 -1
- package/lib/components/CustomImage/CustomImage.mjs +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
- package/lib/components/Header/CartModalV2/CartModal.js +1 -1
- package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.mjs +1 -1
- package/lib/components/Header/Header.styles.js +33 -27
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +1 -1
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.js +4 -4
- package/lib/components/Header/MobileLinksModal/MobileMenu.js.map +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.mjs +2 -2
- package/lib/components/Header/MobileLinksModal/MobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js +23 -17
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +32 -26
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.d.ts +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.js +2 -0
- package/lib/components/MicrositeHeader/MicrositeHeader.js.map +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.mjs +2 -0
- package/lib/components/MicrositeHeader/MicrositeHeader.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.d.ts +0 -6
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +7 -16
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +5 -11
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.d.ts +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js +8 -8
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.types.d.ts +6 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.types.js +14 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.types.js.map +1 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.types.mjs +11 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.types.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.d.ts +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/index.js +0 -3
- package/lib/components/MicrositeHeader/components/HeaderContent/index.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/index.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/MobileModal/MobileModal.styles.js +12 -6
- package/lib/components/MobileModal/MobileModal.styles.js.map +1 -1
- package/lib/components/MobileModal/MobileModal.styles.mjs +1 -1
- package/lib/components/MobileModal/MobileModal.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.js +1 -1
- package/lib/components/Search/Input/Input.mjs +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/icons/generic/close.svg.js +1 -1
- package/lib/constants/icons/generic/close.svg.mjs +2 -2
- package/lib/constants/icons/generic/index.js +1 -1
- package/lib/constants/icons/generic/index.mjs +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/reader-lite.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/reader-lite.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Wall/u6-extender.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Wall/u6-extender.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Wall/u6-in-wall.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Wall/u6-in-wall.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Wall/u7-pro-wall.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Wall/u7-pro-wall.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/compact.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/compact.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/reader-lite.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/reader-lite.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/compact.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/compact.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-extender.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-extender.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-in-wall.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-in-wall.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u7-pro-wall.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u7-pro-wall.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +1 -1
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Compact.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Compact.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/compact.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/compact.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
- package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiTurret.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiTurret.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/readerLite.js +2 -2
- package/lib/constants/modelCompareData/data/products/readerLite.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/u6Extender.js +2 -2
- package/lib/constants/modelCompareData/data/products/u6Extender.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/u6InWall.js +2 -2
- package/lib/constants/modelCompareData/data/products/u6InWall.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/u7ProWall.js +2 -2
- package/lib/constants/modelCompareData/data/products/u7ProWall.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/udr.js +2 -2
- package/lib/constants/modelCompareData/data/products/udr.mjs +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.mjs","sources":["../../../src/components/Header/Header.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { css, styled } from \"styled-components\";\n\nimport { BREAKPOINTS, CUSTOM_WIDTH } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { ModalId } from \"../../contexts/MenuContext/types\";\nimport { Button } from \"../Button\";\nimport { Container as ContainerBase } from \"../Container\";\nimport { WrapPadding } from \"../Container/Container.styles\";\nimport { SkeletonCircleLoader as SkeletonCircleLoaderBase } from \"../SkeletonLoader\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { CartIcon as CartIconBase } from \"./CartIcon\";\nimport { MenuItem } from \"./MenuItem\";\n\nexport const HEADER_HEIGHT = 48;\n\nexport const HEADER_GAP_SIZE = 20;\nexport const HEADER_GAP_SIZE_NARROW = 10;\nexport const HEADER_GAP_SIZE_SMALL = 16;\nexport const HEADER_GAP_SIZE_ICONS = 15;\n\nexport const HEADER_ICON_SIZE = 20;\nexport const HEADER_ACCOUNT_ICON_SIZE = 24;\n\nexport const HEADER_BUTTON_SIZE = 32;\n\n// #############################################################################\n// Mixins\n// #############################################################################\nexport const cssStickyEmbedHeader = css`\n left: 0;\n position: sticky;\n padding-top: env(safe-area-inset-top);\n right: 0;\n top: 0;\n z-index: ${theme.zIndex.header};\n\n backdrop-filter: blur(4px);\n background-color: rgba(255 255 255 / 0.9);\n`;\n\n// #############################################################################\n// Components\n// #############################################################################\n\nexport const Container = styled(ContainerBase)`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n padding: 0;\n }\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n`;\n\nexport const SvgIcon = styled(StyleableSvgImage)``;\n\nexport const CartIcon = styled(CartIconBase)``;\n\nexport const IconWrap = styled.div<{\n $motif: Motif;\n $hideOnMobile?: boolean;\n $hideOnDesktop?: boolean;\n}>`\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: ${HEADER_BUTTON_SIZE}px;\n width: ${HEADER_BUTTON_SIZE}px;\n cursor: pointer;\n\n /* Enforce svg color, disabling hover color change */\n ${SvgIcon},\n ${CartIcon} {\n color: ${({ $motif }) => theme.colors.menu.text[$motif]};\n }\n\n &:hover {\n color: ${({ $motif }) => theme.colors.menu.active[$motif]};\n }\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ $hideOnDesktop }) =>\n $hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\nexport const IconsWrap = styled.div`\n display: flex;\n align-items: center;\n margin-left: -6px;\n margin-right: -5px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n margin-right: ${HEADER_GAP_SIZE_SMALL - 6}px;\n }\n`;\n\nexport const MenuItemWrap = styled.div<{\n $narrow?: boolean;\n $hideOnMobile?: boolean;\n}>`\n display: flex;\n flex-direction: row;\n height: ${HEADER_HEIGHT}px;\n gap: ${({ $narrow }) =>\n $narrow ? HEADER_GAP_SIZE_NARROW : HEADER_GAP_SIZE}px;\n margin-left: ${HEADER_GAP_SIZE}px;\n\n /* HACK hardcoded breakpoint based on actual item widths and spacings */\n @media (max-width: ${CUSTOM_WIDTH.TOP_NAV_DESKTOP_COMPACT}px) {\n gap: ${HEADER_GAP_SIZE_SMALL}px;\n margin-left: ${HEADER_GAP_SIZE_SMALL}px;\n }\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n`;\n\nexport const MenuItemLabel = styled.div`\n display: flex;\n align-items: center;\n gap: 4px;\n`;\n\ntype LogoIconWrapProps = {\n $motif: Motif;\n $burger?: boolean;\n};\nexport const LogoIconWrap = styled.div<LogoIconWrapProps>`\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: ${HEADER_HEIGHT}px;\n color: ${({ $motif }) => theme.colors.menu.text[$motif]};\n\n ${({ $burger }) =>\n $burger &&\n css`\n margin: 0 ${HEADER_GAP_SIZE_SMALL}px;\n `}\n`;\n\nexport const SiteTitleWrap = styled.div`\n align-items: center;\n color: #212327;\n display: flex;\n font-size: 20px;\n font-weight: 700;\n height: ${HEADER_HEIGHT}px;\n line-height: 28px;\n white-space: nowrap;\n`;\n\nexport const ContinueShoppingButton = styled(Button)<{\n $motif: Motif;\n}>`\n height: ${HEADER_HEIGHT}px;\n color: #50565e;\n font-size: 12px;\n line-height: ${16 / 12};\n padding: 8px 4px;\n\n /* Check for hover capability to prevent wrong UI styles of category tabs https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover */\n @media (hover: hover) {\n &:hover {\n color: ${({ $motif }) => theme.colors.menu.active[$motif]};\n }\n }\n`;\n\nexport const BackIconWrap = styled.div`\n margin-right: 4px;\n`;\n\nexport const MenuItemsWrap = styled.div`\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: space-between;\n\n /* Not sure why is the overflow hidden here. In one of the storybook cases it caused clipping. */\n /* overflow: hidden; */\n`;\n\nexport const LeftWrap = styled.div<{ $static?: boolean }>`\n display: flex;\n flex-grow: 1;\n flex-direction: row;\n align-items: center;\n\n ${({ $static }) =>\n !$static &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n }\n `}\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n z-index: ${theme.zIndex.header - 1};\n\n ${WrapPadding} {\n position: relative;\n }\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n $pro?: boolean;\n $isLeft?: boolean;\n}>`\n position: absolute;\n top: 10px;\n z-index: ${theme.zIndex.modal};\n\n ${({ $modal, $pro, $isLeft }) => {\n switch ($modal) {\n case ModalId.Support:\n return css`\n right: 106px;\n `;\n\n case ModalId.Cart:\n case ModalId.Account:\n return css`\n ${$isLeft ? \"left\" : \"right\"}: ${$pro ? 0 : 32}px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${$isLeft ? \"left\" : \"right\"}: 10px;\n }\n `;\n\n default:\n return;\n }\n }}\n`;\n\nexport const InnerLeftWrap = styled.div<{ $center: boolean }>`\n display: flex;\n flex: 1;\n justify-content: ${({ $center }) => ($center ? \"center\" : \"unset\")};\n`;\n\nexport const LinkItem = styled(MenuItem)`\n margin: 0 6px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const SearchTabWrap = styled.div<{ hide: boolean }>`\n display: block;\n width: 100%;\n max-width: 680px;\n margin: 0 8px;\n\n /**\n * * hack: search tab hidden with opacity ad position, so search input can be referenced (searchInputRef)\n * * and focus can be triggered on the search input onClick\n * @see https://css-tricks.com/comparing-various-ways-to-hide-things-in-css/#aa-method-4-the-position-property\n */\n ${({ hide }) =>\n hide &&\n css`\n opacity: 0;\n position: absolute;\n top: -9999px;\n left: -9999px;\n `}\n`;\n\nexport const StorePickerModalWrap = styled.div`\n position: absolute;\n left: 64px;\n top: 50px;\n z-index: ${theme.zIndex.modal};\n`;\n\nexport const SkeletonCircleLoader = styled(SkeletonCircleLoaderBase)<{\n $overrideWidth?: number;\n}>`\n margin: 0;\n\n /**\n * * This overrides width that is set by diameter prop.\n * If used and is different than set diameter, the circle might not be perfectly round.\n */\n ${({ $overrideWidth }) =>\n $overrideWidth &&\n css`\n width: ${$overrideWidth}px;\n `}\n`;\n\nexport const Wrap = styled.div`\n position: relative;\n`;\n\nexport const HeaderWrap = styled.div<{\n noWrapHeight?: boolean;\n}>`\n position: relative;\n height: ${({ noWrapHeight }) => (noWrapHeight ? \"0\" : `${HEADER_HEIGHT}px`)};\n`;\n\nexport const Header = styled.header<{\n $motif: Motif;\n $sticky?: boolean;\n $transparent?: boolean;\n $stickyPadding?: string;\n}>`\n z-index: ${theme.zIndex.header};\n position: ${({ $sticky }) => ($sticky ? \"fixed\" : \"static\")};\n top: 0;\n width: ${({ $stickyPadding }) =>\n $stickyPadding ? `calc(100% - ${$stickyPadding})` : \"100%\"};\n height: ${HEADER_HEIGHT}px;\n background-color: ${({ $motif, $transparent }) =>\n $transparent\n ? theme.colors.menu.transparent[$motif]\n : theme.colors.menu.base[$motif]};\n\n backdrop-filter: ${({ $transparent }) =>\n $transparent ? \"blur(4px)\" : \"none\"};\n\n /* HACK to fix the white border glitch, quick solution */\n box-shadow: 0 0 0 1px\n ${({ $motif, $transparent }) =>\n $transparent ? \"none\" : theme.colors.menu.base[$motif]};\n`;\n\nexport const AvatarWrap = styled.div`\n align-items: center;\n border: 1px solid #006fff;\n box-shadow: none;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n margin-bottom: 0;\n outline: 1px solid #006fff;\n overflow: hidden;\n width: 24px;\n background: #ededf0;\n border-radius: 50%;\n\n img {\n height: 24px;\n min-height: 24px;\n min-width: 24px;\n width: 24px;\n object-fit: cover;\n }\n`;\n\nexport const HamburgerButton = styled(MenuItem)`\n width: 52px;\n\n &&:hover {\n background: none;\n }\n`;\n\nexport const SrContainer = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n`;\n"],"names":["HEADER_HEIGHT","HEADER_GAP_SIZE","HEADER_GAP_SIZE_NARROW","HEADER_GAP_SIZE_SMALL","HEADER_GAP_SIZE_ICONS","HEADER_ICON_SIZE","HEADER_ACCOUNT_ICON_SIZE","HEADER_BUTTON_SIZE","cssStickyEmbedHeader","css","theme","zIndex","header","Container","styled","ContainerBase","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","Anchor","a","SvgIcon","StyleableSvgImage","CartIcon","CartIconBase","IconWrap","div","$motif","colors","menu","text","active","$hideOnMobile","$hideOnDesktop","TOP_NAV_MOBILE_UP","IconsWrap","MenuItemWrap","$narrow","CUSTOM_WIDTH","TOP_NAV_DESKTOP_COMPACT","MenuItemLabel","LogoIconWrap","$burger","SiteTitleWrap","ContinueShoppingButton","Button","BackIconWrap","MenuItemsWrap","LeftWrap","$static","ModalWrap","WrapPadding","ModalInnerWrap","modal","$modal","$pro","$isLeft","ModalId","Support","Cart","Account","InnerLeftWrap","$center","LinkItem","MenuItem","SearchTabWrap","hide","StorePickerModalWrap","SkeletonCircleLoader","SkeletonCircleLoaderBase","$overrideWidth","Wrap","HeaderWrap","noWrapHeight","Header","$sticky","$stickyPadding","$transparent","transparent","base","AvatarWrap","HamburgerButton","SrContainer"],"mappings":";;;;;;;;;;;;;;;;;;AAcO,MAAMA,aAAgB,GAAA,EAAA;AAEtB,MAAMC,eAAkB,GAAA,EAAA;AACxB,MAAMC,sBAAyB,GAAA,EAAA;AAC/B,MAAMC,qBAAwB,GAAA,EAAA;AAC9B,MAAMC,q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AAAkD,IAAA,CAAKpD,MAAM,CAAC;;AAAA,qBAEjB,CAAC;EAAEkD;AAAA,CACpB,KAAAA,YAAA,GAAe,cAAc,MAAM;;AAAA;AAAA;AAAA,MAIjC,CAAC;EAAElD,MAAQ;EAAAkD;AAAA,CACX,KAAAA,YAAA,GAAe,MAAS,GAAAlE,KAAA,CAAMiB,MAAO,CAAAC,IAAA,CAAKkD,IAAK,CAAApD,MAAM,CAAC;AAAA,CAAA;AAGrD,MAAMqD,aAAajE,MAAO,CAAAW,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAwBpB,MAAAuD,eAAA,GAAkBlE,OAAOiD,QAAQ,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA,CAAA;AAQvC,MAAMkB,cAAcnE,MAAO,CAAAW,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.styles.mjs","sources":["../../../src/components/Header/Header.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS, CUSTOM_WIDTH } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { ModalId } from \"../../contexts/MenuContext/types\";\nimport { Button } from \"../Button\";\nimport { Container as ContainerBase } from \"../Container\";\nimport { WrapPadding } from \"../Container/Container.styles\";\nimport { SkeletonCircleLoader as SkeletonCircleLoaderBase } from \"../SkeletonLoader\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { CartIcon as CartIconBase } from \"./CartIcon\";\nimport { MenuItem } from \"./MenuItem\";\n\nexport const HEADER_HEIGHT = 48;\n\nexport const HEADER_GAP_SIZE = 20;\nexport const HEADER_GAP_SIZE_NARROW = 10;\nexport const HEADER_GAP_SIZE_SMALL = 16;\nexport const HEADER_GAP_SIZE_ICONS = 15;\n\nexport const HEADER_ICON_SIZE = 20;\nexport const HEADER_ACCOUNT_ICON_SIZE = 24;\n\nexport const HEADER_BUTTON_SIZE = 32;\n\n// #############################################################################\n// Mixins\n// #############################################################################\nexport const cssStickyEmbedHeader = css`\n left: 0;\n position: sticky;\n padding-top: env(safe-area-inset-top);\n right: 0;\n top: 0;\n z-index: ${theme.zIndex.header};\n\n backdrop-filter: blur(4px);\n background-color: rgba(255 255 255 / 0.9);\n`;\n\n// #############################################################################\n// Components\n// #############################################################################\n\nexport const Container = styled(ContainerBase)`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n padding: 0;\n }\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n`;\n\nexport const SvgIcon = styled(StyleableSvgImage)``;\n\nexport const CartIcon = styled(CartIconBase)``;\n\nexport const IconWrap = styled.div<{\n $motif: Motif;\n $hideOnMobile?: boolean;\n $hideOnDesktop?: boolean;\n}>`\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n height: ${HEADER_BUTTON_SIZE}px;\n width: ${HEADER_BUTTON_SIZE}px;\n cursor: pointer;\n\n /* Enforce svg color, disabling hover color change */\n ${SvgIcon},\n ${CartIcon} {\n color: ${({ $motif }) => theme.colors.menu.text[$motif]};\n }\n\n &:hover {\n color: ${({ $motif }) => theme.colors.menu.active[$motif]};\n }\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ $hideOnDesktop }) =>\n $hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\nexport const IconsWrap = styled.div`\n display: flex;\n align-items: center;\n margin-left: -6px;\n margin-right: -5px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n margin-right: ${HEADER_GAP_SIZE_SMALL - 6}px;\n }\n`;\n\nexport const MenuItemWrap = styled.div<{\n $narrow?: boolean;\n $hideOnMobile?: boolean;\n}>`\n display: flex;\n flex-direction: row;\n height: ${HEADER_HEIGHT}px;\n gap: ${({ $narrow }) =>\n $narrow ? HEADER_GAP_SIZE_NARROW : HEADER_GAP_SIZE}px;\n margin-left: ${HEADER_GAP_SIZE}px;\n\n /* HACK hardcoded breakpoint based on actual item widths and spacings */\n @media (max-width: ${CUSTOM_WIDTH.TOP_NAV_DESKTOP_COMPACT}px) {\n gap: ${HEADER_GAP_SIZE_SMALL}px;\n margin-left: ${HEADER_GAP_SIZE_SMALL}px;\n }\n\n ${({ $hideOnMobile }) =>\n $hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n`;\n\nexport const MenuItemLabel = styled.div`\n display: flex;\n align-items: center;\n gap: 4px;\n`;\n\ntype LogoIconWrapProps = {\n $motif: Motif;\n $burger?: boolean;\n};\nexport const LogoIconWrap = styled.div<LogoIconWrapProps>`\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: ${HEADER_HEIGHT}px;\n color: ${({ $motif }) => theme.colors.menu.text[$motif]};\n\n ${({ $burger }) =>\n $burger &&\n css`\n margin: 0 ${HEADER_GAP_SIZE_SMALL}px;\n `}\n`;\n\nexport const SiteTitleWrap = styled.div`\n align-items: center;\n color: #212327;\n display: flex;\n font-size: 20px;\n font-weight: 700;\n height: ${HEADER_HEIGHT}px;\n line-height: 28px;\n white-space: nowrap;\n`;\n\nexport const ContinueShoppingButton = styled(Button)<{\n $motif: Motif;\n}>`\n height: ${HEADER_HEIGHT}px;\n color: #50565e;\n font-size: 12px;\n line-height: ${16 / 12};\n padding: 8px 4px;\n\n /* Check for hover capability to prevent wrong UI styles of category tabs https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover */\n @media (hover: hover) {\n &:hover {\n color: ${({ $motif }) => theme.colors.menu.active[$motif]};\n }\n }\n`;\n\nexport const BackIconWrap = styled.div`\n margin-right: 4px;\n`;\n\nexport const MenuItemsWrap = styled.div`\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: space-between;\n\n /* Not sure why is the overflow hidden here. In one of the storybook cases it caused clipping. */\n /* overflow: hidden; */\n`;\n\nexport const LeftWrap = styled.div<{ $static?: boolean }>`\n display: flex;\n flex-grow: 1;\n flex-direction: row;\n align-items: center;\n\n ${({ $static }) =>\n !$static &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n }\n `}\n`;\n\nexport const ModalWrap = styled(Container)`\n flex: 0;\n margin: 0 auto;\n z-index: ${theme.zIndex.header - 1};\n\n ${WrapPadding} {\n position: relative;\n }\n`;\n\nexport const ModalInnerWrap = styled.div<{\n $modal: ModalId;\n $pro?: boolean;\n $isLeft?: boolean;\n}>`\n position: absolute;\n top: 10px;\n z-index: ${theme.zIndex.modal};\n\n ${({ $modal, $pro, $isLeft }) => {\n switch ($modal) {\n case ModalId.Support:\n return css`\n right: 106px;\n `;\n\n case ModalId.Cart:\n case ModalId.Account:\n return css`\n ${$isLeft ? \"left\" : \"right\"}: ${$pro ? 0 : 32}px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n ${$isLeft ? \"left\" : \"right\"}: 10px;\n }\n `;\n\n default:\n return;\n }\n }}\n`;\n\nexport const InnerLeftWrap = styled.div<{ $center: boolean }>`\n display: flex;\n flex: 1;\n justify-content: ${({ $center }) => ($center ? \"center\" : \"unset\")};\n`;\n\nexport const LinkItem = styled(MenuItem)`\n margin: 0 6px;\n\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const SearchTabWrap = styled.div<{ hide: boolean }>`\n display: block;\n width: 100%;\n max-width: 680px;\n margin: 0 8px;\n\n /**\n * * hack: search tab hidden with opacity ad position, so search input can be referenced (searchInputRef)\n * * and focus can be triggered on the search input onClick\n * @see https://css-tricks.com/comparing-various-ways-to-hide-things-in-css/#aa-method-4-the-position-property\n */\n ${({ hide }) =>\n hide &&\n css`\n opacity: 0;\n position: absolute;\n top: -9999px;\n left: -9999px;\n `}\n`;\n\nexport const StorePickerModalWrap = styled.div`\n position: absolute;\n left: 64px;\n top: 50px;\n z-index: ${theme.zIndex.modal};\n`;\n\nexport const SkeletonCircleLoader = styled(SkeletonCircleLoaderBase)<{\n $overrideWidth?: number;\n}>`\n margin: 0;\n\n /**\n * * This overrides width that is set by diameter prop.\n * If used and is different than set diameter, the circle might not be perfectly round.\n */\n ${({ $overrideWidth }) =>\n $overrideWidth &&\n css`\n width: ${$overrideWidth}px;\n `}\n`;\n\nexport const Wrap = styled.div`\n position: relative;\n`;\n\nexport const HeaderWrap = styled.div<{\n noWrapHeight?: boolean;\n}>`\n position: relative;\n height: ${({ noWrapHeight }) => (noWrapHeight ? \"0\" : `${HEADER_HEIGHT}px`)};\n`;\n\nexport const Header = styled.header<{\n $motif: Motif;\n $sticky?: boolean;\n $transparent?: boolean;\n $stickyPadding?: string;\n}>`\n z-index: ${theme.zIndex.header};\n position: ${({ $sticky }) => ($sticky ? \"fixed\" : \"static\")};\n top: 0;\n width: ${({ $stickyPadding }) =>\n $stickyPadding ? `calc(100% - ${$stickyPadding})` : \"100%\"};\n height: ${HEADER_HEIGHT}px;\n background-color: ${({ $motif, $transparent }) =>\n $transparent\n ? theme.colors.menu.transparent[$motif]\n : theme.colors.menu.base[$motif]};\n\n backdrop-filter: ${({ $transparent }) =>\n $transparent ? \"blur(4px)\" : \"none\"};\n\n /* HACK to fix the white border glitch, quick solution */\n box-shadow: 0 0 0 1px\n ${({ $motif, $transparent }) =>\n $transparent ? \"none\" : theme.colors.menu.base[$motif]};\n`;\n\nexport const AvatarWrap = styled.div`\n align-items: center;\n border: 1px solid #006fff;\n box-shadow: none;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n margin-bottom: 0;\n outline: 1px solid #006fff;\n overflow: hidden;\n width: 24px;\n background: #ededf0;\n border-radius: 50%;\n\n img {\n height: 24px;\n min-height: 24px;\n min-width: 24px;\n width: 24px;\n object-fit: cover;\n }\n`;\n\nexport const HamburgerButton = styled(MenuItem)`\n width: 52px;\n\n &&:hover {\n background: none;\n }\n`;\n\nexport const SrContainer = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n`;\n"],"names":["HEADER_HEIGHT","HEADER_GAP_SIZE","HEADER_GAP_SIZE_NARROW","HEADER_GAP_SIZE_SMALL","HEADER_GAP_SIZE_ICONS","HEADER_ICON_SIZE","HEADER_ACCOUNT_ICON_SIZE","HEADER_BUTTON_SIZE","cssStickyEmbedHeader","css","theme","zIndex","header","Container","styled","ContainerBase","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","Anchor","a","SvgIcon","StyleableSvgImage","CartIcon","CartIconBase","IconWrap","div","$motif","colors","menu","text","active","$hideOnMobile","$hideOnDesktop","TOP_NAV_MOBILE_UP","IconsWrap","MenuItemWrap","$narrow","CUSTOM_WIDTH","TOP_NAV_DESKTOP_COMPACT","MenuItemLabel","LogoIconWrap","$burger","SiteTitleWrap","ContinueShoppingButton","Button","BackIconWrap","MenuItemsWrap","LeftWrap","$static","ModalWrap","WrapPadding","ModalInnerWrap","modal","$modal","$pro","$isLeft","ModalId","Support","Cart","Account","InnerLeftWrap","$center","LinkItem","MenuItem","SearchTabWrap","hide","StorePickerModalWrap","SkeletonCircleLoader","SkeletonCircleLoaderBase","$overrideWidth","Wrap","HeaderWrap","noWrapHeight","Header","$sticky","$stickyPadding","$transparent","transparent","base","AvatarWrap","HamburgerButton","SrContainer"],"mappings":";;;;;;;;;;;;;;;;;;AAcO,MAAMA,aAAgB,GAAA,EAAA;AAEtB,MAAMC,eAAkB,G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iB,MAAA,CAAOC,IAAK,CAAAiD,WAAA,CAAYnD,MAAM,CACpC,GAAAhB,KAAA,CAAMiB,OAAOC,IAAK,CAAAkD,IAAA,CAAKpD,MAAM,CAAC;;AAAA,qBAEjB,CAAC;EAAEkD;AAAA,CACpB,KAAAA,YAAA,GAAe,cAAc,MAAM;;AAAA;AAAA;AAAA,MAIjC,CAAC;EAAElD,MAAQ;EAAAkD;AAAA,CACX,KAAAA,YAAA,GAAe,MAAS,GAAAlE,KAAA,CAAMiB,MAAO,CAAAC,IAAA,CAAKkD,IAAK,CAAApD,MAAM,CAAC;AAAA,CAAA;AAGrD,MAAMqD,aAAajE,MAAO,CAAAW,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAwBpB,MAAAuD,eAAA,GAAkBlE,OAAOiD,QAAQ,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA,CAAA;AAQvC,MAAMkB,cAAcnE,MAAO,CAAAW,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -5,11 +5,9 @@ var React = require('react');
|
|
|
5
5
|
require('../../../constants/icons/index.js');
|
|
6
6
|
require('../../../contexts/MicrositeMenuContext/index.js');
|
|
7
7
|
var translations = require('../../../contexts/MicrositeMenuContext/translations.js');
|
|
8
|
-
require('../../MicrositeHeader/components/HeaderContent/index.js');
|
|
9
8
|
require('../../StyleableSvgImage/index.js');
|
|
10
9
|
var MobileMenu_styles = require('./MobileMenu.styles.js');
|
|
11
10
|
var context = require('../../../contexts/MicrositeMenuContext/context.js');
|
|
12
|
-
var HeaderContent = require('../../MicrositeHeader/components/HeaderContent/HeaderContent.js');
|
|
13
11
|
var StyleableSvgImage = require('../../StyleableSvgImage/StyleableSvgImage.js');
|
|
14
12
|
var _externalAssets_BAXELvSy = require("../../../assets/collapseArrow.svg");
|
|
15
13
|
function _interopDefault(e) {
|
|
@@ -19,6 +17,8 @@ function _interopDefault(e) {
|
|
|
19
17
|
}
|
|
20
18
|
var _externalAssets_BAXELvSy__default = /*#__PURE__*/_interopDefault(_externalAssets_BAXELvSy);
|
|
21
19
|
"use strict";
|
|
20
|
+
const DROPDOWN_KEY = "dropdown";
|
|
21
|
+
const LIGHT_KEY = "light";
|
|
22
22
|
const MobileLinksModal = ({
|
|
23
23
|
menu,
|
|
24
24
|
onMenuItemClick,
|
|
@@ -30,7 +30,7 @@ const MobileLinksModal = ({
|
|
|
30
30
|
const {
|
|
31
31
|
formatMessage
|
|
32
32
|
} = translations.useMicrositeMenuTranslations(language);
|
|
33
|
-
const motif =
|
|
33
|
+
const motif = LIGHT_KEY;
|
|
34
34
|
const [expandedSectionItemId, setExpandedSectionItemId] = React.useState(null);
|
|
35
35
|
const toggleExpandedSectionItemId = React.useCallback(itemId => {
|
|
36
36
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
@@ -53,7 +53,7 @@ const MobileLinksModal = ({
|
|
|
53
53
|
children: menu.items?.map(item => /* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItemsGroup, {
|
|
54
54
|
motif,
|
|
55
55
|
$active: item.id === expandedSectionItemId,
|
|
56
|
-
$isDropdownSection: item.variant ===
|
|
56
|
+
$isDropdownSection: item.variant === DROPDOWN_KEY,
|
|
57
57
|
children: [/* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItem, {
|
|
58
58
|
motif,
|
|
59
59
|
onClick: event => handleItemClick(event, item),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.js","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport {
|
|
1
|
+
{"version":3,"file":"MobileMenu.js","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\n\nconst DROPDOWN_KEY = \"dropdown\";\nconst LIGHT_KEY = \"light\";\n\nexport interface MobileLinksProps {\n menu: Pick<ParsedMicrositeHeaderItem, \"label\" | \"url\" | \"items\">;\n onMenuItemClick: (e: React.MouseEvent<HTMLElement>, url: string) => void;\n onModalClose: () => void;\n}\n\nexport const MobileLinksModal = ({\n menu,\n onMenuItemClick,\n onModalClose,\n}: MobileLinksProps) => {\n const { language } = useMicrositeMenu();\n const { formatMessage } = useMicrositeMenuTranslations(language);\n\n const motif: Motif = LIGHT_KEY;\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n\n const handleItemClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n item?: ParsedMicrositeHeaderItem,\n ) => {\n if (item?.items?.length) {\n event.stopPropagation();\n toggleExpandedSectionItemId(item.id);\n } else if (item?.url) {\n onMenuItemClick(event, item.url);\n onModalClose();\n }\n };\n\n return (\n <S.Wrap>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n <S.Section>\n {menu.items?.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE A bit hacky to separate the first section from product sections\n $isDropdownSection={item.variant === DROPDOWN_KEY}\n >\n <S.SectionItem\n motif={motif}\n onClick={(event) => handleItemClick(event, item)}\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {formatMessage(item.label)}\n </S.SectionItemLabel>\n\n {item?.items && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n $active={item.id === expandedSectionItemId}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item?.items?.map((subItem) => (\n <S.SectionItem\n key={subItem.id}\n motif=\"dark\"\n $secondary\n onClick={(event) => handleItemClick(event, subItem)}\n >\n <S.SectionItemLabel motif={motif}>\n {formatMessage(subItem.label)}\n {subItem.isNew && (\n <S.Badge>\n {formatMessage(\"commons.menu.label.new\")}\n </S.Badge>\n )}\n </S.SectionItemLabel>\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["DROPDOWN_KEY","LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","handleItemClick","event","item","items","length","stopPropagation","id","url","jsx","S.Wrap","children","S.Container","size","noVerticalMargin","S.InnerWrap","S.Section","map","jsxs","S.SectionItemsGroup","SectionItemsGroup","$active","$isDropdownSection","variant","S.SectionItem","SectionItem","onClick","S.SectionItemLabel","SectionItemLabel","label","S.SectionItemArrowButton","SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,MAAMA,YAAe,GAAA,UAAA;AACrB,MAAMC,SAAY,GAAA,OAAA;AAQX,MAAMC,mBAAmBA,CAAC;EAC/BC,IAAA;EACAC,eAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAA;IAAEC;EAAS,CAAA,GAAIC,wBAAiB,CAAA,CAAA;EACtC,MAAM;IAAEC;EAAA,CAAkB,GAAAC,YAAA,CAAAA,4BAAA,CAA6BH,QAAQ,CAAA;EAE/D,MAAMI,KAAe,GAAAT,SAAA;EAKrB,MAAM,CAACU,qBAAA,EAAuBC,wBAAwB,CAAA,GAAIC,KAAAA,CAAAA,SAExD,IAAI,CAAA;EAEN,MAAMC,2BAA8B,GAAAC,KAAA,CAAAA,WAAA,CACjCC,MAAmB,IAAA;IAClBJ,wBAAA,CACED,qBAAA,KAA0BK,SAAS,IAAO,GAAAA,MAC5C,CAAA;EACF,CAAA,EACA,CAACL,qBAAqB,CACxB,CAAA;EAMM,MAAAM,eAAA,GAAkBA,CACtBC,KAAA,EACAC,IACG,KAAA;IACC,IAAAA,IAAA,EAAMC,OAAOC,MAAQ,EAAA;MACvBH,KAAA,CAAMI,eAAgB,CAAA,CAAA;MACtBR,2BAAA,CAA4BK,KAAKI,EAAE,CAAA;IAAA,CACrC,MAAA,IAAWJ,MAAMK,GAAK,EAAA;MACJpB,eAAA,CAAAc,KAAA,EAAOC,KAAKK,GAAG,CAAA;MAClBnB,YAAA,CAAA,CAAA;IAAA;EAEjB,CAAA;EAGE,OAAA,eAAAoB,cAAA,CAACC,iBAAAA,CAAAA,IAAE,EAAF;IACCC,QAAA,iBAAAF,UAAA,CAAAA,GAAA,CAAC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BACRhB,OAAA,EAASlB,KAAKI,EAAO,KAAAZ;kBAAA,CAAA;gBAEzB,CAAA;cAAA,CAAA,CAAA;YACF,CAEJ,CAAA,EAECQ,KAAKI,EAAO,KAAAZ,qBAAA,IACXQ,MAAMC,KAAO,EAAAa,GAAA,CAAKqB,OAChB,mBAAA7B,UAAA,CAAAA,GAAA,CAACe,iBAAE,CAAAC,WAAA,EAAF;cAEC/B,KAAM,EAAA,MAAA;cACN6C,UAAU,EAAA,IAAA;cACVb,OAAS,EAACxB,KAAU,IAAAD,eAAA,CAAgBC,OAAOoC,OAAO,CAAA;cAElD3B,QAAC,EAAAO,eAAAA,UAAAA,CAAAA,IAAA,CAAAS,iBAAAA,CAAAA,gBAAA,EAAA;gBAAmBjC,KACjB;gBAAAiB,QAAA,EAAA,CAAAnB,aAAA,CAAc8C,QAAQT,KAAK,CAAA,EAC3BS,OAAA,CAAQE,wBACN/B,cAAA,CAAAgC,iBAAAA,CAAAA,OAAA;kBACE9B,QAAA,EAAAnB,aAAA,CAAc,wBAAwB;gBACzC,CAAA,CAAA;cAEJ,CAAA;YAAA,CAAA,EAZK8C,OAAQ,CAAA/B,EAchB,CAAA,CAAA;UAAA,CAAA,EAlDEJ,IAAK,CAAAI,EAoDb,CAAA;SACH;MACF,CAAA;IACF,CAAA;GACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -3,14 +3,14 @@ import { useState, useCallback } from 'react';
|
|
|
3
3
|
import '../../../constants/icons/index.mjs';
|
|
4
4
|
import '../../../contexts/MicrositeMenuContext/index.mjs';
|
|
5
5
|
import { useMicrositeMenuTranslations } from '../../../contexts/MicrositeMenuContext/translations.mjs';
|
|
6
|
-
import '../../MicrositeHeader/components/HeaderContent/index.mjs';
|
|
7
6
|
import '../../StyleableSvgImage/index.mjs';
|
|
8
7
|
import { Wrap, Container, InnerWrap, Section, SectionItemsGroup, SectionItem, SectionItemLabel, SectionItemArrowButton, ButtonIcon, Badge } from './MobileMenu.styles.mjs';
|
|
9
8
|
import { useMicrositeMenu } from '../../../contexts/MicrositeMenuContext/context.mjs';
|
|
10
|
-
import { LIGHT_KEY, DROPDOWN_KEY } from '../../MicrositeHeader/components/HeaderContent/HeaderContent.mjs';
|
|
11
9
|
import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
10
|
import _externalAssets_BAXELvSy__default from "../../../assets/collapseArrow.svg";
|
|
13
11
|
"use strict";
|
|
12
|
+
const DROPDOWN_KEY = "dropdown";
|
|
13
|
+
const LIGHT_KEY = "light";
|
|
14
14
|
const MobileLinksModal = ({
|
|
15
15
|
menu,
|
|
16
16
|
onMenuItemClick,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.mjs","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport {
|
|
1
|
+
{"version":3,"file":"MobileMenu.mjs","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\n\nconst DROPDOWN_KEY = \"dropdown\";\nconst LIGHT_KEY = \"light\";\n\nexport interface MobileLinksProps {\n menu: Pick<ParsedMicrositeHeaderItem, \"label\" | \"url\" | \"items\">;\n onMenuItemClick: (e: React.MouseEvent<HTMLElement>, url: string) => void;\n onModalClose: () => void;\n}\n\nexport const MobileLinksModal = ({\n menu,\n onMenuItemClick,\n onModalClose,\n}: MobileLinksProps) => {\n const { language } = useMicrositeMenu();\n const { formatMessage } = useMicrositeMenuTranslations(language);\n\n const motif: Motif = LIGHT_KEY;\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n\n const handleItemClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n item?: ParsedMicrositeHeaderItem,\n ) => {\n if (item?.items?.length) {\n event.stopPropagation();\n toggleExpandedSectionItemId(item.id);\n } else if (item?.url) {\n onMenuItemClick(event, item.url);\n onModalClose();\n }\n };\n\n return (\n <S.Wrap>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n <S.Section>\n {menu.items?.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE A bit hacky to separate the first section from product sections\n $isDropdownSection={item.variant === DROPDOWN_KEY}\n >\n <S.SectionItem\n motif={motif}\n onClick={(event) => handleItemClick(event, item)}\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {formatMessage(item.label)}\n </S.SectionItemLabel>\n\n {item?.items && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n $active={item.id === expandedSectionItemId}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item?.items?.map((subItem) => (\n <S.SectionItem\n key={subItem.id}\n motif=\"dark\"\n $secondary\n onClick={(event) => handleItemClick(event, subItem)}\n >\n <S.SectionItemLabel motif={motif}>\n {formatMessage(subItem.label)}\n {subItem.isNew && (\n <S.Badge>\n {formatMessage(\"commons.menu.label.new\")}\n </S.Badge>\n )}\n </S.SectionItemLabel>\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["DROPDOWN_KEY","LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","handleItemClick","event","item","items","length","stopPropagation","id","url","jsx","S.Wrap","children","S.Container","size","noVerticalMargin","S.InnerWrap","S.Section","map","jsxs","S.SectionItemsGroup","$active","$isDropdownSection","variant","S.SectionItem","onClick","S.SectionItemLabel","label","S.SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge"],"mappings":";;;;;;;;;;;AAUA,MAAMA,YAAe,GAAA,UAAA;AACrB,MAAMC,SAAY,GAAA,OAAA;AAQX,MAAMC,mBAAmBA,CAAC;EAC/BC,IAAA;EACAC,eAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAA;IAAEC;EAAS,CAAA,GAAIC,gBAAiB,CAAA,CAAA;EACtC,MAAM;IAAEC;EAAA,CAAkB,GAAAC,4BAAA,CAA6BH,QAAQ,CAAA;EAE/D,MAAMI,KAAe,GAAAT,SAAA;EAKrB,MAAM,CAACU,qBAAA,EAAuBC,wBAAwB,CAAA,GAAIC,SAExD,IAAI,CAAA;EAEN,MAAMC,2BAA8B,GAAAC,WAAA,CACjCC,MAAmB,IAAA;IAClBJ,wBAAA,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CAACkB,sBAAE,EAAF;gBACCjC,KAAA;gBACA8B,OAAS,EAAAA,CAAA,KAAM1B,2BAA4B,CAAAK,IAAA,CAAKI,EAAE,CAAA;gBAElDI,QAAA,iBAAAF,GAAA,CAACmB,UAAE,EAAF;kBACCjB,QAAA,EAAA,eAAAF,GAAA,CAACoB,iBAAA,EAAA;oBACCC,GAAA,EAAKC,iCAAc;oBACnBC,KAAO,EAAA,EAAA;oBACPC,MAAQ,EAAA,CAAA;oBACRb,OAAA,EAASjB,KAAKI,EAAO,KAAAZ;kBAAA,CAAA;gBAEzB,CAAA;cAAA,CAAA,CAAA;YACF,CAEJ,CAAA,EAECQ,KAAKI,EAAO,KAAAZ,qBAAA,IACXQ,MAAMC,KAAO,EAAAa,GAAA,CAAKiB,OAChB,mBAAAzB,GAAA,CAACc,WAAE,EAAF;cAEC7B,KAAM,EAAA,MAAA;cACNyC,UAAU,EAAA,IAAA;cACVX,OAAS,EAACtB,KAAU,IAAAD,eAAA,CAAgBC,OAAOgC,OAAO,CAAA;cAElDvB,QAAC,EAAA,eAAAO,IAAA,CAAAO,gBAAA,EAAA;gBAAmB/B,KACjB;gBAAAiB,QAAA,EAAA,CAAAnB,aAAA,CAAc0C,QAAQR,KAAK,CAAA,EAC3BQ,OAAA,CAAQE,wBACN3B,GAAA,CAAA4B,OAAA;kBACE1B,QAAA,EAAAnB,aAAA,CAAc,wBAAwB;gBACzC,CAAA,CAAA;cAEJ,CAAA;YAAA,CAAA,EAZK0C,OAAQ,CAAA3B,EAchB,CAAA,CAAA;UAAA,CAAA,EAlDEJ,IAAK,CAAAI,EAoDb,CAAA;SACH;MACF,CAAA;IACF,CAAA;GACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -5,6 +5,12 @@ var theme = require('../../../../constants/theme.js');
|
|
|
5
5
|
require('../../../Container/index.js');
|
|
6
6
|
var Header_styles = require('../../Header.styles.js');
|
|
7
7
|
var Container$1 = require('../../../Container/Container.js');
|
|
8
|
+
function _interopDefault(e) {
|
|
9
|
+
return e && e.__esModule ? e : {
|
|
10
|
+
default: e
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
8
14
|
"use strict";
|
|
9
15
|
const SECTION_ITEM_HEIGHT = 46;
|
|
10
16
|
const SECTION_SEARCH_RESULTS_ITEM_HEIGHT = 76;
|
|
@@ -13,7 +19,7 @@ const SECTION_ITEM_IMAGE_MARGIN = 10;
|
|
|
13
19
|
const IOS_GHOST_MENU_HEIGHT = 69;
|
|
14
20
|
const CONTAINER_WIDTH = 500;
|
|
15
21
|
const CONTAINER_SIDE_PADDING = 10;
|
|
16
|
-
const Container =
|
|
22
|
+
const Container = styled__default["default"](Container$1.Container)`
|
|
17
23
|
max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;
|
|
18
24
|
padding: 0 ${CONTAINER_SIDE_PADDING}px ${IOS_GHOST_MENU_HEIGHT}px;
|
|
19
25
|
`;
|
|
@@ -27,14 +33,14 @@ const resetButton = styled.css`
|
|
|
27
33
|
display: flex;
|
|
28
34
|
align-items: center;
|
|
29
35
|
`;
|
|
30
|
-
const SearchTextDot =
|
|
36
|
+
const SearchTextDot = styled__default["default"].div`
|
|
31
37
|
margin: 0 10px;
|
|
32
38
|
width: 2px;
|
|
33
39
|
height: 2px;
|
|
34
40
|
border-radius: 50%;
|
|
35
41
|
background: ${theme.theme.colors.menu.textAccent.dark};
|
|
36
42
|
`;
|
|
37
|
-
const Wrap =
|
|
43
|
+
const Wrap = styled__default["default"].div`
|
|
38
44
|
position: fixed;
|
|
39
45
|
top: calc(${Header_styles.HEADER_HEIGHT}px + env(safe-area-inset-top));
|
|
40
46
|
height: calc(100vh - ${Header_styles.HEADER_HEIGHT}px - env(safe-area-inset-top));
|
|
@@ -48,17 +54,17 @@ const Wrap = styled.styled.div`
|
|
|
48
54
|
overflow: auto;
|
|
49
55
|
padding: 20px 0 30px;
|
|
50
56
|
`;
|
|
51
|
-
const NewLabel =
|
|
57
|
+
const NewLabel = styled__default["default"].span`
|
|
52
58
|
color: ${theme.theme.colors.primaryBlue};
|
|
53
59
|
font-size: ${theme.theme.font.size10};
|
|
54
60
|
line-height: 1;
|
|
55
61
|
margin-left: 10px;
|
|
56
62
|
`;
|
|
57
|
-
const ButtonIcon =
|
|
63
|
+
const ButtonIcon = styled__default["default"].div`
|
|
58
64
|
cursor: pointer;
|
|
59
65
|
display: flex;
|
|
60
66
|
`;
|
|
61
|
-
const SectionItemArrowButton =
|
|
67
|
+
const SectionItemArrowButton = styled__default["default"].button`
|
|
62
68
|
${resetButton};
|
|
63
69
|
|
|
64
70
|
height: 100%;
|
|
@@ -74,13 +80,13 @@ const SectionItemArrowButton = styled.styled.button`
|
|
|
74
80
|
opacity: 0.85;
|
|
75
81
|
}
|
|
76
82
|
`;
|
|
77
|
-
const SectionItemImageWrap =
|
|
83
|
+
const SectionItemImageWrap = styled__default["default"].div`
|
|
78
84
|
width: ${SECTION_ITEM_IMAGE_SIZE}px;
|
|
79
85
|
height: ${SECTION_ITEM_IMAGE_SIZE}px;
|
|
80
86
|
margin-right: 20px;
|
|
81
87
|
flex-shrink: 0;
|
|
82
88
|
`;
|
|
83
|
-
const SectionItemButton =
|
|
89
|
+
const SectionItemButton = styled__default["default"].button`
|
|
84
90
|
${resetButton}
|
|
85
91
|
|
|
86
92
|
flex-grow: 1;
|
|
@@ -114,7 +120,7 @@ const SectionItemButton = styled.styled.button`
|
|
|
114
120
|
opacity: 0.85;
|
|
115
121
|
}
|
|
116
122
|
`;
|
|
117
|
-
const SectionItem =
|
|
123
|
+
const SectionItem = styled__default["default"].div`
|
|
118
124
|
display: flex;
|
|
119
125
|
color: ${({
|
|
120
126
|
$motif
|
|
@@ -133,10 +139,10 @@ const SectionItem = styled.styled.div`
|
|
|
133
139
|
}
|
|
134
140
|
`}
|
|
135
141
|
`;
|
|
136
|
-
const SectionSearchResultsItem =
|
|
142
|
+
const SectionSearchResultsItem = styled__default["default"](SectionItem)`
|
|
137
143
|
height: ${SECTION_SEARCH_RESULTS_ITEM_HEIGHT}px;
|
|
138
144
|
`;
|
|
139
|
-
const SectionItemsGroup =
|
|
145
|
+
const SectionItemsGroup = styled__default["default"].div`
|
|
140
146
|
display: flex;
|
|
141
147
|
flex-direction: column;
|
|
142
148
|
gap: 1px;
|
|
@@ -155,7 +161,7 @@ const SectionItemsGroup = styled.styled.div`
|
|
|
155
161
|
}
|
|
156
162
|
`}
|
|
157
163
|
`;
|
|
158
|
-
const Section =
|
|
164
|
+
const Section = styled__default["default"].div`
|
|
159
165
|
border-radius: 6px;
|
|
160
166
|
background: ${({
|
|
161
167
|
$motif
|
|
@@ -166,17 +172,17 @@ const Section = styled.styled.div`
|
|
|
166
172
|
flex-direction: column;
|
|
167
173
|
gap: 1px;
|
|
168
174
|
`;
|
|
169
|
-
const SearchSection =
|
|
175
|
+
const SearchSection = styled__default["default"](Section)`
|
|
170
176
|
background: ${({
|
|
171
177
|
$motif
|
|
172
178
|
}) => theme.theme.colors.menu.mobileMenu[$motif]};
|
|
173
179
|
`;
|
|
174
|
-
const InnerWrap =
|
|
180
|
+
const InnerWrap = styled__default["default"].div`
|
|
175
181
|
display: flex;
|
|
176
182
|
flex-direction: column;
|
|
177
183
|
gap: 14px;
|
|
178
184
|
`;
|
|
179
|
-
const SearchText =
|
|
185
|
+
const SearchText = styled__default["default"].div`
|
|
180
186
|
display: flex;
|
|
181
187
|
font-size: ${theme.theme.font.size13};
|
|
182
188
|
line-height: 1;
|
|
@@ -186,7 +192,7 @@ const SearchText = styled.styled.div`
|
|
|
186
192
|
white-space: nowrap;
|
|
187
193
|
text-overflow: ellipsis;
|
|
188
194
|
`;
|
|
189
|
-
const SearchTextWrap =
|
|
195
|
+
const SearchTextWrap = styled__default["default"].div`
|
|
190
196
|
overflow: hidden;
|
|
191
197
|
height: 100%;
|
|
192
198
|
display: flex;
|
|
@@ -194,7 +200,7 @@ const SearchTextWrap = styled.styled.div`
|
|
|
194
200
|
justify-content: center;
|
|
195
201
|
gap: 6px;
|
|
196
202
|
`;
|
|
197
|
-
const SearchNoResultsText =
|
|
203
|
+
const SearchNoResultsText = styled__default["default"].div`
|
|
198
204
|
color: ${({
|
|
199
205
|
$motif
|
|
200
206
|
}) => theme.theme.colors.menu.textAccent[$motif]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/MobileMenu/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { css
|
|
1
|
+
{"version":3,"file":"MobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/MobileMenu/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Container as ContainerBase } from \"../../../Container\";\nimport { HEADER_HEIGHT } from \"../../Header.styles\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_SEARCH_RESULTS_ITEM_HEIGHT = 76;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\nexport const SECTION_ITEM_IMAGE_MARGIN = 10;\nexport const IOS_GHOST_MENU_HEIGHT = 69;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0 ${CONTAINER_SIDE_PADDING}px ${IOS_GHOST_MENU_HEIGHT}px;\n`;\n\nconst resetButton = css`\n cursor: pointer;\n outline: none;\n border: none;\n background: inherit;\n font-size: inherit;\n color: inherit;\n display: flex;\n align-items: center;\n`;\n\nexport const SearchTextDot = styled.div`\n margin: 0 10px;\n width: 2px;\n height: 2px;\n border-radius: 50%;\n background: ${theme.colors.menu.textAccent.dark};\n`;\n\nexport const Wrap = styled.div<{ $motif: Motif }>`\n position: fixed;\n top: calc(${HEADER_HEIGHT}px + env(safe-area-inset-top));\n height: calc(100vh - ${HEADER_HEIGHT}px - env(safe-area-inset-top));\n left: 0;\n width: 100%;\n /* @hack it is what it is */\n background: ${({ $motif }) =>\n $motif === \"dark\" ? theme.colors.black : theme.colors.white};\n z-index: ${theme.zIndex.mobileMenu};\n overflow: auto;\n padding: 20px 0 30px;\n`;\n\nexport const NewLabel = styled.span`\n color: ${theme.colors.primaryBlue};\n font-size: ${theme.font.size10};\n line-height: 1;\n margin-left: 10px;\n`;\n\nexport const ButtonIcon = styled.div`\n cursor: pointer;\n display: flex;\n`;\n\nexport const SectionItemArrowButton = styled.button<{ $motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuItem[$motif]};\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:active {\n opacity: 0.85;\n }\n`;\n\nexport const SectionItemImageWrap = styled.div`\n width: ${SECTION_ITEM_IMAGE_SIZE}px;\n height: ${SECTION_ITEM_IMAGE_SIZE}px;\n margin-right: 20px;\n flex-shrink: 0;\n`;\n\nexport const SectionItemButton = styled.button<{\n $motif: Motif;\n $link?: boolean;\n $bold?: boolean;\n}>`\n ${resetButton}\n\n flex-grow: 1;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuItem[$motif]};\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 10px;\n\n ${({ $bold }) =>\n $bold &&\n css`\n font-weight: 700;\n `}\n\n ${({ $link, $motif }) =>\n $link &&\n css`\n font-size: ${theme.font.size13};\n font-weight: bold;\n color: ${theme.colors.menu.active[$motif]};\n `}\n\n &:active {\n opacity: 0.85;\n }\n`;\n\nexport const SectionItem = styled.div<{\n $motif: Motif;\n $secondary?: boolean;\n $height?: number;\n}>`\n display: flex;\n color: ${({ $motif }) => theme.colors.menu.mobileMenuText[$motif]};\n font-size: ${theme.font.size14};\n width: 100%;\n height: ${({ $height }) => $height ?? SECTION_ITEM_HEIGHT}px;\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n ${SectionItemButton} {\n /* padding-left: 30px; */\n }\n `}\n`;\n\nexport const SectionSearchResultsItem = styled(SectionItem)`\n height: ${SECTION_SEARCH_RESULTS_ITEM_HEIGHT}px;\n`;\n\nexport const SectionItemsGroup = styled.div<{\n $motif: Motif;\n $active?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n gap: 1px;\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n ${SectionItemButton},\n ${SectionItemArrowButton} {\n background: ${theme.colors.menu.mobileMenuActive[$motif]};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Section = styled.div<{ $motif: Motif }>`\n border-radius: 6px;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuAccent[$motif]};\n color: #909090;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 1px;\n`;\n\nexport const SearchSection = styled(Section)`\n background: ${({ $motif }) => theme.colors.menu.mobileMenu[$motif]};\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n gap: 14px;\n`;\n\nexport const SearchText = styled.div<{ $small?: boolean }>`\n display: flex;\n font-size: ${theme.font.size13};\n line-height: 1;\n color: ${({ $small }) =>\n $small ? theme.colors.menu.textAccent.dark : theme.colors.menu.text.dark};\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const SearchTextWrap = styled.div`\n overflow: hidden;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 6px;\n`;\n\nexport const SearchNoResultsText = styled.div<{ $motif: Motif }>`\n color: ${({ $motif }) => theme.colors.menu.textAccent[$motif]};\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_SEARCH_RESULTS_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","SECTION_ITEM_IMAGE_MARGIN","IOS_GHOST_MENU_HEIGHT","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Container","styled","ContainerBase","resetButton","css","SearchTextDot","div","theme","colors","menu","textAccent","dark","Wrap","HEADER_HEIGHT","$motif","black","white","zIndex","mobileMenu","NewLabel","span","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","button","mobileMenuItem","SectionItemImageWrap","SectionItemButton","$bold","$link","size13","active","SectionItem","mobileMenuText","size14","$height","$secondary","SectionSearchResultsItem","SectionItemsGroup","$active","mobileMenuActive","Section","mobileMenuAccent","SearchSection","InnerWrap","SearchText","$small","text","SearchTextWrap","SearchNoResultsText"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,mBAAsB,GAAA,EAAA;AAC5B,MAAMC,kCAAqC,GAAA,EAAA;AAC3C,MAAMC,uBAA0B,GAAA,EAAA;AAChC,MAAMC,yBAA4B,GAAA,EAAA;AAClC,MAAMC,qBAAwB,GAAA,EAAA;AAErC,MAAMC,eAAkB,GAAA,GAAA;AACxB,MAAMC,sBAAyB,GAAA,EAAA;AAElB,MAAAC,SAAA,GAAYC,2BAAOC,qBAAa,CAAA;AAAA,eAC9BJ,eAAA,GAAkBC,yBAAyB,CAAC;AAAA,eAC5CA,sBAAsB,MAAMF,qBAAqB;AAAA,CAAA;AAGhE,MAAMM,WAAc,GAAAC,MAAA,CAAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAWb,MAAMC,gBAAgBJ,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKpBC,KAAM,CAAAA,KAAA,CAAAC,MAAA,CAAOC,IAAK,CAAAC,UAAA,CAAWC,IAAI;AAAA,CAAA;AAG1C,MAAMC,OAAOX,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA,cAEbO,2BAAa;AAAA,yBACFA,2BAAa;AAAA;AAAA;AAAA;AAAA,gBAItB,CAAC;EAAEC;CACf,KAAAA,MAAA,K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AC,IAAA,CAAKmC,gBAAiB,CAAA9B,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQ7D,MAAA+B,aAAA,GAAgB5C,2BAAO0C,OAAO,CAAA;AAAA,gBAC3B,CAAC;EAAE7B;AAAO,CAAA,KAAMP,YAAMC,MAAO,CAAAC,IAAA,CAAKS,UAAW,CAAAJ,MAAM,CAAC;AAAA,CAAA;AAG7D,MAAMgC,YAAY7C,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMzB,MAAMyC,aAAa9C,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA,eAElBC,KAAA,CAAAA,KAAA,CAAMe,KAAKU,MAAM;AAAA;AAAA,WAErB,CAAC;EAAEgB;AAAO,CAAA,KACjBA,SAASzC,KAAAA,CAAAA,KAAM,CAAAC,MAAA,CAAOC,IAAK,CAAAC,UAAA,CAAWC,IAAO,GAAAJ,KAAAA,CAAAA,KAAA,CAAMC,MAAO,CAAAC,IAAA,CAAKwC,KAAKtC,IAAI;AAAA;AAAA;AAAA,CAAA;AAKrE,MAAMuC,iBAAiBjD,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS9B,MAAM6C,sBAAsBlD,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA,WAC/B,CAAC;EAAEQ;AAAO,CAAA,KAAMP,YAAMC,MAAO,CAAAC,IAAA,CAAKC,UAAW,CAAAI,MAAM,CAAC;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/MobileMenu/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { css
|
|
1
|
+
{"version":3,"file":"MobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/MobileMenu/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Container as ContainerBase } from \"../../../Container\";\nimport { HEADER_HEIGHT } from \"../../Header.styles\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_SEARCH_RESULTS_ITEM_HEIGHT = 76;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\nexport const SECTION_ITEM_IMAGE_MARGIN = 10;\nexport const IOS_GHOST_MENU_HEIGHT = 69;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0 ${CONTAINER_SIDE_PADDING}px ${IOS_GHOST_MENU_HEIGHT}px;\n`;\n\nconst resetButton = css`\n cursor: pointer;\n outline: none;\n border: none;\n background: inherit;\n font-size: inherit;\n color: inherit;\n display: flex;\n align-items: center;\n`;\n\nexport const SearchTextDot = styled.div`\n margin: 0 10px;\n width: 2px;\n height: 2px;\n border-radius: 50%;\n background: ${theme.colors.menu.textAccent.dark};\n`;\n\nexport const Wrap = styled.div<{ $motif: Motif }>`\n position: fixed;\n top: calc(${HEADER_HEIGHT}px + env(safe-area-inset-top));\n height: calc(100vh - ${HEADER_HEIGHT}px - env(safe-area-inset-top));\n left: 0;\n width: 100%;\n /* @hack it is what it is */\n background: ${({ $motif }) =>\n $motif === \"dark\" ? theme.colors.black : theme.colors.white};\n z-index: ${theme.zIndex.mobileMenu};\n overflow: auto;\n padding: 20px 0 30px;\n`;\n\nexport const NewLabel = styled.span`\n color: ${theme.colors.primaryBlue};\n font-size: ${theme.font.size10};\n line-height: 1;\n margin-left: 10px;\n`;\n\nexport const ButtonIcon = styled.div`\n cursor: pointer;\n display: flex;\n`;\n\nexport const SectionItemArrowButton = styled.button<{ $motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuItem[$motif]};\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:active {\n opacity: 0.85;\n }\n`;\n\nexport const SectionItemImageWrap = styled.div`\n width: ${SECTION_ITEM_IMAGE_SIZE}px;\n height: ${SECTION_ITEM_IMAGE_SIZE}px;\n margin-right: 20px;\n flex-shrink: 0;\n`;\n\nexport const SectionItemButton = styled.button<{\n $motif: Motif;\n $link?: boolean;\n $bold?: boolean;\n}>`\n ${resetButton}\n\n flex-grow: 1;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuItem[$motif]};\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 10px;\n\n ${({ $bold }) =>\n $bold &&\n css`\n font-weight: 700;\n `}\n\n ${({ $link, $motif }) =>\n $link &&\n css`\n font-size: ${theme.font.size13};\n font-weight: bold;\n color: ${theme.colors.menu.active[$motif]};\n `}\n\n &:active {\n opacity: 0.85;\n }\n`;\n\nexport const SectionItem = styled.div<{\n $motif: Motif;\n $secondary?: boolean;\n $height?: number;\n}>`\n display: flex;\n color: ${({ $motif }) => theme.colors.menu.mobileMenuText[$motif]};\n font-size: ${theme.font.size14};\n width: 100%;\n height: ${({ $height }) => $height ?? SECTION_ITEM_HEIGHT}px;\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n ${SectionItemButton} {\n /* padding-left: 30px; */\n }\n `}\n`;\n\nexport const SectionSearchResultsItem = styled(SectionItem)`\n height: ${SECTION_SEARCH_RESULTS_ITEM_HEIGHT}px;\n`;\n\nexport const SectionItemsGroup = styled.div<{\n $motif: Motif;\n $active?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n gap: 1px;\n\n ${({ $active, $motif }) =>\n $active &&\n css`\n ${SectionItemButton},\n ${SectionItemArrowButton} {\n background: ${theme.colors.menu.mobileMenuActive[$motif]};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Section = styled.div<{ $motif: Motif }>`\n border-radius: 6px;\n background: ${({ $motif }) => theme.colors.menu.mobileMenuAccent[$motif]};\n color: #909090;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 1px;\n`;\n\nexport const SearchSection = styled(Section)`\n background: ${({ $motif }) => theme.colors.menu.mobileMenu[$motif]};\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n gap: 14px;\n`;\n\nexport const SearchText = styled.div<{ $small?: boolean }>`\n display: flex;\n font-size: ${theme.font.size13};\n line-height: 1;\n color: ${({ $small }) =>\n $small ? theme.colors.menu.textAccent.dark : theme.colors.menu.text.dark};\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nexport const SearchTextWrap = styled.div`\n overflow: hidden;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 6px;\n`;\n\nexport const SearchNoResultsText = styled.div<{ $motif: Motif }>`\n color: ${({ $motif }) => theme.colors.menu.textAccent[$motif]};\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_SEARCH_RESULTS_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","SECTION_ITEM_IMAGE_MARGIN","IOS_GHOST_MENU_HEIGHT","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Container","styled","ContainerBase","resetButton","css","SearchTextDot","div","theme","colors","menu","textAccent","dark","Wrap","HEADER_HEIGHT","$motif","black","white","zIndex","mobileMenu","NewLabel","span","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","button","mobileMenuItem","SectionItemImageWrap","SectionItemButton","$bold","$link","size13","active","SectionItem","mobileMenuText","size14","$height","$secondary","SectionSearchResultsItem","SectionItemsGroup","$active","mobileMenuActive","Section","mobileMenuAccent","SearchSection","InnerWrap","SearchText","$small","text","SearchTextWrap","SearchNoResultsText"],"mappings":";;;;;;AAOO,MAAM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