@ubnt/store.core 10.16.1-alpha.0 → 10.16.1-alpha.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/lib/assets/ai-360.jpg +0 -0
- package/lib/assets/ai-3602.jpg +0 -0
- package/lib/assets/ai-bullet.jpg +0 -0
- package/lib/assets/ai-bullet2.jpg +0 -0
- package/lib/assets/ai-ptz-precision.jpg +0 -0
- package/lib/assets/ai-ptz-precision2.jpg +0 -0
- package/lib/assets/ai-theta-pro.jpg +0 -0
- package/lib/assets/ai-theta-pro2.jpg +0 -0
- package/lib/assets/ai-theta.jpg +0 -0
- package/lib/assets/ai-theta3.jpg +0 -0
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/compact.svg +2 -2
- package/lib/assets/compact2.svg +3 -2
- package/lib/assets/compact3.svg +3 -0
- package/lib/assets/door-hub-mini.jpg +0 -0
- package/lib/assets/door-hub-mini2.jpg +0 -0
- package/lib/assets/express7.jpg +0 -0
- package/lib/assets/express72.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-instant.jpg +0 -0
- package/lib/assets/g4-instant2.jpg +0 -0
- package/lib/assets/g4-ptz.jpg +0 -0
- package/lib/assets/g4-ptz2.jpg +0 -0
- package/lib/assets/g4-ptz3.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz3.jpg +0 -0
- package/lib/assets/g5-turret-ultra.jpg +0 -0
- package/lib/assets/g5-turret-ultra2.jpg +0 -0
- package/lib/assets/g6-ptz.jpg +0 -0
- package/lib/assets/g6-ptz2.jpg +0 -0
- package/lib/assets/globe.svg +9 -2
- package/lib/assets/globe2.svg +2 -9
- package/lib/assets/intercom.jpg +0 -0
- package/lib/assets/intercom2.jpg +0 -0
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus4.svg +9 -9
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/power.svg +4 -1
- package/lib/assets/power2.svg +1 -4
- package/lib/assets/rack.svg +4 -1
- package/lib/assets/rack2.svg +1 -4
- package/lib/assets/reader-lite.jpg +0 -0
- package/lib/assets/reader-lite2.jpg +0 -0
- package/lib/assets/udr2.jpg +0 -0
- package/lib/assets/udr3.jpg +0 -0
- package/lib/assets/udr7.jpg +0 -0
- package/lib/assets/udr72.jpg +0 -0
- package/lib/components/Footer/hooks/useFooterContent.d.ts +4 -14
- package/lib/components/Footer/hooks/useFooterContent.js +17 -6
- package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
- package/lib/components/Footer/hooks/useFooterContent.mjs +18 -2
- package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
- package/lib/components/Footer/translations/en.json.js +3 -1
- package/lib/components/Footer/translations/en.json.js.map +1 -1
- package/lib/components/Footer/translations/en.json.mjs +3 -1
- package/lib/components/Footer/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.mjs +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.d.ts +1 -3
- package/lib/components/Header/MobileLinksModal/MobileMenu.js +68 -13
- package/lib/components/Header/MobileLinksModal/MobileMenu.js.map +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.mjs +72 -17
- package/lib/components/Header/MobileLinksModal/MobileMenu.mjs.map +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.styles.d.ts +9 -0
- package/lib/components/Header/MobileLinksModal/MobileMenu.styles.js +6 -0
- package/lib/components/Header/MobileLinksModal/MobileMenu.styles.js.map +1 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.styles.mjs +6 -1
- package/lib/components/Header/MobileLinksModal/MobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +3 -6
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +4 -7
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- package/lib/constants/icons/header/globe.svg.js +1 -1
- package/lib/constants/icons/header/globe.svg.mjs +2 -2
- package/lib/constants/icons/header/index.js +1 -1
- package/lib/constants/icons/header/index.mjs +1 -1
- package/lib/constants/icons/menu/index.js +6 -6
- package/lib/constants/icons/menu/index.mjs +2 -2
- package/lib/constants/icons/menu/power.svg.js +5 -5
- package/lib/constants/icons/menu/power.svg.mjs +2 -2
- package/lib/constants/icons/menu/rack.svg.js +5 -5
- package/lib/constants/icons/menu/rack.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-ptz-precision.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-ptz-precision.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta-pro.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/g4-ptz.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/g4-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/g5-ptz.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/CameraSecurity/g6-ptz.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/CameraSecurity/g6-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express7.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express7.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr7.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr7.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/express7.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/express7.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/Consoles/udr7.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/udr7.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/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.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/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/intercom.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/Interior/ai-theta-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Interior/ai-theta-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/ai-ptz-precision.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/ai-ptz-precision.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/g6-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g6-ptz.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/globe.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/globe.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/power.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.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/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.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/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.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/interior-design/ai-theta.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/interior-design/ai-theta.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/compact2.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/compact2.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/rack.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/rack.svg.mjs +2 -2
- package/lib/constants/modelCompareData/data/CameraSecurity.js +13 -13
- package/lib/constants/modelCompareData/data/CameraSecurity.mjs +7 -7
- package/lib/constants/modelCompareData/data/CloudGateways.js +6 -6
- package/lib/constants/modelCompareData/data/CloudGateways.mjs +4 -4
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +3 -3
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +2 -2
- 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/product-list-groups/productListCompact.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/productListCompact.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/aiBullet.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiBullet.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiPtzPrecision.js +1 -1
- package/lib/constants/modelCompareData/data/products/aiPtzPrecision.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/doorHubMini.js +2 -2
- package/lib/constants/modelCompareData/data/products/doorHubMini.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/express7.js +1 -1
- package/lib/constants/modelCompareData/data/products/express7.mjs +1 -1
- 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/g4Instant.js +2 -2
- package/lib/constants/modelCompareData/data/products/g4Instant.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 +1 -1
- package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/g5TurretUltra.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5TurretUltra.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g6Ptz.js +1 -1
- package/lib/constants/modelCompareData/data/products/g6Ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/intercom.js +2 -2
- package/lib/constants/modelCompareData/data/products/intercom.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/theta.js +1 -1
- package/lib/constants/modelCompareData/data/products/theta.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/thetaPro.js +1 -1
- package/lib/constants/modelCompareData/data/products/thetaPro.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/udr.js +1 -1
- package/lib/constants/modelCompareData/data/products/udr.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/udr7.js +1 -1
- package/lib/constants/modelCompareData/data/products/udr7.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/accessPowerMethod.js +1 -1
- package/lib/constants/modelCompareData/data/properties/accessPowerMethod.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/availability.js +1 -1
- package/lib/constants/modelCompareData/data/properties/availability.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/dcPowerOutput.js +1 -1
- package/lib/constants/modelCompareData/data/properties/dcPowerOutput.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/mounting.js +1 -1
- package/lib/constants/modelCompareData/data/properties/mounting.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/webMode.js +1 -1
- package/lib/constants/modelCompareData/data/properties/webMode.mjs +1 -1
- package/lib/contexts/MenuContext/mapping.js +3 -3
- package/lib/contexts/MenuContext/mapping.mjs +2 -2
- package/lib/contexts/MicrositeMenuContext/mapping.d.ts +0 -2
- package/lib/contexts/MicrositeMenuContext/mapping.js +1 -129
- package/lib/contexts/MicrositeMenuContext/mapping.js.map +1 -1
- package/lib/contexts/MicrositeMenuContext/mapping.mjs +3 -129
- package/lib/contexts/MicrositeMenuContext/mapping.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/assets/compact22.svg +0 -4
|
@@ -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 {\n FOOTER_LINKS_ID,\n START_HERE_ID,\n} from \"../../../contexts/MicrositeMenuContext/mapping\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport type { StoreId } from \"../../../types\";\nimport type { FooterLinkId } from \"../../Footer/hooks/useFooterContent\";\nimport { getRegionalLink } from \"../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\n\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 storeId: StoreId;\n}\n\nexport const MobileLinksModal = ({\n menu,\n onMenuItemClick,\n onModalClose,\n storeId,\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 const getPreparedMenu = () => {\n return (menu?.items ?? []).flatMap((item) => {\n // Flatten Start Here one level\n if (item.id === START_HERE_ID && Array.isArray(item.items)) {\n return item.items;\n }\n // Flatten Footer one level and overwrite regional links\n if (item.id === FOOTER_LINKS_ID && Array.isArray(item.items)) {\n return item.items.map((link) => ({\n ...link,\n url: getRegionalLink(item.id as FooterLinkId, storeId),\n }));\n }\n // Do nothing otherwise\n return item;\n });\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 {getPreparedMenu().map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE to separate sections and styling until there's a better way\n $isSectionEnd={item?.isSectionEnd}\n $isSectionBegin={item?.isSectionBegin}\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 motif={motif}>\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":["LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","storeId","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","getPreparedMenu","items","flatMap","item","id","START_HERE_ID","Array","isArray","FOOTER_LINKS_ID","map","link","url","getRegionalLink","handleItemClick","event","length","stopPropagation","jsx","S.Wrap","children","S.Container","size","noVerticalMargin","S.InnerWrap","S.Section","Section","jsxs","S.SectionItemsGroup","SectionItemsGroup","$active","$isSectionEnd","isSectionEnd","$isSectionBegin","isSectionBegin","S.SectionItem","SectionItem","onClick","S.SectionItemLabel","SectionItemLabel","label","S.SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,SAAY,GAAA,OAAA;AASX,MAAMC,mBAAmBA,CAAC;EAC/BC,IAAA;EACAC,eAAA;EACAC,YAAA;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,GAAAV,SAAA;EAKrB,MAAM,CAACW,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;EAEA,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AAAC,WAAA,EAAF;cAEC1C,KAAM,EAAA,MAAA;cACNuD,UAAU,EAAA,IAAA;cACVZ,OAAS,EAACtB,KAAU,IAAAD,eAAA,CAAgBC,OAAOiC,OAAO,CAAA;cAElD5B,QAAC,EAAAO,eAAAA,UAAAA,CAAAA,IAAA,CAAAW,iBAAAA,CAAAA,gBAAA,EAAA;gBAAmB5C,KACjB;gBAAA0B,QAAA,EAAA,CAAA5B,aAAA,CAAcwD,QAAQR,KAAK,CAAA,EAC3BQ,OAAA,CAAQE,wBACNhC,cAAA,CAAAiC,iBAAAA,CAAAA,OAAA;kBACE/B,QAAA,EAAA5B,aAAA,CAAc,wBAAwB;gBACzC,CAAA,CAAA;cAEJ,CAAA;YAAA,CAAA,EAZKwD,OAAQ,CAAA3C,EAchB,CAAA,CAAA;UAAA,CAAA,EAhDED,IAAK,CAAAC,EAkDb,CAAA;SACH;MACF,CAAA;IACF,CAAA;GACF,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"MobileMenu.js","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { START_HERE_ID } from \"../../../contexts/MicrositeMenuContext/mapping\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport type { FooterLinkId } from \"../../Footer/hooks/useFooterContent\";\nimport { useFooterContent } from \"../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\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 const { footerContent, miscLinks } = useFooterContent();\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 const getPreparedMenu = useMemo(() => {\n return (menu?.items ?? []).flatMap((item) => {\n // @TODO Filter out SiteMap?\n\n // Flatten Start Here one level\n if (item.id === START_HERE_ID && Array.isArray(item.items)) {\n return item.items;\n }\n return item;\n });\n }, [menu]);\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 type FooterItem = {\n id: FooterLinkId;\n label: string;\n src: string;\n target?: string;\n isSectionEnd?: boolean;\n };\n\n type FooterSection = {\n header: {\n id: string;\n label: string;\n };\n items: FooterItem[];\n };\n\n type FooterSections = {\n company: FooterSection;\n training: FooterSection;\n buy: FooterSection;\n tools: FooterSection;\n };\n\n function normalizeFooterSections(sections: FooterSections) {\n return Object.values(sections).map((section, i) => ({\n id: section.header.id,\n label: section.header.label,\n isSectionEnd: i === Object.keys(sections).length - 1,\n items: section.items,\n }));\n }\n\n const normalizedFooterContent = normalizeFooterSections(footerContent);\n\n return (\n <S.Wrap>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n <S.Section>\n {getPreparedMenu.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE to separate sections and styling until there's a better way\n $isSectionEnd={item?.isSectionEnd}\n $isSectionBegin={item?.isSectionBegin}\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 motif={motif}>\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\n {/* Header Links that don't exist in Desktop Footer */}\n {[...miscLinks].map((item, i) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n $isSectionBegin={i === 0}\n >\n <S.SectionItemLink\n motif={motif}\n href={item.src}\n target=\"_blank\"\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {item.label}\n </S.SectionItemLabel>\n </S.SectionItemLink>\n </S.SectionItemsGroup>\n ))}\n\n {/* Footer Links to be included in Mobile Nav Modal */}\n {normalizedFooterContent.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n $isSectionEnd={item?.isSectionEnd}\n >\n <S.SectionItem\n motif={motif}\n onClick={() =>\n item?.items && toggleExpandedSectionItemId(item.id)\n }\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {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 console.log(subItem);\n return (\n <S.SectionItemLink\n key={subItem.id}\n motif=\"dark\"\n $secondary\n href={subItem.src}\n >\n <S.SectionItemLabel motif={motif}>\n {subItem.label}\n </S.SectionItemLabel>\n </S.SectionItemLink>\n );\n })}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","footerContent","miscLinks","useFooterContent","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","getPreparedMenu","useMemo","items","flatMap","item","id","START_HERE_ID","Array","isArray","handleItemClick","event","length","stopPropagation","url","normalizeFooterSections","sections","Object","values","map","section","i","header","label","isSectionEnd","keys","normalizedFooterContent","S.Wrap","Wrap","children","jsx","S.Container","size","noVerticalMargin","S.InnerWrap","jsxs","S.Section","S.SectionItemsGroup","SectionItemsGroup","$active","$isSectionEnd","$isSectionBegin","isSectionBegin","S.SectionItem","SectionItem","onClick","S.SectionItemLabel","SectionItemLabel","S.SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge","S.SectionItemLink","SectionItemLink","href","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ime';
|
|
2
|
-
import { useState, useCallback } from 'react';
|
|
2
|
+
import { useState, useCallback, useMemo } from 'react';
|
|
3
3
|
import '../../../constants/icons/index.mjs';
|
|
4
4
|
import '../../../contexts/MicrositeMenuContext/index.mjs';
|
|
5
|
-
import { START_HERE_ID
|
|
5
|
+
import { START_HERE_ID } from '../../../contexts/MicrositeMenuContext/mapping.mjs';
|
|
6
6
|
import { useMicrositeMenuTranslations } from '../../../contexts/MicrositeMenuContext/translations.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { useFooterContent } from '../../Footer/hooks/useFooterContent.mjs';
|
|
8
8
|
import '../../StyleableSvgImage/index.mjs';
|
|
9
|
-
import { Wrap, Container, InnerWrap, Section, SectionItemsGroup, SectionItem, SectionItemLabel, SectionItemArrowButton, ButtonIcon, Badge } from './MobileMenu.styles.mjs';
|
|
9
|
+
import { Wrap, Container, InnerWrap, Section, SectionItemsGroup, SectionItem, SectionItemLabel, SectionItemArrowButton, ButtonIcon, Badge, SectionItemLink } from './MobileMenu.styles.mjs';
|
|
10
10
|
import { useMicrositeMenu } from '../../../contexts/MicrositeMenuContext/context.mjs';
|
|
11
11
|
import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
12
|
import _externalAssets_BAXELvSy__default from "../../../assets/collapseArrow.svg";
|
|
@@ -15,8 +15,7 @@ const LIGHT_KEY = "light";
|
|
|
15
15
|
const MobileLinksModal = ({
|
|
16
16
|
menu,
|
|
17
17
|
onMenuItemClick,
|
|
18
|
-
onModalClose
|
|
19
|
-
storeId
|
|
18
|
+
onModalClose
|
|
20
19
|
}) => {
|
|
21
20
|
const {
|
|
22
21
|
language
|
|
@@ -24,25 +23,23 @@ const MobileLinksModal = ({
|
|
|
24
23
|
const {
|
|
25
24
|
formatMessage
|
|
26
25
|
} = useMicrositeMenuTranslations(language);
|
|
26
|
+
const {
|
|
27
|
+
footerContent,
|
|
28
|
+
miscLinks
|
|
29
|
+
} = useFooterContent();
|
|
27
30
|
const motif = LIGHT_KEY;
|
|
28
31
|
const [expandedSectionItemId, setExpandedSectionItemId] = useState(null);
|
|
29
32
|
const toggleExpandedSectionItemId = useCallback(itemId => {
|
|
30
33
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
31
34
|
}, [expandedSectionItemId]);
|
|
32
|
-
const getPreparedMenu = () => {
|
|
35
|
+
const getPreparedMenu = useMemo(() => {
|
|
33
36
|
return (menu?.items ?? []).flatMap(item => {
|
|
34
37
|
if (item.id === START_HERE_ID && Array.isArray(item.items)) {
|
|
35
38
|
return item.items;
|
|
36
39
|
}
|
|
37
|
-
if (item.id === FOOTER_LINKS_ID && Array.isArray(item.items)) {
|
|
38
|
-
return item.items.map(link => ({
|
|
39
|
-
...link,
|
|
40
|
-
url: getRegionalLink(item.id, storeId)
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
40
|
return item;
|
|
44
41
|
});
|
|
45
|
-
};
|
|
42
|
+
}, [menu]);
|
|
46
43
|
const handleItemClick = (event, item) => {
|
|
47
44
|
if (item?.items?.length) {
|
|
48
45
|
event.stopPropagation();
|
|
@@ -52,13 +49,22 @@ const MobileLinksModal = ({
|
|
|
52
49
|
onModalClose();
|
|
53
50
|
}
|
|
54
51
|
};
|
|
52
|
+
function normalizeFooterSections(sections) {
|
|
53
|
+
return Object.values(sections).map((section, i) => ({
|
|
54
|
+
id: section.header.id,
|
|
55
|
+
label: section.header.label,
|
|
56
|
+
isSectionEnd: i === Object.keys(sections).length - 1,
|
|
57
|
+
items: section.items
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
const normalizedFooterContent = normalizeFooterSections(footerContent);
|
|
55
61
|
return /* @__PURE__ */jsx(Wrap, {
|
|
56
62
|
children: /* @__PURE__ */jsx(Container, {
|
|
57
63
|
size: "mobile",
|
|
58
64
|
noVerticalMargin: true,
|
|
59
65
|
children: /* @__PURE__ */jsx(InnerWrap, {
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
children: getPreparedMenu
|
|
66
|
+
children: /* @__PURE__ */jsxs(Section, {
|
|
67
|
+
children: [getPreparedMenu.map(item => /* @__PURE__ */jsxs(SectionItemsGroup, {
|
|
62
68
|
motif,
|
|
63
69
|
$active: item.id === expandedSectionItemId,
|
|
64
70
|
$isSectionEnd: item?.isSectionEnd,
|
|
@@ -92,7 +98,56 @@ const MobileLinksModal = ({
|
|
|
92
98
|
})]
|
|
93
99
|
})
|
|
94
100
|
}, subItem.id))]
|
|
95
|
-
}, item.id))
|
|
101
|
+
}, item.id)), [...miscLinks].map((item, i) => /* @__PURE__ */jsx(SectionItemsGroup, {
|
|
102
|
+
motif,
|
|
103
|
+
$active: item.id === expandedSectionItemId,
|
|
104
|
+
$isSectionBegin: i === 0,
|
|
105
|
+
children: /* @__PURE__ */jsx(SectionItemLink, {
|
|
106
|
+
motif,
|
|
107
|
+
href: item.src,
|
|
108
|
+
target: "_blank",
|
|
109
|
+
children: /* @__PURE__ */jsx(SectionItemLabel, {
|
|
110
|
+
$active: item.id === expandedSectionItemId,
|
|
111
|
+
motif,
|
|
112
|
+
children: item.label
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
}, item.id)), normalizedFooterContent.map(item => /* @__PURE__ */jsxs(SectionItemsGroup, {
|
|
116
|
+
motif,
|
|
117
|
+
$active: item.id === expandedSectionItemId,
|
|
118
|
+
$isSectionEnd: item?.isSectionEnd,
|
|
119
|
+
children: [/* @__PURE__ */jsxs(SectionItem, {
|
|
120
|
+
motif,
|
|
121
|
+
onClick: () => item?.items && toggleExpandedSectionItemId(item.id),
|
|
122
|
+
children: [/* @__PURE__ */jsx(SectionItemLabel, {
|
|
123
|
+
$active: item.id === expandedSectionItemId,
|
|
124
|
+
motif,
|
|
125
|
+
children: item.label
|
|
126
|
+
}), item?.items && /* @__PURE__ */jsx(SectionItemArrowButton, {
|
|
127
|
+
motif,
|
|
128
|
+
onClick: () => toggleExpandedSectionItemId(item.id),
|
|
129
|
+
children: /* @__PURE__ */jsx(ButtonIcon, {
|
|
130
|
+
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
131
|
+
src: _externalAssets_BAXELvSy__default,
|
|
132
|
+
width: 13,
|
|
133
|
+
height: 8,
|
|
134
|
+
$active: item.id === expandedSectionItemId
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})]
|
|
138
|
+
}), item.id === expandedSectionItemId && item?.items?.map(subItem => {
|
|
139
|
+
console.log(subItem);
|
|
140
|
+
return /* @__PURE__ */jsx(SectionItemLink, {
|
|
141
|
+
motif: "dark",
|
|
142
|
+
$secondary: true,
|
|
143
|
+
href: subItem.src,
|
|
144
|
+
children: /* @__PURE__ */jsx(SectionItemLabel, {
|
|
145
|
+
motif,
|
|
146
|
+
children: subItem.label
|
|
147
|
+
})
|
|
148
|
+
}, subItem.id);
|
|
149
|
+
})]
|
|
150
|
+
}, item.id))]
|
|
96
151
|
})
|
|
97
152
|
})
|
|
98
153
|
})
|
|
@@ -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 {\n FOOTER_LINKS_ID,\n START_HERE_ID,\n} from \"../../../contexts/MicrositeMenuContext/mapping\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport type { StoreId } from \"../../../types\";\nimport type { FooterLinkId } from \"../../Footer/hooks/useFooterContent\";\nimport { getRegionalLink } from \"../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\n\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 storeId: StoreId;\n}\n\nexport const MobileLinksModal = ({\n menu,\n onMenuItemClick,\n onModalClose,\n storeId,\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 const getPreparedMenu = () => {\n return (menu?.items ?? []).flatMap((item) => {\n // Flatten Start Here one level\n if (item.id === START_HERE_ID && Array.isArray(item.items)) {\n return item.items;\n }\n // Flatten Footer one level and overwrite regional links\n if (item.id === FOOTER_LINKS_ID && Array.isArray(item.items)) {\n return item.items.map((link) => ({\n ...link,\n url: getRegionalLink(item.id as FooterLinkId, storeId),\n }));\n }\n // Do nothing otherwise\n return item;\n });\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 {getPreparedMenu().map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE to separate sections and styling until there's a better way\n $isSectionEnd={item?.isSectionEnd}\n $isSectionBegin={item?.isSectionBegin}\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 motif={motif}>\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":["LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","storeId","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","getPreparedMenu","items","flatMap","item","id","START_HERE_ID","Array","isArray","FOOTER_LINKS_ID","map","link","url","getRegionalLink","handleItemClick","event","length","stopPropagation","jsx","S.Wrap","children","S.Container","size","noVerticalMargin","S.InnerWrap","S.Section","jsxs","S.SectionItemsGroup","$active","$isSectionEnd","isSectionEnd","$isSectionBegin","isSectionBegin","S.SectionItem","onClick","S.SectionItemLabel","label","S.SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,SAAY,GAAA,OAAA;AASX,MAAMC,mBAAmBA,CAAC;EAC/BC,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,EAAO,KAAAV;kBAAA;iBAEzB;cACF,CAAA,CAAA;YAAA,CAEJ,CAAA,EAECS,KAAKC,EAAO,KAAAV,qBAAA,IACXS,MAAMF,KAAO,EAAAQ,GAAA,CAAKkC,OAChB,mBAAA1B,GAAA,CAACe,WAAE,EAAF;cAECvC,KAAM,EAAA,MAAA;cACNmD,UAAU,EAAA,IAAA;cACVX,OAAS,EAACnB,KAAU,IAAAD,eAAA,CAAgBC,OAAO6B,OAAO,CAAA;cAElDxB,QAAC,EAAA,eAAAM,IAAA,CAAAS,gBAAA,EAAA;gBAAmBzC,KACjB;gBAAA0B,QAAA,EAAA,CAAA5B,aAAA,CAAcoD,QAAQR,KAAK,CAAA,EAC3BQ,OAAA,CAAQE,wBACN5B,GAAA,CAAA6B,OAAA;kBACE3B,QAAA,EAAA5B,aAAA,CAAc,wBAAwB;gBACzC,CAAA,CAAA;cAEJ,CAAA;YAAA,CAAA,EAZKoD,OAAQ,CAAAvC,EAchB,CAAA,CAAA;UAAA,CAAA,EAhDED,IAAK,CAAAC,EAkDb,CAAA;SACH;MACF,CAAA;IACF,CAAA;GACF,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"MobileMenu.mjs","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { useMicrositeMenu } from \"../../../contexts/MicrositeMenuContext\";\nimport { START_HERE_ID } from \"../../../contexts/MicrositeMenuContext/mapping\";\nimport { useMicrositeMenuTranslations } from \"../../../contexts/MicrositeMenuContext/translations\";\nimport type { ParsedMicrositeHeaderItem } from \"../../../contexts/MicrositeMenuContext/types\";\nimport type { FooterLinkId } from \"../../Footer/hooks/useFooterContent\";\nimport { useFooterContent } from \"../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./MobileMenu.styles\";\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 const { footerContent, miscLinks } = useFooterContent();\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 const getPreparedMenu = useMemo(() => {\n return (menu?.items ?? []).flatMap((item) => {\n // @TODO Filter out SiteMap?\n\n // Flatten Start Here one level\n if (item.id === START_HERE_ID && Array.isArray(item.items)) {\n return item.items;\n }\n return item;\n });\n }, [menu]);\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 type FooterItem = {\n id: FooterLinkId;\n label: string;\n src: string;\n target?: string;\n isSectionEnd?: boolean;\n };\n\n type FooterSection = {\n header: {\n id: string;\n label: string;\n };\n items: FooterItem[];\n };\n\n type FooterSections = {\n company: FooterSection;\n training: FooterSection;\n buy: FooterSection;\n tools: FooterSection;\n };\n\n function normalizeFooterSections(sections: FooterSections) {\n return Object.values(sections).map((section, i) => ({\n id: section.header.id,\n label: section.header.label,\n isSectionEnd: i === Object.keys(sections).length - 1,\n items: section.items,\n }));\n }\n\n const normalizedFooterContent = normalizeFooterSections(footerContent);\n\n return (\n <S.Wrap>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n <S.Section>\n {getPreparedMenu.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n // @NOTE to separate sections and styling until there's a better way\n $isSectionEnd={item?.isSectionEnd}\n $isSectionBegin={item?.isSectionBegin}\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 motif={motif}>\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\n {/* Header Links that don't exist in Desktop Footer */}\n {[...miscLinks].map((item, i) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n $isSectionBegin={i === 0}\n >\n <S.SectionItemLink\n motif={motif}\n href={item.src}\n target=\"_blank\"\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {item.label}\n </S.SectionItemLabel>\n </S.SectionItemLink>\n </S.SectionItemsGroup>\n ))}\n\n {/* Footer Links to be included in Mobile Nav Modal */}\n {normalizedFooterContent.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n $isSectionEnd={item?.isSectionEnd}\n >\n <S.SectionItem\n motif={motif}\n onClick={() =>\n item?.items && toggleExpandedSectionItemId(item.id)\n }\n >\n <S.SectionItemLabel\n $active={item.id === expandedSectionItemId}\n motif={motif}\n >\n {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 console.log(subItem);\n return (\n <S.SectionItemLink\n key={subItem.id}\n motif=\"dark\"\n $secondary\n href={subItem.src}\n >\n <S.SectionItemLabel motif={motif}>\n {subItem.label}\n </S.SectionItemLabel>\n </S.SectionItemLink>\n );\n })}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["LIGHT_KEY","MobileLinksModal","menu","onMenuItemClick","onModalClose","language","useMicrositeMenu","formatMessage","useMicrositeMenuTranslations","footerContent","miscLinks","useFooterContent","motif","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","getPreparedMenu","useMemo","items","flatMap","item","id","START_HERE_ID","Array","isArray","handleItemClick","event","length","stopPropagation","url","normalizeFooterSections","sections","Object","values","map","section","i","header","label","isSectionEnd","keys","normalizedFooterContent","S.Wrap","children","jsx","S.Container","size","noVerticalMargin","S.InnerWrap","jsxs","S.Section","S.SectionItemsGroup","$active","$isSectionEnd","$isSectionBegin","isSectionBegin","S.SectionItem","onClick","S.SectionItemLabel","S.SectionItemArrowButton","S.ButtonIcon","StyleableSvgImage","src","icons.generic.collapseArrow","width","height","subItem","$secondary","isNew","S.Badge","S.SectionItemLink","href","target","console","log"],"mappings":";;;;;;;;;;;;;AAYA,MAAMA,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;EAC/D,MAAM;IAAEI,aAAA;IAAeC;EAAU,CAAA,GAAIC,gBAAiB,CAAA,CAAA;EAEtD,MAAMC,KAAe,GAAAZ,SAAA;EAKrB,MAAM,CAACa,qBAAA,EAAuBC,wBAAwB,CAAA,GAAIC,SAExD,IAAI,CAAA;EAEN,MAAMC,2BAA8B,GAAAC,WAAA,CACjCC,MAAmB,IAAA;IAClBJ,wBAAA,CACED,qBAAA,KAA0BK,SAAS,IAAO,GAAAA,MAC5C,CAAA;EACF,CAAA,EACA,CAACL,qBAAqB,CACxB,CAAA;EAEM,MAAAM,eAAA,GAAkBC,QAAQ,MAAM;IACpC,OAAA,CAAQlB,MAAMmB,KAAS,IAAA,EAAI,EAAAC,OAAA,CAASC,IAAS,IAAA;MAI3C,IAAIA,KAAKC,EAAO,KAAAC,aAAA,IAAiBC,MAAMC,OAAQ,CAAAJ,IAAA,CAAKF,KAAK,CAAG,EAAA;QAC1D,OAAOE,IAAK,CAAAF,KAAA;MAAA;MAEP,OAAAE,IAAA;IAAA,CACR,CAAA;EAAA,CACH,EAAG,CAACrB,IAAI,CAAC,CAAA;EAMH,MAAA0B,eAAA,GAAkBA,CACtBC,KAAA,EACAN,IACG,KAAA;IACC,IAAAA,IAAA,EAAMF,OAAOS,MAAQ,EAAA;MACvBD,KAAA,CAAME,eAAgB,CAAA,CAAA;MACtBf,2BAAA,CAA4BO,KAAKC,EAAE,CAAA;IAAA,CACrC,MAAA,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O,KAAAX;kBAAA,CAAA;gBAEzB,CAAA;cAAA,CAAA,CAAA;YACF,CAEJ,CAAA,EAECU,KAAKC,EAAO,KAAAX,qBAAA,IACXU,MAAMF,KAAO,EAAAgB,GAAA,CAAKgC,OAAY,IAAA;cAC5BO,OAAA,CAAQC,IAAIR,OAAO,CAAA;cAEjB,sBAAAtB,GAAA,CAAC0B,eAAE,EAAF;gBAEC7D,KAAM,EAAA,MAAA;gBACN0D,UAAU,EAAA,IAAA;gBACVI,MAAML,OAAQ,CAAAJ,GAAA;gBAEdnB,6BAACe,gBAAE,EAAF;kBAAmBjD,KAAA;kBACjBkC,kBAAQL;gBACX,CAAA;cAAA,CAAA,EAPK4B,OAAQ,CAAA7C,EAQf,CAAA;YAEH,CAAA,CAAA;UAAA,CAAA,EAjDED,IAAK,CAAAC,EAmDb,CAAA,CAAA;SACH;MAAA,CACF;IACF,CAAA;GACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -19,6 +19,15 @@ export declare const SectionItem: import("styled-components/dist/types").IStyled
|
|
|
19
19
|
$secondary?: boolean;
|
|
20
20
|
$height?: number;
|
|
21
21
|
}>> & string;
|
|
22
|
+
export declare const SectionItemLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "motif" | "$secondary" | "$height"> & {
|
|
23
|
+
motif: Motif;
|
|
24
|
+
$secondary?: boolean;
|
|
25
|
+
$height?: number;
|
|
26
|
+
}, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement> | "motif" | "$secondary" | "$height"> & {
|
|
27
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
28
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
29
|
+
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
30
|
+
}>, never>, never>> & string;
|
|
22
31
|
export declare const SectionItemsGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
23
32
|
motif: Motif;
|
|
24
33
|
$active?: boolean;
|
|
@@ -121,6 +121,11 @@ const SectionItem = styled__default["default"].button`
|
|
|
121
121
|
}
|
|
122
122
|
`}
|
|
123
123
|
`;
|
|
124
|
+
const SectionItemLink = styled__default["default"](SectionItem).attrs({
|
|
125
|
+
as: "a"
|
|
126
|
+
})`
|
|
127
|
+
padding: 1px 6px;
|
|
128
|
+
`;
|
|
124
129
|
const SectionItemsGroup = styled__default["default"].div`
|
|
125
130
|
display: flex;
|
|
126
131
|
flex-direction: column;
|
|
@@ -217,6 +222,7 @@ exports.SectionItem = SectionItem;
|
|
|
217
222
|
exports.SectionItemArrowButton = SectionItemArrowButton;
|
|
218
223
|
exports.SectionItemImageWrap = SectionItemImageWrap;
|
|
219
224
|
exports.SectionItemLabel = SectionItemLabel;
|
|
225
|
+
exports.SectionItemLink = SectionItemLink;
|
|
220
226
|
exports.SectionItemsGroup = SectionItemsGroup;
|
|
221
227
|
exports.Wrap = Wrap;
|
|
222
228
|
//# sourceMappingURL=MobileMenu.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.styles.js","sources":["../../../../src/components/Header/MobileLinksModal/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\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Wrap = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n`;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0;\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 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.div<{ motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\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 SectionItemLabel = styled.span<{\n motif: Motif;\n $link?: boolean;\n $active?: boolean;\n}>`\n ${resetButton}\n color: ${theme.colors.desktopNeutral12};\n flex-grow: 1;\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 4px;\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 ${({ $active }) =>\n $active &&\n `\n color: ${theme.colors.primaryBlue}\n `}\n`;\n\nexport const SectionItem = styled.button<{\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 outline: none;\n border: none;\n background: ${theme.colors.desktopNeutral2};\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n border-radius: 0 !important;\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${SectionItemLabel} {\n padding-left: 30px;\n background: ${theme.colors.desktopNeutral1};\n }\n `}\n`;\n\nexport const SectionItemsGroup = styled.div<{\n motif: Motif;\n $active?: boolean;\n $isSectionEnd?: boolean;\n $isSectionBegin?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n\n &:last-child {\n ${SectionItem} {\n border-bottom: none;\n }\n }\n\n &:nth-child(2) {\n ${SectionItem} {\n border-radius: 6px 6px 0 0;\n }\n }\n\n ${({ $active }) =>\n $active &&\n css`\n ${SectionItem} {\n border-bottom: 1px solid ${theme.colors.desktopNeutral3} !important;\n\n &:last-child {\n border-bottom: none !important;\n }\n }\n\n ${SectionItemLabel},\n ${SectionItemArrowButton} {\n background: ${theme.colors.desktopNeutral2};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n\n ${({ $isSectionEnd }) =>\n $isSectionEnd &&\n css`\n margin-block-end: 16px;\n border-radius: 0 0 6px 6px;\n overflow: hidden;\n\n ${SectionItem} {\n border-bottom: none;\n\n &:first-child {\n border-bottom: 1px solid transparent;\n }\n }\n `}\n ${({ $isSectionBegin }) =>\n $isSectionBegin &&\n css`\n border-radius: 6px 6px 0 0;\n overflow: hidden;\n `}\n`;\n\nexport const Section = styled.div`\n border-radius: 6px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const Badge = styled.span`\n align-items: center;\n border-radius: 3px;\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.primaryBlue};\n display: flex;\n font-size: 9px;\n font-style: normal;\n height: 16px;\n justify-content: center;\n letter-spacing: -0.018px;\n margin-left: 4px;\n padding: 2px 3px;\n width: fit-content;\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Wrap","styled","div","Container","ContainerBase","resetButton","css","NewLabel","span","theme","colors","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","SectionItemImageWrap","SectionItemLabel","desktopNeutral12","$link","motif","size13","menu","active","$active","SectionItem","button","mobileMenuText","size14","$height","desktopNeutral2","desktopNeutral3","$secondary","desktopNeutral1","SectionItemsGroup","$isSectionEnd","$isSectionBegin","Section","InnerWrap","Badge"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MobileMenu.styles.js","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n// eslint-disable-next-line import/no-named-as-default\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../constants/theme\";\nimport { Container as ContainerBase } from \"../../Container\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Wrap = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n`;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0;\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 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.div<{ motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\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 SectionItemLabel = styled.span<{\n motif: Motif;\n $link?: boolean;\n $active?: boolean;\n}>`\n ${resetButton}\n color: ${theme.colors.desktopNeutral12};\n flex-grow: 1;\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 4px;\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 ${({ $active }) =>\n $active &&\n `\n color: ${theme.colors.primaryBlue}\n `}\n`;\n\nexport const SectionItem = styled.button<{\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 outline: none;\n border: none;\n background: ${theme.colors.desktopNeutral2};\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n border-radius: 0 !important;\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${SectionItemLabel} {\n padding-left: 30px;\n background: ${theme.colors.desktopNeutral1};\n }\n `}\n`;\n\nexport const SectionItemLink = styled(SectionItem).attrs({ as: \"a\" })`\n padding: 1px 6px;\n`;\n\nexport const SectionItemsGroup = styled.div<{\n motif: Motif;\n $active?: boolean;\n $isSectionEnd?: boolean;\n $isSectionBegin?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n\n &:last-child {\n ${SectionItem} {\n border-bottom: none;\n }\n }\n\n &:nth-child(2) {\n ${SectionItem} {\n border-radius: 6px 6px 0 0;\n }\n }\n\n ${({ $active }) =>\n $active &&\n css`\n ${SectionItem} {\n border-bottom: 1px solid ${theme.colors.desktopNeutral3} !important;\n\n &:last-child {\n border-bottom: none !important;\n }\n }\n\n ${SectionItemLabel},\n ${SectionItemArrowButton} {\n background: ${theme.colors.desktopNeutral2};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n\n ${({ $isSectionEnd }) =>\n $isSectionEnd &&\n css`\n margin-block-end: 16px;\n border-radius: 0 0 6px 6px;\n overflow: hidden;\n\n ${SectionItem} {\n border-bottom: none;\n\n &:first-child {\n border-bottom: 1px solid transparent;\n }\n }\n `}\n ${({ $isSectionBegin }) =>\n $isSectionBegin &&\n css`\n border-radius: 6px 6px 0 0;\n overflow: hidden;\n `}\n`;\n\nexport const Section = styled.div`\n border-radius: 6px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const Badge = styled.span`\n align-items: center;\n border-radius: 3px;\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.primaryBlue};\n display: flex;\n font-size: 9px;\n font-style: normal;\n height: 16px;\n justify-content: center;\n letter-spacing: -0.018px;\n margin-left: 4px;\n padding: 2px 3px;\n width: fit-content;\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Wrap","styled","div","Container","ContainerBase","resetButton","css","NewLabel","span","theme","colors","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","SectionItemImageWrap","SectionItemLabel","desktopNeutral12","$link","motif","size13","menu","active","$active","SectionItem","button","mobileMenuText","size14","$height","desktopNeutral2","desktopNeutral3","$secondary","desktopNeutral1","SectionItemLink","attrs","as","SectionItemsGroup","$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
|
115
115
|
`;
|
|
116
|
+
const SectionItemLink = styled(SectionItem).attrs({
|
|
117
|
+
as: "a"
|
|
118
|
+
})`
|
|
119
|
+
padding: 1px 6px;
|
|
120
|
+
`;
|
|
116
121
|
const SectionItemsGroup = styled.div`
|
|
117
122
|
display: flex;
|
|
118
123
|
flex-direction: column;
|
|
@@ -197,5 +202,5 @@ const Badge = styled.span`
|
|
|
197
202
|
padding: 2px 3px;
|
|
198
203
|
width: fit-content;
|
|
199
204
|
`;
|
|
200
|
-
export { Badge, ButtonIcon, Container, InnerWrap, NewLabel, SECTION_ITEM_HEIGHT, SECTION_ITEM_IMAGE_SIZE, Section, SectionItem, SectionItemArrowButton, SectionItemImageWrap, SectionItemLabel, SectionItemsGroup, Wrap };
|
|
205
|
+
export { Badge, ButtonIcon, Container, InnerWrap, NewLabel, SECTION_ITEM_HEIGHT, SECTION_ITEM_IMAGE_SIZE, Section, SectionItem, SectionItemArrowButton, SectionItemImageWrap, SectionItemLabel, SectionItemLink, SectionItemsGroup, Wrap };
|
|
201
206
|
//# sourceMappingURL=MobileMenu.styles.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileMenu.styles.mjs","sources":["../../../../src/components/Header/MobileLinksModal/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\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Wrap = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n`;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0;\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 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.div<{ motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\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 SectionItemLabel = styled.span<{\n motif: Motif;\n $link?: boolean;\n $active?: boolean;\n}>`\n ${resetButton}\n color: ${theme.colors.desktopNeutral12};\n flex-grow: 1;\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 4px;\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 ${({ $active }) =>\n $active &&\n `\n color: ${theme.colors.primaryBlue}\n `}\n`;\n\nexport const SectionItem = styled.button<{\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 outline: none;\n border: none;\n background: ${theme.colors.desktopNeutral2};\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n border-radius: 0 !important;\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${SectionItemLabel} {\n padding-left: 30px;\n background: ${theme.colors.desktopNeutral1};\n }\n `}\n`;\n\nexport const SectionItemsGroup = styled.div<{\n motif: Motif;\n $active?: boolean;\n $isSectionEnd?: boolean;\n $isSectionBegin?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n\n &:last-child {\n ${SectionItem} {\n border-bottom: none;\n }\n }\n\n &:nth-child(2) {\n ${SectionItem} {\n border-radius: 6px 6px 0 0;\n }\n }\n\n ${({ $active }) =>\n $active &&\n css`\n ${SectionItem} {\n border-bottom: 1px solid ${theme.colors.desktopNeutral3} !important;\n\n &:last-child {\n border-bottom: none !important;\n }\n }\n\n ${SectionItemLabel},\n ${SectionItemArrowButton} {\n background: ${theme.colors.desktopNeutral2};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n\n ${({ $isSectionEnd }) =>\n $isSectionEnd &&\n css`\n margin-block-end: 16px;\n border-radius: 0 0 6px 6px;\n overflow: hidden;\n\n ${SectionItem} {\n border-bottom: none;\n\n &:first-child {\n border-bottom: 1px solid transparent;\n }\n }\n `}\n ${({ $isSectionBegin }) =>\n $isSectionBegin &&\n css`\n border-radius: 6px 6px 0 0;\n overflow: hidden;\n `}\n`;\n\nexport const Section = styled.div`\n border-radius: 6px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const Badge = styled.span`\n align-items: center;\n border-radius: 3px;\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.primaryBlue};\n display: flex;\n font-size: 9px;\n font-style: normal;\n height: 16px;\n justify-content: center;\n letter-spacing: -0.018px;\n margin-left: 4px;\n padding: 2px 3px;\n width: fit-content;\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Wrap","styled","div","Container","ContainerBase","resetButton","css","NewLabel","span","theme","colors","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","SectionItemImageWrap","SectionItemLabel","desktopNeutral12","$link","motif","size13","menu","active","$active","SectionItem","button","mobileMenuText","size14","$height","desktopNeutral2","desktopNeutral3","$secondary","desktopNeutral1","SectionItemsGroup","$isSectionEnd","$isSectionBegin","Section","InnerWrap","Badge"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"MobileMenu.styles.mjs","sources":["../../../../src/components/Header/MobileLinksModal/MobileMenu.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n// eslint-disable-next-line import/no-named-as-default\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../constants/theme\";\nimport { Container as ContainerBase } from \"../../Container\";\n\nexport const SECTION_ITEM_HEIGHT = 46;\nexport const SECTION_ITEM_IMAGE_SIZE = 56;\n\nconst CONTAINER_WIDTH = 500;\nconst CONTAINER_SIDE_PADDING = 10;\n\nexport const Wrap = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n`;\n\nexport const Container = styled(ContainerBase)`\n max-width: ${CONTAINER_WIDTH + CONTAINER_SIDE_PADDING * 2}px;\n padding: 0;\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 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.div<{ motif: Motif }>`\n ${resetButton};\n\n height: 100%;\n width: ${SECTION_ITEM_HEIGHT}px;\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 SectionItemLabel = styled.span<{\n motif: Motif;\n $link?: boolean;\n $active?: boolean;\n}>`\n ${resetButton}\n color: ${theme.colors.desktopNeutral12};\n flex-grow: 1;\n padding: 0 20px;\n width: 100%;\n height: 100%;\n line-height: 1;\n display: flex;\n align-items: center;\n gap: 4px;\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 ${({ $active }) =>\n $active &&\n `\n color: ${theme.colors.primaryBlue}\n `}\n`;\n\nexport const SectionItem = styled.button<{\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 outline: none;\n border: none;\n background: ${theme.colors.desktopNeutral2};\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${({ $secondary }) =>\n $secondary &&\n css`\n border-radius: 0 !important;\n border-bottom: 1px solid ${theme.colors.desktopNeutral3};\n\n ${SectionItemLabel} {\n padding-left: 30px;\n background: ${theme.colors.desktopNeutral1};\n }\n `}\n`;\n\nexport const SectionItemLink = styled(SectionItem).attrs({ as: \"a\" })`\n padding: 1px 6px;\n`;\n\nexport const SectionItemsGroup = styled.div<{\n motif: Motif;\n $active?: boolean;\n $isSectionEnd?: boolean;\n $isSectionBegin?: boolean;\n}>`\n display: flex;\n flex-direction: column;\n\n &:last-child {\n ${SectionItem} {\n border-bottom: none;\n }\n }\n\n &:nth-child(2) {\n ${SectionItem} {\n border-radius: 6px 6px 0 0;\n }\n }\n\n ${({ $active }) =>\n $active &&\n css`\n ${SectionItem} {\n border-bottom: 1px solid ${theme.colors.desktopNeutral3} !important;\n\n &:last-child {\n border-bottom: none !important;\n }\n }\n\n ${SectionItemLabel},\n ${SectionItemArrowButton} {\n background: ${theme.colors.desktopNeutral2};\n }\n\n ${ButtonIcon} {\n transform: rotate(180deg);\n }\n `}\n\n ${({ $isSectionEnd }) =>\n $isSectionEnd &&\n css`\n margin-block-end: 16px;\n border-radius: 0 0 6px 6px;\n overflow: hidden;\n\n ${SectionItem} {\n border-bottom: none;\n\n &:first-child {\n border-bottom: 1px solid transparent;\n }\n }\n `}\n ${({ $isSectionBegin }) =>\n $isSectionBegin &&\n css`\n border-radius: 6px 6px 0 0;\n overflow: hidden;\n `}\n`;\n\nexport const Section = styled.div`\n border-radius: 6px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const Badge = styled.span`\n align-items: center;\n border-radius: 3px;\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.primaryBlue};\n display: flex;\n font-size: 9px;\n font-style: normal;\n height: 16px;\n justify-content: center;\n letter-spacing: -0.018px;\n margin-left: 4px;\n padding: 2px 3px;\n width: fit-content;\n`;\n"],"names":["SECTION_ITEM_HEIGHT","SECTION_ITEM_IMAGE_SIZE","CONTAINER_WIDTH","CONTAINER_SIDE_PADDING","Wrap","styled","div","Container","ContainerBase","resetButton","css","NewLabel","span","theme","colors","primaryBlue","font","size10","ButtonIcon","SectionItemArrowButton","SectionItemImageWrap","SectionItemLabel","desktopNeutral12","$link","motif","size13","menu","active","$active","SectionItem","button","mobileMenuText","size14","$height","desktopNeutral2","desktopNeutral3","$secondary","desktopNeutral1","SectionItemLink","attrs","as","SectionItemsGroup","$isSectionEnd","$isSectionBegin","Section","InnerWrap","Badge"],"mappings":";;;;;AAOO,MAAMA,mBAAsB,GAAA,EAAA;AAC5B,MAAMC,uBAA0B,GAAA,EAAA;AAEvC,MAAMC,eAAkB,GAAA,GAAA;AACxB,MAAMC,sBAAyB,GAAA,EAAA;AAExB,MAAMC,OAAOC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOd,MAAAC,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AAAA,KAGC;AAAA,CAAA;AAGE,MAAMkC,UAAUvC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOvB,MAAMuC,YAAYxC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAKzB,MAAMwC,QAAQzC,MAAO,CAAAO,IAAA;AAAA;AAAA;AAAA,sBAGNC,KAAA,CAAMC,OAAOC,WAAW;AAAA,WACnCF,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -46,7 +46,7 @@ var ScrollWrapper = require('../../ScrollWrapper/ScrollWrapper.js');
|
|
|
46
46
|
var MenuItem = require('../MenuItem/MenuItem.js');
|
|
47
47
|
var _externalAssets_g50k1DIN = require("../../../assets/search.svg");
|
|
48
48
|
var Tooltip = require('../../Tooltip/Tooltip.js');
|
|
49
|
-
var globe = require("../../../assets/
|
|
49
|
+
var globe = require("../../../assets/globe2.svg");
|
|
50
50
|
var HistoryIcon = require("../../../assets/icon-history.svg");
|
|
51
51
|
var EAIcon = require("../../../assets/icon-ea.svg");
|
|
52
52
|
var _externalAssets_DtGmfNK5 = require("../../../assets/closeLarge.svg");
|
|
@@ -44,7 +44,7 @@ import { ScrollWrapper } from '../../ScrollWrapper/ScrollWrapper.mjs';
|
|
|
44
44
|
import { MenuItem } from '../MenuItem/MenuItem.mjs';
|
|
45
45
|
import _externalAssets_g50k1DIN__default from "../../../assets/search.svg";
|
|
46
46
|
import { Tooltip } from '../../Tooltip/Tooltip.mjs';
|
|
47
|
-
import globe__default from "../../../assets/
|
|
47
|
+
import globe__default from "../../../assets/globe2.svg";
|
|
48
48
|
import HistoryIcon__default from "../../../assets/icon-history.svg";
|
|
49
49
|
import EAIcon__default from "../../../assets/icon-ea.svg";
|
|
50
50
|
import _externalAssets_DtGmfNK5__default from "../../../assets/closeLarge.svg";
|
|
@@ -39,7 +39,7 @@ var logoUnifi = require("../../../../assets/logoUnifi.svg");
|
|
|
39
39
|
var NavigationItem = require('./_components/NavigationItem/NavigationItem.js');
|
|
40
40
|
var DropdownMenu = require('../DropdownMenu/DropdownMenu.js');
|
|
41
41
|
var SubNavigation = require('./_components/SubNavigation/SubNavigation.js');
|
|
42
|
-
var globe = require("../../../../assets/
|
|
42
|
+
var globe = require("../../../../assets/globe2.svg");
|
|
43
43
|
var accountLogo = require("../../../../assets/account.svg");
|
|
44
44
|
var MobileMenu = require('../../../Header/MobileLinksModal/MobileMenu.js');
|
|
45
45
|
var MobileModal = require('../../../MobileModal/MobileModal.js');
|
|
@@ -76,8 +76,7 @@ const HeaderContent = ({
|
|
|
76
76
|
setActiveModal
|
|
77
77
|
} = context.useMicrositeMenu();
|
|
78
78
|
const {
|
|
79
|
-
createSiteUrl
|
|
80
|
-
storeId
|
|
79
|
+
createSiteUrl
|
|
81
80
|
} = context$1.useMenu();
|
|
82
81
|
const {
|
|
83
82
|
language
|
|
@@ -159,7 +158,6 @@ const HeaderContent = ({
|
|
|
159
158
|
document.body.style.overflow = "unset";
|
|
160
159
|
}
|
|
161
160
|
}, [activeModal]);
|
|
162
|
-
const getMenuItems = () => (menu?.items ?? []).filter(item => item.id !== mapping.FOOTER_LINKS_ID);
|
|
163
161
|
return /* @__PURE__ */jsxRuntime.jsx(HeaderContent_styles.StyledContainer, {
|
|
164
162
|
ref: wrapperRef,
|
|
165
163
|
children: showSiteMap ? /* @__PURE__ */jsxRuntime.jsx(SiteMap.SiteMap, {
|
|
@@ -198,7 +196,7 @@ const HeaderContent = ({
|
|
|
198
196
|
})
|
|
199
197
|
}), /* @__PURE__ */jsxRuntime.jsxs(HeaderContent_styles.ItemsWrap, {
|
|
200
198
|
onMouseLeave: () => setSelectedMenu(null),
|
|
201
|
-
children: [
|
|
199
|
+
children: [(menu?.items ?? []).map((item, index) => /* @__PURE__ */jsxRuntime.jsx(NavigationItem.NavigationItem, {
|
|
202
200
|
item,
|
|
203
201
|
motif: theme,
|
|
204
202
|
isActive: item.id === selectedMenu?.id,
|
|
@@ -269,7 +267,6 @@ const HeaderContent = ({
|
|
|
269
267
|
children: /* @__PURE__ */jsxRuntime.jsx(HeaderContent_styles.OverflowWrapper, {
|
|
270
268
|
children: /* @__PURE__ */jsxRuntime.jsx(MobileMenu.MobileLinksModal, {
|
|
271
269
|
menu,
|
|
272
|
-
storeId,
|
|
273
270
|
onMenuItemClick,
|
|
274
271
|
onModalClose: handleModalClose
|
|
275
272
|
})
|