@ubnt/store.core 9.27.0-beta.2 → 9.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/CHANGELOG.md +5 -29
  2. package/lib/_virtual/_virtual_multi-entry.js +2 -15
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +0 -2
  5. package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
  6. package/lib/assets/attention.svg +5 -5
  7. package/lib/assets/attention2.svg +5 -5
  8. package/lib/assets/close.svg +1 -4
  9. package/lib/assets/close2.svg +4 -1
  10. package/lib/assets/pause.svg +3 -3
  11. package/lib/assets/pause2.svg +3 -3
  12. package/lib/assets/udmPro.jpg +0 -0
  13. package/lib/assets/udmPro2.jpg +0 -0
  14. package/lib/assets/udmProSpecial.jpg +0 -0
  15. package/lib/assets/udmProSpecial2.jpg +0 -0
  16. package/lib/components/Button/CartButton.d.ts +11 -1
  17. package/lib/components/Button/CartButton.js +45 -5
  18. package/lib/components/Button/CartButton.js.map +1 -1
  19. package/lib/components/Button/CartButton.mjs +45 -5
  20. package/lib/components/Button/CartButton.mjs.map +1 -1
  21. package/lib/components/CustomImage/CustomImage.js +1 -1
  22. package/lib/components/CustomImage/CustomImage.mjs +1 -1
  23. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
  24. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
  25. package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
  26. package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
  27. package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
  28. package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
  29. package/lib/components/Header/CartModalV2/CartModal.js +1 -1
  30. package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
  31. package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
  32. package/lib/components/Header/Header.js +1 -1
  33. package/lib/components/Header/Header.mjs +1 -1
  34. package/lib/components/LandingPageSidebar/LandingPageSidebar.js +1 -1
  35. package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +1 -1
  36. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  37. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  38. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  39. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  40. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
  41. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
  42. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  43. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  44. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
  45. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
  46. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  47. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  48. package/lib/components/ModelCompareV3/data/CloudGateways.js +6 -6
  49. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
  50. package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
  51. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
  52. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  53. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  54. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  55. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  56. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  57. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  58. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  59. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  60. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  61. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  62. package/lib/components/Search/Input/Input.js +1 -1
  63. package/lib/components/Search/Input/Input.mjs +1 -1
  64. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  65. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  66. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  67. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  68. package/lib/constants/icons/generic/close.svg.js +1 -1
  69. package/lib/constants/icons/generic/close.svg.mjs +2 -2
  70. package/lib/constants/icons/generic/index.js +1 -1
  71. package/lib/constants/icons/generic/index.mjs +1 -1
  72. package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -2
  73. package/lib/constants/proStoreCategories/mapping/index.js +54 -48
  74. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  75. package/lib/constants/proStoreCategories/mapping/index.mjs +54 -48
  76. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  77. package/lib/constants/proStoreCategories/mapping/redirects.js +1 -9
  78. package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
  79. package/lib/constants/proStoreCategories/mapping/redirects.mjs +1 -9
  80. package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
  81. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +4 -4
  82. package/lib/constants/proStoreCategories/mapping/unifi.js +3 -3
  83. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  84. package/lib/constants/proStoreCategories/mapping/unifi.mjs +3 -3
  85. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  86. package/lib/constants/proStoreCategories/translations/ar.json.js +1 -2
  87. package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
  88. package/lib/constants/proStoreCategories/translations/ar.json.mjs +1 -2
  89. package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
  90. package/lib/constants/proStoreCategories/translations/de.json.js +1 -2
  91. package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
  92. package/lib/constants/proStoreCategories/translations/de.json.mjs +1 -2
  93. package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
  94. package/lib/constants/proStoreCategories/translations/el.json.js +1 -2
  95. package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
  96. package/lib/constants/proStoreCategories/translations/el.json.mjs +1 -2
  97. package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
  98. package/lib/constants/proStoreCategories/translations/en.json.js +0 -4
  99. package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
  100. package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -4
  101. package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
  102. package/lib/constants/proStoreCategories/translations/es.json.js +1 -2
  103. package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
  104. package/lib/constants/proStoreCategories/translations/es.json.mjs +1 -2
  105. package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
  106. package/lib/constants/proStoreCategories/translations/fr.json.js +2 -3
  107. package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
  108. package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -3
  109. package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
  110. package/lib/constants/proStoreCategories/translations/it.json.js +1 -2
  111. package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
  112. package/lib/constants/proStoreCategories/translations/it.json.mjs +1 -2
  113. package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
  114. package/lib/constants/proStoreCategories/translations/ja.json.js +1 -2
  115. package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
  116. package/lib/constants/proStoreCategories/translations/ja.json.mjs +1 -2
  117. package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
  118. package/lib/constants/proStoreCategories/translations/pt-BR.json.js +1 -2
  119. package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
  120. package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +1 -2
  121. package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
  122. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -3
  123. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
  124. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -3
  125. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
  126. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -3
  127. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
  128. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -3
  129. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
  130. package/lib/helpers/index.d.ts +0 -1
  131. package/lib/helpers/index.js +0 -11
  132. package/lib/helpers/index.js.map +1 -1
  133. package/lib/helpers/index.mjs +0 -1
  134. package/lib/helpers/index.mjs.map +1 -1
  135. package/lib/types/index.d.ts +0 -1
  136. package/lib/types/index.js +0 -2
  137. package/lib/types/index.js.map +1 -1
  138. package/lib/types/index.mjs +0 -1
  139. package/lib/types/index.mjs.map +1 -1
  140. package/lib/utils/array.d.ts +0 -4
  141. package/lib/utils/array.js +0 -10
  142. package/lib/utils/array.js.map +1 -1
  143. package/lib/utils/array.mjs +1 -10
  144. package/lib/utils/array.mjs.map +1 -1
  145. package/lib/utils/money/constants.d.ts +0 -7
  146. package/lib/utils/money/constants.js +1 -9
  147. package/lib/utils/money/constants.js.map +1 -1
  148. package/lib/utils/money/constants.mjs +2 -10
  149. package/lib/utils/money/constants.mjs.map +1 -1
  150. package/lib/utils/money/tax.private.d.ts +8 -0
  151. package/lib/utils/money/tax.private.js +14 -5
  152. package/lib/utils/money/tax.private.js.map +1 -1
  153. package/lib/utils/money/tax.private.mjs +16 -8
  154. package/lib/utils/money/tax.private.mjs.map +1 -1
  155. package/package.json +51 -51
  156. package/lib/helpers/product.d.ts +0 -87
  157. package/lib/helpers/product.js +0 -346
  158. package/lib/helpers/product.js.map +0 -1
  159. package/lib/helpers/product.mjs +0 -335
  160. package/lib/helpers/product.mjs.map +0 -1
  161. package/lib/helpers/product.test.d.ts +0 -1
  162. package/lib/types/product.d.ts +0 -87
  163. package/lib/types/product.js +0 -14
  164. package/lib/types/product.js.map +0 -1
  165. package/lib/types/product.mjs +0 -13
  166. package/lib/types/product.mjs.map +0 -1
  167. package/lib/utils/productSort.d.ts +0 -41
  168. package/lib/utils/productSort.js +0 -67
  169. package/lib/utils/productSort.js.map +0 -1
  170. package/lib/utils/productSort.mjs +0 -60
  171. package/lib/utils/productSort.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -6,40 +6,23 @@
6
6
 
7
7
  ## Releases
8
8
 
9
- ### 9.27.0-beta.2
9
+ ### 9.27.1
10
10
 
11
- - [Feat] [NEP-3699](https://ubiquiti.atlassian.net/browse/NEP-3699) Clean up collections in pro store mapping
11
+ - [Fix] [NEP-3788](https://ubiquiti.atlassian.net/browse/nep-3788) Fix regression with font-weight for existing coming soon variant
12
12
 
13
- ### 9.27.0-beta.1
13
+ ### 9.27.0
14
14
 
15
- - [Refactor] Refactor how we calculate tax to have control over rounding and precision!!! Will have output offsets by a up or down!
16
-
17
- ### 9.27.0-beta.0
18
-
19
- - Upstream master
20
- - [Feat] [NEP-3699](https://ubiquiti.atlassian.net/browse/NEP-3699) Clean up collections in pro store mapping
15
+ - [Feat] [NEP-3788](https://ubiquiti.atlassian.net/browse/nep-3788) Add ability to preLabel to `<CartButton/>`
21
16
 
22
17
  ### 9.26.0
23
18
 
24
- -[Feat] [MIC-435](https://ubiquiti.atlassian.net/browse/MIC-435) Reorganize Building Bridge page in ui.com
19
+ - [Feat] [MIC-435](https://ubiquiti.atlassian.net/browse/MIC-435) Reorganize Building Bridge page in ui.com
25
20
 
26
21
  ### 9.25.0
27
22
 
28
23
  - [Feat] [MIC-436](https://ubiquiti.atlassian.net/browse/MIC-436) Update Video Recorders compare table data
29
24
  - [Feat] [NEP-3799](https://ubiquiti.atlassian.net/browse/NEP-3799) Add PoE+++ key feature icon and update 2 existing ones
30
25
 
31
- ### 9.24.0-beta.1
32
-
33
- - [Feat] [NEP-3802](https://ubiquiti.atlassian.net/browse/NEP-3802) Add new collection - Enterprise Campus
34
-
35
- ### 9.24.0-beta.0
36
-
37
- > Upstream master + changes
38
-
39
- - [Refactor] Refactor how we calculate tax to have control over rounding and precision!!! Will have output offsets by a
40
- up or down!
41
- - [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Add `UDB` and `UDB Pro` to Model Compare
42
-
43
26
  ### 9.24.0
44
27
 
45
28
  - [Feat] [MIC-430](https://ubiquiti.atlassian.net/browse/MIC-430) Add `UMR Ultra` to Model Compare
@@ -64,13 +47,6 @@
64
47
  - [chore] Update deps
65
48
  - [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Add `UDB` and `UDB Pro` to Model Compare
66
49
 
67
- ### 9.23.0-beta.0
68
-
69
- - [Feat] [NEP-3704](https://ubiquiti.atlassian.net/browse/NEP-3704) Add "Device Bridge" collection to pro store categories
70
- - [Feat] [NEP-3300](https://ubiquiti.atlassian.net/browse/NEP-3300) Add NAS category in pro store
71
- - [Feat] [MIC-378](https://ubiquiti.atlassian.net/browse/MIC-378) Add product helper functions
72
- - [Feat] [NEP-3699](https://ubiquiti.atlassian.net/browse/NEP-3699) Clean up collections in pro store mapping
73
-
74
50
  ### 9.22.1
75
51
 
76
52
  - [Feat] [MIC-424](https://ubiquiti.atlassian.net/browse/MIC-424) Remove "Coming soon" from `ENVR` from Model compare
@@ -69,7 +69,6 @@ var useTranslation = require('../hooks/useTranslation.js');
69
69
  var useScrollToY = require('../hooks/useScrollToY.js');
70
70
  var constants = require('../types/constants.js');
71
71
  var generated = require('../types/generated.js');
72
- var product = require('../types/product.js');
73
72
  var url = require('../utils/url.js');
74
73
  var misc = require('../utils/money/misc.js');
75
74
  var number = require('../utils/number.js');
@@ -87,7 +86,7 @@ var measures = require('../utils/measures.js');
87
86
  var errors = require('../utils/errors.js');
88
87
  var tags = require('../utils/tags.js');
89
88
  var wattage = require('../utils/wattage.js');
90
- var product$1 = require('../utils/product.js');
89
+ var product = require('../utils/product.js');
91
90
  var asset = require('../utils/asset.js');
92
91
  var imageOptimizer = require('../utils/imageOptimizer.js');
93
92
  var styles = require('../utils/styles.js');
@@ -95,7 +94,6 @@ var storeId = require('../utils/storeId.js');
95
94
  var index$V = require('../constants/proStoreCategories/index.js');
96
95
  var index$W = require('../constants/proStoreFilters/index.js');
97
96
  var proStoreCategories = require('../helpers/proStoreCategories.js');
98
- var product$2 = require('../helpers/product.js');
99
97
  var smartcat = require('../apis/smartcat.js');
100
98
  exports.Avatar = index;
101
99
  exports.Button = index$1;
@@ -169,7 +167,6 @@ exports.Unit = generated.Unit;
169
167
  exports.UnitSystem = generated.UnitSystem;
170
168
  exports.UserAssignedCountryCode = generated.UserAssignedCountryCode;
171
169
  exports.ValidateTaxStatus = generated.ValidateTaxStatus;
172
- exports.DisplayProductStatus = product.DisplayProductStatus;
173
170
  exports.url = url;
174
171
  exports.money = misc;
175
172
  exports.number = number;
@@ -187,7 +184,7 @@ exports.measures = measures;
187
184
  exports.errors = errors;
188
185
  exports.tags = tags;
189
186
  exports.wattage = wattage;
190
- exports.product = product$1;
187
+ exports.product = product;
191
188
  exports.asset = asset;
192
189
  exports.imageOptimizer = imageOptimizer;
193
190
  exports.styles = styles;
@@ -202,15 +199,5 @@ exports.getSubCategoryIdByCollectionSlug = proStoreCategories.getSubCategoryIdBy
202
199
  exports.isValidSubCategory = proStoreCategories.isValidSubCategory;
203
200
  exports.parseCategories = proStoreCategories.parseCategories;
204
201
  exports.useTranslatedCategories = proStoreCategories.useTranslatedCategories;
205
- exports.COLLECTION_SECTION_OTHER_ID = product$2.COLLECTION_SECTION_OTHER_ID;
206
- exports.HDDProductSlugs = product$2.HDDProductSlugs;
207
- exports.MagicCollectionTags = product$2.MagicCollectionTags;
208
- exports.ProductOptions = product$2.ProductOptions;
209
- exports.createSectionHierarchy = product$2.createSectionHierarchy;
210
- exports.getProStoreCategory = product$2.getProStoreCategory;
211
- exports.getProductGroups = product$2.getProductGroups;
212
- exports.getStoreProducts = product$2.getStoreProducts;
213
- exports.isNonNullish = product$2.isNonNullish;
214
- exports.removeExcludedProducts = product$2.removeExcludedProducts;
215
202
  exports.smartcat = smartcat;
216
203
  //# sourceMappingURL=_virtual_multi-entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_virtual_multi-entry.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"_virtual_multi-entry.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -122,7 +122,6 @@ export { useTranslation, useTranslationRaw } from '../hooks/useTranslation.mjs';
122
122
  export { useScrollToY } from '../hooks/useScrollToY.mjs';
123
123
  export { AddressUsageType, Language } from '../types/constants.mjs';
124
124
  export { AddressType, CountryCode, Currency, GlobalStoreId, ProductLine, StoreId, Unit, UnitSystem, UserAssignedCountryCode, ValidateTaxStatus } from '../types/generated.mjs';
125
- export { DisplayProductStatus } from '../types/product.mjs';
126
125
  import * as url from '../utils/url.mjs';
127
126
  export { url };
128
127
  import * as misc from '../utils/money/misc.mjs';
@@ -172,7 +171,6 @@ export { index$V as proStoreCategories };
172
171
  import * as index$W from '../constants/proStoreFilters/index.mjs';
173
172
  export { index$W as proStoreFilters };
174
173
  export { getCategoriesBySubcategory, getLocalizedCategories, getProductLineByCategory, getProductLineBySubcategory, getSubCategoryIdByCollectionSlug, isValidSubCategory, parseCategories, useTranslatedCategories } from '../helpers/proStoreCategories.mjs';
175
- export { COLLECTION_SECTION_OTHER_ID, HDDProductSlugs, MagicCollectionTags, ProductOptions, createSectionHierarchy, getProStoreCategory, getProductGroups, getStoreProducts, isNonNullish, removeExcludedProducts } from '../helpers/product.mjs';
176
174
  import * as smartcat from '../apis/smartcat.mjs';
177
175
  export { smartcat };
178
176
  //# sourceMappingURL=_virtual_multi-entry.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"_virtual_multi-entry.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"_virtual_multi-entry.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
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"/>
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>
@@ -1,6 +1,6 @@
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"/>
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,4 +1 @@
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"/>
4
- </svg>
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0.105713" y="12.7274" width="18" height="1.5" rx="0.75" transform="rotate(-45 0.105713 12.7274)" fill="currentColor"/><rect width="18" height="1.5" rx="0.75" transform="matrix(-0.707107 -0.707107 -0.707107 0.707107 13.8943 12.7274)" fill="currentColor"/></svg>
@@ -1 +1,4 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0.105713" y="12.7274" width="18" height="1.5" rx="0.75" transform="rotate(-45 0.105713 12.7274)" fill="currentColor"/><rect width="18" height="1.5" rx="0.75" transform="matrix(-0.707107 -0.707107 -0.707107 0.707107 13.8943 12.7274)" fill="currentColor"/></svg>
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"/>
4
+ </svg>
@@ -1,4 +1,4 @@
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"/>
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>
@@ -1,4 +1,4 @@
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"/>
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>
Binary file
Binary file
Binary file
Binary file
@@ -2,6 +2,16 @@ import type { ButtonProps } from "./Button.types";
2
2
  export interface CartButtonProps extends ButtonProps {
3
3
  icon?: "cart" | "plus";
4
4
  hideIcon?: boolean;
5
+ /**
6
+ * (optional) Mini-Text to display before the label, used for additional context. See example for more details
7
+ * @example
8
+ * preLabel="Available again week of"
9
+ * label="Oct. 10"
10
+ */
11
+ preLabel?: string;
12
+ /**
13
+ * (optional) Label to display on the button. If not provided, only the icon will be displayed
14
+ */
5
15
  label?: string;
6
16
  }
7
- export declare const CartButton: ({ icon, hideIcon, label, ...props }: CartButtonProps) => JSX.Element;
17
+ export declare const CartButton: ({ icon, hideIcon, preLabel, label, ...props }: CartButtonProps) => JSX.Element;
@@ -20,9 +20,25 @@ var CartPlusIcon__default = /*#__PURE__*/_interopDefault(CartPlusIcon);
20
20
  var CartIcon__default = /*#__PURE__*/_interopDefault(CartIcon);
21
21
  "use strict";
22
22
  const ButtonStyled = styled__default["default"](Button.Button)`
23
- padding: 10px 15px;
24
- width: 40px;
25
- height: 40px;
23
+ ${({
24
+ label,
25
+ preLabel
26
+ }) => {
27
+ if (!!label && !!preLabel) {
28
+ return;
29
+ }
30
+ if (label) {
31
+ return styled.css`
32
+ padding: 10px 15px;
33
+ height: 40px;
34
+ `;
35
+ }
36
+ return styled.css`
37
+ padding: 10px 15px;
38
+ width: 40px;
39
+ height: 40px;
40
+ `;
41
+ }}
26
42
 
27
43
  ${({
28
44
  label
@@ -35,9 +51,27 @@ const ButtonInnerWrap = styled__default["default"].div`
35
51
  align-items: center;
36
52
  gap: 8px;
37
53
  `;
54
+ const Labels = styled__default["default"].div`
55
+ display: inline-flex;
56
+ flex-direction: column;
57
+ `;
58
+ const PreLabel = styled__default["default"].span`
59
+ /* Size relative to regular label size, e.g if 14px label than 10px preLabel */
60
+ font-size: 0.714em;
61
+ line-height: 1.2;
62
+ font-weight: 400;
63
+ `;
64
+ const Label = styled__default["default"].span`
65
+ ${({
66
+ $forceBold
67
+ }) => $forceBold ? styled.css`
68
+ font-weight: bold;
69
+ ` : void 0};
70
+ `;
38
71
  const CartButton = function CartButton2({
39
72
  icon = "cart",
40
73
  hideIcon,
74
+ preLabel,
41
75
  label,
42
76
  ...props
43
77
  }) {
@@ -52,13 +86,19 @@ const CartButton = function CartButton2({
52
86
  return /* @__PURE__ */jsxRuntime.jsx(ButtonStyled, {
53
87
  ...props,
54
88
  label,
89
+ preLabel,
55
90
  children: /* @__PURE__ */jsxRuntime.jsxs(ButtonInnerWrap, {
56
91
  children: [!hideIcon && /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
57
92
  src: Icon,
58
93
  width: 20,
59
94
  height: 16
60
- }), !!label && /* @__PURE__ */jsxRuntime.jsx("span", {
61
- children: label
95
+ }), (!!preLabel || !!label) && /* @__PURE__ */jsxRuntime.jsxs(Labels, {
96
+ children: [!!preLabel && /* @__PURE__ */jsxRuntime.jsx(PreLabel, {
97
+ children: preLabel
98
+ }), !!label && /* @__PURE__ */jsxRuntime.jsx(Label, {
99
+ $forceBold: !!preLabel,
100
+ children: label
101
+ })]
62
102
  })]
63
103
  })
64
104
  });
@@ -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 label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\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\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\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}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {!!label && <span>{label}</span>}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","css","ButtonInnerWrap","div","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA,MAAMA,YAAA,GAAeC,eAAAA,CAAAA,SAAAA,EAAOC,MAAAA,CAAAA,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAK9B,CAAC;EAAEC;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAC,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBJ,eAAO,CAAA,SAAA,CAAA,CAAAK,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMlB,MAAAC,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAP,KAAA;EACA,GAAGQ;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,KAAAA,CAAAA,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,4BAAA;MAET,KAAK,MAAA;QACI,OAAAC,gCAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,qCACGT,YAAc,EAAA;IAAA,GAAGW,KAAO;IAAAR,KAAA;IACvBa,yCAACX,eACE,EAAA;MAAAW,QAAA,EAAA,CAAC,CAAAN,QAAA,kCAAaO,iBAAkB,CAAAA,iBAAA,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAClE,CAAC,CAACjB,KAAS,IAAA,eAAAkB,UAAA,CAAAA,GAAA,CAAC;QAAML,QAAM,EAAAb;OAAA,CAAA;IAC3B,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"CartButton.js","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,YAAA,GAAeC,eAAAA,CAAAA,SAAAA,EAAOC,MAAAA,CAAAA,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,UAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,UAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,eAAO,CAAA,SAAA,CAAA,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,eAAO,CAAA,SAAA,CAAA,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,MAAAA,CAAAA,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACA,GAAGc;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,KAAAA,CAAAA,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,4BAAA;MAET,KAAK,MAAA;QACI,OAAAC,gCAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,OAAA,8BACGf,YAAc,EAAA;IAAA,GAAGiB;IAAOd,KAAc;IAAAC,QAAA;IACrCkB,yCAAChB,eACE,EAAA;MAAAgB,QAAA,EAAA,CAAC,CAAAN,QAAA,kCAAaO,iBAAkB,CAAAA,iBAAA,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAAA,CACjE,CAAC,CAACtB,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,+BACfK,MACE,EAAA;QAAAc,QAAA,EAAA,CAAA,CAAC,CAAClB,QAAA,IAAA,eAAauB,UAAA,CAAAA,GAAA,CAAAlB,QAAA,EAAA;UAAUa,QAAS,EAAAlB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAAwB,UAAA,CAAAA,GAAA,CAAChB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbkB,QAAA,EAAAnB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
@@ -10,9 +10,25 @@ import CartIcon__default from "../../assets/cart.svg";
10
10
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
11
11
  "use strict";
12
12
  const ButtonStyled = styled(Button)`
13
- padding: 10px 15px;
14
- width: 40px;
15
- height: 40px;
13
+ ${({
14
+ label,
15
+ preLabel
16
+ }) => {
17
+ if (!!label && !!preLabel) {
18
+ return;
19
+ }
20
+ if (label) {
21
+ return css`
22
+ padding: 10px 15px;
23
+ height: 40px;
24
+ `;
25
+ }
26
+ return css`
27
+ padding: 10px 15px;
28
+ width: 40px;
29
+ height: 40px;
30
+ `;
31
+ }}
16
32
 
17
33
  ${({
18
34
  label
@@ -25,9 +41,27 @@ const ButtonInnerWrap = styled.div`
25
41
  align-items: center;
26
42
  gap: 8px;
27
43
  `;
44
+ const Labels = styled.div`
45
+ display: inline-flex;
46
+ flex-direction: column;
47
+ `;
48
+ const PreLabel = styled.span`
49
+ /* Size relative to regular label size, e.g if 14px label than 10px preLabel */
50
+ font-size: 0.714em;
51
+ line-height: 1.2;
52
+ font-weight: 400;
53
+ `;
54
+ const Label = styled.span`
55
+ ${({
56
+ $forceBold
57
+ }) => $forceBold ? css`
58
+ font-weight: bold;
59
+ ` : void 0};
60
+ `;
28
61
  const CartButton = function CartButton2({
29
62
  icon = "cart",
30
63
  hideIcon,
64
+ preLabel,
31
65
  label,
32
66
  ...props
33
67
  }) {
@@ -42,13 +76,19 @@ const CartButton = function CartButton2({
42
76
  return /* @__PURE__ */jsx(ButtonStyled, {
43
77
  ...props,
44
78
  label,
79
+ preLabel,
45
80
  children: /* @__PURE__ */jsxs(ButtonInnerWrap, {
46
81
  children: [!hideIcon && /* @__PURE__ */jsx(StyleableSvgImage, {
47
82
  src: Icon,
48
83
  width: 20,
49
84
  height: 16
50
- }), !!label && /* @__PURE__ */jsx("span", {
51
- children: label
85
+ }), (!!preLabel || !!label) && /* @__PURE__ */jsxs(Labels, {
86
+ children: [!!preLabel && /* @__PURE__ */jsx(PreLabel, {
87
+ children: preLabel
88
+ }), !!label && /* @__PURE__ */jsx(Label, {
89
+ $forceBold: !!preLabel,
90
+ children: label
91
+ })]
52
92
  })]
53
93
  })
54
94
  });
@@ -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 label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\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\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\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}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {!!label && <span>{label}</span>}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","css","ButtonInnerWrap","div","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;AAeA,MAAMA,YAAA,GAAeC,OAAOC,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAK9B,CAAC;EAAEC;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAC,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBJ,MAAO,CAAAK,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMlB,MAAAC,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAP,KAAA;EACA,GAAGQ;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,iBAAA;MAET,KAAK,MAAA;QACI,OAAAC,qBAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,0BACGT,YAAc,EAAA;IAAA,GAAGW,KAAO;IAAAR,KAAA;IACvBa,8BAACX,eACE,EAAA;MAAAW,QAAA,EAAA,CAAC,CAAAN,QAAA,uBAAaO,iBAAkB,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAClE,CAAC,CAACjB,KAAS,IAAA,eAAAkB,GAAA,CAAC;QAAML,QAAM,EAAAb;OAAA,CAAA;IAC3B,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"CartButton.mjs","sources":["../../../src/components/Button/CartButton.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport CartIcon from \"../../assets/icons/cart.svg\";\nimport CartPlusIcon from \"../../assets/icons/cartPlus.svg\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { Button } from \"./Button\";\nimport type { ButtonProps } from \"./Button.types\";\n\nexport interface CartButtonProps extends ButtonProps {\n icon?: \"cart\" | \"plus\";\n hideIcon?: boolean;\n /**\n * (optional) Mini-Text to display before the label, used for additional context. See example for more details\n * @example\n * preLabel=\"Available again week of\"\n * label=\"Oct. 10\"\n */\n preLabel?: string;\n /**\n * (optional) Label to display on the button. If not provided, only the icon will be displayed\n */\n label?: string;\n}\n\nconst ButtonStyled = styled(Button)<CartButtonProps>`\n ${({ label, preLabel }) => {\n // If both label and preLabel don't force any sizing;\n if (!!label && !!preLabel) {\n return;\n }\n\n /**\n * For historical reasons, we have to set a fixed height and padding for button. I get the height to match the\n * design but the padding is way bigger than it can be, would make sense to just vertically align content.\n * FIXME: investigate if we can remove padding and just vertically align content\n */\n if (label) {\n return css`\n padding: 10px 15px;\n height: 40px;\n `;\n }\n\n // And otherwise rendering just icon force both width and height to be 40px\n return css`\n padding: 10px 15px;\n width: 40px;\n height: 40px;\n `;\n }}\n\n ${({ label }) =>\n !!label &&\n css`\n width: auto;\n `}\n`;\n\nconst ButtonInnerWrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nconst Labels = styled.div`\n display: inline-flex;\n flex-direction: column;\n`;\n\nconst PreLabel = styled.span`\n /* Size relative to regular label size, e.g if 14px label than 10px preLabel */\n font-size: 0.714em;\n line-height: 1.2;\n font-weight: 400;\n`;\n\nconst Label = styled.span<{ $forceBold?: boolean }>`\n ${({ $forceBold }) =>\n $forceBold\n ? css`\n font-weight: bold;\n `\n : undefined};\n`;\n\nexport const CartButton = function CartButton({\n icon = \"cart\",\n hideIcon,\n preLabel,\n label,\n ...props\n}: CartButtonProps) {\n const Icon = useMemo(() => {\n switch (icon) {\n case \"cart\":\n return CartIcon;\n\n case \"plus\":\n return CartPlusIcon;\n }\n }, [icon]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ButtonStyled {...props} label={label} preLabel={preLabel}>\n <ButtonInnerWrap>\n {!hideIcon && <StyleableSvgImage src={Icon} width={20} height={16} />}\n {(!!preLabel || !!label) && (\n <Labels>\n {!!preLabel && <PreLabel>{preLabel}</PreLabel>}\n {!!label && (\n <Label\n // Enforce bold label if preLabel is present as per design, preLabel is always regular weight\n $forceBold={!!preLabel}\n >\n {label}\n </Label>\n )}\n </Labels>\n )}\n </ButtonInnerWrap>\n </ButtonStyled>\n );\n};\n"],"names":["ButtonStyled","styled","Button","label","preLabel","css","ButtonInnerWrap","div","Labels","PreLabel","span","Label","$forceBold","CartButton","CartButton2","icon","hideIcon","props","Icon","useMemo","CartIcon","CartPlusIcon","children","StyleableSvgImage","src","width","height","jsx"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,YAAA,GAAeC,OAAOC,MAAM,CAAA;AAAA,IAC9B,CAAC;EAAEC,KAAO;EAAAC;CAAe,KAAA;EAEzB,IAAI,CAAC,CAACD,KAAS,IAAA,CAAC,CAACC,QAAU,EAAA;IACzB;EACF;EAOA,IAAID,KAAO,EAAA;IACF,OAAAE,GAAA;AAAA;AAAA;AAAA,OAAA;EAIT;EAGO,OAAAA,GAAA;AAAA;AAAA;AAAA;AAAA,KAAA;AAKT,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEF;AAAA,CACH,KAAA,CAAC,CAACA,KACF,IAAAE,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGL,MAAMC,kBAAkBL,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM/B,MAAMC,SAASP,MAAO,CAAAM,GAAA;AAAA;AAAA;AAAA,CAAA;AAKtB,MAAME,WAAWR,MAAO,CAAAS,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOxB,MAAMC,QAAQV,MAAO,CAAAS,IAAA;AAAA,IACjB,CAAC;EAAEE;CAAW,KACdA,UACI,GAAAP,GAAA;AAAA;AAAA,SAAA,GAGA,KAAS,CAAA;AAAA,CAAA;AAGJ,MAAAQ,UAAA,GAAa,SAASA,WAAWC,CAAA;EAC5CC,IAAO,GAAA,MAAA;EACPC,QAAA;EACAZ,QAAA;EACAD,KAAA;EACA,GAAGc;AACL,CAAoB,EAAA;EACZ,MAAAC,IAAA,GAAOC,QAAQ,MAAM;IACzB,QAAQJ,IAAM;MACZ,KAAK,MAAA;QACI,OAAAK,iBAAA;MAET,KAAK,MAAA;QACI,OAAAC,qBAAA;IACX;EAAA,CACF,EAAG,CAACN,IAAI,CAAC,CAAA;EAKT,OAAA,mBACGf,YAAc,EAAA;IAAA,GAAGiB;IAAOd,KAAc;IAAAC,QAAA;IACrCkB,8BAAChB,eACE,EAAA;MAAAgB,QAAA,EAAA,CAAC,CAAAN,QAAA,uBAAaO,iBAAkB,EAAA;QAAAC,GAAA,EAAKN;QAAMO,KAAO,EAAA,EAAA;QAAIC,QAAQ;OAAI,CAAA,EAAA,CACjE,CAAC,CAACtB,QAAA,IAAY,CAAC,CAACD,KAAA,KAAA,oBACfK,MACE,EAAA;QAAAc,QAAA,EAAA,CAAA,CAAC,CAAClB,QAAA,IAAA,eAAauB,GAAA,CAAAlB,QAAA,EAAA;UAAUa,QAAS,EAAAlB;SAAA,CAAA,EAClC,CAAC,CAACD,KACD,IAAA,eAAAwB,GAAA,CAAChB,KAAA,EAAA;UAECC,UAAA,EAAY,CAAC,CAACR,QAAA;UAEbkB,QAAA,EAAAnB;QAAA,CACH,CAAA;OAEJ,CAAA;IAEJ,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
@@ -12,7 +12,7 @@ require('../StyleableSvgImage/index.js');
12
12
  var CustomImage_styles = require('./CustomImage.styles.js');
13
13
  var FallbackImageIcon = require("../../assets/fallbackImage.svg");
14
14
  var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
15
- var CloseIcon = require("../../assets/close2.svg");
15
+ var CloseIcon = require("../../assets/close.svg");
16
16
  var ZoomInIcon = require("../../assets/zoom-in.svg");
17
17
  function _interopDefault(e) {
18
18
  return e && e.__esModule ? e : {
@@ -10,7 +10,7 @@ import '../StyleableSvgImage/index.mjs';
10
10
  import { ImageWrapOuter, ImageWrap, FallbackImageWrap, ImageSkeletonLoader, FullscreenImageWrap, FullscreenCloseButton, FullscreenButton, ZoomIcon } from './CustomImage.styles.mjs';
11
11
  import FallbackImageIcon__default from "../../assets/fallbackImage.svg";
12
12
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
13
- import CloseIcon__default from "../../assets/close2.svg";
13
+ import CloseIcon__default from "../../assets/close.svg";
14
14
  import ZoomInIcon__default from "../../assets/zoom-in.svg";
15
15
  "use strict";
16
16
  const isNextImageLoading = imageEl => {
@@ -14,7 +14,7 @@ var FeaturesSection_styles = require('./FeaturesSection.styles.js');
14
14
  var useLockBodyScrollCustom = require('../../hooks/useLockBodyScrollCustom.js');
15
15
  var Container = require('../Container/Container.js');
16
16
  var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
17
- var CloseSvg = require("../../assets/close.svg");
17
+ var CloseSvg = require("../../assets/close2.svg");
18
18
  function _interopDefault(e) {
19
19
  return e && e.__esModule ? e : {
20
20
  default: e
@@ -12,7 +12,7 @@ import { WrapOuter, OverlayWrap, OverlayClose, Wrap, MetaWrap, SubHeading, Headi
12
12
  import { useLockBodyScrollCustom } from '../../hooks/useLockBodyScrollCustom.mjs';
13
13
  import { Container } from '../Container/Container.mjs';
14
14
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
15
- import CloseSvg__default from "../../assets/close.svg";
15
+ import CloseSvg__default from "../../assets/close2.svg";
16
16
  "use strict";
17
17
  const FEATURES_DEFAULT_PLAYBACK = 500;
18
18
  const parseTime = time => parseFloat(time.toFixed(3));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var CloseSvg = require("../../../assets/close.svg");
6
+ var CloseSvg = require("../../../assets/close2.svg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
@@ -1,3 +1,3 @@
1
- export * from "../../../assets/close.svg";
2
- export { default } from "../../../assets/close.svg";
1
+ export * from "../../../assets/close2.svg";
2
+ export { default } from "../../../assets/close2.svg";
3
3
  //# sourceMappingURL=close.svg.mjs.map
@@ -8,7 +8,7 @@ var Header_styles = require('../../Header/Header.styles.js');
8
8
  require('../../StyleableSvgImage/index.js');
9
9
  var GridModal_styles = require('./GridModal.styles.js');
10
10
  var StyleableSvgImage = require('../../StyleableSvgImage/StyleableSvgImage.js');
11
- var CloseIcon = require("../../../assets/close2.svg");
11
+ var CloseIcon = require("../../../assets/close.svg");
12
12
  function _interopDefault(e) {
13
13
  return e && e.__esModule ? e : {
14
14
  default: e
@@ -6,7 +6,7 @@ import { HEADER_HEIGHT } from '../../Header/Header.styles.mjs';
6
6
  import '../../StyleableSvgImage/index.mjs';
7
7
  import { Wrap, Container, CloseButton, Video } from './GridModal.styles.mjs';
8
8
  import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
9
- import CloseIcon__default from "../../../assets/close2.svg";
9
+ import CloseIcon__default from "../../../assets/close.svg";
10
10
  "use strict";
11
11
  const GridModal = function CartModal({
12
12
  open,
@@ -9,7 +9,7 @@ var CartModal_styles = require('./CartModal.styles.js');
9
9
  require('./Item/index.js');
10
10
  var StyleableSvgImage = require('../../StyleableSvgImage/StyleableSvgImage.js');
11
11
  var CartIcon = require("../../../assets/cart.svg");
12
- var CloseIcon = require("../../../assets/close2.svg");
12
+ var CloseIcon = require("../../../assets/close.svg");
13
13
  var Item = require('./Item/Item.js');
14
14
  function _interopDefault(e) {
15
15
  return e && e.__esModule ? e : {
@@ -7,7 +7,7 @@ import { Wrap, Container, ContainerInner, Section, SectionHeader, SectionTitle,
7
7
  import './Item/index.mjs';
8
8
  import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
9
9
  import CartIcon__default from "../../../assets/cart.svg";
10
- import CloseIcon__default from "../../../assets/close2.svg";
10
+ import CloseIcon__default from "../../../assets/close.svg";
11
11
  import { CartModalItem } from './Item/Item.mjs';
12
12
  "use strict";
13
13
  const CartModal = function CartModal2({
@@ -5,7 +5,7 @@ export declare const ProductMeta: import("styled-components").StyledComponent<"d
5
5
  export declare const ProductTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
6
  export declare const ProductPrice: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
7
  export declare const ProductPriceSmall: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const CartButton: import("styled-components").StyledComponent<({ icon, hideIcon, label, ...props }: import("../../../Button").CartButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const CartButton: import("styled-components").StyledComponent<({ icon, hideIcon, preLabel, label, ...props }: import("../../../Button").CartButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
9
9
  export declare const ControlsWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
10
  export declare const ControlsButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
11
11
  $loading?: boolean;
@@ -35,7 +35,7 @@ var unifi = require('../../constants/proStoreCategories/mapping/unifi.js');
35
35
  var uisp = require('../../constants/proStoreCategories/mapping/uisp.js');
36
36
  var _externalAssets_CtJIOg_A = require("../../assets/account.svg");
37
37
  var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
38
- var CloseIcon = require("../../assets/close2.svg");
38
+ var CloseIcon = require("../../assets/close.svg");
39
39
  var _externalAssets_CzDCu21b = require("../../assets/hamburger.svg");
40
40
  var _externalAssets_BPYvPCPi = require("../../assets/logo.svg");
41
41
  var _externalAssets_TKrekyEi = require("../../assets/logoUisp.svg");
@@ -33,7 +33,7 @@ import { UniFiCategorySlug } from '../../constants/proStoreCategories/mapping/un
33
33
  import { UISPCategorySlug } from '../../constants/proStoreCategories/mapping/uisp.mjs';
34
34
  import _externalAssets_CtJIOg_A__default from "../../assets/account.svg";
35
35
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
36
- import CloseIcon__default from "../../assets/close2.svg";
36
+ import CloseIcon__default from "../../assets/close.svg";
37
37
  import _externalAssets_CzDCu21b__default from "../../assets/hamburger.svg";
38
38
  import _externalAssets_BPYvPCPi__default from "../../assets/logo.svg";
39
39
  import _externalAssets_TKrekyEi__default from "../../assets/logoUisp.svg";
@@ -18,7 +18,7 @@ require('../StyleableSvgImage/index.js');
18
18
  var LandingPageSidebar_styles = require('./LandingPageSidebar.styles.js');
19
19
  var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
20
20
  var _externalAssets_CwVZcmz1 = require("../../assets/filter.svg");
21
- var CloseIcon = require("../../assets/close2.svg");
21
+ var CloseIcon = require("../../assets/close.svg");
22
22
  var Accordion = require('../Accordion/Accordion.js');
23
23
  var context = require('../../contexts/MenuContext/context.js');
24
24
  var ProductSectionTabs = require('../ProductSectionTabs/ProductSectionTabs.js');
@@ -16,7 +16,7 @@ import '../StyleableSvgImage/index.mjs';
16
16
  import { SidebarContainer, SidebarMenuButton, SidebarBox, SidebarMenuCloseButton, SidebarBottomButton, SidebarItemContent, SidebarItemBasic, SidebarItemHeader, SidebarTitle, ProductLine, SidebarFeaturesItem, SidebarHeaderButton, CheckboxText, CheckBoxIcon, SidebarLoaderContainer, SidebarLoaderItem, SidebarLoaderItemMain } from './LandingPageSidebar.styles.mjs';
17
17
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
18
18
  import _externalAssets_CwVZcmz1__default from "../../assets/filter.svg";
19
- import CloseIcon__default from "../../assets/close2.svg";
19
+ import CloseIcon__default from "../../assets/close.svg";
20
20
  import { Accordion } from '../Accordion/Accordion.mjs';
21
21
  import { useMenu } from '../../contexts/MenuContext/context.mjs';
22
22
  import { ProductSectionTabs } from '../ProductSectionTabs/ProductSectionTabs.mjs';