@lanaco/lnc-react-ui 4.0.196 → 4.0.198

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"),V=require("./emotion-styled.browser.esm-BtEseadx.cjs"),K=require("./consts-goSZX3xP.cjs"),Q=require("./IconButton.cjs"),G=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),X=require("./useDetectMobile-zkbzoOGV.cjs"),p=require("./index-CS4w87SW.cjs"),Z=require("./index-CSNxZFTX.cjs"),H=require("./index-oYE1Pl7q.cjs"),J=V.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),l=require("react"),V=require("./emotion-styled.browser.esm-BtEseadx.cjs"),K=require("./consts-goSZX3xP.cjs"),Q=require("./IconButton.cjs"),G=require("./Button.cjs"),s=require("./utils-RnrgDDZP.cjs"),X=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-CS4w87SW.cjs"),Z=require("./index-CSNxZFTX.cjs"),H=require("./index-oYE1Pl7q.cjs"),J=V.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -32,7 +32,7 @@
32
32
 
33
33
  & .section__items {
34
34
  display: grid;
35
- grid-template-columns: ${s=>`repeat(${s.limit}, minmax(0, 1fr))`};
35
+ grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
36
36
  gap: 2rem;
37
37
  }
38
38
 
@@ -79,4 +79,4 @@
79
79
  }
80
80
  }
81
81
  }
82
- `,W=a.memo(p.DetailedProductCard),Y=a.forwardRef((s,g)=>{const{title:l,icon:c,items:o,limit:f=4,isLoading:r=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:_=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:u="View all",negotiableText:S,freeText:w,loadMoreButtonIcon:v="angle-down",sponsoredText:k,onBookmark:C=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1,LinkComponent:P,urgentText:L,options:B=[],isLoadingOptions:O=!1,selectedOption:D,onSelectOption:M=()=>{},onRemoveOption:E=()=>{},allOptionsEnabled:I=!1,allOptionsLabel:T="All",onSelectAllOptions:R=()=>{},optionLabel:A="label",optionValue:z="value",optionCode:F="code"}=s,m=X.useDetectMobile(),$=a.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(W,{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:(x,U)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:U}),nameSlug:e==null?void 0:e.nameSlug,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:S,freeText:w,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,sponsoredText:k,onBookmark:C,actionComponent:N,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,LinkComponent:P,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:L,hasFreeShipping:e==null?void 0:e.hasFreeShipping},i)),[o]);return t.jsxs(J,{ref:g,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),m&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(u)&&!r&&t.jsx(G,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),_(d)},borderRadius:"curved",className:"section__view-all",children:u})]}),t.jsx(H.SuspenseSelectBar,{isLoading:O,children:t.jsx(Z.SelectBar,{items:B,selectedIds:D,onRemove:E,onSelect:M,allButton:I,onSelectAll:R,labelKey:A,valueKey:z,codeKey:F,noMargin:!0,productsToolbarName:T,noGradient:!0,className:"section__options"})}),t.jsx(p.SuspenseDetailedProductCard,{isLoading:r,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:$})}),!m&&!r&&q&&t.jsx(Q,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=Y;
82
+ `,W=l.memo(g.DetailedProductCard),Y=l.forwardRef((r,f)=>{const{title:c,icon:d,items:i,limit:b=4,isLoading:a=!1,onSelectCard:h=()=>{},onLoadMore:_=()=>{},onButtonAction:y=()=>{},getImage:S=()=>{},viewAllbuttonLink:u,viewAllButonText:m="View all",negotiableText:w,freeText:v,loadMoreButtonIcon:k="angle-down",sponsoredText:C,onBookmark:N=()=>{},actionComponent:j,componentName:q,hasNextPage:P=!1,LinkComponent:L,urgentText:B,options:o=[],isLoadingOptions:O=!1,selectedOption:D,onSelectOption:M=()=>{},onRemoveOption:E=()=>{},allOptionsEnabled:I=!1,allOptionsLabel:T="All",onSelectAllOptions:R=()=>{},optionLabel:A="label",optionValue:z="value",optionCode:F="code"}=r,p=X.useDetectMobile(),$=l.useMemo(()=>i==null?void 0:i.map((e,n)=>t.jsx(W,{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:(x,U)=>h({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:U}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:S(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:w,freeText:v,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,sponsoredText:C,onBookmark:N,actionComponent:j,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:q},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,LinkComponent:L,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:B,hasFreeShipping:e==null?void 0:e.hasFreeShipping},n)),[i]);return t.jsxs(J,{ref:f,limit:b,children:[t.jsxs("div",{className:"section__heading",children:[s.isDefinedNotEmptyString(c)&&t.jsxs("div",{className:"section__title",children:[s.isDefinedNotEmptyString(d)&&t.jsx("i",{className:d})," ",c]}),p&&s.isDefinedNotEmptyString(u)&&s.isDefinedNotEmptyString(m)&&!a&&t.jsx(G,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var n;(n=e==null?void 0:e.target)==null||n.blur(),y(u)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(H.SuspenseSelectBar,{isLoading:O,children:o&&(o==null?void 0:o.length)>0&&t.jsx(Z.SelectBar,{items:o,selectedIds:D,onRemove:E,onSelect:M,allButton:I,onSelectAll:R,labelKey:A,valueKey:z,codeKey:F,noMargin:!0,productsToolbarName:T,noGradient:!0,className:"section__options"})}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:a,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:$})}),!p&&!a&&P&&t.jsx(Q,{icon:k,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:_})]})});module.exports=Y;
@@ -4,7 +4,7 @@ import { s as Q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as G } from "./consts-BuFChS64.js";
5
5
  import X from "./IconButton.js";
6
6
  import Z from "./Button.js";
7
- import { k as a } from "./utils-DtEfC-TX.js";
7
+ import { k as n } from "./utils-DtEfC-TX.js";
8
8
  import { u as H } from "./useDetectMobile-Bkvj0VMa.js";
9
9
  import { D as J, S as W } from "./index-BASX-BjS.js";
10
10
  import { S as Y } from "./index-CWALXP1T.js";
@@ -43,7 +43,7 @@ const ee = Q.div`
43
43
 
44
44
  & .section__items {
45
45
  display: grid;
46
- grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
46
+ grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
47
47
  gap: 2rem;
48
48
  }
49
49
 
@@ -90,35 +90,35 @@ const ee = Q.div`
90
90
  }
91
91
  }
92
92
  }
93
- `, oe = j(J), ge = K((n, p) => {
93
+ `, oe = j(J), ge = K((r, g) => {
94
94
  const {
95
- title: l,
96
- icon: c,
97
- items: t,
98
- limit: g = 4,
99
- isLoading: r = !1,
100
- onSelectCard: f = () => {
95
+ title: c,
96
+ icon: m,
97
+ items: i,
98
+ limit: f = 4,
99
+ isLoading: l = !1,
100
+ onSelectCard: h = () => {
101
101
  },
102
102
  onLoadMore: b = () => {
103
103
  },
104
- onButtonAction: h = () => {
104
+ onButtonAction: _ = () => {
105
105
  },
106
- getImage: _ = () => {
106
+ getImage: S = () => {
107
107
  },
108
- viewAllbuttonLink: m,
109
- viewAllButonText: d = "View all",
110
- negotiableText: S,
111
- freeText: w,
112
- loadMoreButtonIcon: y = "angle-down",
113
- sponsoredText: k,
114
- onBookmark: v = () => {
108
+ viewAllbuttonLink: d,
109
+ viewAllButonText: u = "View all",
110
+ negotiableText: w,
111
+ freeText: y,
112
+ loadMoreButtonIcon: k = "angle-down",
113
+ sponsoredText: v,
114
+ onBookmark: C = () => {
115
115
  },
116
- actionComponent: C,
117
- componentName: N,
118
- hasNextPage: P = !1,
119
- LinkComponent: L,
120
- urgentText: B,
121
- options: O = [],
116
+ actionComponent: N,
117
+ componentName: P,
118
+ hasNextPage: L = !1,
119
+ LinkComponent: B,
120
+ urgentText: O,
121
+ options: t = [],
122
122
  isLoadingOptions: M = !1,
123
123
  selectedOption: T,
124
124
  onSelectOption: I = () => {
@@ -132,7 +132,7 @@ const ee = Q.div`
132
132
  optionLabel: F = "label",
133
133
  optionValue: R = "value",
134
134
  optionCode: U = "code"
135
- } = n, u = H(), V = q(() => t == null ? void 0 : t.map((e, i) => /* @__PURE__ */ o(
135
+ } = r, p = H(), V = q(() => i == null ? void 0 : i.map((e, a) => /* @__PURE__ */ o(
136
136
  oe,
137
137
  {
138
138
  name: e == null ? void 0 : e.name,
@@ -144,13 +144,13 @@ const ee = Q.div`
144
144
  uuid: e == null ? void 0 : e.uuid,
145
145
  sponsored: e == null ? void 0 : e.sponsored,
146
146
  imageComponent: e == null ? void 0 : e.imageComponent,
147
- onSelectCard: (te, $) => f({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: $ }),
147
+ onSelectCard: (te, $) => h({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: $ }),
148
148
  nameSlug: e == null ? void 0 : e.nameSlug,
149
- imageUrl: _(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
149
+ imageUrl: S(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
150
150
  isFree: e == null ? void 0 : e.isFree,
151
151
  isNegotiable: e == null ? void 0 : e.isNegotiable,
152
- negotiableText: S,
153
- freeText: w,
152
+ negotiableText: w,
153
+ freeText: y,
154
154
  tags: e == null ? void 0 : e.tags,
155
155
  categoryCode: e == null ? void 0 : e.categoryCode,
156
156
  condition: e == null ? void 0 : e.condition,
@@ -158,51 +158,51 @@ const ee = Q.div`
158
158
  hasQuantities: e == null ? void 0 : e.hasQuantities,
159
159
  status: e == null ? void 0 : e.status,
160
160
  trade: e == null ? void 0 : e.trade,
161
- sponsoredText: k,
162
- onBookmark: v,
163
- actionComponent: C,
161
+ sponsoredText: v,
162
+ onBookmark: C,
163
+ actionComponent: N,
164
164
  bookmarked: e == null ? void 0 : e.bookmarked,
165
165
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
166
- metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
166
+ metadata: { accessor: e == null ? void 0 : e.accessor, name: P },
167
167
  sellerName: e == null ? void 0 : e.sellerName,
168
168
  forCart: e == null ? void 0 : e.forCart,
169
169
  forOrder: e == null ? void 0 : e.forOrder,
170
170
  contactSeller: e == null ? void 0 : e.contactSeller,
171
171
  hasVariants: e == null ? void 0 : e.hasVariants,
172
- LinkComponent: L,
172
+ LinkComponent: B,
173
173
  activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
174
- urgentText: B,
174
+ urgentText: O,
175
175
  hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
176
176
  },
177
- i
178
- )), [t]);
179
- return /* @__PURE__ */ s(ee, { ref: p, limit: g, children: [
177
+ a
178
+ )), [i]);
179
+ return /* @__PURE__ */ s(ee, { ref: g, limit: f, children: [
180
180
  /* @__PURE__ */ s("div", { className: "section__heading", children: [
181
- a(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
182
- a(c) && /* @__PURE__ */ o("i", { className: c }),
181
+ n(c) && /* @__PURE__ */ s("div", { className: "section__title", children: [
182
+ n(m) && /* @__PURE__ */ o("i", { className: m }),
183
183
  " ",
184
- l
184
+ c
185
185
  ] }),
186
- u && a(m) && a(d) && !r && /* @__PURE__ */ o(
186
+ p && n(d) && n(u) && !l && /* @__PURE__ */ o(
187
187
  Z,
188
188
  {
189
189
  type: "button",
190
190
  btnType: "tinted",
191
191
  color: "neutral",
192
192
  onClick: (e) => {
193
- var i;
194
- (i = e == null ? void 0 : e.target) == null || i.blur(), h(m);
193
+ var a;
194
+ (a = e == null ? void 0 : e.target) == null || a.blur(), _(d);
195
195
  },
196
196
  borderRadius: "curved",
197
197
  className: "section__view-all",
198
- children: d
198
+ children: u
199
199
  }
200
200
  )
201
201
  ] }),
202
- /* @__PURE__ */ o(x, { isLoading: M, children: /* @__PURE__ */ o(
202
+ /* @__PURE__ */ o(x, { isLoading: M, children: t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ o(
203
203
  Y,
204
204
  {
205
- items: O,
205
+ items: t,
206
206
  selectedIds: T,
207
207
  onRemove: A,
208
208
  onSelect: I,
@@ -220,15 +220,15 @@ const ee = Q.div`
220
220
  /* @__PURE__ */ o(
221
221
  W,
222
222
  {
223
- isLoading: r,
223
+ isLoading: l,
224
224
  keyPrefix: "detailed-product-card-skeleton",
225
225
  children: /* @__PURE__ */ o("div", { className: "section__items", children: V })
226
226
  }
227
227
  ),
228
- !u && !r && P && /* @__PURE__ */ o(
228
+ !p && !l && L && /* @__PURE__ */ o(
229
229
  X,
230
230
  {
231
- icon: y,
231
+ icon: k,
232
232
  borderRadius: "curved",
233
233
  btnType: "basic",
234
234
  color: "neutral",
@@ -1,6 +1,6 @@
1
- "use strict";const t=require("react/jsx-runtime"),l=require("react"),Q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),K=require("./consts-goSZX3xP.cjs"),W=require("./Button.cjs"),r=require("./utils-RnrgDDZP.cjs"),z=require("./useDetectMobile-zkbzoOGV.cjs"),G=require("./style-CkcozOY6.cjs"),P=require("./index-CS4w87SW.cjs"),V=require("./index-CSNxZFTX.cjs"),X=require("./index-oYE1Pl7q.cjs"),Z=Q.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),Q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),K=require("./consts-goSZX3xP.cjs"),W=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),z=require("./useDetectMobile-zkbzoOGV.cjs"),G=require("./style-CkcozOY6.cjs"),j=require("./index-CS4w87SW.cjs"),V=require("./index-CSNxZFTX.cjs"),X=require("./index-oYE1Pl7q.cjs"),Z=Q.styled.div`
2
2
  display: grid;
3
- grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
3
+ grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
6
  & .button-link {
@@ -35,4 +35,4 @@
35
35
  /* Safari and Chrome */
36
36
  }
37
37
  }
38
- `,v=l.memo(P.DetailedProductCard),H=l.forwardRef((a,j)=>{const{icon:c,title:w,buttonLink:u,items:i,buttonText:d,limit:n=4,onSelectCard:m=()=>{},onButtonAction:L=()=>{},isLoading:p=!1,getImage:g=()=>{},negotiableText:b,freeText:S,options:F=[],isLoadingOptions:O=!1,selectedOption:D,onSelectOption:T=()=>{},onRemoveOption:U=()=>{},allOptionsEnabled:_=!1,allOptionsLabel:B="All",onSelectAllOptions:E=()=>{},optionLabel:M="label",optionValue:R="value",optionCode:I="code",sponsoredText:k,onBookmark:y=()=>{},actionComponent:h,componentName:f,LinkComponent:C,urgentText:N}=a,q=z.useDetectMobile(),$=l.useMemo(()=>t.jsx(t.Fragment,{children:q===!0?i==null?void 0:i.map((e,o)=>t.jsx(v,{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,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(A,s)=>m({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:g(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:b,freeText:S,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:k,onBookmark:y,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:f},LinkComponent:C,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:N,hasFreeShipping:e==null?void 0:e.hasFreeShipping},o)):i==null?void 0:i.slice(0,n).map((e,o)=>t.jsx(v,{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:(A,s)=>m({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:g(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:b,freeText:S,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:k,onBookmark:y,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:f},sellerName:e==null?void 0:e.sellerName,LinkComponent:C,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:N,hasFreeShipping:e==null?void 0:e.hasFreeShipping},o))}),[i,q,n]);return t.jsxs(G.TitleWithOptionsSectionWrapper,{ref:j,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c}),t.jsx("span",{children:w})]}),r.isDefinedNotEmptyString(u)&&r.isDefinedNotEmptyString(d)&&!p&&t.jsx(W,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),L(u)},borderRadius:"curved",className:"button-link",children:d})]}),t.jsx(X.SuspenseSelectBar,{isLoading:O,children:t.jsx(V.SelectBar,{items:F,selectedIds:D,onRemove:U,onSelect:T,allButton:_,onSelectAll:E,labelKey:M,valueKey:R,codeKey:I,noMargin:!0,productsToolbarName:B,noGradient:!0,className:"section__options"})}),t.jsx(P.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(Z,{limit:n,children:$})})]})});module.exports=H;
38
+ `,P=c.memo(j.DetailedProductCard),H=c.forwardRef((n,w)=>{const{icon:u,title:L,buttonLink:d,items:i,buttonText:m,limit:s=4,onSelectCard:p=()=>{},onButtonAction:F=()=>{},isLoading:g=!1,getImage:b=()=>{},negotiableText:S,freeText:k,options:a=[],isLoadingOptions:O=!1,selectedOption:D,onSelectOption:T=()=>{},onRemoveOption:U=()=>{},allOptionsEnabled:_=!1,allOptionsLabel:B="All",onSelectAllOptions:E=()=>{},optionLabel:M="label",optionValue:R="value",optionCode:I="code",sponsoredText:h,onBookmark:y=()=>{},actionComponent:f,componentName:C,LinkComponent:N,urgentText:q}=n,v=z.useDetectMobile(),$=c.useMemo(()=>t.jsx(t.Fragment,{children:v===!0?i==null?void 0:i.map((e,o)=>t.jsx(P,{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,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(A,r)=>p({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:r}),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:S,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,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:h,onBookmark:y,actionComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:C},LinkComponent:N,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q,hasFreeShipping:e==null?void 0:e.hasFreeShipping},o)):i==null?void 0:i.slice(0,s).map((e,o)=>t.jsx(P,{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:(A,r)=>p({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:r}),nameSlug:e==null?void 0:e.nameSlug,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:S,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,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:h,onBookmark:y,actionComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:C},sellerName:e==null?void 0:e.sellerName,LinkComponent:N,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q,hasFreeShipping:e==null?void 0:e.hasFreeShipping},o))}),[i,v,s]);return t.jsxs(G.TitleWithOptionsSectionWrapper,{ref:w,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(u)&&t.jsx("i",{className:u}),t.jsx("span",{children:L})]}),l.isDefinedNotEmptyString(d)&&l.isDefinedNotEmptyString(m)&&!g&&t.jsx(W,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),F(d)},borderRadius:"curved",className:"button-link",children:m})]}),t.jsx(X.SuspenseSelectBar,{isLoading:O,children:a&&(a==null?void 0:a.length)>0&&t.jsx(V.SelectBar,{items:a,selectedIds:D,onRemove:U,onSelect:T,allButton:_,onSelectAll:E,labelKey:M,valueKey:R,codeKey:I,noMargin:!0,productsToolbarName:B,noGradient:!0,className:"section__options"})}),t.jsx(j.SuspenseDetailedProductCard,{isLoading:g,keyPrefix:"detailed-products-skeleton",children:t.jsx(Z,{limit:s,children:$})})]})});module.exports=H;
@@ -1,9 +1,9 @@
1
- import { jsx as o, Fragment as K, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as o, Fragment as K, jsxs as l } from "react/jsx-runtime";
2
2
  import { memo as W, forwardRef as $, useMemo as j } from "react";
3
3
  import { s as z } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as G } from "./consts-BuFChS64.js";
5
5
  import V from "./Button.js";
6
- import { k as l } from "./utils-DtEfC-TX.js";
6
+ import { k as c } from "./utils-DtEfC-TX.js";
7
7
  import { u as X } from "./useDetectMobile-Bkvj0VMa.js";
8
8
  import { T as Z } from "./style-Cmlod7oq.js";
9
9
  import { D as H, S as J } from "./index-BASX-BjS.js";
@@ -11,7 +11,7 @@ import { S as Y } from "./index-CWALXP1T.js";
11
11
  import { S as x } from "./index-4wvppFLx.js";
12
12
  const ee = z.div`
13
13
  display: grid;
14
- grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
14
+ grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
15
15
  gap: 1.25rem;
16
16
 
17
17
  & .button-link {
@@ -46,24 +46,24 @@ const ee = z.div`
46
46
  /* Safari and Chrome */
47
47
  }
48
48
  }
49
- `, P = W(H), ue = $((i, w) => {
49
+ `, w = W(H), ue = $((r, L) => {
50
50
  const {
51
- icon: c,
52
- title: L,
53
- buttonLink: d,
51
+ icon: d,
52
+ title: F,
53
+ buttonLink: m,
54
54
  items: t,
55
- buttonText: m,
56
- limit: r = 4,
57
- onSelectCard: u = () => {
55
+ buttonText: u,
56
+ limit: n = 4,
57
+ onSelectCard: p = () => {
58
58
  },
59
- onButtonAction: F = () => {
59
+ onButtonAction: O = () => {
60
60
  },
61
- isLoading: p = !1,
62
- getImage: g = () => {
61
+ isLoading: g = !1,
62
+ getImage: b = () => {
63
63
  },
64
- negotiableText: b,
65
- freeText: S,
66
- options: O = [],
64
+ negotiableText: S,
65
+ freeText: f,
66
+ options: i = [],
67
67
  isLoadingOptions: T = !1,
68
68
  selectedOption: U,
69
69
  onSelectOption: B = () => {
@@ -77,15 +77,15 @@ const ee = z.div`
77
77
  optionLabel: I = "label",
78
78
  optionValue: q = "value",
79
79
  optionCode: A = "code",
80
- sponsoredText: f,
81
- onBookmark: k = () => {
80
+ sponsoredText: k,
81
+ onBookmark: h = () => {
82
82
  },
83
- actionComponent: h,
84
- componentName: y,
85
- LinkComponent: C,
86
- urgentText: N
87
- } = i, v = X(), Q = j(() => /* @__PURE__ */ o(K, { children: v === !0 ? t == null ? void 0 : t.map((e, a) => /* @__PURE__ */ o(
88
- P,
83
+ actionComponent: y,
84
+ componentName: C,
85
+ LinkComponent: N,
86
+ urgentText: v
87
+ } = r, P = X(), Q = j(() => /* @__PURE__ */ o(K, { children: P === !0 ? t == null ? void 0 : t.map((e, a) => /* @__PURE__ */ o(
88
+ w,
89
89
  {
90
90
  name: e == null ? void 0 : e.name,
91
91
  price: e == null ? void 0 : e.price,
@@ -97,17 +97,17 @@ const ee = z.div`
97
97
  sponsored: e == null ? void 0 : e.sponsored,
98
98
  imageComponent: e == null ? void 0 : e.imageComponent,
99
99
  nameSlug: e == null ? void 0 : e.nameSlug,
100
- onSelectCard: (R, n) => u({
100
+ onSelectCard: (R, s) => p({
101
101
  uuid: e == null ? void 0 : e.uuid,
102
102
  nameSlug: e == null ? void 0 : e.nameSlug,
103
- cardRef: n
103
+ cardRef: s
104
104
  }),
105
105
  sellerName: e == null ? void 0 : e.sellerName,
106
- imageUrl: g(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
106
+ imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
107
107
  isFree: e == null ? void 0 : e.isFree,
108
108
  isNegotiable: e == null ? void 0 : e.isNegotiable,
109
- negotiableText: b,
110
- freeText: S,
109
+ negotiableText: S,
110
+ freeText: f,
111
111
  tags: e == null ? void 0 : e.tags,
112
112
  categoryCode: e == null ? void 0 : e.categoryCode,
113
113
  condition: e == null ? void 0 : e.condition,
@@ -116,20 +116,20 @@ const ee = z.div`
116
116
  status: e == null ? void 0 : e.status,
117
117
  trade: e == null ? void 0 : e.trade,
118
118
  forCart: e == null ? void 0 : e.forCart,
119
- sponsoredText: f,
120
- onBookmark: k,
121
- actionComponent: h,
119
+ sponsoredText: k,
120
+ onBookmark: h,
121
+ actionComponent: y,
122
122
  bookmarked: e == null ? void 0 : e.bookmarked,
123
123
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
124
- metadata: { accessor: e == null ? void 0 : e.accessor, name: y },
125
- LinkComponent: C,
124
+ metadata: { accessor: e == null ? void 0 : e.accessor, name: C },
125
+ LinkComponent: N,
126
126
  activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
127
- urgentText: N,
127
+ urgentText: v,
128
128
  hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
129
129
  },
130
130
  a
131
- )) : t == null ? void 0 : t.slice(0, r).map((e, a) => /* @__PURE__ */ o(
132
- P,
131
+ )) : t == null ? void 0 : t.slice(0, n).map((e, a) => /* @__PURE__ */ o(
132
+ w,
133
133
  {
134
134
  name: e == null ? void 0 : e.name,
135
135
  price: e == null ? void 0 : e.price,
@@ -141,17 +141,17 @@ const ee = z.div`
141
141
  location: e == null ? void 0 : e.location,
142
142
  sponsored: e == null ? void 0 : e.sponsored,
143
143
  imageComponent: e == null ? void 0 : e.imageComponent,
144
- onSelectCard: (R, n) => u({
144
+ onSelectCard: (R, s) => p({
145
145
  uuid: e == null ? void 0 : e.uuid,
146
146
  nameSlug: e == null ? void 0 : e.nameSlug,
147
- cardRef: n
147
+ cardRef: s
148
148
  }),
149
149
  nameSlug: e == null ? void 0 : e.nameSlug,
150
- imageUrl: g(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
150
+ imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
151
151
  isFree: e == null ? void 0 : e.isFree,
152
152
  isNegotiable: e == null ? void 0 : e.isNegotiable,
153
- negotiableText: b,
154
- freeText: S,
153
+ negotiableText: S,
154
+ freeText: f,
155
155
  tags: e == null ? void 0 : e.tags,
156
156
  categoryCode: e == null ? void 0 : e.categoryCode,
157
157
  condition: e == null ? void 0 : e.condition,
@@ -160,27 +160,27 @@ const ee = z.div`
160
160
  status: e == null ? void 0 : e.status,
161
161
  trade: e == null ? void 0 : e.trade,
162
162
  forCart: e == null ? void 0 : e.forCart,
163
- sponsoredText: f,
164
- onBookmark: k,
165
- actionComponent: h,
163
+ sponsoredText: k,
164
+ onBookmark: h,
165
+ actionComponent: y,
166
166
  bookmarked: e == null ? void 0 : e.bookmarked,
167
167
  bookmarkLists: e == null ? void 0 : e.bookmarkLists,
168
- metadata: { accessor: e == null ? void 0 : e.accessor, name: y },
168
+ metadata: { accessor: e == null ? void 0 : e.accessor, name: C },
169
169
  sellerName: e == null ? void 0 : e.sellerName,
170
- LinkComponent: C,
170
+ LinkComponent: N,
171
171
  activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
172
- urgentText: N,
172
+ urgentText: v,
173
173
  hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
174
174
  },
175
175
  a
176
- )) }), [t, v, r]);
177
- return /* @__PURE__ */ s(Z, { ref: w, children: [
178
- /* @__PURE__ */ s("div", { className: "regular-title", children: [
179
- /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
180
- l(c) && /* @__PURE__ */ o("i", { className: c }),
181
- /* @__PURE__ */ o("span", { children: L })
176
+ )) }), [t, P, n]);
177
+ return /* @__PURE__ */ l(Z, { ref: L, children: [
178
+ /* @__PURE__ */ l("div", { className: "regular-title", children: [
179
+ /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
180
+ c(d) && /* @__PURE__ */ o("i", { className: d }),
181
+ /* @__PURE__ */ o("span", { children: F })
182
182
  ] }),
183
- l(d) && l(m) && !p && /* @__PURE__ */ o(
183
+ c(m) && c(u) && !g && /* @__PURE__ */ o(
184
184
  V,
185
185
  {
186
186
  type: "button",
@@ -188,18 +188,18 @@ const ee = z.div`
188
188
  color: "neutral",
189
189
  onClick: (e) => {
190
190
  var a;
191
- (a = e == null ? void 0 : e.target) == null || a.blur(), F(d);
191
+ (a = e == null ? void 0 : e.target) == null || a.blur(), O(m);
192
192
  },
193
193
  borderRadius: "curved",
194
194
  className: "button-link",
195
- children: m
195
+ children: u
196
196
  }
197
197
  )
198
198
  ] }),
199
- /* @__PURE__ */ o(x, { isLoading: T, children: /* @__PURE__ */ o(
199
+ /* @__PURE__ */ o(x, { isLoading: T, children: i && (i == null ? void 0 : i.length) > 0 && /* @__PURE__ */ o(
200
200
  Y,
201
201
  {
202
- items: O,
202
+ items: i,
203
203
  selectedIds: U,
204
204
  onRemove: M,
205
205
  onSelect: B,
@@ -217,9 +217,9 @@ const ee = z.div`
217
217
  /* @__PURE__ */ o(
218
218
  J,
219
219
  {
220
- isLoading: p,
220
+ isLoading: g,
221
221
  keyPrefix: "detailed-products-skeleton",
222
- children: /* @__PURE__ */ o(ee, { limit: r, children: Q })
222
+ children: /* @__PURE__ */ o(ee, { limit: n, children: Q })
223
223
  }
224
224
  )
225
225
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.196",
3
+ "version": "4.0.198",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [