@lanaco/lnc-react-ui 4.0.147 → 4.0.149

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,12 +1,12 @@
1
- import { jsx as t, Fragment as M, jsxs as U } from "react/jsx-runtime";
2
- import { memo as F, forwardRef as N, useMemo as T } from "react";
3
- import { s as v } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as B } from "./consts-BuFChS64.js";
5
- import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { S as L } from "./index-DzYKmmn2.js";
7
- import { T as j } from "./index-DK8dqEUQ.js";
8
- import { S as z } from "./suspense-product-card-simple-D2m3NcrV.js";
9
- const C = v.div`
1
+ import { jsx as r, Fragment as C, jsxs as M } from "react/jsx-runtime";
2
+ import { memo as U, forwardRef as F, useMemo as N } from "react";
3
+ import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as v } from "./consts-BuFChS64.js";
5
+ import { u as B } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { S as I } from "./index-DzYKmmn2.js";
7
+ import { T as L } from "./index-DK8dqEUQ.js";
8
+ import { S as j } from "./suspense-product-card-simple-D2m3NcrV.js";
9
+ const z = T.div`
10
10
  display: grid;
11
11
  grid-template-columns: repeat(6, 1fr);
12
12
  gap: 1.25rem;
@@ -17,7 +17,7 @@ const C = v.div`
17
17
  margin: auto;
18
18
  }
19
19
 
20
- @media (max-width: ${B + "px"}) {
20
+ @media (max-width: ${v + "px"}) {
21
21
  grid-template-columns: repeat(2, 1fr);
22
22
 
23
23
  & .text-block-v1 {
@@ -36,27 +36,27 @@ const C = v.div`
36
36
 
37
37
  }
38
38
  }
39
- `, c = F(L), W = N((p, g) => {
39
+ `, c = U(I), W = F((p, g) => {
40
40
  const {
41
41
  title: f,
42
- subtitle: b,
43
- description: h,
44
- buttonText: w,
45
- buttonLink: y,
42
+ subtitle: S,
43
+ description: b,
44
+ buttonText: h,
45
+ buttonLink: w,
46
46
  items: i,
47
- onButtonAction: P = () => {
47
+ onButtonAction: y = () => {
48
48
  },
49
- onSelectCard: r = () => {
49
+ onSelectCard: o = () => {
50
50
  },
51
- isLoading: S = !1,
52
- limit: o = 6,
51
+ isLoading: P = !1,
52
+ limit: t = 6,
53
53
  getImage: l = () => {
54
54
  },
55
- negotiableText: s,
55
+ negotiableText: a,
56
56
  freeText: m
57
- } = p, d = I(), k = T(() => {
58
- var a, n;
59
- return /* @__PURE__ */ t(M, { children: d === !0 ? (a = i == null ? void 0 : i.slice(0, 4)) == null ? void 0 : a.map((e, u) => /* @__PURE__ */ t(
57
+ } = p, d = B(), k = N(() => {
58
+ var s, n;
59
+ return /* @__PURE__ */ r(C, { children: d === !0 ? (s = i == null ? void 0 : i.slice(0, 4)) == null ? void 0 : s.map((e, u) => /* @__PURE__ */ r(
60
60
  c,
61
61
  {
62
62
  title: e == null ? void 0 : e.name,
@@ -66,13 +66,13 @@ const C = v.div`
66
66
  currency: e == null ? void 0 : e.currency,
67
67
  sellerUuid: e == null ? void 0 : e.sellerUuid,
68
68
  uuid: e == null ? void 0 : e.uuid,
69
- onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid),
69
+ onSelectCard: () => o({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
70
70
  image: l(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
71
- negotiableText: s,
71
+ negotiableText: a,
72
72
  freeText: m
73
73
  },
74
74
  u
75
- )) : (n = i == null ? void 0 : i.slice(0, 9)) == null ? void 0 : n.map((e, u) => /* @__PURE__ */ t(
75
+ )) : (n = i == null ? void 0 : i.slice(0, 9)) == null ? void 0 : n.map((e, u) => /* @__PURE__ */ r(
76
76
  c,
77
77
  {
78
78
  title: e == null ? void 0 : e.name,
@@ -82,32 +82,32 @@ const C = v.div`
82
82
  currency: e == null ? void 0 : e.currency,
83
83
  sellerUuid: e == null ? void 0 : e.sellerUuid,
84
84
  uuid: e == null ? void 0 : e.uuid,
85
- onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid),
85
+ onSelectCard: () => o({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
86
86
  image: l(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
87
- negotiableText: s,
87
+ negotiableText: a,
88
88
  freeText: m
89
89
  },
90
90
  u
91
91
  )) });
92
- }, [i, d, o]);
93
- return /* @__PURE__ */ U(C, { ref: g, limit: o, children: [
94
- /* @__PURE__ */ t(
95
- j,
92
+ }, [i, d, t]);
93
+ return /* @__PURE__ */ M(z, { ref: g, limit: t, children: [
94
+ /* @__PURE__ */ r(
95
+ L,
96
96
  {
97
- subtitle: b,
97
+ subtitle: S,
98
98
  title: f,
99
- description: h,
100
- buttonText: w,
101
- buttonLink: y,
102
- onButtonAction: P,
99
+ description: b,
100
+ buttonText: h,
101
+ buttonLink: w,
102
+ onButtonAction: y,
103
103
  className: "text-block-v1"
104
104
  }
105
105
  ),
106
- /* @__PURE__ */ t(
107
- z,
106
+ /* @__PURE__ */ r(
107
+ j,
108
108
  {
109
- isLoading: S,
110
- limit: o,
109
+ isLoading: P,
110
+ limit: t,
111
111
  keyPrefix: "explore-landing",
112
112
  children: k
113
113
  }
@@ -1,4 +1,4 @@
1
- "use strict";const i=require("react/jsx-runtime"),l=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),w=require("./suspense-product-card-detailed-FuxsUusc.cjs"),N=v.styled.div`
1
+ "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),S=require("./suspense-product-card-detailed-FuxsUusc.cjs"),N=P.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
4
  grid-template-columns: ${o=>`repeat(${o.limit||5}, minmax(0, 1fr))`};
@@ -71,4 +71,4 @@
71
71
  }
72
72
  }
73
73
  }
74
- `,h=l.memo(w.DetailedProductCard),_=l.forwardRef((o,y)=>{const{items:r,limit:a=5,limitMobile:d=4,onSelectCard:t=()=>{},title:S="Urgent sale",showLessText:j="Show less",showMoreText:L="Show more",isLoading:M=!1,getImage:u=()=>{},negotiableText:g,freeText:p,onBookmark:b=()=>{},bookmarkComponent:f=i.jsx(i.Fragment,{})}=o,m=C.useDetectMobile(),[n,U]=l.useState(!1),P=l.useMemo(()=>{var s;return i.jsx(i.Fragment,{children:m===!0?(s=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:s.map((e,c)=>i.jsx(h,{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:()=>t==null?void 0:t(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c)):r==null?void 0:r.slice(0,a).map((e,c)=>i.jsx(h,{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:()=>t==null?void 0:t(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c))})},[r,m,a,d,n]);return i.jsxs(N,{ref:y,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:S})]}),i.jsx(w.SuspenseDetailedProductCard,{isLoading:M,limit:a,keyPrefix:"explore-landing",children:P}),m===!0&&d<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:s=>{var e;(e=s==null?void 0:s.target)==null||e.blur(),U(!n)},children:n===!0?j:L})]})});module.exports=_;
74
+ `,h=n.memo(S.DetailedProductCard),_=n.forwardRef((o,w)=>{const{items:r,limit:a=5,limitMobile:l=4,onSelectCard:c=()=>{},title:y="Urgent sale",showLessText:C="Show less",showMoreText:j="Show more",isLoading:L=!1,getImage:u=()=>{},negotiableText:g,freeText:p,onBookmark:b=()=>{},bookmarkComponent:f}=o,d=v.useDetectMobile(),[s,M]=n.useState(!1),U=n.useMemo(()=>{var t;return i.jsx(i.Fragment,{children:d===!0?(t=r==null?void 0:r.slice(0,s===!0?r==null?void 0:r.length:l))==null?void 0:t.map((e,m)=>i.jsx(h,{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:()=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},m)):r==null?void 0:r.slice(0,a).map((e,m)=>i.jsx(h,{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:()=>c({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},m))})},[r,d,a,l,s]);return i.jsxs(N,{ref:w,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:y})]}),i.jsx(S.SuspenseDetailedProductCard,{isLoading:L,limit:a,keyPrefix:"explore-landing",children:U}),d===!0&&l<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:t=>{var e;(e=t==null?void 0:t.target)==null||e.blur(),M(!s)},children:s===!0?C:j})]})});module.exports=_;
@@ -1,5 +1,5 @@
1
- import { jsx as i, Fragment as b, jsxs as k } from "react/jsx-runtime";
2
- import { memo as P, forwardRef as C, useState as N, useMemo as $ } from "react";
1
+ import { jsx as i, Fragment as U, jsxs as b } from "react/jsx-runtime";
2
+ import { memo as v, forwardRef as P, useState as N, useMemo as $ } from "react";
3
3
  import { s as F } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as I, S as T } from "./consts-BuFChS64.js";
5
5
  import { u as _ } from "./useDetectMobile-Bkvj0VMa.js";
@@ -78,28 +78,28 @@ const j = F.div`
78
78
  }
79
79
  }
80
80
  }
81
- `, h = P(D), W = C((o, w) => {
81
+ `, k = v(D), W = P((o, h) => {
82
82
  const {
83
83
  items: r,
84
- limit: s = 5,
85
- limitMobile: n = 4,
86
- onSelectCard: a = () => {
84
+ limit: t = 5,
85
+ limitMobile: s = 4,
86
+ onSelectCard: m = () => {
87
87
  },
88
88
  title: S = "Urgent sale",
89
- showLessText: y = "Show less",
90
- showMoreText: L = "Show more",
91
- isLoading: M = !1,
92
- getImage: c = () => {
89
+ showLessText: w = "Show less",
90
+ showMoreText: y = "Show more",
91
+ isLoading: C = !1,
92
+ getImage: u = () => {
93
93
  },
94
- negotiableText: u,
95
- freeText: p,
96
- onBookmark: g = () => {
94
+ negotiableText: c,
95
+ freeText: g,
96
+ onBookmark: p = () => {
97
97
  },
98
- bookmarkComponent: f = /* @__PURE__ */ i(b, {})
99
- } = o, d = _(), [l, U] = N(!1), v = $(() => {
100
- var t;
101
- return /* @__PURE__ */ i(b, { children: d === !0 ? (t = r == null ? void 0 : r.slice(0, l === !0 ? r == null ? void 0 : r.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ i(
102
- h,
98
+ bookmarkComponent: f
99
+ } = o, n = _(), [l, L] = N(!1), M = $(() => {
100
+ var a;
101
+ return /* @__PURE__ */ i(U, { children: n === !0 ? (a = r == null ? void 0 : r.slice(0, l === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : a.map((e, d) => /* @__PURE__ */ i(
102
+ k,
103
103
  {
104
104
  title: e == null ? void 0 : e.name,
105
105
  price: e == null ? void 0 : e.price,
@@ -109,18 +109,18 @@ const j = F.div`
109
109
  sellerUuid: e == null ? void 0 : e.sellerUuid,
110
110
  uuid: e == null ? void 0 : e.uuid,
111
111
  isSponsored: e == null ? void 0 : e.isSponsored,
112
- onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
113
- imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
114
- negotiableText: u,
115
- freeText: p,
116
- onBookmark: g,
112
+ onSelectCard: () => m({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
113
+ imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
114
+ negotiableText: c,
115
+ freeText: g,
116
+ onBookmark: p,
117
117
  bookmarkComponent: f,
118
118
  bookmarked: e == null ? void 0 : e.bookmarked,
119
119
  bookmarkLists: e == null ? void 0 : e.bookmarkLists
120
120
  },
121
- m
122
- )) : r == null ? void 0 : r.slice(0, s).map((e, m) => /* @__PURE__ */ i(
123
- h,
121
+ d
122
+ )) : r == null ? void 0 : r.slice(0, t).map((e, d) => /* @__PURE__ */ i(
123
+ k,
124
124
  {
125
125
  title: e == null ? void 0 : e.name,
126
126
  price: e == null ? void 0 : e.price,
@@ -131,44 +131,44 @@ const j = F.div`
131
131
  uuid: e == null ? void 0 : e.uuid,
132
132
  location: e == null ? void 0 : e.location,
133
133
  isSponsored: e == null ? void 0 : e.isSponsored,
134
- onSelectCard: () => a == null ? void 0 : a(e == null ? void 0 : e.uuid),
135
- imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
136
- negotiableText: u,
137
- freeText: p,
138
- onBookmark: g,
134
+ onSelectCard: () => m({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
135
+ imageUrl: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
136
+ negotiableText: c,
137
+ freeText: g,
138
+ onBookmark: p,
139
139
  bookmarkComponent: f,
140
140
  bookmarked: e == null ? void 0 : e.bookmarked,
141
141
  bookmarkLists: e == null ? void 0 : e.bookmarkLists
142
142
  },
143
- m
143
+ d
144
144
  )) });
145
- }, [r, d, s, n, l]);
146
- return /* @__PURE__ */ k(j, { ref: w, limit: s, children: [
147
- /* @__PURE__ */ k("div", { className: "urgent-tag", children: [
145
+ }, [r, n, t, s, l]);
146
+ return /* @__PURE__ */ b(j, { ref: h, limit: t, children: [
147
+ /* @__PURE__ */ b("div", { className: "urgent-tag", children: [
148
148
  /* @__PURE__ */ i("i", { className: "mng mng-lnc-bolt-filled" }),
149
149
  /* @__PURE__ */ i("span", { children: S })
150
150
  ] }),
151
151
  /* @__PURE__ */ i(
152
152
  E,
153
153
  {
154
- isLoading: M,
155
- limit: s,
154
+ isLoading: C,
155
+ limit: t,
156
156
  keyPrefix: "explore-landing",
157
- children: v
157
+ children: M
158
158
  }
159
159
  ),
160
- d === !0 && n < (r == null ? void 0 : r.length) && /* @__PURE__ */ i(
160
+ n === !0 && s < (r == null ? void 0 : r.length) && /* @__PURE__ */ i(
161
161
  B,
162
162
  {
163
163
  className: "show-more",
164
164
  btnType: "basic",
165
165
  type: "button",
166
166
  color: "neutral",
167
- onClick: (t) => {
167
+ onClick: (a) => {
168
168
  var e;
169
- (e = t == null ? void 0 : t.target) == null || e.blur(), U(!l);
169
+ (e = a == null ? void 0 : a.target) == null || e.blur(), L(!l);
170
170
  },
171
- children: l === !0 ? y : L
171
+ children: l === !0 ? w : y
172
172
  }
173
173
  )
174
174
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.147",
3
+ "version": "4.0.149",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [