@ubnt/store.core 11.0.3 → 11.0.5-alpha.0
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 +840 -24
- package/lib/assets/ai-360.jpg +0 -0
- package/lib/assets/ai-3602.jpg +0 -0
- package/lib/assets/ai-theta.jpg +0 -0
- package/lib/assets/ai-theta2.jpg +0 -0
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/bullet2.svg +4 -2
- package/lib/assets/bullet3.svg +2 -4
- package/lib/assets/floodlight.svg +9 -2
- package/lib/assets/floodlight2.svg +2 -9
- package/lib/assets/g3-reader-flex.jpg +0 -0
- package/lib/assets/g3-reader-flex2.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/g5-dome-ultra.jpg +0 -0
- package/lib/assets/g5-dome-ultra2.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz2.jpg +0 -0
- package/lib/assets/globe.svg +9 -2
- package/lib/assets/globe2.svg +2 -9
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- 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/ptz2.svg +2 -2
- package/lib/assets/ptz3.svg +2 -2
- package/lib/assets/rack.svg +4 -1
- package/lib/assets/rack2.svg +1 -4
- package/lib/components/CategoryTabs/CategoryTabs.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.js +18 -4
- package/lib/components/CategoryTabs/CategoryTabs.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.mjs +19 -5
- package/lib/components/CategoryTabs/CategoryTabs.mjs.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.stories.d.ts +5 -0
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +22 -4
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +123 -22
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +122 -23
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +8 -0
- package/lib/components/Header/AccountFrame/AccountFrame.js +0 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs +0 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.d.ts +4 -8
- package/lib/components/Header/AccountFrame/AccountFrame.styles.js +7 -2
- package/lib/components/Header/AccountFrame/AccountFrame.styles.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs +7 -2
- package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.mjs +1 -1
- package/lib/components/Header/Header.stories.d.ts +2 -2
- package/lib/components/Header/Header.types.d.ts +2 -2
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js +19 -8
- package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.mjs +20 -9
- package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.d.ts +1 -0
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.js +8 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.mjs +8 -2
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.types.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.js +8 -0
- package/lib/components/Header/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.mjs +8 -0
- package/lib/components/Header/MenuItem/MenuItem.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +1 -0
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +1 -0
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.d.ts +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +3 -1
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +3 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +4 -2
- package/lib/components/Header/ProHeader/ProHeader.styles.js +8 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +8 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.types.d.ts +4 -2
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js +24 -0
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs +24 -0
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js +13 -2
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs +13 -2
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +24 -2
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +25 -3
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js +20 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs +20 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.d.ts +3 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.js +15 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.mjs +15 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/NavigationItem/NavigationItem.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.d.ts +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.js +11 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.mjs +11 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.styles.js +3 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.styles.mjs +3 -0
- package/lib/components/MicrositeHeader/components/HeaderContent/_components/SubNavigation/SubNavigation.styles.mjs.map +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/ModelCompareV4/CompareTable/CompareTable.styles.d.ts +7 -2
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js +25 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs +25 -2
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.js +13 -3
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.mjs +15 -5
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/helpers/RenderButton.js +13 -9
- package/lib/components/ModelCompareV4/CompareTable/helpers/RenderButton.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/helpers/RenderButton.mjs +13 -9
- package/lib/components/ModelCompareV4/CompareTable/helpers/RenderButton.mjs.map +1 -1
- package/lib/components/ModelCompareV4/ProductList/ProductList.styles.js +10 -0
- package/lib/components/ModelCompareV4/ProductList/ProductList.styles.js.map +1 -1
- package/lib/components/ModelCompareV4/ProductList/ProductList.styles.mjs +10 -0
- package/lib/components/ModelCompareV4/ProductList/ProductList.styles.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/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.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/floodlight.svg.js +5 -5
- package/lib/constants/icons/menu/floodlight.svg.mjs +2 -2
- package/lib/constants/icons/menu/index.js +9 -9
- package/lib/constants/icons/menu/index.mjs +3 -3
- 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/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.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-dome-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-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/Interior/ai-theta.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Interior/ai-theta.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/floodlight.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/floodlight.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/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-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/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/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/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/ptz.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/GatewaysCompact.js.map +1 -1
- package/lib/constants/modelCompareData/data/GatewaysCompact.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/GatewaysDreamRouters.js.map +1 -1
- package/lib/constants/modelCompareData/data/GatewaysDreamRouters.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/GatewaysExpress.js.map +1 -1
- package/lib/constants/modelCompareData/data/GatewaysExpress.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/PhysicalSecurityCompact.js.map +1 -1
- package/lib/constants/modelCompareData/data/PhysicalSecurityCompact.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/ptz.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/express.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/express.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/express7.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/express7.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g4Instant.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/g4Instant.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/g5DomeUltra.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5DomeUltra.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Flex.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/g5Flex.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/g5Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g6Instant.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/g6Instant.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/theta.js +2 -2
- package/lib/constants/modelCompareData/data/products/theta.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/ucCastLite.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/ucCastLite.mjs.map +1 -1
- package/lib/constants/modelCompareData/data/products/udr.js.map +1 -1
- package/lib/constants/modelCompareData/data/products/udr.mjs.map +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/builtInFloodlight.js +1 -1
- package/lib/constants/modelCompareData/data/properties/builtInFloodlight.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/constants/modelCompareData/translations/ar.json.js +0 -2
- package/lib/constants/modelCompareData/translations/ar.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/ar.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/ar.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/de.json.js +0 -2
- package/lib/constants/modelCompareData/translations/de.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/de.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/de.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/el.json.js +0 -2
- package/lib/constants/modelCompareData/translations/el.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/el.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/el.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/es.json.js +0 -2
- package/lib/constants/modelCompareData/translations/es.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/es.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/es.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/fr.json.js +0 -2
- package/lib/constants/modelCompareData/translations/fr.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/fr.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/fr.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/it.json.js +0 -2
- package/lib/constants/modelCompareData/translations/it.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/it.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/it.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/ja.json.js +0 -2
- package/lib/constants/modelCompareData/translations/ja.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/ja.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/ja.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/pt-BR.json.js +0 -2
- package/lib/constants/modelCompareData/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/pt-BR.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/zh-Hans.json.js +0 -2
- package/lib/constants/modelCompareData/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/zh-Hans.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.js +0 -2
- package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.mjs +0 -2
- package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/modelCompareData/types.js.map +1 -1
- package/lib/constants/modelCompareData/types.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.js +0 -1
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +0 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js +3 -3
- package/lib/contexts/MenuContext/mapping.mjs +2 -2
- package/lib/contexts/MenuContext/utils.d.ts +10 -0
- package/lib/contexts/MenuContext/utils.js +29 -0
- package/lib/contexts/MenuContext/utils.js.map +1 -1
- package/lib/contexts/MenuContext/utils.mjs +28 -1
- package/lib/contexts/MenuContext/utils.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/mapping.js +3 -3
- package/lib/contexts/MicrositeMenuContext/mapping.mjs +2 -2
- package/package.json +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Tooltip } from '@ubnt/ui-components/Tooltip';
|
|
3
|
-
import { useMemo, useCallback } from 'react';
|
|
3
|
+
import { useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
4
4
|
import '../../../../../../constants/modelCompareData/assets/close.svg.mjs';
|
|
5
5
|
import { useModelCompareTranslation } from '../../../../../../constants/modelCompareData/translations/useModelCompareTranslation.mjs';
|
|
6
6
|
import { useMenu } from '../../../../../../contexts/MenuContext/context.mjs';
|
|
7
7
|
import { imageSrc } from '../../../../../../utils/asset.mjs';
|
|
8
8
|
import { Reveal } from '../../../../../Reveal/Reveal.mjs';
|
|
9
9
|
import '../../../../../StyleableSvgImage/index.mjs';
|
|
10
|
-
import { HeaderGridItem, RemoveProductButton, ProductImageWrap, ProductImage, ProductMeta, ProductHeaderTooltipStyles, ProductTitleLink, ProductHeaderTooltipLink, PRODUCT_HEADER_TOOLTIP_CLASSNAME, ProductTitle, ProductNote, ProductDescription, BadgeWrapper } from '../../../CompareTable.styles.mjs';
|
|
10
|
+
import { HeaderGridItem, RemoveProductButton, ProductImageWrap, ProductImage, ProductMeta, ProductHeaderTooltipStyles, ProductHeaderTooltipHoverArea, ProductTitleLink, ProductHeaderTooltipLink, PRODUCT_HEADER_TOOLTIP_CLASSNAME, ProductTitle, ProductNote, ProductDescription, BadgeWrapper } from '../../../CompareTable.styles.mjs';
|
|
11
11
|
import { getStoreHref } from '../../../helpers/getStoreHref.mjs';
|
|
12
12
|
import { Badges } from '../Badges/Badges.mjs';
|
|
13
13
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
@@ -35,6 +35,8 @@ const ProductHeader = ({
|
|
|
35
35
|
languageDirection,
|
|
36
36
|
storeId
|
|
37
37
|
} = useMenu();
|
|
38
|
+
const [productTitleWidth, setProductTitleWidth] = useState(void 0);
|
|
39
|
+
const productTitleRef = useRef(null);
|
|
38
40
|
const storeHref = useMemo(() => getStoreHref({
|
|
39
41
|
product,
|
|
40
42
|
createSiteUrl,
|
|
@@ -51,6 +53,10 @@ const ProductHeader = ({
|
|
|
51
53
|
setSelectedProducts(updatedProducts);
|
|
52
54
|
}
|
|
53
55
|
}, [product.id, selectedProducts, setExternalState, setSelectedProducts]);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (!productTitleRef.current) return;
|
|
58
|
+
setProductTitleWidth(productTitleRef.current.getBoundingClientRect().width);
|
|
59
|
+
}, [productTitleRef]);
|
|
54
60
|
return /* @__PURE__ */jsx(Reveal, {
|
|
55
61
|
index,
|
|
56
62
|
playAnimation: hasBeenObserved,
|
|
@@ -75,19 +81,23 @@ const ProductHeader = ({
|
|
|
75
81
|
})
|
|
76
82
|
}), /* @__PURE__ */jsxs(ProductMeta, {
|
|
77
83
|
children: [linkToStoreTitleClick && storeHref || !linkToStoreTitleClick && techspecsHref ? /* @__PURE__ */jsx(ProductHeaderTooltipStyles, {
|
|
78
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */jsxs(Tooltip, {
|
|
79
85
|
motif: "light",
|
|
80
86
|
tooltipClassName: PRODUCT_HEADER_TOOLTIP_CLASSNAME,
|
|
81
87
|
isInteractive: true,
|
|
82
88
|
description: /* @__PURE__ */jsxs(ProductHeaderTooltipLink, {
|
|
83
89
|
href: productTitleHref,
|
|
90
|
+
target: "__blank",
|
|
84
91
|
children: [formatMessage("modelCompare.reviewIn.tooltip"), " Tech Specs"]
|
|
85
92
|
}),
|
|
86
|
-
children: /* @__PURE__ */jsx(
|
|
93
|
+
children: [/* @__PURE__ */jsx(ProductHeaderTooltipHoverArea, {
|
|
94
|
+
$width: productTitleWidth
|
|
95
|
+
}), /* @__PURE__ */jsx(ProductTitleLink, {
|
|
87
96
|
variant: "link",
|
|
88
97
|
anchor: true,
|
|
98
|
+
ref: productTitleRef,
|
|
89
99
|
children: formatMessage(product.title)
|
|
90
|
-
})
|
|
100
|
+
})]
|
|
91
101
|
}, `tooltip-${product.id}`)
|
|
92
102
|
}) : /* @__PURE__ */jsx(ProductTitle, {
|
|
93
103
|
children: formatMessage(product.title)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductHeader.mjs","sources":["../../../../../../../src/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.tsx"],"sourcesContent":["import { Tooltip } from \"@ubnt/ui-components/Tooltip\";\nimport { useCallback, useMemo } from \"react\";\n\nimport closeIcon from \"../../../../../../constants/modelCompareData/assets/close.svg\";\nimport { useModelCompareTranslation } from \"../../../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport { useMenu } from \"../../../../../../contexts/MenuContext/context\";\nimport { imageSrc } from \"../../../../../../utils/asset\";\nimport { Reveal } from \"../../../../../Reveal/Reveal\";\nimport { StyleableSvgImage } from \"../../../../../StyleableSvgImage\";\nimport * as S from \"../../../CompareTable.styles\";\nimport { getStoreHref } from \"../../../helpers/getStoreHref\";\nimport { Badges } from \"../Badges/Badges\";\nimport type { ProductHeaderProps } from \"./ProductHeader.types\";\n\nexport const ProductHeader = ({\n product,\n setSelectedProducts,\n index,\n setExternalState,\n selectedProducts,\n linkToStoreTitleClick,\n hasBeenObserved,\n isLessThanOrEqualToFiveProducts,\n hasMultipleProductsSelected,\n isSmallScreen,\n showBadges,\n isStaticProduct,\n}: ProductHeaderProps) => {\n const { formatMessage } = useModelCompareTranslation();\n const { createSiteUrl, languageDirection, storeId } = useMenu();\n\n const storeHref = useMemo(\n () => getStoreHref({ product, createSiteUrl, storeId }),\n [product, createSiteUrl, storeId],\n );\n\n const techspecsHref = useMemo(\n () => product.techspecsPath && createSiteUrl(product.techspecsPath),\n [createSiteUrl, product.techspecsPath],\n );\n\n const productTitleHref = useMemo(\n () => (linkToStoreTitleClick ? storeHref : techspecsHref),\n [linkToStoreTitleClick, storeHref, techspecsHref],\n );\n\n const removeHandler = useCallback(() => {\n const updatedProducts =\n selectedProducts &&\n selectedProducts.filter(\n (selectedProduct) => selectedProduct.productId !== product.id,\n );\n\n if (setExternalState && updatedProducts) {\n setExternalState(updatedProducts);\n }\n\n if (updatedProducts && setSelectedProducts) {\n setSelectedProducts(updatedProducts);\n }\n }, [product.id, selectedProducts, setExternalState, setSelectedProducts]);\n\n return (\n <Reveal index={index} playAnimation={hasBeenObserved}>\n <S.HeaderGridItem>\n {!isLessThanOrEqualToFiveProducts &&\n hasMultipleProductsSelected &&\n !isStaticProduct && (\n <S.RemoveProductButton\n type=\"button\"\n $isSmallScreen={isSmallScreen}\n onClick={removeHandler}\n >\n <StyleableSvgImage src={closeIcon} width={16} height={16} />\n </S.RemoveProductButton>\n )}\n <S.ProductImageWrap height={product.image.height}>\n <S.ProductImage\n loading=\"lazy\"\n decoding=\"async\"\n src={imageSrc(product.image.src)}\n width={product.image.width}\n alt={formatMessage(product.title)}\n />\n </S.ProductImageWrap>\n <S.ProductMeta>\n {(linkToStoreTitleClick && storeHref) ||\n (!linkToStoreTitleClick && techspecsHref) ? (\n <S.ProductHeaderTooltipStyles>\n <Tooltip\n key={`tooltip-${product.id}`}\n motif=\"light\"\n tooltipClassName={S.PRODUCT_HEADER_TOOLTIP_CLASSNAME}\n isInteractive\n description={\n <S.ProductHeaderTooltipLink href={productTitleHref}>\n {formatMessage(\"modelCompare.reviewIn.tooltip\")} Tech Specs\n </S.ProductHeaderTooltipLink>\n }\n >\n <S.ProductTitleLink variant=\"link\" anchor>\n {formatMessage(product.title)}\n </S.ProductTitleLink>\n </Tooltip>\n </S.ProductHeaderTooltipStyles>\n ) : (\n <S.ProductTitle>{formatMessage(product.title)}</S.ProductTitle>\n )}\n {!!product?.productNote && (\n <S.ProductNote>{formatMessage(product.productNote)}</S.ProductNote>\n )}\n {product.description ? (\n <S.ProductDescription\n $maxWidth={product.descriptionMaxWidth}\n $direction={languageDirection}\n >\n {formatMessage(product.description)}\n </S.ProductDescription>\n ) : null}\n {showBadges && (\n <S.BadgeWrapper>{<Badges product={product} />}</S.BadgeWrapper>\n )}\n </S.ProductMeta>\n </S.HeaderGridItem>\n </Reveal>\n );\n};\n"],"names":["ProductHeader","product","setSelectedProducts","index","setExternalState","selectedProducts","linkToStoreTitleClick","hasBeenObserved","isLessThanOrEqualToFiveProducts","hasMultipleProductsSelected","isSmallScreen","showBadges","isStaticProduct","formatMessage","useModelCompareTranslation","createSiteUrl","languageDirection","storeId","useMenu","storeHref","useMemo","getStoreHref","techspecsHref","techspecsPath","productTitleHref","removeHandler","useCallback","updatedProducts","filter","selectedProduct","productId","id","jsx","Reveal","playAnimation","children","jsxs","S.HeaderGridItem","S.RemoveProductButton","type","$isSmallScreen","onClick","StyleableSvgImage","src","closeIcon","width","height","S.ProductImageWrap","image","S.ProductImage","loading","decoding","imageSrc","alt","title","S.ProductMeta","S.ProductHeaderTooltipStyles","Tooltip","motif","tooltipClassName","S.PRODUCT_HEADER_TOOLTIP_CLASSNAME","isInteractive","description","S.ProductHeaderTooltipLink","href","S.ProductTitleLink","variant","anchor","S.ProductTitle","productNote","S.ProductNote","S.ProductDescription","$maxWidth","descriptionMaxWidth","$direction","S.BadgeWrapper","Badges"],"mappings":";;;;;;;;;;;;;;;AAcO,MAAMA,gBAAgBA,CAAC;EAC5BC,OAAA;EACAC,mBAAA;EACAC,KAAA;EACAC,gBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,eAAA;EACAC,+BAAA;EACAC,2BAAA;EACAC,aAAA;EACAC,UAAA;EACAC;AACF,CAA0B,KAAA;EAClB,MAAA;IAAEC;EAAc,CAAA,GAAIC,0BAA2B,CAAA,CAAA;EACrD,MAAM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AAtB,aAAA,CAAcZ,OAAQ,CAAAqD,KAAK;SAAE,CAAA,EAE/C,CAAC,CAACrD,OAAA,EAASoE,WACV,IAAA,eAAArC,GAAA,CAACsC,WAAE,EAAF;UAAenC,QAAA,EAAAtB,aAAA,CAAcZ,OAAQ,CAAAoE,WAAW;SAAE,CAAA,EAEpDpE,QAAQ6D,WACP,GAAA,eAAA9B,GAAA,CAACuC,kBAAE,EAAF;UACCC,WAAWvE,OAAQ,CAAAwE,mBAAA;UACnBC,UAAY,EAAA1D,iBAAA;UAEXmB,QAAA,EAAAtB,aAAA,CAAcZ,QAAQ6D,WAAW;QAAA,CAAA,CAElC,GAAA,IAAA,EACHnD,UAAA,uBACEgE,YAAE,EAAF;UAAgBxC,QAAC,EAAA,eAAAH,GAAA,CAAA4C,MAAA,EAAA;YAAO3E;WAAkB;QAAG,CAAA,CAAA;MAElD,CAAA,CAAA;IAAA,CACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProductHeader.mjs","sources":["../../../../../../../src/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.tsx"],"sourcesContent":["import { Tooltip } from \"@ubnt/ui-components/Tooltip\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\n\nimport closeIcon from \"../../../../../../constants/modelCompareData/assets/close.svg\";\nimport { useModelCompareTranslation } from \"../../../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport { useMenu } from \"../../../../../../contexts/MenuContext/context\";\nimport { imageSrc } from \"../../../../../../utils/asset\";\nimport { Reveal } from \"../../../../../Reveal/Reveal\";\nimport { StyleableSvgImage } from \"../../../../../StyleableSvgImage\";\nimport * as S from \"../../../CompareTable.styles\";\nimport { getStoreHref } from \"../../../helpers/getStoreHref\";\nimport { Badges } from \"../Badges/Badges\";\nimport type { ProductHeaderProps } from \"./ProductHeader.types\";\n\nexport const ProductHeader = ({\n product,\n setSelectedProducts,\n index,\n setExternalState,\n selectedProducts,\n linkToStoreTitleClick,\n hasBeenObserved,\n isLessThanOrEqualToFiveProducts,\n hasMultipleProductsSelected,\n isSmallScreen,\n showBadges,\n isStaticProduct,\n}: ProductHeaderProps) => {\n const { formatMessage } = useModelCompareTranslation();\n const { createSiteUrl, languageDirection, storeId } = useMenu();\n const [productTitleWidth, setProductTitleWidth] = useState<\n number | undefined\n >(undefined);\n\n const productTitleRef = useRef<HTMLAnchorElement | HTMLButtonElement | null>(\n null,\n );\n\n const storeHref = useMemo(\n () => getStoreHref({ product, createSiteUrl, storeId }),\n [product, createSiteUrl, storeId],\n );\n\n const techspecsHref = useMemo(\n () => product.techspecsPath && createSiteUrl(product.techspecsPath),\n [createSiteUrl, product.techspecsPath],\n );\n\n const productTitleHref = useMemo(\n () => (linkToStoreTitleClick ? storeHref : techspecsHref),\n [linkToStoreTitleClick, storeHref, techspecsHref],\n );\n\n const removeHandler = useCallback(() => {\n const updatedProducts =\n selectedProducts &&\n selectedProducts.filter(\n (selectedProduct) => selectedProduct.productId !== product.id,\n );\n\n if (setExternalState && updatedProducts) {\n setExternalState(updatedProducts);\n }\n\n if (updatedProducts && setSelectedProducts) {\n setSelectedProducts(updatedProducts);\n }\n }, [product.id, selectedProducts, setExternalState, setSelectedProducts]);\n\n useEffect(() => {\n if (!productTitleRef.current) return;\n\n setProductTitleWidth(productTitleRef.current.getBoundingClientRect().width);\n }, [productTitleRef]);\n\n return (\n <Reveal index={index} playAnimation={hasBeenObserved}>\n <S.HeaderGridItem>\n {!isLessThanOrEqualToFiveProducts &&\n hasMultipleProductsSelected &&\n !isStaticProduct && (\n <S.RemoveProductButton\n type=\"button\"\n $isSmallScreen={isSmallScreen}\n onClick={removeHandler}\n >\n <StyleableSvgImage src={closeIcon} width={16} height={16} />\n </S.RemoveProductButton>\n )}\n <S.ProductImageWrap height={product.image.height}>\n <S.ProductImage\n loading=\"lazy\"\n decoding=\"async\"\n src={imageSrc(product.image.src)}\n width={product.image.width}\n alt={formatMessage(product.title)}\n />\n </S.ProductImageWrap>\n <S.ProductMeta>\n {(linkToStoreTitleClick && storeHref) ||\n (!linkToStoreTitleClick && techspecsHref) ? (\n <S.ProductHeaderTooltipStyles>\n <Tooltip\n key={`tooltip-${product.id}`}\n motif=\"light\"\n tooltipClassName={S.PRODUCT_HEADER_TOOLTIP_CLASSNAME}\n isInteractive\n description={\n <S.ProductHeaderTooltipLink\n href={productTitleHref}\n target=\"__blank\"\n >\n {formatMessage(\"modelCompare.reviewIn.tooltip\")} Tech Specs\n </S.ProductHeaderTooltipLink>\n }\n >\n <S.ProductHeaderTooltipHoverArea $width={productTitleWidth} />\n <S.ProductTitleLink variant=\"link\" anchor ref={productTitleRef}>\n {formatMessage(product.title)}\n </S.ProductTitleLink>\n </Tooltip>\n </S.ProductHeaderTooltipStyles>\n ) : (\n <S.ProductTitle>{formatMessage(product.title)}</S.ProductTitle>\n )}\n {!!product?.productNote && (\n <S.ProductNote>{formatMessage(product.productNote)}</S.ProductNote>\n )}\n {product.description ? (\n <S.ProductDescription\n $maxWidth={product.descriptionMaxWidth}\n $direction={languageDirection}\n >\n {formatMessage(product.description)}\n </S.ProductDescription>\n ) : null}\n {showBadges && (\n <S.BadgeWrapper>{<Badges product={product} />}</S.BadgeWrapper>\n )}\n </S.ProductMeta>\n </S.HeaderGridItem>\n </Reveal>\n );\n};\n"],"names":["ProductHeader","product","setSelectedProducts","index","setExternalState","selectedProducts","linkToStoreTitleClick","hasBeenObserved","isLessThanOrEqualToFiveProducts","hasMultipleProductsSelected","isSmallScreen","showBadges","isStaticProduct","formatMessage","useModelCompareTranslation","createSiteUrl","languageDirection","storeId","useMenu","productTitleWidth","setProductTitleWidth","useState","productTitleRef","useRef","storeHref","useMemo","getStoreHref","techspecsHref","techspecsPath","productTitleHref","removeHandler","useCallback","updatedProducts","filter","selectedProduct","productId","id","useEffect","current","getBoundingClientRect","width","jsx","Reveal","playAnimation","children","jsxs","S.HeaderGridItem","S.RemoveProductButton","type","$isSmallScreen","onClick","StyleableSvgImage","src","closeIcon","height","S.ProductImageWrap","image","S.ProductImage","loading","decoding","imageSrc","alt","title","S.ProductMeta","S.ProductHeaderTooltipStyles","Tooltip","motif","tooltipClassName","S.PRODUCT_HEADER_TOOLTIP_CLASSNAME","isInteractive","description","S.ProductHeaderTooltipLink","href","target","S.ProductHeaderTooltipHoverArea","$width","S.ProductTitleLink","variant","anchor","ref","S.ProductTitle","productNote","S.ProductNote","S.ProductDescription","$maxWidth","descriptionMaxWidth","$direction","S.BadgeWrapper","Badges"],"mappings":";;;;;;;;;;;;;;;AAcO,MAAMA,gBAAgBA,CAAC;EAC5BC,OAAA;EACAC,mBAAA;EACAC,KAAA;EACAC,gBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,eAAA;EACAC,+BAAA;EACAC,2BAAA;EACAC,aAAA;EACAC,UAAA;EACAC;AACF,CAA0B,KAAA;EAClB,MAAA;IAAEC;EAAc,CAAA,GAAIC,0BAA2B,CAAA,CAAA;EACrD,MAAM;IAAEC,aAAA;IAAeC,iBAAmB;IAAAC;EAAA,IAAYC,OAAQ,CAAA,CAAA;EAC9D,MAAM,CAACC,iBAAA,EAAmBC,oBAAoB,CAAA,GAAIC,SAEhD,KAAS,CAAA,CAAA;EAEX,MAAMC,eAAkB,GAAAC,MAAA,CACtB,IACF,CAAA;EAEA,MAAMC,SAAY,GAAAC,OAAA,CAChB,MAAMC,YAAa,CAAA;IAAEzB,OAAS;IAAAc,aAAA;IAAeE;GAAS,CAAA,EACtD,CAAChB,OAAS,EAAAc,aAAA,EAAeE,OAAO,CAClC,CAAA;EAEA,MAAMU,aAAgB,GAAAF,OAAA,CACpB,MAAMxB,OAAA,CAAQ2B,aAAiB,IAAAb,aAAA,CAAcd,QAAQ2B,aAAa,CAAA,EAClE,CAACb,aAAe,EAAAd,OAAA,CAAQ2B,aAAa,CACvC,CAAA;EAEA,MAAMC,gBAAmB,GAAAJ,OAAA,CACvB,MAAOnB,wBAAwBkB,SAAY,GAAAG,aAAA,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,eAAAxC,GAAA,CAACyC,WAAE,EAAF;UAAetC,QAAA,EAAA/B,aAAA,CAAcZ,OAAQ,CAAAgF,WAAW;SAAE,CAAA,EAEpDhF,QAAQqE,WACP,GAAA,eAAA7B,GAAA,CAAC0C,kBAAE,EAAF;UACCC,WAAWnF,OAAQ,CAAAoF,mBAAA;UACnBC,UAAY,EAAAtE,iBAAA;UAEX4B,QAAA,EAAA/B,aAAA,CAAcZ,QAAQqE,WAAW;QAAA,CAAA,CAElC,GAAA,IAAA,EACH3D,UAAA,uBACE4E,YAAE,EAAF;UAAgB3C,QAAC,EAAA,eAAAH,GAAA,CAAA+C,MAAA,EAAA;YAAOvF;WAAkB;QAAG,CAAA,CAAA;MAElD,CAAA,CAAA;IAAA,CACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -29,15 +29,19 @@ const useButtonRenderer = () => {
|
|
|
29
29
|
startTrialLink = void 0,
|
|
30
30
|
learnMoreLink = void 0
|
|
31
31
|
} = product;
|
|
32
|
-
const createButton = (label, href, variant = "primary") =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
const createButton = (label, href, variant = "primary") => {
|
|
33
|
+
const BUTTONS_WITHOUT_POINTER_EVENTS = isComingSoon;
|
|
34
|
+
return /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.ButtonWrap, {
|
|
35
|
+
children: /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.Button, {
|
|
36
|
+
$removePointerEvents: Boolean(BUTTONS_WITHOUT_POINTER_EVENTS),
|
|
37
|
+
variant,
|
|
38
|
+
anchor: true,
|
|
39
|
+
href,
|
|
40
|
+
onClick: e => href && onLinkClick?.(e, href),
|
|
41
|
+
children: label
|
|
42
|
+
})
|
|
43
|
+
}, `${id}-${index}`);
|
|
44
|
+
};
|
|
41
45
|
if (addToCartButton) return addToCartButton;
|
|
42
46
|
if (typeof isComingSoon === "boolean" && !!isComingSoon || Array.isArray(isComingSoon) && isComingSoon.includes(storeId)) {
|
|
43
47
|
return createButton(getComingSoonButtonText(product), void 0, "comingSoon");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderButton.js","sources":["../../../../../src/components/ModelCompareV4/CompareTable/helpers/RenderButton.tsx"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext/context\";\nimport type { ButtonVariants } from \"../../../Button/Button.types\";\nimport * as S from \"../CompareTable.styles\";\nimport { getStoreHref } from \"./getStoreHref\";\n\ninterface RenderButtonProps {\n product: MutatedProduct;\n index: number;\n getComingSoonButtonText: (product: MutatedProduct) => string;\n showBuyButton: boolean;\n onLinkClick?: (\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string,\n ) => void;\n}\n\nexport const useButtonRenderer = () => {\n const { createSiteUrl, storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n\n return useCallback(\n ({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }: RenderButtonProps) => {\n const {\n id,\n isComingSoon = undefined,\n addToCartButton = undefined,\n startTrialLink = undefined,\n learnMoreLink = undefined,\n } = product;\n\n const createButton = (\n label: string,\n href?: string,\n variant: ButtonVariants = \"primary\",\n ) => (\n
|
|
1
|
+
{"version":3,"file":"RenderButton.js","sources":["../../../../../src/components/ModelCompareV4/CompareTable/helpers/RenderButton.tsx"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext/context\";\nimport type { ButtonVariants } from \"../../../Button/Button.types\";\nimport * as S from \"../CompareTable.styles\";\nimport { getStoreHref } from \"./getStoreHref\";\n\ninterface RenderButtonProps {\n product: MutatedProduct;\n index: number;\n getComingSoonButtonText: (product: MutatedProduct) => string;\n showBuyButton: boolean;\n onLinkClick?: (\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string,\n ) => void;\n}\n\nexport const useButtonRenderer = () => {\n const { createSiteUrl, storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n\n return useCallback(\n ({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }: RenderButtonProps) => {\n const {\n id,\n isComingSoon = undefined,\n addToCartButton = undefined,\n startTrialLink = undefined,\n learnMoreLink = undefined,\n } = product;\n\n const createButton = (\n label: string,\n href?: string,\n variant: ButtonVariants = \"primary\",\n ) => {\n const BUTTONS_WITHOUT_POINTER_EVENTS = isComingSoon;\n\n return (\n <S.ButtonWrap key={`${id}-${index}`}>\n <S.Button\n $removePointerEvents={Boolean(BUTTONS_WITHOUT_POINTER_EVENTS)}\n variant={variant}\n anchor\n href={href}\n onClick={(e) =>\n href &&\n onLinkClick?.(e as React.MouseEvent<HTMLAnchorElement>, href)\n }\n >\n {label}\n </S.Button>\n </S.ButtonWrap>\n );\n };\n\n // CASE: If we have a custom button, use that instead\n if (addToCartButton) return addToCartButton;\n\n // CASE: Coming soon\n if (\n (typeof isComingSoon === \"boolean\" && !!isComingSoon) ||\n (Array.isArray(isComingSoon) && isComingSoon.includes(storeId))\n ) {\n return createButton(\n getComingSoonButtonText(product),\n undefined,\n \"comingSoon\",\n );\n }\n\n // CASE: Start Trial\n if (startTrialLink) {\n return createButton(formatMessage(\"Start Trial\"), startTrialLink);\n }\n\n // CASE: Learn More\n const learnMoreHref = learnMoreLink && createSiteUrl(learnMoreLink);\n if (learnMoreHref) {\n return createButton(formatMessage(\"Learn More\"), learnMoreHref);\n }\n\n // CASE: Buy Now (no wrap needed)\n const storeHref = getStoreHref({ product, createSiteUrl, storeId });\n if (!storeHref || !showBuyButton) {\n return <S.CenterPlaceholderGridItem key={`${id}-${index}`} />;\n }\n\n // CASE: Default\n return createButton(formatMessage(\"Buy Now\"), storeHref);\n },\n [createSiteUrl, storeId, formatMessage],\n );\n};\n"],"names":["useButtonRenderer","createSiteUrl","storeId","useMenu","formatMessage","useModelCompareTranslation","useCallback","product","index","getComingSoonButtonText","showBuyButton","onLinkClick","id","isComingSoon","addToCartButton","startTrialLink","learnMoreLink","createButton","label","href","variant","BUTTONS_WITHOUT_POINTER_EVENTS","jsx","S.ButtonWrap","children","S.Button","Button","$removePointerEvents","Boolean","anchor","onClick","e","Array","isArray","includes","learnMoreHref","storeHref","getStoreHref","S.CenterPlaceholderGridItem","CenterPlaceholderGridItem"],"mappings":";;;;;;;;;AAoBO,MAAMA,oBAAoBA,CAAA,KAAM;EACrC,MAAM;IAAEC,aAAA;IAAeC;EAAQ,CAAA,GAAIC,eAAQ,CAAA,CAAA;EACrC,MAAA;IAAEC;EAAc,CAAA,GAAIC,qDAA2B,CAAA,CAAA;EAE9C,OAAAC,KAAA,CAAAA,WAAA,CACL,CAAC;IACCC,OAAA;IACAC,KAAA;IACAC,uBAAA;IACAC,aAAA;IACAC;EAAA,CACuB,KAAA;IACjB,MAAA;MACJC,EAAA;MACAC,YAAe,GAAA,KAAA,CAAA;MACfC,eAAkB,GAAA,KAAA,CAAA;MAClBC,cAAiB,GAAA,KAAA,CAAA;MACjBC,aAAgB,GAAA,KAAA;IAAA,CACd,GAAAT,OAAA;IAEJ,MAAMU,YAAe,GAAAA,CACnBC,KACA,EAAAC,IAAA,EACAC,UAA0B,SACvB,KAAA;MACH,MAAMC,8BAAiC,GAAAR,YAAA;MAGrC,OAAA,eAAAS,cAAA,CAACC,mBAAAA,CAAAA,UAAE,EAAF;QACCC,QAAA,iBAAAF,UAAA,CAAAA,GAAA,CAACG,mBAAE,CAAAC,MAAA,EAAF;UACCC,oBAAA,EAAsBC,QAAQP,8BAA8B,CAAA;UAC5DD,OAAA;UACAS,MAAM,EAAA,IAAA;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
27
27
|
startTrialLink = void 0,
|
|
28
28
|
learnMoreLink = void 0
|
|
29
29
|
} = product;
|
|
30
|
-
const createButton = (label, href, variant = "primary") =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
const createButton = (label, href, variant = "primary") => {
|
|
31
|
+
const BUTTONS_WITHOUT_POINTER_EVENTS = isComingSoon;
|
|
32
|
+
return /* @__PURE__ */jsx(ButtonWrap, {
|
|
33
|
+
children: /* @__PURE__ */jsx(Button, {
|
|
34
|
+
$removePointerEvents: Boolean(BUTTONS_WITHOUT_POINTER_EVENTS),
|
|
35
|
+
variant,
|
|
36
|
+
anchor: true,
|
|
37
|
+
href,
|
|
38
|
+
onClick: e => href && onLinkClick?.(e, href),
|
|
39
|
+
children: label
|
|
40
|
+
})
|
|
41
|
+
}, `${id}-${index}`);
|
|
42
|
+
};
|
|
39
43
|
if (addToCartButton) return addToCartButton;
|
|
40
44
|
if (typeof isComingSoon === "boolean" && !!isComingSoon || Array.isArray(isComingSoon) && isComingSoon.includes(storeId)) {
|
|
41
45
|
return createButton(getComingSoonButtonText(product), void 0, "comingSoon");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderButton.mjs","sources":["../../../../../src/components/ModelCompareV4/CompareTable/helpers/RenderButton.tsx"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext/context\";\nimport type { ButtonVariants } from \"../../../Button/Button.types\";\nimport * as S from \"../CompareTable.styles\";\nimport { getStoreHref } from \"./getStoreHref\";\n\ninterface RenderButtonProps {\n product: MutatedProduct;\n index: number;\n getComingSoonButtonText: (product: MutatedProduct) => string;\n showBuyButton: boolean;\n onLinkClick?: (\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string,\n ) => void;\n}\n\nexport const useButtonRenderer = () => {\n const { createSiteUrl, storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n\n return useCallback(\n ({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }: RenderButtonProps) => {\n const {\n id,\n isComingSoon = undefined,\n addToCartButton = undefined,\n startTrialLink = undefined,\n learnMoreLink = undefined,\n } = product;\n\n const createButton = (\n label: string,\n href?: string,\n variant: ButtonVariants = \"primary\",\n ) => (\n
|
|
1
|
+
{"version":3,"file":"RenderButton.mjs","sources":["../../../../../src/components/ModelCompareV4/CompareTable/helpers/RenderButton.tsx"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext/context\";\nimport type { ButtonVariants } from \"../../../Button/Button.types\";\nimport * as S from \"../CompareTable.styles\";\nimport { getStoreHref } from \"./getStoreHref\";\n\ninterface RenderButtonProps {\n product: MutatedProduct;\n index: number;\n getComingSoonButtonText: (product: MutatedProduct) => string;\n showBuyButton: boolean;\n onLinkClick?: (\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string,\n ) => void;\n}\n\nexport const useButtonRenderer = () => {\n const { createSiteUrl, storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n\n return useCallback(\n ({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }: RenderButtonProps) => {\n const {\n id,\n isComingSoon = undefined,\n addToCartButton = undefined,\n startTrialLink = undefined,\n learnMoreLink = undefined,\n } = product;\n\n const createButton = (\n label: string,\n href?: string,\n variant: ButtonVariants = \"primary\",\n ) => {\n const BUTTONS_WITHOUT_POINTER_EVENTS = isComingSoon;\n\n return (\n <S.ButtonWrap key={`${id}-${index}`}>\n <S.Button\n $removePointerEvents={Boolean(BUTTONS_WITHOUT_POINTER_EVENTS)}\n variant={variant}\n anchor\n href={href}\n onClick={(e) =>\n href &&\n onLinkClick?.(e as React.MouseEvent<HTMLAnchorElement>, href)\n }\n >\n {label}\n </S.Button>\n </S.ButtonWrap>\n );\n };\n\n // CASE: If we have a custom button, use that instead\n if (addToCartButton) return addToCartButton;\n\n // CASE: Coming soon\n if (\n (typeof isComingSoon === \"boolean\" && !!isComingSoon) ||\n (Array.isArray(isComingSoon) && isComingSoon.includes(storeId))\n ) {\n return createButton(\n getComingSoonButtonText(product),\n undefined,\n \"comingSoon\",\n );\n }\n\n // CASE: Start Trial\n if (startTrialLink) {\n return createButton(formatMessage(\"Start Trial\"), startTrialLink);\n }\n\n // CASE: Learn More\n const learnMoreHref = learnMoreLink && createSiteUrl(learnMoreLink);\n if (learnMoreHref) {\n return createButton(formatMessage(\"Learn More\"), learnMoreHref);\n }\n\n // CASE: Buy Now (no wrap needed)\n const storeHref = getStoreHref({ product, createSiteUrl, storeId });\n if (!storeHref || !showBuyButton) {\n return <S.CenterPlaceholderGridItem key={`${id}-${index}`} />;\n }\n\n // CASE: Default\n return createButton(formatMessage(\"Buy Now\"), storeHref);\n },\n [createSiteUrl, storeId, formatMessage],\n );\n};\n"],"names":["useButtonRenderer","createSiteUrl","storeId","useMenu","formatMessage","useModelCompareTranslation","useCallback","product","index","getComingSoonButtonText","showBuyButton","onLinkClick","id","isComingSoon","addToCartButton","startTrialLink","learnMoreLink","createButton","label","href","variant","BUTTONS_WITHOUT_POINTER_EVENTS","jsx","S.ButtonWrap","children","S.Button","$removePointerEvents","Boolean","anchor","onClick","e","Array","isArray","includes","learnMoreHref","storeHref","getStoreHref","S.CenterPlaceholderGridItem"],"mappings":";;;;;;;AAoBO,MAAMA,oBAAoBA,CAAA,KAAM;EACrC,MAAM;IAAEC,aAAA;IAAeC;EAAQ,CAAA,GAAIC,OAAQ,CAAA,CAAA;EACrC,MAAA;IAAEC;EAAc,CAAA,GAAIC,0BAA2B,C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aAAe,EAAA;MACjB,OAAOjB,YAAa,CAAAb,aAAA,CAAc,YAAY,CAAA,EAAG8B,aAAa,CAAA;IAAA;IAIhE,MAAMC,YAAYC,YAAa,CAAA;MAAE7B,OAAS;MAAAN,aAAA;MAAeC;KAAS,CAAA;IAC9D,IAAA,CAACiC,SAAa,IAAA,CAACzB,aAAe,EAAA;MACzB,sBAAAY,GAAA,CAACe,yBAAA,EAAA,EAAA,EAAiC,GAAGzB,EAAE,IAAIJ,KAAK,EAAI,CAAA;IAAA;IAI7D,OAAOS,YAAa,CAAAb,aAAA,CAAc,SAAS,CAAA,EAAG+B,SAAS,CAAA;EACzD,CAAA,EACA,CAAClC,aAAe,EAAAC,OAAA,EAASE,aAAa,CACxC,CAAA;AACF,CAAA;"}
|
|
@@ -337,6 +337,16 @@ const Button = styled__default["default"].button`
|
|
|
337
337
|
$disabled
|
|
338
338
|
}) => $disabled && styled.css`
|
|
339
339
|
cursor: not-allowed !important;
|
|
340
|
+
|
|
341
|
+
@media ${layout.BREAKPOINTS.TABLET_AND_DOWN} {
|
|
342
|
+
border: 1px solid rgba(73 73 73 / 0.6);
|
|
343
|
+
background: rgba(73 73 73 / 0.6);
|
|
344
|
+
color: ${theme.theme.colors.white};
|
|
345
|
+
|
|
346
|
+
&:hover {
|
|
347
|
+
background: rgba(73 73 73 / 0.6);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
340
350
|
`}
|
|
341
351
|
|
|
342
352
|
${({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductList.styles.js","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\n\nconst scrollBarHeight = 16;\nconst PRODUCT_CLICKABLE_AREA_Z_INDEX = 1;\nexport const PRODUCT_CARD_WIDTH = 205;\nexport const PRODUCT_LIST_GRID_GAP = 10;\n\nconst productCardAnimation = keyframes`\n50% {\n transform: scale(1.025);\n}\n 100% {\n box-shadow: 0 0 13px -1px rgb(33 35 39 / 0.174);\n /* we can't return to scale(1) because this creates a bug where the contents of the product card slightly shift on hover */\n transform: scale(0.999);\n }\n`;\n\nconst productGroupLineAnimation = keyframes`\n 25% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1);\n }\n\n 50% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n }\n\n 70% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n width: 100%;\n }\n\n 100% {\n background: rgba(0, 111, 255, 0.00);\n transform: scaleY(1);\n width: 100%;\n }\n`;\n\n// seconds\nconst productGroupAnimationDuration = 0.125;\n\n// seconds\nconst productCardAnimationDuration = 0.25;\n\nexport const Wrapper = styled.div`\n position: relative;\n margin-bottom: 20px;\n`;\n\nexport const Container = styled.div<{\n $isHovering: boolean;\n $moreThanOneGroupExists: boolean;\n $isDragging: boolean;\n}>`\n overflow-x: auto;\n padding-bottom: 30px;\n scroll-behavior: smooth;\n scroll-behavior: ${({ $isDragging }) => ($isDragging ? \"unset\" : \"smooth\")};\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n padding-top: 7px;\n `}\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /* We need the x-padding so the shadows of the cards aren't clipped */\n padding: 0 5px 24px;\n }\n\n /**\n * We cannot define padding on some of these scroll bar\n * elements. Because of this, we're defining scroll bar colors\n * with linear-gradient so users don't have to be very\n * accurate when clicking the scroll bar while keeping the\n * styles of the scroll bar slim.\n */\n\n &::-webkit-scrollbar {\n height: ${scrollBarHeight}px;\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n #eeeff1 6px,\n #eeeff1 8px,\n transparent 8px\n );\n }\n\n &::-webkit-scrollbar-thumb {\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n ${theme.colors.primaryBlue} 6px,\n ${theme.colors.primaryBlue} 8px,\n transparent 8px\n );\n\n ${({ $isHovering }) =>\n $isHovering &&\n css`\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 5px,\n ${theme.colors.primaryBlue} 5px,\n ${theme.colors.primaryBlue} 9px,\n transparent 9px\n );\n `}\n }\n`;\n\nexport const ProductGroupProductListContainer = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n`;\n\nexport const ProductGroups = styled.div<{ $columns: number }>`\n min-width: 100%;\n display: grid;\n gap: 0 10px;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n padding: 0 0 10px 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 0;\n }\n`;\n\nexport const ProductGroupLabelContainer = styled.div<{ $span: number }>`\n display: flex;\n grid-column: span ${({ $span }) => $span ?? 1};\n gap: 0 20px;\n`;\n\nexport const ProductGroupLabel = styled.span<{\n $isActive: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n color: #808893;\n font-size: 18px;\n font-weight: 700;\n scroll-margin-left: 10px;\n white-space: nowrap;\n\n ${({ $isActive, $productGroupsSelectorExists }) =>\n ($isActive || !$productGroupsSelectorExists) &&\n css`\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ProductGroupLabelLineContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nexport const ProductGroupLabelGrayLine = styled.div`\n width: 100%;\n height: 1px;\n background: #eeeff1;\n`;\n\nexport const ProductGroupLabelLine = styled.div<{\n $isActive: boolean;\n $playAnimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n width: 0;\n height: 1px;\n background: #eeeff1;\n\n ${({ $isActive, $playAnimation, $productGroupsSelectorExists }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productGroupLineAnimation} ease-in-out 1 forwards;\n `\n : $isActive &&\n $playAnimation &&\n css`\n animation: ${productGroupLineAnimation}\n ${productGroupAnimationDuration + productCardAnimationDuration}s\n ease-in-out 1 forwards;\n `}\n`;\n\nexport const ProductList = styled.div<{\n $columns: number;\n $isDragging: boolean;\n $overflowExists: boolean;\n $moreThanOneGroupExists: boolean;\n}>`\n display: grid;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n align-items: flex-end;\n gap: 0 ${PRODUCT_LIST_GRID_GAP}px;\n padding: 0 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 6px;\n }\n\n ${({ $overflowExists }) =>\n $overflowExists &&\n css`\n cursor: grab;\n `}\n\n ${({ $isDragging, $overflowExists }) =>\n $overflowExists &&\n $isDragging &&\n css`\n cursor: grabbing;\n `}\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n margin-top: 5px;\n `}\n`;\n\nexport const ProductCardOnClickArea = styled.div`\n position: absolute;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n width: 100%;\n height: 100%;\n`;\n\nexport const Product = styled.div<{\n $isActive: boolean;\n $groupIndex: number;\n $playAnimation: boolean;\n $groupLength: number;\n $canPlayAniimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n background: ${theme.colors.white};\n padding: 20px 10px;\n border-radius: 6px;\n height: 100%;\n min-height: 100%;\n -webkit-user-drag: none;\n user-select: none;\n /* can't use scale(1) because the content slightly shifts on hover */\n transform: scale(0.999);\n\n ${({\n $isActive,\n $groupIndex,\n $playAnimation,\n $groupLength,\n $canPlayAniimation,\n $productGroupsSelectorExists,\n }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productCardAnimation} ease-in-out 1 forwards;\n `\n : $canPlayAniimation &&\n $isActive &&\n $playAnimation &&\n css`\n animation: ${productCardAnimation} ${productCardAnimationDuration}s\n ease-in-out\n ${(productGroupAnimationDuration / $groupLength) * $groupIndex}s 1\n forwards;\n `}\n`;\n\nexport const Image = styled.img`\n -webkit-user-drag: none;\n user-select: none;\n`;\n\nexport const DescriptionButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n user-select: none;\n\n justify-content: space-between;\n flex-grow: 1;\n`;\n\nexport const Name = styled.div`\n color: #212427;\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n letter-spacing: -0.32px;\n line-height: normal;\n\n display: flex;\n justify-content: center;\n`;\n\nexport const Description = styled.div`\n text-align: center;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n letter-spacing: -0.28px;\n color: rgb(0 0 0 / 0.65);\n display: flex;\n justify-content: center;\n margin-top: 6px;\n`;\n\nexport const ButtonIcon = styled(StyleableSvgImage)<{ $isSelected: boolean }>`\n transition: transform 0.125s ease-in-out;\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n transform: rotate(45deg);\n `}\n`;\n\nexport const Button = styled.button<{\n $isStaticProduct: boolean;\n $isSelected: boolean;\n $disabled: boolean;\n}>`\n align-items: center;\n background: transparent;\n border-radius: 4px;\n border: 1px solid #808893;\n color: #808893;\n cursor: pointer;\n display: flex;\n gap: 4px;\n margin: 12px auto 0;\n min-width: 110px;\n padding: 10px 15px;\n transition: 0.3s;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n\n &:hover {\n background: #80889310;\n }\n\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n background: ${theme.colors.primaryBlue};\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.white};\n\n &:hover {\n background: ${theme.colors.dodgerblue};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n cursor: not-allowed !important;\n `}\n\n ${({ $isStaticProduct }) =>\n $isStaticProduct &&\n css`\n visibility: hidden;\n pointer-events: none;\n `}\n`;\n\nexport const CopyWhiteSpace = styled.span`\n display: inline-block;\n width: 5px;\n`;\n\nexport const ButtonCopy = styled.span`\n font-size: 14px;\n font-weight: 700;\n`;\n"],"names":["scrollBarHeight","PRODUCT_CLICKABLE_AREA_Z_INDEX","PRODUCT_CARD_WIDTH","PRODUCT_LIST_GRID_GAP","productCardAnimation","keyframes","productGroupLineAnimation","theme","colors","primaryBlue","productGroupAnimationDuration","productCardAnimationDuration","Wrapper","styled","div","Container","$isDragging","$moreThanOneGroupExists","css","BREAKPOINTS","MOBILE_AND_DOWN","$isHovering","ProductGroupProductListContainer","ProductGroups","$columns","ProductGroupLabelContainer","$span","ProductGroupLabel","span","$isActive","$productGroupsSelectorExists","ProductGroupLabelLineContainer","ProductGroupLabelGrayLine","ProductGroupLabelLine","$playAnimation","ProductList","$overflowExists","ProductCardOnClickArea","Product","white","$groupIndex","$groupLength","$canPlayAniimation","Image","img","DescriptionButtonContainer","Name","Description","ButtonIcon","StyleableSvgImage","$isSelected","Button","button","dodgerblue","$disabled","$isStaticProduct","CopyWhiteSpace","ButtonCopy"],"mappings":";;;;;;;;;;;;;;AAMA,MAAMA,eAAkB,GAAA,EAAA;AACxB,MAAMC,8BAAiC,GAAA,CAAA;AAChC,MAAMC,kBAAqB,GAAA,GAAA;AAC3B,MAAMC,qBAAwB,GAAA,EAAA;AAErC,MAAMC,oBAAuB,GAAAC,MAAA,CAAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAW7B,MAAMC,yBAA4B,GAAAD,MAAA,CAAAA,SAAA;AAAA;AAAA,sBAEZE,KAAA,CAAAA,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;;AAAA;AAAA,oBAK1BF,KAAA,CAAAA,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;;AAAA;AAAA,oBAKxBF,KAAA,CAAAA,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;AAAA;;AAAA;AAAA;A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AAa5C,eAAO,CAAA,SAAA,CAAA,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ProductList.styles.js","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\n\nconst scrollBarHeight = 16;\nconst PRODUCT_CLICKABLE_AREA_Z_INDEX = 1;\nexport const PRODUCT_CARD_WIDTH = 205;\nexport const PRODUCT_LIST_GRID_GAP = 10;\n\nconst productCardAnimation = keyframes`\n50% {\n transform: scale(1.025);\n}\n 100% {\n box-shadow: 0 0 13px -1px rgb(33 35 39 / 0.174);\n /* we can't return to scale(1) because this creates a bug where the contents of the product card slightly shift on hover */\n transform: scale(0.999);\n }\n`;\n\nconst productGroupLineAnimation = keyframes`\n 25% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1);\n }\n\n 50% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n }\n\n 70% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n width: 100%;\n }\n\n 100% {\n background: rgba(0, 111, 255, 0.00);\n transform: scaleY(1);\n width: 100%;\n }\n`;\n\n// seconds\nconst productGroupAnimationDuration = 0.125;\n\n// seconds\nconst productCardAnimationDuration = 0.25;\n\nexport const Wrapper = styled.div`\n position: relative;\n margin-bottom: 20px;\n`;\n\nexport const Container = styled.div<{\n $isHovering: boolean;\n $moreThanOneGroupExists: boolean;\n $isDragging: boolean;\n}>`\n overflow-x: auto;\n padding-bottom: 30px;\n scroll-behavior: smooth;\n scroll-behavior: ${({ $isDragging }) => ($isDragging ? \"unset\" : \"smooth\")};\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n padding-top: 7px;\n `}\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /* We need the x-padding so the shadows of the cards aren't clipped */\n padding: 0 5px 24px;\n }\n\n /**\n * We cannot define padding on some of these scroll bar\n * elements. Because of this, we're defining scroll bar colors\n * with linear-gradient so users don't have to be very\n * accurate when clicking the scroll bar while keeping the\n * styles of the scroll bar slim.\n */\n\n &::-webkit-scrollbar {\n height: ${scrollBarHeight}px;\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n #eeeff1 6px,\n #eeeff1 8px,\n transparent 8px\n );\n }\n\n &::-webkit-scrollbar-thumb {\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n ${theme.colors.primaryBlue} 6px,\n ${theme.colors.primaryBlue} 8px,\n transparent 8px\n );\n\n ${({ $isHovering }) =>\n $isHovering &&\n css`\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 5px,\n ${theme.colors.primaryBlue} 5px,\n ${theme.colors.primaryBlue} 9px,\n transparent 9px\n );\n `}\n }\n`;\n\nexport const ProductGroupProductListContainer = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n`;\n\nexport const ProductGroups = styled.div<{ $columns: number }>`\n min-width: 100%;\n display: grid;\n gap: 0 10px;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n padding: 0 0 10px 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 0;\n }\n`;\n\nexport const ProductGroupLabelContainer = styled.div<{ $span: number }>`\n display: flex;\n grid-column: span ${({ $span }) => $span ?? 1};\n gap: 0 20px;\n`;\n\nexport const ProductGroupLabel = styled.span<{\n $isActive: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n color: #808893;\n font-size: 18px;\n font-weight: 700;\n scroll-margin-left: 10px;\n white-space: nowrap;\n\n ${({ $isActive, $productGroupsSelectorExists }) =>\n ($isActive || !$productGroupsSelectorExists) &&\n css`\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ProductGroupLabelLineContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nexport const ProductGroupLabelGrayLine = styled.div`\n width: 100%;\n height: 1px;\n background: #eeeff1;\n`;\n\nexport const ProductGroupLabelLine = styled.div<{\n $isActive: boolean;\n $playAnimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n width: 0;\n height: 1px;\n background: #eeeff1;\n\n ${({ $isActive, $playAnimation, $productGroupsSelectorExists }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productGroupLineAnimation} ease-in-out 1 forwards;\n `\n : $isActive &&\n $playAnimation &&\n css`\n animation: ${productGroupLineAnimation}\n ${productGroupAnimationDuration + productCardAnimationDuration}s\n ease-in-out 1 forwards;\n `}\n`;\n\nexport const ProductList = styled.div<{\n $columns: number;\n $isDragging: boolean;\n $overflowExists: boolean;\n $moreThanOneGroupExists: boolean;\n}>`\n display: grid;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n align-items: flex-end;\n gap: 0 ${PRODUCT_LIST_GRID_GAP}px;\n padding: 0 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 6px;\n }\n\n ${({ $overflowExists }) =>\n $overflowExists &&\n css`\n cursor: grab;\n `}\n\n ${({ $isDragging, $overflowExists }) =>\n $overflowExists &&\n $isDragging &&\n css`\n cursor: grabbing;\n `}\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n margin-top: 5px;\n `}\n`;\n\nexport const ProductCardOnClickArea = styled.div`\n position: absolute;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n width: 100%;\n height: 100%;\n`;\n\nexport const Product = styled.div<{\n $isActive: boolean;\n $groupIndex: number;\n $playAnimation: boolean;\n $groupLength: number;\n $canPlayAniimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n background: ${theme.colors.white};\n padding: 20px 10px;\n border-radius: 6px;\n height: 100%;\n min-height: 100%;\n -webkit-user-drag: none;\n user-select: none;\n /* can't use scale(1) because the content slightly shifts on hover */\n transform: scale(0.999);\n\n ${({\n $isActive,\n $groupIndex,\n $playAnimation,\n $groupLength,\n $canPlayAniimation,\n $productGroupsSelectorExists,\n }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productCardAnimation} ease-in-out 1 forwards;\n `\n : $canPlayAniimation &&\n $isActive &&\n $playAnimation &&\n css`\n animation: ${productCardAnimation} ${productCardAnimationDuration}s\n ease-in-out\n ${(productGroupAnimationDuration / $groupLength) * $groupIndex}s 1\n forwards;\n `}\n`;\n\nexport const Image = styled.img`\n -webkit-user-drag: none;\n user-select: none;\n`;\n\nexport const DescriptionButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n user-select: none;\n\n justify-content: space-between;\n flex-grow: 1;\n`;\n\nexport const Name = styled.div`\n color: #212427;\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n letter-spacing: -0.32px;\n line-height: normal;\n\n display: flex;\n justify-content: center;\n`;\n\nexport const Description = styled.div`\n text-align: center;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n letter-spacing: -0.28px;\n color: rgb(0 0 0 / 0.65);\n display: flex;\n justify-content: center;\n margin-top: 6px;\n`;\n\nexport const ButtonIcon = styled(StyleableSvgImage)<{ $isSelected: boolean }>`\n transition: transform 0.125s ease-in-out;\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n transform: rotate(45deg);\n `}\n`;\n\nexport const Button = styled.button<{\n $isStaticProduct: boolean;\n $isSelected: boolean;\n $disabled: boolean;\n}>`\n align-items: center;\n background: transparent;\n border-radius: 4px;\n border: 1px solid #808893;\n color: #808893;\n cursor: pointer;\n display: flex;\n gap: 4px;\n margin: 12px auto 0;\n min-width: 110px;\n padding: 10px 15px;\n transition: 0.3s;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n\n &:hover {\n background: #80889310;\n }\n\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n background: ${theme.colors.primaryBlue};\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.white};\n\n &:hover {\n background: ${theme.colors.dodgerblue};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n cursor: not-allowed !important;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n border: 1px solid rgba(73 73 73 / 0.6);\n background: rgba(73 73 73 / 0.6);\n color: ${theme.colors.white};\n\n &:hover {\n background: rgba(73 73 73 / 0.6);\n }\n }\n `}\n\n ${({ $isStaticProduct }) =>\n $isStaticProduct &&\n css`\n visibility: hidden;\n pointer-events: none;\n `}\n`;\n\nexport const CopyWhiteSpace = styled.span`\n display: inline-block;\n width: 5px;\n`;\n\nexport const ButtonCopy = styled.span`\n font-size: 14px;\n font-weight: 700;\n`;\n"],"names":["scrollBarHeight","PRODUCT_CLICKABLE_AREA_Z_INDEX","PRODUCT_CARD_WIDTH","PRODUCT_LIST_GRID_GAP","productCardAnimation","keyframes","productGroupLineAnimation","theme","colors","primaryBlue","productGroupAnimationDuration","productCardAnimationDuration","Wrapper","styled","div","Container","$isDragging","$moreThanOneGroupExists","css","BREAKPOINTS","MOBILE_AND_DOWN","$isHovering","ProductGroupProductListContainer","ProductGroups","$columns","ProductGroupLabelContainer","$span","ProductGroupLabel","span","$isActive","$productGroupsSelectorExists","ProductGroupLabelLineContainer","ProductGroupLabelGrayLine","ProductGroupLabelLine","$playAnimation","ProductList","$overflowExists","ProductCardOnClickArea","Product","white","$groupIndex","$groupLength","$canPlayAniimation","Image","img","DescriptionButtonContainer","Name","Description","ButtonIcon","StyleableSvgImage","$isSelected","Button","button","dodgerblue","$disabled","TABLET_AND_DOWN","$isStaticProduct","CopyWhiteS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AAAhC,MAAA,CAAAA,GAAA;AAAA,oBACgBX,KAAA,CAAAA,KAAA,CAAMC,OAAOC,WAAW;AAAA,0BAClBF,KAAA,CAAAA,KAAA,CAAMC,OAAOC,WAAW;AAAA,eACnCF,KAAA,CAAAA,KAAA,CAAMC,OAAO+B,KAAK;;AAAA;AAAA,sBAGXhC,KAAA,CAAAA,KAAA,CAAMC,OAAO6C,UAAU;AAAA;AAAA,KAExC;;AAAA,IAED,CAAC;EAAEC;CAAU,KACbA,SACA,IAAApC,MAAA,CAAAA,GAAA;AAAA;;AAAA,eAGWC,MAAAA,CAAAA,YAAYoC,eAAe;AAAA;AAAA;AAAA,iBAGzBhD,KAAA,CAAAA,KAAA,CAAMC,OAAO+B,KAAK;;AAAA;AAAA;AAAA;AAAA;AAAA,KAM9B;;AAAA,MAEC,CAAC;EAAEiB;CAAiB,KACtBA,gBACA,IAAAtC,MAAA,CAAAA,GAAA;AAAA;AAAA;AAAA,KAGC;AAAA,CAAA;AAGE,MAAMuC,iBAAiB5C,eAAO,CAAA,SAAA,CAAA,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;AAK9B,MAAM8B,aAAa7C,eAAO,CAAA,SAAA,CAAA,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -329,6 +329,16 @@ const Button = styled.button`
|
|
|
329
329
|
$disabled
|
|
330
330
|
}) => $disabled && css`
|
|
331
331
|
cursor: not-allowed !important;
|
|
332
|
+
|
|
333
|
+
@media ${BREAKPOINTS.TABLET_AND_DOWN} {
|
|
334
|
+
border: 1px solid rgba(73 73 73 / 0.6);
|
|
335
|
+
background: rgba(73 73 73 / 0.6);
|
|
336
|
+
color: ${theme.colors.white};
|
|
337
|
+
|
|
338
|
+
&:hover {
|
|
339
|
+
background: rgba(73 73 73 / 0.6);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
332
342
|
`}
|
|
333
343
|
|
|
334
344
|
${({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductList.styles.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\n\nconst scrollBarHeight = 16;\nconst PRODUCT_CLICKABLE_AREA_Z_INDEX = 1;\nexport const PRODUCT_CARD_WIDTH = 205;\nexport const PRODUCT_LIST_GRID_GAP = 10;\n\nconst productCardAnimation = keyframes`\n50% {\n transform: scale(1.025);\n}\n 100% {\n box-shadow: 0 0 13px -1px rgb(33 35 39 / 0.174);\n /* we can't return to scale(1) because this creates a bug where the contents of the product card slightly shift on hover */\n transform: scale(0.999);\n }\n`;\n\nconst productGroupLineAnimation = keyframes`\n 25% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1);\n }\n\n 50% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n }\n\n 70% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n width: 100%;\n }\n\n 100% {\n background: rgba(0, 111, 255, 0.00);\n transform: scaleY(1);\n width: 100%;\n }\n`;\n\n// seconds\nconst productGroupAnimationDuration = 0.125;\n\n// seconds\nconst productCardAnimationDuration = 0.25;\n\nexport const Wrapper = styled.div`\n position: relative;\n margin-bottom: 20px;\n`;\n\nexport const Container = styled.div<{\n $isHovering: boolean;\n $moreThanOneGroupExists: boolean;\n $isDragging: boolean;\n}>`\n overflow-x: auto;\n padding-bottom: 30px;\n scroll-behavior: smooth;\n scroll-behavior: ${({ $isDragging }) => ($isDragging ? \"unset\" : \"smooth\")};\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n padding-top: 7px;\n `}\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /* We need the x-padding so the shadows of the cards aren't clipped */\n padding: 0 5px 24px;\n }\n\n /**\n * We cannot define padding on some of these scroll bar\n * elements. Because of this, we're defining scroll bar colors\n * with linear-gradient so users don't have to be very\n * accurate when clicking the scroll bar while keeping the\n * styles of the scroll bar slim.\n */\n\n &::-webkit-scrollbar {\n height: ${scrollBarHeight}px;\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n #eeeff1 6px,\n #eeeff1 8px,\n transparent 8px\n );\n }\n\n &::-webkit-scrollbar-thumb {\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n ${theme.colors.primaryBlue} 6px,\n ${theme.colors.primaryBlue} 8px,\n transparent 8px\n );\n\n ${({ $isHovering }) =>\n $isHovering &&\n css`\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 5px,\n ${theme.colors.primaryBlue} 5px,\n ${theme.colors.primaryBlue} 9px,\n transparent 9px\n );\n `}\n }\n`;\n\nexport const ProductGroupProductListContainer = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n`;\n\nexport const ProductGroups = styled.div<{ $columns: number }>`\n min-width: 100%;\n display: grid;\n gap: 0 10px;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n padding: 0 0 10px 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 0;\n }\n`;\n\nexport const ProductGroupLabelContainer = styled.div<{ $span: number }>`\n display: flex;\n grid-column: span ${({ $span }) => $span ?? 1};\n gap: 0 20px;\n`;\n\nexport const ProductGroupLabel = styled.span<{\n $isActive: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n color: #808893;\n font-size: 18px;\n font-weight: 700;\n scroll-margin-left: 10px;\n white-space: nowrap;\n\n ${({ $isActive, $productGroupsSelectorExists }) =>\n ($isActive || !$productGroupsSelectorExists) &&\n css`\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ProductGroupLabelLineContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nexport const ProductGroupLabelGrayLine = styled.div`\n width: 100%;\n height: 1px;\n background: #eeeff1;\n`;\n\nexport const ProductGroupLabelLine = styled.div<{\n $isActive: boolean;\n $playAnimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n width: 0;\n height: 1px;\n background: #eeeff1;\n\n ${({ $isActive, $playAnimation, $productGroupsSelectorExists }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productGroupLineAnimation} ease-in-out 1 forwards;\n `\n : $isActive &&\n $playAnimation &&\n css`\n animation: ${productGroupLineAnimation}\n ${productGroupAnimationDuration + productCardAnimationDuration}s\n ease-in-out 1 forwards;\n `}\n`;\n\nexport const ProductList = styled.div<{\n $columns: number;\n $isDragging: boolean;\n $overflowExists: boolean;\n $moreThanOneGroupExists: boolean;\n}>`\n display: grid;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n align-items: flex-end;\n gap: 0 ${PRODUCT_LIST_GRID_GAP}px;\n padding: 0 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 6px;\n }\n\n ${({ $overflowExists }) =>\n $overflowExists &&\n css`\n cursor: grab;\n `}\n\n ${({ $isDragging, $overflowExists }) =>\n $overflowExists &&\n $isDragging &&\n css`\n cursor: grabbing;\n `}\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n margin-top: 5px;\n `}\n`;\n\nexport const ProductCardOnClickArea = styled.div`\n position: absolute;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n width: 100%;\n height: 100%;\n`;\n\nexport const Product = styled.div<{\n $isActive: boolean;\n $groupIndex: number;\n $playAnimation: boolean;\n $groupLength: number;\n $canPlayAniimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n background: ${theme.colors.white};\n padding: 20px 10px;\n border-radius: 6px;\n height: 100%;\n min-height: 100%;\n -webkit-user-drag: none;\n user-select: none;\n /* can't use scale(1) because the content slightly shifts on hover */\n transform: scale(0.999);\n\n ${({\n $isActive,\n $groupIndex,\n $playAnimation,\n $groupLength,\n $canPlayAniimation,\n $productGroupsSelectorExists,\n }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productCardAnimation} ease-in-out 1 forwards;\n `\n : $canPlayAniimation &&\n $isActive &&\n $playAnimation &&\n css`\n animation: ${productCardAnimation} ${productCardAnimationDuration}s\n ease-in-out\n ${(productGroupAnimationDuration / $groupLength) * $groupIndex}s 1\n forwards;\n `}\n`;\n\nexport const Image = styled.img`\n -webkit-user-drag: none;\n user-select: none;\n`;\n\nexport const DescriptionButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n user-select: none;\n\n justify-content: space-between;\n flex-grow: 1;\n`;\n\nexport const Name = styled.div`\n color: #212427;\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n letter-spacing: -0.32px;\n line-height: normal;\n\n display: flex;\n justify-content: center;\n`;\n\nexport const Description = styled.div`\n text-align: center;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n letter-spacing: -0.28px;\n color: rgb(0 0 0 / 0.65);\n display: flex;\n justify-content: center;\n margin-top: 6px;\n`;\n\nexport const ButtonIcon = styled(StyleableSvgImage)<{ $isSelected: boolean }>`\n transition: transform 0.125s ease-in-out;\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n transform: rotate(45deg);\n `}\n`;\n\nexport const Button = styled.button<{\n $isStaticProduct: boolean;\n $isSelected: boolean;\n $disabled: boolean;\n}>`\n align-items: center;\n background: transparent;\n border-radius: 4px;\n border: 1px solid #808893;\n color: #808893;\n cursor: pointer;\n display: flex;\n gap: 4px;\n margin: 12px auto 0;\n min-width: 110px;\n padding: 10px 15px;\n transition: 0.3s;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n\n &:hover {\n background: #80889310;\n }\n\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n background: ${theme.colors.primaryBlue};\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.white};\n\n &:hover {\n background: ${theme.colors.dodgerblue};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n cursor: not-allowed !important;\n `}\n\n ${({ $isStaticProduct }) =>\n $isStaticProduct &&\n css`\n visibility: hidden;\n pointer-events: none;\n `}\n`;\n\nexport const CopyWhiteSpace = styled.span`\n display: inline-block;\n width: 5px;\n`;\n\nexport const ButtonCopy = styled.span`\n font-size: 14px;\n font-weight: 700;\n`;\n"],"names":["scrollBarHeight","PRODUCT_CLICKABLE_AREA_Z_INDEX","PRODUCT_CARD_WIDTH","PRODUCT_LIST_GRID_GAP","productCardAnimation","keyframes","productGroupLineAnimation","theme","colors","primaryBlue","productGroupAnimationDuration","productCardAnimationDuration","Wrapper","styled","div","Container","$isDragging","$moreThanOneGroupExists","css","BREAKPOINTS","MOBILE_AND_DOWN","$isHovering","ProductGroupProductListContainer","ProductGroups","$columns","ProductGroupLabelContainer","$span","ProductGroupLabel","span","$isActive","$productGroupsSelectorExists","ProductGroupLabelLineContainer","ProductGroupLabelGrayLine","ProductGroupLabelLine","$playAnimation","ProductList","$overflowExists","ProductCardOnClickArea","Product","white","$groupIndex","$groupLength","$canPlayAniimation","Image","img","DescriptionButtonContainer","Name","Description","ButtonIcon","StyleableSvgImage","$isSelected","Button","button","dodgerblue","$disabled","$isStaticProduct","CopyWhiteSpace","ButtonCopy"],"mappings":";;;;;;AAMA,MAAMA,eAAkB,GAAA,EAAA;AACxB,MAAMC,8BAAiC,GAAA,CAAA;AAChC,MAAMC,kBAAqB,GAAA,GAAA;AAC3B,MAAMC,qBAAwB,GAAA,EAAA;AAErC,MAAMC,oBAAuB,GAAAC,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,C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AanC,OAAOoC,iBAAiB,CAAA;AAAA;AAAA,IAE9C,CAAC;EAAEC;CAAY,KACfA,WACA,IAAAhC,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGE,MAAMiC,SAAStC,MAAO,CAAAuC,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAiBhBnD,8BAA8B;;AAAA;AAAA;AAAA;;AAAA,IAMvC,CAAC;EAAEiD;CAAY,KACfA,WACA,IAAAhC,GAAA;AAAA,oBACgBX,KAAA,CAAMC,OAAOC,WAAW;AAAA,0BAClBF,KAAA,CAAMC,OAAOC,WAAW;AAAA,eACnCF,KAAA,CAAMC,OAAO+B,KAAK;;AAAA;AAAA,sBAGXhC,KAAA,CAAMC,OAAO6C,UAAU;AAAA;AAAA,KAExC;;AAAA,IAED,CAAC;EAAEC;CAAU,KACbA,SACA,IAAApC,GAAA;AAAA;AAAA,KAEC;;AAAA,MAEC,CAAC;EAAEqC;CAAiB,KACtBA,gBACA,IAAArC,GAAA;AAAA;AAAA;AAAA,KAGC;AAAA,CAAA;AAGE,MAAMsC,iBAAiB3C,MAAO,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;AAK9B,MAAM6B,aAAa5C,MAAO,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProductList.styles.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.styles.tsx"],"sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\n\nconst scrollBarHeight = 16;\nconst PRODUCT_CLICKABLE_AREA_Z_INDEX = 1;\nexport const PRODUCT_CARD_WIDTH = 205;\nexport const PRODUCT_LIST_GRID_GAP = 10;\n\nconst productCardAnimation = keyframes`\n50% {\n transform: scale(1.025);\n}\n 100% {\n box-shadow: 0 0 13px -1px rgb(33 35 39 / 0.174);\n /* we can't return to scale(1) because this creates a bug where the contents of the product card slightly shift on hover */\n transform: scale(0.999);\n }\n`;\n\nconst productGroupLineAnimation = keyframes`\n 25% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1);\n }\n\n 50% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n }\n\n 70% {\n background: ${theme.colors.primaryBlue};\n transform: scaleY(1.5);\n width: 100%;\n }\n\n 100% {\n background: rgba(0, 111, 255, 0.00);\n transform: scaleY(1);\n width: 100%;\n }\n`;\n\n// seconds\nconst productGroupAnimationDuration = 0.125;\n\n// seconds\nconst productCardAnimationDuration = 0.25;\n\nexport const Wrapper = styled.div`\n position: relative;\n margin-bottom: 20px;\n`;\n\nexport const Container = styled.div<{\n $isHovering: boolean;\n $moreThanOneGroupExists: boolean;\n $isDragging: boolean;\n}>`\n overflow-x: auto;\n padding-bottom: 30px;\n scroll-behavior: smooth;\n scroll-behavior: ${({ $isDragging }) => ($isDragging ? \"unset\" : \"smooth\")};\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n padding-top: 7px;\n `}\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /* We need the x-padding so the shadows of the cards aren't clipped */\n padding: 0 5px 24px;\n }\n\n /**\n * We cannot define padding on some of these scroll bar\n * elements. Because of this, we're defining scroll bar colors\n * with linear-gradient so users don't have to be very\n * accurate when clicking the scroll bar while keeping the\n * styles of the scroll bar slim.\n */\n\n &::-webkit-scrollbar {\n height: ${scrollBarHeight}px;\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n #eeeff1 6px,\n #eeeff1 8px,\n transparent 8px\n );\n }\n\n &::-webkit-scrollbar-thumb {\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 6px,\n ${theme.colors.primaryBlue} 6px,\n ${theme.colors.primaryBlue} 8px,\n transparent 8px\n );\n\n ${({ $isHovering }) =>\n $isHovering &&\n css`\n /* at the top of this componnent's definition is a note on why we're defining colors this way */\n background-image: linear-gradient(\n to bottom,\n transparent 5px,\n ${theme.colors.primaryBlue} 5px,\n ${theme.colors.primaryBlue} 9px,\n transparent 9px\n );\n `}\n }\n`;\n\nexport const ProductGroupProductListContainer = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n`;\n\nexport const ProductGroups = styled.div<{ $columns: number }>`\n min-width: 100%;\n display: grid;\n gap: 0 10px;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n padding: 0 0 10px 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 0;\n }\n`;\n\nexport const ProductGroupLabelContainer = styled.div<{ $span: number }>`\n display: flex;\n grid-column: span ${({ $span }) => $span ?? 1};\n gap: 0 20px;\n`;\n\nexport const ProductGroupLabel = styled.span<{\n $isActive: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n color: #808893;\n font-size: 18px;\n font-weight: 700;\n scroll-margin-left: 10px;\n white-space: nowrap;\n\n ${({ $isActive, $productGroupsSelectorExists }) =>\n ($isActive || !$productGroupsSelectorExists) &&\n css`\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ProductGroupLabelLineContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nexport const ProductGroupLabelGrayLine = styled.div`\n width: 100%;\n height: 1px;\n background: #eeeff1;\n`;\n\nexport const ProductGroupLabelLine = styled.div<{\n $isActive: boolean;\n $playAnimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n width: 0;\n height: 1px;\n background: #eeeff1;\n\n ${({ $isActive, $playAnimation, $productGroupsSelectorExists }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productGroupLineAnimation} ease-in-out 1 forwards;\n `\n : $isActive &&\n $playAnimation &&\n css`\n animation: ${productGroupLineAnimation}\n ${productGroupAnimationDuration + productCardAnimationDuration}s\n ease-in-out 1 forwards;\n `}\n`;\n\nexport const ProductList = styled.div<{\n $columns: number;\n $isDragging: boolean;\n $overflowExists: boolean;\n $moreThanOneGroupExists: boolean;\n}>`\n display: grid;\n grid-template-columns: repeat(\n ${({ $columns }) => $columns},\n ${PRODUCT_CARD_WIDTH}px\n );\n align-items: flex-end;\n gap: 0 ${PRODUCT_LIST_GRID_GAP}px;\n padding: 0 10px;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n padding-left: 6px;\n }\n\n ${({ $overflowExists }) =>\n $overflowExists &&\n css`\n cursor: grab;\n `}\n\n ${({ $isDragging, $overflowExists }) =>\n $overflowExists &&\n $isDragging &&\n css`\n cursor: grabbing;\n `}\n\n ${({ $moreThanOneGroupExists }) =>\n !$moreThanOneGroupExists &&\n css`\n margin-top: 5px;\n `}\n`;\n\nexport const ProductCardOnClickArea = styled.div`\n position: absolute;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n width: 100%;\n height: 100%;\n`;\n\nexport const Product = styled.div<{\n $isActive: boolean;\n $groupIndex: number;\n $playAnimation: boolean;\n $groupLength: number;\n $canPlayAniimation: boolean;\n $productGroupsSelectorExists: boolean;\n}>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n background: ${theme.colors.white};\n padding: 20px 10px;\n border-radius: 6px;\n height: 100%;\n min-height: 100%;\n -webkit-user-drag: none;\n user-select: none;\n /* can't use scale(1) because the content slightly shifts on hover */\n transform: scale(0.999);\n\n ${({\n $isActive,\n $groupIndex,\n $playAnimation,\n $groupLength,\n $canPlayAniimation,\n $productGroupsSelectorExists,\n }) =>\n !$productGroupsSelectorExists\n ? css`\n animation: ${productCardAnimation} ease-in-out 1 forwards;\n `\n : $canPlayAniimation &&\n $isActive &&\n $playAnimation &&\n css`\n animation: ${productCardAnimation} ${productCardAnimationDuration}s\n ease-in-out\n ${(productGroupAnimationDuration / $groupLength) * $groupIndex}s 1\n forwards;\n `}\n`;\n\nexport const Image = styled.img`\n -webkit-user-drag: none;\n user-select: none;\n`;\n\nexport const DescriptionButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n user-select: none;\n\n justify-content: space-between;\n flex-grow: 1;\n`;\n\nexport const Name = styled.div`\n color: #212427;\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n letter-spacing: -0.32px;\n line-height: normal;\n\n display: flex;\n justify-content: center;\n`;\n\nexport const Description = styled.div`\n text-align: center;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n letter-spacing: -0.28px;\n color: rgb(0 0 0 / 0.65);\n display: flex;\n justify-content: center;\n margin-top: 6px;\n`;\n\nexport const ButtonIcon = styled(StyleableSvgImage)<{ $isSelected: boolean }>`\n transition: transform 0.125s ease-in-out;\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n transform: rotate(45deg);\n `}\n`;\n\nexport const Button = styled.button<{\n $isStaticProduct: boolean;\n $isSelected: boolean;\n $disabled: boolean;\n}>`\n align-items: center;\n background: transparent;\n border-radius: 4px;\n border: 1px solid #808893;\n color: #808893;\n cursor: pointer;\n display: flex;\n gap: 4px;\n margin: 12px auto 0;\n min-width: 110px;\n padding: 10px 15px;\n transition: 0.3s;\n z-index: ${PRODUCT_CLICKABLE_AREA_Z_INDEX};\n\n &:hover {\n background: #80889310;\n }\n\n ${({ $isSelected }) =>\n $isSelected &&\n css`\n background: ${theme.colors.primaryBlue};\n border: 1px solid ${theme.colors.primaryBlue};\n color: ${theme.colors.white};\n\n &:hover {\n background: ${theme.colors.dodgerblue};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n cursor: not-allowed !important;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n border: 1px solid rgba(73 73 73 / 0.6);\n background: rgba(73 73 73 / 0.6);\n color: ${theme.colors.white};\n\n &:hover {\n background: rgba(73 73 73 / 0.6);\n }\n }\n `}\n\n ${({ $isStaticProduct }) =>\n $isStaticProduct &&\n css`\n visibility: hidden;\n pointer-events: none;\n `}\n`;\n\nexport const CopyWhiteSpace = styled.span`\n display: inline-block;\n width: 5px;\n`;\n\nexport const ButtonCopy = styled.span`\n font-size: 14px;\n font-weight: 700;\n`;\n"],"names":["scrollBarHeight","PRODUCT_CLICKABLE_AREA_Z_INDEX","PRODUCT_CARD_WIDTH","PRODUCT_LIST_GRID_GAP","productCardAnimation","keyframes","productGroupLineAnimation","theme","colors","primaryBlue","productGroupAnimationDuration","productCardAnimationDuration","Wrapper","styled","div","Container","$isDragging","$moreThanOneGroupExists","css","BREAKPOINTS","MOBILE_AND_DOWN","$isHovering","ProductGroupProductListContainer","ProductGroups","$columns","ProductGroupLabelContainer","$span","ProductGroupLabel","span","$isActive","$productGroupsSelectorExists","ProductGroupLabelLineContainer","ProductGroupLabelGrayLine","ProductGroupLabelLine","$playAnimation","ProductList","$overflowExists","ProductCardOnClickArea","Product","white","$groupIndex","$groupLength","$canPlayAniimation","Image","img","DescriptionButtonContainer","Name","Description","ButtonIcon","StyleableSvgImage","$isSelected","Button","button","dodgerblue","$disabled","TABLET_AND_DOWN","$isStaticProduct","CopyWhiteSpace","ButtonCopy"],"mappings":";;;;;;AAMA,MAAMA,eAAkB,GAAA,EAAA;AACxB,MAAMC,8BAAiC,GAAA,CAAA;AAChC,MAAMC,kBAAqB,GAAA,GAAA;AAC3B,MAAMC,qBAAwB,GAAA,EAAA;AAErC,MAAMC,oBAAuB,GAAAC,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAW7B,MAAMC,yBAA4B,GAAAD,SAAA;AAAA;AAAA,sBAEZE,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;;AAAA;AAAA,oBAK1BF,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;;AAAA;AAAA,oBAKxBF,KAAA,CAAMC,OAAOC,WAAW;AAAA;AAAA;AAAA;;AA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AA;AAAA,aAiBhBnD,8BAA8B;;AAAA;AAAA;AAAA;;AAAA,IAMvC,CAAC;EAAEiD;CAAY,KACfA,WACA,IAAAhC,GAAA;AAAA,oBACgBX,KAAA,CAAMC,OAAOC,WAAW;AAAA,0BAClBF,KAAA,CAAMC,OAAOC,WAAW;AAAA,eACnCF,KAAA,CAAMC,OAAO+B,KAAK;;AAAA;AAAA,sBAGXhC,KAAA,CAAMC,OAAO6C,UAAU;AAAA;AAAA,KAExC;;AAAA,IAED,CAAC;EAAEC;CAAU,KACbA,SACA,IAAApC,GAAA;AAAA;;AAAA,eAGWC,YAAYoC,eAAe;AAAA;AAAA;AAAA,iBAGzBhD,KAAA,CAAMC,OAAO+B,KAAK;;AAAA;AAAA;AAAA;AAAA;AAAA,KAM9B;;AAAA,MAEC,CAAC;EAAEiB;CAAiB,KACtBA,gBACA,IAAAtC,GAAA;AAAA;AAAA;AAAA,KAGC;AAAA,CAAA;AAGE,MAAMuC,iBAAiB5C,MAAO,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;AAK9B,MAAM8B,aAAa7C,MAAO,CAAAe,IAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -12,7 +12,7 @@ require('./assets/attention.svg.js');
|
|
|
12
12
|
var InputCard_styles = require('./InputCard.styles.js');
|
|
13
13
|
require('./InputSections/index.js');
|
|
14
14
|
var CustomImage = require('../../../../CustomImage/CustomImage.js');
|
|
15
|
-
var attentionIcon = require("../../../../../assets/
|
|
15
|
+
var attentionIcon = require("../../../../../assets/attention2.svg");
|
|
16
16
|
var OptionSelectSection = require('./InputSections/OptionSelectSection.js');
|
|
17
17
|
var SliderSection = require('./InputSections/SliderSection.js');
|
|
18
18
|
var CounterSection = require('./InputSections/CounterSection.js');
|
|
@@ -10,7 +10,7 @@ import './assets/attention.svg.mjs';
|
|
|
10
10
|
import { Card, Header, HeaderHeadingSection, HeadingIcon, HeadingTitle, HeaderActionSection, SubduedInfo, OverlayFilter, NotAvailableNoteWrap, NotAvailableNoteIcon, InputBody, InputSectionSpacing, Footer, FooterContent, FooterNote } from './InputCard.styles.mjs';
|
|
11
11
|
import './InputSections/index.mjs';
|
|
12
12
|
import { CustomImage } from '../../../../CustomImage/CustomImage.mjs';
|
|
13
|
-
import attentionIcon__default from "../../../../../assets/
|
|
13
|
+
import attentionIcon__default from "../../../../../assets/attention2.svg";
|
|
14
14
|
import { OptionSelectSection } from './InputSections/OptionSelectSection.mjs';
|
|
15
15
|
import { SliderSection } from './InputSections/SliderSection.mjs';
|
|
16
16
|
import { CounterSection } from './InputSections/CounterSection.mjs';
|
|
@@ -11,8 +11,8 @@ require('../assets/plus.svg.js');
|
|
|
11
11
|
var Layout_styles = require('./Layout.styles.js');
|
|
12
12
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
13
13
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
14
|
-
var MinusIcon = require("../../../../../../assets/
|
|
15
|
-
var PlusIcon = require("../../../../../../assets/
|
|
14
|
+
var MinusIcon = require("../../../../../../assets/minus5.svg");
|
|
15
|
+
var PlusIcon = require("../../../../../../assets/plus5.svg");
|
|
16
16
|
function _interopDefault(e) {
|
|
17
17
|
return e && e.__esModule ? e : {
|
|
18
18
|
default: e
|
|
@@ -9,8 +9,8 @@ import '../assets/plus.svg.mjs';
|
|
|
9
9
|
import { InputWrapper, Label, InputFlexWrapper } from './Layout.styles.mjs';
|
|
10
10
|
import { CustomImage } from '../../../../../CustomImage/CustomImage.mjs';
|
|
11
11
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
|
-
import MinusIcon__default from "../../../../../../assets/
|
|
13
|
-
import PlusIcon__default from "../../../../../../assets/
|
|
12
|
+
import MinusIcon__default from "../../../../../../assets/minus5.svg";
|
|
13
|
+
import PlusIcon__default from "../../../../../../assets/plus5.svg";
|
|
14
14
|
"use strict";
|
|
15
15
|
const CounterSection = ({
|
|
16
16
|
value,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention2.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention2.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention2.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var MinusIcon = require("../../../../../../assets/
|
|
6
|
+
var MinusIcon = require("../../../../../../assets/minus5.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/minus5.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/minus5.svg";
|
|
3
3
|
//# sourceMappingURL=minus.svg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var PlusIcon = require("../../../../../../assets/
|
|
6
|
+
var PlusIcon = require("../../../../../../assets/plus5.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/plus5.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/plus5.svg";
|
|
3
3
|
//# sourceMappingURL=plus.svg.mjs.map
|
|
@@ -6,7 +6,7 @@ var asset = require('../../../../../utils/asset.js');
|
|
|
6
6
|
require('./assets/attention.svg.js');
|
|
7
7
|
var Part = require('./Part.js');
|
|
8
8
|
var ProgressBarChart_styles = require('./ProgressBarChart.styles.js');
|
|
9
|
-
var attentionIcon = require("../../../../../assets/
|
|
9
|
+
var attentionIcon = require("../../../../../assets/attention.svg");
|
|
10
10
|
function _interopDefault(e) {
|
|
11
11
|
return e && e.__esModule ? e : {
|
|
12
12
|
default: e
|
|
@@ -4,7 +4,7 @@ import { imageSrc } from '../../../../../utils/asset.mjs';
|
|
|
4
4
|
import './assets/attention.svg.mjs';
|
|
5
5
|
import { PART_GAP_PX, PART_WIDTH_PX, Part } from './Part.mjs';
|
|
6
6
|
import { ProgressBarChartContainer, ProgressBarChartHeader, ProgressBarChartTitle, ProgressBarWrapper, ProgressBarPartsContainer, ProgressBarAttentionLabel, ProgressBarAttentionLabelIcon } from './ProgressBarChart.styles.mjs';
|
|
7
|
-
import attentionIcon__default from "../../../../../assets/
|
|
7
|
+
import attentionIcon__default from "../../../../../assets/attention.svg";
|
|
8
8
|
"use strict";
|
|
9
9
|
const ProgressBarChart = ({
|
|
10
10
|
title,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -19,8 +19,8 @@ var ComputeResourceCalculator_types = require('../../../../ComputeResourceCalcul
|
|
|
19
19
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
20
20
|
var SearchIcon = require("../../../../../../assets/search2.svg");
|
|
21
21
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
22
|
-
var MinusIcon = require("../../../../../../assets/
|
|
23
|
-
var PlusIcon = require("../../../../../../assets/
|
|
22
|
+
var MinusIcon = require("../../../../../../assets/minus4.svg");
|
|
23
|
+
var PlusIcon = require("../../../../../../assets/plus4.svg");
|
|
24
24
|
function _interopDefault(e) {
|
|
25
25
|
return e && e.__esModule ? e : {
|
|
26
26
|
default: e
|