@lanaco/lnc-react-ui 4.0.139 → 4.0.140

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"),s=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),D=require("./Button.cjs"),y=require("./utils-Dl9xPH4c.cjs"),U=require("./useDetectMobile-zkbzoOGV.cjs"),M=require("./style-CyHewQxg.cjs"),C=require("./suspense-product-card-detailed-DXSdrL-5.cjs"),F=require("./index-D0xXo7W6.cjs"),T=k.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),U=require("./Button.cjs"),C=require("./utils-Dl9xPH4c.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./style-CyHewQxg.cjs"),f=require("./suspense-product-card-detailed-C7_tBl85.cjs"),F=require("./index-D0xXo7W6.cjs"),E=v.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
@@ -7,7 +7,7 @@
7
7
  white-space: nowrap;
8
8
  }
9
9
 
10
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
10
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
11
11
  display: flex;
12
12
  gap: 1rem;
13
13
  overflow-x: auto;
@@ -26,4 +26,4 @@
26
26
  /* Safari and Chrome */
27
27
  }
28
28
  }
29
- `,S=s.memo(C.DetailedProductCard),E=s.forwardRef((l,h)=>{const{icon:a,title:f,buttonLink:c,items:t,buttonText:q,limit:o=4,onSelectCard:d=()=>{},onButtonAction:j=()=>{},isLoading:w=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:P="All"}=l,b=U.useDetectMobile(),N=s.useMemo(()=>i.jsx(i.Fragment,{children:b===!0?t==null?void 0:t.map((e,r)=>i.jsx(S,{title:e==null?void 0:e.title,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,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(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,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},r)):t==null?void 0:t.slice(0,o).map((e,r)=>i.jsx(S,{title:e==null?void 0:e.title,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,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(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,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},r))}),[t,b,o]);return i.jsxs(M.TitleWithOptionsSectionWrapper,{ref:h,children:[i.jsxs("div",{className:"regular-title",children:[i.jsxs("div",{className:"regular-title-text",children:[y.isDefinedNotEmptyString(a)&&i.jsx("i",{className:a}),i.jsx("span",{children:f})]}),y.isDefinedNotEmptyString(c)&&i.jsx(D,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),j(c)},borderRadius:"curved",className:"button-link",children:q})]}),(n==null?void 0:n.length)>0&&i.jsx(F.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:P}),i.jsx(T,{limit:o,children:i.jsx(C.SuspenseDetailedProductCard,{isLoading:w,limit:o,keyPrefix:"explore-landing",children:N})})]})});module.exports=E;
29
+ `,h=s.memo(f.DetailedProductCard),R=s.forwardRef((l,q)=>{const{icon:a,title:S,buttonLink:c,items:i,buttonText:j,limit:o=4,onSelectCard:d=()=>{},onButtonAction:w=()=>{},isLoading:P=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:N="All",sponsoredText:b}=l,y=M.useDetectMobile(),k=s.useMemo(()=>t.jsx(t.Fragment,{children:y===!0?i==null?void 0:i.map((e,r)=>t.jsx(h,{title:e==null?void 0:e.title,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:()=>d(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,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:b},r)):i==null?void 0:i.slice(0,o).map((e,r)=>t.jsx(h,{title:e==null?void 0:e.title,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:()=>d(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,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:b},r))}),[i,y,o]);return t.jsxs(T.TitleWithOptionsSectionWrapper,{ref:q,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[C.isDefinedNotEmptyString(a)&&t.jsx("i",{className:a}),t.jsx("span",{children:S})]}),C.isDefinedNotEmptyString(c)&&t.jsx(U,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),w(c)},borderRadius:"curved",className:"button-link",children:j})]}),(n==null?void 0:n.length)>0&&t.jsx(F.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:N}),t.jsx(E,{limit:o,children:t.jsx(f.SuspenseDetailedProductCard,{isLoading:P,limit:o,keyPrefix:"explore-landing",children:k})})]})});module.exports=R;
@@ -1,23 +1,23 @@
1
- import { jsx as i, Fragment as v, jsxs as l } from "react/jsx-runtime";
2
- import { memo as U, forwardRef as M, useMemo as T } from "react";
3
- import { s as D } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as F } from "./consts-BuFChS64.js";
5
- import q from "./Button.js";
6
- import { k as f } from "./utils-BdsZgOUE.js";
7
- import { u as B } from "./useDetectMobile-Bkvj0VMa.js";
8
- import { T as E } from "./style-DFPWLJBr.js";
9
- import { D as I, S as L } from "./suspense-product-card-detailed-DIWv_91e.js";
10
- import { S as O } from "./index-Dweo-G3H.js";
11
- const R = D.div`
1
+ import { jsx as i, Fragment as T, jsxs as l } from "react/jsx-runtime";
2
+ import { memo as U, forwardRef as M, useMemo as D } from "react";
3
+ import { s as F } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as q } from "./consts-BuFChS64.js";
5
+ import B from "./Button.js";
6
+ import { k as y } from "./utils-BdsZgOUE.js";
7
+ import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
8
+ import { T as I } from "./style-DFPWLJBr.js";
9
+ import { D as L, S as O } from "./suspense-product-card-detailed-DtTXmJJB.js";
10
+ import { S as R } from "./index-Dweo-G3H.js";
11
+ const W = F.div`
12
12
  display: grid;
13
- grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
13
+ grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
15
15
 
16
16
  & .button-link {
17
17
  white-space: nowrap;
18
18
  }
19
19
 
20
- @media (max-width: ${F + "px"}) {
20
+ @media (max-width: ${q + "px"}) {
21
21
  display: flex;
22
22
  gap: 1rem;
23
23
  overflow-x: auto;
@@ -36,29 +36,30 @@ const R = D.div`
36
36
  /* Safari and Chrome */
37
37
  }
38
38
  }
39
- `, y = U(I), H = M((n, S) => {
39
+ `, C = U(L), J = M((a, h) => {
40
40
  const {
41
41
  icon: s,
42
- title: C,
42
+ title: S,
43
43
  buttonLink: d,
44
44
  items: t,
45
- buttonText: h,
45
+ buttonText: w,
46
46
  limit: o = 4,
47
47
  onSelectCard: c = () => {
48
48
  },
49
- onButtonAction: w = () => {
49
+ onButtonAction: P = () => {
50
50
  },
51
- isLoading: P = !1,
51
+ isLoading: k = !1,
52
52
  getImage: m = () => {
53
53
  },
54
54
  negotiableText: u,
55
55
  freeText: p,
56
- options: a,
56
+ options: n,
57
57
  onSelectOption: g = () => {
58
58
  },
59
- productsToolbarName: k = "All"
60
- } = n, b = B(), N = T(() => /* @__PURE__ */ i(v, { children: b === !0 ? t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ i(
61
- y,
59
+ productsToolbarName: N = "All",
60
+ sponsoredText: b
61
+ } = a, f = E(), v = D(() => /* @__PURE__ */ i(T, { children: f === !0 ? t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ i(
62
+ C,
62
63
  {
63
64
  title: e == null ? void 0 : e.title,
64
65
  price: e == null ? void 0 : e.price,
@@ -67,7 +68,7 @@ const R = D.div`
67
68
  image: e == null ? void 0 : e.image,
68
69
  sellerUuid: e == null ? void 0 : e.sellerUuid,
69
70
  uuid: e == null ? void 0 : e.uuid,
70
- isSponsored: e == null ? void 0 : e.isSponsored,
71
+ sponsored: e == null ? void 0 : e.sponsored,
71
72
  imageComponent: e == null ? void 0 : e.imageComponent,
72
73
  onSelectCard: () => c(e == null ? void 0 : e.uuid),
73
74
  imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
@@ -79,11 +80,12 @@ const R = D.div`
79
80
  categoryCode: e == null ? void 0 : e.categoryCode,
80
81
  condition: e == null ? void 0 : e.condition,
81
82
  quantity: e == null ? void 0 : e.quantity,
82
- trade: e == null ? void 0 : e.trade
83
+ trade: e == null ? void 0 : e.trade,
84
+ sponsoredText: b
83
85
  },
84
86
  r
85
87
  )) : t == null ? void 0 : t.slice(0, o).map((e, r) => /* @__PURE__ */ i(
86
- y,
88
+ C,
87
89
  {
88
90
  title: e == null ? void 0 : e.title,
89
91
  price: e == null ? void 0 : e.price,
@@ -93,7 +95,7 @@ const R = D.div`
93
95
  sellerUuid: e == null ? void 0 : e.sellerUuid,
94
96
  uuid: e == null ? void 0 : e.uuid,
95
97
  location: e == null ? void 0 : e.location,
96
- isSponsored: e == null ? void 0 : e.isSponsored,
98
+ sponsored: e == null ? void 0 : e.sponsored,
97
99
  imageComponent: e == null ? void 0 : e.imageComponent,
98
100
  onSelectCard: () => c(e == null ? void 0 : e.uuid),
99
101
  imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
@@ -105,36 +107,37 @@ const R = D.div`
105
107
  categoryCode: e == null ? void 0 : e.categoryCode,
106
108
  condition: e == null ? void 0 : e.condition,
107
109
  quantity: e == null ? void 0 : e.quantity,
108
- trade: e == null ? void 0 : e.trade
110
+ trade: e == null ? void 0 : e.trade,
111
+ sponsoredText: b
109
112
  },
110
113
  r
111
- )) }), [t, b, o]);
112
- return /* @__PURE__ */ l(E, { ref: S, children: [
114
+ )) }), [t, f, o]);
115
+ return /* @__PURE__ */ l(I, { ref: h, children: [
113
116
  /* @__PURE__ */ l("div", { className: "regular-title", children: [
114
117
  /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
115
- f(s) && /* @__PURE__ */ i("i", { className: s }),
116
- /* @__PURE__ */ i("span", { children: C })
118
+ y(s) && /* @__PURE__ */ i("i", { className: s }),
119
+ /* @__PURE__ */ i("span", { children: S })
117
120
  ] }),
118
- f(d) && /* @__PURE__ */ i(
119
- q,
121
+ y(d) && /* @__PURE__ */ i(
122
+ B,
120
123
  {
121
124
  type: "button",
122
125
  btnType: "tinted",
123
126
  color: "neutral",
124
127
  onClick: (e) => {
125
128
  var r;
126
- (r = e == null ? void 0 : e.target) == null || r.blur(), w(d);
129
+ (r = e == null ? void 0 : e.target) == null || r.blur(), P(d);
127
130
  },
128
131
  borderRadius: "curved",
129
132
  className: "button-link",
130
- children: h
133
+ children: w
131
134
  }
132
135
  )
133
136
  ] }),
134
- (a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ i(
135
- O,
137
+ (n == null ? void 0 : n.length) > 0 && /* @__PURE__ */ i(
138
+ R,
136
139
  {
137
- items: a,
140
+ items: n,
138
141
  onRemove: (e) => {
139
142
  g(e);
140
143
  },
@@ -144,20 +147,20 @@ const R = D.div`
144
147
  labelKey: "name",
145
148
  valueKey: "code",
146
149
  noMargin: !0,
147
- productsToolbarName: k
150
+ productsToolbarName: N
148
151
  }
149
152
  ),
150
- /* @__PURE__ */ i(R, { limit: o, children: /* @__PURE__ */ i(
151
- L,
153
+ /* @__PURE__ */ i(W, { limit: o, children: /* @__PURE__ */ i(
154
+ O,
152
155
  {
153
- isLoading: P,
156
+ isLoading: k,
154
157
  limit: o,
155
158
  keyPrefix: "explore-landing",
156
- children: N
159
+ children: v
157
160
  }
158
161
  ) })
159
162
  ] });
160
163
  });
161
164
  export {
162
- H as default
165
+ J as default
163
166
  };
@@ -1,4 +1,4 @@
1
- "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-DXSdrL-5.cjs"),C=P.styled.div`
1
+ "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-C7_tBl85.cjs"),C=P.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
4
  grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
@@ -4,7 +4,7 @@ import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as L, S as F } from "./consts-BuFChS64.js";
5
5
  import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
6
6
  import T from "./Button.js";
7
- import { D as _, S as D } from "./suspense-product-card-detailed-DIWv_91e.js";
7
+ import { D as _, S as D } from "./suspense-product-card-detailed-DtTXmJJB.js";
8
8
  const E = C.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -0,0 +1,246 @@
1
+ "use strict";const e=require("react/jsx-runtime"),d=require("react"),t=require("./utils-Dl9xPH4c.cjs"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),te=require("./index-BueKsXT8.cjs"),_=require("./Badge.cjs"),oe=require("./Popover.cjs"),se=require("./PopoverTrigger.cjs"),ie=require("./PopoverContent.cjs"),ae=require("./useDetectMobile-zkbzoOGV.cjs"),D=require("./consts-goSZX3xP.cjs"),I=x.styled.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 0.5rem;
5
+ cursor: pointer;
6
+ overflow: hidden;
7
+ width: 100%;
8
+
9
+ & .wrapper-card-1 {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 0.38rem;
13
+ }
14
+
15
+ & .wrapper-card-2 {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 0;
19
+ }
20
+
21
+ & .wrapper-card-3 {
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ gap: 0.25rem;
25
+
26
+ & > div {
27
+ & > div {
28
+ width: 100% !important;
29
+ }
30
+ }
31
+ }
32
+
33
+ & .tag {
34
+ height: 1.5rem;
35
+ gap: 0.25rem;
36
+ padding: 0.25rem 0.375rem;
37
+ border-radius: 0.375rem;
38
+ background: #f9fafb;
39
+ border: 1px solid var(--gray-95012, #14161a1f);
40
+ font-weight: 400;
41
+ font-size: 0.75rem;
42
+ line-height: 1rem;
43
+ letter-spacing: 0.025rem;
44
+ color: var(--gray-950, #14161a);
45
+ white-space: nowrap;
46
+ flex: 0 0 auto;
47
+
48
+ &.tag-sponsored {
49
+ & i {
50
+ color: var(--yellow-500, #f59e0b);
51
+ }
52
+ }
53
+ }
54
+
55
+ & .tag-mobile {
56
+ font-weight: 400;
57
+ font-size: 0.75rem;
58
+ line-height: 1rem;
59
+ letter-spacing: 0.025rem;
60
+ color: var(--gray-600, #676e79);
61
+ }
62
+
63
+ & .card-title {
64
+ font-size: 0.875rem;
65
+ font-weight: 600;
66
+ ${t.truncateTextInRows(2)}
67
+ }
68
+
69
+ & .price-text {
70
+ font-size: 1rem;
71
+ font-weight: 600;
72
+ ${t.truncateText()}
73
+ display: flex;
74
+ align-items: end;
75
+ gap: 0.5rem;
76
+ color: var(--gray-950, #14161a);
77
+
78
+ &.new-price {
79
+ color: var(--danger-600, #e11d48);
80
+ }
81
+
82
+ & .full-price {
83
+ text-decoration: line-through;
84
+ font-size: 0.75rem;
85
+ font-weight: 400;
86
+ padding-bottom: 0.125rem;
87
+ color: var(--gray-600, #676e79);
88
+ }
89
+ }
90
+
91
+ & .location-text {
92
+ font-size: 0.75rem;
93
+ font-weight: 400;
94
+ color: var(--gray-600, #676e79);
95
+ ${t.truncateText()}
96
+ }
97
+
98
+ & .tags-wrapper {
99
+ display: flex;
100
+ gap: 0.5rem;
101
+ }
102
+
103
+ & .skeleton-img {
104
+ background-color: ${t.linearGradientAnimation("-90deg")};
105
+ border-radius: 0.75rem;
106
+ border: 1px solid white;
107
+ }
108
+
109
+ & .skeleton-title {
110
+ background-color: ${t.linearGradientAnimation("-90deg")};
111
+ width: 100%;
112
+ height: 2.5rem;
113
+ }
114
+
115
+ & .skeleton-tags {
116
+ background-color: ${t.linearGradientAnimation("-90deg")};
117
+ width: 80%;
118
+ height: 1.5rem;
119
+ }
120
+
121
+ & .skeleton-price {
122
+ background-color: ${t.linearGradientAnimation("-90deg")};
123
+ width: 50%;
124
+ height: 2.5rem;
125
+ }
126
+
127
+ & .skeleton-sponsored {
128
+ background-color: ${t.linearGradientAnimation("-90deg")};
129
+ width: 50%;
130
+ height: 1rem;
131
+ }
132
+
133
+ & .tags-popover__trigger {
134
+ display: flex;
135
+ gap: 0.25rem;
136
+ }
137
+
138
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
139
+ overflow: visible;
140
+
141
+ & .tags-popover__trigger {
142
+ flex-wrap: wrap;
143
+ }
144
+
145
+ & .price-text {
146
+ font-size: 0.875rem;
147
+ font-weight: 600;
148
+
149
+ & .full-price {
150
+ display: none;
151
+ }
152
+ }
153
+ }
154
+
155
+ &:hover .product-image-wrapper img {
156
+ transform: scale(1.1);
157
+ }
158
+ `,ce=x.styled.div`
159
+ position: relative;
160
+ overflow: hidden;
161
+ border-radius: 0.75rem;
162
+ width: 100%;
163
+ aspect-ratio: 1 / 1;
164
+ border: 1px solid #0c15201f;
165
+
166
+ & img {
167
+ display: block;
168
+ width: 100%;
169
+ height: 100%;
170
+ object-fit: cover;
171
+ border-radius: 0.75rem;
172
+ transition: var(--transition, all 0.3s ease);
173
+ }
174
+
175
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
176
+ & img {
177
+ width: 8.875rem;
178
+ height: 8.875rem;
179
+ min-width: 8.875rem;
180
+ min-height: 8.875rem;
181
+ object-fit: cover;
182
+ }
183
+ }
184
+ `,le=x.styled.div`
185
+ background: var(--white, #fff);
186
+ z-index: 1;
187
+
188
+ border: 1px solid var(--gray-200, #dddfe4);
189
+ border-radius: 0.5rem;
190
+ line-height: 1rem;
191
+ position: absolute;
192
+ padding: 0.5rem 0.75rem;
193
+ top: 0.5rem;
194
+ left: 25%;
195
+ transform: translateX(-50%);
196
+ min-width: 13rem;
197
+
198
+ &::before,
199
+ &::after {
200
+ content: "";
201
+ position: absolute;
202
+ left: 50%;
203
+ transform: translateX(-50%);
204
+ border-style: solid;
205
+ border-width: 0.625rem;
206
+ }
207
+
208
+ &::after {
209
+ top: -1.1875rem;
210
+ border-color: transparent transparent var(--white, #fff) transparent;
211
+ }
212
+
213
+ &::before {
214
+ top: -1.25rem;
215
+ border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
216
+ }
217
+
218
+ & .tags-popover__content {
219
+ display: flex;
220
+ flex-wrap: wrap;
221
+ flex-direction: column;
222
+ gap: 0.375rem;
223
+ font-size: 0.75rem;
224
+ font-weight: 400;
225
+
226
+ & .tags-popover__name {
227
+ color: var(--gray-600, #676e79);
228
+ }
229
+
230
+ & .tags-popover__value {
231
+ color: var(--gray-950, #14161a);
232
+ }
233
+ }
234
+ `,de=x.styled.div`
235
+ display: flex;
236
+ align-items: center;
237
+ gap: 0.25rem;
238
+ color: var(--gray-500);
239
+ font-size: 0.75rem;
240
+ font-weight: 500;
241
+
242
+ & i {
243
+ font-size: 1rem;
244
+ color: var(--warning-500, #F59E0B);
245
+ }
246
+ `,me=d.forwardRef(({sponsoredText:m="Sponsored"},v)=>e.jsxs(de,{ref:v,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:m})]})),pe="Vehicles_Cars",ge="Vehicles_Motorcycles",ue="Vehicles_Trucks",he="Vehicles_AgriculturalMachines_Tractors",fe="Vehicles_ConstructionMachines",ve="Vehicles_Bus",we="Vehicles_Campers",ye="RealEstates_",i={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:""}},be=d.forwardRef((m,v)=>{const{title:w,price:y=0,sellingPrice:p,currency:j,isNegotiable:N,isFree:C,imageUrl:G,location:R,sponsored:T,imageComponent:O,onSelectCard:A=()=>{},freeText:X="Free",negotiableText:L="Negotiable",tags:o=[],categoryCode:k,condition:P,quantity:$,trade:S,sponsoredText:U}=m,E=ae.useDetectMobile(),V=[pe,ge,ue,he,fe,ve,we,ye].some(r=>k==null?void 0:k.includes(r)),[Y,M]=d.useState(!1),K=()=>{M(!0)},Z=()=>{M(!1)},a=d.useRef(null),u=d.useRef([]),[q,H]=d.useState(o==null?void 0:o.length),J=()=>{var h,c,b;if(!(a!=null&&a.current)||((h=u==null?void 0:u.current)==null?void 0:h.length)===0)return;const r=(c=a==null?void 0:a.current)==null?void 0:c.offsetWidth;let n=0,s=0;for(let l=0;l<(o==null?void 0:o.length);l++){const f=((b=u==null?void 0:u.current[l])==null?void 0:b.offsetWidth)||0,g=n+f+4;if(g<=r)n+=g,s++;else break}H(s)};d.useEffect(()=>{const r=a==null?void 0:a.current;if(!r)return;const n=new ResizeObserver(()=>{J()});return n.observe(r),()=>{n.disconnect()}},[o]);const Q=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=o==null?void 0:o.slice(0,q))==null?void 0:r.map((n,s)=>{var f,g,W,B,F;const h=((f=i==null?void 0:i[n==null?void 0:n.code])==null?void 0:f.icon)??((g=i==null?void 0:i.default)==null?void 0:g.icon)??"",c=((W=n==null?void 0:n.measurementUnit)==null?void 0:W.symbol)??((B=i==null?void 0:i[n==null?void 0:n.code])==null?void 0:B.measure)??"",l=[(n==null?void 0:n.value)??((F=n==null?void 0:n.multiOptions)==null?void 0:F[0])??"",c].filter(Boolean).join(" ");return E?e.jsxs("div",{className:"tag-mobile",children:[l,s<q-1?" · ":""]}):e.jsxs(_,{ref:ne=>u.current[s]=ne,className:`tag ${T?"tag-sponsored":""}`,children:[e.jsx("i",{className:h}),l]},`detailed-products-section-tag__${s+1}`)})})},ee=()=>e.jsx("div",{className:"tags-popover__content",children:o==null?void 0:o.map((r,n)=>{var l,f,g;const s=((l=r==null?void 0:r.measurementUnit)==null?void 0:l.symbol)??((f=i==null?void 0:i[r==null?void 0:r.code])==null?void 0:f.measure)??"",c=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",s].filter(Boolean).join(" "),b=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${b}: `}),e.jsx("span",{className:"tags-popover__value",children:c})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),re=()=>{var r;if(E){const n=[P,$,S];return(r=n==null?void 0:n.filter(s=>t.isDefinedNotEmptyString(s)))==null?void 0:r.map((s,h,c)=>e.jsxs("div",{className:"tag-mobile",children:[s,h<(c==null?void 0:c.length)-1?" · ":""]}))}return e.jsxs(e.Fragment,{children:[P&&e.jsx(_,{className:"tag",children:P},"detailed-products-section-tag__condition"),$&&e.jsx(_,{className:"tag",children:$},"detailed-products-section-tag__quantity"),S&&e.jsx(_,{className:"tag",children:S},"detailed-products-section-tag__trade")]})},z=y>0&&j&&N!==!0&&C!==!0&&y!==p;return e.jsxs(I,{ref:a,className:"product-card",onClick:A,children:[e.jsx(ce,{className:"product-image-wrapper",children:t.isDefined(O)?O:e.jsx(te.ProductImageWrapper,{src:G})}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:w})}),e.jsxs("div",{className:"wrapper-card-3",children:[V&&e.jsx("div",{...E?{}:{onMouseEnter:K,onMouseLeave:Z},children:e.jsxs(oe,{placement:"bottom",open:Y,children:[e.jsx(se,{children:Q()}),e.jsx(ie,{style:{all:"unset"},children:e.jsx(le,{children:ee()})})]})}),!V&&re()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${z?"new-price":""}`,children:[p>0&&j&&N!==!0&&C!==!0&&e.jsx("div",{children:`${t.formatPrice(p)} ${t.GetCurrencySymbol(j)}`}),z&&e.jsx("div",{className:`${p>0?"full-price":""}`,children:`${t.formatPrice(y)} ${t.GetCurrencySymbol(j)}`}),N&&L,C&&X]}),e.jsx("div",{className:"location-text",children:R})]}),T===!0&&e.jsx(me,{sponsoredText:U})]})}),je=d.forwardRef(({},m)=>e.jsxs(I,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),_e=({limit:m=5,isLoading:v=!1,keyPrefix:w})=>e.jsx(e.Fragment,{children:Array.from({length:m},(y,p)=>e.jsx(je,{isLoading:v},`${w}-skeleton-product-card-${p}`))}),xe=({children:m,fallbackComponent:v=e.jsx(e.Fragment,{}),isLoading:w=!1,limit:y,keyPrefix:p})=>e.jsx(d.Suspense,{fallbackComponent:v,children:w===!0?e.jsx(_e,{isLoading:w,limit:y,keyPrefix:p}):m});exports.DetailedProductCard=be;exports.SuspenseDetailedProductCard=xe;