@ubnt/store.core 10.0.0-beta.3 → 10.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/assets/express7.jpg +0 -0
- package/lib/assets/express72.jpg +0 -0
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/poe2.svg +2 -3
- package/lib/assets/poe3.svg +3 -2
- package/lib/assets/port.svg +2 -4
- package/lib/assets/port2.svg +4 -2
- package/lib/assets/ucgFiber.jpg +0 -0
- package/lib/assets/ucgFiber2.jpg +0 -0
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/assets/udr7.jpg +0 -0
- package/lib/assets/udr72.jpg +0 -0
- package/lib/components/Header/CartIcon/CartIcon.d.ts +1 -1
- package/lib/components/Header/CartIcon/CartIcon.js +5 -1
- package/lib/components/Header/CartIcon/CartIcon.js.map +1 -1
- package/lib/components/Header/CartIcon/CartIcon.mjs +5 -1
- package/lib/components/Header/CartIcon/CartIcon.mjs.map +1 -1
- package/lib/components/Header/CartIcon/CartIcon.types.d.ts +2 -0
- package/lib/components/Header/Header.styles.d.ts +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +51 -36
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +53 -38
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +6 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js +33 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +30 -1
- package/lib/components/Header/ProHeader/ProHeader.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/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgFiber.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgFiber.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr7.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgFiber.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgFiber.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udr7.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udr7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/poe.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/poe.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +21 -21
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +14 -14
- package/lib/components/ModelCompareV3/data/products/express7.js +1 -1
- package/lib/components/ModelCompareV3/data/products/express7.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udr7.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udr7.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
## Releases
|
|
8
8
|
|
|
9
|
+
### v10.0.0-beta.5
|
|
10
|
+
|
|
11
|
+
- [feat] [NEP-4297] Minor fixes for Add UISP Switcher
|
|
12
|
+
|
|
13
|
+
### v10.0.0-beta.4
|
|
14
|
+
|
|
15
|
+
- [Feat] [NEP-4294](https://ubiquiti.atlassian.net/browse/NEP-4294) Handle mobile cart preview modal
|
|
16
|
+
|
|
9
17
|
### v10.0.0-beta.3
|
|
10
18
|
|
|
11
19
|
- [feat] [NEP-4297] Minor fixes for Add UISP Switcher
|
package/lib/assets/express7.jpg
CHANGED
|
Binary file
|
package/lib/assets/express72.jpg
CHANGED
|
Binary file
|
package/lib/assets/pause.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="6" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
3
|
+
<rect x="12" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/pause2.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="13" height="17" viewBox="0 0 13 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.232422" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
3
|
+
<rect x="8.23242" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/poe2.svg
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9898 8.15227L15.8356 14.8869L21.6848 14.8805L14.2162 23.5358L15.3235 16.7717L9.54576 16.7797L16.9898 8.15227ZM16.4087 6.52963C17.2346 5.57348 18.8289 6.28923 18.6125 7.56393L17.6149 13.3849L22.2048 13.3799C23.2715 13.3799 23.8799 14.6351 23.1631 15.4633L14.8046 25.1499C13.9838 26.101 12.3903 25.3977 12.5999 24.1241L13.5575 18.2741L9.0274 18.2804C7.96036 18.2804 7.353 17.0256 8.06674 16.1977L16.4087 6.52963Z" fill="currentColor"/>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.375 7.625V6.375H17.625C17.835 6.375 18 6.21 18 6C18 5.79 17.835 5.625 17.625 5.625H16.375V4.375C16.375 4.165 16.21 4 16 4C15.79 4 15.625 4.165 15.625 4.375V5.625H14.375C14.165 5.625 14 5.79 14 6C14 6.21 14.165 6.375 14.375 6.375H15.625V7.625C15.625 7.835 15.79 8 16 8C16.21 8 16.375 7.835 16.375 7.625ZM9.21611 11.1221L8.48244 15.6041C8.42665 15.9431 8.85506 16.1411 9.08032 15.8801L14.6529 9.42211C14.8445 9.20111 14.6855 8.86011 14.3929 8.86011L10.7392 8.86411L11.5045 4.39911C11.5624 4.05811 11.1329 3.85811 10.9066 4.12011L5.34564 10.5651C5.15511 10.7861 5.31406 11.1271 5.60669 11.1271L9.21611 11.1221Z" fill="#838691"/>
|
|
4
3
|
</svg>
|
package/lib/assets/poe3.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
1
|
+
<svg width="31" height="31" viewBox="0 0 31 31" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9898 8.15227L15.8356 14.8869L21.6848 14.8805L14.2162 23.5358L15.3235 16.7717L9.54576 16.7797L16.9898 8.15227ZM16.4087 6.52963C17.2346 5.57348 18.8289 6.28923 18.6125 7.56393L17.6149 13.3849L22.2048 13.3799C23.2715 13.3799 23.8799 14.6351 23.1631 15.4633L14.8046 25.1499C13.9838 26.101 12.3903 25.3977 12.5999 24.1241L13.5575 18.2741L9.0274 18.2804C7.96036 18.2804 7.353 17.0256 8.06674 16.1977L16.4087 6.52963Z" fill="currentColor"/>
|
|
3
4
|
</svg>
|
package/lib/assets/port.svg
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M22.5 7V9H24.5C25.0523 9 25.5 9.44772 25.5 10V24.5C25.5 25.0523 25.0523 25.5 24.5 25.5H5.5C4.94772 25.5 4.5 25.0523 4.5 24.5V10C4.5 9.44772 4.94772 9 5.5 9H7.5V7C7.5 6.44772 7.94772 6 8.5 6H10.5V5.5C10.5 4.94772 10.9477 4.5 11.5 4.5H18.5C19.0523 4.5 19.5 4.94772 19.5 5.5V6H21.5C22.0523 6 22.5 6.44772 22.5 7ZM6 24H24V10.5H21V7.5H18V6H12V7.5H9V10.5H6V24ZM20 12C20.5523 12 21 12.4477 21 13V15.75C21 16.1642 20.6642 16.5 20.25 16.5C19.8358 16.5 19.5 16.1642 19.5 15.75V13.5H10.5V15.75C10.5 16.1642 10.1642 16.5 9.75 16.5C9.33579 16.5 9 16.1642 9 15.75V13C9 12.4477 9.44771 12 10 12H20ZM21 18.75C21 18.3358 20.6642 18 20.25 18C19.8358 18 19.5 18.3358 19.5 18.75V20.25C19.5 20.6642 19.8358 21 20.25 21C20.6642 21 21 20.6642 21 20.25V18.75ZM16.7505 18C17.1647 18 17.5005 18.3358 17.5005 18.75V20.25C17.5005 20.6642 17.1647 21 16.7505 21C16.3363 21 16.0005 20.6642 16.0005 20.25V18.75C16.0005 18.3358 16.3363 18 16.7505 18ZM13.9995 18.75C13.9995 18.3358 13.6637 18 13.2495 18C12.8353 18 12.4995 18.3358 12.4995 18.75V20.25C12.4995 20.6642 12.8353 21 13.2495 21C13.6637 21 13.9995 20.6642 13.9995 20.25V18.75ZM9.75 18C10.1642 18 10.5 18.3358 10.5 18.75V20.25C10.5 20.6642 10.1642 21 9.75 21C9.33579 21 9 20.6642 9 20.25V18.75C9 18.3358 9.33579 18 9.75 18Z" fill="#212124"/>
|
|
4
|
-
</g>
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 16V4H4V16H16ZM4 3H16C16.552 3 17 3.448 17 4V16C17 16.552 16.552 17 16 17H4C3.448 17 3 16.552 3 16V4C3 3.448 3.448 3 4 3ZM9.25 6H10.75C11.302 6 11.75 6.448 11.75 7H12.75C13.302 7 13.75 7.448 13.75 8V8.5C14.302 8.5 14.75 8.948 14.75 9.5V13.1C14.75 13.652 14.302 14.1 13.75 14.1H6.25C5.698 14.1 5.25 13.652 5.25 13.1V9.5C5.25 8.948 5.698 8.5 6.25 8.5V8C6.25 7.448 6.698 7 7.25 7H8.25C8.25 6.448 8.698 6 9.25 6ZM7.25 8H8.25H8.75H9.25V7H10.75V8H11.25H11.75H12.75V8.5V9.5H13.75V13.1H6.25V9.5H7.25V8.5V8Z" fill="#838691"/>
|
|
5
3
|
</svg>
|
package/lib/assets/port2.svg
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
1
|
+
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Port">
|
|
3
|
+
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M22.5 7V9H24.5C25.0523 9 25.5 9.44772 25.5 10V24.5C25.5 25.0523 25.0523 25.5 24.5 25.5H5.5C4.94772 25.5 4.5 25.0523 4.5 24.5V10C4.5 9.44772 4.94772 9 5.5 9H7.5V7C7.5 6.44772 7.94772 6 8.5 6H10.5V5.5C10.5 4.94772 10.9477 4.5 11.5 4.5H18.5C19.0523 4.5 19.5 4.94772 19.5 5.5V6H21.5C22.0523 6 22.5 6.44772 22.5 7ZM6 24H24V10.5H21V7.5H18V6H12V7.5H9V10.5H6V24ZM20 12C20.5523 12 21 12.4477 21 13V15.75C21 16.1642 20.6642 16.5 20.25 16.5C19.8358 16.5 19.5 16.1642 19.5 15.75V13.5H10.5V15.75C10.5 16.1642 10.1642 16.5 9.75 16.5C9.33579 16.5 9 16.1642 9 15.75V13C9 12.4477 9.44771 12 10 12H20ZM21 18.75C21 18.3358 20.6642 18 20.25 18C19.8358 18 19.5 18.3358 19.5 18.75V20.25C19.5 20.6642 19.8358 21 20.25 21C20.6642 21 21 20.6642 21 20.25V18.75ZM16.7505 18C17.1647 18 17.5005 18.3358 17.5005 18.75V20.25C17.5005 20.6642 17.1647 21 16.7505 21C16.3363 21 16.0005 20.6642 16.0005 20.25V18.75C16.0005 18.3358 16.3363 18 16.7505 18ZM13.9995 18.75C13.9995 18.3358 13.6637 18 13.2495 18C12.8353 18 12.4995 18.3358 12.4995 18.75V20.25C12.4995 20.6642 12.8353 21 13.2495 21C13.6637 21 13.9995 20.6642 13.9995 20.25V18.75ZM9.75 18C10.1642 18 10.5 18.3358 10.5 18.75V20.25C10.5 20.6642 10.1642 21 9.75 21C9.33579 21 9 20.6642 9 20.25V18.75C9 18.3358 9.33579 18 9.75 18Z" fill="#212124"/>
|
|
4
|
+
</g>
|
|
3
5
|
</svg>
|
package/lib/assets/ucgFiber.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgFiber2.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgMax.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgMax2.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgUltra.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgUltra2.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmPro.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmPro2.jpg
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/assets/udr7.jpg
CHANGED
|
Binary file
|
package/lib/assets/udr72.jpg
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CartIconProps } from "./CartIcon.types";
|
|
2
|
-
export declare const CartIcon: ({ className, itemCount, width, height, motif, }: CartIconProps) => JSX.Element;
|
|
2
|
+
export declare const CartIcon: ({ className, itemCount, width, height, motif, onMouseEnter, onMouseLeave, }: CartIconProps) => JSX.Element;
|
|
@@ -22,7 +22,9 @@ const CartIcon = ({
|
|
|
22
22
|
itemCount,
|
|
23
23
|
width = 20,
|
|
24
24
|
height = 20,
|
|
25
|
-
motif = "light"
|
|
25
|
+
motif = "light",
|
|
26
|
+
onMouseEnter,
|
|
27
|
+
onMouseLeave
|
|
26
28
|
}) => {
|
|
27
29
|
const cartQuantityText = React.useMemo(() => {
|
|
28
30
|
if (itemCount && itemCount > 0) {
|
|
@@ -32,6 +34,8 @@ const CartIcon = ({
|
|
|
32
34
|
}, [itemCount]);
|
|
33
35
|
return /* @__PURE__ */jsxRuntime.jsxs(CartIcon_styles.Wrap, {
|
|
34
36
|
className,
|
|
37
|
+
onMouseEnter,
|
|
38
|
+
onMouseLeave,
|
|
35
39
|
children: [/* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
36
40
|
src: itemCount > 0 ? CartIcon__default["default"] : CartEmptyIcon__default["default"],
|
|
37
41
|
width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartIcon.js","sources":["../../../../src/components/Header/CartIcon/CartIcon.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport CartFullIcon from \"../../../assets/icons/cart.svg\";\nimport CartEmptyIcon from \"../../../assets/icons/cartEmpty.svg\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./CartIcon.styles\";\nimport type { CartIconProps } from \"./CartIcon.types\";\n\nexport const CartIcon = ({\n className,\n itemCount,\n width = 20,\n height = 20,\n motif = \"light\",\n}: CartIconProps) => {\n // Display 99+ when cart quantity greater than 99\n const cartQuantityText = useMemo(() => {\n if (itemCount && itemCount > 0) {\n return itemCount > 99 ? \"99+\" : itemCount.toString();\n }\n\n return null;\n }, [itemCount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap
|
|
1
|
+
{"version":3,"file":"CartIcon.js","sources":["../../../../src/components/Header/CartIcon/CartIcon.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport CartFullIcon from \"../../../assets/icons/cart.svg\";\nimport CartEmptyIcon from \"../../../assets/icons/cartEmpty.svg\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./CartIcon.styles\";\nimport type { CartIconProps } from \"./CartIcon.types\";\n\nexport const CartIcon = ({\n className,\n itemCount,\n width = 20,\n height = 20,\n motif = \"light\",\n onMouseEnter,\n onMouseLeave,\n}: CartIconProps) => {\n // Display 99+ when cart quantity greater than 99\n const cartQuantityText = useMemo(() => {\n if (itemCount && itemCount > 0) {\n return itemCount > 99 ? \"99+\" : itemCount.toString();\n }\n\n return null;\n }, [itemCount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap\n className={className}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <StyleableSvgImage\n src={itemCount > 0 ? CartFullIcon : CartEmptyIcon}\n width={width}\n height={height}\n />\n <S.CartQuantityEllipse\n $motif={motif}\n $show={!!cartQuantityText}\n data-test-id=\"cart-quantity\"\n >\n {cartQuantityText}\n </S.CartQuantityEllipse>\n </S.Wrap>\n );\n};\n"],"names":["CartIcon","className","itemCount","width","height","motif","onMouseEnter","onMouseLeave","cartQuantityText","useMemo","toString","jsxs","S.Wrap","Wrap","children","jsx","StyleableSvgImage","src","CartFullIcon","CartEmptyIcon","S.CartQuantityEllipse","CartQuantityEllipse","$motif","$show"],"mappings":";;;;;;;;;;;;;;;;;;;AAQO,MAAMA,WAAWA,CAAC;EACvBC,SAAA;EACAC,SAAA;EACAC,KAAQ,GAAA,EAAA;EACRC,MAAS,GAAA,EAAA;EACTC,KAAQ,GAAA,OAAA;EACRC,YAAA;EACAC;AACF,CAAqB,KAAA;EAEb,MAAAC,gBAAA,GAAmBC,KAAAA,CAAAA,QAAQ,MAAM;IACjC,IAAAP,SAAA,IAAaA,YAAY,CAAG,EAAA;MAC9B,OAAOA,SAAY,GAAA,EAAA,GAAK,KAAQ,GAAAA,SAAA,CAAUQ,QAAS,CAAA,CAAA;IAAA;IAG9C,OAAA,IAAA;EAAA,CACT,EAAG,CAACR,SAAS,CAAC,CAAA;EAMZ,sBAAAS,UAAA,CAAAA,IAAA,CAACC,eAAE,CAAAC,IAAA,EAAF;IACCZ,SAAA;IACAK,YAAA;IACAC,YAAA;IAEAO,QAAA,EAAA,CAAA,eAAAC,UAAA,CAAAA,GAAA,CAACC,iBAAA,CAAAA,iBAAA,EAAA;MACCC,GAAA,EAAKf,SAAY,GAAA,CAAA,GAAIgB,iBAAAA,CAAAA,SAAAA,CAAe,GAAAC,sBAAA,CAAA,SAAA,CAAA;MACpChB,KAAA;MACAC;IAAA,CACF,CAAA,EAAA,eACAW,UAAA,CAAAA,GAAA,CAACK,eAAE,CAAAC,mBAAA,EAAF;MACCC,MAAQ,EAAAjB,KAAA;MACRkB,KAAA,EAAO,CAAC,CAACf,gBAAA;MACT,cAAa,EAAA,eAAA;MAEZM,QAAA,EAAAN;IAAA,CAAA,CAAA;EACH,CACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -13,7 +13,9 @@ const CartIcon = ({
|
|
|
13
13
|
itemCount,
|
|
14
14
|
width = 20,
|
|
15
15
|
height = 20,
|
|
16
|
-
motif = "light"
|
|
16
|
+
motif = "light",
|
|
17
|
+
onMouseEnter,
|
|
18
|
+
onMouseLeave
|
|
17
19
|
}) => {
|
|
18
20
|
const cartQuantityText = useMemo(() => {
|
|
19
21
|
if (itemCount && itemCount > 0) {
|
|
@@ -23,6 +25,8 @@ const CartIcon = ({
|
|
|
23
25
|
}, [itemCount]);
|
|
24
26
|
return /* @__PURE__ */jsxs(Wrap, {
|
|
25
27
|
className,
|
|
28
|
+
onMouseEnter,
|
|
29
|
+
onMouseLeave,
|
|
26
30
|
children: [/* @__PURE__ */jsx(StyleableSvgImage, {
|
|
27
31
|
src: itemCount > 0 ? CartIcon__default : CartEmptyIcon__default,
|
|
28
32
|
width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartIcon.mjs","sources":["../../../../src/components/Header/CartIcon/CartIcon.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport CartFullIcon from \"../../../assets/icons/cart.svg\";\nimport CartEmptyIcon from \"../../../assets/icons/cartEmpty.svg\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./CartIcon.styles\";\nimport type { CartIconProps } from \"./CartIcon.types\";\n\nexport const CartIcon = ({\n className,\n itemCount,\n width = 20,\n height = 20,\n motif = \"light\",\n}: CartIconProps) => {\n // Display 99+ when cart quantity greater than 99\n const cartQuantityText = useMemo(() => {\n if (itemCount && itemCount > 0) {\n return itemCount > 99 ? \"99+\" : itemCount.toString();\n }\n\n return null;\n }, [itemCount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap
|
|
1
|
+
{"version":3,"file":"CartIcon.mjs","sources":["../../../../src/components/Header/CartIcon/CartIcon.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport CartFullIcon from \"../../../assets/icons/cart.svg\";\nimport CartEmptyIcon from \"../../../assets/icons/cartEmpty.svg\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./CartIcon.styles\";\nimport type { CartIconProps } from \"./CartIcon.types\";\n\nexport const CartIcon = ({\n className,\n itemCount,\n width = 20,\n height = 20,\n motif = \"light\",\n onMouseEnter,\n onMouseLeave,\n}: CartIconProps) => {\n // Display 99+ when cart quantity greater than 99\n const cartQuantityText = useMemo(() => {\n if (itemCount && itemCount > 0) {\n return itemCount > 99 ? \"99+\" : itemCount.toString();\n }\n\n return null;\n }, [itemCount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap\n className={className}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <StyleableSvgImage\n src={itemCount > 0 ? CartFullIcon : CartEmptyIcon}\n width={width}\n height={height}\n />\n <S.CartQuantityEllipse\n $motif={motif}\n $show={!!cartQuantityText}\n data-test-id=\"cart-quantity\"\n >\n {cartQuantityText}\n </S.CartQuantityEllipse>\n </S.Wrap>\n );\n};\n"],"names":["CartIcon","className","itemCount","width","height","motif","onMouseEnter","onMouseLeave","cartQuantityText","useMemo","toString","jsxs","S.Wrap","children","jsx","StyleableSvgImage","src","CartFullIcon","CartEmptyIcon","S.CartQuantityEllipse","$motif","$show"],"mappings":";;;;;;;;;;AAQO,MAAMA,WAAWA,CAAC;EACvBC,SAAA;EACAC,SAAA;EACAC,KAAQ,GAAA,EAAA;EACRC,MAAS,GAAA,EAAA;EACTC,KAAQ,GAAA,OAAA;EACRC,YAAA;EACAC;AACF,CAAqB,KAAA;EAEb,MAAAC,gBAAA,GAAmBC,QAAQ,MAAM;IACjC,IAAAP,SAAA,IAAaA,YAAY,CAAG,EAAA;MAC9B,OAAOA,SAAY,GAAA,EAAA,GAAK,KAAQ,GAAAA,SAAA,CAAUQ,QAAS,CAAA,CAAA;IAAA;IAG9C,OAAA,IAAA;EAAA,CACT,EAAG,CAACR,SAAS,CAAC,CAAA;EAMZ,sBAAAS,IAAA,CAACC,IAAE,EAAF;IACCX,SAAA;IACAK,YAAA;IACAC,YAAA;IAEAM,QAAA,EAAA,CAAA,eAAAC,GAAA,CAACC,iBAAA,EAAA;MACCC,GAAA,EAAKd,SAAY,GAAA,CAAA,GAAIe,iBAAe,GAAAC,sBAAA;MACpCf,KAAA;MACAC;IAAA,CACF,CAAA,EAAA,eACAU,GAAA,CAACK,mBAAE,EAAF;MACCC,MAAQ,EAAAf,KAAA;MACRgB,KAAA,EAAO,CAAC,CAACb,gBAAA;MACT,cAAa,EAAA,eAAA;MAEZK,QAAA,EAAAL;IAAA,CAAA,CAAA;EACH,CACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -12,7 +12,7 @@ export declare const cssStickyEmbedHeader: import("styled-components").RuleSet<o
|
|
|
12
12
|
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, keyof import("react").Component<any, {}, any>>;
|
|
13
13
|
export declare const Anchor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
14
14
|
export declare const SvgIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../StyleableSvgImage").StyleableSvgImageProps, never>> & string & Omit<({ src, width, height, renderedHeight, className, }: import("../StyleableSvgImage").StyleableSvgImageProps) => JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
15
|
-
export declare const CartIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("./CartIcon/CartIcon.types").CartIconProps, never>> & string & Omit<({ className, itemCount, width, height, motif, }: import("./CartIcon/CartIcon.types").CartIconProps) => JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
15
|
+
export declare const CartIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("./CartIcon/CartIcon.types").CartIconProps, never>> & string & Omit<({ className, itemCount, width, height, motif, onMouseEnter, onMouseLeave, }: import("./CartIcon/CartIcon.types").CartIconProps) => JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
16
16
|
export declare const IconWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
17
|
$motif: Motif;
|
|
18
18
|
$hideOnMobile?: boolean;
|
|
@@ -30,6 +30,7 @@ require('../LanguageFrame/Mobile/index.js');
|
|
|
30
30
|
require('../LogoIcon/index.js');
|
|
31
31
|
require('../MenuItem/index.js');
|
|
32
32
|
require('../Navigation/ProMobileMenu/index.js');
|
|
33
|
+
require('../Overlay/index.js');
|
|
33
34
|
require('../translations/index.js');
|
|
34
35
|
var ProHeader_styles = require('./ProHeader.styles.js');
|
|
35
36
|
var generated = require('../../../types/generated.js');
|
|
@@ -57,6 +58,7 @@ var LanguageFrame = require('../LanguageFrame/LanguageFrame.js');
|
|
|
57
58
|
var Mobile$1 = require('../AccountFrame/Mobile/Mobile.js');
|
|
58
59
|
var AccountFrame = require('../AccountFrame/AccountFrame.js');
|
|
59
60
|
var ProMobileMenu = require('../Navigation/ProMobileMenu/ProMobileMenu.js');
|
|
61
|
+
var Overlay = require('../Overlay/Overlay.js');
|
|
60
62
|
function _interopDefault(e) {
|
|
61
63
|
return e && e.__esModule ? e : {
|
|
62
64
|
default: e
|
|
@@ -116,6 +118,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
116
118
|
cartPreview
|
|
117
119
|
}) {
|
|
118
120
|
const isMobile = reactUse.useMedia(PRO_HEADER_MOBILE_AND_DOWN, false);
|
|
121
|
+
const [showDesktopCartCartPreview, setShowDesktopCartPreview] = React.useState(false);
|
|
119
122
|
const rootRef = React.useRef(null);
|
|
120
123
|
const wrapRef = React.useRef(null);
|
|
121
124
|
const containerRef = React.useRef(null);
|
|
@@ -382,9 +385,16 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
382
385
|
reactUse.useClickAway(productLineSelectorRef, () => {
|
|
383
386
|
setShowProductLineSelectorDropdown(false);
|
|
384
387
|
}, ["click"]);
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
388
|
+
const handleCartIconClick = React.useCallback(e => {
|
|
389
|
+
if (cartQuantity === 0) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
if (isMobile) {
|
|
393
|
+
setActiveModal(types.ModalId.CartPreview);
|
|
394
|
+
} else {
|
|
395
|
+
handleModalOpen(e, types.ModalId.Cart);
|
|
396
|
+
}
|
|
397
|
+
}, [isMobile, cartQuantity, handleModalOpen, setActiveModal]);
|
|
388
398
|
return /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProHeaderWrap, {
|
|
389
399
|
ref: rootRef,
|
|
390
400
|
$sticky: !!embedConfig,
|
|
@@ -417,7 +427,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
417
427
|
productLine: logo?.productLine ?? productLineValue
|
|
418
428
|
})
|
|
419
429
|
})
|
|
420
|
-
}), account?.customer?.hasPreviousUispPurchases && !isMobile && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.
|
|
430
|
+
}), account?.customer?.hasPreviousUispPurchases && !isMobile && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.UispDivider, {}), account?.customer?.hasPreviousUispPurchases && !isMobile && /* @__PURE__ */jsxRuntime.jsx(Button.Button, {
|
|
421
431
|
variant: "link",
|
|
422
432
|
onClick: () => {
|
|
423
433
|
setShowProductLineSelectorDropdown(!showProductLineSelectorDropdown);
|
|
@@ -523,33 +533,39 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
523
533
|
height: Header_styles.HEADER_ICON_SIZE
|
|
524
534
|
})
|
|
525
535
|
})
|
|
526
|
-
}), cart && /* @__PURE__ */jsxRuntime.
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
height: Header_styles.HEADER_ICON_SIZE
|
|
538
|
-
}) : /* @__PURE__ */jsxRuntime.jsx(Tooltip.Tooltip, {
|
|
539
|
-
description: translations.cart.empty,
|
|
540
|
-
motif: "light",
|
|
541
|
-
isInteractive: true,
|
|
542
|
-
position: "bottom",
|
|
543
|
-
style: {
|
|
544
|
-
height: `${Header_styles.HEADER_ICON_SIZE}px`
|
|
545
|
-
},
|
|
546
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.CartIcon, {
|
|
536
|
+
}), cart && /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.CartContainer, {
|
|
537
|
+
onMouseEnter: () => !isMobile && cartQuantity > 0 && setShowDesktopCartPreview(true),
|
|
538
|
+
onMouseLeave: () => !isMobile && setShowDesktopCartPreview(false),
|
|
539
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
540
|
+
$motif: motif,
|
|
541
|
+
"data-test-id": "cart-btn",
|
|
542
|
+
onClick: handleCartIconClick,
|
|
543
|
+
$isDefaultCursor: cartQuantity < 1,
|
|
544
|
+
children: cart?.loading ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.SkeletonCircleLoader, {
|
|
545
|
+
diameter: Header_styles.HEADER_ICON_SIZE
|
|
546
|
+
}) : cartQuantity > 0 ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.CartIcon, {
|
|
547
547
|
itemCount: cartQuantity,
|
|
548
548
|
motif,
|
|
549
549
|
width: Header_styles.HEADER_ICON_SIZE,
|
|
550
550
|
height: Header_styles.HEADER_ICON_SIZE
|
|
551
|
+
}) : /* @__PURE__ */jsxRuntime.jsx(Tooltip.Tooltip, {
|
|
552
|
+
description: translations.cart.empty,
|
|
553
|
+
motif: "light",
|
|
554
|
+
isInteractive: true,
|
|
555
|
+
position: "bottom",
|
|
556
|
+
style: {
|
|
557
|
+
height: `${Header_styles.HEADER_ICON_SIZE}px`
|
|
558
|
+
},
|
|
559
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.CartIcon, {
|
|
560
|
+
itemCount: cartQuantity,
|
|
561
|
+
motif,
|
|
562
|
+
width: Header_styles.HEADER_ICON_SIZE,
|
|
563
|
+
height: Header_styles.HEADER_ICON_SIZE
|
|
564
|
+
})
|
|
551
565
|
})
|
|
552
|
-
})
|
|
566
|
+
}), !isSsr && showDesktopCartCartPreview && cartPreview && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.DesktopCartPreviewContainer, {
|
|
567
|
+
children: cartPreview
|
|
568
|
+
})]
|
|
553
569
|
}), !embedConfig && !handlePurchaseHistoryClick && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.VerticalDivider, {
|
|
554
570
|
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN
|
|
555
571
|
}), isMultiLanguage && !embedConfig?.hideLanguagePicker && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
@@ -647,16 +663,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
647
663
|
account
|
|
648
664
|
})
|
|
649
665
|
})
|
|
650
|
-
})), !isSsr &&
|
|
651
|
-
$fullWidth: true,
|
|
652
|
-
size: "desktop",
|
|
653
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.ModalInnerWrap, {
|
|
654
|
-
$pro: true,
|
|
655
|
-
$modal: types.ModalId.CartPreview,
|
|
656
|
-
$top: -4,
|
|
657
|
-
children: cartPreview
|
|
658
|
-
})
|
|
659
|
-
}), !isSsr && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.LineLoader, {
|
|
666
|
+
})), !isSsr && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.LineLoader, {
|
|
660
667
|
placement: "bottom",
|
|
661
668
|
isLoading: !!showLineLoader
|
|
662
669
|
})]
|
|
@@ -672,6 +679,14 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
672
679
|
productLineOptions,
|
|
673
680
|
categories,
|
|
674
681
|
hideExtraSection: !!embedConfig
|
|
682
|
+
}), !isSsr && cartPreview && isMobile && /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
683
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Overlay.HeaderOverlay, {
|
|
684
|
+
showForModal: activeModal === types.ModalId.CartPreview ? types.ModalId.CartPreview : null,
|
|
685
|
+
onClose: handleModalClose
|
|
686
|
+
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.MobileCartPreviewModal, {
|
|
687
|
+
$show: activeModal === types.ModalId.CartPreview,
|
|
688
|
+
children: cartPreview
|
|
689
|
+
})]
|
|
675
690
|
})]
|
|
676
691
|
})
|
|
677
692
|
})
|