@lanaco/lnc-react-ui 4.0.169 → 4.0.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.js +1 -1
- package/dist/AccordionSummary.js +1 -1
- package/dist/ActionsToolbar.js +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Badge.js +1 -1
- package/dist/BannerSectionCarousel.cjs +9 -48
- package/dist/BannerSectionCarousel.js +208 -249
- package/dist/BannerSectionSimple.js +1 -1
- package/dist/BannerSectionWithList.js +1 -1
- package/dist/BlogCardsSponsoredSection.cjs +8 -8
- package/dist/BlogCardsSponsoredSection.js +67 -68
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +22 -30
- package/dist/BlogExploreSection.js +9 -9
- package/dist/BlogListSection.cjs +11 -5
- package/dist/BlogListSection.js +187 -123
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +28 -37
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +40 -67
- package/dist/BlogSingleSection.cjs +16 -1
- package/dist/BlogSingleSection.js +47 -45
- package/dist/BlogsSectionDetailed.cjs +8 -27
- package/dist/BlogsSectionDetailed.js +111 -159
- package/dist/BlogsSectionLarge.cjs +19 -4
- package/dist/BlogsSectionLarge.js +73 -37
- package/dist/BlogsSectionSimple.cjs +9 -9
- package/dist/BlogsSectionSimple.js +81 -107
- package/dist/BlogsSectionSimpleCentered.cjs +25 -23
- package/dist/BlogsSectionSimpleCentered.js +103 -96
- package/dist/BlogsSectionWithFilters.cjs +31 -29
- package/dist/BlogsSectionWithFilters.js +173 -134
- package/dist/BrandHitsSection.cjs +10 -14
- package/dist/BrandHitsSection.js +93 -45
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CalorieCalculatorSection.js +1 -1
- package/dist/CategorySimpleCard-Qe5QStrs.cjs +47 -0
- package/dist/CategorySimpleCard-laAY-RUT.js +70 -0
- package/dist/CheckBoxInput.js +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ColorInput.js +1 -1
- package/dist/ConfirmationForm.js +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/{CustomStyles-SyQRnjuy.js → CustomStyles-ArAVZsIj.js} +1 -1
- package/dist/DateInput.js +1 -1
- package/dist/DecimalInput.js +1 -1
- package/dist/DecimalInputV2.js +1 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
- package/dist/DetailedProductsInfinitiveSection.js +35 -36
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +62 -63
- package/dist/DetailsView.js +1 -1
- package/dist/DoubleRangeSlider.js +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/DragDropFiles.js +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownItem.js +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/DropdownMenu.js +1 -1
- package/dist/EditableTable.js +1 -1
- package/dist/FeedbackSection.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +20 -25
- package/dist/FieldOfInterestsMasonrySection.js +228 -154
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +33 -24
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +178 -113
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -16
- package/dist/FieldOfInterestsWithTagsCardsSection.js +89 -93
- package/dist/FileInput.js +1 -1
- package/dist/FlexGridItem.js +1 -1
- package/dist/FormField.js +1 -1
- package/dist/FormView.js +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +11 -27
- package/dist/GeneralWithTagsCardsSection.js +87 -99
- package/dist/GiftCardsSection.cjs +18 -23
- package/dist/GiftCardsSection.js +146 -77
- package/dist/Icon.js +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Kanban.js +1 -1
- package/dist/KanbanActionsToolbar.js +1 -1
- package/dist/KanbanView.js +1 -1
- package/dist/Link.js +1 -1
- package/dist/LoanCalculatorSection.js +1 -1
- package/dist/LocationFinderSection.js +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +33 -19
- package/dist/MasonryGeneralCardsSection.js +114 -68
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/NestedDropdownItem.js +1 -1
- package/dist/NestedMenuItem.js +1 -1
- package/dist/NotificationContainer.js +1 -1
- package/dist/NotificationMessage.js +1 -1
- package/dist/NumberInput.js +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +54 -40
- package/dist/PasswordInput.js +1 -1
- package/dist/PopoverContent.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +15 -20
- package/dist/ProductsWithBannerSection.js +176 -104
- package/dist/ProgressBar.js +1 -1
- package/dist/QuattroCardsSection.cjs +6 -6
- package/dist/QuattroCardsSection.js +42 -34
- package/dist/QuizSection.js +1 -1
- package/dist/RadioInput.js +1 -1
- package/dist/RangeSlider.js +1 -1
- package/dist/ReviewsSection.cjs +24 -30
- package/dist/ReviewsSection.js +170 -137
- package/dist/SalesCampaignsSection.cjs +46 -130
- package/dist/SalesCampaignsSection.js +354 -433
- package/dist/Separator.js +1 -1
- package/dist/ShopCardsSection.cjs +18 -5
- package/dist/ShopCardsSection.js +145 -88
- package/dist/Sidebar.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +10 -4
- package/dist/SimpleCategoriesSection.js +79 -51
- package/dist/SimpleProductsSection.cjs +16 -3
- package/dist/SimpleProductsSection.js +172 -70
- package/dist/Spinner.js +1 -1
- package/dist/StatsSection.js +4 -4
- package/dist/Surface.js +1 -1
- package/dist/SwipeableDrawer.js +1 -1
- package/dist/TabItem.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/TableView.js +1 -1
- package/dist/TextAreaInput.js +1 -1
- package/dist/TextInput.js +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/TimeInput.js +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/TreeMenuSeparator.js +1 -1
- package/dist/UploadedFile.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +2 -2
- package/dist/UrgentSaleProductsSection.js +62 -61
- package/dist/index-BAJkosVg.cjs +11 -0
- package/dist/{index-dXWRbvgi.js → index-BMOLVn8O.js} +1 -1
- package/dist/{skeleton-5mO22c5S.js → index-BPntOicE.js} +55 -107
- package/dist/index-BSpdEGFd.js +42 -0
- package/dist/{index-CF3HhgvN.js → index-BbltNcou.js} +1 -1
- package/dist/index-BhBRZf4M.js +742 -0
- package/dist/index-BovNbKxB.js +54 -0
- package/dist/{skeleton-Ccd6EDeB.cjs → index-C5r__0lD.cjs} +4 -47
- package/dist/{index-DicTpiG0.cjs → index-CfT9e5O9.cjs} +2 -10
- package/dist/index-D-3I_Ppj.cjs +16 -0
- package/dist/index-D0IYt1s3.cjs +20 -0
- package/dist/{skeleton-CQPwIEP0.js → index-D69SKc-n.cjs} +7 -37
- package/dist/{index-C0SKNFzP.js → index-D8KPbcUf.js} +1 -1
- package/dist/index-DFdPWO4O.js +133 -0
- package/dist/index-DFyV_EK2.cjs +305 -0
- package/dist/index-DxwIu0Wn.js +84 -0
- package/dist/{index-y6sKgrZC.js → index-XYs5Cuh5.js} +21 -30
- package/dist/index.js +1 -1
- package/dist/style-BAcV7F53.cjs +64 -0
- package/dist/style-CXMUA6cI.js +74 -0
- package/dist/{style-DKAOBWn3.js → style-D3pIrH3v.js} +1 -1
- package/dist/{utils-BdsZgOUE.js → utils-DHfRApMf.js} +6 -6
- package/package.json +1 -1
- package/dist/index-1Dm1i6WK.js +0 -52
- package/dist/index-BGTtoLxz.cjs +0 -1
- package/dist/skeleton-BdbB-LdT.cjs +0 -97
- package/dist/suspense-categories-card-simple-BGj475Ca.js +0 -101
- package/dist/suspense-categories-card-simple-CjGtzfzp.cjs +0 -55
- package/dist/suspense-large-BMO7JH52.js +0 -26
- package/dist/suspense-large-CFmcSzX-.cjs +0 -1
- package/dist/suspense-product-card-detailed-CxiFuUOT.js +0 -653
- package/dist/suspense-product-card-detailed-IR4sh-l4.cjs +0 -330
- package/dist/suspense-product-card-simple-DJ8UYolb.cjs +0 -1
- package/dist/suspense-product-card-simple-ziy0XcLp.js +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),d=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./utils-Dl9xPH4c.cjs"),L=require("./consts-goSZX3xP.cjs"),ie=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),le=require("./Icon.cjs"),ne=require("./ShopAvatar-CV3lj34D.cjs"),Se=require("./Badge.cjs"),ce=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),te=require("./IconButton.cjs"),de=require("./useDetectMobile-zkbzoOGV.cjs"),je=require("./index-Be-_NM9Q.cjs"),c=require("./style-BAcV7F53.cjs"),Pe=S.styled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
border-radius: 1.25rem;
|
|
7
7
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
8
8
|
|
|
9
|
-
@media (max-width: ${
|
|
9
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
padding: 1rem;
|
|
12
12
|
gap: 0;
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
15
|
-
border-radius: ${
|
|
14
|
+
`,_e=S.styled.div`
|
|
15
|
+
border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,"edged")};
|
|
16
16
|
height: 13.75rem;
|
|
17
17
|
width: 13.75rem;
|
|
18
18
|
min-width: 13.75rem;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
transform: scale(1.25);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,Te=S.styled.div`
|
|
38
38
|
flex: 1;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
color: var(--gray-600, #676e79);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
@media (max-width: ${
|
|
120
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
121
121
|
padding: 1rem 0 0 0;
|
|
122
122
|
|
|
123
123
|
& .campaign-title-text {
|
|
@@ -142,15 +142,15 @@
|
|
|
142
142
|
gap: 0.25rem;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
`,
|
|
145
|
+
`,se=(n=!1,t=!1,o=!1)=>`
|
|
146
146
|
display: flex;
|
|
147
147
|
${t?"flex-wrap: wrap;":""}
|
|
148
148
|
${t?"":"flex-wrap: nowrap;"}
|
|
149
|
-
${
|
|
150
|
-
${
|
|
151
|
-
`,
|
|
149
|
+
${n?"align-items: center;":""}
|
|
150
|
+
${o?"justify-content: center;":""}
|
|
151
|
+
`,ke=S.styled(ie.motion.div)`
|
|
152
152
|
text-decoration: none;
|
|
153
|
-
${
|
|
153
|
+
${n=>n.hasPermission===!0&&"cursor: pointer"};
|
|
154
154
|
|
|
155
155
|
&:focus,
|
|
156
156
|
&:hover,
|
|
@@ -165,14 +165,14 @@
|
|
|
165
165
|
text-decoration: none;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
${
|
|
168
|
+
${se(!0)}
|
|
169
169
|
gap: 0.5rem;
|
|
170
170
|
padding: 0.5rem;
|
|
171
171
|
color: var(--gray-950, #14161a);
|
|
172
172
|
font-weight: 500;
|
|
173
173
|
font-size: 1rem;
|
|
174
174
|
line-height: 1.5rem;
|
|
175
|
-
border-radius: ${
|
|
175
|
+
border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,"slight")};
|
|
176
176
|
transition: all 0.25s ease;
|
|
177
177
|
& .description {
|
|
178
178
|
font-size: 0.85rem;
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
font-weight: 400;
|
|
182
182
|
}
|
|
183
183
|
& .logo-wrapper {
|
|
184
|
-
${
|
|
184
|
+
${se(!0,!1,!0)}
|
|
185
185
|
flex-shrink: 0;
|
|
186
186
|
border-radius: 999px;
|
|
187
187
|
|
|
@@ -220,132 +220,33 @@
|
|
|
220
220
|
background-color: var(--gray-95080, #14161acc);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
@media (max-width: ${
|
|
223
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
224
224
|
padding: 0;
|
|
225
225
|
font-size: 0.875rem;
|
|
226
226
|
}
|
|
227
|
-
`,
|
|
227
|
+
`,Ie=S.styled.div`
|
|
228
228
|
position: absolute;
|
|
229
229
|
top: 0.5rem;
|
|
230
|
-
${
|
|
230
|
+
${n=>n.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
231
231
|
display: flex;
|
|
232
232
|
gap: 0.25rem;
|
|
233
|
-
|
|
234
|
-
border-radius: ${
|
|
235
|
-
background-color: ${
|
|
233
|
+
`,$e=S.styled.div`
|
|
234
|
+
border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
|
|
235
|
+
background-color: ${n=>n==null?void 0:n.color};
|
|
236
236
|
color: white;
|
|
237
237
|
height: 1.5rem;
|
|
238
238
|
min-width: 1.5rem;
|
|
239
|
-
width: ${
|
|
240
|
-
${
|
|
239
|
+
width: ${n=>n.fitContent===!0?"fit-content":"1.5rem"};
|
|
240
|
+
${n=>n.fitContent===!0&&"padding: 0 0.1rem;"};
|
|
241
241
|
font-size: 0.75rem;
|
|
242
242
|
display: flex;
|
|
243
243
|
align-items: center;
|
|
244
244
|
justify-content: center;
|
|
245
|
-
padding: ${
|
|
245
|
+
padding: ${n=>n.padding};
|
|
246
246
|
& i {
|
|
247
247
|
font-size: 0.813rem;
|
|
248
248
|
}
|
|
249
|
-
`,
|
|
250
|
-
display: flex;
|
|
251
|
-
flex-direction: column;
|
|
252
|
-
gap: 1.5rem;
|
|
253
|
-
|
|
254
|
-
& .arrow-icon {
|
|
255
|
-
& i {
|
|
256
|
-
transition: all 0.25s ease;
|
|
257
|
-
transform: ${e=>e.expanded===!0?"rotate(-180deg)":"rotate(0)"};
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
& .badge-button {
|
|
262
|
-
white-space: nowrap;
|
|
263
|
-
font-weight: 500;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
& .gradient {
|
|
267
|
-
background: transparent !important;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
& .campaign-item {
|
|
271
|
-
min-width: calc(50% - 0.87rem);
|
|
272
|
-
width: calc(50% - 0.87rem);
|
|
273
|
-
margin-right: 1rem;
|
|
274
|
-
|
|
275
|
-
&:nth-child(${e=>e==null?void 0:e.lastItemIdx}) {
|
|
276
|
-
margin-right: 0;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
@media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
|
|
281
|
-
& .campaign-item {
|
|
282
|
-
min-width: 100%;
|
|
283
|
-
width: 100%;
|
|
284
|
-
margin-right: 0;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
`;const B=p.styled.div`
|
|
288
|
-
width: ${e=>e.width||"100%"};
|
|
289
|
-
height: ${e=>(e.heightCoeff||1)*1.125}rem;
|
|
290
|
-
background-color: var(--gray-200, #dddfe4);
|
|
291
|
-
|
|
292
|
-
${w.linearGradientAnimation("-90deg")}
|
|
293
|
-
`,Ne=p.styled.div`
|
|
294
|
-
display: flex;
|
|
295
|
-
flex-direction: ${e=>e!=null&&e.row?"row":"column"};
|
|
296
|
-
gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
|
|
297
|
-
width: ${e=>(e==null?void 0:e.width)??"100%"};
|
|
298
|
-
`,le=p.styled.div`
|
|
299
|
-
border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
|
|
300
|
-
background: var(--gray-200, #dddfe4);
|
|
301
|
-
position: relative;
|
|
302
|
-
max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
303
|
-
max-width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
304
|
-
height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
305
|
-
width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
306
|
-
flex-shrink: 0;
|
|
307
|
-
|
|
308
|
-
${w.linearGradientAnimation()}
|
|
309
|
-
`,Ee=p.styled.div`
|
|
310
|
-
background: var(--white, #fff);
|
|
311
|
-
border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
312
|
-
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
313
|
-
border: 1px solid var(--gray-95012, #14161a1f);
|
|
314
|
-
|
|
315
|
-
display: flex;
|
|
316
|
-
gap: 1rem;
|
|
317
|
-
padding: 1.25rem;
|
|
318
|
-
width: 100%;
|
|
319
|
-
|
|
320
|
-
& .campaign__left-section {
|
|
321
|
-
position: relative;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
& .campaign__right-section {
|
|
325
|
-
display: flex;
|
|
326
|
-
flex-direction: column;
|
|
327
|
-
justify-content: space-between;
|
|
328
|
-
max-width: 18rem;
|
|
329
|
-
width: 100%;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
& .campaign__user {
|
|
333
|
-
display: flex;
|
|
334
|
-
align-items: center;
|
|
335
|
-
gap: 0.5rem;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
@media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
|
|
339
|
-
flex-direction: column;
|
|
340
|
-
|
|
341
|
-
& .campaign__user {
|
|
342
|
-
margin-top: 1rem;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
`,Me=p.styled.div`
|
|
346
|
-
display: flex;
|
|
347
|
-
gap: 1.5rem;
|
|
348
|
-
`,ze=c.forwardRef(({},e)=>{const t=J.useTheme();return n.jsxs(Ee,{ref:e,theme:t,children:[n.jsx("div",{className:"campaign__left-section",children:n.jsx(le,{theme:t,width:"15rem",height:"15rem",borderRadius:"edged"})}),n.jsxs("div",{className:"campaign__right-section",children:[n.jsxs(Ne,{theme:t,children:[n.jsx(B,{heightCoeff:.75,theme:t,width:"35%"}),n.jsx(B,{heightCoeff:1.25,theme:t}),n.jsx(B,{heightCoeff:3,theme:t})]}),n.jsxs("div",{className:"campaign__user",children:[n.jsx(le,{theme:t,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),n.jsx(B,{theme:t,width:"75%"})]})]})]})}),Re=({itemsCount:e=5,keyPrefix:t})=>n.jsx(Me,{children:Array.from({length:e},(a,o)=>n.jsx(ze,{},`${t}-skeleton-campaign-card-${o}`))}),Le=({children:e,fallbackComponent:t=n.jsx(n.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:d})=>n.jsx(c.Suspense,{fallback:t,children:a===!0?n.jsx(Re,{itemsCount:o,keyPrefix:d}):e}),Oe=p.styled.div`
|
|
249
|
+
`,Ce=d.forwardRef(({src:n,...t},o)=>{const a=d.useRef();return d.useEffect(()=>{var h;const g=i=>{i.target.src=ne.DefaultShopImage,i.onerror=null};return(h=a==null?void 0:a.current)==null||h.addEventListener("error",g),()=>{var i;(i=a==null?void 0:a.current)==null||i.removeEventListener("error",g)}},[]),r.jsx(d.Fragment,{ref:o,children:C.isDefinedNotEmptyString(n)?r.jsx("img",{ref:a,src:n,...t}):r.jsx("img",{src:ne.DefaultShopImage,...t})})}),pe=n=>{const{uuid:t,hasPermission:o=!0,isUser:a,image:g,imageComponent:h,name:i,notifications:m=0,color:l="primary",size:w="large",style:u,disabled:T,onClick:f=()=>{},isActive:b,className:k,shopCategory:I,themeData:j}=n,x={theme:ce.useTheme(),color:l,size:w,style:u,disabled:T};return d.createElement(ke,{onClick:P=>{P.stopPropagation(),o===!0&&(f==null||f())},...x,key:i,className:`profile-item ${k}`,hasPermission:o,isActive:b,themeColor:(j==null?void 0:j.code)||"transparent"},r.jsx("div",{className:"logo-wrapper",children:C.isDefined(h)?h:g}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:i}),!a&&r.jsx("div",{className:"description",children:I}),m>0&&r.jsx("div",{className:"notifications-number",children:r.jsx(Se,{className:"badge",color:"danger",size:"small",children:m>99?"99+":m})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(n,t)=>{if(!n||!t)return null;const o=n.getTime()-t.getTime(),a=24*60*60*1e3;return Math.floor(o/a)},ae=n=>{if(n!==void 0){const t=new Date(n),o=t.getFullYear(),a=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${a}. ${o}.`}},ge=d.forwardRef((n,t)=>{var re;const o=ce.useTheme(),{shopUuid:a,title:g="",coverPhoto:h,onSelect:i,startDate:m,endDate:l,salesPackages:w,shopName:u,shopCategory:T,shopImage:f,shopImageComponent:b,className:k,onSelectCard:I=()=>{},onSelectShop:j=()=>{},upcoming:p=!1,upcomingCampaignText:x,campaignSingleText:P,salesCampaignTypes:_=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:W,startsInPrefixTextSingular:V,startsinSuffixTextSingular:J,endsInPrefixTextPlural:F,endsinSuffixTextPlural:X,endsInPrefixTextSingular:E,endsinSuffixTextSingular:Z,themeData:K,numberOfListings:D,numberOfListingsTextSingular:G,numberOfListingsTextPlural:z,metadata:e,...A}=n,H=d.useRef(),M=m?new Date(m)<=new Date:!1,ue=oe(m?new Date(m):null,new Date),R=oe(l?new Date(l):null,new Date),fe=R!==null&&R<=2&&R>0,Q=l?new Date(l).getTime():null,xe=Date.now(),Y=Q!==null?Q-xe:null,O=Y!==null&&Y>0&&Y<24*60*60*1e3,ee=(v,q,y,N,$)=>y===1?`${v} ${y} ${N}`:`${q} ${y} ${$}`,ye=()=>{if(!l)return null;const v=we,y=new Date(l).getTime()-v.getTime();if(y<=0)return null;const N=Math.floor(y/(1e3*60*60)),$=Math.floor(y%(1e3*60*60)/(1e3*60)),ve=Math.floor(y%(1e3*60)/1e3);return{hours:N,minutes:$,seconds:ve}},[we,be]=d.useState(new Date);d.useEffect(()=>{if(!O)return;const v=setInterval(()=>{be(new Date)},1e3);return()=>clearInterval(v)},[O]);const U=O?ye():null;return r.jsxs(Pe,{ref:H,theme:o,className:k,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:v=>I(v,H),...A,children:[r.jsxs(_e,{theme:o,onClick:()=>i==null?void 0:i(),children:[r.jsx("img",{src:h}),r.jsx(Ie,{children:w==null?void 0:w.map((v,q)=>{var y,N;return r.jsx($e,{color:(y=_==null?void 0:_.find($=>$.value===v))==null?void 0:y.color,theme:o,children:r.jsx(le,{icon:(N=_==null?void 0:_.find($=>$.value===v))==null?void 0:N.icon})},`package__${q}`)})})]}),r.jsxs(Te,{theme:o,children:[r.jsx("div",{className:"text-block-wrapper",children:r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:(re=p?x:P)==null?void 0:re.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:g}),l&&m&&r.jsxs("div",{className:"campaign-date",children:[ae(m)," - ",ae(l)]}),r.jsxs("div",{className:"timestamp-text",children:[D>0&&r.jsxs("span",{className:"listings-text",children:[D," ",D===1?G:z," ","∙"," "]}),r.jsx("span",{className:`duration-text ${fe?"urgent":""} ${M?"":"starts-in"}`,children:O&&U?r.jsxs("div",{className:"countdown-timer",children:[E," ",U.hours.toString().padStart(2,"0"),":",U.minutes.toString().padStart(2,"0"),":",U.seconds.toString().padStart(2,"0")]}):M?ee(E,F,R,Z,X):ee(V,B,ue,J,W)})]})]})}),r.jsx(pe,{hasPermission:!0,image:r.jsx(Ce,{src:f}),imageComponent:b,themeData:K,isActive:!0,isUser:!1,name:u,shopCategory:T,onClick:()=>j(a)})]})]})});ge.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};const De=S.styled.div`
|
|
349
250
|
margin: 0 auto;
|
|
350
251
|
display: flex;
|
|
351
252
|
flex-direction: column;
|
|
@@ -384,7 +285,7 @@
|
|
|
384
285
|
right: 0;
|
|
385
286
|
}
|
|
386
287
|
|
|
387
|
-
@media (max-width: ${
|
|
288
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
388
289
|
gap: 1.25rem;
|
|
389
290
|
|
|
390
291
|
& .scrollable-section__header {
|
|
@@ -396,13 +297,13 @@
|
|
|
396
297
|
}
|
|
397
298
|
}
|
|
398
299
|
}
|
|
399
|
-
`,
|
|
300
|
+
`,Ne=S.styled(ie.motion.div)`
|
|
400
301
|
display: grid;
|
|
401
|
-
grid-template-columns: repeat(${
|
|
302
|
+
grid-template-columns: repeat(${n=>n==null?void 0:n.numOfColumns}, 1fr);
|
|
402
303
|
gap: 1.5rem;
|
|
403
304
|
width: 100%;
|
|
404
305
|
|
|
405
|
-
@media (max-width: ${
|
|
306
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
406
307
|
display: flex;
|
|
407
308
|
flex-wrap: nowrap;
|
|
408
309
|
overflow-x: scroll;
|
|
@@ -424,11 +325,11 @@
|
|
|
424
325
|
/* Safari and Chrome */
|
|
425
326
|
}
|
|
426
327
|
}
|
|
427
|
-
`,he=
|
|
328
|
+
`,he=d.forwardRef(({icon:n,title:t,numOfSlides:o=2,showNavigation:a=!0,hasNextPage:g=!1,handleFetchNextPage:h=()=>{},children:i},m)=>{const[l,w]=d.useState(0),[u,T]=d.useState(1),f=de.useDetectMobile(),b=(i==null?void 0:i.length)??1;d.useEffect(()=>{const p=()=>{T(o)};return window.addEventListener("resize",p),p(),()=>window.removeEventListener("resize",p)},[]);const k=f?i:i==null?void 0:i.slice(l,l+u),I=p=>{var P;(P=p==null?void 0:p.target)==null||P.blur();const x=l+u;x<b&&w(x),x+u>=b&&g&&h()},j=p=>{var x;(x=p==null?void 0:p.target)==null||x.blur(),l-u>=0&&w(l-u)};return r.jsxs(De,{ref:m,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[C.isDefinedNotEmptyString(n)&&r.jsx(le,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),C.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(Ne,{numOfColumns:o,...!f&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[k,f&&g&&r.jsx(je.InfiniteScrollEndElement,{onIsVisible:h})]},`scrollable-section__content-${l}`),a&&b>u&&!f&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(te,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l===0,onClick:j}),r.jsx(te,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l+u>=b,onClick:I})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,handleFetchNextPage:s.PropTypes.func,showNavigation:s.PropTypes.bool};const Le=S.styled.div`
|
|
428
329
|
display: flex;
|
|
429
330
|
flex: 1;
|
|
430
331
|
width: 100%;
|
|
431
|
-
max-height: ${
|
|
332
|
+
max-height: ${n=>n==null?void 0:n.maxHeight};
|
|
432
333
|
border-radius: 1.25rem;
|
|
433
334
|
|
|
434
335
|
&:hover {
|
|
@@ -441,4 +342,19 @@
|
|
|
441
342
|
border-radius: 1.25rem;
|
|
442
343
|
object-fit: cover;
|
|
443
344
|
}
|
|
444
|
-
`,
|
|
345
|
+
`,me=d.forwardRef(({sectionName:n,imageUrl:t,maxHeight:o="16.25rem",className:a="",handleClick:g=()=>{}},h)=>r.jsx(Le,{ref:h,maxHeight:o,onClick:g,className:`itemless-banner ${a}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})}));me.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const Ee=S.styled(c.SkeletonRowWrapper)`
|
|
346
|
+
@media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
|
|
347
|
+
flex-direction: column;
|
|
348
|
+
|
|
349
|
+
& .skeleton__image {
|
|
350
|
+
width: 100%;
|
|
351
|
+
height: 100%;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
& > div {
|
|
355
|
+
&:last-of-type {
|
|
356
|
+
display: none;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
`,ze=({keyPrefix:n})=>r.jsxs(Ee,{children:[r.jsxs(c.SkeletonRowWrapper,{children:[r.jsx(c.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-1`),r.jsxs(c.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(c.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(c.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(c.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]}),r.jsxs(c.SkeletonRowWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-2`),r.jsxs(c.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(c.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(c.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(c.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]})]}),Me=({keyPrefix:n,isLoading:t=!1,fallbackComponent:o=r.jsx(r.Fragment,{}),children:a})=>r.jsx(d.Suspense,{fallbackComponent:o,children:t===!0?r.jsx(ze,{keyPrefix:n}):a}),Re=d.memo(ge),Oe=d.forwardRef(({sellerType:n="Shop",items:t=[],title:o,icon:a,isLoading:g,onSelectCard:h=()=>{},onSelectShop:i=()=>{},getImage:m=()=>{},campaignSingleText:l,upcomingCampaignText:w,salesCampaignTypes:u=[],startsInPrefixTextPlural:T,startsinSuffixTextPlural:f,startsInPrefixTextSingular:b,startsinSuffixTextSingular:k,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:p,endsinSuffixTextSingular:x,numOfSlides:P=2,showNavigation:_=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:W,itemlessImageUrl:V,itemlessLink:J,handleItemlessLink:F=()=>{},componentName:X,hasNextPage:E=!1,handleFetchNextPage:Z=()=>{}},K)=>{const D=de.useDetectMobile(),G=d.useMemo(()=>{let z=t==null?void 0:t.map((e,A)=>r.jsx(Re,{className:"campaign-item",coverPhoto:m(e==null?void 0:e.coverPhoto,(e==null?void 0:e.uuid)||(e==null?void 0:e.campaignUuid)),description:e==null?void 0:e.description,endDate:e==null?void 0:e.endDate,salesPackages:e==null?void 0:e.salesPackages,sellerType:n,shopImage:e==null?void 0:e.profileImage,shopImageComponent:e==null?void 0:e.profileImageComponent,shopName:e==null?void 0:e.shopName,shopUuid:e==null?void 0:e.shopUuid,shopCategory:e==null?void 0:e.shopCategory,startDate:e==null?void 0:e.startDate,title:e==null?void 0:e.name,uuid:e==null?void 0:e.campaignUuid,onSelectCard:(H,M)=>h(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,M),onSelectShop:()=>i(e==null?void 0:e.shopUuid),campaignSingleText:l,upcomingCampaignText:w,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:u,startsInPrefixTextPlural:T,startsinSuffixTextPlural:f,startsInPrefixTextSingular:b,startsinSuffixTextSingular:k,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:p,endsinSuffixTextSingular:x,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:W,metadata:{name:X,accessor:e==null?void 0:e.accessor}},`campaign__item__${A}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<2&&!D?[...z,r.jsx(me,{imageUrl:V,className:"campaign-item",handleClick:F},"itemless-campaign-section-banner")]:z},[t]);return r.jsx(Me,{isLoading:g,keyPrefix:"sales-campaign-skeleton",children:r.jsx(he,{icon:a,title:o,numOfSlides:P,showNavigation:_,hasNextPage:E,handleFetchNextPage:Z,children:G},`sales-campaign-section__${D}`)})});module.exports=Oe;
|