@ubnt/store.core 9.36.0-alpha.3 → 9.36.0-alpha.30
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 +109 -1
- package/lib/assets/cart-secondary.svg +5 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/hosting.png +0 -0
- package/lib/{contexts/MicrositeMenuContext/assets/gbe-1u.png.js → assets/icons/cart-secondary.svg.js} +6 -6
- package/lib/assets/icons/cart-secondary.svg.js.map +1 -0
- package/lib/assets/icons/cart-secondary.svg.mjs +3 -0
- package/lib/assets/icons/cart-secondary.svg.mjs.map +1 -0
- package/lib/assets/icons/wizard/plus.svg.js +1 -1
- package/lib/assets/icons/wizard/plus.svg.mjs +2 -2
- package/lib/assets/multi-gbe.png +0 -0
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/plus.svg +4 -22
- package/lib/assets/plus2.svg +22 -4
- package/lib/assets/single-gbe.png +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/Button/Button.js +7 -0
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +8 -1
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +3 -1
- package/lib/components/Button/CartButton.js +9 -4
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +8 -4
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +3 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +6 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +5 -3
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Explore/ExploreData.js +9 -9
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +9 -9
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +3 -1
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +3 -1
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +2 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +2 -0
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +16 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs +16 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.d.ts +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js +10 -4
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs +10 -4
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js +2 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs +2 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js +17 -10
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs +17 -10
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js +9 -6
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js.map +1 -1
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs +9 -6
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs.map +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/express.js +2 -2
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +2 -2
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +4 -40
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +4 -20
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +2 -2
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
- package/lib/components/ProductWizard/ProductWizard.js +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +2 -0
- package/lib/components/VideoPlayerNew/VideoPlayer.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/proStoreCategories/mapping/index.d.ts +3 -2
- package/lib/constants/proStoreCategories/mapping/index.js +8 -0
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +8 -0
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -3
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +21 -19
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +21 -19
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/assets/{gbe-1u-2.5and10.png.js → hosting.png.js} +6 -6
- package/lib/contexts/MicrositeMenuContext/assets/hosting.png.js.map +1 -0
- package/lib/contexts/MicrositeMenuContext/assets/hosting.png.mjs +3 -0
- package/lib/contexts/MicrositeMenuContext/assets/hosting.png.mjs.map +1 -0
- package/lib/contexts/MicrositeMenuContext/assets/index.d.ts +3 -2
- package/lib/contexts/MicrositeMenuContext/assets/index.js +3 -2
- package/lib/contexts/MicrositeMenuContext/assets/index.js.map +1 -1
- package/lib/contexts/MicrositeMenuContext/assets/index.mjs +3 -2
- package/lib/contexts/MicrositeMenuContext/assets/index.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/assets/multi-gbe.png.js +27 -0
- package/lib/contexts/MicrositeMenuContext/assets/multi-gbe.png.js.map +1 -0
- package/lib/contexts/MicrositeMenuContext/assets/multi-gbe.png.mjs +3 -0
- package/lib/contexts/MicrositeMenuContext/assets/multi-gbe.png.mjs.map +1 -0
- package/lib/contexts/MicrositeMenuContext/assets/single-gbe.png.js +27 -0
- package/lib/contexts/MicrositeMenuContext/assets/single-gbe.png.js.map +1 -0
- package/lib/contexts/MicrositeMenuContext/assets/single-gbe.png.mjs +3 -0
- package/lib/contexts/MicrositeMenuContext/assets/single-gbe.png.mjs.map +1 -0
- package/lib/contexts/MicrositeMenuContext/mapping.d.ts +1 -1
- package/lib/contexts/MicrositeMenuContext/mapping.js +34 -21
- package/lib/contexts/MicrositeMenuContext/mapping.js.map +1 -1
- package/lib/contexts/MicrositeMenuContext/mapping.mjs +31 -19
- package/lib/contexts/MicrositeMenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/translations/en.json.js +7 -3
- package/lib/contexts/MicrositeMenuContext/translations/en.json.js.map +1 -1
- package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs +7 -3
- package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/translations.d.ts +2 -2
- package/lib/contexts/MicrositeMenuContext/types.d.ts +1 -0
- package/lib/contexts/MicrositeMenuContext/types.js.map +1 -1
- package/lib/contexts/MicrositeMenuContext/types.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/assets/gbe-1u-2.5and10.png +0 -0
- package/lib/assets/gbe-1u.png +0 -0
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.js.map +0 -1
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs +0 -3
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs.map +0 -1
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.js.map +0 -1
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs +0 -3
- package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,117 @@
|
|
|
6
6
|
|
|
7
7
|
## Releases
|
|
8
8
|
|
|
9
|
+
### 9.36.0-alpha.30
|
|
10
|
+
|
|
11
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Fix cart button loader dots colors for secondary button
|
|
12
|
+
|
|
13
|
+
### 9.36.0-alpha.29
|
|
14
|
+
|
|
15
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Add option to cart button for custom icon dimensions
|
|
16
|
+
|
|
17
|
+
### 9.36.0-alpha.28
|
|
18
|
+
|
|
19
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Add secondary variant styles for cart button
|
|
20
|
+
|
|
21
|
+
### 9.36.0-alpha.27
|
|
22
|
+
|
|
23
|
+
- [Fix] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Show "Explore" instead of "Compare" for categories with single product
|
|
24
|
+
|
|
25
|
+
### 9.36.0-alpha.26
|
|
26
|
+
|
|
27
|
+
- [Fix] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Add back mouse leave event listener for Navigation 3.0
|
|
28
|
+
|
|
29
|
+
### 9.36.0-alpha.25
|
|
30
|
+
|
|
31
|
+
- [Feat] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Add CloudKeys and Gateways under Integrations in Navigation 3.0
|
|
32
|
+
|
|
33
|
+
### 9.36.0-alpha.24
|
|
34
|
+
|
|
35
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Update ScrollWrapper, remove "onItemExitLeft" and add "disableScrollToActive" options
|
|
36
|
+
|
|
37
|
+
### 9.36.0-alpha.23
|
|
38
|
+
|
|
39
|
+
- Revert MIC-472/update-model-compare-design merge commits
|
|
40
|
+
|
|
41
|
+
### 9.36.0-alpha.22
|
|
42
|
+
|
|
43
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Update ScrollWrapper, add "alignActive" and "onItemExitLeft" options
|
|
44
|
+
|
|
45
|
+
### 9.36.0-alpha.21
|
|
46
|
+
|
|
47
|
+
- [Feat] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Update Navigation 3.0 URLs for Integrations
|
|
48
|
+
|
|
49
|
+
### 9.36.0-alpha.20
|
|
50
|
+
|
|
51
|
+
- [Feat] [MIC-472](https://ubiquiti.atlassian.net/browse/MIC-472) WIP: update model compare table design/functionality
|
|
52
|
+
|
|
53
|
+
### 9.36.0-alpha.19
|
|
54
|
+
|
|
55
|
+
- [Feat] [NEP-3682](https://ubiquiti.atlassian.net/browse/NEP-3682) Add "Camera Accessories" category in "Camera Security"
|
|
56
|
+
|
|
57
|
+
### 9.36.0-alpha.18
|
|
58
|
+
|
|
59
|
+
- [Feat] [NEP-3878](https://ubiquiti.atlassian.net/browse/NEP-3878) Add new WiFi subcategory "Enterprise"
|
|
60
|
+
|
|
61
|
+
### 9.36.0-alpha.17
|
|
62
|
+
|
|
63
|
+
- [Feat] [MIC] Add compare all for overview items in 3.0 navigation
|
|
64
|
+
|
|
65
|
+
### 9.36.0-alpha.16
|
|
66
|
+
|
|
67
|
+
- [Feat] [MIC] Update 3.0 navigation hover state
|
|
68
|
+
|
|
69
|
+
### 9.36.0-alpha.15
|
|
70
|
+
|
|
71
|
+
- [Fix] [MIC-472](https://ubiquiti.atlassian.net/browse/MIC-472) Improve table styles.
|
|
72
|
+
|
|
73
|
+
### 9.36.0-alpha.14
|
|
74
|
+
|
|
75
|
+
- [Fix] [MIC-472](https://ubiquiti.atlassian.net/browse/MIC-472) Rename a table, show badges, remove values to match design
|
|
76
|
+
|
|
77
|
+
### 9.36.0-alpha.13
|
|
78
|
+
|
|
79
|
+
- [Fix] [MIC-472](https://ubiquiti.atlassian.net/browse/MIC-472) Update/add Model Compares to align with 3.0 design
|
|
80
|
+
|
|
81
|
+
### 9.36.0-alpha.12
|
|
82
|
+
|
|
83
|
+
- [Fix] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) Export Category tab height constants
|
|
84
|
+
|
|
85
|
+
### 9.36.0-alpha.11
|
|
86
|
+
|
|
87
|
+
- [Fix] [MIC] ui.com 3.0 navigation has assets with white background
|
|
88
|
+
|
|
89
|
+
### 9.36.0-alpha.10
|
|
90
|
+
|
|
91
|
+
- [Fix] [MIC] ui.com 3.0 navigation active state not persisted for overview after click
|
|
92
|
+
|
|
93
|
+
### 9.36.0-alpha.9
|
|
94
|
+
|
|
95
|
+
- [Feat] [MIC] ui.com 3.0 navigation active hover update v2
|
|
96
|
+
|
|
97
|
+
### 9.36.0-alpha.8
|
|
98
|
+
|
|
99
|
+
- [Feat] [MIC] ui.com 3.0 navigation active hover update
|
|
100
|
+
|
|
101
|
+
### 9.36.0-alpha.7
|
|
102
|
+
|
|
103
|
+
- [Fix] [MIC] ui.com 3.0 navigation active link not working
|
|
104
|
+
|
|
105
|
+
### 9.36.0-alpha.6
|
|
106
|
+
|
|
107
|
+
- [Fix] [MIC] ui.com 3.0 navigation active link
|
|
108
|
+
|
|
109
|
+
### 9.36.0-alpha.5
|
|
110
|
+
|
|
111
|
+
- [Fix] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Update microsite menu context
|
|
112
|
+
|
|
113
|
+
### 9.36.0-alpha.4
|
|
114
|
+
|
|
115
|
+
- [Fix] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Fixes duplicate active items in submenu
|
|
116
|
+
|
|
9
117
|
### 9.36.0-alpha.3
|
|
10
118
|
|
|
11
|
-
- [
|
|
119
|
+
- [Feat] [MIC-417](https://ubiquiti.atlassian.net/browse/MIC-417) Add navigation submenu active state
|
|
12
120
|
|
|
13
121
|
### 9.36.0-alpha.2
|
|
14
122
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.57031 3.22461C1.57031 2.94847 1.79417 2.72461 2.07031 2.72461H3.83016C4.06075 2.72461 4.26143 2.8823 4.31597 3.10635L4.76721 4.96011H15.4618C16.2475 4.96011 16.7435 5.28209 17.0921 5.69181C17.5418 6.2202 17.5409 6.79535 17.4341 7.29746C17.4326 7.30447 17.431 7.31144 17.4292 7.31838L16.3402 11.5367C16.2744 11.7811 16.1883 12.0166 16.0299 12.2394C15.8712 12.4623 15.6633 12.6403 15.3995 12.8097C14.8723 13.1485 14.2351 13.1586 13.6666 13.1586H6.73601C6.56942 13.1586 6.42693 13.2131 6.33011 13.3046C6.24039 13.3895 6.14553 13.5479 6.14553 13.849C6.14553 14.0633 6.23165 14.2209 6.34436 14.3293C6.47021 14.4504 6.60091 14.4849 6.64514 14.4849H14.9759L14.9762 15.4849H6.64514C6.29559 15.4849 5.92648 15.315 5.65098 15.0499C5.36233 14.7721 5.14553 14.3617 5.14553 13.849C5.14553 13.3172 5.32355 12.8803 5.64289 12.5782C5.8204 12.4103 6.02716 12.2977 6.24203 12.2318C6.16598 12.1628 6.09396 12.0942 6.02501 12.0275C5.46345 11.4847 5.17921 10.6674 4.99858 9.97217L4.99773 9.9689L3.88849 5.57837L3.43727 3.72461H2.07031C1.79417 3.72461 1.57031 3.50075 1.57031 3.22461ZM8.63721 12.1586H13.6666C14.2779 12.1586 14.6155 12.1249 14.859 11.9684C15.0564 11.8415 15.1541 11.7453 15.215 11.6597C15.2758 11.5742 15.3231 11.4672 15.3739 11.2791L16.4581 7.07929C16.5283 6.74241 16.498 6.53667 16.3305 6.33988C16.1457 6.12265 15.9162 5.96011 15.4618 5.96011H5.01636L5.96686 9.72231C6.14251 10.3978 6.37313 10.9732 6.72003 11.3086C6.98059 11.5604 7.21044 11.7641 7.49533 11.9119C7.7719 12.0555 8.12538 12.1586 8.63721 12.1586ZM14.9762 15.4849C15.2524 15.4849 15.4763 15.2611 15.4763 14.9849C15.4763 14.7088 15.2521 14.4849 14.9759 14.4849L14.9762 15.4849Z" fill="#006FFF"/>
|
|
3
|
+
<path d="M14.1842 17.0193C14.1842 17.4059 13.8708 17.7193 13.4842 17.7193C13.0976 17.7193 12.7842 17.4059 12.7842 17.0193C12.7842 16.6327 13.0976 16.3193 13.4842 16.3193C13.8708 16.3193 14.1842 16.6327 14.1842 17.0193Z" fill="#006FFF"/>
|
|
4
|
+
<path d="M8.30741 17.0193C8.30741 17.4059 7.99401 17.7193 7.60741 17.7193C7.22081 17.7193 6.90741 17.4059 6.90741 17.0193C6.90741 16.6327 7.22081 16.3193 7.60741 16.3193C7.99401 16.3193 8.30741 16.6327 8.30741 17.0193Z" fill="#006FFF"/>
|
|
5
|
+
</svg>
|
package/lib/assets/close2.svg
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.7175 18.6475C5.4275 18.9375 5.4275 19.4175 5.7175 19.7075C6.0075 19.9975 6.4875 19.9975 6.7775 19.7075L12.9675 13.5175L19.1575 19.7075C19.4475 19.9975 19.9275 19.9975 20.2175 19.7075C20.5075 19.4175 20.5075 18.9375 20.2175 18.6475L14.0275 12.4675L20.2175 6.2775C20.5075 5.9875 20.5075 5.5075 20.2175 5.2175C19.9275 4.9275 19.4475 4.9275 19.1575 5.2175L12.9675 11.4075L6.7775 5.2175C6.4875 4.9275 6.0075 4.9275 5.7175 5.2175C5.4275 5.5075 5.4275 5.9875 5.7175 6.2775L11.9075 12.4675L5.7175 18.6475Z" fill="#36373C"/>
|
|
4
3
|
</svg>
|
package/lib/assets/close3.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
3
4
|
</svg>
|
|
Binary file
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var CartIconSecondary = require("../cart-secondary.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var CartIconSecondary__default = /*#__PURE__*/_interopDefault(CartIconSecondary);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return CartIconSecondary__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(CartIconSecondary).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return CartIconSecondary[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=cart-secondary.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-secondary.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-secondary.svg.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../
|
|
2
|
-
export { default } from "../../
|
|
1
|
+
export * from "../../plus2.svg";
|
|
2
|
+
export { default } from "../../plus2.svg";
|
|
3
3
|
//# sourceMappingURL=plus.svg.mjs.map
|
|
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/plus.svg
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
fill="none"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
>
|
|
8
|
-
<rect
|
|
9
|
-
y="4.5"
|
|
10
|
-
width="10"
|
|
11
|
-
height="1"
|
|
12
|
-
fill="#838691"
|
|
13
|
-
/>
|
|
14
|
-
<rect
|
|
15
|
-
x="4.5"
|
|
16
|
-
y="10"
|
|
17
|
-
width="10"
|
|
18
|
-
height="1"
|
|
19
|
-
transform="rotate(-90 4.5 10)"
|
|
20
|
-
fill="#838691"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 1C8 0.453333 7.54667 0 7 0C6.45333 0 6 0.453333 6 1V6H1C0.453333 6 0 6.45333 0 7C0 7.54667 0.453333 8 1 8H6V13C6 13.5467 6.45333 14 7 14C7.54667 14 8 13.5467 8 13V8H13C13.5467 8 14 7.54667 14 7C14 6.45333 13.5467 6 13 6H8V1Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
package/lib/assets/plus2.svg
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg
|
|
2
|
+
width="10"
|
|
3
|
+
height="10"
|
|
4
|
+
viewBox="0 0 10 10"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<rect
|
|
9
|
+
y="4.5"
|
|
10
|
+
width="10"
|
|
11
|
+
height="1"
|
|
12
|
+
fill="#838691"
|
|
13
|
+
/>
|
|
14
|
+
<rect
|
|
15
|
+
x="4.5"
|
|
16
|
+
y="10"
|
|
17
|
+
width="10"
|
|
18
|
+
height="1"
|
|
19
|
+
transform="rotate(-90 4.5 10)"
|
|
20
|
+
fill="#838691"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
Binary file
|
package/lib/assets/udmPro.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmPro2.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmProMax.jpg
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -36,6 +36,12 @@ const Button = React.forwardRef(function Button2({
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}, [disabled, loading, loadAfterAction, onClick]);
|
|
39
|
+
const loaderDotsColor = React.useMemo(() => {
|
|
40
|
+
if (args.variant === "secondary") {
|
|
41
|
+
return "primaryBlue";
|
|
42
|
+
}
|
|
43
|
+
return "white";
|
|
44
|
+
}, [args.variant]);
|
|
39
45
|
return /* @__PURE__ */jsxRuntime.jsx(Button_styles.StyledButton, {
|
|
40
46
|
...args,
|
|
41
47
|
as: anchor ? "a" : void 0,
|
|
@@ -48,6 +54,7 @@ const Button = React.forwardRef(function Button2({
|
|
|
48
54
|
children: /* @__PURE__ */jsxRuntime.jsxs(Button_styles.InnerWrap, {
|
|
49
55
|
children: [loading && /* @__PURE__ */jsxRuntime.jsx(Button_styles.LoaderDotsWrap, {
|
|
50
56
|
children: /* @__PURE__ */jsxRuntime.jsx(LoaderDots.LoaderDots, {
|
|
57
|
+
color: loaderDotsColor,
|
|
51
58
|
size: size === "large" ? "large" : void 0
|
|
52
59
|
})
|
|
53
60
|
}), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n const loaderDotsColor = useMemo(() => {\n if (args.variant === \"secondary\") {\n return \"primaryBlue\";\n }\n return \"white\";\n }, [args.variant]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots\n color={loaderDotsColor}\n size={size === \"large\" ? \"large\" : undefined}\n />\n </S.LoaderDotsWrap>\n )}\n {children}\n </S.InnerWrap>\n </S.StyledButton>\n );\n});\n"],"names":["BUTTON_LOADING_DELAY_MS","Button","forwardRef","Button2","children","anchor","size","loading","loadingInitial","loadAfterAction","disabled","flush","onClick","args","ref","setLoading","useState","useEffect","onClickCustom","useCallback","e","preventDefault","stopPropagation","setTimeout","loaderDotsColor","useMemo","variant","jsx","S.StyledButton","StyledButton","as","$flush","$loading","jsxs","S.InnerWrap","S.LoaderDotsWrap","LoaderDots","color"],"mappings":";;;;;;;;AAOO,MAAMA,uBAA0B,GAAA,GAAA;AAE1B,MAAAC,MAAA,GAASC,KAAAA,CAAAA,UAGpB,CAAA,SAASD,OACTE,CAAA;EACEC,QAAA;EACAC,MAAA;EACAC,IAAO,GAAA,QAAA;EACPC,OAAS,EAAAC,cAAA;EACTC,eAAA;EACAC,QAAA;EACAC,KAAA;EACAC,OAAA;EACA,GAAGC;AACL,CAAA,EACAC,GACA,EAAA;EAIA,MAAM,CAACP,OAAS,EAAAQ,UAAU,IAAIC,KAAAA,CAAAA,QAAS,CAAA,CAAC,CAACR,cAAc,CAAA;EAGvDS,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACHF,UAAA,CAAA,CAAC,CAACP,cAAc,CAAA;EAAA,CAC7B,EAAG,CAACA,cAAc,CAAC,CAAA;EAKnB,MAAMU,aAAgB,GAAAC,KAAA,CAAAA,WAAA,CACnBC,CAA+B,IAAA;IAE9B,IAAIb,WAAWG,QAAU,EAAA;MACvBU,CAAA,CAAEC,cAAe,CAAA,CAAA;MACjBD,CAAA,CAAEE,eAAgB,CAAA,CAAA;MAClB;IACF;IAGA,IAAIV,OAAS,EAAA;MACXA,OAAA,CAAQQ,CAAC,CAAA;MAGT,IAAIX,eAAiB,EAAA;QACnBM,UAAA,CAAW,IAAI,CAAA;QACfQ,UAAA,CAAW,MAAMR,UAAA,CAAW,KAAK,CAAA,EAAGf,uBAAuB,CAAA;MAC7D;IACF;EACF,CAAA,EACA,CAACU,QAAA,EAAUH,OAAS,EAAAE,eAAA,EAAiBG,OAAO,CAAA,CAC9C;EAEM,MAAAY,eAAA,GAAkBC,KAAAA,CAAAA,QAAQ,MAAM;IAChC,IAAAZ,IAAA,CAAKa,YAAY,WAAa,EAAA;MACzB,OAAA,aAAA;IACT;IACO,OAAA,OAAA;EAAA,CACN,EAAA,CAACb,IAAK,CAAAa,OAAO,CAAC,CAAA;EAMf,sBAAAC,UAAA,CAAAA,GAAA,CAACC,aAAE,CAAAC,YAAA,EAAF;IACE,GAAGhB,IAAA;IACJiB,EAAA,EAAIzB,SAAS,GAAM,GAAA,KAAA,CAAA;IACnBK,UAAUA,QAAY,IAAAH,OAAA;IACtBD,IAAA;IACAyB,MAAQ,EAAApB,KAAA;IACRqB,QAAU,EAAAzB,OAAA;IACVK,OAAS,EAAAM,aAAA;IAETJ,GAAA;IAEAV,QAAA,iBAAA6B,UAAA,CAAAA,IAAA,CAACC,uBAAE,EAAF;MACE9B,QAAA,EAAA,CACCG,OAAA,mBAAAoB,UAAA,CAAAA,GAAA,CAACQ,4BAAE,EAAF;QACC/B,QAAA,EAAA,eAAAuB,UAAA,CAAAA,GAAA,CAACS,UAAA,CAAAA,UAAA,EAAA;UACCC,KAAO,EAAAb,eAAA;UACPlB,IAAA,EAAMA,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,KAAA;QAAA,CAAA;OAEvC,CAAA,EAEDF,QAAA;KACH;EAAA,CAAA,CACF;AAEJ,CAAC,CAAA;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { forwardRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
3
3
|
import '../LoaderDots/index.mjs';
|
|
4
4
|
import { StyledButton, InnerWrap, LoaderDotsWrap } from './Button.styles.mjs';
|
|
5
5
|
import { LoaderDots } from '../LoaderDots/LoaderDots.mjs';
|
|
@@ -34,6 +34,12 @@ const Button = forwardRef(function Button2({
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}, [disabled, loading, loadAfterAction, onClick]);
|
|
37
|
+
const loaderDotsColor = useMemo(() => {
|
|
38
|
+
if (args.variant === "secondary") {
|
|
39
|
+
return "primaryBlue";
|
|
40
|
+
}
|
|
41
|
+
return "white";
|
|
42
|
+
}, [args.variant]);
|
|
37
43
|
return /* @__PURE__ */jsx(StyledButton, {
|
|
38
44
|
...args,
|
|
39
45
|
as: anchor ? "a" : void 0,
|
|
@@ -46,6 +52,7 @@ const Button = forwardRef(function Button2({
|
|
|
46
52
|
children: /* @__PURE__ */jsxs(InnerWrap, {
|
|
47
53
|
children: [loading && /* @__PURE__ */jsx(LoaderDotsWrap, {
|
|
48
54
|
children: /* @__PURE__ */jsx(LoaderDots, {
|
|
55
|
+
color: loaderDotsColor,
|
|
49
56
|
size: size === "large" ? "large" : void 0
|
|
50
57
|
})
|
|
51
58
|
}), children]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { MouseEvent, PropsWithChildren } from \"react\";\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { LoaderDots } from \"../LoaderDots\";\nimport * as S from \"./Button.styles\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport const BUTTON_LOADING_DELAY_MS = 2000;\n\nexport const Button = forwardRef<\n HTMLButtonElement | HTMLAnchorElement | null,\n PropsWithChildren<ButtonProps>\n>(function Button(\n {\n children,\n anchor,\n size = \"medium\",\n loading: loadingInitial,\n loadAfterAction,\n disabled,\n flush,\n onClick,\n ...args\n },\n ref,\n) {\n // #############################################################################\n // Handle loading\n // #############################################################################\n const [loading, setLoading] = useState(!!loadingInitial);\n\n // Handle external loading state change\n useEffect(() => {\n setLoading(!!loadingInitial);\n }, [loadingInitial]);\n\n // #############################################################################\n // Handle action and loading after action\n // #############################################################################\n const onClickCustom = useCallback(\n (e: MouseEvent<HTMLElement>) => {\n // Prevent action if loading or disabled\n if (loading || disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n // Call the action\n if (onClick) {\n onClick(e);\n\n // Add a delay before the next action can be triggered\n if (loadAfterAction) {\n setLoading(true);\n setTimeout(() => setLoading(false), BUTTON_LOADING_DELAY_MS);\n }\n }\n },\n [disabled, loading, loadAfterAction, onClick],\n );\n\n const loaderDotsColor = useMemo(() => {\n if (args.variant === \"secondary\") {\n return \"primaryBlue\";\n }\n return \"white\";\n }, [args.variant]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.StyledButton\n {...args}\n as={anchor ? \"a\" : undefined}\n disabled={disabled || loading}\n size={size}\n $flush={flush}\n $loading={loading}\n onClick={onClickCustom}\n // @ts-expect-error By using as=\"a\" we can't safely determine which to use type-wise here\n ref={ref}\n >\n <S.InnerWrap>\n {loading && (\n <S.LoaderDotsWrap>\n <LoaderDots\n color={loaderDotsColor}\n size={size === \"large\" ? \"large\" : undefined}\n />\n </S.LoaderDotsWrap>\n )}\n {children}\n </S.InnerWrap>\n </S.StyledButton>\n );\n});\n"],"names":["BUTTON_LOADING_DELAY_MS","Button","forwardRef","Button2","children","anchor","size","loading","loadingInitial","loadAfterAction","disabled","flush","onClick","args","ref","setLoading","useState","useEffect","onClickCustom","useCallback","e","preventDefault","stopPropagation","setTimeout","loaderDotsColor","useMemo","variant","jsx","S.StyledButton","as","$flush","$loading","jsxs","S.InnerWrap","S.LoaderDotsWrap","LoaderDots","color"],"mappings":";;;;;;AAOO,MAAMA,uBAA0B,GAAA,GAAA;AAE1B,MAAAC,MAAA,GAASC,UAGpB,CAAA,SAASD,OACTE,CAAA;EACEC,QAAA;EACAC,MAAA;EACAC,IAAO,GAAA,QAAA;EACPC,OAAS,EAAAC,cAAA;EACTC,eAAA;EACAC,QAAA;EACAC,KAAA;EACAC,OAAA;EACA,GAAGC;AACL,CAAA,EACAC,GACA,EAAA;EAIA,MAAM,CAACP,OAAS,EAAAQ,UAAU,IAAIC,QAAS,CAAA,CAAC,CAACR,cAAc,CAAA;EAGvDS,SAAA,CAAU,MAAM;IACHF,UAAA,CAAA,CAAC,CAACP,cAAc,CAAA;EAAA,CAC7B,EAAG,CAACA,cAAc,CAAC,CAAA;EAKnB,MAAMU,aAAgB,GAAAC,WAAA,CACnBC,CAA+B,IAAA;IAE9B,IAAIb,WAAWG,QAAU,EAAA;MACvBU,CAAA,CAAEC,cAAe,CAAA,CAAA;MACjBD,CAAA,CAAEE,eAAgB,CAAA,CAAA;MAClB;IACF;IAGA,IAAIV,OAAS,EAAA;MACXA,OAAA,CAAQQ,CAAC,CAAA;MAGT,IAAIX,eAAiB,EAAA;QACnBM,UAAA,CAAW,IAAI,CAAA;QACfQ,UAAA,CAAW,MAAMR,UAAA,CAAW,KAAK,CAAA,EAAGf,uBAAuB,CAAA;MAC7D;IACF;EACF,CAAA,EACA,CAACU,QAAA,EAAUH,OAAS,EAAAE,eAAA,EAAiBG,OAAO,CAAA,CAC9C;EAEM,MAAAY,eAAA,GAAkBC,QAAQ,MAAM;IAChC,IAAAZ,IAAA,CAAKa,YAAY,WAAa,EAAA;MACzB,OAAA,aAAA;IACT;IACO,OAAA,OAAA;EAAA,CACN,EAAA,CAACb,IAAK,CAAAa,OAAO,CAAC,CAAA;EAMf,sBAAAC,GAAA,CAACC,YAAE,EAAF;IACE,GAAGf,IAAA;IACJgB,EAAA,EAAIxB,SAAS,GAAM,GAAA,KAAA,CAAA;IACnBK,UAAUA,QAAY,IAAAH,OAAA;IACtBD,IAAA;IACAwB,MAAQ,EAAAnB,KAAA;IACRoB,QAAU,EAAAxB,OAAA;IACVK,OAAS,EAAAM,aAAA;IAETJ,GAAA;IAEAV,QAAA,iBAAA4B,IAAA,CAACC,SAAE,EAAF;MACE7B,QAAA,EAAA,CACCG,OAAA,mBAAAoB,GAAA,CAACO,cAAE,EAAF;QACC9B,QAAA,EAAA,eAAAuB,GAAA,CAACQ,UAAA,EAAA;UACCC,KAAO,EAAAZ,eAAA;UACPlB,IAAA,EAAMA,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,KAAA;QAAA,CAAA;OAEvC,CAAA,EAEDF,QAAA;KACH;EAAA,CAAA,CACF;AAEJ,CAAC,CAAA;"}
|
|
@@ -13,5 +13,7 @@ export interface CartButtonProps extends ButtonProps {
|
|
|
13
13
|
* (optional) Label to display on the button. If not provided, only the icon will be displayed
|
|
14
14
|
*/
|
|
15
15
|
label?: string;
|
|
16
|
+
iconWidth?: number;
|
|
17
|
+
iconHeight?: number;
|
|
16
18
|
}
|
|
17
|
-
export declare const CartButton: ({ icon, hideIcon, preLabel, label, ...props }: CartButtonProps) => JSX.Element;
|
|
19
|
+
export declare const CartButton: ({ icon, hideIcon, preLabel, label, iconHeight, iconWidth, ...props }: CartButtonProps) => JSX.Element;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
|
+
require('../../assets/icons/cart-secondary.svg.js');
|
|
6
7
|
require('../../assets/icons/cart.svg.js');
|
|
7
8
|
require('../../assets/icons/cartPlus.svg.js');
|
|
8
9
|
require('../StyleableSvgImage/index.js');
|
|
9
10
|
var Button = require('./Button.js');
|
|
10
11
|
var CartPlusIcon = require("../../assets/cartPlus.svg");
|
|
12
|
+
var CartIconSecondary = require("../../assets/cart-secondary.svg");
|
|
11
13
|
var CartIcon = require("../../assets/cart.svg");
|
|
12
14
|
var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
|
|
13
15
|
function _interopDefault(e) {
|
|
@@ -17,6 +19,7 @@ function _interopDefault(e) {
|
|
|
17
19
|
}
|
|
18
20
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
19
21
|
var CartPlusIcon__default = /*#__PURE__*/_interopDefault(CartPlusIcon);
|
|
22
|
+
var CartIconSecondary__default = /*#__PURE__*/_interopDefault(CartIconSecondary);
|
|
20
23
|
var CartIcon__default = /*#__PURE__*/_interopDefault(CartIcon);
|
|
21
24
|
"use strict";
|
|
22
25
|
const ButtonStyled = styled__default["default"](Button.Button)`
|
|
@@ -73,16 +76,18 @@ const CartButton = function CartButton2({
|
|
|
73
76
|
hideIcon,
|
|
74
77
|
preLabel,
|
|
75
78
|
label,
|
|
79
|
+
iconHeight = 16,
|
|
80
|
+
iconWidth = 20,
|
|
76
81
|
...props
|
|
77
82
|
}) {
|
|
78
83
|
const Icon = React.useMemo(() => {
|
|
79
84
|
switch (icon) {
|
|
80
85
|
case "cart":
|
|
81
|
-
return CartIcon__default["default"];
|
|
86
|
+
return props.variant === "secondary" ? CartIconSecondary__default["default"] : CartIcon__default["default"];
|
|
82
87
|
case "plus":
|
|
83
88
|
return CartPlusIcon__default["default"];
|
|
84
89
|
}
|
|
85
|
-
}, [icon]);
|
|
90
|
+
}, [icon, props.variant]);
|
|
86
91
|
return /* @__PURE__ */jsxRuntime.jsx(ButtonStyled, {
|
|
87
92
|
...props,
|
|
88
93
|
label,
|
|
@@ -90,8 +95,8 @@ const CartButton = function CartButton2({
|
|
|
90
95
|
children: /* @__PURE__ */jsxRuntime.jsxs(ButtonInnerWrap, {
|
|
91
96
|
children: [!hideIcon && /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
92
97
|
src: Icon,
|
|
93
|
-
width:
|
|
94
|
-
height:
|
|
98
|
+
width: iconWidth,
|
|
99
|
+
height: iconHeight
|
|
95
100
|
}), (!!preLabel || !!label) && /* @__PURE__ */jsxRuntime.jsxs(Labels, {
|
|
96
101
|
children: [!!preLabel && /* @__PURE__ */jsxRuntime.jsx(PreLabel, {
|
|
97
102
|
children: preLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartButton.js","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={
|
|
1
|
+
{"version":3,"file":"CartButton.js","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIconSecondary from \"../../assets/icons/cart-secondary.svg\";\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n\n iconWidth?: number;\n iconHeight?: number;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n iconHeight = 16,\n iconWidth = 20,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return props.variant === \"secondary\" ? CartIconSecondary : CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon, props.variant]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && (\n <StyleableSvgImage src={Icon} width={iconWidth} height={iconHeight} />\n )}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","iconHeight","iconWidth","props","Icon","useMemo","variant","CartIconSecondary","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,YAAA,GAAeC,eAAAA,CAAAA,SAAAA,EAAOC,MAAAA,CAAAA,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,UAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,UAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,MAAAA,CAAAA,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACAc,UAAa,GAAA,EAAA;EACbC,SAAY,GAAA,EAAA;EACZ,GAAGC;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,KAAAA,CAAAA,QAAQ,MAAM;IACzB,QAAQN,IAAM;MACZ,KAAK,MAAA;QACI,OAAAI,KAAA,CAAMG,OAAY,KAAA,WAAA,GAAcC,0BAAAA,CAAAA,SAAAA,CAAoB,GAAAC,iBAAAA,CAAAA,SAAAA,CAAA;MAE7D,KAAK,MAAA;QACI,OAAAC,gCAAA;IACX;EACC,CAAA,EAAA,CAACV,IAAM,EAAAI,KAAA,CAAMG,OAAO,CAAC,CAAA;EAKxB,OAAA,8BACGtB,YAAc,EAAA;IAAA,GAAGmB;IAAOhB,KAAc;IAAAC,QAAA;IACrCsB,yCAACpB,eACE,EAAA;MAAAoB,QAAA,EAAA,CAAC,CAAAV,QAAA,kCACCW,iBAAkB,CAAAA,iBAAA,EAAA;QAAAC,GAAA,EAAKR;QAAMS,KAAO,EAAAX,SAAA;QAAWY,QAAQb;OAAY,CAAA,EAAA,CAEpE,CAAC,CAACb,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,+BACfK,MACE,EAAA;QAAAkB,QAAA,EAAA,CAAA,CAAC,CAACtB,QAAA,IAAA,eAAa2B,UAAA,CAAAA,GAAA,CAAAtB,QAAA,EAAA;UAAUiB,QAAS,EAAAtB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAA4B,UAAA,CAAAA,GAAA,CAACpB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbsB,QAAA,EAAAvB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
import '../../assets/icons/cart-secondary.svg.mjs';
|
|
4
5
|
import '../../assets/icons/cart.svg.mjs';
|
|
5
6
|
import '../../assets/icons/cartPlus.svg.mjs';
|
|
6
7
|
import '../StyleableSvgImage/index.mjs';
|
|
7
8
|
import { Button } from './Button.mjs';
|
|
8
9
|
import CartPlusIcon__default from "../../assets/cartPlus.svg";
|
|
10
|
+
import CartIconSecondary__default from "../../assets/cart-secondary.svg";
|
|
9
11
|
import CartIcon__default from "../../assets/cart.svg";
|
|
10
12
|
import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
11
13
|
"use strict";
|
|
@@ -63,16 +65,18 @@ const CartButton = function CartButton2({
|
|
|
63
65
|
hideIcon,
|
|
64
66
|
preLabel,
|
|
65
67
|
label,
|
|
68
|
+
iconHeight = 16,
|
|
69
|
+
iconWidth = 20,
|
|
66
70
|
...props
|
|
67
71
|
}) {
|
|
68
72
|
const Icon = useMemo(() => {
|
|
69
73
|
switch (icon) {
|
|
70
74
|
case "cart":
|
|
71
|
-
return CartIcon__default;
|
|
75
|
+
return props.variant === "secondary" ? CartIconSecondary__default : CartIcon__default;
|
|
72
76
|
case "plus":
|
|
73
77
|
return CartPlusIcon__default;
|
|
74
78
|
}
|
|
75
|
-
}, [icon]);
|
|
79
|
+
}, [icon, props.variant]);
|
|
76
80
|
return /* @__PURE__ */jsx(ButtonStyled, {
|
|
77
81
|
...props,
|
|
78
82
|
label,
|
|
@@ -80,8 +84,8 @@ const CartButton = function CartButton2({
|
|
|
80
84
|
children: /* @__PURE__ */jsxs(ButtonInnerWrap, {
|
|
81
85
|
children: [!hideIcon && /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
82
86
|
src: Icon,
|
|
83
|
-
width:
|
|
84
|
-
height:
|
|
87
|
+
width: iconWidth,
|
|
88
|
+
height: iconHeight
|
|
85
89
|
}), (!!preLabel || !!label) && /* @__PURE__ */jsxs(Labels, {
|
|
86
90
|
children: [!!preLabel && /* @__PURE__ */jsx(PreLabel, {
|
|
87
91
|
children: preLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartButton.mjs","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={
|
|
1
|
+
{"version":3,"file":"CartButton.mjs","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIconSecondary from \"../../assets/icons/cart-secondary.svg\";\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n\n iconWidth?: number;\n iconHeight?: number;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n iconHeight = 16,\n iconWidth = 20,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return props.variant === \"secondary\" ? CartIconSecondary : CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon, props.variant]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && (\n <StyleableSvgImage src={Icon} width={iconWidth} height={iconHeight} />\n )}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","iconHeight","iconWidth","props","Icon","useMemo","variant","CartIconSecondary","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;;;AA6BA,MAAMA,YAAA,GAAeC,OAAOC,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,GAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,GAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,MAAO,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,MAAO,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACAc,UAAa,GAAA,EAAA;EACbC,SAAY,GAAA,EAAA;EACZ,GAAGC;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,QAAQ,MAAM;IACzB,QAAQN,IAAM;MACZ,KAAK,MAAA;QACI,OAAAI,KAAA,CAAMG,OAAY,KAAA,WAAA,GAAcC,0BAAoB,GAAAC,iBAAA;MAE7D,KAAK,MAAA;QACI,OAAAC,qBAAA;IACX;EACC,CAAA,EAAA,CAACV,IAAM,EAAAI,KAAA,CAAMG,OAAO,CAAC,CAAA;EAKxB,OAAA,mBACGtB,YAAc,EAAA;IAAA,GAAGmB;IAAOhB,KAAc;IAAAC,QAAA;IACrCsB,8BAACpB,eACE,EAAA;MAAAoB,QAAA,EAAA,CAAC,CAAAV,QAAA,uBACCW,iBAAkB,EAAA;QAAAC,GAAA,EAAKR;QAAMS,KAAO,EAAAX,SAAA;QAAWY,QAAQb;OAAY,CAAA,EAAA,CAEpE,CAAC,CAACb,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,oBACfK,MACE,EAAA;QAAAkB,QAAA,EAAA,CAAA,CAAC,CAACtB,QAAA,IAAA,eAAa2B,GAAA,CAAAtB,QAAA,EAAA;UAAUiB,QAAS,EAAAtB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAA4B,GAAA,CAACpB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbsB,QAAA,EAAAvB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CardSectionWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
export declare const SectionTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const CardsScrollWrapper: import("styled-components").StyledComponent<({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, }: import("../ScrollWrapper/ScrollWrapper.types").ScrollWrapperProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CardsScrollWrapper: import("styled-components").StyledComponent<({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, alignActive, disableScrollToActive, }: import("../ScrollWrapper/ScrollWrapper.types").ScrollWrapperProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const CardsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export declare const CATEGORY_TABS_HEIGHT = 79;
|
|
2
|
+
export declare const CATEGORY_TABS_HEIGHT_MOBILE = 65;
|
|
1
3
|
export declare const Container: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const ScrollWrapper: import("styled-components").StyledComponent<({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, }: import("../ScrollWrapper/ScrollWrapper.types").ScrollWrapperProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const ScrollWrapper: import("styled-components").StyledComponent<({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, alignActive, disableScrollToActive, }: import("../ScrollWrapper/ScrollWrapper.types").ScrollWrapperProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
3
5
|
export declare const Item: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
4
6
|
$selected: boolean;
|
|
5
7
|
}, never>;
|