@lanaco/lnc-react-ui 4.0.164 → 4.0.165

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 o=require("react/jsx-runtime"),n=require("react"),q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),_=require("./useDetectMobile-zkbzoOGV.cjs"),$=require("./Button.cjs"),y=require("./suspense-product-card-detailed-D-pjVe22.cjs"),D=q.styled.div`
1
+ "use strict";const o=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),S=require("./suspense-product-card-detailed-D-pjVe22.cjs"),D=_.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,13 +54,13 @@
54
54
  }
55
55
  }
56
56
 
57
- @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
57
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
58
58
  grid-template-columns: repeat(2, 1fr);
59
59
  padding: 2rem 1.25rem;
60
60
  gap: 1.19rem;
61
61
  }
62
62
 
63
- @media (max-width: ${S.SMALL_MOBILE_SIZE_PX+"px"}) {
63
+ @media (max-width: ${C.SMALL_MOBILE_SIZE_PX+"px"}) {
64
64
  display: flex;
65
65
  flex-direction: column;
66
66
 
@@ -71,4 +71,4 @@
71
71
  }
72
72
  }
73
73
  }
74
- `,w=n.memo(y.DetailedProductCard),F=n.forwardRef((a,C)=>{const{items:r,limit:t=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:L="Show less",showMoreText:M="Show more",isLoading:U=!1,getImage:g=()=>{},negotiableText:p,freeText:b,onBookmark:f=()=>{},bookmarkComponent:k,componentName:h}=a,d=_.useDetectMobile(),[s,P]=n.useState(!1),v=n.useMemo(()=>{var i;return o.jsx(o.Fragment,{children:d===!0?(i=r==null?void 0:r.slice(0,s===!0?r==null?void 0:r.length:l))==null?void 0:i.map((e,c)=>o.jsx(w,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:(N,m)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:m}),imageUrl:g(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,accessor:e==null?void 0:e.accessor}},c)):r==null?void 0:r.slice(0,t).map((e,c)=>o.jsx(w,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:(N,m)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:m}),imageUrl:g(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,accessor:e==null?void 0:e.accessor}},c))})},[r,d,t,l,s]);return o.jsxs(D,{ref:C,limit:t,children:[o.jsxs("div",{className:"urgent-tag",children:[o.jsx("i",{className:"mng mng-lnc-bolt-filled"}),o.jsx("span",{children:j})]}),o.jsx(y.SuspenseDetailedProductCard,{isLoading:U,limit:t,keyPrefix:"explore-landing",children:v}),d===!0&&l<(r==null?void 0:r.length)&&o.jsx($,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:i=>{var e;(e=i==null?void 0:i.target)==null||e.blur(),P(!s)},children:s===!0?L:M})]})});module.exports=F;
74
+ `,w=s.memo(S.DetailedProductCard),F=s.forwardRef((a,P)=>{const{items:r,limit:i=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:M=!1,getImage:g=()=>{},negotiableText:p,freeText:b,onBookmark:f=()=>{},bookmarkComponent:k,componentName:h,sponsoredText:y}=a,d=$.useDetectMobile(),[n,U]=s.useState(!1),v=s.useMemo(()=>{var t;return o.jsx(o.Fragment,{children:d===!0?(t=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:l))==null?void 0:t.map((e,m)=>o.jsx(w,{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:(N,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:g(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:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,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,trade:e==null?void 0:e.trade,sponsoredText:y},m)):r==null?void 0:r.slice(0,i).map((e,m)=>o.jsx(w,{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:(N,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:g(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:p,freeText:b,onBookmark:f,bookmarkComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:h,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,trade:e==null?void 0:e.trade,sponsoredText:y},m))})},[r,d,i,l,n]);return o.jsxs(D,{ref:P,limit:i,children:[o.jsxs("div",{className:"urgent-tag",children:[o.jsx("i",{className:"mng mng-lnc-bolt-filled"}),o.jsx("span",{children:j})]}),o.jsx(S.SuspenseDetailedProductCard,{isLoading:M,limit:i,keyPrefix:"explore-landing",children:v}),d===!0&&l<(r==null?void 0:r.length)&&o.jsx(T,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:t=>{var e;(e=t==null?void 0:t.target)==null||e.blur(),U(!n)},children:n===!0?q:L})]})});module.exports=F;
@@ -1,11 +1,11 @@
1
- import { jsx as a, Fragment as P, jsxs as h } from "react/jsx-runtime";
2
- import { memo as $, forwardRef as F, useState as I, useMemo as T } from "react";
3
- import { s as _ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
1
+ import { jsx as a, Fragment as $, jsxs as y } from "react/jsx-runtime";
2
+ import { memo as T, forwardRef as F, useState as I, useMemo as _ } from "react";
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";
5
5
  import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
6
6
  import j from "./Button.js";
7
7
  import { D as z, S as A } from "./suspense-product-card-detailed-BZtObEfA.js";
8
- const G = _.div`
8
+ const G = q.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
11
11
  grid-template-columns: ${(o) => `repeat(${o.limit || 5}, minmax(0, 1fr))`};
@@ -78,15 +78,15 @@ const G = _.div`
78
78
  }
79
79
  }
80
80
  }
81
- `, S = $(z), J = F((o, w) => {
81
+ `, C = T(z), K = F((o, S) => {
82
82
  const {
83
83
  items: r,
84
84
  limit: t = 5,
85
- limitMobile: l = 4,
85
+ limitMobile: s = 4,
86
86
  onSelectCard: c = () => {
87
87
  },
88
- title: y = "Urgent sale",
89
- showLessText: C = "Show less",
88
+ title: w = "Urgent sale",
89
+ showLessText: P = "Show less",
90
90
  showMoreText: L = "Show more",
91
91
  isLoading: M = !1,
92
92
  getImage: u = () => {
@@ -96,68 +96,87 @@ const G = _.div`
96
96
  onBookmark: f = () => {
97
97
  },
98
98
  bookmarkComponent: b,
99
- componentName: k
100
- } = o, n = E(), [s, U] = I(!1), v = T(() => {
99
+ componentName: k,
100
+ sponsoredText: h
101
+ } = o, l = E(), [n, U] = I(!1), v = _(() => {
101
102
  var i;
102
- return /* @__PURE__ */ a(P, { children: n === !0 ? (i = r == null ? void 0 : r.slice(0, s === !0 ? r == null ? void 0 : r.length : l)) == null ? void 0 : i.map((e, m) => /* @__PURE__ */ a(
103
- S,
103
+ return /* @__PURE__ */ a($, { children: l === !0 ? (i = r == null ? void 0 : r.slice(0, n === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : i.map((e, m) => /* @__PURE__ */ a(
104
+ C,
104
105
  {
105
- title: e == null ? void 0 : e.name,
106
+ name: e == null ? void 0 : e.name,
106
107
  price: e == null ? void 0 : e.price,
108
+ sellingPrice: e == null ? void 0 : e.sellingPrice,
107
109
  isFree: e == null ? void 0 : e.isFree,
108
110
  isNegotiable: e == null ? void 0 : e.isNegotiable,
109
111
  currency: e == null ? void 0 : e.currency,
112
+ categoryCode: e == null ? void 0 : e.categoryCode,
110
113
  sellerUuid: e == null ? void 0 : e.sellerUuid,
111
114
  uuid: e == null ? void 0 : e.uuid,
112
- isSponsored: e == null ? void 0 : e.isSponsored,
115
+ sponsored: e == null ? void 0 : e.sponsored,
113
116
  onSelectCard: (N, d) => c({
114
117
  uuid: e == null ? void 0 : e.uuid,
115
118
  nameSlug: e == null ? void 0 : e.nameSlug,
116
119
  cardRef: d
117
120
  }),
121
+ image: e == null ? void 0 : e.image,
118
122
  imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
123
+ imageComponent: e == null ? void 0 : e.imageComponent,
119
124
  negotiableText: g,
120
125
  freeText: p,
121
126
  onBookmark: f,
122
127
  bookmarkComponent: b,
123
128
  bookmarked: e == null ? void 0 : e.bookmarked,
124
129
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
125
- metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
130
+ metadata: { name: k, accessor: e == null ? void 0 : e.accessor },
131
+ tags: e == null ? void 0 : e.tags,
132
+ condition: e == null ? void 0 : e.condition,
133
+ quantity: e == null ? void 0 : e.quantity,
134
+ trade: e == null ? void 0 : e.trade,
135
+ sponsoredText: h
126
136
  },
127
137
  m
128
138
  )) : r == null ? void 0 : r.slice(0, t).map((e, m) => /* @__PURE__ */ a(
129
- S,
139
+ C,
130
140
  {
131
- title: e == null ? void 0 : e.name,
141
+ name: e == null ? void 0 : e.name,
132
142
  price: e == null ? void 0 : e.price,
143
+ sellingPrice: e == null ? void 0 : e.sellingPrice,
133
144
  isFree: e == null ? void 0 : e.isFree,
134
145
  isNegotiable: e == null ? void 0 : e.isNegotiable,
135
146
  currency: e == null ? void 0 : e.currency,
147
+ categoryCode: e == null ? void 0 : e.categoryCode,
136
148
  sellerUuid: e == null ? void 0 : e.sellerUuid,
137
149
  uuid: e == null ? void 0 : e.uuid,
138
150
  location: e == null ? void 0 : e.location,
139
- isSponsored: e == null ? void 0 : e.isSponsored,
151
+ sponsored: e == null ? void 0 : e.sponsored,
140
152
  onSelectCard: (N, d) => c({
141
153
  uuid: e == null ? void 0 : e.uuid,
142
154
  nameSlug: e == null ? void 0 : e.nameSlug,
143
155
  cardRef: d
144
156
  }),
157
+ image: e == null ? void 0 : e.image,
145
158
  imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
159
+ imageComponent: e == null ? void 0 : e.imageComponent,
146
160
  negotiableText: g,
147
161
  freeText: p,
148
162
  onBookmark: f,
149
163
  bookmarkComponent: b,
150
164
  bookmarked: e == null ? void 0 : e.bookmarked,
151
165
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
152
- metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
166
+ metadata: { name: k, accessor: e == null ? void 0 : e.accessor },
167
+ tags: e == null ? void 0 : e.tags,
168
+ condition: e == null ? void 0 : e.condition,
169
+ quantity: e == null ? void 0 : e.quantity,
170
+ trade: e == null ? void 0 : e.trade,
171
+ sponsoredText: h
153
172
  },
154
173
  m
155
174
  )) });
156
- }, [r, n, t, l, s]);
157
- return /* @__PURE__ */ h(G, { ref: w, limit: t, children: [
158
- /* @__PURE__ */ h("div", { className: "urgent-tag", children: [
175
+ }, [r, l, t, s, n]);
176
+ return /* @__PURE__ */ y(G, { ref: S, limit: t, children: [
177
+ /* @__PURE__ */ y("div", { className: "urgent-tag", children: [
159
178
  /* @__PURE__ */ a("i", { className: "mng mng-lnc-bolt-filled" }),
160
- /* @__PURE__ */ a("span", { children: y })
179
+ /* @__PURE__ */ a("span", { children: w })
161
180
  ] }),
162
181
  /* @__PURE__ */ a(
163
182
  A,
@@ -168,7 +187,7 @@ const G = _.div`
168
187
  children: v
169
188
  }
170
189
  ),
171
- n === !0 && l < (r == null ? void 0 : r.length) && /* @__PURE__ */ a(
190
+ l === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ a(
172
191
  j,
173
192
  {
174
193
  className: "show-more",
@@ -177,13 +196,13 @@ const G = _.div`
177
196
  color: "neutral",
178
197
  onClick: (i) => {
179
198
  var e;
180
- (e = i == null ? void 0 : i.target) == null || e.blur(), U(!s);
199
+ (e = i == null ? void 0 : i.target) == null || e.blur(), U(!n);
181
200
  },
182
- children: s === !0 ? C : L
201
+ children: n === !0 ? P : L
183
202
  }
184
203
  )
185
204
  ] });
186
205
  });
187
206
  export {
188
- J as default
207
+ K as default
189
208
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.164",
3
+ "version": "4.0.165",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [