@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 i=require("react/jsx-runtime"),a=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),P=require("./consts-goSZX3xP.cjs"),N=require("./IconButton.cjs"),D=require("./Button.cjs"),f=require("./utils-Dl9xPH4c.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),w=require("./suspense-product-card-detailed-FuxsUusc.cjs"),M=j.styled.div`
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: ${s=>`repeat(${s.limit}, minmax(0, 1fr))`};
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: ${P.MOBILE_SIZE_PX+"px"}) {
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
- `,k=a.memo(w.DetailedProductCard),U=a.forwardRef((s,B)=>{const{title:l,items:o,limit:n=4,isLoading:_=!1,onSelectCard:c=()=>{},onLoadMore:h=()=>{},onButtonAction:C=()=>{},getImage:d=()=>{},viewAllbuttonLink:u,viewAllButonText:v="View all",negotiableText:m,freeText:g,loadMoreButtonIcon:S="angle-down",sponsoredText:p,onBookmark:b=()=>{},bookmarkComponent:y}=s,r=L.useDetectMobile(),q=a.useMemo(()=>i.jsx(i.Fragment,{children:r===!0?o==null?void 0:o.map((e,t)=>i.jsx(k,{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:()=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:d(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:m,freeText:g,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:p,onBookmark:b,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},t)):o==null?void 0:o.slice(0,n).map((e,t)=>i.jsx(k,{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:()=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:d(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:m,freeText:g,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:p,onBookmark:b,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},t))}),[o,r,n]);return i.jsxs(M,{limit:n,children:[i.jsxs("div",{className:"section__heading",children:[f.isDefinedNotEmptyString(l)&&i.jsx("div",{className:"section__title",children:l}),r&&f.isDefinedNotEmptyString(u)&&i.jsx(D,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var t;(t=e==null?void 0:e.target)==null||t.blur(),C(u)},borderRadius:"curved",className:"section__view-all",children:v})]}),i.jsx(w.SuspenseDetailedProductCard,{isLoading:_,limit:n,keyPrefix:"explore-landing",children:i.jsx("div",{className:"section__items",children:q})}),!r&&i.jsx(N,{icon:S,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=U;
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, Fragment as P, jsxs as b } from "react/jsx-runtime";
2
- import { memo as N, forwardRef as L, useMemo as M } from "react";
3
- import { s as U } from "./emotion-styled.browser.esm-BNN1dTl3.js";
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 F from "./Button.js";
7
- import { k } from "./utils-BdsZgOUE.js";
8
- import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
9
- import { D as T, S as q } from "./suspense-product-card-detailed-C-ZCjG5p.js";
10
- const z = U.div`
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: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
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
- `, y = N(T), H = L((a, E) => {
75
+ `, U = S(T), G = P((r, $) => {
76
76
  const {
77
- title: l,
77
+ title: n,
78
78
  items: i,
79
- limit: r = 4,
80
- isLoading: w = !1,
81
- onSelectCard: s = () => {
79
+ limit: a = 4,
80
+ isLoading: d = !1,
81
+ onSelectCard: u = () => {
82
82
  },
83
- onLoadMore: h = () => {
83
+ onLoadMore: p = () => {
84
84
  },
85
- onButtonAction: _ = () => {
85
+ onButtonAction: g = () => {
86
86
  },
87
- getImage: d = () => {
87
+ getImage: f = () => {
88
88
  },
89
- viewAllbuttonLink: c,
90
- viewAllButonText: C = "View all",
91
- negotiableText: m,
92
- freeText: u,
93
- loadMoreButtonIcon: v = "angle-down",
94
- sponsoredText: g,
95
- onBookmark: p = () => {
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: f
98
- } = a, n = I(), S = M(() => /* @__PURE__ */ o(P, { children: n === !0 ? i == null ? void 0 : i.map((e, t) => /* @__PURE__ */ o(
99
- y,
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: () => s({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
111
- imageUrl: d(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
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: m,
115
- freeText: u,
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: g,
122
- onBookmark: p,
123
- bookmarkComponent: f,
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
- )) : i == null ? void 0 : i.slice(0, r).map((e, t) => /* @__PURE__ */ o(
129
- y,
130
- {
131
- name: e == null ? void 0 : e.name,
132
- price: e == null ? void 0 : e.price,
133
- sellingPrice: e == null ? void 0 : e.sellingPrice,
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(), _(c);
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: C
144
+ children: b
176
145
  }
177
146
  )
178
147
  ] }),
179
148
  /* @__PURE__ */ o(
180
- q,
149
+ z,
181
150
  {
182
- isLoading: w,
183
- limit: r,
151
+ isLoading: d,
152
+ limit: a,
184
153
  keyPrefix: "explore-landing",
185
- children: /* @__PURE__ */ o("div", { className: "section__items", children: S })
154
+ children: /* @__PURE__ */ o("div", { className: "section__items", children: C })
186
155
  }
187
156
  ),
188
- !n && /* @__PURE__ */ o(
157
+ !s && /* @__PURE__ */ o(
189
158
  D,
190
159
  {
191
- icon: v,
160
+ icon: h,
192
161
  borderRadius: "curved",
193
162
  btnType: "basic",
194
163
  color: "neutral",
195
164
  className: "section__show-more",
196
- onClick: h
165
+ onClick: p
197
166
  }
198
167
  )
199
168
  ] });
200
169
  });
201
170
  export {
202
- H as default
171
+ G as default
203
172
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.150",
3
+ "version": "4.0.151",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [