@lanaco/lnc-react-ui 4.0.171 → 4.0.172

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-DFyV_EK2.cjs"),L=P.styled.div`
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`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -6,7 +6,7 @@ import z from "./IconButton.js";
6
6
  import E from "./Button.js";
7
7
  import { k as i } from "./utils-DHfRApMf.js";
8
8
  import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
9
- import { D as $, S as j } from "./index-BhBRZf4M.js";
9
+ import { D as $, S as j } from "./index-G6ucyCg3.js";
10
10
  const A = L.div`
11
11
  display: flex;
12
12
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-Dl9xPH4c.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),w=require("./index-DFyV_EK2.cjs"),I=require("./index-BvQx3xAm.cjs"),_=T.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-Dl9xPH4c.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),w=require("./index-CsEmnNEh.cjs"),I=require("./index-BvQx3xAm.cjs"),_=T.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
@@ -6,7 +6,7 @@ import R from "./Button.js";
6
6
  import { k as m } from "./utils-DHfRApMf.js";
7
7
  import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
8
8
  import { T as $ } from "./style-D3pIrH3v.js";
9
- import { D as j, S as z } from "./index-BhBRZf4M.js";
9
+ import { D as j, S as z } from "./index-G6ucyCg3.js";
10
10
  import { S as A } from "./index-BMOLVn8O.js";
11
11
  const K = I.div`
12
12
  display: grid;
@@ -1,4 +1,4 @@
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"),N=require("./index-DFyV_EK2.cjs"),F=_.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"),N=require("./index-CsEmnNEh.cjs"),F=_.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))`};
@@ -4,7 +4,7 @@ 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
- import { D as z, S as A } from "./index-BhBRZf4M.js";
7
+ import { D as z, S as A } from "./index-G6ucyCg3.js";
8
8
  const G = q.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -230,6 +230,8 @@
230
230
 
231
231
  & .bookmarking-btn {
232
232
  display: flex;
233
+ bottom: 0.5rem;
234
+ top: unset;
233
235
  }
234
236
  }
235
237
  `,Se=k.styled.div`
@@ -294,7 +296,7 @@
294
296
  font-size: 1rem;
295
297
  color: var(--warning-500, #F59E0B);
296
298
  }
297
- `,Pe=c.forwardRef(({sponsoredText:i="Sponsored"},x)=>e.jsxs(ye,{ref:x,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),_e="Vehicles_Cars",Ce="Vehicles_Motorcycles",Re="Vehicles_Trucks",Le="Vehicles_AgriculturalMachines_Tractors",Ne="Vehicles_ConstructionMachines",We="Vehicles_Bus",$e="Vehicles_Campers",Ee="RealEstates_",a={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},Te=c.forwardRef((i,x)=>{const{uuid:w,sellerUuid:_,name:Y,price:C=0,sellingPrice:S,currency:y,isNegotiable:R,isFree:L,imageUrl:Z,location:K,sponsored:A,imageComponent:T,onSelectCard:H=()=>{},freeText:J="Free",negotiableText:Q="Negotiable",tags:t=[],categoryCode:N,condition:q,quantity:O,trade:V,sponsoredText:ee,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te,onBookmark:W=()=>{},bookmarkComponent:v,bookmarked:B,bookmarkLists:ie,metadata:f,sellerName:z}=i,$=je.useDetectMobile(),ae=()=>{var m;if(!l.isDefined(v))return e.jsx(e.Fragment,{});const o=v,n=(m=v==null?void 0:v.props)==null?void 0:m.children,d=c.cloneElement(n,{key:`bookmark_pr__${B}`,bookmarked:B,productUuid:w,onAddToBookmark:()=>W(!0,w),onRemoveFromBookmark:()=>W(!1,w),bookmarkedUuidList:ie,sellerUuid:_,handleBookmarking:W,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te});return c.cloneElement(o,void 0,d)},M=[_e,Ce,Re,Le,Ne,We,$e,Ee].some(o=>N==null?void 0:N.includes(o)),[se,F]=c.useState(!1),le=()=>{F(!0)},ce=()=>{F(!1)},s=c.useRef(null),u=c.useRef([]),[de,G]=c.useState(t==null?void 0:t.length),me=()=>{var m,b,j;if(!(s!=null&&s.current)||((m=u==null?void 0:u.current)==null?void 0:m.length)===0)return;if($){G(t==null?void 0:t.length);return}const o=(b=s==null?void 0:s.current)==null?void 0:b.offsetWidth;let n=0,d=0;for(let h=0;h<(t==null?void 0:t.length);h++){const g=((j=u==null?void 0:u.current[h])==null?void 0:j.offsetWidth)||0,p=n+g+4;if(p<=o)n+=p,d++;else break}G(d)};c.useEffect(()=>{const o=s==null?void 0:s.current;if(!o)return;const n=new ResizeObserver(()=>{me()});return n.observe(o),()=>{n.disconnect()}},[t,$]);const he=()=>{var o;return e.jsx("div",{className:"tags-popover__trigger",children:(o=t==null?void 0:t.slice(0,de))==null?void 0:o.map((n,d)=>{var g,p,D,U,X;const m=((g=a==null?void 0:a[n==null?void 0:n.code])==null?void 0:g.icon)??((p=a==null?void 0:a.default)==null?void 0:p.icon)??"",b=((D=n==null?void 0:n.measurementUnit)==null?void 0:D.symbol)??((U=a==null?void 0:a[n==null?void 0:n.code])==null?void 0:U.measure)??"",h=[(n==null?void 0:n.value)??((X=n==null?void 0:n.multiOptions)==null?void 0:X[0])??"",b].filter(Boolean).join(" ");return e.jsxs(P,{ref:ge=>u.current[d]=ge,className:"tag",children:[e.jsx("i",{className:m}),h]},`detailed-products-section-tag__${d+1}`)})})},pe=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((o,n)=>{var h,g,p;const d=((h=o==null?void 0:o.measurementUnit)==null?void 0:h.symbol)??((g=a==null?void 0:a[o==null?void 0:o.code])==null?void 0:g.measure)??"",b=[(o==null?void 0:o.value)??((p=o==null?void 0:o.multiOptions)==null?void 0:p[0])??"",d].filter(Boolean).join(" "),j=o==null?void 0:o.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${j}: `}),e.jsx("span",{className:"tags-popover__value",children:b})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ue=()=>e.jsxs(e.Fragment,{children:[q&&e.jsx(P,{className:"tag",children:q},"detailed-products-section-tag__condition"),O&&e.jsx(P,{className:"tag",children:O},"detailed-products-section-tag__quantity"),V&&e.jsx(P,{className:"tag",children:V},"detailed-products-section-tag__trade")]}),I=C>0&&y&&R!==!0&&L!==!0&&C!==S;return e.jsxs(ke,{ref:s,className:"product-card","data-accessor":f==null?void 0:f.accessor,name:f==null?void 0:f.name,onClick:o=>H(o,s),children:[e.jsxs(xe,{className:"product-image-wrapper",children:[e.jsx(ae,{}),l.isDefined(T)?T:e.jsx(fe.ProductImageWrapper,{src:Z})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:z,children:z}),e.jsx("div",{className:"card-title",children:Y})]}),e.jsxs("div",{className:"wrapper-card-3",children:[M&&e.jsx("div",{...$?{}:{onMouseEnter:le,onMouseLeave:ce},children:e.jsxs(be,{placement:"bottom",open:se,children:[e.jsx(we,{children:he()}),e.jsx(ve,{style:{all:"unset"},children:e.jsx(Se,{children:pe()})})]})}),!M&&ue()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${I?"new-price":""}`,children:[S>0&&y&&R!==!0&&L!==!0&&e.jsx("div",{children:`${l.formatPrice(S)} ${l.GetCurrencySymbol(y)}`}),I&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${l.formatPrice(C)} ${l.GetCurrencySymbol(y)}`}),R&&Q,L&&J]}),e.jsx("div",{className:"location-text",children:K})]}),A===!0&&e.jsx(Pe,{sponsoredText:ee})]})}),qe=k.styled(r.SkeletonRowWrapper)`
299
+ `,Pe=c.forwardRef(({sponsoredText:i="Sponsored"},x)=>e.jsxs(ye,{ref:x,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),_e="Vehicles_Cars",Ce="Vehicles_Motorcycles",Re="Vehicles_Trucks",Le="Vehicles_AgriculturalMachines_Tractors",Ne="Vehicles_ConstructionMachines",We="Vehicles_Bus",$e="Vehicles_Campers",Ee="RealEstates_",s={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},Te=c.forwardRef((i,x)=>{const{uuid:w,sellerUuid:_,name:Y,price:C=0,sellingPrice:S,currency:y,isNegotiable:R,isFree:L,imageUrl:Z,location:K,sponsored:A,imageComponent:T,onSelectCard:H=()=>{},freeText:J="Free",negotiableText:Q="Negotiable",tags:t=[],categoryCode:N,condition:q,quantity:O,trade:V,sponsoredText:ee,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te,onBookmark:W=()=>{},bookmarkComponent:v,bookmarked:B,bookmarkLists:ie,metadata:f,sellerName:z}=i,$=je.useDetectMobile(),se=()=>{var m;if(!l.isDefined(v))return e.jsx(e.Fragment,{});const o=v,n=(m=v==null?void 0:v.props)==null?void 0:m.children,d=c.cloneElement(n,{key:`bookmark_pr__${B}`,bookmarked:B,productUuid:w,onAddToBookmark:()=>W(!0,w),onRemoveFromBookmark:()=>W(!1,w),bookmarkedUuidList:ie,sellerUuid:_,handleBookmarking:W,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te});return c.cloneElement(o,void 0,d)},M=[_e,Ce,Re,Le,Ne,We,$e,Ee].some(o=>N==null?void 0:N.includes(o)),[ae,F]=c.useState(!1),le=()=>{F(!0)},ce=()=>{F(!1)},a=c.useRef(null),u=c.useRef([]),[de,G]=c.useState(t==null?void 0:t.length),me=()=>{var m,b,j;if(!(a!=null&&a.current)||((m=u==null?void 0:u.current)==null?void 0:m.length)===0)return;if($){G(t==null?void 0:t.length);return}const o=(b=a==null?void 0:a.current)==null?void 0:b.offsetWidth;let n=0,d=0;for(let h=0;h<(t==null?void 0:t.length);h++){const g=((j=u==null?void 0:u.current[h])==null?void 0:j.offsetWidth)||0,p=n+g+4;if(p<=o)n+=p,d++;else break}G(d)};c.useEffect(()=>{const o=a==null?void 0:a.current;if(!o)return;const n=new ResizeObserver(()=>{me()});return n.observe(o),()=>{n.disconnect()}},[t,$]);const he=()=>{var o;return e.jsx("div",{className:"tags-popover__trigger",children:(o=t==null?void 0:t.slice(0,de))==null?void 0:o.map((n,d)=>{var g,p,D,U,X;const m=((g=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:g.icon)??((p=s==null?void 0:s.default)==null?void 0:p.icon)??"",b=((D=n==null?void 0:n.measurementUnit)==null?void 0:D.symbol)??((U=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:U.measure)??"",h=[(n==null?void 0:n.value)??((X=n==null?void 0:n.multiOptions)==null?void 0:X[0])??"",b].filter(Boolean).join(" ");return e.jsxs(P,{ref:ge=>u.current[d]=ge,className:"tag",children:[e.jsx("i",{className:m}),h]},`detailed-products-section-tag__${d+1}`)})})},pe=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((o,n)=>{var h,g,p;const d=((h=o==null?void 0:o.measurementUnit)==null?void 0:h.symbol)??((g=s==null?void 0:s[o==null?void 0:o.code])==null?void 0:g.measure)??"",b=[(o==null?void 0:o.value)??((p=o==null?void 0:o.multiOptions)==null?void 0:p[0])??"",d].filter(Boolean).join(" "),j=o==null?void 0:o.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${j}: `}),e.jsx("span",{className:"tags-popover__value",children:b})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ue=()=>e.jsxs(e.Fragment,{children:[q&&e.jsx(P,{className:"tag",children:q},"detailed-products-section-tag__condition"),O&&e.jsx(P,{className:"tag",children:O},"detailed-products-section-tag__quantity"),V&&e.jsx(P,{className:"tag",children:V},"detailed-products-section-tag__trade")]}),I=C>0&&y&&R!==!0&&L!==!0&&C!==S;return e.jsxs(ke,{ref:a,className:"product-card","data-accessor":f==null?void 0:f.accessor,name:f==null?void 0:f.name,onClick:o=>H(o,a),children:[e.jsxs(xe,{className:"product-image-wrapper",children:[e.jsx(se,{}),l.isDefined(T)?T:e.jsx(fe.ProductImageWrapper,{src:Z})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:z,children:z}),e.jsx("div",{className:"card-title",children:Y})]}),e.jsxs("div",{className:"wrapper-card-3",children:[M&&e.jsx("div",{...$?{}:{onMouseEnter:le,onMouseLeave:ce},children:e.jsxs(be,{placement:"bottom",open:ae,children:[e.jsx(we,{children:he()}),e.jsx(ve,{style:{all:"unset"},children:e.jsx(Se,{children:pe()})})]})}),!M&&ue()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${I?"new-price":""}`,children:[S>0&&y&&R!==!0&&L!==!0&&e.jsx("div",{children:`${l.formatPrice(S)} ${l.GetCurrencySymbol(y)}`}),I&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${l.formatPrice(C)} ${l.GetCurrencySymbol(y)}`}),R&&Q,L&&J]}),e.jsx("div",{className:"location-text",children:K})]}),A===!0&&e.jsx(Pe,{sponsoredText:ee})]})}),qe=k.styled(r.SkeletonRowWrapper)`
298
300
  @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
299
301
  & > div {
300
302
  &:nth-of-type(even) {
@@ -242,6 +242,8 @@ const Ge = C.div`
242
242
 
243
243
  & .bookmarking-btn {
244
244
  display: flex;
245
+ bottom: 0.5rem;
246
+ top: unset;
245
247
  }
246
248
  }
247
249
  `, Fe = C.div`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.171",
3
+ "version": "4.0.172",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [