@ubnt/store.core 9.49.0-new-design → 9.49.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/CHANGELOG.md +3 -71
- package/lib/_virtual/_virtual_multi-entry.js +0 -1
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +3 -2
- package/lib/assets/close3.svg +2 -3
- package/lib/assets/icons/menu/{icon-location-pin.svg.js → icon-globe.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
- package/lib/assets/logoUnifi.svg +2 -10
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/BackInStock/BackInStock.types.d.ts +0 -1
- package/lib/components/Button/Button.js +0 -7
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +1 -8
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +1 -3
- package/lib/components/Button/CartButton.js +4 -9
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +4 -8
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +4 -16
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +5 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +1 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +0 -4
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +2 -4
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +5 -8
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +6 -7
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +3 -4
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +4 -5
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/index.stories.d.ts +5 -5
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/Header/AccountMenu/AccountMenu.js +1 -11
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +3 -13
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +9 -9
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +9 -9
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +12 -7
- package/lib/components/Header/Header.styles.js +32 -10
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +31 -10
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +5 -29
- package/lib/components/Header/Header.types.js +1 -2
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +1 -2
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/IsolatedHeader.d.ts +0 -1
- package/lib/components/Header/IsolatedHeader.js +44 -44
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +46 -47
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +0 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +103 -110
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +104 -111
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -15
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -13
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +6 -12
- package/lib/components/Header/ProHeader/ProHeader.d.ts +5 -9
- package/lib/components/Header/ProHeader/ProHeader.js +168 -249
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +170 -250
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +25 -30
- package/lib/components/Header/ProHeader/ProHeader.styles.js +66 -119
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +65 -112
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +1 -4
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +2 -4
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +1 -4
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +2 -4
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +1 -4
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +2 -4
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +1 -7
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +2 -6
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +1 -4
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +2 -4
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +1 -4
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +2 -4
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +1 -4
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +2 -4
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +1 -4
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +2 -4
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +1 -4
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +2 -4
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +1 -4
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +1 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +1 -3
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +1 -3
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +1 -2
- package/lib/components/LoaderDots/LoaderDots.styles.js +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +0 -2
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +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/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +41 -5
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +21 -5
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +1 -1
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- 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/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/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/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +8 -16
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +8 -16
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +0 -2
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +4 -4
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +4 -4
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +1 -0
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +1 -0
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +2 -3
- 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/proStoreCategories/mapping/filters.d.ts +0 -16
- package/lib/constants/proStoreCategories/mapping/filters.js +0 -16
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +0 -16
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -3
- package/lib/constants/proStoreCategories/mapping/index.js +51 -45
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +49 -44
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +0 -5
- package/lib/constants/proStoreCategories/mapping/redirects.js +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +9 -8
- package/lib/constants/proStoreCategories/mapping/unifi.js +9 -8
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +9 -8
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +3 -4
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +3 -4
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +3 -45
- package/lib/constants/proStoreFilters/mapping.js +9 -119
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +9 -119
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/constants/theme.js +0 -4
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +0 -4
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/helpers/index.js +0 -1
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -1
- package/lib/helpers/ux.d.ts +0 -8
- package/lib/helpers/ux.js +0 -15
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +1 -15
- package/lib/helpers/ux.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/assets/cart-secondary.svg +0 -5
- package/lib/assets/icon-location-pin.svg +0 -5
- package/lib/assets/icons/cart-secondary.svg.js +0 -27
- package/lib/assets/icons/cart-secondary.svg.js.map +0 -1
- package/lib/assets/icons/cart-secondary.svg.mjs +0 -3
- package/lib/assets/icons/cart-secondary.svg.mjs.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +0 -6
- package/lib/components/Header/Header.stories.d.ts +0 -111
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +0 -7
- package/lib/components/Header/LogoIcon/LogoIcon.js +0 -46
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +0 -1
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +0 -36
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +0 -1
- package/lib/components/Header/LogoIcon/index.d.ts +0 -1
- package/lib/components/Header/LogoIcon/index.js +0 -6
- package/lib/components/Header/LogoIcon/index.js.map +0 -1
- package/lib/components/Header/LogoIcon/index.mjs +0 -3
- package/lib/components/Header/LogoIcon/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
## Releases
|
|
8
8
|
|
|
9
|
-
### 9.49.
|
|
9
|
+
### 9.49.1
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- [Feat] [MIC-511](https://ubiquiti.atlassian.net/browse/MIC-511) Update U7 Pro Outdoor availability date
|
|
12
12
|
|
|
13
13
|
### 9.49.0
|
|
14
14
|
|
|
@@ -24,36 +24,19 @@
|
|
|
24
24
|
|
|
25
25
|
- [Fix] [MIC-503](https://ubiquiti.atlassian.net/browse/MIC-503) Update Pro 8 PoE compare image
|
|
26
26
|
|
|
27
|
-
### 9.47.0-new-design
|
|
28
|
-
|
|
29
|
-
> Upstream with `master`
|
|
30
|
-
|
|
31
27
|
### 9.47.0
|
|
32
28
|
|
|
33
29
|
- [fix] Fix eslint issues around missing/incorrect awaits
|
|
34
30
|
- [NEP-3974](https://ubiquiti.atlassian.net/browse/NEP-3974) add 24tb storage size
|
|
35
31
|
|
|
36
|
-
### 9.46.0-new-design
|
|
37
|
-
|
|
38
|
-
> Upstream with `master`
|
|
39
|
-
|
|
40
32
|
### 9.46.0
|
|
41
33
|
|
|
42
34
|
- [chore] Add China new-platform store boilerplate
|
|
43
35
|
|
|
44
|
-
### 9.45.0-new-design
|
|
45
|
-
|
|
46
|
-
> Upstream with `master`
|
|
47
|
-
|
|
48
36
|
### 9.45.0
|
|
49
37
|
|
|
50
|
-
- [Feat] [NEP-3958](https://ubiquiti.atlassian.net/browse/NEP-3958) Add new `getTimeUntilEndOfHolidaySaleByStore` helper function for Holiday sale
|
|
51
|
-
|
|
52
|
-
### 9.44.3-new-design
|
|
53
|
-
|
|
54
38
|
- [chore] Misc eslint fixes (some actual bugs for rare-cases)
|
|
55
|
-
|
|
56
|
-
> Upstream with stable release
|
|
39
|
+
- [Feat] [NEP-3958](https://ubiquiti.atlassian.net/browse/NEP-3958) Add new `getTimeUntilEndOfHolidaySaleByStore` helper function for Holiday sale
|
|
57
40
|
|
|
58
41
|
### 9.44.2
|
|
59
42
|
|
|
@@ -67,10 +50,6 @@
|
|
|
67
50
|
|
|
68
51
|
- [NEP-3941](https://ubiquiti.atlassian.net/browse/NEP-3941) Set Store Mexico free days as null
|
|
69
52
|
|
|
70
|
-
### 9.43.0-new-design
|
|
71
|
-
|
|
72
|
-
> Upstream with stable release
|
|
73
|
-
|
|
74
53
|
### 9.43.0
|
|
75
54
|
|
|
76
55
|
- [Feat] [NEP-3934](https://ubiquiti.atlassian.net/browse/NEP-3934) Enable MX in production
|
|
@@ -83,10 +62,6 @@
|
|
|
83
62
|
|
|
84
63
|
- [Feat] [NEP-3930](https://ubiquiti.atlassian.net/browse/NEP-3930) Enable Enterprise (gateway) subcategory in BR
|
|
85
64
|
|
|
86
|
-
### 9.42.0-new-design
|
|
87
|
-
|
|
88
|
-
> Upstream with stable release
|
|
89
|
-
|
|
90
65
|
### 9.42.0
|
|
91
66
|
|
|
92
67
|
- [NEP-3928](https://ubiquiti.atlassian.net/browse/NEP-3928) Add new Door Access apple wallet filter
|
|
@@ -95,49 +70,6 @@
|
|
|
95
70
|
|
|
96
71
|
- [Feat] Add `withUbntLibraries` and enable SSR support for `ui-components`
|
|
97
72
|
|
|
98
|
-
### 9.40.1-new-design
|
|
99
|
-
|
|
100
|
-
- [Fix] Added missing secondary cart PR
|
|
101
|
-
|
|
102
|
-
### 9.40.0-new-design
|
|
103
|
-
|
|
104
|
-
> First new-design release
|
|
105
|
-
|
|
106
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) pro header inline categories variant
|
|
107
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix pro header inline rendering
|
|
108
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix pro mobile menu label
|
|
109
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) improve header max width handler
|
|
110
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) add loading state to account menu
|
|
111
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) add data-test-ids
|
|
112
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) improve search behavior and account menu
|
|
113
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) improve pro mobile menu links
|
|
114
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix search icon background
|
|
115
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) desktop search improvements
|
|
116
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix pro mobile menu top level actions
|
|
117
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) search input adjustments
|
|
118
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) update category mapping and redirects
|
|
119
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix all cloud gateway slug
|
|
120
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) abstract inline categories to be the default layout
|
|
121
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) add header logo prop
|
|
122
|
-
- [Feat] [NEP-3413](https://ubiquiti.atlassian.net/browse/NEP-3413) abstract isolated header layout
|
|
123
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) add hide logo prop
|
|
124
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) add url logo prop
|
|
125
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix logo hide prop
|
|
126
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) adjust continue shopping button style
|
|
127
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) fix isolated header spacing and button position
|
|
128
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) current store flag and name
|
|
129
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) remove pro hover menu; add product line conditional menu
|
|
130
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) improve desktop search focus; add flag to mobile menu
|
|
131
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) adjust unifi logo svg size
|
|
132
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) increase header line loader z index; remove search input id; add new search props
|
|
133
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) remove search input overflow
|
|
134
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) remove mobile search and use inline search bar
|
|
135
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) search focus border and focus improvement
|
|
136
|
-
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) adjust search autofocus to be manual
|
|
137
|
-
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) Reorganize categories for current production and new-design
|
|
138
|
-
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Add filter "Client devices" for cloud gateways
|
|
139
|
-
- [Feat] [NEP-3591](https://ubiquiti.atlassian.net/browse/NEP-3591) Add underline style tabs, add "loading" prop to backInStock propTypes
|
|
140
|
-
|
|
141
73
|
### 9.40.0
|
|
142
74
|
|
|
143
75
|
- [Feat] [MIC-473](https://ubiquiti.atlassian.net/browse/MIC-473) E7 release changes:
|
|
@@ -205,7 +205,6 @@ exports.isValidSubCategory = proStoreCategories.isValidSubCategory;
|
|
|
205
205
|
exports.parseCategories = proStoreCategories.parseCategories;
|
|
206
206
|
exports.useTranslatedCategories = proStoreCategories.useTranslatedCategories;
|
|
207
207
|
exports.getTrueOffsetY = ux.getTrueOffsetY;
|
|
208
|
-
exports.getTrueSize = ux.getTrueSize;
|
|
209
208
|
exports.scrollIntoView = ux.scrollIntoView;
|
|
210
209
|
exports.scrollToY = ux.scrollToY;
|
|
211
210
|
exports.smartcat = smartcat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_virtual_multi-entry.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_virtual_multi-entry.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -175,7 +175,7 @@ export { index$V as proStoreCategories };
|
|
|
175
175
|
import * as index$W from '../constants/proStoreFilters/index.mjs';
|
|
176
176
|
export { index$W as proStoreFilters };
|
|
177
177
|
export { getCategoriesBySubcategory, getLocalizedCategories, getProductLineByCategory, getProductLineBySubcategory, getSubCategoryIdByCollectionSlug, isValidSubCategory, parseCategories, useTranslatedCategories } from '../helpers/proStoreCategories.mjs';
|
|
178
|
-
export { getTrueOffsetY,
|
|
178
|
+
export { getTrueOffsetY, scrollIntoView, scrollToY } from '../helpers/ux.mjs';
|
|
179
179
|
import * as smartcat from '../apis/smartcat.mjs';
|
|
180
180
|
export { smartcat };
|
|
181
181
|
//# sourceMappingURL=_virtual_multi-entry.mjs.map
|
package/lib/assets/attention.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<circle cx="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<circle cx="
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="8" cy="8" r="8" fill="#A4A7B5"/>
|
|
3
|
+
<path d="M12.1136 10.125L8.64952 4.125C8.36084 3.625 7.63916 3.625 7.35048 4.125L3.88638 10.125C3.5977 10.625 3.95855 11.25 4.5359 11.25H11.4641C12.0415 11.25 12.4023 10.625 12.1136 10.125Z" stroke="white" stroke-width="0.5"/>
|
|
4
|
+
<path d="M8.19799 8.11407L8.42929 6.49497C8.46661 6.23373 8.2639 6 8 6C7.7361 6 7.53339 6.23373 7.57071 6.49497L7.80201 8.11407C7.83472 8.34302 8.16528 8.34303 8.19799 8.11407Z" fill="white"/>
|
|
5
|
+
<circle cx="8" cy="9.5" r="0.5" fill="white"/>
|
|
6
6
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<circle cx="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<circle cx="
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="9" cy="9" r="9" fill="#F7D55E"/>
|
|
3
|
+
<path d="M9.73071 4.64062C9.40595 4.07813 8.59405 4.07812 8.26929 4.64062L4.37218 11.3906C4.04742 11.9531 4.45336 12.6562 5.10288 12.6562H12.8971C13.5466 12.6562 13.9526 11.9531 13.6278 11.3906L9.73071 4.64062Z" stroke="white" stroke-width="0.5625"/>
|
|
4
|
+
<path d="M9.22274 9.12833L9.48295 7.30685C9.52494 7.01295 9.29688 6.75 9 6.75C8.70312 6.75 8.47506 7.01295 8.51705 7.30685L8.77726 9.12833C8.81406 9.3859 9.18594 9.3859 9.22274 9.12833Z" fill="white"/>
|
|
5
|
+
<circle cx="9" cy="10.6875" r="0.5625" fill="#F7D55E"/>
|
|
6
6
|
</svg>
|
package/lib/assets/close2.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
3
4
|
</svg>
|
package/lib/assets/close3.svg
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.7175 18.6475C5.4275 18.9375 5.4275 19.4175 5.7175 19.7075C6.0075 19.9975 6.4875 19.9975 6.7775 19.7075L12.9675 13.5175L19.1575 19.7075C19.4475 19.9975 19.9275 19.9975 20.2175 19.7075C20.5075 19.4175 20.5075 18.9375 20.2175 18.6475L14.0275 12.4675L20.2175 6.2775C20.5075 5.9875 20.5075 5.5075 20.2175 5.2175C19.9275 4.9275 19.4475 4.9275 19.1575 5.2175L12.9675 11.4075L6.7775 5.2175C6.4875 4.9275 6.0075 4.9275 5.7175 5.2175C5.4275 5.5075 5.4275 5.9875 5.7175 6.2775L11.9075 12.4675L5.7175 18.6475Z" fill="#36373C"/>
|
|
4
3
|
</svg>
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var GlobeIcon = require("../../globe.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var GlobeIcon__default = /*#__PURE__*/_interopDefault(GlobeIcon);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return GlobeIcon__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(GlobeIcon).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return GlobeIcon[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
//# sourceMappingURL=icon-
|
|
27
|
+
//# sourceMappingURL=icon-globe.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-globe.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-globe.svg.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/lib/assets/logoUnifi.svg
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="46" height="14" viewBox="0 0 46 14" fill="none"
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="M54.2476 2.1844C54.2476 3.36186 55.2244 4.33873 56.432 4.33873C57.6094 4.33873 58.5862 3.39189 58.5862 2.1844C58.5862 0.976868 57.6394 0 56.432 0C55.2244 0 54.2476 1.0069 54.2476 2.1844Z" fill="currentColor"/>
|
|
5
|
-
<path d="M38.7133 5.85562H34.9576V17.8594H38.7133V5.85562Z" fill="currentColor"/>
|
|
6
|
-
<path d="M52.4907 0.532516H41.8557V17.8594H45.6114V11.3138H51.3995V8.03815H45.6114V3.80814H52.4907V0.532516Z" fill="currentColor"/>
|
|
7
|
-
<path d="M58.2957 5.85562H54.54V17.8594H58.2957V5.85562Z" fill="currentColor"/>
|
|
8
|
-
<path d="M13.0968 8.03815V5.85191H15.2776V3.66939H17.46V5.85191H15.2794V8.03439H17.4619V8.72626C17.4619 9.52501 17.3943 10.4719 17.2368 11.2163C17.1506 11.6325 17.0175 12.045 16.8618 12.4425C16.7646 12.691 16.6582 12.9325 16.5443 13.1623L16.4958 13.259C16.4788 13.2921 16.4615 13.3249 16.4443 13.3575L16.4132 13.4156C16.4002 13.4399 16.387 13.464 16.3737 13.488C16.3553 13.5211 16.3369 13.5539 16.3182 13.5863C16.0574 14.0419 15.7557 14.4787 15.405 14.8894L15.3631 14.9384L15.3604 14.9417C15.2747 15.0419 15.1901 15.1408 15.0974 15.2382C14.9907 15.3525 14.8801 15.4613 14.7675 15.5681C13.3705 16.9125 11.5519 17.7525 9.64874 17.9457C9.42004 17.9681 8.96063 17.9925 8.72992 17.9925C8.6131 17.9925 8.43732 17.9863 8.26263 17.9772C8.0929 17.9683 7.92407 17.9567 7.81128 17.9457C5.90808 17.7525 4.08929 16.9125 2.69257 15.5681L2.65009 15.5263L2.64844 15.5246C2.55249 15.4307 2.45691 15.3373 2.36444 15.2382C2.25568 15.1238 2.15808 15.0075 2.05682 14.8894C1.70819 14.4787 1.40442 14.0419 1.14368 13.5863C1.08252 13.4789 1.02264 13.3676 0.9646 13.2531C0.914062 13.1535 0.864807 13.0514 0.817017 12.9475C0.78186 12.8713 0.74762 12.794 0.714294 12.7159C0.69873 12.6796 0.68335 12.6432 0.668152 12.6066L0.645447 12.5513L0.624939 12.5006L0.601868 12.4425C0.444397 12.045 0.31311 11.6325 0.225037 11.2163C0.0675659 10.4738 0 9.52501 0 8.72626V0.532516H4.36304V8.03815L4.3634 8.17635C4.36359 8.25618 4.36395 8.36105 4.36469 8.4646C4.36578 8.59772 4.36761 8.72864 4.37054 8.80128C4.38007 9.06001 4.3894 9.31316 4.41559 9.56438C4.48883 10.2394 4.63696 10.8769 4.9444 11.4188C5.0343 11.5763 5.12439 11.7263 5.23132 11.8706C5.88757 12.7462 6.88495 13.4025 8.1319 13.5863C8.28003 13.6069 8.57996 13.6257 8.72992 13.6257C8.88007 13.6257 9.17999 13.6088 9.32812 13.5863C10.5731 13.4025 11.5724 12.7462 12.2287 11.8706C12.2944 11.7833 12.3534 11.6933 12.4092 11.6013C12.4457 11.5412 12.4808 11.4803 12.5156 11.4188C12.8231 10.8769 12.9732 10.2394 13.0444 9.56438C13.0706 9.31316 13.08 9.06001 13.0893 8.80128C13.0928 8.71367 13.0946 8.54132 13.0957 8.38257L13.0966 8.1503L13.0968 8.03815Z" fill="currentColor"/>
|
|
9
|
-
<path d="M15.2776 3.66939H13.6406V2.03252H15.2776V3.66939Z" fill="currentColor"/>
|
|
10
|
-
<path d="M15.8231 0.395645H16.9144V1.48686H15.8231V0.395645Z" fill="currentColor"/>
|
|
11
|
-
<path d="M31.8168 17.8594H28.0875V10.8018C28.0875 10.8018 28.0875 10.5544 28.0838 10.4737V10.4686C28.08 10.3598 28.0761 10.2527 28.0649 10.1456C28.0349 9.85684 27.9712 9.58122 27.8381 9.34872L27.8309 9.33618L27.8282 9.33138C27.7921 9.26999 27.7571 9.2103 27.7143 9.15372C27.4312 8.77684 27.0037 8.49564 26.4675 8.41685C26.4435 8.4126 26.4102 8.40889 26.3747 8.40591L26.3331 8.40285C26.2868 8.39983 26.2412 8.39809 26.2106 8.39809C26.1731 8.39919 26.113 8.40221 26.0568 8.40642C26.0175 8.40939 25.9799 8.41296 25.9537 8.41685C25.4174 8.49564 24.988 8.77684 24.7068 9.15372C24.6965 9.16759 24.6866 9.18146 24.6771 9.19537C24.6669 9.21039 24.657 9.22545 24.6473 9.2406C24.6248 9.27594 24.6037 9.31178 24.5832 9.34872C24.4519 9.58122 24.3862 9.85684 24.3561 10.1456C24.3431 10.2544 24.3393 10.3631 24.3356 10.4737C24.3338 10.5544 24.3338 10.8018 24.3338 10.8018V17.8462H20.6025V5.84248H24.1968V6.93375C24.1968 6.93375 25.4756 5.34 28.0294 5.45247C30.3243 5.55373 31.8168 7.31625 31.8168 9.70876V17.8594Z" fill="currentColor"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.9757 1.69953C26.9757 2.61581 27.7357 3.3758 28.6743 3.3758V3.37487C29.5906 3.37487 30.3506 2.6372 30.3506 1.6986C30.3506 0.759998 29.6139 0 28.6743 0C27.7348 0 26.9757 0.783254 26.9757 1.69953ZM42.212 1.69953C42.212 2.61581 42.972 3.3758 43.9106 3.3758V3.37487C44.8269 3.37487 45.5868 2.6372 45.5868 1.6986C45.5868 0.759998 44.8492 0 43.9106 0C42.972 0 42.212 0.783254 42.212 1.69953ZM30.1246 4.55534H27.2018V13.8958H30.1246V4.55534ZM40.8436 0.413063H32.5683V13.8967H35.4911V8.80281H39.9943V6.25398H35.4911V2.96189H40.8436V0.413063ZM45.3608 4.55534H42.438V13.8958H45.3608V4.55534ZM10.1907 6.25398V4.55259H10.1916H11.8893V6.25119H13.5869V6.78886C13.5869 7.41118 13.5339 8.14792 13.4121 8.72746C13.3441 9.05118 13.2409 9.37304 13.12 9.68187C12.9962 9.99722 12.853 10.2995 12.6976 10.5712C12.4948 10.9247 12.2595 11.2651 11.9869 11.5842L11.9657 11.6092C11.8949 11.6928 11.8248 11.7755 11.7479 11.8558C11.6651 11.9451 11.5786 12.0288 11.4911 12.1126C10.4046 13.1591 8.98788 13.8121 7.50789 13.9628C7.33021 13.9814 6.97207 14 6.79347 14C6.61486 13.9991 6.25673 13.9805 6.07905 13.9628C4.59813 13.8121 3.18232 13.1591 2.09581 12.1126L2.09488 12.1117L2.09488 12.1117L2.09487 12.1117L2.09486 12.1117C2.00774 12.0273 1.92156 11.9439 1.83906 11.8558C1.76211 11.7755 1.69207 11.6928 1.62126 11.6093L1.62124 11.6092L1.6 11.5842C1.32744 11.2651 1.09209 10.9256 0.8893 10.5712C0.733951 10.3005 0.590696 9.99815 0.466975 9.68187C0.346046 9.37304 0.24279 9.05118 0.174883 8.72746C0.0530231 8.14792 0 7.41118 0 6.78886V0.413063H3.39441V6.25398C3.39441 6.25398 3.39441 6.70142 3.39999 6.84839L3.40102 6.8765C3.40807 7.06849 3.41494 7.25565 3.43534 7.44281C3.49115 7.96746 3.60743 8.46513 3.8465 8.8856C3.91534 9.00746 3.98604 9.1256 4.06976 9.23722C4.58045 9.91815 5.35812 10.4298 6.32742 10.5721C6.44277 10.5888 6.67626 10.6037 6.79254 10.6037C6.90975 10.6037 7.1423 10.5888 7.25765 10.5721C8.22695 10.4298 9.00463 9.91815 9.51532 9.23722C9.59904 9.12467 9.66974 9.00746 9.73858 8.8856C9.97765 8.4642 10.0939 7.96746 10.1497 7.44281C10.1701 7.25566 10.177 7.06852 10.1841 6.87653V6.87652V6.87651V6.8765V6.87649L10.1851 6.84839C10.1907 6.70142 10.1907 6.25398 10.1907 6.25398ZM11.8874 1.58144H10.6139V2.85492H11.8874V1.58144ZM12.3125 0.307027H13.1618V1.15633H12.3125V0.307027ZM13.586 4.55258H11.8883V3.80839V2.85491H13.586V4.55258ZM24.7581 13.8967H21.8548V13.8958V8.40555C21.8548 8.40555 21.8548 8.213 21.852 8.14974C21.8493 8.06323 21.8465 7.97858 21.8372 7.89393C21.813 7.66788 21.7637 7.45393 21.6604 7.27347C21.6307 7.22137 21.6009 7.17114 21.5646 7.12277C21.3451 6.82974 21.0111 6.61021 20.5944 6.54882C20.5451 6.54137 20.4446 6.53486 20.3944 6.53486C20.3441 6.53486 20.2437 6.54137 20.1944 6.54882C19.7776 6.61021 19.4437 6.82974 19.2241 7.12277C19.1879 7.17021 19.1581 7.22137 19.1283 7.27347C19.0251 7.45486 18.9758 7.66881 18.9516 7.89393C18.9432 7.97858 18.9395 8.06323 18.9367 8.14974C18.9339 8.213 18.9339 8.40555 18.9339 8.40555V13.8865H16.0307V4.54603H18.8279V5.39533C18.8279 5.39533 19.8241 4.15533 21.8111 4.24278C23.5972 4.32185 24.7581 5.69207 24.7581 7.55439V13.8967Z" fill="currentColor"/>
|
|
12
4
|
</svg>
|
package/lib/assets/pause.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="13" height="17" viewBox="0 0 13 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.232422" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
3
|
+
<rect x="8.23242" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/pause2.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="6" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
3
|
+
<rect x="12" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/udmPro.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmPro2.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmProMax.jpg
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -36,12 +36,6 @@ const Button = react.forwardRef(function Button2({
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}, [disabled, loading, loadAfterAction, onClick]);
|
|
39
|
-
const loaderDotsColor = react.useMemo(() => {
|
|
40
|
-
if (args.variant === "secondary") {
|
|
41
|
-
return "primaryBlue";
|
|
42
|
-
}
|
|
43
|
-
return "white";
|
|
44
|
-
}, [args.variant]);
|
|
45
39
|
return /* @__PURE__ */jsxRuntime.jsx(Button_styles.StyledButton, {
|
|
46
40
|
...args,
|
|
47
41
|
as: anchor ? "a" : void 0,
|
|
@@ -54,7 +48,6 @@ const Button = react.forwardRef(function Button2({
|
|
|
54
48
|
children: /* @__PURE__ */jsxRuntime.jsxs(Button_styles.InnerWrap, {
|
|
55
49
|
children: [loading && /* @__PURE__ */jsxRuntime.jsx(Button_styles.LoaderDotsWrap, {
|
|
56
50
|
children: /* @__PURE__ */jsxRuntime.jsx(LoaderDots.LoaderDots, {
|
|
57
|
-
color: loaderDotsColor,
|
|
58
51
|
size: size === "large" ? "large" : void 0
|
|
59
52
|
})
|
|
60
53
|
}), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect,
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots size={size === \"large\" ? \"large\" : undefined} />\n </S.LoaderDotsWrap>\n )}\n {children}\n </S.InnerWrap>\n </S.StyledButton>\n );\n});\n"],"names":["BUTTON_LOADING_DELAY_MS","Button","forwardRef","Button2","children","anchor","size","loading","loadingInitial","loadAfterAction","disabled","flush","onClick","args","ref","setLoading","useState","useEffect","onClickCustom","useCallback","e","preventDefault","stopPropagation","setTimeout","jsx","S.StyledButton","StyledButton","as","$flush","$loading","jsxs","S.InnerWrap","S.LoaderDotsWrap","LoaderDots"],"mappings":";;;;;;;;AAOO,MAAMA,uBAA0B,GAAA,GAAA;AAE1B,MAAAC,MAAA,GAASC,KAAAA,CAAAA,UAGpB,CAAA,SAASD,OACTE,CAAA;EACEC,QAAA;EACAC,MAAA;EACAC,IAAO,GAAA,QAAA;EACPC,OAAS,EAAAC,cAAA;EACTC,eAAA;EACAC,QAAA;EACAC,KAAA;EACAC,OAAA;EACA,GAAGC;AACL,CAAA,EACAC,GACA,EAAA;EAIA,MAAM,CAACP,OAAS,EAAAQ,UAAU,IAAIC,KAAAA,CAAAA,QAAS,CAAA,CAAC,CAACR,cAAc,CAAA;EAGvDS,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACHF,UAAA,CAAA,CAAC,CAACP,cAAc,CAAA;EAAA,CAC7B,EAAG,CAACA,cAAc,CAAC,CAAA;EAKnB,MAAMU,aAAgB,GAAAC,KAAA,CAAAA,WAAA,CACnBC,CAA+B,IAAA;IAE9B,IAAIb,WAAWG,QAAU,EAAA;MACvBU,CAAA,CAAEC,cAAe,CAAA,CAAA;MACjBD,CAAA,CAAEE,eAAgB,CAAA,CAAA;MAClB;IACF;IAGA,IAAIV,OAAS,EAAA;MACXA,OAAA,CAAQQ,CAAC,CAAA;MAGT,IAAIX,eAAiB,EAAA;QACnBM,UAAA,CAAW,IAAI,CAAA;QACfQ,UAAA,CAAW,MAAMR,UAAA,CAAW,KAAK,CAAA,EAAGf,uBAAuB,CAAA;MAC7D;IACF;EACF,CAAA,EACA,CAACU,QAAA,EAAUH,OAAS,EAAAE,eAAA,EAAiBG,OAAO,CAAA,CAC9C;EAME,sBAAAY,UAAA,CAAAA,GAAA,CAACC,aAAE,CAAAC,YAAA,EAAF;IACE,GAAGb,IAAA;IACJc,EAAA,EAAItB,SAAS,GAAM,GAAA,KAAA,CAAA;IACnBK,UAAUA,QAAY,IAAAH,OAAA;IACtBD,IAAA;IACAsB,MAAQ,EAAAjB,KAAA;IACRkB,QAAU,EAAAtB,OAAA;IACVK,OAAS,EAAAM,aAAA;IAETJ,GAAA;IAEAV,QAAA,iBAAA0B,UAAA,CAAAA,IAAA,CAACC,uBAAE,EAAF;MACE3B,QAAA,EAAA,CACCG,OAAA,IAAAiB,eAAAA,UAAAA,CAAAA,GAAA,CAACQ,aAAAA,CAAAA,cAAE,EAAF;QACC5B,QAAA,EAAA,eAAAoB,UAAA,CAAAA,GAAA,CAACS,UAAW,CAAAA,UAAA,EAAA;UAAA3B,IAAA,EAAMA,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,KAAA;QAAA,CAAW;MAC5D,CAAA,CAAA,EAEDF,QAAA;KACH;EAAA,CAAA,CACF;AAEJ,CAAC,CAAA;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useState, useEffect, useCallback
|
|
2
|
+
import { forwardRef, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import '../LoaderDots/index.mjs';
|
|
4
4
|
import { StyledButton, InnerWrap, LoaderDotsWrap } from './Button.styles.mjs';
|
|
5
5
|
import { LoaderDots } from '../LoaderDots/LoaderDots.mjs';
|
|
@@ -34,12 +34,6 @@ const Button = forwardRef(function Button2({
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}, [disabled, loading, loadAfterAction, onClick]);
|
|
37
|
-
const loaderDotsColor = useMemo(() => {
|
|
38
|
-
if (args.variant === "secondary") {
|
|
39
|
-
return "primaryBlue";
|
|
40
|
-
}
|
|
41
|
-
return "white";
|
|
42
|
-
}, [args.variant]);
|
|
43
37
|
return /* @__PURE__ */jsx(StyledButton, {
|
|
44
38
|
...args,
|
|
45
39
|
as: anchor ? "a" : void 0,
|
|
@@ -52,7 +46,6 @@ const Button = forwardRef(function Button2({
|
|
|
52
46
|
children: /* @__PURE__ */jsxs(InnerWrap, {
|
|
53
47
|
children: [loading && /* @__PURE__ */jsx(LoaderDotsWrap, {
|
|
54
48
|
children: /* @__PURE__ */jsx(LoaderDots, {
|
|
55
|
-
color: loaderDotsColor,
|
|
56
49
|
size: size === "large" ? "large" : void 0
|
|
57
50
|
})
|
|
58
51
|
}), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect,
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots size={size === \"large\" ? \"large\" : undefined} />\n </S.LoaderDotsWrap>\n )}\n {children}\n </S.InnerWrap>\n </S.StyledButton>\n );\n});\n"],"names":["BUTTON_LOADING_DELAY_MS","Button","forwardRef","Button2","children","anchor","size","loading","loadingInitial","loadAfterAction","disabled","flush","onClick","args","ref","setLoading","useState","useEffect","onClickCustom","useCallback","e","preventDefault","stopPropagation","setTimeout","jsx","S.StyledButton","as","$flush","$loading","jsxs","S.InnerWrap","S.LoaderDotsWrap","LoaderDots"],"mappings":";;;;;;AAOO,MAAMA,uBAA0B,GAAA,GAAA;AAE1B,MAAAC,MAAA,GAASC,UAGpB,CAAA,SAASD,OACTE,CAAA;EACEC,QAAA;EACAC,MAAA;EACAC,IAAO,GAAA,QAAA;EACPC,OAAS,EAAAC,cAAA;EACTC,eAAA;EACAC,QAAA;EACAC,KAAA;EACAC,OAAA;EACA,GAAGC;AACL,CAAA,EACAC,GACA,EAAA;EAIA,MAAM,CAACP,OAAS,EAAAQ,UAAU,IAAIC,QAAS,CAAA,CAAC,CAACR,cAAc,CAAA;EAGvDS,SAAA,CAAU,MAAM;IACHF,UAAA,CAAA,CAAC,CAACP,cAAc,CAAA;EAAA,CAC7B,EAAG,CAACA,cAAc,CAAC,CAAA;EAKnB,MAAMU,aAAgB,GAAAC,WAAA,CACnBC,CAA+B,IAAA;IAE9B,IAAIb,WAAWG,QAAU,EAAA;MACvBU,CAAA,CAAEC,cAAe,CAAA,CAAA;MACjBD,CAAA,CAAEE,eAAgB,CAAA,CAAA;MAClB;IACF;IAGA,IAAIV,OAAS,EAAA;MACXA,OAAA,CAAQQ,CAAC,CAAA;MAGT,IAAIX,eAAiB,EAAA;QACnBM,UAAA,CAAW,IAAI,CAAA;QACfQ,UAAA,CAAW,MAAMR,UAAA,CAAW,KAAK,CAAA,EAAGf,uBAAuB,CAAA;MAC7D;IACF;EACF,CAAA,EACA,CAACU,QAAA,EAAUH,OAAS,EAAAE,eAAA,EAAiBG,OAAO,CAAA,CAC9C;EAME,sBAAAY,GAAA,CAACC,YAAE,EAAF;IACE,GAAGZ,IAAA;IACJa,EAAA,EAAIrB,SAAS,GAAM,GAAA,KAAA,CAAA;IACnBK,UAAUA,QAAY,IAAAH,OAAA;IACtBD,IAAA;IACAqB,MAAQ,EAAAhB,KAAA;IACRiB,QAAU,EAAArB,OAAA;IACVK,OAAS,EAAAM,aAAA;IAETJ,GAAA;IAEAV,QAAA,iBAAAyB,IAAA,CAACC,SAAE,EAAF;MACE1B,QAAA,EAAA,CACCG,OAAA,IAAA,eAAAiB,GAAA,CAACO,cAAE,EAAF;QACC3B,QAAA,EAAA,eAAAoB,GAAA,CAACQ,UAAW,EAAA;UAAA1B,IAAA,EAAMA,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,KAAA;QAAA,CAAW;MAC5D,CAAA,CAAA,EAEDF,QAAA;KACH;EAAA,CAAA,CACF;AAEJ,CAAC,CAAA;"}
|
|
@@ -13,7 +13,5 @@ export interface CartButtonProps extends ButtonProps {
|
|
|
13
13
|
* (optional) Label to display on the button. If not provided, only the icon will be displayed
|
|
14
14
|
*/
|
|
15
15
|
label?: string;
|
|
16
|
-
iconWidth?: number;
|
|
17
|
-
iconHeight?: number;
|
|
18
16
|
}
|
|
19
|
-
export declare const CartButton: ({ icon, hideIcon, preLabel, label,
|
|
17
|
+
export declare const CartButton: ({ icon, hideIcon, preLabel, label, ...props }: CartButtonProps) => JSX.Element;
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
|
-
require('../../assets/icons/cart-secondary.svg.js');
|
|
7
6
|
require('../../assets/icons/cart.svg.js');
|
|
8
7
|
require('../../assets/icons/cartPlus.svg.js');
|
|
9
8
|
require('../StyleableSvgImage/index.js');
|
|
10
9
|
var Button = require('./Button.js');
|
|
11
10
|
var CartPlusIcon = require("../../assets/cartPlus.svg");
|
|
12
|
-
var CartIconSecondary = require("../../assets/cart-secondary.svg");
|
|
13
11
|
var CartIcon = require("../../assets/cart.svg");
|
|
14
12
|
var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
|
|
15
13
|
function _interopDefault(e) {
|
|
@@ -19,7 +17,6 @@ function _interopDefault(e) {
|
|
|
19
17
|
}
|
|
20
18
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
21
19
|
var CartPlusIcon__default = /*#__PURE__*/_interopDefault(CartPlusIcon);
|
|
22
|
-
var CartIconSecondary__default = /*#__PURE__*/_interopDefault(CartIconSecondary);
|
|
23
20
|
var CartIcon__default = /*#__PURE__*/_interopDefault(CartIcon);
|
|
24
21
|
"use strict";
|
|
25
22
|
const ButtonStyled = styled__default["default"](Button.Button)`
|
|
@@ -76,18 +73,16 @@ const CartButton = function CartButton2({
|
|
|
76
73
|
hideIcon,
|
|
77
74
|
preLabel,
|
|
78
75
|
label,
|
|
79
|
-
iconHeight = 16,
|
|
80
|
-
iconWidth = 20,
|
|
81
76
|
...props
|
|
82
77
|
}) {
|
|
83
78
|
const Icon = react.useMemo(() => {
|
|
84
79
|
switch (icon) {
|
|
85
80
|
case "cart":
|
|
86
|
-
return
|
|
81
|
+
return CartIcon__default["default"];
|
|
87
82
|
case "plus":
|
|
88
83
|
return CartPlusIcon__default["default"];
|
|
89
84
|
}
|
|
90
|
-
}, [icon
|
|
85
|
+
}, [icon]);
|
|
91
86
|
return /* @__PURE__ */jsxRuntime.jsx(ButtonStyled, {
|
|
92
87
|
...props,
|
|
93
88
|
label,
|
|
@@ -95,8 +90,8 @@ const CartButton = function CartButton2({
|
|
|
95
90
|
children: /* @__PURE__ */jsxRuntime.jsxs(ButtonInnerWrap, {
|
|
96
91
|
children: [!hideIcon && /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
97
92
|
src: Icon,
|
|
98
|
-
width:
|
|
99
|
-
height:
|
|
93
|
+
width: 20,
|
|
94
|
+
height: 16
|
|
100
95
|
}), (!!preLabel || !!label) && /* @__PURE__ */jsxRuntime.jsxs(Labels, {
|
|
101
96
|
children: [!!preLabel && /* @__PURE__ */jsxRuntime.jsx(PreLabel, {
|
|
102
97
|
children: preLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartButton.js","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport
|
|
1
|
+
{"version":3,"file":"CartButton.js","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,YAAA,GAAeC,eAAAA,CAAAA,SAAAA,EAAOC,MAAAA,CAAAA,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,UAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,UAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,MAAAA,CAAAA,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACA,GAAGc;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,KAAAA,CAAAA,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,4BAAA;MAET,KAAK,MAAA;QACI,OAAAC,gCAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,OAAA,8BACGf,YAAc,EAAA;IAAA,GAAGiB;IAAOd,KAAc;IAAAC,QAAA;IACrCkB,yCAAChB,eACE,EAAA;MAAAgB,QAAA,EAAA,CAAC,CAAAN,QAAA,kCAAaO,iBAAkB,CAAAA,iBAAA,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAAA,CACjE,CAAC,CAACtB,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,+BACfK,MACE,EAAA;QAAAc,QAAA,EAAA,CAAA,CAAC,CAAClB,QAAA,IAAA,eAAauB,UAAA,CAAAA,GAAA,CAAAlB,QAAA,EAAA;UAAUa,QAAS,EAAAlB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAAwB,UAAA,CAAAA,GAAA,CAAChB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbkB,QAAA,EAAAnB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
-
import '../../assets/icons/cart-secondary.svg.mjs';
|
|
5
4
|
import '../../assets/icons/cart.svg.mjs';
|
|
6
5
|
import '../../assets/icons/cartPlus.svg.mjs';
|
|
7
6
|
import '../StyleableSvgImage/index.mjs';
|
|
8
7
|
import { Button } from './Button.mjs';
|
|
9
8
|
import CartPlusIcon__default from "../../assets/cartPlus.svg";
|
|
10
|
-
import CartIconSecondary__default from "../../assets/cart-secondary.svg";
|
|
11
9
|
import CartIcon__default from "../../assets/cart.svg";
|
|
12
10
|
import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
13
11
|
"use strict";
|
|
@@ -65,18 +63,16 @@ const CartButton = function CartButton2({
|
|
|
65
63
|
hideIcon,
|
|
66
64
|
preLabel,
|
|
67
65
|
label,
|
|
68
|
-
iconHeight = 16,
|
|
69
|
-
iconWidth = 20,
|
|
70
66
|
...props
|
|
71
67
|
}) {
|
|
72
68
|
const Icon = useMemo(() => {
|
|
73
69
|
switch (icon) {
|
|
74
70
|
case "cart":
|
|
75
|
-
return
|
|
71
|
+
return CartIcon__default;
|
|
76
72
|
case "plus":
|
|
77
73
|
return CartPlusIcon__default;
|
|
78
74
|
}
|
|
79
|
-
}, [icon
|
|
75
|
+
}, [icon]);
|
|
80
76
|
return /* @__PURE__ */jsx(ButtonStyled, {
|
|
81
77
|
...props,
|
|
82
78
|
label,
|
|
@@ -84,8 +80,8 @@ const CartButton = function CartButton2({
|
|
|
84
80
|
children: /* @__PURE__ */jsxs(ButtonInnerWrap, {
|
|
85
81
|
children: [!hideIcon && /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
86
82
|
src: Icon,
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
83
|
+
width: 20,
|
|
84
|
+
height: 16
|
|
89
85
|
}), (!!preLabel || !!label) && /* @__PURE__ */jsxs(Labels, {
|
|
90
86
|
children: [!!preLabel && /* @__PURE__ */jsx(PreLabel, {
|
|
91
87
|
children: preLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartButton.mjs","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport
|
|
1
|
+
{"version":3,"file":"CartButton.mjs","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,YAAA,GAAeC,OAAOC,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,GAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,GAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,MAAO,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,MAAO,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACA,GAAGc;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,iBAAA;MAET,KAAK,MAAA;QACI,OAAAC,qBAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,OAAA,mBACGf,YAAc,EAAA;IAAA,GAAGiB;IAAOd,KAAc;IAAAC,QAAA;IACrCkB,8BAAChB,eACE,EAAA;MAAAgB,QAAA,EAAA,CAAC,CAAAN,QAAA,uBAAaO,iBAAkB,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAAA,CACjE,CAAC,CAACtB,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,oBACfK,MACE,EAAA;QAAAc,QAAA,EAAA,CAAA,CAAC,CAAClB,QAAA,IAAA,eAAauB,GAAA,CAAAlB,QAAA,EAAA;UAAUa,QAAS,EAAAlB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAAwB,GAAA,CAAChB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbkB,QAAA,EAAAnB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|