@lanaco/lnc-react-ui 4.0.138 → 4.0.139
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.
- package/dist/DetailedProductsSection.cjs +5 -5
- package/dist/DetailedProductsSection.js +61 -52
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/suspense-product-card-detailed-DIWv_91e.js +475 -0
- package/dist/suspense-product-card-detailed-DXSdrL-5.cjs +226 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-BJLmsTWB.cjs +0 -131
- package/dist/suspense-product-card-detailed-D6191kXr.js +0 -209
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),
|
|
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`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
4
|
-
gap:
|
|
3
|
+
grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
|
|
4
|
+
gap: 1.25rem;
|
|
5
5
|
|
|
6
6
|
& .button-link {
|
|
7
7
|
white-space: nowrap;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
@media (max-width: ${
|
|
10
|
+
@media (max-width: ${v.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(
|
|
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;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import
|
|
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
6
|
import { k as f } from "./utils-BdsZgOUE.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { T as
|
|
9
|
-
import { D as
|
|
10
|
-
import { S as
|
|
11
|
-
const
|
|
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`
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: ${(
|
|
14
|
-
gap:
|
|
13
|
+
grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
|
|
14
|
+
gap: 1.25rem;
|
|
15
15
|
|
|
16
16
|
& .button-link {
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@media (max-width: ${
|
|
20
|
+
@media (max-width: ${F + "px"}) {
|
|
21
21
|
display: flex;
|
|
22
22
|
gap: 1rem;
|
|
23
23
|
overflow-x: auto;
|
|
@@ -36,32 +36,31 @@ const W = F.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, y = U(I), H = M((n, S) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: s,
|
|
42
|
-
title:
|
|
42
|
+
title: C,
|
|
43
43
|
buttonLink: d,
|
|
44
|
-
items:
|
|
45
|
-
buttonText:
|
|
46
|
-
limit:
|
|
47
|
-
gap: C,
|
|
44
|
+
items: t,
|
|
45
|
+
buttonText: h,
|
|
46
|
+
limit: o = 4,
|
|
48
47
|
onSelectCard: c = () => {
|
|
49
48
|
},
|
|
50
|
-
onButtonAction:
|
|
49
|
+
onButtonAction: w = () => {
|
|
51
50
|
},
|
|
52
|
-
isLoading:
|
|
51
|
+
isLoading: P = !1,
|
|
53
52
|
getImage: m = () => {
|
|
54
53
|
},
|
|
55
54
|
negotiableText: u,
|
|
56
55
|
freeText: p,
|
|
57
|
-
options:
|
|
56
|
+
options: a,
|
|
58
57
|
onSelectOption: g = () => {
|
|
59
58
|
},
|
|
60
|
-
productsToolbarName:
|
|
61
|
-
} =
|
|
62
|
-
|
|
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,
|
|
63
62
|
{
|
|
64
|
-
title: e == null ? void 0 : e.
|
|
63
|
+
title: e == null ? void 0 : e.title,
|
|
65
64
|
price: e == null ? void 0 : e.price,
|
|
66
65
|
sellingPrice: e == null ? void 0 : e.sellingPrice,
|
|
67
66
|
currency: e == null ? void 0 : e.currency,
|
|
@@ -75,13 +74,18 @@ const W = F.div`
|
|
|
75
74
|
isFree: e == null ? void 0 : e.isFree,
|
|
76
75
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
77
76
|
negotiableText: u,
|
|
78
|
-
freeText: p
|
|
77
|
+
freeText: p,
|
|
78
|
+
tags: e == null ? void 0 : e.tags,
|
|
79
|
+
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
80
|
+
condition: e == null ? void 0 : e.condition,
|
|
81
|
+
quantity: e == null ? void 0 : e.quantity,
|
|
82
|
+
trade: e == null ? void 0 : e.trade
|
|
79
83
|
},
|
|
80
|
-
|
|
81
|
-
)) :
|
|
82
|
-
|
|
84
|
+
r
|
|
85
|
+
)) : t == null ? void 0 : t.slice(0, o).map((e, r) => /* @__PURE__ */ i(
|
|
86
|
+
y,
|
|
83
87
|
{
|
|
84
|
-
title: e == null ? void 0 : e.
|
|
88
|
+
title: e == null ? void 0 : e.title,
|
|
85
89
|
price: e == null ? void 0 : e.price,
|
|
86
90
|
sellingPrice: e == null ? void 0 : e.sellingPrice,
|
|
87
91
|
currency: e == null ? void 0 : e.currency,
|
|
@@ -96,36 +100,41 @@ const W = F.div`
|
|
|
96
100
|
isFree: e == null ? void 0 : e.isFree,
|
|
97
101
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
98
102
|
negotiableText: u,
|
|
99
|
-
freeText: p
|
|
103
|
+
freeText: p,
|
|
104
|
+
tags: e == null ? void 0 : e.tags,
|
|
105
|
+
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
106
|
+
condition: e == null ? void 0 : e.condition,
|
|
107
|
+
quantity: e == null ? void 0 : e.quantity,
|
|
108
|
+
trade: e == null ? void 0 : e.trade
|
|
100
109
|
},
|
|
101
|
-
|
|
102
|
-
)) }), [
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
110
|
+
r
|
|
111
|
+
)) }), [t, b, o]);
|
|
112
|
+
return /* @__PURE__ */ l(E, { ref: S, children: [
|
|
113
|
+
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
114
|
+
/* @__PURE__ */ l("div", { className: "regular-title-text", children: [
|
|
106
115
|
f(s) && /* @__PURE__ */ i("i", { className: s }),
|
|
107
|
-
/* @__PURE__ */ i("span", { children:
|
|
116
|
+
/* @__PURE__ */ i("span", { children: C })
|
|
108
117
|
] }),
|
|
109
118
|
f(d) && /* @__PURE__ */ i(
|
|
110
|
-
|
|
119
|
+
q,
|
|
111
120
|
{
|
|
112
121
|
type: "button",
|
|
113
122
|
btnType: "tinted",
|
|
114
123
|
color: "neutral",
|
|
115
124
|
onClick: (e) => {
|
|
116
|
-
var
|
|
117
|
-
(
|
|
125
|
+
var r;
|
|
126
|
+
(r = e == null ? void 0 : e.target) == null || r.blur(), w(d);
|
|
118
127
|
},
|
|
119
128
|
borderRadius: "curved",
|
|
120
129
|
className: "button-link",
|
|
121
|
-
children:
|
|
130
|
+
children: h
|
|
122
131
|
}
|
|
123
132
|
)
|
|
124
133
|
] }),
|
|
125
|
-
(
|
|
126
|
-
|
|
134
|
+
(a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ i(
|
|
135
|
+
O,
|
|
127
136
|
{
|
|
128
|
-
items:
|
|
137
|
+
items: a,
|
|
129
138
|
onRemove: (e) => {
|
|
130
139
|
g(e);
|
|
131
140
|
},
|
|
@@ -135,20 +144,20 @@ const W = F.div`
|
|
|
135
144
|
labelKey: "name",
|
|
136
145
|
valueKey: "code",
|
|
137
146
|
noMargin: !0,
|
|
138
|
-
productsToolbarName:
|
|
147
|
+
productsToolbarName: k
|
|
139
148
|
}
|
|
140
149
|
),
|
|
141
|
-
/* @__PURE__ */ i(
|
|
142
|
-
|
|
150
|
+
/* @__PURE__ */ i(R, { limit: o, children: /* @__PURE__ */ i(
|
|
151
|
+
L,
|
|
143
152
|
{
|
|
144
|
-
isLoading:
|
|
145
|
-
limit:
|
|
153
|
+
isLoading: P,
|
|
154
|
+
limit: o,
|
|
146
155
|
keyPrefix: "explore-landing",
|
|
147
|
-
children:
|
|
156
|
+
children: N
|
|
148
157
|
}
|
|
149
158
|
) })
|
|
150
159
|
] });
|
|
151
160
|
});
|
|
152
161
|
export {
|
|
153
|
-
|
|
162
|
+
H as default
|
|
154
163
|
};
|
|
@@ -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-
|
|
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`
|
|
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-
|
|
7
|
+
import { D as _, S as D } from "./suspense-product-card-detailed-DIWv_91e.js";
|
|
8
8
|
const E = C.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { jsxs as o, jsx as r, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as V, useState as x, Suspense as ee } from "react";
|
|
3
|
+
import { p as re, t as I, o as u, l as oe, q as D, G as j } from "./utils-BdsZgOUE.js";
|
|
4
|
+
import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
+
import { P as ne } from "./index-CF3HhgvN.js";
|
|
6
|
+
import v from "./Badge.js";
|
|
7
|
+
import ae from "./Popover.js";
|
|
8
|
+
import te from "./PopoverTrigger.js";
|
|
9
|
+
import ie from "./PopoverContent.js";
|
|
10
|
+
import { u as se } from "./useDetectMobile-Bkvj0VMa.js";
|
|
11
|
+
import { M as W } from "./consts-BuFChS64.js";
|
|
12
|
+
const G = w.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 0.5rem;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
& .wrapper-card-1 {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 0.38rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
& .wrapper-card-2 {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
& .wrapper-card-3 {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
gap: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& .tag {
|
|
37
|
+
height: 1.5rem;
|
|
38
|
+
gap: 0.25rem;
|
|
39
|
+
padding: 0.25rem 0.375rem;
|
|
40
|
+
border-radius: 0.375rem;
|
|
41
|
+
background: #f9fafb;
|
|
42
|
+
border: 1px solid var(--gray-95012, #14161a1f);
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
font-size: 0.75rem;
|
|
45
|
+
line-height: 1rem;
|
|
46
|
+
letter-spacing: 0.025rem;
|
|
47
|
+
color: var(--gray-950, #14161a);
|
|
48
|
+
|
|
49
|
+
&.tag-sponsored {
|
|
50
|
+
& i {
|
|
51
|
+
color: var(--yellow-500, #f59e0b);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& .tag-mobile {
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
font-size: 0.75rem;
|
|
59
|
+
line-height: 1rem;
|
|
60
|
+
letter-spacing: 0.025rem;
|
|
61
|
+
color: var(--gray-600, #676e79);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& .card-title {
|
|
65
|
+
font-size: 0.875rem;
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
${re(2)}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& .price-text {
|
|
71
|
+
font-size: 1rem;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
${I()}
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: end;
|
|
76
|
+
gap: 0.5rem;
|
|
77
|
+
|
|
78
|
+
& .full-price {
|
|
79
|
+
text-decoration: line-through;
|
|
80
|
+
font-size: 0.75rem;
|
|
81
|
+
font-weight: 400;
|
|
82
|
+
padding-bottom: 0.125rem;
|
|
83
|
+
color: var(--danger-600, #e11d48);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
& .location-text {
|
|
88
|
+
font-size: 0.75rem;
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
color: var(--gray-600, #676e79);
|
|
91
|
+
${I()}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
& .tags-wrapper {
|
|
95
|
+
display: flex;
|
|
96
|
+
gap: 0.5rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& .skeleton-img {
|
|
100
|
+
background-color: ${u("-90deg")};
|
|
101
|
+
border-radius: 0.75rem;
|
|
102
|
+
border: 1px solid white;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& .skeleton-title {
|
|
106
|
+
background-color: ${u("-90deg")};
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 2.5rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
& .skeleton-tags {
|
|
112
|
+
background-color: ${u("-90deg")};
|
|
113
|
+
width: 80%;
|
|
114
|
+
height: 1.5rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
& .skeleton-price {
|
|
118
|
+
background-color: ${u("-90deg")};
|
|
119
|
+
width: 50%;
|
|
120
|
+
height: 2.5rem;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& .skeleton-sponsored {
|
|
124
|
+
background-color: ${u("-90deg")};
|
|
125
|
+
width: 50%;
|
|
126
|
+
height: 1rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
& .tags-popover__trigger {
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-wrap: wrap;
|
|
132
|
+
gap: 0.25rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media (max-width: ${W + "px"}) {
|
|
136
|
+
& .price-text {
|
|
137
|
+
font-size: 0.875rem;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
|
|
140
|
+
& .full-price {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:hover .product-image-wrapper img {
|
|
147
|
+
transform: scale(1.1);
|
|
148
|
+
}
|
|
149
|
+
`, ce = w.div`
|
|
150
|
+
position: relative;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
border-radius: 0.75rem;
|
|
153
|
+
width: 100%;
|
|
154
|
+
aspect-ratio: 1 / 1;
|
|
155
|
+
border: 1px solid #0c15201f;
|
|
156
|
+
|
|
157
|
+
& img {
|
|
158
|
+
display: block;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
object-fit: cover;
|
|
162
|
+
border-radius: 0.75rem;
|
|
163
|
+
transition: var(--transition, all 0.3s ease);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media (max-width: ${W + "px"}) {
|
|
167
|
+
& img {
|
|
168
|
+
width: 8.875rem;
|
|
169
|
+
height: 8.875rem;
|
|
170
|
+
min-width: 8.875rem;
|
|
171
|
+
min-height: 8.875rem;
|
|
172
|
+
object-fit: cover;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`, le = w.div`
|
|
176
|
+
background: var(--white, #fff);
|
|
177
|
+
z-index: 1;
|
|
178
|
+
|
|
179
|
+
border: 1px solid var(--gray-200, #dddfe4);
|
|
180
|
+
border-radius: 0.5rem;
|
|
181
|
+
line-height: 1rem;
|
|
182
|
+
position: absolute;
|
|
183
|
+
padding: 0.5rem 0.75rem;
|
|
184
|
+
top: 0.5rem;
|
|
185
|
+
left: 25%;
|
|
186
|
+
transform: translateX(-50%);
|
|
187
|
+
min-width: 10rem;
|
|
188
|
+
|
|
189
|
+
&::before,
|
|
190
|
+
&::after {
|
|
191
|
+
content: "";
|
|
192
|
+
position: absolute;
|
|
193
|
+
left: 50%;
|
|
194
|
+
transform: translateX(-50%);
|
|
195
|
+
border-style: solid;
|
|
196
|
+
border-width: 0.625rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&::after {
|
|
200
|
+
top: -1.1875rem;
|
|
201
|
+
border-color: transparent transparent var(--white, #fff) transparent;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&::before {
|
|
205
|
+
top: -1.25rem;
|
|
206
|
+
border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
& .tags-popover__content {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-wrap: wrap;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
gap: 0.375rem;
|
|
214
|
+
font-size: 0.75rem;
|
|
215
|
+
font-weight: 400;
|
|
216
|
+
|
|
217
|
+
& .tags-popover__name {
|
|
218
|
+
color: var(--gray-600, #676e79);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
& .tags-popover__value {
|
|
222
|
+
color: var(--gray-950, #14161a);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
`, de = w.div`
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
gap: 0.25rem;
|
|
229
|
+
color: var(--gray-500);
|
|
230
|
+
font-size: 0.75rem;
|
|
231
|
+
font-weight: 500;
|
|
232
|
+
|
|
233
|
+
& i {
|
|
234
|
+
font-size: 1rem;
|
|
235
|
+
color: var(--warning-500, #F59E0B);
|
|
236
|
+
}
|
|
237
|
+
`, me = V(({ sponsoredText: a = "Sponsored" }, i) => /* @__PURE__ */ o(de, { ref: i, className: "sponsored-line", children: [
|
|
238
|
+
/* @__PURE__ */ r("i", { className: "mng-lnc-paw2" }),
|
|
239
|
+
/* @__PURE__ */ r("span", { children: a })
|
|
240
|
+
] })), pe = "Vehicles_Cars", ge = "Vehicles_Motorcycles", ue = "Vehicles_Trucks", he = "Vehicles_AgriculturalMachines_Tractors", fe = "Vehicles_ConstructionMachines", ve = "Vehicles_Bus", we = "Vehicles_Campers", ye = "RealEstates_", n = {
|
|
241
|
+
Mileage: {
|
|
242
|
+
icon: "mng-lnc-road",
|
|
243
|
+
measure: "km"
|
|
244
|
+
},
|
|
245
|
+
YearOfProduction: {
|
|
246
|
+
icon: "mng-lnc-calendar",
|
|
247
|
+
measure: ""
|
|
248
|
+
},
|
|
249
|
+
Fuel: {
|
|
250
|
+
icon: "mng-lnc-gas-station",
|
|
251
|
+
measure: ""
|
|
252
|
+
},
|
|
253
|
+
EnginePowerKW: {
|
|
254
|
+
icon: "mng-lnc-engine",
|
|
255
|
+
measure: "kW"
|
|
256
|
+
},
|
|
257
|
+
Transmission: {
|
|
258
|
+
icon: "mng-lnc-transmission",
|
|
259
|
+
measure: ""
|
|
260
|
+
},
|
|
261
|
+
Model: {
|
|
262
|
+
icon: "mng-lnc-application",
|
|
263
|
+
measure: ""
|
|
264
|
+
},
|
|
265
|
+
Brand: {
|
|
266
|
+
icon: "mng-lnc-car--front",
|
|
267
|
+
measure: ""
|
|
268
|
+
},
|
|
269
|
+
SurfaceArea: {
|
|
270
|
+
icon: "mng-lnc-right-angle",
|
|
271
|
+
measure: ""
|
|
272
|
+
},
|
|
273
|
+
Floor: {
|
|
274
|
+
icon: "mng-lnc-elevator",
|
|
275
|
+
measure: ""
|
|
276
|
+
},
|
|
277
|
+
FurnishedCondition: {
|
|
278
|
+
icon: "mng-lnc-sofa-01",
|
|
279
|
+
measure: ""
|
|
280
|
+
},
|
|
281
|
+
AdType: {
|
|
282
|
+
icon: "mng-lnc-notes",
|
|
283
|
+
measure: ""
|
|
284
|
+
},
|
|
285
|
+
NumberOfRooms: {
|
|
286
|
+
icon: "mng-lnc-meeting-room",
|
|
287
|
+
measure: ""
|
|
288
|
+
},
|
|
289
|
+
HeatingType: {
|
|
290
|
+
icon: "mng-lnc-heat",
|
|
291
|
+
measure: ""
|
|
292
|
+
},
|
|
293
|
+
AirConditioning: {
|
|
294
|
+
icon: "mng-lnc-air-conditioner",
|
|
295
|
+
measure: ""
|
|
296
|
+
},
|
|
297
|
+
Type: {
|
|
298
|
+
icon: "mng-lnc-house-building",
|
|
299
|
+
measure: ""
|
|
300
|
+
},
|
|
301
|
+
Parking: {
|
|
302
|
+
icon: "mng-lnc-parking-area-circle",
|
|
303
|
+
measure: ""
|
|
304
|
+
},
|
|
305
|
+
Internet: {
|
|
306
|
+
icon: "mng-lnc-wifi-02",
|
|
307
|
+
measure: ""
|
|
308
|
+
},
|
|
309
|
+
State: {
|
|
310
|
+
icon: "mng-lnc-settings-1",
|
|
311
|
+
measure: ""
|
|
312
|
+
},
|
|
313
|
+
NumberOfPremises: {
|
|
314
|
+
icon: "mng-lnc-meeting-room",
|
|
315
|
+
measure: ""
|
|
316
|
+
},
|
|
317
|
+
Pool: {
|
|
318
|
+
icon: "mng-lnc-pool",
|
|
319
|
+
measure: ""
|
|
320
|
+
},
|
|
321
|
+
Approach: {
|
|
322
|
+
icon: "mng-lnc-driveway",
|
|
323
|
+
measure: ""
|
|
324
|
+
},
|
|
325
|
+
NumberOfBeds: {
|
|
326
|
+
icon: "mng-lnc-bed",
|
|
327
|
+
measure: ""
|
|
328
|
+
},
|
|
329
|
+
Kitchen: {
|
|
330
|
+
icon: "mng-lnc-fridge",
|
|
331
|
+
measure: ""
|
|
332
|
+
},
|
|
333
|
+
BathroomToilet: {
|
|
334
|
+
icon: "mng-lnc-bath",
|
|
335
|
+
measure: ""
|
|
336
|
+
},
|
|
337
|
+
default: {
|
|
338
|
+
icon: " mng-lnc-clock--filled",
|
|
339
|
+
measure: ""
|
|
340
|
+
}
|
|
341
|
+
}, Be = V((a, i) => {
|
|
342
|
+
const {
|
|
343
|
+
title: s,
|
|
344
|
+
price: c = 0,
|
|
345
|
+
sellingPrice: t,
|
|
346
|
+
currency: h,
|
|
347
|
+
isNegotiable: y,
|
|
348
|
+
isFree: b,
|
|
349
|
+
imageUrl: X,
|
|
350
|
+
location: q,
|
|
351
|
+
isSponsored: E,
|
|
352
|
+
imageComponent: M,
|
|
353
|
+
onSelectCard: U = () => {
|
|
354
|
+
},
|
|
355
|
+
freeText: Y = "Free",
|
|
356
|
+
negotiableText: A = "Negotiable",
|
|
357
|
+
tags: l = [],
|
|
358
|
+
categoryCode: _,
|
|
359
|
+
condition: C,
|
|
360
|
+
quantity: N,
|
|
361
|
+
trade: k
|
|
362
|
+
} = a, P = se(), T = [
|
|
363
|
+
pe,
|
|
364
|
+
ge,
|
|
365
|
+
ue,
|
|
366
|
+
he,
|
|
367
|
+
fe,
|
|
368
|
+
ve,
|
|
369
|
+
we,
|
|
370
|
+
ye
|
|
371
|
+
].some(
|
|
372
|
+
(e) => _ == null ? void 0 : _.includes(e)
|
|
373
|
+
), [K, z] = x(!1), L = () => {
|
|
374
|
+
z(!0);
|
|
375
|
+
}, H = () => {
|
|
376
|
+
z(!1);
|
|
377
|
+
}, Z = () => /* @__PURE__ */ r("div", { className: "tags-popover__trigger", children: l == null ? void 0 : l.map((e, d) => {
|
|
378
|
+
var m, p, g, R, F;
|
|
379
|
+
const $ = ((m = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : m.icon) ?? ((p = n == null ? void 0 : n.default) == null ? void 0 : p.icon) ?? "", O = ((g = e == null ? void 0 : e.measurementUnit) == null ? void 0 : g.symbol) ?? ((R = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : R.measure) ?? "", f = [(e == null ? void 0 : e.value) ?? ((F = e == null ? void 0 : e.multiOptions) == null ? void 0 : F[0]) ?? "", O].filter(Boolean).join(" ");
|
|
380
|
+
return P ? /* @__PURE__ */ o("div", { className: "tag-mobile", children: [
|
|
381
|
+
f,
|
|
382
|
+
d === 0 ? " · " : ""
|
|
383
|
+
] }) : /* @__PURE__ */ o(
|
|
384
|
+
v,
|
|
385
|
+
{
|
|
386
|
+
className: `tag ${E ? "tag-sponsored" : ""}`,
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ r("i", { className: $ }),
|
|
389
|
+
f
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
`detailed-products-section-tag__${d + 1}`
|
|
393
|
+
);
|
|
394
|
+
}) }), J = () => /* @__PURE__ */ r("div", { className: "tags-popover__content", children: l == null ? void 0 : l.map((e, d) => {
|
|
395
|
+
var m, p, g;
|
|
396
|
+
const $ = ((m = e == null ? void 0 : e.measurementUnit) == null ? void 0 : m.symbol) ?? ((p = n == null ? void 0 : n[e == null ? void 0 : e.code]) == null ? void 0 : p.measure) ?? "", B = [(e == null ? void 0 : e.value) ?? ((g = e == null ? void 0 : e.multiOptions) == null ? void 0 : g[0]) ?? "", $].filter(Boolean).join(" "), f = e == null ? void 0 : e.name;
|
|
397
|
+
return /* @__PURE__ */ o("div", { children: [
|
|
398
|
+
/* @__PURE__ */ r("span", { className: "tags-popover__name", children: `${f}: ` }),
|
|
399
|
+
/* @__PURE__ */ r("span", { className: "tags-popover__value", children: B })
|
|
400
|
+
] }, `detailed-products-section-tag-dropdown__${d + 1}`);
|
|
401
|
+
}) }), Q = () => P ? [C, N, k].map((e, d) => /* @__PURE__ */ o("div", { className: "tag-mobile", children: [
|
|
402
|
+
e,
|
|
403
|
+
d === 0 ? " · " : ""
|
|
404
|
+
] })) : /* @__PURE__ */ o(S, { children: [
|
|
405
|
+
C && /* @__PURE__ */ r(v, { className: "tag", children: C }, "detailed-products-section-tag__condition"),
|
|
406
|
+
N && /* @__PURE__ */ r(v, { className: "tag", children: N }, "detailed-products-section-tag__quantity"),
|
|
407
|
+
k && /* @__PURE__ */ r(v, { className: "tag", children: k }, "detailed-products-section-tag__trade")
|
|
408
|
+
] });
|
|
409
|
+
return (
|
|
410
|
+
// <LandingPageProductCardSkeleton />
|
|
411
|
+
/* @__PURE__ */ o(G, { ref: i, className: "product-card", onClick: U, children: [
|
|
412
|
+
/* @__PURE__ */ r(ce, { className: "product-image-wrapper", children: oe(M) ? M : /* @__PURE__ */ r(ne, { src: X }) }),
|
|
413
|
+
/* @__PURE__ */ r("div", { className: "wrapper-card-1", children: /* @__PURE__ */ r("div", { className: "card-title", children: s }) }),
|
|
414
|
+
/* @__PURE__ */ o("div", { className: "wrapper-card-3", children: [
|
|
415
|
+
T && /* @__PURE__ */ r(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
...P ? {} : {
|
|
419
|
+
onMouseEnter: L,
|
|
420
|
+
onMouseLeave: H
|
|
421
|
+
},
|
|
422
|
+
children: /* @__PURE__ */ o(ae, { placement: "bottom", open: K, children: [
|
|
423
|
+
/* @__PURE__ */ r(te, { children: Z() }),
|
|
424
|
+
/* @__PURE__ */ r(ie, { style: { all: "unset" }, children: /* @__PURE__ */ r(le, { children: J() }) })
|
|
425
|
+
] })
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
!T && Q()
|
|
429
|
+
] }),
|
|
430
|
+
/* @__PURE__ */ o("div", { className: "wrapper-card-2", children: [
|
|
431
|
+
/* @__PURE__ */ o("div", { className: "price-text", children: [
|
|
432
|
+
t > 0 && h && y !== !0 && b !== !0 && /* @__PURE__ */ r("div", { children: `${D(t)} ${j(h)}` }),
|
|
433
|
+
c > 0 && h && y !== !0 && b !== !0 && c !== t && /* @__PURE__ */ r("div", { className: `${t > 0 ? "full-price" : ""}`, children: `${D(c)} ${j(h)}` }),
|
|
434
|
+
y && A,
|
|
435
|
+
b && Y
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ r("div", { className: "location-text", children: q })
|
|
438
|
+
] }),
|
|
439
|
+
E === !0 && /* @__PURE__ */ r(me, {})
|
|
440
|
+
] })
|
|
441
|
+
);
|
|
442
|
+
}), be = V(({}, a) => /* @__PURE__ */ o(G, { className: "product-card", children: [
|
|
443
|
+
/* @__PURE__ */ r("img", { className: "skeleton-img" }),
|
|
444
|
+
/* @__PURE__ */ o("div", { className: "wrapper-card-1", children: [
|
|
445
|
+
/* @__PURE__ */ r("div", { className: "skeleton-title" }),
|
|
446
|
+
/* @__PURE__ */ r("div", { className: "skeleton-tags" })
|
|
447
|
+
] }),
|
|
448
|
+
/* @__PURE__ */ o("div", { className: "wrapper-card-1", children: [
|
|
449
|
+
/* @__PURE__ */ r("div", { className: "skeleton-price" }),
|
|
450
|
+
/* @__PURE__ */ r("div", { className: "skeleton-sponsored" })
|
|
451
|
+
] })
|
|
452
|
+
] })), _e = ({ limit: a = 5, isLoading: i = !1, keyPrefix: s }) => /* @__PURE__ */ r(S, { children: Array.from({ length: a }, (c, t) => /* @__PURE__ */ r(
|
|
453
|
+
be,
|
|
454
|
+
{
|
|
455
|
+
isLoading: i
|
|
456
|
+
},
|
|
457
|
+
`${s}-skeleton-product-card-${t}`
|
|
458
|
+
)) }), Re = ({
|
|
459
|
+
children: a,
|
|
460
|
+
fallbackComponent: i = /* @__PURE__ */ r(S, {}),
|
|
461
|
+
isLoading: s = !1,
|
|
462
|
+
limit: c,
|
|
463
|
+
keyPrefix: t
|
|
464
|
+
}) => /* @__PURE__ */ r(ee, { fallbackComponent: i, children: s === !0 ? /* @__PURE__ */ r(
|
|
465
|
+
_e,
|
|
466
|
+
{
|
|
467
|
+
isLoading: s,
|
|
468
|
+
limit: c,
|
|
469
|
+
keyPrefix: t
|
|
470
|
+
}
|
|
471
|
+
) : a });
|
|
472
|
+
export {
|
|
473
|
+
Be as D,
|
|
474
|
+
Re as S
|
|
475
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),u=require("react"),n=require("./utils-Dl9xPH4c.cjs"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),Y=require("./index-BueKsXT8.cjs"),v=require("./Badge.cjs"),K=require("./Popover.cjs"),Z=require("./PopoverTrigger.cjs"),H=require("./PopoverContent.cjs"),J=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./consts-goSZX3xP.cjs"),O=w.styled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
|
|
7
|
+
& .wrapper-card-1 {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 0.38rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& .wrapper-card-2 {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& .wrapper-card-3 {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
gap: 0.25rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& .tag {
|
|
26
|
+
height: 1.5rem;
|
|
27
|
+
gap: 0.25rem;
|
|
28
|
+
padding: 0.25rem 0.375rem;
|
|
29
|
+
border-radius: 0.375rem;
|
|
30
|
+
background: #f9fafb;
|
|
31
|
+
border: 1px solid var(--gray-95012, #14161a1f);
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
font-size: 0.75rem;
|
|
34
|
+
line-height: 1rem;
|
|
35
|
+
letter-spacing: 0.025rem;
|
|
36
|
+
color: var(--gray-950, #14161a);
|
|
37
|
+
|
|
38
|
+
&.tag-sponsored {
|
|
39
|
+
& i {
|
|
40
|
+
color: var(--yellow-500, #f59e0b);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .tag-mobile {
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
font-size: 0.75rem;
|
|
48
|
+
line-height: 1rem;
|
|
49
|
+
letter-spacing: 0.025rem;
|
|
50
|
+
color: var(--gray-600, #676e79);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .card-title {
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
${n.truncateTextInRows(2)}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& .price-text {
|
|
60
|
+
font-size: 1rem;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
${n.truncateText()}
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: end;
|
|
65
|
+
gap: 0.5rem;
|
|
66
|
+
|
|
67
|
+
& .full-price {
|
|
68
|
+
text-decoration: line-through;
|
|
69
|
+
font-size: 0.75rem;
|
|
70
|
+
font-weight: 400;
|
|
71
|
+
padding-bottom: 0.125rem;
|
|
72
|
+
color: var(--danger-600, #e11d48);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& .location-text {
|
|
77
|
+
font-size: 0.75rem;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
color: var(--gray-600, #676e79);
|
|
80
|
+
${n.truncateText()}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
& .tags-wrapper {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: 0.5rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
& .skeleton-img {
|
|
89
|
+
background-color: ${n.linearGradientAnimation("-90deg")};
|
|
90
|
+
border-radius: 0.75rem;
|
|
91
|
+
border: 1px solid white;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
& .skeleton-title {
|
|
95
|
+
background-color: ${n.linearGradientAnimation("-90deg")};
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 2.5rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
& .skeleton-tags {
|
|
101
|
+
background-color: ${n.linearGradientAnimation("-90deg")};
|
|
102
|
+
width: 80%;
|
|
103
|
+
height: 1.5rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
& .skeleton-price {
|
|
107
|
+
background-color: ${n.linearGradientAnimation("-90deg")};
|
|
108
|
+
width: 50%;
|
|
109
|
+
height: 2.5rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
& .skeleton-sponsored {
|
|
113
|
+
background-color: ${n.linearGradientAnimation("-90deg")};
|
|
114
|
+
width: 50%;
|
|
115
|
+
height: 1rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
& .tags-popover__trigger {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-wrap: wrap;
|
|
121
|
+
gap: 0.25rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
|
|
125
|
+
& .price-text {
|
|
126
|
+
font-size: 0.875rem;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
|
|
129
|
+
& .full-price {
|
|
130
|
+
display: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:hover .product-image-wrapper img {
|
|
136
|
+
transform: scale(1.1);
|
|
137
|
+
}
|
|
138
|
+
`,Q=w.styled.div`
|
|
139
|
+
position: relative;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
border-radius: 0.75rem;
|
|
142
|
+
width: 100%;
|
|
143
|
+
aspect-ratio: 1 / 1;
|
|
144
|
+
border: 1px solid #0c15201f;
|
|
145
|
+
|
|
146
|
+
& img {
|
|
147
|
+
display: block;
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 100%;
|
|
150
|
+
object-fit: cover;
|
|
151
|
+
border-radius: 0.75rem;
|
|
152
|
+
transition: var(--transition, all 0.3s ease);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
|
|
156
|
+
& img {
|
|
157
|
+
width: 8.875rem;
|
|
158
|
+
height: 8.875rem;
|
|
159
|
+
min-width: 8.875rem;
|
|
160
|
+
min-height: 8.875rem;
|
|
161
|
+
object-fit: cover;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`,ee=w.styled.div`
|
|
165
|
+
background: var(--white, #fff);
|
|
166
|
+
z-index: 1;
|
|
167
|
+
|
|
168
|
+
border: 1px solid var(--gray-200, #dddfe4);
|
|
169
|
+
border-radius: 0.5rem;
|
|
170
|
+
line-height: 1rem;
|
|
171
|
+
position: absolute;
|
|
172
|
+
padding: 0.5rem 0.75rem;
|
|
173
|
+
top: 0.5rem;
|
|
174
|
+
left: 25%;
|
|
175
|
+
transform: translateX(-50%);
|
|
176
|
+
min-width: 10rem;
|
|
177
|
+
|
|
178
|
+
&::before,
|
|
179
|
+
&::after {
|
|
180
|
+
content: "";
|
|
181
|
+
position: absolute;
|
|
182
|
+
left: 50%;
|
|
183
|
+
transform: translateX(-50%);
|
|
184
|
+
border-style: solid;
|
|
185
|
+
border-width: 0.625rem;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&::after {
|
|
189
|
+
top: -1.1875rem;
|
|
190
|
+
border-color: transparent transparent var(--white, #fff) transparent;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&::before {
|
|
194
|
+
top: -1.25rem;
|
|
195
|
+
border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
& .tags-popover__content {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-wrap: wrap;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
gap: 0.375rem;
|
|
203
|
+
font-size: 0.75rem;
|
|
204
|
+
font-weight: 400;
|
|
205
|
+
|
|
206
|
+
& .tags-popover__name {
|
|
207
|
+
color: var(--gray-600, #676e79);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
& .tags-popover__value {
|
|
211
|
+
color: var(--gray-950, #14161a);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
`,re=w.styled.div`
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
gap: 0.25rem;
|
|
218
|
+
color: var(--gray-500);
|
|
219
|
+
font-size: 0.75rem;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
|
|
222
|
+
& i {
|
|
223
|
+
font-size: 1rem;
|
|
224
|
+
color: var(--warning-500, #F59E0B);
|
|
225
|
+
}
|
|
226
|
+
`,ne=u.forwardRef(({sponsoredText:t="Sponsored"},a)=>e.jsxs(re,{ref:a,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),oe="Vehicles_Cars",te="Vehicles_Motorcycles",se="Vehicles_Trucks",ae="Vehicles_AgriculturalMachines_Tractors",ie="Vehicles_ConstructionMachines",ce="Vehicles_Bus",le="Vehicles_Campers",de="RealEstates_",o={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:""}},me=u.forwardRef((t,a)=>{const{title:i,price:c=0,sellingPrice:s,currency:h,isNegotiable:y,isFree:j,imageUrl:z,location:B,isSponsored:P,imageComponent:$,onSelectCard:F=()=>{},freeText:I="Free",negotiableText:D="Negotiable",tags:l=[],categoryCode:b,condition:_,quantity:x,trade:C}=t,N=J.useDetectMobile(),S=[oe,te,se,ae,ie,ce,le,de].some(r=>b==null?void 0:b.includes(r)),[G,E]=u.useState(!1),A=()=>{E(!0)},W=()=>{E(!1)},X=()=>e.jsx("div",{className:"tags-popover__trigger",children:l==null?void 0:l.map((r,d)=>{var m,p,g,R,T;const k=((m=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:m.icon)??((p=o==null?void 0:o.default)==null?void 0:p.icon)??"",V=((g=r==null?void 0:r.measurementUnit)==null?void 0:g.symbol)??((R=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:R.measure)??"",f=[(r==null?void 0:r.value)??((T=r==null?void 0:r.multiOptions)==null?void 0:T[0])??"",V].filter(Boolean).join(" ");return N?e.jsxs("div",{className:"tag-mobile",children:[f,d===0?" · ":""]}):e.jsxs(v,{className:`tag ${P?"tag-sponsored":""}`,children:[e.jsx("i",{className:k}),f]},`detailed-products-section-tag__${d+1}`)})}),L=()=>e.jsx("div",{className:"tags-popover__content",children:l==null?void 0:l.map((r,d)=>{var m,p,g;const k=((m=r==null?void 0:r.measurementUnit)==null?void 0:m.symbol)??((p=o==null?void 0:o[r==null?void 0:r.code])==null?void 0:p.measure)??"",M=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",k].filter(Boolean).join(" "),f=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${f}: `}),e.jsx("span",{className:"tags-popover__value",children:M})]},`detailed-products-section-tag-dropdown__${d+1}`)})}),U=()=>N?[_,x,C].map((r,d)=>e.jsxs("div",{className:"tag-mobile",children:[r,d===0?" · ":""]})):e.jsxs(e.Fragment,{children:[_&&e.jsx(v,{className:"tag",children:_},"detailed-products-section-tag__condition"),x&&e.jsx(v,{className:"tag",children:x},"detailed-products-section-tag__quantity"),C&&e.jsx(v,{className:"tag",children:C},"detailed-products-section-tag__trade")]});return e.jsxs(O,{ref:a,className:"product-card",onClick:F,children:[e.jsx(Q,{className:"product-image-wrapper",children:n.isDefined($)?$:e.jsx(Y.ProductImageWrapper,{src:z})}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:i})}),e.jsxs("div",{className:"wrapper-card-3",children:[S&&e.jsx("div",{...N?{}:{onMouseEnter:A,onMouseLeave:W},children:e.jsxs(K,{placement:"bottom",open:G,children:[e.jsx(Z,{children:X()}),e.jsx(H,{style:{all:"unset"},children:e.jsx(ee,{children:L()})})]})}),!S&&U()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[s>0&&h&&y!==!0&&j!==!0&&e.jsx("div",{children:`${n.formatPrice(s)} ${n.GetCurrencySymbol(h)}`}),c>0&&h&&y!==!0&&j!==!0&&c!==s&&e.jsx("div",{className:`${s>0?"full-price":""}`,children:`${n.formatPrice(c)} ${n.GetCurrencySymbol(h)}`}),y&&D,j&&I]}),e.jsx("div",{className:"location-text",children:B})]}),P===!0&&e.jsx(ne,{})]})}),pe=u.forwardRef(({},t)=>e.jsxs(O,{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"})]})]})),ge=({limit:t=5,isLoading:a=!1,keyPrefix:i})=>e.jsx(e.Fragment,{children:Array.from({length:t},(c,s)=>e.jsx(pe,{isLoading:a},`${i}-skeleton-product-card-${s}`))}),ue=({children:t,fallbackComponent:a=e.jsx(e.Fragment,{}),isLoading:i=!1,limit:c,keyPrefix:s})=>e.jsx(u.Suspense,{fallbackComponent:a,children:i===!0?e.jsx(ge,{isLoading:i,limit:c,keyPrefix:s}):t});exports.DetailedProductCard=me;exports.SuspenseDetailedProductCard=ue;
|
package/package.json
CHANGED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),c=require("react"),r=require("./utils-Dl9xPH4c.cjs"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-BueKsXT8.cjs"),u=require("./consts-goSZX3xP.cjs"),x=p.styled.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 0.5rem;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
|
|
7
|
-
& .wrapper-card-1 {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 0.38rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
& .wrapper-card-2 {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
& .card-title {
|
|
20
|
-
font-size: 0.875rem;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
${r.truncateTextInRows(2)}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
& .price-text {
|
|
26
|
-
font-size: 1rem;
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
${r.truncateText()}
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: end;
|
|
31
|
-
gap: 0.5rem;
|
|
32
|
-
& .full-price {
|
|
33
|
-
text-decoration: line-through;
|
|
34
|
-
font-size: 0.75rem;
|
|
35
|
-
font-weight: 400;
|
|
36
|
-
padding-bottom: 0.125rem;
|
|
37
|
-
color: var(--gray-600, #676e79);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
& .location-text {
|
|
42
|
-
font-size: 0.75rem;
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
color: var(--gray-600, #676e79);
|
|
45
|
-
${r.truncateText()}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
& .tags-wrapper {
|
|
49
|
-
display: flex;
|
|
50
|
-
gap: 0.5rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
& .skeleton-img {
|
|
54
|
-
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
55
|
-
border-radius: 0.75rem;
|
|
56
|
-
border: 1px solid white;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
& .skeleton-title {
|
|
60
|
-
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
61
|
-
width: 100%;
|
|
62
|
-
height: 2.5rem;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
& .skeleton-tags {
|
|
66
|
-
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
67
|
-
width: 80%;
|
|
68
|
-
height: 1.5rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& .skeleton-price {
|
|
72
|
-
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
73
|
-
width: 50%;
|
|
74
|
-
height: 2.5rem;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
& .skeleton-sponsored {
|
|
78
|
-
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
79
|
-
width: 50%;
|
|
80
|
-
height: 1rem;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
|
|
84
|
-
& .price-text {
|
|
85
|
-
font-size: 0.875rem;
|
|
86
|
-
font-weight: 600;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&:hover .product-image-wrapper img {
|
|
91
|
-
transform: scale(1.1);
|
|
92
|
-
}
|
|
93
|
-
`,y=p.styled.div`
|
|
94
|
-
position: relative;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
border-radius: 0.75rem;
|
|
97
|
-
width: 100%;
|
|
98
|
-
aspect-ratio: 1 / 1;
|
|
99
|
-
border: 1px solid #0c15201f;
|
|
100
|
-
|
|
101
|
-
& img {
|
|
102
|
-
display: block;
|
|
103
|
-
width: 100%;
|
|
104
|
-
height: 100%;
|
|
105
|
-
object-fit: cover;
|
|
106
|
-
border-radius: 0.75rem;
|
|
107
|
-
transition: var(--transition, all 0.3s ease);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
|
|
111
|
-
& img {
|
|
112
|
-
width: 8.875rem;
|
|
113
|
-
height: 8.875rem;
|
|
114
|
-
min-width: 8.875rem;
|
|
115
|
-
min-height: 8.875rem;
|
|
116
|
-
object-fit: cover;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`,N=p.styled.div`
|
|
120
|
-
display: flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
gap: 0.25rem;
|
|
123
|
-
color: var(--gray-500);
|
|
124
|
-
font-size: 0.75rem;
|
|
125
|
-
font-weight: 500;
|
|
126
|
-
|
|
127
|
-
& i {
|
|
128
|
-
font-size: 1rem;
|
|
129
|
-
color: var(--warning-500, #F59E0B);
|
|
130
|
-
}
|
|
131
|
-
`,$=c.forwardRef(({sponsoredText:t="Sponsored"},s)=>e.jsxs(N,{ref:s,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),S=c.forwardRef((t,s)=>{const{uuid:a,title:o,price:i=0,sellingPrice:n,currency:d,isNegotiable:l,isFree:m,imageUrl:h,sellerUuid:G,location:f,isSponsored:w,imageComponent:g,onSelectCard:j=()=>{},freeText:v="Free",negotiableText:b="Negotiable"}=t;return e.jsxs(x,{className:"product-card",onClick:j,children:[e.jsx(y,{className:"product-image-wrapper",children:r.isDefined(g)?g:e.jsx(k.ProductImageWrapper,{src:h})}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:o})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[n>0&&d&&l!==!0&&m!==!0&&e.jsx("div",{children:`${r.formatPrice(n)} ${r.GetCurrencySymbol(d)}`}),i>0&&d&&l!==!0&&m!==!0&&i!==n&&e.jsx("div",{className:`${n>0?"full-price":""}`,children:`${r.formatPrice(i)} ${r.GetCurrencySymbol(d)}`}),l&&b,m&&v]}),e.jsx("div",{className:"location-text",children:f})]}),w===!0&&e.jsx($,{})]})}),P=c.forwardRef(({},t)=>e.jsxs(x,{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"})]})]})),C=({limit:t=5,isLoading:s=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(o,i)=>e.jsx(P,{isLoading:s},`${a}-skeleton-product-card-${i}`))}),z=({children:t,fallbackComponent:s=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:o,keyPrefix:i})=>e.jsx(c.Suspense,{fallbackComponent:s,children:a===!0?e.jsx(C,{isLoading:a,limit:o,keyPrefix:i}):t});exports.DetailedProductCard=S;exports.SuspenseDetailedProductCard=z;
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as p, Suspense as z } from "react";
|
|
3
|
-
import { p as C, t as f, o as s, l as D, q as u, G as w } from "./utils-BdsZgOUE.js";
|
|
4
|
-
import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
-
import { P as I } from "./index-CF3HhgvN.js";
|
|
6
|
-
import { M as v } from "./consts-BuFChS64.js";
|
|
7
|
-
const k = g.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 0.5rem;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
|
|
13
|
-
& .wrapper-card-1 {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 0.38rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
& .wrapper-card-2 {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
gap: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
& .card-title {
|
|
26
|
-
font-size: 0.875rem;
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
${C(2)}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
& .price-text {
|
|
32
|
-
font-size: 1rem;
|
|
33
|
-
font-weight: 600;
|
|
34
|
-
${f()}
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: end;
|
|
37
|
-
gap: 0.5rem;
|
|
38
|
-
& .full-price {
|
|
39
|
-
text-decoration: line-through;
|
|
40
|
-
font-size: 0.75rem;
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
padding-bottom: 0.125rem;
|
|
43
|
-
color: var(--gray-600, #676e79);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
& .location-text {
|
|
48
|
-
font-size: 0.75rem;
|
|
49
|
-
font-weight: 400;
|
|
50
|
-
color: var(--gray-600, #676e79);
|
|
51
|
-
${f()}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
& .tags-wrapper {
|
|
55
|
-
display: flex;
|
|
56
|
-
gap: 0.5rem;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
& .skeleton-img {
|
|
60
|
-
background-color: ${s("-90deg")};
|
|
61
|
-
border-radius: 0.75rem;
|
|
62
|
-
border: 1px solid white;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
& .skeleton-title {
|
|
66
|
-
background-color: ${s("-90deg")};
|
|
67
|
-
width: 100%;
|
|
68
|
-
height: 2.5rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& .skeleton-tags {
|
|
72
|
-
background-color: ${s("-90deg")};
|
|
73
|
-
width: 80%;
|
|
74
|
-
height: 1.5rem;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
& .skeleton-price {
|
|
78
|
-
background-color: ${s("-90deg")};
|
|
79
|
-
width: 50%;
|
|
80
|
-
height: 2.5rem;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
& .skeleton-sponsored {
|
|
84
|
-
background-color: ${s("-90deg")};
|
|
85
|
-
width: 50%;
|
|
86
|
-
height: 1rem;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@media (max-width: ${v + "px"}) {
|
|
90
|
-
& .price-text {
|
|
91
|
-
font-size: 0.875rem;
|
|
92
|
-
font-weight: 600;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:hover .product-image-wrapper img {
|
|
97
|
-
transform: scale(1.1);
|
|
98
|
-
}
|
|
99
|
-
`, j = g.div`
|
|
100
|
-
position: relative;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
border-radius: 0.75rem;
|
|
103
|
-
width: 100%;
|
|
104
|
-
aspect-ratio: 1 / 1;
|
|
105
|
-
border: 1px solid #0c15201f;
|
|
106
|
-
|
|
107
|
-
& img {
|
|
108
|
-
display: block;
|
|
109
|
-
width: 100%;
|
|
110
|
-
height: 100%;
|
|
111
|
-
object-fit: cover;
|
|
112
|
-
border-radius: 0.75rem;
|
|
113
|
-
transition: var(--transition, all 0.3s ease);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@media (max-width: ${v + "px"}) {
|
|
117
|
-
& img {
|
|
118
|
-
width: 8.875rem;
|
|
119
|
-
height: 8.875rem;
|
|
120
|
-
min-width: 8.875rem;
|
|
121
|
-
min-height: 8.875rem;
|
|
122
|
-
object-fit: cover;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
`, F = g.div`
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
gap: 0.25rem;
|
|
129
|
-
color: var(--gray-500);
|
|
130
|
-
font-size: 0.75rem;
|
|
131
|
-
font-weight: 500;
|
|
132
|
-
|
|
133
|
-
& i {
|
|
134
|
-
font-size: 1rem;
|
|
135
|
-
color: var(--warning-500, #F59E0B);
|
|
136
|
-
}
|
|
137
|
-
`, T = p(({ sponsoredText: r = "Sponsored" }, a) => /* @__PURE__ */ i(F, { ref: a, className: "sponsored-line", children: [
|
|
138
|
-
/* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
|
|
139
|
-
/* @__PURE__ */ e("span", { children: r })
|
|
140
|
-
] })), q = p((r, a) => {
|
|
141
|
-
const {
|
|
142
|
-
uuid: o,
|
|
143
|
-
title: l,
|
|
144
|
-
price: t = 0,
|
|
145
|
-
sellingPrice: d,
|
|
146
|
-
currency: n,
|
|
147
|
-
isNegotiable: c,
|
|
148
|
-
isFree: m,
|
|
149
|
-
imageUrl: N,
|
|
150
|
-
sellerUuid: G,
|
|
151
|
-
location: b,
|
|
152
|
-
isSponsored: $,
|
|
153
|
-
imageComponent: h,
|
|
154
|
-
onSelectCard: y = () => {
|
|
155
|
-
},
|
|
156
|
-
freeText: S = "Free",
|
|
157
|
-
negotiableText: P = "Negotiable"
|
|
158
|
-
} = r;
|
|
159
|
-
return (
|
|
160
|
-
// <LandingPageProductCardSkeleton />
|
|
161
|
-
/* @__PURE__ */ i(k, { className: "product-card", onClick: y, children: [
|
|
162
|
-
/* @__PURE__ */ e(j, { className: "product-image-wrapper", children: D(h) ? h : /* @__PURE__ */ e(I, { src: N }) }),
|
|
163
|
-
/* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: l }) }),
|
|
164
|
-
/* @__PURE__ */ i("div", { className: "wrapper-card-2", children: [
|
|
165
|
-
/* @__PURE__ */ i("div", { className: "price-text", children: [
|
|
166
|
-
d > 0 && n && c !== !0 && m !== !0 && /* @__PURE__ */ e("div", { children: `${u(d)} ${w(n)}` }),
|
|
167
|
-
t > 0 && n && c !== !0 && m !== !0 && t !== d && /* @__PURE__ */ e("div", { className: `${d > 0 ? "full-price" : ""}`, children: `${u(t)} ${w(n)}` }),
|
|
168
|
-
c && P,
|
|
169
|
-
m && S
|
|
170
|
-
] }),
|
|
171
|
-
/* @__PURE__ */ e("div", { className: "location-text", children: b })
|
|
172
|
-
] }),
|
|
173
|
-
$ === !0 && /* @__PURE__ */ e(T, {})
|
|
174
|
-
] })
|
|
175
|
-
);
|
|
176
|
-
}), W = p(({}, r) => /* @__PURE__ */ i(k, { className: "product-card", children: [
|
|
177
|
-
/* @__PURE__ */ e("img", { className: "skeleton-img" }),
|
|
178
|
-
/* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
|
|
179
|
-
/* @__PURE__ */ e("div", { className: "skeleton-title" }),
|
|
180
|
-
/* @__PURE__ */ e("div", { className: "skeleton-tags" })
|
|
181
|
-
] }),
|
|
182
|
-
/* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
|
|
183
|
-
/* @__PURE__ */ e("div", { className: "skeleton-price" }),
|
|
184
|
-
/* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
|
|
185
|
-
] })
|
|
186
|
-
] })), E = ({ limit: r = 5, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(x, { children: Array.from({ length: r }, (l, t) => /* @__PURE__ */ e(
|
|
187
|
-
W,
|
|
188
|
-
{
|
|
189
|
-
isLoading: a
|
|
190
|
-
},
|
|
191
|
-
`${o}-skeleton-product-card-${t}`
|
|
192
|
-
)) }), L = ({
|
|
193
|
-
children: r,
|
|
194
|
-
fallbackComponent: a = /* @__PURE__ */ e(x, {}),
|
|
195
|
-
isLoading: o = !1,
|
|
196
|
-
limit: l,
|
|
197
|
-
keyPrefix: t
|
|
198
|
-
}) => /* @__PURE__ */ e(z, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
|
|
199
|
-
E,
|
|
200
|
-
{
|
|
201
|
-
isLoading: o,
|
|
202
|
-
limit: l,
|
|
203
|
-
keyPrefix: t
|
|
204
|
-
}
|
|
205
|
-
) : r });
|
|
206
|
-
export {
|
|
207
|
-
q as D,
|
|
208
|
-
L as S
|
|
209
|
-
};
|