@lanaco/lnc-react-ui 4.0.178 → 4.0.179
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-BeVjdODO.cjs"),I=require("./index-CSNxZFTX.cjs"),Q=T.styled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
6
|
& .button-link {
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((
|
|
29
|
+
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((a,P)=>{const{icon:d,title:v,buttonLink:u,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:D=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:o,onSelectOption:C=()=>{},productsToolbarName:U="All",sponsoredText:f,onBookmark:h=()=>{},actionComponent:S,componentName:N}=a,q=B.useDetectMobile(),L=c.useMemo(()=>t.jsx(t.Fragment,{children:q===!0?i==null?void 0:i.map((e,r)=>t.jsx(j,{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:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(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:k,freeText:y,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,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:f,onBookmark:h,actionComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N}},r)):i==null?void 0:i.slice(0,n).map((e,r)=>t.jsx(j,{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,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),imageUrl:b(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:k,freeText:y,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,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:f,onBookmark:h,actionComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName},r))}),[i,q,n]);return t.jsxs(R.TitleWithOptionsSectionWrapper,{ref:P,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(d)&&t.jsx("i",{className:d}),t.jsx("span",{children:v})]}),l.isDefinedNotEmptyString(u)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(F,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),D(u)},borderRadius:"curved",className:"button-link",children:m})]}),(o==null?void 0:o.length)>0&&t.jsx(I.SelectBar,{items:o,onRemove:e=>{C(e)},onSelect:e=>{C(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(Q,{limit:n,children:L})})]})});module.exports=_;
|
|
@@ -10,7 +10,7 @@ import { D as $, S as j } from "./index-DrtxDu6u.js";
|
|
|
10
10
|
import { S as z } from "./index-BGiZlEQt.js";
|
|
11
11
|
const A = I.div`
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: ${(
|
|
13
|
+
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
15
15
|
|
|
16
16
|
& .button-link {
|
|
@@ -36,7 +36,7 @@ const A = I.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`, P = B($), ee = q((
|
|
39
|
+
`, P = B($), ee = q((i, v) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: d,
|
|
42
42
|
title: T,
|
|
@@ -53,16 +53,16 @@ const A = I.div`
|
|
|
53
53
|
},
|
|
54
54
|
negotiableText: k,
|
|
55
55
|
freeText: f,
|
|
56
|
-
options:
|
|
56
|
+
options: a,
|
|
57
57
|
onSelectOption: y = () => {
|
|
58
58
|
},
|
|
59
59
|
productsToolbarName: L = "All",
|
|
60
|
-
sponsoredText:
|
|
61
|
-
onBookmark:
|
|
60
|
+
sponsoredText: C,
|
|
61
|
+
onBookmark: h = () => {
|
|
62
62
|
},
|
|
63
|
-
actionComponent:
|
|
63
|
+
actionComponent: S,
|
|
64
64
|
componentName: N
|
|
65
|
-
} =
|
|
65
|
+
} = i, w = R(), M = E(() => /* @__PURE__ */ t(F, { children: w === !0 ? o == null ? void 0 : o.map((e, r) => /* @__PURE__ */ t(
|
|
66
66
|
P,
|
|
67
67
|
{
|
|
68
68
|
name: e == null ? void 0 : e.name,
|
|
@@ -92,15 +92,16 @@ const A = I.div`
|
|
|
92
92
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
93
93
|
status: e == null ? void 0 : e.status,
|
|
94
94
|
trade: e == null ? void 0 : e.trade,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
96
|
+
sponsoredText: C,
|
|
97
|
+
onBookmark: h,
|
|
98
|
+
actionComponent: S,
|
|
98
99
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
99
100
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
100
101
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N }
|
|
101
102
|
},
|
|
102
|
-
|
|
103
|
-
)) : o == null ? void 0 : o.slice(0, n).map((e,
|
|
103
|
+
r
|
|
104
|
+
)) : o == null ? void 0 : o.slice(0, n).map((e, r) => /* @__PURE__ */ t(
|
|
104
105
|
P,
|
|
105
106
|
{
|
|
106
107
|
name: e == null ? void 0 : e.name,
|
|
@@ -130,15 +131,16 @@ const A = I.div`
|
|
|
130
131
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
131
132
|
status: e == null ? void 0 : e.status,
|
|
132
133
|
trade: e == null ? void 0 : e.trade,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
135
|
+
sponsoredText: C,
|
|
136
|
+
onBookmark: h,
|
|
137
|
+
actionComponent: S,
|
|
136
138
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
137
139
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
138
140
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
139
141
|
sellerName: e == null ? void 0 : e.sellerName
|
|
140
142
|
},
|
|
141
|
-
|
|
143
|
+
r
|
|
142
144
|
)) }), [o, w, n]);
|
|
143
145
|
return /* @__PURE__ */ l(W, { ref: v, children: [
|
|
144
146
|
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
@@ -153,8 +155,8 @@ const A = I.div`
|
|
|
153
155
|
btnType: "tinted",
|
|
154
156
|
color: "neutral",
|
|
155
157
|
onClick: (e) => {
|
|
156
|
-
var
|
|
157
|
-
(
|
|
158
|
+
var r;
|
|
159
|
+
(r = e == null ? void 0 : e.target) == null || r.blur(), U(c);
|
|
158
160
|
},
|
|
159
161
|
borderRadius: "curved",
|
|
160
162
|
className: "button-link",
|
|
@@ -162,10 +164,10 @@ const A = I.div`
|
|
|
162
164
|
}
|
|
163
165
|
)
|
|
164
166
|
] }),
|
|
165
|
-
(
|
|
167
|
+
(a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ t(
|
|
166
168
|
z,
|
|
167
169
|
{
|
|
168
|
-
items:
|
|
170
|
+
items: a,
|
|
169
171
|
onRemove: (e) => {
|
|
170
172
|
y(e);
|
|
171
173
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),N=require("./index-BeVjdODO.cjs"),F=_.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${a=>`repeat(${a.limit||5}, minmax(0, 1fr))`};
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
58
58
|
grid-template-columns: repeat(2, 1fr);
|
|
59
59
|
padding: 2rem 1.25rem;
|
|
60
60
|
gap: 1.19rem;
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
@media (max-width: ${
|
|
70
|
+
@media (max-width: ${w.SMALL_MOBILE_SIZE_PX+"px"}) {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
}
|
|
74
|
-
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:
|
|
74
|
+
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:f,freeText:b,onBookmark:h=()=>{},actionComponent:k,componentName:y,sponsoredText:C}=a,d=$.useDetectMobile(),[i,M]=s.useState(!1),U=s.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:d===!0?(o=r==null?void 0:r.slice(0,i===!0?r==null?void 0:r.length:l))==null?void 0:o.map((e,m)=>t.jsx(S,{sellerName:e==null?void 0:e.sellerName,name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:f,freeText:b,onBookmark:h,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C},m)):r==null?void 0:r.slice(0,n).map((e,m)=>t.jsx(S,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:f,freeText:b,onBookmark:h,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,sellerName:e==null?void 0:e.sellerName},m))})},[r,d,n,l,i]);return t.jsx(N.SuspenseDetailedProductCard,{isLoading:g,keyPrefix:"urgent-sale-products-skeleton",children:t.jsxs(F,{ref:P,limit:n,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:j})]})," ",U," ",d===!0&&l<(r==null?void 0:r.length)&&!g&&t.jsx(T,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!i)},children:i===!0?q:L})]})})});module.exports=I;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as o, Fragment as $, jsxs as
|
|
1
|
+
import { jsx as o, Fragment as $, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import { memo as T, forwardRef as F, useState as I, useMemo as _ } from "react";
|
|
3
3
|
import { s as q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as B, S as D } from "./consts-BuFChS64.js";
|
|
@@ -97,7 +97,7 @@ const A = q.div`
|
|
|
97
97
|
},
|
|
98
98
|
actionComponent: b,
|
|
99
99
|
componentName: k,
|
|
100
|
-
sponsoredText:
|
|
100
|
+
sponsoredText: C
|
|
101
101
|
} = r, l = E(), [i, M] = I(!1), U = _(() => {
|
|
102
102
|
var t;
|
|
103
103
|
return /* @__PURE__ */ o($, { children: l === !0 ? (t = a == null ? void 0 : a.slice(0, i === !0 ? a == null ? void 0 : a.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ o(
|
|
@@ -135,7 +135,8 @@ const A = q.div`
|
|
|
135
135
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
136
136
|
status: e == null ? void 0 : e.status,
|
|
137
137
|
trade: e == null ? void 0 : e.trade,
|
|
138
|
-
|
|
138
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
139
|
+
sponsoredText: C
|
|
139
140
|
},
|
|
140
141
|
m
|
|
141
142
|
)) : a == null ? void 0 : a.slice(0, s).map((e, m) => /* @__PURE__ */ o(
|
|
@@ -173,7 +174,8 @@ const A = q.div`
|
|
|
173
174
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
174
175
|
status: e == null ? void 0 : e.status,
|
|
175
176
|
trade: e == null ? void 0 : e.trade,
|
|
176
|
-
|
|
177
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
178
|
+
sponsoredText: C,
|
|
177
179
|
sellerName: e == null ? void 0 : e.sellerName
|
|
178
180
|
},
|
|
179
181
|
m
|
|
@@ -184,8 +186,8 @@ const A = q.div`
|
|
|
184
186
|
{
|
|
185
187
|
isLoading: u,
|
|
186
188
|
keyPrefix: "urgent-sale-products-skeleton",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ y(A, { ref: w, limit: s, children: [
|
|
190
|
+
/* @__PURE__ */ y("div", { className: "urgent-tag", children: [
|
|
189
191
|
/* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
190
192
|
/* @__PURE__ */ o("span", { children: N })
|
|
191
193
|
] }),
|