@lanaco/lnc-react-ui 4.0.150 → 4.0.151
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),j=require("./consts-goSZX3xP.cjs"),P=require("./IconButton.cjs"),N=require("./Button.cjs"),d=require("./utils-Dl9xPH4c.cjs"),D=require("./useDetectMobile-zkbzoOGV.cjs"),u=require("./suspense-product-card-detailed-FuxsUusc.cjs"),M=S.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
& .section__items {
|
|
20
20
|
display: grid;
|
|
21
|
-
grid-template-columns: ${
|
|
21
|
+
grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
|
|
22
22
|
gap: 2rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
white-space: nowrap;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
@media (max-width: ${
|
|
45
|
+
@media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
|
|
46
46
|
& .section__items {
|
|
47
47
|
display: flex;
|
|
48
48
|
gap: 1rem;
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
66
|
+
`,B=r.memo(u.DetailedProductCard),I=r.forwardRef((n,L)=>{const{title:s,items:o,limit:a=4,isLoading:m=!1,onSelectCard:g=()=>{},onLoadMore:p=()=>{},onButtonAction:b=()=>{},getImage:f=()=>{},viewAllbuttonLink:l,viewAllButonText:w="View all",negotiableText:_,freeText:h,loadMoreButtonIcon:y="angle-down",sponsoredText:k,onBookmark:v=()=>{},bookmarkComponent:C}=n,c=D.useDetectMobile(),q=r.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(B,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:f(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:h,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:k,onBookmark:v,bookmarkComponent:C,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},i)),[o]);return t.jsxs(M,{limit:a,children:[t.jsxs("div",{className:"section__heading",children:[d.isDefinedNotEmptyString(s)&&t.jsx("div",{className:"section__title",children:s}),c&&d.isDefinedNotEmptyString(l)&&t.jsx(N,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),b(l)},borderRadius:"curved",className:"section__view-all",children:w})]}),t.jsx(u.SuspenseDetailedProductCard,{isLoading:m,limit:a,keyPrefix:"explore-landing",children:t.jsx("div",{className:"section__items",children:q})}),!c&&t.jsx(P,{icon:y,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:p})]})});module.exports=I;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as o,
|
|
2
|
-
import { memo as
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { memo as S, forwardRef as P, useMemo as M } from "react";
|
|
3
|
+
import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as B } from "./consts-BuFChS64.js";
|
|
5
5
|
import D from "./IconButton.js";
|
|
6
|
-
import
|
|
7
|
-
import { k } from "./utils-BdsZgOUE.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { D as T, S as
|
|
10
|
-
const
|
|
6
|
+
import I from "./Button.js";
|
|
7
|
+
import { k as m } from "./utils-BdsZgOUE.js";
|
|
8
|
+
import { u as L } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
+
import { D as T, S as z } from "./suspense-product-card-detailed-C-ZCjG5p.js";
|
|
10
|
+
const E = N.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
gap: 1.5rem;
|
|
@@ -27,7 +27,7 @@ const z = U.div`
|
|
|
27
27
|
|
|
28
28
|
& .section__items {
|
|
29
29
|
display: grid;
|
|
30
|
-
grid-template-columns: ${(
|
|
30
|
+
grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
|
|
31
31
|
gap: 2rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -72,31 +72,31 @@ const z = U.div`
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,
|
|
75
|
+
`, U = S(T), G = P((r, $) => {
|
|
76
76
|
const {
|
|
77
|
-
title:
|
|
77
|
+
title: n,
|
|
78
78
|
items: i,
|
|
79
|
-
limit:
|
|
80
|
-
isLoading:
|
|
81
|
-
onSelectCard:
|
|
79
|
+
limit: a = 4,
|
|
80
|
+
isLoading: d = !1,
|
|
81
|
+
onSelectCard: u = () => {
|
|
82
82
|
},
|
|
83
|
-
onLoadMore:
|
|
83
|
+
onLoadMore: p = () => {
|
|
84
84
|
},
|
|
85
|
-
onButtonAction:
|
|
85
|
+
onButtonAction: g = () => {
|
|
86
86
|
},
|
|
87
|
-
getImage:
|
|
87
|
+
getImage: f = () => {
|
|
88
88
|
},
|
|
89
|
-
viewAllbuttonLink:
|
|
90
|
-
viewAllButonText:
|
|
91
|
-
negotiableText:
|
|
92
|
-
freeText:
|
|
93
|
-
loadMoreButtonIcon:
|
|
94
|
-
sponsoredText:
|
|
95
|
-
onBookmark:
|
|
89
|
+
viewAllbuttonLink: l,
|
|
90
|
+
viewAllButonText: b = "View all",
|
|
91
|
+
negotiableText: w,
|
|
92
|
+
freeText: _,
|
|
93
|
+
loadMoreButtonIcon: h = "angle-down",
|
|
94
|
+
sponsoredText: k,
|
|
95
|
+
onBookmark: y = () => {
|
|
96
96
|
},
|
|
97
|
-
bookmarkComponent:
|
|
98
|
-
} =
|
|
99
|
-
|
|
97
|
+
bookmarkComponent: v
|
|
98
|
+
} = r, s = L(), C = M(() => i == null ? void 0 : i.map((e, t) => /* @__PURE__ */ o(
|
|
99
|
+
U,
|
|
100
100
|
{
|
|
101
101
|
name: e == null ? void 0 : e.name,
|
|
102
102
|
price: e == null ? void 0 : e.price,
|
|
@@ -107,97 +107,66 @@ const z = U.div`
|
|
|
107
107
|
uuid: e == null ? void 0 : e.uuid,
|
|
108
108
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
109
109
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
110
|
-
onSelectCard: () =>
|
|
111
|
-
imageUrl:
|
|
110
|
+
onSelectCard: () => u({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
|
|
111
|
+
imageUrl: f(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
112
112
|
isFree: e == null ? void 0 : e.isFree,
|
|
113
113
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
114
|
-
negotiableText:
|
|
115
|
-
freeText:
|
|
114
|
+
negotiableText: w,
|
|
115
|
+
freeText: _,
|
|
116
116
|
tags: e == null ? void 0 : e.tags,
|
|
117
117
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
118
118
|
condition: e == null ? void 0 : e.condition,
|
|
119
119
|
quantity: e == null ? void 0 : e.quantity,
|
|
120
120
|
trade: e == null ? void 0 : e.trade,
|
|
121
|
-
sponsoredText:
|
|
122
|
-
onBookmark:
|
|
123
|
-
bookmarkComponent:
|
|
121
|
+
sponsoredText: k,
|
|
122
|
+
onBookmark: y,
|
|
123
|
+
bookmarkComponent: v,
|
|
124
124
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
125
125
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists
|
|
126
126
|
},
|
|
127
127
|
t
|
|
128
|
-
))
|
|
129
|
-
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
currency: e == null ? void 0 : e.currency,
|
|
135
|
-
image: e == null ? void 0 : e.image,
|
|
136
|
-
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
137
|
-
uuid: e == null ? void 0 : e.uuid,
|
|
138
|
-
location: e == null ? void 0 : e.location,
|
|
139
|
-
sponsored: e == null ? void 0 : e.sponsored,
|
|
140
|
-
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
141
|
-
onSelectCard: () => s({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
|
|
142
|
-
imageUrl: d(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
143
|
-
isFree: e == null ? void 0 : e.isFree,
|
|
144
|
-
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
145
|
-
negotiableText: m,
|
|
146
|
-
freeText: u,
|
|
147
|
-
tags: e == null ? void 0 : e.tags,
|
|
148
|
-
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
149
|
-
condition: e == null ? void 0 : e.condition,
|
|
150
|
-
quantity: e == null ? void 0 : e.quantity,
|
|
151
|
-
trade: e == null ? void 0 : e.trade,
|
|
152
|
-
sponsoredText: g,
|
|
153
|
-
onBookmark: p,
|
|
154
|
-
bookmarkComponent: f,
|
|
155
|
-
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
156
|
-
bookmarkLists: e == null ? void 0 : e.bookmarkLists
|
|
157
|
-
},
|
|
158
|
-
t
|
|
159
|
-
)) }), [i, n, r]);
|
|
160
|
-
return /* @__PURE__ */ b(z, { limit: r, children: [
|
|
161
|
-
/* @__PURE__ */ b("div", { className: "section__heading", children: [
|
|
162
|
-
k(l) && /* @__PURE__ */ o("div", { className: "section__title", children: l }),
|
|
163
|
-
n && k(c) && /* @__PURE__ */ o(
|
|
164
|
-
F,
|
|
128
|
+
)), [i]);
|
|
129
|
+
return /* @__PURE__ */ c(E, { limit: a, children: [
|
|
130
|
+
/* @__PURE__ */ c("div", { className: "section__heading", children: [
|
|
131
|
+
m(n) && /* @__PURE__ */ o("div", { className: "section__title", children: n }),
|
|
132
|
+
s && m(l) && /* @__PURE__ */ o(
|
|
133
|
+
I,
|
|
165
134
|
{
|
|
166
135
|
type: "button",
|
|
167
136
|
btnType: "tinted",
|
|
168
137
|
color: "neutral",
|
|
169
138
|
onClick: (e) => {
|
|
170
139
|
var t;
|
|
171
|
-
(t = e == null ? void 0 : e.target) == null || t.blur(),
|
|
140
|
+
(t = e == null ? void 0 : e.target) == null || t.blur(), g(l);
|
|
172
141
|
},
|
|
173
142
|
borderRadius: "curved",
|
|
174
143
|
className: "section__view-all",
|
|
175
|
-
children:
|
|
144
|
+
children: b
|
|
176
145
|
}
|
|
177
146
|
)
|
|
178
147
|
] }),
|
|
179
148
|
/* @__PURE__ */ o(
|
|
180
|
-
|
|
149
|
+
z,
|
|
181
150
|
{
|
|
182
|
-
isLoading:
|
|
183
|
-
limit:
|
|
151
|
+
isLoading: d,
|
|
152
|
+
limit: a,
|
|
184
153
|
keyPrefix: "explore-landing",
|
|
185
|
-
children: /* @__PURE__ */ o("div", { className: "section__items", children:
|
|
154
|
+
children: /* @__PURE__ */ o("div", { className: "section__items", children: C })
|
|
186
155
|
}
|
|
187
156
|
),
|
|
188
|
-
!
|
|
157
|
+
!s && /* @__PURE__ */ o(
|
|
189
158
|
D,
|
|
190
159
|
{
|
|
191
|
-
icon:
|
|
160
|
+
icon: h,
|
|
192
161
|
borderRadius: "curved",
|
|
193
162
|
btnType: "basic",
|
|
194
163
|
color: "neutral",
|
|
195
164
|
className: "section__show-more",
|
|
196
|
-
onClick:
|
|
165
|
+
onClick: p
|
|
197
166
|
}
|
|
198
167
|
)
|
|
199
168
|
] });
|
|
200
169
|
});
|
|
201
170
|
export {
|
|
202
|
-
|
|
171
|
+
G as default
|
|
203
172
|
};
|