@lanaco/lnc-react-ui 4.0.82 → 4.0.84
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/BlogsSectionWithFilters.cjs +2 -2
- package/dist/BlogsSectionWithFilters.js +36 -34
- package/dist/BrandHitsSection.cjs +6 -6
- package/dist/BrandHitsSection.js +1 -8
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +54 -52
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +9 -9
- package/dist/FieldOfInterestsWithTagsCardsSection.js +53 -51
- package/dist/LocationFinderSection.cjs +1 -1
- package/dist/LocationFinderSection.js +15 -13
- package/dist/LocationSearchSection.cjs +4 -4
- package/dist/LocationSearchSection.js +21 -21
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +45 -48
- package/dist/{index-opywxmcY.cjs → index-ZbylnHR8.cjs} +8 -8
- package/dist/{index-5F6QsgOG.js → index-baEuidT3.js} +63 -61
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
3
|
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import { M as
|
|
8
|
-
const
|
|
4
|
+
import { t as y, m as b, l as $ } from "./utils-DCs-SbIv.js";
|
|
5
|
+
import N from "./Icon.js";
|
|
6
|
+
import { u as C } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
+
import { M as I } from "./consts-C1uHV4xc.js";
|
|
8
|
+
const W = m.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -42,7 +42,7 @@ const I = m.div`
|
|
|
42
42
|
font-style: normal;
|
|
43
43
|
font-weight: 500;
|
|
44
44
|
line-height: 1.5rem;
|
|
45
|
-
${
|
|
45
|
+
${y(2)}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
& .wrapper__description {
|
|
@@ -52,7 +52,7 @@ const I = m.div`
|
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
line-height: 1rem;
|
|
54
54
|
letter-spacing: 0.025rem;
|
|
55
|
-
${
|
|
55
|
+
${y(2)}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -65,12 +65,12 @@ const I = m.div`
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`, F = m.div`
|
|
69
69
|
width: 100%;
|
|
70
70
|
height: 11.625rem;
|
|
71
71
|
border-radius: 0.75rem;
|
|
72
|
-
background: ${
|
|
73
|
-
`,
|
|
72
|
+
background: ${b("-90deg")};
|
|
73
|
+
`, j = m.div`
|
|
74
74
|
display: flex;
|
|
75
75
|
padding: 0 0.5rem 0 0;
|
|
76
76
|
align-items: center;
|
|
@@ -114,30 +114,30 @@ const I = m.div`
|
|
|
114
114
|
color: var(--white, #fff);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`, z = m.div`
|
|
118
118
|
width: 7rem;
|
|
119
119
|
height: 3rem;
|
|
120
120
|
border-radius: 999px;
|
|
121
|
-
background: ${
|
|
122
|
-
`,
|
|
121
|
+
background: ${b("-90deg")};
|
|
122
|
+
`, O = p(({}, r) => /* @__PURE__ */ i(z, {})), A = p(
|
|
123
123
|
({ name: r, isActive: n, icon: t, onSelectCard: s = () => {
|
|
124
|
-
} }, f) => /* @__PURE__ */ l(
|
|
125
|
-
/* @__PURE__ */ i(
|
|
124
|
+
} }, f) => /* @__PURE__ */ l(j, { className: n ? "active" : "", onClick: s, children: [
|
|
125
|
+
/* @__PURE__ */ i(N, { icon: t, className: "wrapper__icon" }),
|
|
126
126
|
/* @__PURE__ */ i("div", { className: "wrapper__text", children: r })
|
|
127
127
|
] })
|
|
128
|
-
),
|
|
128
|
+
), M = p(
|
|
129
129
|
({ image: r, imageComponent: n, name: t, description: s, onSelectCard: f = () => {
|
|
130
|
-
} },
|
|
131
|
-
const { theme: d } =
|
|
132
|
-
return /* @__PURE__ */ l(
|
|
133
|
-
|
|
130
|
+
} }, u) => {
|
|
131
|
+
const { theme: d } = C();
|
|
132
|
+
return /* @__PURE__ */ l(W, { theme: d, onClick: f, children: [
|
|
133
|
+
$(n) ? n : /* @__PURE__ */ i("img", { src: r, className: "wrapper__image" }),
|
|
134
134
|
/* @__PURE__ */ l("div", { className: "wrapper__content", children: [
|
|
135
135
|
t && /* @__PURE__ */ i("div", { className: "wrapper__title", children: t }),
|
|
136
136
|
s && /* @__PURE__ */ i("div", { className: "wrapper__description", children: s })
|
|
137
137
|
] })
|
|
138
138
|
] });
|
|
139
139
|
}
|
|
140
|
-
),
|
|
140
|
+
), E = p(({}, r) => /* @__PURE__ */ i(F, {})), D = m.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
align-items: center;
|
|
@@ -185,7 +185,7 @@ const I = m.div`
|
|
|
185
185
|
width: 100%;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
@media (max-width: ${
|
|
188
|
+
@media (max-width: ${I + "px"}) {
|
|
189
189
|
& .wrapper__tags {
|
|
190
190
|
overflow-x: scroll;
|
|
191
191
|
justify-content: flex-start;
|
|
@@ -211,68 +211,70 @@ const I = m.div`
|
|
|
211
211
|
gap: 1rem;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
`,
|
|
214
|
+
`, Z = p(
|
|
215
215
|
({
|
|
216
216
|
title: r,
|
|
217
217
|
subtitle: n,
|
|
218
218
|
tags: t = [],
|
|
219
219
|
limitTags: s = 7,
|
|
220
220
|
limitTagsForMobile: f = 7,
|
|
221
|
-
limit:
|
|
221
|
+
limit: u = 3,
|
|
222
222
|
limitForMobile: d = 2,
|
|
223
|
-
items:
|
|
224
|
-
|
|
223
|
+
items: o = [],
|
|
224
|
+
selectedTag: c,
|
|
225
|
+
onSelectTag: h = () => {
|
|
225
226
|
},
|
|
226
|
-
onSelectCard:
|
|
227
|
+
onSelectCard: _ = () => {
|
|
227
228
|
},
|
|
228
|
-
getImage:
|
|
229
|
+
getImage: k = () => {
|
|
229
230
|
}
|
|
230
|
-
},
|
|
231
|
-
var x,
|
|
232
|
-
const
|
|
233
|
-
c == null || c(e);
|
|
234
|
-
}, w = (e) => {
|
|
231
|
+
}, G) => {
|
|
232
|
+
var x, v;
|
|
233
|
+
const w = (e) => {
|
|
235
234
|
h == null || h(e);
|
|
235
|
+
}, g = (e) => {
|
|
236
|
+
_ == null || _(e);
|
|
236
237
|
};
|
|
237
238
|
return /* @__PURE__ */ l(
|
|
238
|
-
|
|
239
|
+
D,
|
|
239
240
|
{
|
|
240
241
|
limitTags: s,
|
|
241
242
|
limitTagsForMobile: f,
|
|
242
|
-
limitCards:
|
|
243
|
+
limitCards: u,
|
|
243
244
|
limitCardsForMobile: d,
|
|
244
245
|
children: [
|
|
245
246
|
/* @__PURE__ */ l("div", { className: "wrapper__heading", children: [
|
|
246
247
|
r && /* @__PURE__ */ i("div", { className: "wrapper__title", children: r }),
|
|
247
248
|
n && /* @__PURE__ */ i("div", { className: "wrapper__subtitle", children: n })
|
|
248
249
|
] }),
|
|
249
|
-
/* @__PURE__ */ i("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((e,
|
|
250
|
-
|
|
250
|
+
/* @__PURE__ */ i("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((e, a) => /* @__PURE__ */ i(
|
|
251
|
+
A,
|
|
251
252
|
{
|
|
252
253
|
icon: e == null ? void 0 : e.icon,
|
|
253
254
|
name: e == null ? void 0 : e.name,
|
|
254
|
-
|
|
255
|
+
isActive: (e == null ? void 0 : e.uuid) === (c == null ? void 0 : c.uuid),
|
|
256
|
+
onSelectCard: () => w == null ? void 0 : w(e)
|
|
255
257
|
},
|
|
256
|
-
`field-of-interests-with-tags-card-tag__${
|
|
257
|
-
)) : (x = Array.from("123")) == null ? void 0 : x.map((e,
|
|
258
|
-
|
|
258
|
+
`field-of-interests-with-tags-card-tag__${a + 1}`
|
|
259
|
+
)) : (x = Array.from("123")) == null ? void 0 : x.map((e, a) => /* @__PURE__ */ i(
|
|
260
|
+
O,
|
|
259
261
|
{},
|
|
260
|
-
`field-of-interests-with-tags-card-tag-skeleton__${
|
|
262
|
+
`field-of-interests-with-tags-card-tag-skeleton__${a + 1}`
|
|
261
263
|
)) }),
|
|
262
|
-
/* @__PURE__ */ i("div", { className: "wrapper__cards", children:
|
|
263
|
-
|
|
264
|
+
/* @__PURE__ */ i("div", { className: "wrapper__cards", children: o && (o == null ? void 0 : o.length) > 0 ? o == null ? void 0 : o.map((e, a) => /* @__PURE__ */ i(
|
|
265
|
+
M,
|
|
264
266
|
{
|
|
265
|
-
image:
|
|
267
|
+
image: k(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid),
|
|
266
268
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
267
269
|
name: e == null ? void 0 : e.name,
|
|
268
270
|
description: (e == null ? void 0 : e.shortDescription) || (e == null ? void 0 : e.description),
|
|
269
|
-
onSelectCard: () =>
|
|
271
|
+
onSelectCard: () => g == null ? void 0 : g(e)
|
|
270
272
|
},
|
|
271
|
-
`field-of-interests-with-tags-card__${
|
|
272
|
-
)) : (
|
|
273
|
-
|
|
273
|
+
`field-of-interests-with-tags-card__${a + 1}`
|
|
274
|
+
)) : (v = Array.from("123")) == null ? void 0 : v.map((e, a) => /* @__PURE__ */ i(
|
|
275
|
+
E,
|
|
274
276
|
{},
|
|
275
|
-
`field-of-interests-with-tags-card-skeleton__${
|
|
277
|
+
`field-of-interests-with-tags-card-skeleton__${a + 1}`
|
|
276
278
|
)) })
|
|
277
279
|
]
|
|
278
280
|
}
|
|
@@ -280,5 +282,5 @@ const I = m.div`
|
|
|
280
282
|
}
|
|
281
283
|
);
|
|
282
284
|
export {
|
|
283
|
-
|
|
285
|
+
Z as default
|
|
284
286
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),l=require("react"),p=require("./index-ZbylnHR8.cjs"),d=l.forwardRef((e,t)=>{const{locationFinderTitle:n,locationFinderPlaceholder:o,openMapText:i,onOpenMap:r=()=>{},mapFilters:c,inputComponent:a}=e;return s.jsx(p.LocationFinder,{ref:t,title:n,placeholderText:o,onOpenMap:r,openMapText:i,mapFilters:c,inputComponent:a})});module.exports=d;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { L as
|
|
4
|
-
const
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { L as d } from "./index-baEuidT3.js";
|
|
4
|
+
const F = c((o, e) => {
|
|
5
5
|
const {
|
|
6
6
|
locationFinderTitle: t,
|
|
7
|
-
locationFinderPlaceholder:
|
|
8
|
-
openMapText:
|
|
9
|
-
onOpenMap:
|
|
7
|
+
locationFinderPlaceholder: n,
|
|
8
|
+
openMapText: r,
|
|
9
|
+
onOpenMap: i = () => {
|
|
10
10
|
},
|
|
11
|
-
mapFilters: a
|
|
11
|
+
mapFilters: a,
|
|
12
|
+
inputComponent: p
|
|
12
13
|
} = o;
|
|
13
14
|
return /* @__PURE__ */ l(
|
|
14
|
-
|
|
15
|
+
d,
|
|
15
16
|
{
|
|
16
17
|
ref: e,
|
|
17
18
|
title: t,
|
|
18
|
-
placeholderText:
|
|
19
|
-
onOpenMap:
|
|
20
|
-
openMapText:
|
|
21
|
-
mapFilters: a
|
|
19
|
+
placeholderText: n,
|
|
20
|
+
onOpenMap: i,
|
|
21
|
+
openMapText: r,
|
|
22
|
+
mapFilters: a,
|
|
23
|
+
inputComponent: p
|
|
22
24
|
}
|
|
23
25
|
);
|
|
24
26
|
});
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
F as default
|
|
27
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),d=require("react"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),d=require("react"),s=require("./emotion-styled.browser.esm-BtEseadx.cjs"),l=require("./consts-CtNoHdBj.cjs"),v=require("./index-ryadTWiS.cjs"),b=s.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
padding: 1.25rem;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
border: none;
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,j=s.styled.div`
|
|
23
23
|
display: grid;
|
|
24
24
|
grid-template-columns: repeat(4, 1fr);
|
|
25
25
|
gap: 1.5rem;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
grid-template-columns: repeat(2, 1fr);
|
|
29
29
|
gap: 0.5rem;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,w=s.styled.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
gap: 0.75rem;
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
color: var(--primary-500, #f59e0b);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`,S=d.forwardRef((c,p)=>{const{title:m,items:i,options:o,selectedOption:g=[],onSelectRegion:x=()=>{},onSelectCity:u=()=>{},onSelectOption:h=()=>{}}=c;return e.jsxs(b,{ref:p,children:[e.jsx("div",{className:"wrapper-title",children:m}),(o==null?void 0:o.length)>0&&e.jsx(v.SelectBar,{items:o,selectedIds:g,onSelect:(r,t)=>{h(r,t)},labelKey:"name",valueKey:"code",noMargin:!0}),e.jsx(j,{children:i==null?void 0:i.map((r,t)=>{var a;return e.jsxs(w,{children:[e.jsx("div",{className:"region",onClick:()=>x(r),children:r==null?void 0:r.name}),e.jsx("div",{className:"group-items",children:(a=r==null?void 0:r.cities)==null?void 0:a.map((n,f)=>e.jsx(d.Fragment,{children:e.jsxs("div",{className:"city",onClick:()=>u(n),children:[e.jsx("span",{children:n==null?void 0:n.name}),e.jsxs("span",{className:"count-txt",children:["(",n==null?void 0:n.count,")"]})]})},t+f))})]},t)})})]})});module.exports=S;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as v, Fragment as
|
|
2
|
+
import { forwardRef as v, Fragment as b } from "react";
|
|
3
3
|
import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as p } from "./consts-C1uHV4xc.js";
|
|
5
|
-
import { S as
|
|
6
|
-
const
|
|
5
|
+
import { S as w } from "./index-DXmajb7F.js";
|
|
6
|
+
const S = l.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
padding: 1.25rem;
|
|
@@ -24,7 +24,7 @@ const w = l.div`
|
|
|
24
24
|
box-shadow: none;
|
|
25
25
|
border: none;
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`, N = l.div`
|
|
28
28
|
display: grid;
|
|
29
29
|
grid-template-columns: repeat(4, 1fr);
|
|
30
30
|
gap: 1.5rem;
|
|
@@ -33,7 +33,7 @@ const w = l.div`
|
|
|
33
33
|
grid-template-columns: repeat(2, 1fr);
|
|
34
34
|
gap: 0.5rem;
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`, C = l.div`
|
|
37
37
|
display: flex;
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
gap: 0.75rem;
|
|
@@ -62,50 +62,50 @@ const w = l.div`
|
|
|
62
62
|
color: var(--primary-500, #f59e0b);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`, O = v((s, m) => {
|
|
66
66
|
const {
|
|
67
67
|
title: c,
|
|
68
68
|
items: t,
|
|
69
69
|
options: a,
|
|
70
|
-
|
|
70
|
+
selectedOption: g = [],
|
|
71
|
+
onSelectRegion: f = () => {
|
|
71
72
|
},
|
|
72
|
-
onSelectCity:
|
|
73
|
+
onSelectCity: h = () => {
|
|
73
74
|
},
|
|
74
|
-
onSelectOption:
|
|
75
|
+
onSelectOption: u = () => {
|
|
75
76
|
}
|
|
76
|
-
} =
|
|
77
|
-
return /* @__PURE__ */ i(
|
|
77
|
+
} = s;
|
|
78
|
+
return /* @__PURE__ */ i(S, { ref: m, children: [
|
|
78
79
|
/* @__PURE__ */ o("div", { className: "wrapper-title", children: c }),
|
|
79
80
|
(a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ o(
|
|
80
|
-
|
|
81
|
+
w,
|
|
81
82
|
{
|
|
82
83
|
items: a,
|
|
83
|
-
|
|
84
|
-
},
|
|
84
|
+
selectedIds: g,
|
|
85
85
|
onSelect: (e, n) => {
|
|
86
|
-
|
|
86
|
+
u(e, n);
|
|
87
87
|
},
|
|
88
88
|
labelKey: "name",
|
|
89
89
|
valueKey: "code",
|
|
90
90
|
noMargin: !0
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
|
-
/* @__PURE__ */ o(
|
|
93
|
+
/* @__PURE__ */ o(N, { children: t == null ? void 0 : t.map((e, n) => {
|
|
94
94
|
var d;
|
|
95
|
-
return /* @__PURE__ */ i(
|
|
96
|
-
/* @__PURE__ */ o("div", { className: "region", onClick: () =>
|
|
97
|
-
/* @__PURE__ */ o("div", { className: "group-items", children: (d = e == null ? void 0 : e.cities) == null ? void 0 : d.map((r,
|
|
95
|
+
return /* @__PURE__ */ i(C, { children: [
|
|
96
|
+
/* @__PURE__ */ o("div", { className: "region", onClick: () => f(e), children: e == null ? void 0 : e.name }),
|
|
97
|
+
/* @__PURE__ */ o("div", { className: "group-items", children: (d = e == null ? void 0 : e.cities) == null ? void 0 : d.map((r, x) => /* @__PURE__ */ o(b, { children: /* @__PURE__ */ i("div", { className: "city", onClick: () => h(r), children: [
|
|
98
98
|
/* @__PURE__ */ o("span", { children: r == null ? void 0 : r.name }),
|
|
99
99
|
/* @__PURE__ */ i("span", { className: "count-txt", children: [
|
|
100
100
|
"(",
|
|
101
101
|
r == null ? void 0 : r.count,
|
|
102
102
|
")"
|
|
103
103
|
] })
|
|
104
|
-
] }) }, n +
|
|
104
|
+
] }) }, n + x)) })
|
|
105
105
|
] }, n);
|
|
106
106
|
}) })
|
|
107
107
|
] });
|
|
108
108
|
});
|
|
109
109
|
export {
|
|
110
|
-
|
|
110
|
+
O as default
|
|
111
111
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),y=require("react"),v=require("./Button.cjs"),p=require("./skeleton-CtJG0_SN.cjs"),c=require("./utils-BXPz9bck.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),b=require("./consts-CtNoHdBj.cjs"),C=j.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
width: 100%;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
@media (max-width: ${
|
|
69
|
+
@media (max-width: ${b.MOBILE_SIZE_PX+"px"}) {
|
|
70
70
|
& .wrapper__heading {
|
|
71
71
|
& .wrapper__title {
|
|
72
72
|
& .title__action {
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
gap: 1rem;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
`,
|
|
90
|
+
`,d=y.forwardRef(({title:i,subtitle:s,items:n,limit:m=4,limitForMobile:_=2,buttonText:u="Show More",onSelectCard:g=()=>{},onButtonAction:l=()=>{},icon:o,getImage:x=()=>{},getProductImage:h=()=>{},hideProducts:f=!1},w)=>{var a;return t.jsxs(C,{ref:w,limitCards:m,limitCardsForMobile:_,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[c.isDefinedNotEmptyString(o)&&t.jsx("i",{className:o}),t.jsx("span",{children:i})]}),l&&t.jsx(v,{text:u,borderRadius:"curved",btnType:"tinted",className:"title__action",onClick:l})]}),s&&t.jsx("div",{className:"wrapper__subtitle",children:s})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,r)=>t.jsx(p.ShopCard,{uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>g(e==null?void 0:e.uuid),image:x(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:h,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:f},`shop-card__${r+1}`)):(a=Array.from("1234"))==null?void 0:a.map((e,r)=>t.jsx(p.ShopCardSkeleton,{},`shop-card-skeleton__${r+1}`))})]})});module.exports=d;
|
package/dist/ShopCardsSection.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { S as C, a as
|
|
5
|
-
import { k as
|
|
6
|
-
import { s as
|
|
7
|
-
import { M } from "./consts-C1uHV4xc.js";
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import v from "./Button.js";
|
|
4
|
+
import { S as C, a as b } from "./skeleton-iQWpOw9K.js";
|
|
5
|
+
import { k as d } from "./utils-DCs-SbIv.js";
|
|
6
|
+
import { s as S } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
7
|
+
import { M as N } from "./consts-C1uHV4xc.js";
|
|
8
|
+
const $ = S.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -73,7 +73,7 @@ const S = k.div`
|
|
|
73
73
|
width: 100%;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
@media (max-width: ${
|
|
76
|
+
@media (max-width: ${N + "px"}) {
|
|
77
77
|
& .wrapper__heading {
|
|
78
78
|
& .wrapper__title {
|
|
79
79
|
& .title__action {
|
|
@@ -94,56 +94,53 @@ const S = k.div`
|
|
|
94
94
|
gap: 1rem;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
`,
|
|
97
|
+
`, I = y(
|
|
98
98
|
({
|
|
99
99
|
title: t,
|
|
100
|
-
subtitle:
|
|
100
|
+
subtitle: o,
|
|
101
101
|
items: i,
|
|
102
|
-
limit:
|
|
103
|
-
limitForMobile:
|
|
104
|
-
buttonText:
|
|
105
|
-
onSelectCard:
|
|
102
|
+
limit: m = 4,
|
|
103
|
+
limitForMobile: _ = 2,
|
|
104
|
+
buttonText: g = "Show More",
|
|
105
|
+
onSelectCard: f = () => {
|
|
106
106
|
},
|
|
107
|
-
onButtonAction:
|
|
107
|
+
onButtonAction: a = () => {
|
|
108
108
|
},
|
|
109
|
-
icon:
|
|
110
|
-
getImage:
|
|
109
|
+
icon: p,
|
|
110
|
+
getImage: u = () => {
|
|
111
111
|
},
|
|
112
|
-
getProductImage:
|
|
112
|
+
getProductImage: h = () => {
|
|
113
113
|
},
|
|
114
|
-
hideProducts:
|
|
115
|
-
},
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
return /* @__PURE__ */ o(
|
|
121
|
-
S,
|
|
114
|
+
hideProducts: w = !1
|
|
115
|
+
}, x) => {
|
|
116
|
+
var s;
|
|
117
|
+
return /* @__PURE__ */ n(
|
|
118
|
+
$,
|
|
122
119
|
{
|
|
123
|
-
ref:
|
|
124
|
-
limitCards:
|
|
125
|
-
limitCardsForMobile:
|
|
120
|
+
ref: x,
|
|
121
|
+
limitCards: m,
|
|
122
|
+
limitCardsForMobile: _,
|
|
126
123
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
t && /* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ n("div", { className: "wrapper__heading", children: [
|
|
125
|
+
/* @__PURE__ */ n("div", { className: "wrapper__title", children: [
|
|
126
|
+
t && /* @__PURE__ */ n("div", { className: "title__text", children: [
|
|
127
|
+
d(p) && /* @__PURE__ */ r("i", { className: p }),
|
|
128
|
+
/* @__PURE__ */ r("span", { children: t })
|
|
132
129
|
] }),
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
a && /* @__PURE__ */ r(
|
|
131
|
+
v,
|
|
135
132
|
{
|
|
136
|
-
text:
|
|
133
|
+
text: g,
|
|
137
134
|
borderRadius: "curved",
|
|
138
135
|
btnType: "tinted",
|
|
139
136
|
className: "title__action",
|
|
140
|
-
onClick:
|
|
137
|
+
onClick: a
|
|
141
138
|
}
|
|
142
139
|
)
|
|
143
140
|
] }),
|
|
144
|
-
|
|
141
|
+
o && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: o })
|
|
145
142
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: i && (i == null ? void 0 : i.length) > 0 ? i == null ? void 0 : i.map((e, l) => /* @__PURE__ */ r(
|
|
147
144
|
C,
|
|
148
145
|
{
|
|
149
146
|
uuid: e == null ? void 0 : e.uuid,
|
|
@@ -153,19 +150,19 @@ const S = k.div`
|
|
|
153
150
|
reviewCount: e == null ? void 0 : e.reviewCount,
|
|
154
151
|
products: e == null ? void 0 : e.products,
|
|
155
152
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
156
|
-
onSelectCard: () =>
|
|
157
|
-
image:
|
|
158
|
-
getProductImage:
|
|
153
|
+
onSelectCard: () => f(e == null ? void 0 : e.uuid),
|
|
154
|
+
image: u(e == null ? void 0 : e.profileImage, e == null ? void 0 : e.uuid) || null,
|
|
155
|
+
getProductImage: h,
|
|
159
156
|
canAcceptPayments: e == null ? void 0 : e.canAcceptPayments,
|
|
160
|
-
hideProducts:
|
|
157
|
+
hideProducts: w
|
|
161
158
|
},
|
|
162
|
-
`shop-card__${
|
|
163
|
-
)) : (
|
|
159
|
+
`shop-card__${l + 1}`
|
|
160
|
+
)) : (s = Array.from("1234")) == null ? void 0 : s.map((e, l) => /* @__PURE__ */ r(b, {}, `shop-card-skeleton__${l + 1}`)) })
|
|
164
161
|
]
|
|
165
162
|
}
|
|
166
163
|
);
|
|
167
164
|
}
|
|
168
165
|
);
|
|
169
166
|
export {
|
|
170
|
-
|
|
167
|
+
I as default
|
|
171
168
|
};
|