@lanaco/lnc-react-ui 4.0.172 → 4.0.173

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 t=require("react/jsx-runtime"),a=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),M=require("./consts-goSZX3xP.cjs"),B=require("./IconButton.cjs"),E=require("./Button.cjs"),r=require("./utils-Dl9xPH4c.cjs"),I=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-CsEmnNEh.cjs"),L=P.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),M=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),E=require("./IconButton.cjs"),I=require("./Button.cjs"),r=require("./utils-Dl9xPH4c.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-CsEmnNEh.cjs"),T=M.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -47,7 +47,7 @@
47
47
  white-space: nowrap;
48
48
  }
49
49
 
50
- @media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
50
+ @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
51
51
  gap: 1.25rem;
52
52
 
53
53
  & .section__items {
@@ -70,4 +70,4 @@
70
70
  }
71
71
  }
72
72
  }
73
- `,T=a.memo(g.DetailedProductCard),z=a.forwardRef((n,p)=>{const{title:l,icon:c,items:o,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:w=()=>{},onButtonAction:y=()=>{},getImage:_=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:h,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},bookmarkComponent:S,componentName:j}=n,u=I.useDetectMobile(),q=a.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(T,{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:(R,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),imageUrl:_(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:h,freeText:k,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:C,onBookmark:N,bookmarkComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants},i)),[o]);return t.jsxs(L,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(E,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),y(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:q})}),!u&&!s&&t.jsx(B,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:w})]})});module.exports=z;
73
+ `,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:o,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},bookmarkComponent:S,componentName:j,hasNextPage:q=!1}=n,u=L.useDetectMobile(),P=a.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(z,{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:(U,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),imageUrl:y(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:k,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:C,onBookmark:N,bookmarkComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants},i)),[o]);return t.jsxs(T,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:P})}),!u&&!s&&q&&t.jsx(E,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=R;
@@ -1,13 +1,13 @@
1
1
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import { memo as B, forwardRef as D, useMemo as I } from "react";
3
- import { s as L } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as T } from "./consts-BuFChS64.js";
5
- import z from "./IconButton.js";
6
- import E from "./Button.js";
2
+ import { memo as D, forwardRef as I, useMemo as L } from "react";
3
+ import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as z } from "./consts-BuFChS64.js";
5
+ import E from "./IconButton.js";
6
+ import U from "./Button.js";
7
7
  import { k as i } from "./utils-DHfRApMf.js";
8
- import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
9
- import { D as $, S as j } from "./index-G6ucyCg3.js";
10
- const A = L.div`
8
+ import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
9
+ import { D as j, S as A } from "./index-G6ucyCg3.js";
10
+ const F = T.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  gap: 1.5rem;
@@ -56,7 +56,7 @@ const A = L.div`
56
56
  white-space: nowrap;
57
57
  }
58
58
 
59
- @media (max-width: ${T + "px"}) {
59
+ @media (max-width: ${z + "px"}) {
60
60
  gap: 1.25rem;
61
61
 
62
62
  & .section__items {
@@ -79,7 +79,7 @@ const A = L.div`
79
79
  }
80
80
  }
81
81
  }
82
- `, F = B($), Q = D((a, p) => {
82
+ `, O = D(j), W = I((a, p) => {
83
83
  const {
84
84
  title: l,
85
85
  icon: c,
@@ -103,9 +103,10 @@ const A = L.div`
103
103
  onBookmark: C = () => {
104
104
  },
105
105
  bookmarkComponent: N,
106
- componentName: S
107
- } = a, u = U(), P = I(() => t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ o(
108
- F,
106
+ componentName: S,
107
+ hasNextPage: P = !1
108
+ } = a, u = $(), M = L(() => t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ o(
109
+ O,
109
110
  {
110
111
  name: e == null ? void 0 : e.name,
111
112
  price: e == null ? void 0 : e.price,
@@ -116,7 +117,7 @@ const A = L.div`
116
117
  uuid: e == null ? void 0 : e.uuid,
117
118
  sponsored: e == null ? void 0 : e.sponsored,
118
119
  imageComponent: e == null ? void 0 : e.imageComponent,
119
- onSelectCard: (O, M) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: M }),
120
+ onSelectCard: (R, B) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: B }),
120
121
  imageUrl: w(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
121
122
  isFree: e == null ? void 0 : e.isFree,
122
123
  isNegotiable: e == null ? void 0 : e.isNegotiable,
@@ -141,7 +142,7 @@ const A = L.div`
141
142
  },
142
143
  r
143
144
  )), [t]);
144
- return /* @__PURE__ */ s(A, { ref: p, limit: f, children: [
145
+ return /* @__PURE__ */ s(F, { ref: p, limit: f, children: [
145
146
  /* @__PURE__ */ s("div", { className: "section__heading", children: [
146
147
  i(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
147
148
  i(c) && /* @__PURE__ */ o("i", { className: c }),
@@ -149,7 +150,7 @@ const A = L.div`
149
150
  l
150
151
  ] }),
151
152
  u && i(m) && i(d) && !n && /* @__PURE__ */ o(
152
- E,
153
+ U,
153
154
  {
154
155
  type: "button",
155
156
  btnType: "tinted",
@@ -165,15 +166,15 @@ const A = L.div`
165
166
  )
166
167
  ] }),
167
168
  /* @__PURE__ */ o(
168
- j,
169
+ A,
169
170
  {
170
171
  isLoading: n,
171
172
  keyPrefix: "detailed-product-card-skeleton",
172
- children: /* @__PURE__ */ o("div", { className: "section__items", children: P })
173
+ children: /* @__PURE__ */ o("div", { className: "section__items", children: M })
173
174
  }
174
175
  ),
175
- !u && !n && /* @__PURE__ */ o(
176
- z,
176
+ !u && !n && P && /* @__PURE__ */ o(
177
+ E,
177
178
  {
178
179
  icon: y,
179
180
  borderRadius: "curved",
@@ -186,5 +187,5 @@ const A = L.div`
186
187
  ] });
187
188
  });
188
189
  export {
189
- Q as default
190
+ W as default
190
191
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.172",
3
+ "version": "4.0.173",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [