@ubnt/store.core 10.4.0-beta.1 → 10.4.0-beta.11
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 +40 -0
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- 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/components/CardSection/Card/Card.d.ts +1 -1
- package/lib/components/CardSection/Card/Card.js +3 -2
- package/lib/components/CardSection/Card/Card.js.map +1 -1
- package/lib/components/CardSection/Card/Card.mjs +3 -2
- package/lib/components/CardSection/Card/Card.mjs.map +1 -1
- package/lib/components/CardSection/Card/Card.types.d.ts +1 -0
- package/lib/components/CardSection/Card/Card.types.js.map +1 -1
- package/lib/components/CardSection/Card/Card.types.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +11 -4
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +11 -4
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +3 -3
- 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/CameraSecurity/ai-360.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-dome.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-lpr.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-pro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-theta-pro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-theta.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-turret.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g4-instant.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g4-ptz.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-bullet.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-dome-ultra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-dome.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-flex.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-ptz.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-turret-ultra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-bullet.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-instant.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-turret.jpg.js +5 -5
- 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/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/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/CameraSecurity.js +37 -37
- package/lib/components/ModelCompareV3/data/CameraSecurity.mjs +19 -19
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- 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/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/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/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/lib/constants/proStoreCategories/mapping/filters.d.ts +1 -3
- package/lib/constants/proStoreCategories/mapping/filters.js +1 -3
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +1 -3
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.js +2 -2
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +2 -2
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +0 -1
- package/lib/constants/proStoreFilters/mapping.js +6 -14
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +6 -14
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/hooks/useIsTouchDevice.d.ts +1 -0
- package/lib/hooks/useIsTouchDevice.js +20 -0
- package/lib/hooks/useIsTouchDevice.js.map +1 -0
- package/lib/hooks/useIsTouchDevice.mjs +18 -0
- package/lib/hooks/useIsTouchDevice.mjs.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,46 @@
|
|
|
6
6
|
|
|
7
7
|
## Releases
|
|
8
8
|
|
|
9
|
+
### 10.4.0-beta.11
|
|
10
|
+
|
|
11
|
+
- [Feat] [NEP-4386](https://ubiquiti.atlassian.net/browse/NEP-4386) Remove Enhanced AI
|
|
12
|
+
|
|
13
|
+
### 10.4.0-beta.10
|
|
14
|
+
|
|
15
|
+
- [Feat] [NEP-4386](https://ubiquiti.atlassian.net/browse/NEP-4386) Add new filter AI-Detections
|
|
16
|
+
|
|
17
|
+
### 10.4.0-beta.19
|
|
18
|
+
|
|
19
|
+
- [Feat] [NEP-4386](https://ubiquiti.atlassian.net/browse/NEP-4386) Update New Group Filter AI Recognitions
|
|
20
|
+
|
|
21
|
+
### 10.4.0-beta.8
|
|
22
|
+
|
|
23
|
+
- [Feat] [NEP-4386](https://ubiquiti.atlassian.net/browse/NEP-4386) Update New Group Filter AI Recognitions
|
|
24
|
+
|
|
25
|
+
### 10.4.0-beta.7
|
|
26
|
+
|
|
27
|
+
- [Feat] [NEP-4386](https://ubiquiti.atlassian.net/browse/NEP-4386) Add new Group filter AI Recognitions
|
|
28
|
+
|
|
29
|
+
### 10.4.0-beta.6
|
|
30
|
+
|
|
31
|
+
- [Feat] [NEP-4294](https://ubiquiti.atlassian.net/browse/NEP-4294) Always render cartPreview in ProHeader let cartPreview handle visibility through menucontext
|
|
32
|
+
|
|
33
|
+
### 10.4.0-beta.5
|
|
34
|
+
|
|
35
|
+
- [Feat] [NEP-4294](https://ubiquiti.atlassian.net/browse/NEP-4294) Detect touch devices so that cartPreview can be shown without hover for large touch devices that doesnt reach the mobile breakpoint
|
|
36
|
+
|
|
37
|
+
### 10.4.0-beta.4
|
|
38
|
+
|
|
39
|
+
- [Feat] [NEP-4294](https://ubiquiti.atlassian.net/browse/NEP-4294) Close product line dropdown when a modal opens
|
|
40
|
+
|
|
41
|
+
### 10.4.0-beta.3
|
|
42
|
+
|
|
43
|
+
- [Feat] [NEP-4398](https://ubiquiti.atlassian.net/browse/NEP-4398) Add option to remove Learn More link from cards
|
|
44
|
+
|
|
45
|
+
### 10.4.0-beta.2
|
|
46
|
+
|
|
47
|
+
- [Feat] [NEP-4294](https://unifiprojects.atlassian.net/browse/NEP-4294) Revert 10.4.0-beta.1
|
|
48
|
+
|
|
9
49
|
### 10.4.0-beta.1
|
|
10
50
|
|
|
11
51
|
- [Feat] [NEP-4294](https://unifiprojects.atlassian.net/browse/NEP-4294) Lock body scroll for cart preview from menucontext
|
package/lib/assets/attention.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<circle cx="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<circle cx="
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="8" cy="8" r="8" fill="#A4A7B5"/>
|
|
3
|
+
<path d="M12.1136 10.125L8.64952 4.125C8.36084 3.625 7.63916 3.625 7.35048 4.125L3.88638 10.125C3.5977 10.625 3.95855 11.25 4.5359 11.25H11.4641C12.0415 11.25 12.4023 10.625 12.1136 10.125Z" stroke="white" stroke-width="0.5"/>
|
|
4
|
+
<path d="M8.19799 8.11407L8.42929 6.49497C8.46661 6.23373 8.2639 6 8 6C7.7361 6 7.53339 6.23373 7.57071 6.49497L7.80201 8.11407C7.83472 8.34302 8.16528 8.34303 8.19799 8.11407Z" fill="white"/>
|
|
5
|
+
<circle cx="8" cy="9.5" r="0.5" fill="white"/>
|
|
6
6
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<circle cx="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<circle cx="
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="9" cy="9" r="9" fill="#F7D55E"/>
|
|
3
|
+
<path d="M9.73071 4.64062C9.40595 4.07813 8.59405 4.07812 8.26929 4.64062L4.37218 11.3906C4.04742 11.9531 4.45336 12.6562 5.10288 12.6562H12.8971C13.5466 12.6562 13.9526 11.9531 13.6278 11.3906L9.73071 4.64062Z" stroke="white" stroke-width="0.5625"/>
|
|
4
|
+
<path d="M9.22274 9.12833L9.48295 7.30685C9.52494 7.01295 9.29688 6.75 9 6.75C8.70312 6.75 8.47506 7.01295 8.51705 7.30685L8.77726 9.12833C8.81406 9.3859 9.18594 9.3859 9.22274 9.12833Z" fill="white"/>
|
|
5
|
+
<circle cx="9" cy="10.6875" r="0.5625" fill="#F7D55E"/>
|
|
6
6
|
</svg>
|
package/lib/assets/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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type CardProps } from "./Card.types";
|
|
2
|
-
export declare const Card: ({ motif, title, subtitle, titleLarge, learnMoreHref, videoSrc, videoPoster, backgroundImageUrl, backgroundColor, border, labels, onLinkClick, beforeFollowLink, link, className, }: CardProps) => JSX.Element;
|
|
2
|
+
export declare const Card: ({ motif, title, subtitle, titleLarge, learnMoreHref, videoSrc, videoPoster, backgroundImageUrl, backgroundColor, border, labels, onLinkClick, beforeFollowLink, link, className, hideLearnMoreLink, }: CardProps) => JSX.Element;
|
|
@@ -32,7 +32,8 @@ const Card = ({
|
|
|
32
32
|
onLinkClick,
|
|
33
33
|
beforeFollowLink,
|
|
34
34
|
link,
|
|
35
|
-
className
|
|
35
|
+
className,
|
|
36
|
+
hideLearnMoreLink
|
|
36
37
|
}) => {
|
|
37
38
|
const {
|
|
38
39
|
languageDirection
|
|
@@ -133,7 +134,7 @@ const Card = ({
|
|
|
133
134
|
}), titleLarge && /* @__PURE__ */jsxRuntime.jsx(Card_styles.TitleLarge, {
|
|
134
135
|
$motif: motif,
|
|
135
136
|
children: titleLarge
|
|
136
|
-
}), /* @__PURE__ */jsxRuntime.jsx(LearnMoreLink.LearnMoreLink, {
|
|
137
|
+
}), !hideLearnMoreLink && /* @__PURE__ */jsxRuntime.jsx(LearnMoreLink.LearnMoreLink, {
|
|
137
138
|
...link
|
|
138
139
|
})]
|
|
139
140
|
}), videoSrc && /* @__PURE__ */jsxRuntime.jsx(ReverseLoopingVideo.ReverseLoopingVideo, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../src/components/CardSection/Card/Card.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\n\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { LearnMoreLink } from \"../../LearnMoreLink\";\nimport { ReverseLoopingVideo } from \"../../ReverseLoopingVideo\";\nimport {\n CardWrapper,\n ContentWrap,\n Label,\n LabelWrap,\n Subtitle,\n Title,\n TitleLarge,\n} from \"./Card.styles\";\nimport { type CardProps, presetLabelMap } from \"./Card.types\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\nexport const Card = ({\n motif,\n title,\n subtitle,\n titleLarge,\n learnMoreHref,\n videoSrc,\n videoPoster,\n backgroundImageUrl,\n backgroundColor,\n border,\n labels,\n onLinkClick,\n beforeFollowLink,\n link,\n className,\n}: CardProps) => {\n const { languageDirection } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Labels\n // #############################################################################\n\n const labelEls = useMemo(() => {\n if (!labels) {\n return null;\n }\n\n return labels.map((label, i) => {\n if (typeof label === \"string\") {\n const presetLabel = presetLabelMap[label];\n\n if (presetLabel) {\n return (\n <Label\n key={i}\n $color={presetLabel.color}\n $fontWeight={presetLabel?.[\"fontWeight\"]}\n >\n {formatMessage(presetLabel.text)}\n </Label>\n );\n }\n\n return null;\n } else {\n return (\n <Label key={i} $color={label.color} $fontWeight={label.fontWeight}>\n {label.text}\n </Label>\n );\n }\n });\n }, [labels, formatMessage]);\n\n // #############################################################################\n // Video\n // #############################################################################\n const [playing, setPlaying] = useState(false);\n\n const onMouseEnter = useCallback(() => {\n setPlaying(true);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setPlaying(false);\n }, []);\n\n // #############################################################################\n // Event\n // #############################################################################\n const handleCardClick = useCallback(\n (e) => {\n beforeFollowLink?.(learnMoreHref);\n onLinkClick?.(e, learnMoreHref);\n },\n [beforeFollowLink, learnMoreHref, onLinkClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <CardWrapper\n as=\"a\"\n onClick={handleCardClick}\n href={learnMoreHref}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n $backgroundColor={backgroundColor}\n $backgroundImageUrl={backgroundImageUrl}\n $border={border}\n dir={languageDirection}\n /**\n * Disable \"draggable\" to prevent image dragging on Firefox\n * @see https://ui.slack.com/archives/C017MM5HW1F/p1739876555750939\n * @see https://stackoverflow.com/questions/38907225/disable-drag-for-any-object-in-firefox-addon-popup\n */\n draggable={false}\n className={className}\n >\n <ContentWrap>\n <LabelWrap>{labelEls}</LabelWrap>\n\n <Title $motif={motif}>{title}</Title>\n {subtitle && <Subtitle $motif={motif}>{subtitle}</Subtitle>}\n {titleLarge && <TitleLarge $motif={motif}>{titleLarge}</TitleLarge>}\n <LearnMoreLink {...link} />\n </ContentWrap>\n\n {videoSrc && (\n <ReverseLoopingVideo\n src={videoSrc}\n poster={videoPoster}\n playing={playing}\n />\n )}\n </CardWrapper>\n );\n};\n"],"names":["Card","motif","title","subtitle","titleLarge","learnMoreHref","videoSrc","videoPoster","backgroundImageUrl","backgroundColor","border","labels","onLinkClick","beforeFollowLink","link","className","languageDirection","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","resolve","require","labelEls","useMemo","map","label","i","presetLabel","presetLabelMap","jsx","Label","$color","color","$fontWeight","children","text","fontWeight","playing","setPlaying","useState","onMouseEnter","useCallback","onMouseLeave","handleCardClick","e","jsxs","CardWrapper","as","onClick","href","$backgroundColor","$backgroundImageUrl","$border","dir","draggable","ContentWrap","LabelWrap","Title","$motif","Subtitle","TitleLarge","LearnMoreLink","ReverseLoopingVideo","src","poster"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBO,MAAMA,OAAOA,CAAC;EACnBC,KAAA;EACAC,KAAA;EACAC,QAAA;EACAC,UAAA;EACAC,aAAA;EACAC,QAAA;EACAC,WAAA;EACAC,kBAAA;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AArB,QAAA,EAAA,CAAAL,eAAAA,UAAAA,CAAAA,GAAA,CAAC2B;QAAWtB,QAAS,EAAAZ;MAAA,CAAA,CAAA,EAAA,eAEpBO,UAAA,CAAAA,GAAA,CAAA4B,WAAA,CAAAA,KAAA,EAAA;QAAMC,MAAQ,EAAA3E,KAAA;QAAQmD,QAAM,EAAAlD;OAAA,CAAA,EAC5BC,QAAY,IAAA,eAAA4C,UAAA,CAAAA,GAAA,CAAC8B,oBAAS,EAAA;QAAAD,MAAA,EAAQ3E;QAAQmD,QAAS,EAAAjD;OAAA,CAAA,EAC/CC,UAAc,IAAA,eAAA2C,UAAA,CAAAA,GAAA,CAAC+B,sBAAW,EAAA;QAAAF,MAAA,EAAQ3E;QAAQmD,QAAW,EAAAhD;OAAA,CAAA,EAAA,eACtD2C,cAAA,CAACgC,aAAAA,CAAAA,aAAe,EAAA;QAAA,GAAGjE;MAAM,CAAA,CAAA;KAC3B,CAAA,EAECR,QACC,mBAAAyC,UAAA,CAAAA,GAAA,CAACiC,mBAAA,CAAAA,mBAAA,EAAA;MACCC,GAAK,EAAA3E,QAAA;MACL4E,MAAQ,EAAA3E,WAAA;MACRgD;IAAA,CAAA,CAAA;EACF,CAEJ,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../src/components/CardSection/Card/Card.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\n\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { LearnMoreLink } from \"../../LearnMoreLink\";\nimport { ReverseLoopingVideo } from \"../../ReverseLoopingVideo\";\nimport {\n CardWrapper,\n ContentWrap,\n Label,\n LabelWrap,\n Subtitle,\n Title,\n TitleLarge,\n} from \"./Card.styles\";\nimport { type CardProps, presetLabelMap } from \"./Card.types\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\nexport const Card = ({\n motif,\n title,\n subtitle,\n titleLarge,\n learnMoreHref,\n videoSrc,\n videoPoster,\n backgroundImageUrl,\n backgroundColor,\n border,\n labels,\n onLinkClick,\n beforeFollowLink,\n link,\n className,\n hideLearnMoreLink,\n}: CardProps) => {\n const { languageDirection } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Labels\n // #############################################################################\n\n const labelEls = useMemo(() => {\n if (!labels) {\n return null;\n }\n\n return labels.map((label, i) => {\n if (typeof label === \"string\") {\n const presetLabel = presetLabelMap[label];\n\n if (presetLabel) {\n return (\n <Label\n key={i}\n $color={presetLabel.color}\n $fontWeight={presetLabel?.[\"fontWeight\"]}\n >\n {formatMessage(presetLabel.text)}\n </Label>\n );\n }\n\n return null;\n } else {\n return (\n <Label key={i} $color={label.color} $fontWeight={label.fontWeight}>\n {label.text}\n </Label>\n );\n }\n });\n }, [labels, formatMessage]);\n\n // #############################################################################\n // Video\n // #############################################################################\n const [playing, setPlaying] = useState(false);\n\n const onMouseEnter = useCallback(() => {\n setPlaying(true);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setPlaying(false);\n }, []);\n\n // #############################################################################\n // Event\n // #############################################################################\n const handleCardClick = useCallback(\n (e) => {\n beforeFollowLink?.(learnMoreHref);\n onLinkClick?.(e, learnMoreHref);\n },\n [beforeFollowLink, learnMoreHref, onLinkClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <CardWrapper\n as=\"a\"\n onClick={handleCardClick}\n href={learnMoreHref}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n $backgroundColor={backgroundColor}\n $backgroundImageUrl={backgroundImageUrl}\n $border={border}\n dir={languageDirection}\n /**\n * Disable \"draggable\" to prevent image dragging on Firefox\n * @see https://ui.slack.com/archives/C017MM5HW1F/p1739876555750939\n * @see https://stackoverflow.com/questions/38907225/disable-drag-for-any-object-in-firefox-addon-popup\n */\n draggable={false}\n className={className}\n >\n <ContentWrap>\n <LabelWrap>{labelEls}</LabelWrap>\n\n <Title $motif={motif}>{title}</Title>\n {subtitle && <Subtitle $motif={motif}>{subtitle}</Subtitle>}\n {titleLarge && <TitleLarge $motif={motif}>{titleLarge}</TitleLarge>}\n {!hideLearnMoreLink && <LearnMoreLink {...link} />}\n </ContentWrap>\n\n {videoSrc && (\n <ReverseLoopingVideo\n src={videoSrc}\n poster={videoPoster}\n playing={playing}\n />\n )}\n </CardWrapper>\n );\n};\n"],"names":["Card","motif","title","subtitle","titleLarge","learnMoreHref","videoSrc","videoPoster","backgroundImageUrl","backgroundColor","border","labels","onLinkClick","beforeFollowLink","link","className","hideLearnMoreLink","languageDirection","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","resolve","require","labelEls","useMemo","map","label","i","presetLabel","presetLabelMap","jsx","Label","$color","color","$fontWeight","children","text","fontWeight","playing","setPlaying","useState","onMouseEnter","useCallback","onMouseLeave","handleCardClick","e","jsxs","CardWrapper","as","onClick","href","$backgroundColor","$backgroundImageUrl","$border","dir","draggable","ContentWrap","LabelWrap","Title","$motif","Subtitle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7 @@ const Card = ({
|
|
|
111
112
|
}), titleLarge && /* @__PURE__ */jsx(TitleLarge, {
|
|
112
113
|
$motif: motif,
|
|
113
114
|
children: titleLarge
|
|
114
|
-
}), /* @__PURE__ */jsx(LearnMoreLink, {
|
|
115
|
+
}), !hideLearnMoreLink && /* @__PURE__ */jsx(LearnMoreLink, {
|
|
115
116
|
...link
|
|
116
117
|
})]
|
|
117
118
|
}), videoSrc && /* @__PURE__ */jsx(ReverseLoopingVideo, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.mjs","sources":["../../../../src/components/CardSection/Card/Card.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\n\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { LearnMoreLink } from \"../../LearnMoreLink\";\nimport { ReverseLoopingVideo } from \"../../ReverseLoopingVideo\";\nimport {\n CardWrapper,\n ContentWrap,\n Label,\n LabelWrap,\n Subtitle,\n Title,\n TitleLarge,\n} from \"./Card.styles\";\nimport { type CardProps, presetLabelMap } from \"./Card.types\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\nexport const Card = ({\n motif,\n title,\n subtitle,\n titleLarge,\n learnMoreHref,\n videoSrc,\n videoPoster,\n backgroundImageUrl,\n backgroundColor,\n border,\n labels,\n onLinkClick,\n beforeFollowLink,\n link,\n className,\n}: CardProps) => {\n const { languageDirection } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Labels\n // #############################################################################\n\n const labelEls = useMemo(() => {\n if (!labels) {\n return null;\n }\n\n return labels.map((label, i) => {\n if (typeof label === \"string\") {\n const presetLabel = presetLabelMap[label];\n\n if (presetLabel) {\n return (\n <Label\n key={i}\n $color={presetLabel.color}\n $fontWeight={presetLabel?.[\"fontWeight\"]}\n >\n {formatMessage(presetLabel.text)}\n </Label>\n );\n }\n\n return null;\n } else {\n return (\n <Label key={i} $color={label.color} $fontWeight={label.fontWeight}>\n {label.text}\n </Label>\n );\n }\n });\n }, [labels, formatMessage]);\n\n // #############################################################################\n // Video\n // #############################################################################\n const [playing, setPlaying] = useState(false);\n\n const onMouseEnter = useCallback(() => {\n setPlaying(true);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setPlaying(false);\n }, []);\n\n // #############################################################################\n // Event\n // #############################################################################\n const handleCardClick = useCallback(\n (e) => {\n beforeFollowLink?.(learnMoreHref);\n onLinkClick?.(e, learnMoreHref);\n },\n [beforeFollowLink, learnMoreHref, onLinkClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <CardWrapper\n as=\"a\"\n onClick={handleCardClick}\n href={learnMoreHref}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n $backgroundColor={backgroundColor}\n $backgroundImageUrl={backgroundImageUrl}\n $border={border}\n dir={languageDirection}\n /**\n * Disable \"draggable\" to prevent image dragging on Firefox\n * @see https://ui.slack.com/archives/C017MM5HW1F/p1739876555750939\n * @see https://stackoverflow.com/questions/38907225/disable-drag-for-any-object-in-firefox-addon-popup\n */\n draggable={false}\n className={className}\n >\n <ContentWrap>\n <LabelWrap>{labelEls}</LabelWrap>\n\n <Title $motif={motif}>{title}</Title>\n {subtitle && <Subtitle $motif={motif}>{subtitle}</Subtitle>}\n {titleLarge && <TitleLarge $motif={motif}>{titleLarge}</TitleLarge>}\n <LearnMoreLink {...link}
|
|
1
|
+
{"version":3,"file":"Card.mjs","sources":["../../../../src/components/CardSection/Card/Card.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\n\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { LearnMoreLink } from \"../../LearnMoreLink\";\nimport { ReverseLoopingVideo } from \"../../ReverseLoopingVideo\";\nimport {\n CardWrapper,\n ContentWrap,\n Label,\n LabelWrap,\n Subtitle,\n Title,\n TitleLarge,\n} from \"./Card.styles\";\nimport { type CardProps, presetLabelMap } from \"./Card.types\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\nexport const Card = ({\n motif,\n title,\n subtitle,\n titleLarge,\n learnMoreHref,\n videoSrc,\n videoPoster,\n backgroundImageUrl,\n backgroundColor,\n border,\n labels,\n onLinkClick,\n beforeFollowLink,\n link,\n className,\n hideLearnMoreLink,\n}: CardProps) => {\n const { languageDirection } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Labels\n // #############################################################################\n\n const labelEls = useMemo(() => {\n if (!labels) {\n return null;\n }\n\n return labels.map((label, i) => {\n if (typeof label === \"string\") {\n const presetLabel = presetLabelMap[label];\n\n if (presetLabel) {\n return (\n <Label\n key={i}\n $color={presetLabel.color}\n $fontWeight={presetLabel?.[\"fontWeight\"]}\n >\n {formatMessage(presetLabel.text)}\n </Label>\n );\n }\n\n return null;\n } else {\n return (\n <Label key={i} $color={label.color} $fontWeight={label.fontWeight}>\n {label.text}\n </Label>\n );\n }\n });\n }, [labels, formatMessage]);\n\n // #############################################################################\n // Video\n // #############################################################################\n const [playing, setPlaying] = useState(false);\n\n const onMouseEnter = useCallback(() => {\n setPlaying(true);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setPlaying(false);\n }, []);\n\n // #############################################################################\n // Event\n // #############################################################################\n const handleCardClick = useCallback(\n (e) => {\n beforeFollowLink?.(learnMoreHref);\n onLinkClick?.(e, learnMoreHref);\n },\n [beforeFollowLink, learnMoreHref, onLinkClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <CardWrapper\n as=\"a\"\n onClick={handleCardClick}\n href={learnMoreHref}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n $backgroundColor={backgroundColor}\n $backgroundImageUrl={backgroundImageUrl}\n $border={border}\n dir={languageDirection}\n /**\n * Disable \"draggable\" to prevent image dragging on Firefox\n * @see https://ui.slack.com/archives/C017MM5HW1F/p1739876555750939\n * @see https://stackoverflow.com/questions/38907225/disable-drag-for-any-object-in-firefox-addon-popup\n */\n draggable={false}\n className={className}\n >\n <ContentWrap>\n <LabelWrap>{labelEls}</LabelWrap>\n\n <Title $motif={motif}>{title}</Title>\n {subtitle && <Subtitle $motif={motif}>{subtitle}</Subtitle>}\n {titleLarge && <TitleLarge $motif={motif}>{titleLarge}</TitleLarge>}\n {!hideLearnMoreLink && <LearnMoreLink {...link} />}\n </ContentWrap>\n\n {videoSrc && (\n <ReverseLoopingVideo\n src={videoSrc}\n poster={videoPoster}\n playing={playing}\n />\n )}\n </CardWrapper>\n );\n};\n"],"names":["Card","motif","title","subtitle","titleLarge","learnMoreHref","videoSrc","videoPoster","backgroundImageUrl","backgroundColor","border","labels","onLinkClick","beforeFollowLink","link","className","hideLearnMoreLink","languageDirection","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","labelEls","useMemo","map","label","i","presetLabel","presetLabelMap","jsx","Label","$color","color","$fontWeight","children","text","fontWeight","playing","setPlaying","useState","onMouseEnter","useCallback","onMouseLeave","handleCardClick","e","jsxs","CardWrapper","as","onClick","href","$backgroundColor","$backgroundImageUrl","$border","dir","draggable","ContentWrap","LabelWrap","Title","$motif","Subtitle","TitleLarge","LearnMoreLink","ReverseLoopingVideo","src","poster"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,MAAMA,OAAOA,CAAC;EACnBC,KAAA;EACAC,KAAA;EACAC,QAAA;EACAC,UAAA;EACAC,aAAA;EACAC,QAAA;EACAC,WAAA;EACAC,kBAAA;EACAC,eAAA;EACAC,MAAA;EACAC,MAAA;EACAC,WAAA;EACAC,gBAAA;EACAC,IAAA;EACAC,SAAA;EACAC;AACF,CAAiB,KAAA;EACT,MAAA;IAAEC;EAAkB,CAAA,GAAIC,OAAQ,CAAA,CAAA;EAChC,MAAA;IAAEC;EAAc,CAAA,GAAIC,cAAe,CAAA;IACvCC,kBAAoB,EAAAC,cAAA;IACpBC,sBAAwB,EAAA;MACtB,CAACC,QAAA,CAASC,EAAE,GAAG,MACb,OAAO,4BAAwB,CAAA,CAAEC,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAC5D,CAACJ,QAA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AA5D,aAAA;IACNmD,YAAA;IACAE,YAAA;IACAQ,gBAAkB,EAAAzD,eAAA;IAClB0D,mBAAqB,EAAA3D,kBAAA;IACrB4D,OAAS,EAAA1D,MAAA;IACT2D,GAAK,EAAApD,iBAAA;IAMLqD,SAAW,EAAA,KAAA;IACXvD,SAAA;IAEAmC,QAAA,EAAA,CAAA,eAAAW,IAAA,CAACU,WACC,EAAA;MAAArB,QAAA,EAAA,CAAA,eAAAL,GAAA,CAAC2B;QAAWtB,QAAS,EAAAZ;MAAA,CAAA,CAAA,EAAA,eAEpBO,GAAA,CAAA4B,KAAA,EAAA;QAAMC,MAAQ,EAAAzE,KAAA;QAAQiD,QAAM,EAAAhD;OAAA,CAAA,EAC5BC,QAAY,IAAA,eAAA0C,GAAA,CAAC8B,QAAS,EAAA;QAAAD,MAAA,EAAQzE;QAAQiD,QAAS,EAAA/C;OAAA,CAAA,EAC/CC,UAAc,IAAA,eAAAyC,GAAA,CAAC+B,UAAW,EAAA;QAAAF,MAAA,EAAQzE;QAAQiD,QAAW,EAAA9C;OAAA,CAAA,EACrD,CAACY,iBAAA,IAAA,eAAsB6B,GAAA,CAAAgC,aAAA,EAAA;QAAe,GAAG/D;MAAM,CAAA,CAAA;KAClD,CAAA,EAECR,QACC,mBAAAuC,GAAA,CAACiC,mBAAA,EAAA;MACCC,GAAK,EAAAzE,QAAA;MACL0E,MAAQ,EAAAzE,WAAA;MACR8C;IAAA,CAAA,CAAA;EACF,CAEJ,CAAA;AAEJ,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.types.js","sources":["../../../../src/components/CardSection/Card/Card.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { theme } from \"../../../constants/theme\";\nimport type { LearnMoreLinkProps } from \"../../LearnMoreLink\";\nimport type EN_TRANSLATION from \"./translations/en.json\";\n\ntype Label = {\n color: string;\n text: string;\n fontWeight?: string;\n};\n\ntype PresetLabel = Label & {\n text: keyof typeof EN_TRANSLATION;\n};\n\nexport const presetLabelMap: {\n new: PresetLabel;\n bestseller: PresetLabel;\n unifi6: PresetLabel;\n theOriginal: PresetLabel;\n indoorOutdoor: PresetLabel;\n compact: PresetLabel;\n} = {\n new: {\n text: \"New\",\n color: theme.colors.buttercup,\n },\n bestseller: {\n text: \"Bestseller\",\n color: theme.colors.buttercup,\n },\n unifi6: {\n text: \"UniFi 6\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n theOriginal: {\n text: \"The Original\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n indoorOutdoor: {\n text: \"Indoor / Outdoor\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n compact: {\n text: \"Compact\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n};\n\nexport enum CardMotif {\n light = \"light\",\n dark = \"dark\",\n}\n\nexport type CardProps = {\n motif: CardMotif;\n title: string | ReactNode;\n subtitle?: string;\n titleLarge?: string;\n learnMoreHref: string;\n videoSrc?: string;\n videoPoster?: string;\n backgroundImageUrl?: string;\n backgroundColor?: string;\n border?: boolean;\n labels?: Array<keyof typeof presetLabelMap | Label>;\n onLinkClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n beforeFollowLink?: (url: string) => void;\n link?: LearnMoreLinkProps;\n className?: string;\n};\n"],"names":["presetLabelMap","new","text","color","theme","colors","buttercup","bestseller","unifi6","vulcan","fontWeight","bold","theOriginal","indoorOutdoor","compact","CardMotif"],"mappings":";;;;AAgBO,MAAMA,cAOT,GAAA;EACFC,GAAK,EAAA;IACHC,IAAM,EAAA,KAAA;IACNC,KAAA,EAAOC,YAAMC,MAAO,CAAAC;EACtB,CAAA;EACAC,UAAY,EAAA;IACVL,IAAM,EAAA,YAAA;IACNC,KAAA,EAAOC,YAAMC,MAAO,CAAAC;EACtB,CAAA;EACAE,MAAQ,EAAA;IACNN,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAC,WAAa,EAAA;IACXV,IAAM,EAAA,cAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAE,aAAe,EAAA;IACbX,IAAM,EAAA,kBAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAG,OAAS,EAAA;IACPZ,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAAA;AAEjC,CAAA;AAEY,IAAAI,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,OAAQ,CAAA,GAAA,OAAA;EACRA,WAAA,MAAO,CAAA,GAAA,MAAA;EAFGA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"Card.types.js","sources":["../../../../src/components/CardSection/Card/Card.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { theme } from \"../../../constants/theme\";\nimport type { LearnMoreLinkProps } from \"../../LearnMoreLink\";\nimport type EN_TRANSLATION from \"./translations/en.json\";\n\ntype Label = {\n color: string;\n text: string;\n fontWeight?: string;\n};\n\ntype PresetLabel = Label & {\n text: keyof typeof EN_TRANSLATION;\n};\n\nexport const presetLabelMap: {\n new: PresetLabel;\n bestseller: PresetLabel;\n unifi6: PresetLabel;\n theOriginal: PresetLabel;\n indoorOutdoor: PresetLabel;\n compact: PresetLabel;\n} = {\n new: {\n text: \"New\",\n color: theme.colors.buttercup,\n },\n bestseller: {\n text: \"Bestseller\",\n color: theme.colors.buttercup,\n },\n unifi6: {\n text: \"UniFi 6\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n theOriginal: {\n text: \"The Original\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n indoorOutdoor: {\n text: \"Indoor / Outdoor\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n compact: {\n text: \"Compact\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n};\n\nexport enum CardMotif {\n light = \"light\",\n dark = \"dark\",\n}\n\nexport type CardProps = {\n motif: CardMotif;\n title: string | ReactNode;\n subtitle?: string;\n titleLarge?: string;\n learnMoreHref: string;\n videoSrc?: string;\n videoPoster?: string;\n backgroundImageUrl?: string;\n backgroundColor?: string;\n border?: boolean;\n labels?: Array<keyof typeof presetLabelMap | Label>;\n onLinkClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n beforeFollowLink?: (url: string) => void;\n link?: LearnMoreLinkProps;\n className?: string;\n hideLearnMoreLink?: boolean;\n};\n"],"names":["presetLabelMap","new","text","color","theme","colors","buttercup","bestseller","unifi6","vulcan","fontWeight","bold","theOriginal","indoorOutdoor","compact","CardMotif"],"mappings":";;;;AAgBO,MAAMA,cAOT,GAAA;EACFC,GAAK,EAAA;IACHC,IAAM,EAAA,KAAA;IACNC,KAAA,EAAOC,YAAMC,MAAO,CAAAC;EACtB,CAAA;EACAC,UAAY,EAAA;IACVL,IAAM,EAAA,YAAA;IACNC,KAAA,EAAOC,YAAMC,MAAO,CAAAC;EACtB,CAAA;EACAE,MAAQ,EAAA;IACNN,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAC,WAAa,EAAA;IACXV,IAAM,EAAA,cAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAE,aAAe,EAAA;IACbX,IAAM,EAAA,kBAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAG,OAAS,EAAA;IACPZ,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,KAAAA,CAAAA,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,YAAMM,UAAW,CAAAC;EAAA;AAEjC,CAAA;AAEY,IAAAI,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,OAAQ,CAAA,GAAA,OAAA;EACRA,WAAA,MAAO,CAAA,GAAA,MAAA;EAFGA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.types.mjs","sources":["../../../../src/components/CardSection/Card/Card.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { theme } from \"../../../constants/theme\";\nimport type { LearnMoreLinkProps } from \"../../LearnMoreLink\";\nimport type EN_TRANSLATION from \"./translations/en.json\";\n\ntype Label = {\n color: string;\n text: string;\n fontWeight?: string;\n};\n\ntype PresetLabel = Label & {\n text: keyof typeof EN_TRANSLATION;\n};\n\nexport const presetLabelMap: {\n new: PresetLabel;\n bestseller: PresetLabel;\n unifi6: PresetLabel;\n theOriginal: PresetLabel;\n indoorOutdoor: PresetLabel;\n compact: PresetLabel;\n} = {\n new: {\n text: \"New\",\n color: theme.colors.buttercup,\n },\n bestseller: {\n text: \"Bestseller\",\n color: theme.colors.buttercup,\n },\n unifi6: {\n text: \"UniFi 6\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n theOriginal: {\n text: \"The Original\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n indoorOutdoor: {\n text: \"Indoor / Outdoor\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n compact: {\n text: \"Compact\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n};\n\nexport enum CardMotif {\n light = \"light\",\n dark = \"dark\",\n}\n\nexport type CardProps = {\n motif: CardMotif;\n title: string | ReactNode;\n subtitle?: string;\n titleLarge?: string;\n learnMoreHref: string;\n videoSrc?: string;\n videoPoster?: string;\n backgroundImageUrl?: string;\n backgroundColor?: string;\n border?: boolean;\n labels?: Array<keyof typeof presetLabelMap | Label>;\n onLinkClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n beforeFollowLink?: (url: string) => void;\n link?: LearnMoreLinkProps;\n className?: string;\n};\n"],"names":["presetLabelMap","new","text","color","theme","colors","buttercup","bestseller","unifi6","vulcan","fontWeight","bold","theOriginal","indoorOutdoor","compact","CardMotif"],"mappings":";;AAgBO,MAAMA,cAOT,GAAA;EACFC,GAAK,EAAA;IACHC,IAAM,EAAA,KAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAC;EACtB,CAAA;EACAC,UAAY,EAAA;IACVL,IAAM,EAAA,YAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAC;EACtB,CAAA;EACAE,MAAQ,EAAA;IACNN,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAC,WAAa,EAAA;IACXV,IAAM,EAAA,cAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAE,aAAe,EAAA;IACbX,IAAM,EAAA,kBAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAG,OAAS,EAAA;IACPZ,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAAA;AAEjC,CAAA;AAEY,IAAAI,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,OAAQ,CAAA,GAAA,OAAA;EACRA,WAAA,MAAO,CAAA,GAAA,MAAA;EAFGA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Card.types.mjs","sources":["../../../../src/components/CardSection/Card/Card.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { theme } from \"../../../constants/theme\";\nimport type { LearnMoreLinkProps } from \"../../LearnMoreLink\";\nimport type EN_TRANSLATION from \"./translations/en.json\";\n\ntype Label = {\n color: string;\n text: string;\n fontWeight?: string;\n};\n\ntype PresetLabel = Label & {\n text: keyof typeof EN_TRANSLATION;\n};\n\nexport const presetLabelMap: {\n new: PresetLabel;\n bestseller: PresetLabel;\n unifi6: PresetLabel;\n theOriginal: PresetLabel;\n indoorOutdoor: PresetLabel;\n compact: PresetLabel;\n} = {\n new: {\n text: \"New\",\n color: theme.colors.buttercup,\n },\n bestseller: {\n text: \"Bestseller\",\n color: theme.colors.buttercup,\n },\n unifi6: {\n text: \"UniFi 6\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n theOriginal: {\n text: \"The Original\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n indoorOutdoor: {\n text: \"Indoor / Outdoor\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n compact: {\n text: \"Compact\",\n color: theme.colors.vulcan,\n fontWeight: theme.fontWeight.bold,\n },\n};\n\nexport enum CardMotif {\n light = \"light\",\n dark = \"dark\",\n}\n\nexport type CardProps = {\n motif: CardMotif;\n title: string | ReactNode;\n subtitle?: string;\n titleLarge?: string;\n learnMoreHref: string;\n videoSrc?: string;\n videoPoster?: string;\n backgroundImageUrl?: string;\n backgroundColor?: string;\n border?: boolean;\n labels?: Array<keyof typeof presetLabelMap | Label>;\n onLinkClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n beforeFollowLink?: (url: string) => void;\n link?: LearnMoreLinkProps;\n className?: string;\n hideLearnMoreLink?: boolean;\n};\n"],"names":["presetLabelMap","new","text","color","theme","colors","buttercup","bestseller","unifi6","vulcan","fontWeight","bold","theOriginal","indoorOutdoor","compact","CardMotif"],"mappings":";;AAgBO,MAAMA,cAOT,GAAA;EACFC,GAAK,EAAA;IACHC,IAAM,EAAA,KAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAC;EACtB,CAAA;EACAC,UAAY,EAAA;IACVL,IAAM,EAAA,YAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAC;EACtB,CAAA;EACAE,MAAQ,EAAA;IACNN,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAC,WAAa,EAAA;IACXV,IAAM,EAAA,cAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAE,aAAe,EAAA;IACbX,IAAM,EAAA,kBAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAC/B,CAAA;EACAG,OAAS,EAAA;IACPZ,IAAM,EAAA,SAAA;IACNC,KAAA,EAAOC,MAAMC,MAAO,CAAAI,MAAA;IACpBC,UAAA,EAAYN,MAAMM,UAAW,CAAAC;EAAA;AAEjC,CAAA;AAEY,IAAAI,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,OAAQ,CAAA,GAAA,OAAA;EACRA,WAAA,MAAO,CAAA,GAAA,MAAA;EAFGA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -14,6 +14,7 @@ var mapping = require('../../../contexts/MenuContext/mapping.js');
|
|
|
14
14
|
var types = require('../../../contexts/MenuContext/types.js');
|
|
15
15
|
var ux = require('../../../helpers/ux.js');
|
|
16
16
|
require('../../../hooks/index.js');
|
|
17
|
+
var useIsTouchDevice = require('../../../hooks/useIsTouchDevice.js');
|
|
17
18
|
require('../../../types/index.js');
|
|
18
19
|
var asset = require('../../../utils/asset.js');
|
|
19
20
|
var errors = require('../../../utils/errors.js');
|
|
@@ -116,6 +117,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
116
117
|
cartPreview
|
|
117
118
|
}) {
|
|
118
119
|
const isMobile = reactUse.useMedia(PRO_HEADER_MOBILE_AND_DOWN, false);
|
|
120
|
+
const isTouchDevice = useIsTouchDevice.useIsTouchDevice();
|
|
119
121
|
const rootRef = React.useRef(null);
|
|
120
122
|
const wrapRef = React.useRef(null);
|
|
121
123
|
const containerRef = React.useRef(null);
|
|
@@ -378,6 +380,11 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
378
380
|
});
|
|
379
381
|
}, [embedConfig?.moveAvatarIconToLeft, account?.customer?.picture, account?.loading, embedConfig?.displayAvatarAsImage, embedConfig?.hideAvatarIcon, handleAvatarClick, motif]);
|
|
380
382
|
const [showProductLineSelectorDropdown, setShowProductLineSelectorDropdown] = React.useState(false);
|
|
383
|
+
React.useEffect(() => {
|
|
384
|
+
if (activeModal) {
|
|
385
|
+
setShowProductLineSelectorDropdown(false);
|
|
386
|
+
}
|
|
387
|
+
}, [activeModal]);
|
|
381
388
|
const productLineSelectorRef = React.useRef(null);
|
|
382
389
|
reactUse.useClickAway(productLineSelectorRef, () => {
|
|
383
390
|
setShowProductLineSelectorDropdown(false);
|
|
@@ -386,12 +393,12 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
386
393
|
if (cartQuantity === 0) {
|
|
387
394
|
return;
|
|
388
395
|
}
|
|
389
|
-
if (isMobile) {
|
|
396
|
+
if (isTouchDevice || isMobile) {
|
|
390
397
|
setActiveModal(types.ModalId.CartPreview);
|
|
391
398
|
} else {
|
|
392
399
|
handleModalOpen(e, types.ModalId.Cart);
|
|
393
400
|
}
|
|
394
|
-
}, [
|
|
401
|
+
}, [cartQuantity, handleModalOpen, setActiveModal, isMobile, isTouchDevice]);
|
|
395
402
|
return /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProHeaderWrap, {
|
|
396
403
|
ref: rootRef,
|
|
397
404
|
$sticky: !!embedConfig,
|
|
@@ -560,7 +567,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
560
567
|
height: Header_styles.HEADER_ICON_SIZE
|
|
561
568
|
})
|
|
562
569
|
})
|
|
563
|
-
}), !isSsr && !isMobile &&
|
|
570
|
+
}), !isSsr && !isMobile && cartPreview && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.DesktopCartPreviewContainer, {
|
|
564
571
|
children: /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.DesktopCartPreviewContainerInner, {
|
|
565
572
|
children: cartPreview
|
|
566
573
|
})
|
|
@@ -678,7 +685,7 @@ const ProHeader = React.memo(function ProHeader2({
|
|
|
678
685
|
productLineOptions,
|
|
679
686
|
categories,
|
|
680
687
|
hideExtraSection: !!embedConfig
|
|
681
|
-
}), !isSsr && isMobile &&
|
|
688
|
+
}), !isSsr && isMobile && cartPreview]
|
|
682
689
|
})
|
|
683
690
|
})
|
|
684
691
|
});
|