@lanaco/lnc-react-ui 4.0.146 → 4.0.148
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 +4 -4
- package/dist/DetailedProductsSection.js +24 -24
- package/dist/ProductsWithBannerSection.cjs +3 -3
- package/dist/ProductsWithBannerSection.js +40 -40
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +41 -41
- package/dist/UrgentSaleProductsSection.cjs +2 -2
- package/dist/UrgentSaleProductsSection.js +43 -43
- package/dist/suspense-product-card-detailed-C-ZCjG5p.js +538 -0
- package/dist/suspense-product-card-detailed-FuxsUusc.cjs +260 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-BVYLuo75.cjs +0 -265
- package/dist/suspense-product-card-detailed-Bv1nJaPz.js +0 -579
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),m=require("react"),o=require("./utils-Dl9xPH4c.cjs"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),oe=require("./index-BueKsXT8.cjs"),k=require("./Badge.cjs"),ne=require("./Popover.cjs"),te=require("./PopoverTrigger.cjs"),se=require("./PopoverContent.cjs"),ae=require("./useDetectMobile-zkbzoOGV.cjs"),O=require("./consts-goSZX3xP.cjs"),D=_.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
|
+
& i {
|
|
49
|
+
color: var(--yellow-500, #f59e0b);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .tag-mobile {
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
font-size: 0.75rem;
|
|
56
|
+
line-height: 1rem;
|
|
57
|
+
letter-spacing: 0.025rem;
|
|
58
|
+
color: var(--gray-600, #676e79);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .card-title {
|
|
62
|
+
font-size: 0.875rem;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
${o.truncateTextInRows(2)}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
& .price-text {
|
|
68
|
+
font-size: 1rem;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
${o.truncateText()}
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: end;
|
|
73
|
+
gap: 0.5rem;
|
|
74
|
+
color: var(--gray-950, #14161a);
|
|
75
|
+
|
|
76
|
+
&.new-price {
|
|
77
|
+
color: var(--danger-600, #e11d48);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
& .full-price {
|
|
81
|
+
text-decoration: line-through;
|
|
82
|
+
font-size: 0.75rem;
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
padding-bottom: 0.125rem;
|
|
85
|
+
color: var(--gray-600, #676e79);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
& .location-text {
|
|
90
|
+
font-size: 0.75rem;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
color: var(--gray-600, #676e79);
|
|
93
|
+
${o.truncateText()}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
& .tags-wrapper {
|
|
97
|
+
display: flex;
|
|
98
|
+
gap: 0.5rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
& .skeleton-img {
|
|
102
|
+
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
103
|
+
border-radius: 0.75rem;
|
|
104
|
+
border: 1px solid white;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& .skeleton-title {
|
|
108
|
+
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 2.5rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
& .skeleton-tags {
|
|
114
|
+
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
115
|
+
width: 80%;
|
|
116
|
+
height: 1.5rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
& .skeleton-price {
|
|
120
|
+
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
121
|
+
width: 50%;
|
|
122
|
+
height: 2.5rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
& .skeleton-sponsored {
|
|
126
|
+
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
127
|
+
width: 50%;
|
|
128
|
+
height: 1rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
& .tags-popover__trigger {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-wrap: wrap;
|
|
134
|
+
gap: 0.25rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
|
|
138
|
+
overflow: visible;
|
|
139
|
+
|
|
140
|
+
& .price-text {
|
|
141
|
+
font-size: 0.875rem;
|
|
142
|
+
font-weight: 600;
|
|
143
|
+
|
|
144
|
+
& .full-price {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:hover .product-image-wrapper img {
|
|
151
|
+
transform: scale(1.1);
|
|
152
|
+
}
|
|
153
|
+
`,ie=_.styled.div`
|
|
154
|
+
position: relative;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
border-radius: 0.75rem;
|
|
157
|
+
width: 100%;
|
|
158
|
+
aspect-ratio: 1 / 1;
|
|
159
|
+
border: 1px solid #0c15201f;
|
|
160
|
+
|
|
161
|
+
& .bookmarking-btn {
|
|
162
|
+
position: absolute;
|
|
163
|
+
right: 0.5rem;
|
|
164
|
+
top: 0.5rem;
|
|
165
|
+
z-index: 1;
|
|
166
|
+
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
& .bookmarking-btn {
|
|
172
|
+
display: flex;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
& img {
|
|
177
|
+
display: block;
|
|
178
|
+
width: 100%;
|
|
179
|
+
height: 100%;
|
|
180
|
+
object-fit: cover;
|
|
181
|
+
border-radius: 0.75rem;
|
|
182
|
+
transition: var(--transition, all 0.3s ease);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
|
|
186
|
+
& img {
|
|
187
|
+
width: 8.875rem;
|
|
188
|
+
height: 8.875rem;
|
|
189
|
+
min-width: 8.875rem;
|
|
190
|
+
min-height: 8.875rem;
|
|
191
|
+
object-fit: cover;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
& .bookmarking-btn {
|
|
195
|
+
display: flex;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
`,ce=_.styled.div`
|
|
199
|
+
background: var(--white, #fff);
|
|
200
|
+
z-index: 1;
|
|
201
|
+
|
|
202
|
+
border: 1px solid var(--gray-200, #dddfe4);
|
|
203
|
+
border-radius: 0.5rem;
|
|
204
|
+
line-height: 1rem;
|
|
205
|
+
position: absolute;
|
|
206
|
+
padding: 0.5rem 0.75rem;
|
|
207
|
+
top: 0.5rem;
|
|
208
|
+
left: 25%;
|
|
209
|
+
transform: translateX(-50%);
|
|
210
|
+
min-width: 13rem;
|
|
211
|
+
|
|
212
|
+
&::before,
|
|
213
|
+
&::after {
|
|
214
|
+
content: "";
|
|
215
|
+
position: absolute;
|
|
216
|
+
left: 50%;
|
|
217
|
+
transform: translateX(-50%);
|
|
218
|
+
border-style: solid;
|
|
219
|
+
border-width: 0.625rem;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&::after {
|
|
223
|
+
top: -1.1875rem;
|
|
224
|
+
border-color: transparent transparent var(--white, #fff) transparent;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&::before {
|
|
228
|
+
top: -1.25rem;
|
|
229
|
+
border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
& .tags-popover__content {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-wrap: wrap;
|
|
235
|
+
flex-direction: column;
|
|
236
|
+
gap: 0.375rem;
|
|
237
|
+
font-size: 0.75rem;
|
|
238
|
+
font-weight: 400;
|
|
239
|
+
|
|
240
|
+
& .tags-popover__name {
|
|
241
|
+
color: var(--gray-600, #676e79);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
& .tags-popover__value {
|
|
245
|
+
color: var(--gray-950, #14161a);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
`,le=_.styled.div`
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 0.25rem;
|
|
252
|
+
color: var(--gray-500);
|
|
253
|
+
font-size: 0.75rem;
|
|
254
|
+
font-weight: 500;
|
|
255
|
+
|
|
256
|
+
& i {
|
|
257
|
+
font-size: 1rem;
|
|
258
|
+
color: var(--warning-500, #F59E0B);
|
|
259
|
+
}
|
|
260
|
+
`,de=m.forwardRef(({sponsoredText:i="Sponsored"},p)=>e.jsxs(le,{ref:p,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),me="Vehicles_Cars",pe="Vehicles_Motorcycles",ge="Vehicles_Trucks",ue="Vehicles_AgriculturalMachines_Tractors",he="Vehicles_ConstructionMachines",fe="Vehicles_Bus",ve="Vehicles_Campers",we="RealEstates_",n={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:""}},ye=m.forwardRef((i,p)=>{const{uuid:c,name:w,price:l=0,sellingPrice:y,currency:b,isNegotiable:x,isFree:C,imageUrl:I,location:G,sponsored:A,imageComponent:B,onSelectCard:W=()=>{},freeText:X="Free",negotiableText:L="Negotiable",tags:s=[],categoryCode:N,condition:P,quantity:$,trade:E,sponsoredText:U,onBookmark:R=()=>{},bookmarkComponent:u,bookmarked:T,bookmarkLists:Y}=i,S=ae.useDetectMobile(),K=()=>{var d;if(!o.isDefined(u))return e.jsx(e.Fragment,{});const r=u,t=(d=u==null?void 0:u.props)==null?void 0:d.children,a=m.cloneElement(t,{key:`bookmark_pr__${T}`,bookmarked:T,productUuid:c,onAddToBookmark:()=>R(!0,c),onRemoveFromBookmark:()=>R(!1,c),bookmarkedUuidList:Y});return m.cloneElement(r,void 0,a)},V=[me,pe,ge,ue,he,fe,ve,we].some(r=>N==null?void 0:N.includes(r)),[Z,M]=m.useState(!1),H=()=>{M(!0)},J=()=>{M(!1)},Q=()=>e.jsx("div",{className:"tags-popover__trigger",children:s==null?void 0:s.map((r,t)=>{var h,f,v,F,z;const a=((h=n==null?void 0:n[r==null?void 0:r.code])==null?void 0:h.icon)??((f=n==null?void 0:n.default)==null?void 0:f.icon)??"",d=((v=r==null?void 0:r.measurementUnit)==null?void 0:v.symbol)??((F=n==null?void 0:n[r==null?void 0:r.code])==null?void 0:F.measure)??"",j=[(r==null?void 0:r.value)??((z=r==null?void 0:r.multiOptions)==null?void 0:z[0])??"",d].filter(Boolean).join(" ");return S?e.jsxs("div",{className:"tag-mobile",children:[j,t<(s==null?void 0:s.length)-1?" · ":""]}):e.jsxs(k,{className:"tag",children:[e.jsx("i",{className:a}),j]},`detailed-products-section-tag__${t+1}`)})}),ee=()=>e.jsx("div",{className:"tags-popover__content",children:s==null?void 0:s.map((r,t)=>{var h,f,v;const a=((h=r==null?void 0:r.measurementUnit)==null?void 0:h.symbol)??((f=n==null?void 0:n[r==null?void 0:r.code])==null?void 0:f.measure)??"",g=[(r==null?void 0:r.value)??((v=r==null?void 0:r.multiOptions)==null?void 0:v[0])??"",a].filter(Boolean).join(" "),j=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${j}: `}),e.jsx("span",{className:"tags-popover__value",children:g})]},`detailed-products-section-tag-dropdown__${t+1}`)})}),re=()=>{var r;if(S){const t=[P,$,E];return(r=t==null?void 0:t.filter(a=>o.isDefinedNotEmptyString(a)))==null?void 0:r.map((a,d,g)=>e.jsxs("div",{className:"tag-mobile",children:[a,d<(g==null?void 0:g.length)-1?" · ":""]}))}return e.jsxs(e.Fragment,{children:[P&&e.jsx(k,{className:"tag",children:P},"detailed-products-section-tag__condition"),$&&e.jsx(k,{className:"tag",children:$},"detailed-products-section-tag__quantity"),E&&e.jsx(k,{className:"tag",children:E},"detailed-products-section-tag__trade")]})},q=l>0&&b&&x!==!0&&C!==!0&&l!==y;return e.jsxs(D,{className:"product-card",onClick:W,children:[e.jsxs(ie,{className:"product-image-wrapper",children:[e.jsx(K,{}),o.isDefined(B)?B:e.jsx(oe.ProductImageWrapper,{src:I})]}),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",{...S?{}:{onMouseEnter:H,onMouseLeave:J},children:e.jsxs(ne,{placement:"bottom",open:Z,children:[e.jsx(te,{children:Q()}),e.jsx(se,{style:{all:"unset"},children:e.jsx(ce,{children:ee()})})]})}),!V&&re()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${q?"new-price":""}`,children:[y>0&&b&&x!==!0&&C!==!0&&e.jsx("div",{children:`${o.formatPrice(y)} ${o.GetCurrencySymbol(b)}`}),q&&e.jsx("div",{className:`${y>0?"full-price":""}`,children:`${o.formatPrice(l)} ${o.GetCurrencySymbol(b)}`}),x&&L,C&&X]}),e.jsx("div",{className:"location-text",children:G})]}),A===!0&&e.jsx(de,{sponsoredText:U})]})}),be=m.forwardRef(({},i)=>e.jsxs(D,{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"})]})]})),je=({limit:i=5,isLoading:p=!1,keyPrefix:c})=>e.jsx(e.Fragment,{children:Array.from({length:i},(w,l)=>e.jsx(be,{isLoading:p},`${c}-skeleton-product-card-${l}`))}),ke=({children:i,fallbackComponent:p=e.jsx(e.Fragment,{}),isLoading:c=!1,limit:w,keyPrefix:l})=>e.jsx(m.Suspense,{fallbackComponent:p,children:c===!0?e.jsx(je,{isLoading:c,limit:w,keyPrefix:l}):i});exports.DetailedProductCard=ye;exports.SuspenseDetailedProductCard=ke;
|
package/package.json
CHANGED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),o=require("./utils-Dl9xPH4c.cjs"),N=require("./emotion-styled.browser.esm-BtEseadx.cjs"),le=require("./index-BueKsXT8.cjs"),x=require("./Badge.cjs"),de=require("./Popover.cjs"),me=require("./PopoverTrigger.cjs"),pe=require("./PopoverContent.cjs"),ge=require("./useDetectMobile-zkbzoOGV.cjs"),A=require("./consts-goSZX3xP.cjs"),X=N.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
|
-
${o.truncateTextInRows(2)}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
& .price-text {
|
|
70
|
-
font-size: 1rem;
|
|
71
|
-
font-weight: 600;
|
|
72
|
-
${o.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
|
-
${o.truncateText()}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
& .tags-wrapper {
|
|
99
|
-
display: flex;
|
|
100
|
-
gap: 0.5rem;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
& .skeleton-img {
|
|
104
|
-
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
105
|
-
border-radius: 0.75rem;
|
|
106
|
-
border: 1px solid white;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
& .skeleton-title {
|
|
110
|
-
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
111
|
-
width: 100%;
|
|
112
|
-
height: 2.5rem;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& .skeleton-tags {
|
|
116
|
-
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
117
|
-
width: 80%;
|
|
118
|
-
height: 1.5rem;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
& .skeleton-price {
|
|
122
|
-
background-color: ${o.linearGradientAnimation("-90deg")};
|
|
123
|
-
width: 50%;
|
|
124
|
-
height: 2.5rem;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
& .skeleton-sponsored {
|
|
128
|
-
background-color: ${o.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: ${A.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
|
-
`,ue=N.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
|
-
& .bookmarking-btn {
|
|
167
|
-
position: absolute;
|
|
168
|
-
right: 0.5rem;
|
|
169
|
-
top: 0.5rem;
|
|
170
|
-
z-index: 1;
|
|
171
|
-
|
|
172
|
-
display: none;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:hover {
|
|
176
|
-
& .bookmarking-btn {
|
|
177
|
-
display: flex;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
& img {
|
|
182
|
-
display: block;
|
|
183
|
-
width: 100%;
|
|
184
|
-
height: 100%;
|
|
185
|
-
object-fit: cover;
|
|
186
|
-
border-radius: 0.75rem;
|
|
187
|
-
transition: var(--transition, all 0.3s ease);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
@media (max-width: ${A.MOBILE_SIZE_PX+"px"}) {
|
|
191
|
-
& img {
|
|
192
|
-
width: 8.875rem;
|
|
193
|
-
height: 8.875rem;
|
|
194
|
-
min-width: 8.875rem;
|
|
195
|
-
min-height: 8.875rem;
|
|
196
|
-
object-fit: cover;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
& .bookmarking-btn {
|
|
200
|
-
display: flex;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
`,he=N.styled.div`
|
|
204
|
-
background: var(--white, #fff);
|
|
205
|
-
z-index: 1;
|
|
206
|
-
|
|
207
|
-
border: 1px solid var(--gray-200, #dddfe4);
|
|
208
|
-
border-radius: 0.5rem;
|
|
209
|
-
line-height: 1rem;
|
|
210
|
-
position: absolute;
|
|
211
|
-
padding: 0.5rem 0.75rem;
|
|
212
|
-
top: 0.5rem;
|
|
213
|
-
left: 25%;
|
|
214
|
-
transform: translateX(-50%);
|
|
215
|
-
min-width: 13rem;
|
|
216
|
-
|
|
217
|
-
&::before,
|
|
218
|
-
&::after {
|
|
219
|
-
content: "";
|
|
220
|
-
position: absolute;
|
|
221
|
-
left: 50%;
|
|
222
|
-
transform: translateX(-50%);
|
|
223
|
-
border-style: solid;
|
|
224
|
-
border-width: 0.625rem;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&::after {
|
|
228
|
-
top: -1.1875rem;
|
|
229
|
-
border-color: transparent transparent var(--white, #fff) transparent;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&::before {
|
|
233
|
-
top: -1.25rem;
|
|
234
|
-
border-color: transparent transparent var(--gray-200, #dddfe4) transparent;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
& .tags-popover__content {
|
|
238
|
-
display: flex;
|
|
239
|
-
flex-wrap: wrap;
|
|
240
|
-
flex-direction: column;
|
|
241
|
-
gap: 0.375rem;
|
|
242
|
-
font-size: 0.75rem;
|
|
243
|
-
font-weight: 400;
|
|
244
|
-
|
|
245
|
-
& .tags-popover__name {
|
|
246
|
-
color: var(--gray-600, #676e79);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
& .tags-popover__value {
|
|
250
|
-
color: var(--gray-950, #14161a);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
`,fe=N.styled.div`
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
gap: 0.25rem;
|
|
257
|
-
color: var(--gray-500);
|
|
258
|
-
font-size: 0.75rem;
|
|
259
|
-
font-weight: 500;
|
|
260
|
-
|
|
261
|
-
& i {
|
|
262
|
-
font-size: 1rem;
|
|
263
|
-
color: var(--warning-500, #F59E0B);
|
|
264
|
-
}
|
|
265
|
-
`,ve=a.forwardRef(({sponsoredText:p="Sponsored"},w)=>e.jsxs(fe,{ref:w,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:p})]})),we="Vehicles_Cars",be="Vehicles_Motorcycles",ye="Vehicles_Trucks",je="Vehicles_AgriculturalMachines_Tractors",ke="Vehicles_ConstructionMachines",_e="Vehicles_Bus",xe="Vehicles_Campers",Ne="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:""}},Ce=a.forwardRef((p,w)=>{const{uuid:g,name:j,price:h=0,sellingPrice:k,currency:_,isNegotiable:C,isFree:P,imageUrl:L,location:U,sponsored:V,imageComponent:B,onSelectCard:Y=()=>{},freeText:K="Free",negotiableText:Z="Negotiable",tags:s=[],categoryCode:$,condition:E,quantity:S,trade:T,sponsoredText:H,onBookmark:z=()=>{},bookmarkComponent:b,bookmarked:M,bookmarkLists:J}=p,O=ge.useDetectMobile(),Q=()=>{var l;if(!o.isDefined(b))return e.jsx(e.Fragment,{});const r=b,n=(l=b==null?void 0:b.props)==null?void 0:l.children,t=a.cloneElement(n,{key:`bookmark_pr__${M}`,bookmarked:M,productUuid:g,onAddToBookmark:()=>z(!0,g),onRemoveFromBookmark:()=>z(!1,g),bookmarkedUuidList:J});return a.cloneElement(r,void 0,t)},q=[we,be,ye,je,ke,_e,xe,Ne].some(r=>$==null?void 0:$.includes(r)),[ee,F]=a.useState(!1),re=()=>{F(!0)},ne=()=>{F(!1)},c=a.useRef(null),f=a.useRef([]),[W,oe]=a.useState(s==null?void 0:s.length),te=()=>{var l,d,y;if(!(c!=null&&c.current)||((l=f==null?void 0:f.current)==null?void 0:l.length)===0)return;const r=(d=c==null?void 0:c.current)==null?void 0:d.offsetWidth;let n=0,t=0;for(let m=0;m<(s==null?void 0:s.length);m++){const v=((y=f==null?void 0:f.current[m])==null?void 0:y.offsetWidth)||0,u=n+v+4;if(u<=r)n+=u,t++;else break}oe(t)};a.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const n=new ResizeObserver(()=>{te()});return n.observe(r),()=>{n.disconnect()}},[s]);const se=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=s==null?void 0:s.slice(0,W))==null?void 0:r.map((n,t)=>{var v,u,I,R,G;const l=((v=i==null?void 0:i[n==null?void 0:n.code])==null?void 0:v.icon)??((u=i==null?void 0:i.default)==null?void 0:u.icon)??"",d=((I=n==null?void 0:n.measurementUnit)==null?void 0:I.symbol)??((R=i==null?void 0:i[n==null?void 0:n.code])==null?void 0:R.measure)??"",m=[(n==null?void 0:n.value)??((G=n==null?void 0:n.multiOptions)==null?void 0:G[0])??"",d].filter(Boolean).join(" ");return O?e.jsxs("div",{className:"tag-mobile",children:[m,t<W-1?" · ":""]}):e.jsxs(x,{ref:ce=>f.current[t]=ce,className:`tag ${V?"tag-sponsored":""}`,children:[e.jsx("i",{className:l}),m]},`detailed-products-section-tag__${t+1}`)})})},ie=()=>e.jsx("div",{className:"tags-popover__content",children:s==null?void 0:s.map((r,n)=>{var m,v,u;const t=((m=r==null?void 0:r.measurementUnit)==null?void 0:m.symbol)??((v=i==null?void 0:i[r==null?void 0:r.code])==null?void 0:v.measure)??"",d=[(r==null?void 0:r.value)??((u=r==null?void 0:r.multiOptions)==null?void 0:u[0])??"",t].filter(Boolean).join(" "),y=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${y}: `}),e.jsx("span",{className:"tags-popover__value",children:d})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ae=()=>{var r;if(O){const n=[E,S,T];return(r=n==null?void 0:n.filter(t=>o.isDefinedNotEmptyString(t)))==null?void 0:r.map((t,l,d)=>e.jsxs("div",{className:"tag-mobile",children:[t,l<(d==null?void 0:d.length)-1?" · ":""]}))}return e.jsxs(e.Fragment,{children:[E&&e.jsx(x,{className:"tag",children:E},"detailed-products-section-tag__condition"),S&&e.jsx(x,{className:"tag",children:S},"detailed-products-section-tag__quantity"),T&&e.jsx(x,{className:"tag",children:T},"detailed-products-section-tag__trade")]})},D=h>0&&_&&C!==!0&&P!==!0&&h!==k;return e.jsxs(X,{ref:c,className:"product-card",onClick:Y,children:[e.jsxs(ue,{className:"product-image-wrapper",children:[e.jsx(Q,{}),o.isDefined(B)?B:e.jsx(le.ProductImageWrapper,{src:L})]}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:j})}),e.jsxs("div",{className:"wrapper-card-3",children:[q&&e.jsx("div",{...O?{}:{onMouseEnter:re,onMouseLeave:ne},children:e.jsxs(de,{placement:"bottom",open:ee,children:[e.jsx(me,{children:se()}),e.jsx(pe,{style:{all:"unset"},children:e.jsx(he,{children:ie()})})]})}),!q&&ae()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${D?"new-price":""}`,children:[k>0&&_&&C!==!0&&P!==!0&&e.jsx("div",{children:`${o.formatPrice(k)} ${o.GetCurrencySymbol(_)}`}),D&&e.jsx("div",{className:`${k>0?"full-price":""}`,children:`${o.formatPrice(h)} ${o.GetCurrencySymbol(_)}`}),C&&Z,P&&K]}),e.jsx("div",{className:"location-text",children:U})]}),V===!0&&e.jsx(ve,{sponsoredText:H})]})}),Pe=a.forwardRef(({},p)=>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"})]})]})),$e=({limit:p=5,isLoading:w=!1,keyPrefix:g})=>e.jsx(e.Fragment,{children:Array.from({length:p},(j,h)=>e.jsx(Pe,{isLoading:w},`${g}-skeleton-product-card-${h}`))}),Ee=({children:p,fallbackComponent:w=e.jsx(e.Fragment,{}),isLoading:g=!1,limit:j,keyPrefix:h})=>e.jsx(a.Suspense,{fallbackComponent:w,children:g===!0?e.jsx($e,{isLoading:g,limit:j,keyPrefix:h}):p});exports.DetailedProductCard=Ce;exports.SuspenseDetailedProductCard=Ee;
|