@lanaco/lnc-react-ui 4.0.99 → 4.0.101

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 (240) hide show
  1. package/dist/Accordion.cjs +1 -1
  2. package/dist/Accordion.js +1 -1
  3. package/dist/AccordionSummary.cjs +1 -1
  4. package/dist/AccordionSummary.js +1 -1
  5. package/dist/ActionsToolbar.cjs +1 -1
  6. package/dist/ActionsToolbar.js +1 -1
  7. package/dist/Alert.cjs +1 -1
  8. package/dist/Alert.js +1 -1
  9. package/dist/Avatar.cjs +1 -1
  10. package/dist/Avatar.js +1 -1
  11. package/dist/Badge.cjs +1 -1
  12. package/dist/Badge.js +1 -1
  13. package/dist/BannerSectionCarousel.cjs +1 -1
  14. package/dist/BannerSectionCarousel.js +1 -1
  15. package/dist/BannerSectionWithList.cjs +1 -1
  16. package/dist/BannerSectionWithList.js +1 -1
  17. package/dist/BlogCardsSponsoredSection.cjs +1 -1
  18. package/dist/BlogCardsSponsoredSection.js +3 -3
  19. package/dist/BlogCategoryCardsSection.cjs +1 -1
  20. package/dist/BlogCategoryCardsSection.js +1 -1
  21. package/dist/BlogListSection.cjs +1 -1
  22. package/dist/BlogListSection.js +3 -3
  23. package/dist/BlogProductCardsSection.cjs +1 -1
  24. package/dist/BlogProductCardsSection.js +2 -2
  25. package/dist/BlogShopCardsSection.cjs +1 -1
  26. package/dist/BlogShopCardsSection.js +1 -1
  27. package/dist/BlogSingleSection.cjs +1 -1
  28. package/dist/BlogSingleSection.js +2 -2
  29. package/dist/BlogsSectionDetailed.cjs +1 -1
  30. package/dist/BlogsSectionDetailed.js +3 -3
  31. package/dist/BlogsSectionLarge.cjs +1 -1
  32. package/dist/BlogsSectionLarge.js +2 -2
  33. package/dist/BlogsSectionSimple.cjs +1 -1
  34. package/dist/BlogsSectionSimple.js +3 -3
  35. package/dist/BlogsSectionSimpleCentered.cjs +1 -1
  36. package/dist/BlogsSectionSimpleCentered.js +2 -2
  37. package/dist/BlogsSectionWithFilters.cjs +1 -1
  38. package/dist/BlogsSectionWithFilters.js +4 -4
  39. package/dist/BrandHitsSection.cjs +1 -1
  40. package/dist/BrandHitsSection.js +1 -1
  41. package/dist/Breadcrumbs.cjs +1 -1
  42. package/dist/Breadcrumbs.js +1 -1
  43. package/dist/Button.cjs +8 -8
  44. package/dist/Button.js +98 -97
  45. package/dist/ButtonGroup.cjs +1 -1
  46. package/dist/ButtonGroup.js +1 -1
  47. package/dist/CalorieCalculatorSection.cjs +1 -1
  48. package/dist/CalorieCalculatorSection.js +1 -1
  49. package/dist/CheckBoxInput.cjs +1 -1
  50. package/dist/CheckBoxInput.js +1 -1
  51. package/dist/Chip.cjs +1 -1
  52. package/dist/Chip.js +1 -1
  53. package/dist/ColorInput.cjs +1 -1
  54. package/dist/ColorInput.js +1 -1
  55. package/dist/ConfirmationForm.cjs +1 -1
  56. package/dist/ConfirmationForm.js +1 -1
  57. package/dist/CustomLoanMapSection.cjs +1 -1
  58. package/dist/CustomLoanMapSection.js +1 -1
  59. package/dist/{CustomStyles-9CHBrzIM.js → CustomStyles-DYULk9y7.js} +1 -1
  60. package/dist/{CustomStyles-BoYYyJVV.cjs → CustomStyles-Uqkz9jDo.cjs} +1 -1
  61. package/dist/DateInput.cjs +1 -1
  62. package/dist/DateInput.js +1 -1
  63. package/dist/DecimalInput.cjs +1 -1
  64. package/dist/DecimalInput.js +1 -1
  65. package/dist/DecimalInputV2.cjs +1 -1
  66. package/dist/DecimalInputV2.js +1 -1
  67. package/dist/DetailedProductsSection.cjs +1 -1
  68. package/dist/DetailedProductsSection.js +4 -4
  69. package/dist/DetailsView.cjs +1 -1
  70. package/dist/DetailsView.js +1 -1
  71. package/dist/DoubleRangeSlider.cjs +1 -1
  72. package/dist/DoubleRangeSlider.js +1 -1
  73. package/dist/DragAndDropFile.cjs +1 -1
  74. package/dist/DragAndDropFile.js +1 -1
  75. package/dist/DragDropFiles.cjs +1 -1
  76. package/dist/DragDropFiles.js +1 -1
  77. package/dist/Drawer.cjs +1 -1
  78. package/dist/Drawer.js +1 -1
  79. package/dist/Dropdown.cjs +1 -1
  80. package/dist/Dropdown.js +2 -2
  81. package/dist/DropdownItem.cjs +1 -1
  82. package/dist/DropdownItem.js +1 -1
  83. package/dist/DropdownLookup.cjs +1 -1
  84. package/dist/DropdownLookup.js +1 -1
  85. package/dist/DropdownMenu.cjs +1 -1
  86. package/dist/DropdownMenu.js +1 -1
  87. package/dist/EditableTable.cjs +1 -1
  88. package/dist/EditableTable.js +1 -1
  89. package/dist/FeedbackSection.cjs +1 -1
  90. package/dist/FeedbackSection.js +1 -1
  91. package/dist/FieldOfInterestsMasonrySection.cjs +1 -1
  92. package/dist/FieldOfInterestsMasonrySection.js +1 -1
  93. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
  94. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +2 -2
  95. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -1
  96. package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -1
  97. package/dist/FileInput.cjs +1 -1
  98. package/dist/FileInput.js +1 -1
  99. package/dist/FlexGridItem.cjs +1 -1
  100. package/dist/FlexGridItem.js +1 -1
  101. package/dist/FormField.cjs +1 -1
  102. package/dist/FormField.js +1 -1
  103. package/dist/FormView.cjs +1 -1
  104. package/dist/FormView.js +1 -1
  105. package/dist/GeneralWithTagsCardsSection.cjs +1 -1
  106. package/dist/GeneralWithTagsCardsSection.js +1 -1
  107. package/dist/GiftCardsSection.cjs +1 -1
  108. package/dist/GiftCardsSection.js +2 -2
  109. package/dist/Icon.cjs +1 -1
  110. package/dist/Icon.js +1 -1
  111. package/dist/IconButton.cjs +1 -1
  112. package/dist/IconButton.js +1 -1
  113. package/dist/Kanban.cjs +1 -1
  114. package/dist/Kanban.js +1 -1
  115. package/dist/KanbanActionsToolbar.cjs +1 -1
  116. package/dist/KanbanActionsToolbar.js +1 -1
  117. package/dist/KanbanView.cjs +1 -1
  118. package/dist/KanbanView.js +1 -1
  119. package/dist/Link.cjs +1 -1
  120. package/dist/Link.js +1 -1
  121. package/dist/LoanCalculatorSection.cjs +1 -1
  122. package/dist/LoanCalculatorSection.js +1 -1
  123. package/dist/LocationFinderSection.cjs +1 -1
  124. package/dist/LocationFinderSection.js +1 -1
  125. package/dist/LocationSearchSection.cjs +1 -1
  126. package/dist/LocationSearchSection.js +1 -1
  127. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  128. package/dist/MasonryGeneralCardsSection.js +1 -1
  129. package/dist/MenuItem.cjs +1 -1
  130. package/dist/MenuItem.js +1 -1
  131. package/dist/Modal.cjs +1 -1
  132. package/dist/Modal.js +1 -1
  133. package/dist/MultiSelectDropdown.cjs +1 -1
  134. package/dist/MultiSelectDropdown.js +1 -1
  135. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  136. package/dist/MultiSelectDropdownLookup.js +1 -1
  137. package/dist/NestedDropdownItem.cjs +1 -1
  138. package/dist/NestedDropdownItem.js +1 -1
  139. package/dist/NestedMenuItem.cjs +1 -1
  140. package/dist/NestedMenuItem.js +1 -1
  141. package/dist/NotificationContainer.cjs +1 -1
  142. package/dist/NotificationContainer.js +1 -1
  143. package/dist/NotificationMessage.cjs +1 -1
  144. package/dist/NotificationMessage.js +1 -1
  145. package/dist/NumberInput.cjs +1 -1
  146. package/dist/NumberInput.js +1 -1
  147. package/dist/OverlayGeneralCardsSection.cjs +1 -1
  148. package/dist/OverlayGeneralCardsSection.js +2 -2
  149. package/dist/PasswordInput.cjs +1 -1
  150. package/dist/PasswordInput.js +1 -1
  151. package/dist/PopoverContent.cjs +1 -1
  152. package/dist/PopoverContent.js +1 -1
  153. package/dist/ProductsWithBannerSection.cjs +1 -1
  154. package/dist/ProductsWithBannerSection.js +3 -3
  155. package/dist/ProgressBar.cjs +1 -1
  156. package/dist/ProgressBar.js +1 -1
  157. package/dist/QuattroCardsSection.cjs +1 -1
  158. package/dist/QuattroCardsSection.js +1 -1
  159. package/dist/QuizSection.cjs +1 -1
  160. package/dist/QuizSection.js +1 -1
  161. package/dist/RadioInput.cjs +1 -1
  162. package/dist/RadioInput.js +1 -1
  163. package/dist/RangeSlider.cjs +1 -1
  164. package/dist/RangeSlider.js +1 -1
  165. package/dist/ReviewsSection.cjs +1 -1
  166. package/dist/ReviewsSection.js +2 -2
  167. package/dist/SalesCampaignsSection.cjs +91 -164
  168. package/dist/SalesCampaignsSection.js +413 -657
  169. package/dist/Separator.cjs +1 -1
  170. package/dist/Separator.js +1 -1
  171. package/dist/ShopCardsSection.cjs +1 -1
  172. package/dist/ShopCardsSection.js +2 -2
  173. package/dist/Sidebar.cjs +1 -1
  174. package/dist/Sidebar.js +1 -1
  175. package/dist/SimpleCategoriesSection.cjs +1 -1
  176. package/dist/SimpleCategoriesSection.js +3 -3
  177. package/dist/SimpleProductsSection.cjs +1 -1
  178. package/dist/SimpleProductsSection.js +2 -2
  179. package/dist/Spinner.cjs +1 -1
  180. package/dist/Spinner.js +1 -1
  181. package/dist/Surface.cjs +1 -1
  182. package/dist/Surface.js +1 -1
  183. package/dist/SwipeableDrawer.cjs +1 -1
  184. package/dist/SwipeableDrawer.js +1 -1
  185. package/dist/TabItem.cjs +1 -1
  186. package/dist/TabItem.js +1 -1
  187. package/dist/Table.cjs +1 -1
  188. package/dist/Table.js +67 -67
  189. package/dist/TableView.cjs +1 -1
  190. package/dist/TableView.js +1 -1
  191. package/dist/TextAreaInput.cjs +1 -1
  192. package/dist/TextAreaInput.js +1 -1
  193. package/dist/TextInput.cjs +1 -1
  194. package/dist/TextInput.js +1 -1
  195. package/dist/ThemeProvider.cjs +1 -1
  196. package/dist/ThemeProvider.js +1 -1
  197. package/dist/TimeInput.cjs +1 -1
  198. package/dist/TimeInput.js +1 -1
  199. package/dist/Toggle.cjs +1 -1
  200. package/dist/Toggle.js +1 -1
  201. package/dist/TreeMenuSeparator.cjs +1 -1
  202. package/dist/TreeMenuSeparator.js +1 -1
  203. package/dist/UploadedFile.cjs +1 -1
  204. package/dist/UploadedFile.js +1 -1
  205. package/dist/UrgentSaleProductsSection.cjs +1 -1
  206. package/dist/UrgentSaleProductsSection.js +1 -1
  207. package/dist/index-BPgWhA1t.js +384 -0
  208. package/dist/{index-XrPpEvxt.cjs → index-BRgZcjpI.cjs} +1 -1
  209. package/dist/{index-DyMv0g-E.cjs → index-C4gGt12B.cjs} +1 -1
  210. package/dist/index-C_T-BQ5p.cjs +98 -0
  211. package/dist/{index-yrKiIPH4.js → index-Cru8Sd2q.js} +2 -2
  212. package/dist/{index-DQyZFR-C.js → index-D86vS9UF.js} +1 -1
  213. package/dist/{index-DkzN10w_.cjs → index-DMysapsB.cjs} +1 -1
  214. package/dist/{index-C1a0CtEE.cjs → index-DZDz9qZP.cjs} +1 -1
  215. package/dist/{index-DtlD7gBK.js → index-Dcw6ecHw.js} +2 -2
  216. package/dist/{index-4fcFA8kU.js → index-Kx8irvHH.js} +1 -1
  217. package/dist/index.cjs +1 -1
  218. package/dist/index.js +1 -1
  219. package/dist/{skeleton-DdxUz868.cjs → skeleton-BcaMeKFQ.cjs} +1 -1
  220. package/dist/{skeleton-DLOaT8ip.js → skeleton-BrUEdt6Z.js} +2 -2
  221. package/dist/{skeleton-C2HxO51q.cjs → skeleton-DwZzdFei.cjs} +1 -1
  222. package/dist/{skeleton-BSnQLxpv.js → skeleton-TrselJrj.js} +1 -1
  223. package/dist/{style-Ce-JyTaX.cjs → style-Bjk6yHcP.cjs} +1 -1
  224. package/dist/{style-DU0BlP5D.js → style-LEmcTrN9.js} +1 -1
  225. package/dist/{suspense-categories-card-simple-CkULM0Bi.cjs → suspense-categories-card-simple-B2swGa6t.cjs} +1 -1
  226. package/dist/{suspense-categories-card-simple-BKWKpuwr.js → suspense-categories-card-simple-BCn3U1cz.js} +1 -1
  227. package/dist/{suspense-large-ZUb9b6MG.cjs → suspense-large-DMhn-lIG.cjs} +1 -1
  228. package/dist/{suspense-large-C-YSgzDe.js → suspense-large-DgzTM-qh.js} +1 -1
  229. package/dist/{suspense-product-card-detailed-Bez9UFMR.js → suspense-product-card-detailed-BDkww9pS.js} +2 -2
  230. package/dist/{suspense-product-card-detailed-Yjo62f1v.cjs → suspense-product-card-detailed-BNOhu3Z4.cjs} +1 -1
  231. package/dist/{suspense-product-card-simple-CVbhvQWo.cjs → suspense-product-card-simple-BxDjW7gR.cjs} +1 -1
  232. package/dist/{suspense-product-card-simple-DF6bMLDk.js → suspense-product-card-simple-CQ1qPZOa.js} +1 -1
  233. package/dist/utils-BWzf4vLl.cjs +51 -0
  234. package/dist/{utils-WHYrEnYF.js → utils-BXCGNjIy.js} +52 -65
  235. package/package.json +1 -1
  236. package/dist/index-BKeVVABC.js +0 -345
  237. package/dist/index-CHDRU86t.cjs +0 -4
  238. package/dist/index-Ce6e4efi.cjs +0 -95
  239. package/dist/index-Dhf4jQmS.js +0 -47
  240. package/dist/utils-BOtq2mcF.cjs +0 -51
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),i=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./utils-BOtq2mcF.cjs"),B=require("./consts-goSZX3xP.cjs"),re=require("./motion-B_VPZaJq.cjs"),n=require("./index-BPVoEhTF.cjs"),te=require("./Icon.cjs"),oe=require("./Badge.cjs"),z=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),Y=require("./useDetectMobile-zkbzoOGV.cjs"),ne=require("./FlexBox.cjs"),H=require("./index-CHDRU86t.cjs"),O=require("./IconButton.cjs");var ie=function(e){return e===void 0&&(e={laptopL:1440,laptop:1024,tablet:768}),function(){var o=i.useState(v.isBrowser?window.innerWidth:0),a=o[0],l=o[1];i.useEffect(function(){var s=function(){l(window.innerWidth)};return s(),v.on(window,"resize",s),function(){v.off(window,"resize",s)}});var f=i.useMemo(function(){return Object.entries(e).sort(function(s,g){return s[1]>=g[1]?1:-1})},[e]),c=f.reduce(function(s,g){var b=g[0],m=g[1];return a>=m?b:s},f[0][0]);return c}};const se=w.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),p=require("react"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),b=require("./utils-BWzf4vLl.cjs"),C=require("./consts-goSZX3xP.cjs"),L=require("./motion-B_VPZaJq.cjs"),o=require("./index-BPVoEhTF.cjs"),W=require("./Icon.cjs"),Q=require("./Badge.cjs"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),M=require("./IconButton.cjs"),V=require("./useDetectMobile-zkbzoOGV.cjs"),Y=d.styled.div`
2
2
  cursor: pointer;
3
3
  display: flex;
4
4
  gap: 1rem;
@@ -6,15 +6,15 @@
6
6
  border-radius: 20px;
7
7
  border: 1px solid var(--gray-95008, #14161a14);
8
8
 
9
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
9
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
10
10
  flex-direction: column;
11
11
  padding: 0;
12
12
  gap: 0;
13
13
  border: none;
14
14
  border-radius: 0;
15
15
  }
16
- `,ae=w.styled.div`
17
- border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"edged")};
16
+ `,ee=d.styled.div`
17
+ border-radius: ${e=>b.getBorderRadiusValueWithUnits(e.theme,"edged")};
18
18
  height: 15rem;
19
19
  width: 15rem;
20
20
  min-width: 15rem;
@@ -37,12 +37,12 @@
37
37
  }
38
38
  }
39
39
 
40
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
40
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
41
41
  width: 100%;
42
42
  max-width: 100dvh;
43
43
  height: 23.438rem;
44
44
  }
45
- `,le=w.styled.div`
45
+ `,re=d.styled.div`
46
46
  flex: 1;
47
47
  display: flex;
48
48
  flex-direction: column;
@@ -91,7 +91,7 @@
91
91
  background-color: transparent;
92
92
  }
93
93
 
94
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
94
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
95
95
  padding: 1.25rem;
96
96
 
97
97
  & .campaign-title {
@@ -105,13 +105,13 @@
105
105
  gap: 0.25rem;
106
106
  }
107
107
  }
108
- `,ce={"#ADE3EB":"#76D0DB","#DDD6FE":"#C4B5FD","#FDE68A":"#FCD34D","#A7F3D0":"#6EE7B7","#BADFFF":"#87C6FA","#FECDD3":"#FDA4AF","#EFE2CF":"#EAD2AF","#DDDFE4":"#C4C8CF","#E7E5E4":"#D6D3D1","#FED7AA":"#FDBA74",default:"#C4C8CF"},Z=(e=!1,o=!1,a=!1)=>`
108
+ `,te={"#ADE3EB":"#76D0DB","#DDD6FE":"#C4B5FD","#FDE68A":"#FCD34D","#A7F3D0":"#6EE7B7","#BADFFF":"#87C6FA","#FECDD3":"#FDA4AF","#EFE2CF":"#EAD2AF","#DDDFE4":"#C4C8CF","#E7E5E4":"#D6D3D1","#FED7AA":"#FDBA74",default:"#C4C8CF"},U=(e=!1,a=!1,n=!1)=>`
109
109
  display: flex;
110
- ${o?"flex-wrap: wrap;":""}
111
- ${o?"":"flex-wrap: nowrap;"}
110
+ ${a?"flex-wrap: wrap;":""}
111
+ ${a?"":"flex-wrap: nowrap;"}
112
112
  ${e?"align-items: center;":""}
113
- ${a?"justify-content: center;":""}
114
- `,de=w.styled(re.motion.div)`
113
+ ${n?"justify-content: center;":""}
114
+ `,ae=d.styled(L.motion.div)`
115
115
  text-decoration: none;
116
116
  ${e=>e.hasPermission===!0&&"cursor: pointer"};
117
117
 
@@ -128,22 +128,22 @@
128
128
  text-decoration: none;
129
129
  }
130
130
 
131
- ${Z(!0)}
131
+ ${U(!0)}
132
132
  gap: 0.5rem;
133
133
  padding: 0.5rem;
134
134
  color: ${e=>e.isActive===!1?"var(--gray-900)":"var(--primary-600)"};
135
135
  font-weight: 500;
136
136
  font-size: 0.875rem;
137
137
  line-height: 1.25rem;
138
- border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"slight")};
138
+ border-radius: ${e=>b.getBorderRadiusValueWithUnits(e.theme,"slight")};
139
139
  transition: all 0.25s ease;
140
140
 
141
141
  & .logo-wrapper {
142
- ${Z(!0,!1,!0)}
142
+ ${U(!0,!1,!0)}
143
143
  flex-shrink: 0;
144
144
  border-radius: 999px;
145
145
  border: 3px solid
146
- ${e=>e.isActive===!1?"var(--gray-300, #c4c8cf)":ce[e.themeColor]??"var(--gray-300, #c4c8cf)"};
146
+ ${e=>e.isActive===!1?"var(--gray-300, #c4c8cf)":te[e.themeColor]??"var(--gray-300, #c4c8cf)"};
147
147
 
148
148
  & img,
149
149
  .img-placeholder {
@@ -185,15 +185,15 @@
185
185
  background-color: var(--gray-95080, #14161acc);
186
186
  color: var(--gray-600, #676e79);
187
187
  }
188
- `,he=w.styled.div`
188
+ `,se=d.styled.div`
189
189
  position: absolute;
190
190
  top: 0.5rem;
191
191
  ${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
192
192
  display: flex;
193
193
  gap: 0.25rem;
194
- `,ge=e=>`var(--${e}-700)`,ue=w.styled.div`
195
- border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
196
- background-color: ${e=>ge(e==null?void 0:e.color)};
194
+ `,oe=e=>`var(--${e}-700)`,ne=d.styled.div`
195
+ border-radius: ${e=>b.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
196
+ background-color: ${e=>oe(e==null?void 0:e.color)};
197
197
  color: white;
198
198
  height: 1.5rem;
199
199
  min-width: 1.5rem;
@@ -207,140 +207,7 @@
207
207
  & i {
208
208
  font-size: 0.813rem;
209
209
  }
210
- `,J=e=>{const{uuid:o,hasPermission:a=!0,isUser:l,image:f,name:c,notifications:s=0,color:g="primary",size:b="large",style:m,disabled:$,onClick:d=()=>{},isActive:j,className:x,themeData:y}=e,D={theme:z.useTheme(),color:g,size:b,style:m,disabled:$};return i.createElement(de,{onClick:T=>{T.stopPropagation(),a===!0&&(d==null||d())},...D,key:c,animate:{y:0,opacity:1},className:`profile-item ${x}`,exit:{opacity:0},hasPermission:a,initial:{y:-10,opacity:0},isActive:j,themeColor:(y==null?void 0:y.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:f}),t.jsx("div",{className:"name",children:c}),s>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(oe,{className:"badge",color:"danger",size:"small",children:s>99?"99+":s})}))};J.propTypes={id:n.PropTypes.any,isUserProfile:n.PropTypes.bool,themeColor:n.PropTypes.string,image:n.PropTypes.any,name:n.PropTypes.string,notifications:n.PropTypes.number,style:n.PropTypes.object,className:n.PropTypes.string,color:n.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:n.PropTypes.oneOf(["large"]),onSelect:n.PropTypes.func,hasPermission:n.PropTypes.bool};const G=(e,o)=>{if(!e||!o)return null;let a=Math.floor((e==null?void 0:e.getTime())-(o==null?void 0:o.getTime())),l=1e3*60*60*24;return Math.ceil(a/l)},K=i.forwardRef((e,o)=>{const a=z.useTheme(),{uuid:l,shopUuid:f,title:c="",description:s,badges:g,coverPhoto:b,onSelect:m,status:$,startDate:d,endDate:j,salesPackages:x,shopName:y,shopImage:u,className:D,onSelectCard:T=()=>{},onSelectShop:N=()=>{},campaignSingleText:F,salesCampaignTypes:S=[],startsInPrefixTextPlural:h,startsinSuffixTextPlural:E,startsInPrefixTextSingular:P,startsinSuffixTextSingular:r,themeData:_,...q}=e,M=d?new Date(d)<=new Date:!1;G(j?new Date(j):null,d?new Date(d):null);const p=G(d?new Date(d):null,new Date);return t.jsxs(se,{ref:o,theme:a,className:D,onClick:T,...q,children:[t.jsxs(ae,{theme:a,onClick:()=>m==null?void 0:m(),children:[t.jsx("img",{src:b}),t.jsx(he,{children:x==null?void 0:x.map((k,A)=>{var I,W;return t.jsx(ue,{color:(I=S==null?void 0:S.find(L=>L.value===k))==null?void 0:I.color,theme:a,children:t.jsx(te,{icon:(W=S==null?void 0:S.find(L=>L.value===k))==null?void 0:W.icon})},`package__${A}`)})})]}),t.jsxs(le,{theme:a,children:[t.jsxs("div",{className:"text-block-wrapper",children:[t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:F}),t.jsx("div",{className:"campaign-title-text",children:c}),t.jsx("div",{className:"timestamp-text",children:M?"":p===1?`${P} ${p} ${r}`:`${h} ${p} ${E}`})]}),t.jsx("div",{children:s})]}),t.jsx(J,{hasPermission:!0,image:t.jsx("img",{src:u,className:`${u?"":"no-image"}`}),themeData:_,isActive:!0,isUser:!1,name:y,onClick:()=>N(f)})]})]})});K.propTypes={title:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.element]),numberOfListings:n.PropTypes.number,dropdown:n.PropTypes.any,color:n.PropTypes.string};const pe=w.styled.div`
211
- display: flex;
212
- flex-direction: column;
213
- gap: 1.5rem;
214
- position: relative;
215
-
216
- & .hover-left-arrow {
217
- display: none;
218
- position: absolute;
219
- top: 50%;
220
- left: 1.5rem;
221
- z-index: ${e=>v.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
222
- }
223
-
224
- & .hover-right-arrow {
225
- display: none;
226
- position: absolute;
227
- top: 50%;
228
- right: 1.5rem;
229
- z-index: ${e=>v.isDefined(e.arrowsZIndex)?e.arrowsZIndex:20};
230
- }
231
-
232
- & .clip-loader-wrapper {
233
- margin: auto;
234
- padding: 0 1rem;
235
- }
236
-
237
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
238
- gap: 1.25rem;
239
- & .hover-left-arrow,
240
- .hover-right-arrow {
241
- display: flex;
242
- }
243
- }
244
- `,fe=w.styled.div`
245
- display: flex;
246
- align-items: center;
247
-
248
- justify-content: space-between;
249
- gap: 1rem;
250
-
251
- font-weight: 600;
252
- font-size: 1.5rem;
253
-
254
- & .btns-group {
255
- display: flex;
256
- gap: 0.375rem;
257
- }
258
-
259
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
260
- padding: 0 1rem;
261
- & .btns-group {
262
- display: none;
263
- }
264
- }
265
- `,me=w.styled.div`
266
- position: relative;
267
- padding: ${e=>e.padding};
268
-
269
- & button {
270
- white-space: nowrap;
271
- }
272
-
273
- & .badge-button {
274
- ${e=>e.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
275
- }
276
-
277
- & .gradient {
278
- position: absolute;
279
- top: 50%;
280
- transform: translate(0, -50%);
281
- z-index: 4;
282
- transition: ${"0.3s"};
283
- right: ${e=>e.noArrows!==!0?"6rem":"0"};
284
- width: 2rem;
285
- background: #fff;
286
- height: 100%;
287
- -webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
288
- mask-image: linear-gradient(to left, black 10%, transparent 50%);
289
- }
290
-
291
- & .scrollable-container {
292
- scroll-behavior: smooth;
293
- overflow: hidden;
294
- -webkit-overflow-scrolling: touch;
295
- ::-webkit-scrollbar {
296
- -webkit-appearance: none;
297
- }
298
- -ms-overflow-style: none;
299
- /* Internet Explorer 10+ */
300
- scrollbar-width: none;
301
- /* Firefox */
302
-
303
- &::-webkit-scrollbar {
304
- display: none;
305
- /* Safari and Chrome */
306
- }
307
- }
308
- & .scroll-arrow-right,
309
- & .scroll-arrow-left {
310
- position: absolute;
311
- top: 50%;
312
- transform: translate(0, -50%);
313
- display: flex;
314
- justify-content: center;
315
- align-items: center;
316
- cursor: pointer;
317
-
318
- visibility: ${e=>e.arrowsVisibleOnHover===!1&&e.hasOverflow?"visible":"hidden"};
319
- z-index: 4;
320
- transition: ${"0.3s"};
321
- }
322
- & .scroll-arrow-right {
323
- ${e=>e.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
324
- }
325
- & .scroll-arrow-left {
326
- ${e=>e.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
327
- }
328
- & .scrollable-container:hover > .scroll-arrow-left,
329
- & .scrollable-container:hover > .scroll-arrow-right {
330
- visibility: ${e=>e.hasOverflow?"visible":"hidden"};
331
- }
332
-
333
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
334
- & .scroll-arrow-left,
335
- & .scroll-arrow-right {
336
- display: none;
337
- }
338
-
339
- & .gradient {
340
- right: 0;
341
- }
342
- }
343
- `,xe=(e,o)=>{const[a,l]=i.useState({trigger:null,direction:null}),f=c=>c.touches||c.originalEvent.touches;return i.useEffect(()=>{const c=typeof e=="string"||e instanceof String?document.getElementById(e):e.current;let s=null,g=null;if(c){const b=$=>{const d=f($)[0];s=d.clientX,g=d.clientY},m=$=>{if(!s||!g)return;const d=$.touches[0].clientX,j=$.touches[0].clientY,x=s-d,y=g-j;Math.abs(x)>Math.abs(y)?x>0?l(u=>({trigger:!u.trigger,direction:R.LEFT})):l(u=>({trigger:!u.trigger,direction:R.RIGHT})):y>0?l(u=>({trigger:!u.trigger,direction:R.UP})):l(u=>({trigger:!u.trigger,direction:R.DOWN})),s=null,g=null};return c.addEventListener("touchstart",b),c.addEventListener("touchmove",m),()=>{c.removeEventListener("touchstart",b),c.addEventListener("touchmove",m)}}},[]),a},R={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"},Q=i.forwardRef(({title:e,columnGap:o="2rem",rowGap:a="1.25rem",scrollBySize:l=300,wrapForMobile:f=!1,wrap:c=!1,children:s,methodsRef:g,arrowsVisibleOnHover:b=!0,rightAlignArrows:m=!1,padding:$="0",showTimesBtn:d,noArrows:j,onShowEnd:x,arrowsZIndex:y,showArrows:u,elementsCount:D,minElementsCount:T=2,...N},F)=>{const S=Y.useDetectMobile(),h=z.useTheme(),[E,P]=i.useState(D<T),[r,_]=i.useState(!1),[q,M]=i.useState(!0),p=i.useRef(),k=xe(p);i.useEffect(()=>{(k==null?void 0:k.direction)===R.RIGHT&&r!==!0?I():(k==null?void 0:k.direction)===R.LEFT&&E!==!0&&A()},[k]);const A=()=>{var C;(C=p.current)==null||C.scrollBy(l,0)},I=()=>{var C;(C=p.current)==null||C.scrollBy(-l,0)},[W,L]=i.useState(!1);i.useEffect(()=>{var C,V;L(((C=p==null?void 0:p.current)==null?void 0:C.scrollWidth)>((V=p==null?void 0:p.current)==null?void 0:V.clientWidth))},[s]),i.useImperativeHandle(g,()=>({scrollToEnd(){ee()},scrollLeft(){I()},scrollRight(){A()}}));const ee=()=>{p.current.scrollLeft=p.current.scrollWidth};return t.jsxs(pe,{arrowsZIndex:y,children:[t.jsxs(fe,{children:[t.jsx("div",{children:e}),u&&t.jsxs("div",{className:"btns-group",children:[t.jsx(O,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:r,icon:"angle-left",onClick:I}),t.jsx(O,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:E,icon:"angle-right",onClick:A})]})]}),u&&t.jsxs(t.Fragment,{children:[t.jsx(O,{borderRadius:"curved",btnType:"tinted",className:"hover-left-arrow scroll-arrow-left",color:"neutral",disabled:r,icon:"angle-left",onClick:I}),t.jsx(O,{borderRadius:"curved",btnType:"tinted",className:"hover-right-arrow scroll-arrow-right",color:"neutral",disabled:E,icon:"angle-right",onClick:A})]}),t.jsx(me,{ref:F,arrowsVisibleOnHover:b,hasOverflow:W,noArrows:j,padding:$,rightAlignArrows:m,showTimesBtn:d,theme:h,...N,children:t.jsxs(ne,{ref:p,className:"scrollable-container",columnGap:o,rowGap:a,wrap:c||f&&S?"Wrap":"NoWrap",children:[t.jsx(H.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{r===!0&&_(!1)},onIsVisible:()=>{r===!1&&_(!0)}}),s,t.jsx(H.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{E===!0&&P(!1),M(!0)},onIsVisible:()=>{E===!1&&P(!0),M(!1),x==null||x()}}),q&&W&&t.jsx("div",{className:"gradient"})]})})]})});Q.propTypes={title:n.PropTypes.string,rowGap:n.PropTypes.string,columnGap:n.PropTypes.string,scrollBySize:n.PropTypes.number,wrapForMobile:n.PropTypes.bool,wrap:n.PropTypes.bool,methodsRef:n.PropTypes.any,arrowsVisibleOnHover:n.PropTypes.bool,rightAlignArrows:n.PropTypes.bool,padding:n.PropTypes.string};const we=w.styled.div`
210
+ `,X=e=>{const{uuid:a,hasPermission:n=!0,isUser:h,image:u,name:g,notifications:y=0,color:c="primary",size:v="large",style:i,disabled:D,onClick:l=()=>{},isActive:_,className:f,themeData:x}=e,$={theme:B.useTheme(),color:c,size:v,style:i,disabled:D};return p.createElement(ae,{onClick:j=>{j.stopPropagation(),n===!0&&(l==null||l())},...$,key:g,className:`profile-item ${f}`,hasPermission:n,isActive:_,themeColor:(x==null?void 0:x.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:u}),t.jsx("div",{className:"name",children:g}),y>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(Q,{className:"badge",color:"danger",size:"small",children:y>99?"99+":y})}))};X.propTypes={id:o.PropTypes.any,isUserProfile:o.PropTypes.bool,themeColor:o.PropTypes.string,image:o.PropTypes.any,name:o.PropTypes.string,notifications:o.PropTypes.number,style:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:o.PropTypes.oneOf(["large"]),onSelect:o.PropTypes.func,hasPermission:o.PropTypes.bool};const O=(e,a)=>{if(!e||!a)return null;let n=Math.floor((e==null?void 0:e.getTime())-(a==null?void 0:a.getTime())),h=1e3*60*60*24;return Math.ceil(n/h)},Z=p.forwardRef((e,a)=>{const n=B.useTheme(),{uuid:h,shopUuid:u,title:g="",description:y,badges:c,coverPhoto:v,onSelect:i,status:D,startDate:l,endDate:_,salesPackages:f,shopName:x,shopImage:w,className:$,onSelectCard:j=()=>{},onSelectShop:T=()=>{},campaignSingleText:P,salesCampaignTypes:r=[],startsInPrefixTextPlural:S,startsinSuffixTextPlural:k,startsInPrefixTextSingular:I,startsinSuffixTextSingular:s,themeData:m,...H}=e,J=l?new Date(l)<=new Date:!1;O(_?new Date(_):null,l?new Date(l):null);const N=O(l?new Date(l):null,new Date);return t.jsxs(Y,{ref:a,theme:n,className:$,onClick:j,...H,children:[t.jsxs(ee,{theme:n,onClick:()=>i==null?void 0:i(),children:[t.jsx("img",{src:v}),t.jsx(se,{children:f==null?void 0:f.map((z,K)=>{var R,A;return t.jsx(ne,{color:(R=r==null?void 0:r.find(F=>F.value===z))==null?void 0:R.color,theme:n,children:t.jsx(W,{icon:(A=r==null?void 0:r.find(F=>F.value===z))==null?void 0:A.icon})},`package__${K}`)})})]}),t.jsxs(re,{theme:n,children:[t.jsxs("div",{className:"text-block-wrapper",children:[t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:P}),t.jsx("div",{className:"campaign-title-text",children:g}),t.jsx("div",{className:"timestamp-text",children:J?"":N===1?`${I} ${N} ${s}`:`${S} ${N} ${k}`})]}),t.jsx("div",{children:y})]}),t.jsx(X,{hasPermission:!0,image:t.jsx("img",{src:w,className:`${w?"":"no-image"}`}),themeData:m,isActive:!0,isUser:!1,name:x,onClick:()=>T(u)})]})]})});Z.propTypes={title:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.element]),numberOfListings:o.PropTypes.number,dropdown:o.PropTypes.any,color:o.PropTypes.string};d.styled.div`
344
211
  display: flex;
345
212
  flex-direction: column;
346
213
  gap: 1.5rem;
@@ -371,26 +238,26 @@
371
238
  }
372
239
  }
373
240
 
374
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
241
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
375
242
  & .campaign-item {
376
243
  min-width: 100%;
377
244
  width: 100%;
378
245
  margin-right: 0;
379
246
  }
380
247
  }
381
- `,U=w.styled.div`
248
+ `;const E=d.styled.div`
382
249
  width: ${e=>e.width||"100%"};
383
250
  height: ${e=>(e.heightCoeff||1)*1.125}rem;
384
251
  background-color: var(--gray-200, #dddfe4);
385
252
 
386
- ${v.linearGradientAnimation("-90deg")}
387
- `,be=w.styled.div`
253
+ ${b.linearGradientAnimation("-90deg")}
254
+ `,ie=d.styled.div`
388
255
  display: flex;
389
256
  flex-direction: ${e=>e!=null&&e.row?"row":"column"};
390
257
  gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
391
258
  width: ${e=>(e==null?void 0:e.width)??"100%"};
392
- `,X=w.styled.div`
393
- border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
259
+ `,q=d.styled.div`
260
+ border-radius: ${e=>b.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
394
261
  background: var(--gray-200, #dddfe4);
395
262
  position: relative;
396
263
  max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
@@ -399,10 +266,10 @@
399
266
  width: ${e=>(e==null?void 0:e.width)??"5rem"};
400
267
  flex-shrink: 0;
401
268
 
402
- ${v.linearGradientAnimation()}
403
- `,ye=w.styled.div`
269
+ ${b.linearGradientAnimation()}
270
+ `,le=d.styled.div`
404
271
  background: var(--white, #fff);
405
- border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"edged")};
272
+ border-radius: ${e=>b.getBorderRadiusValueWithUnits(e.theme,"edged")};
406
273
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
407
274
  border: 1px solid var(--gray-95012, #14161a1f);
408
275
 
@@ -428,4 +295,64 @@
428
295
  align-items: center;
429
296
  gap: 0.5rem;
430
297
  }
431
- `,ve=i.forwardRef(({},e)=>{const o=z.useTheme();return t.jsxs(ye,{ref:e,theme:o,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(X,{theme:o,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(be,{theme:o,children:[t.jsx(U,{heightCoeff:.75,theme:o,width:"35%"}),t.jsx(U,{heightCoeff:1.25,theme:o}),t.jsx(U,{heightCoeff:3,theme:o})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(X,{theme:o,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(U,{theme:o,width:"75%"})]})]})]})}),$e=({itemsCount:e=5,keyPrefix:o})=>t.jsx(t.Fragment,{children:Array.from({length:e},(a,l)=>t.jsx(ve,{},`${o}-skeleton-campaign-card-${l}`))}),je=({children:e,fallbackComponent:o=t.jsx(t.Fragment,{}),isLoading:a=!1,itemsCount:l=5,keyPrefix:f})=>t.jsx(i.Suspense,{fallback:o,children:a===!0?t.jsx($e,{itemsCount:l,keyPrefix:f}):e}),De=ie(),Te=i.memo(K),Se=i.forwardRef(({sellerType:e="Shop",items:o=[],title:a,isLoading:l,onSelectCard:f=()=>{},onSelectShop:c=()=>{},getImage:s=()=>{},customScrollSize:g,campaignSingleText:b,salesCampaignTypes:m=[],startsInPrefixTextPlural:$,startsinSuffixTextPlural:d,startsInPrefixTextSingular:j,startsinSuffixTextSingular:x},y)=>{const u=i.useRef(),D=i.useRef(),T=De(),N=Y.useDetectMobile(),[F,S]=i.useState(0),h=i.useMemo(()=>{var P;return(P=o==null?void 0:o.slice(0,6))==null?void 0:P.map((r,_)=>t.jsx(Te,{className:"campaign-item",ref:_===0?D:null,coverPhoto:s(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>f(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>c(r==null?void 0:r.shopUuid),campaignSingleText:b,salesCampaignTypes:m,startsInPrefixTextPlural:$,startsinSuffixTextPlural:d,startsInPrefixTextSingular:j,startsinSuffixTextSingular:x,themeData:r==null?void 0:r.themeData},`campaign__item__${_}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}__${T}`))},[T,o]);i.useEffect(()=>{var P;S(g??((P=D==null?void 0:D.current)==null?void 0:P.offsetWidth))},[h,T]);const E=N?(h==null?void 0:h.length)>1:(h==null?void 0:h.length)>2;return t.jsx(t.Fragment,{children:(h==null?void 0:h.length)>0&&t.jsx(we,{ref:y,className:"row-section-scroll",lastItemIdx:(h==null?void 0:h.length)+1,children:t.jsx(Q,{arrowsVisibleOnHover:!1,columnGap:"0",methodsRef:u,mobileHoverScrollButtons:!0,noArrows:!0,padding:"0.25rem 0",rightAlignArrows:!0,elementsCount:o==null?void 0:o.length,scrollBySize:N?F+1:F*2+24,showTimesBtn:!1,title:a,onShowEnd:()=>{},arrowsZIndex:11,showArrows:E,children:t.jsx(je,{isLoading:l,itemsCount:2,keyPrefix:"sales-camp",children:h})},`scroll-${T}`)})})});module.exports=Se;
298
+
299
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
300
+ flex-direction: column;
301
+
302
+ & .campaign__user {
303
+ margin-top: 1rem;
304
+ }
305
+ }
306
+ `,ce=d.styled.div`
307
+ display: flex;
308
+ gap: 1.5rem;
309
+ `,de=p.forwardRef(({},e)=>{const a=B.useTheme();return t.jsxs(le,{ref:e,theme:a,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(q,{theme:a,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(ie,{theme:a,children:[t.jsx(E,{heightCoeff:.75,theme:a,width:"35%"}),t.jsx(E,{heightCoeff:1.25,theme:a}),t.jsx(E,{heightCoeff:3,theme:a})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(q,{theme:a,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(E,{theme:a,width:"75%"})]})]})]})}),ge=({itemsCount:e=5,keyPrefix:a})=>t.jsx(ce,{children:Array.from({length:e},(n,h)=>t.jsx(de,{},`${a}-skeleton-campaign-card-${h}`))}),me=({children:e,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:n=!1,itemsCount:h=5,keyPrefix:u})=>t.jsx(p.Suspense,{fallback:a,children:n===!0?t.jsx(ge,{itemsCount:h,keyPrefix:u}):e}),pe=d.styled.div`
310
+ margin: 0 auto;
311
+ display: flex;
312
+ flex-direction: column;
313
+ align-items: flex-start;
314
+ gap: 1.5rem;
315
+ align-self: stretch;
316
+ position: relative;
317
+
318
+ & .scrollable-section__header {
319
+ display: flex;
320
+ justify-content: space-between;
321
+ align-items: center;
322
+ align-self: stretch;
323
+
324
+ & .scrollable-section__title {
325
+ display: flex;
326
+ align-items: center;
327
+ gap: 0.5rem;
328
+
329
+ & .title__icon {
330
+ }
331
+
332
+ & .title__text {
333
+ color: var(--gray-950, #14161a);
334
+ font-size: 1.5rem;
335
+ font-style: normal;
336
+ font-weight: 600;
337
+ line-height: 2rem;
338
+ }
339
+ }
340
+ }
341
+
342
+ & .scrollable-section__navigation {
343
+ display: flex;
344
+ align-items: flex-start;
345
+ gap: 0.5rem;
346
+ position: absolute;
347
+ top: 0;
348
+ right: 0;
349
+ }
350
+ `,he=d.styled(L.motion.div)`
351
+ display: grid;
352
+ grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
353
+ gap: 1.5rem;
354
+
355
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
356
+ grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumnsForMobile}, 1fr);
357
+ }
358
+ `,G=p.forwardRef(({icon:e,title:a,numOfSlides:n=2,numOfSlidesForMobile:h=1,showNavigation:u=!0,children:g},y)=>{const[c,v]=p.useState(0),[i,D]=p.useState(1),[l,_]=p.useState(null),[f,x]=p.useState(null),w=V.useDetectMobile(),$=50,j=(g==null?void 0:g.length)??1;p.useEffect(()=>{const s=()=>{D(w?h:n)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)},[]);const T=g==null?void 0:g.slice(c,c+i),P=s=>{var m;(m=s==null?void 0:s.target)==null||m.blur(),c+i<j&&v(c+i)},r=s=>{var m;(m=s==null?void 0:s.target)==null||m.blur(),c-i>=0&&v(c-i)},S=s=>{var m;x(null),_((m=s==null?void 0:s.targetTouches["0"])==null?void 0:m.clientX)},k=s=>{var m;x((m=s==null?void 0:s.targetTouches["0"])==null?void 0:m.clientX)},I=()=>{if(!l||!f)return;const s=l-f;s>$&&P(),s<-$&&r()};return t.jsxs(pe,{ref:y,...w?{onTouchStart:S,onTouchMove:k,onTouchEnd:I}:{},children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[b.isDefinedNotEmptyString(e)&&t.jsx(W,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),b.isDefinedNotEmptyString(a)&&t.jsx("div",{className:"title__text",children:a})]})}),t.jsx(he,{numOfColumns:n,numOfColumnsForMobile:h,animate:{x:0,opacity:1},initial:{x:10,opacity:0},children:T},`scrollable-section__content-${c}`),u&&j>i&&!w&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(M,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:c===0,onClick:r}),t.jsx(M,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:c+i>=j,onClick:P})]})]})});G.propTypes={icon:o.PropTypes.string,title:o.PropTypes.string,numOfSlides:o.PropTypes.number,numOfSlidesForMobile:o.PropTypes.number,showNavigation:o.PropTypes.bool};const ue=p.memo(Z),fe=p.forwardRef(({sellerType:e="Shop",items:a=[],title:n,icon:h,isLoading:u,onSelectCard:g=()=>{},onSelectShop:y=()=>{},getImage:c=()=>{},campaignSingleText:v,salesCampaignTypes:i=[],startsInPrefixTextPlural:D,startsinSuffixTextPlural:l,startsInPrefixTextSingular:_,startsinSuffixTextSingular:f,numOfSlides:x=2,numOfSlidesForMobile:w=1,showNavigation:$=!0},j)=>{const T=V.useDetectMobile(),P=p.useMemo(()=>a==null?void 0:a.map((r,S)=>t.jsx(ue,{className:"campaign-item",coverPhoto:c(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>g(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>y(r==null?void 0:r.shopUuid),campaignSingleText:v,salesCampaignTypes:i,startsInPrefixTextPlural:D,startsinSuffixTextPlural:l,startsInPrefixTextSingular:_,startsinSuffixTextSingular:f,themeData:r==null?void 0:r.themeData},`campaign__item__${S}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`)),[a]);return t.jsx(me,{isLoading:u,itemsCount:T?1:2,keyPrefix:"sales-camp",children:t.jsx(G,{icon:h,title:n,numOfSlides:x,numOfSlidesForMobile:w,showNavigation:$,children:P})})});module.exports=fe;