@lanaco/lnc-react-ui 4.0.186 → 4.0.188
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/BannerSectionCarousel.cjs +4 -4
- package/dist/BannerSectionCarousel.js +150 -158
- package/dist/BlogCardsSponsoredSection.cjs +5 -5
- package/dist/BlogCardsSponsoredSection.js +55 -51
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +182 -215
- package/dist/BlogListSection.cjs +6 -6
- package/dist/BlogListSection.js +134 -116
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +26 -24
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +3 -3
- package/dist/BlogSingleSection.js +21 -19
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +81 -76
- package/dist/BlogsSectionLarge.cjs +6 -6
- package/dist/BlogsSectionLarge.js +34 -31
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +68 -63
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +67 -54
- package/dist/BlogsSectionWithFilters.cjs +9 -9
- package/dist/BlogsSectionWithFilters.js +98 -84
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +50 -32
- package/dist/{CategorySimpleCard-DRQuoxXu.js → CategorySimpleCard-CEzArySG.js} +18 -17
- package/dist/{CategorySimpleCard-D5N8cx0Z.cjs → CategorySimpleCard-COGlTj06.cjs} +5 -5
- package/dist/DetailedProductsInfinitiveSection.cjs +4 -4
- package/dist/DetailedProductsInfinitiveSection.js +23 -21
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +38 -35
- package/dist/FieldOfInterestsMasonrySection.cjs +12 -12
- package/dist/FieldOfInterestsMasonrySection.js +87 -83
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +7 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +47 -43
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +87 -62
- package/dist/GeneralWithTagsCardsSection.cjs +4 -4
- package/dist/GeneralWithTagsCardsSection.js +83 -46
- package/dist/GiftCardsSection.cjs +7 -7
- package/dist/GiftCardsSection.js +56 -47
- package/dist/MasonryGeneralCardsSection.cjs +9 -9
- package/dist/MasonryGeneralCardsSection.js +82 -68
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +58 -50
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +79 -70
- package/dist/QuattroCardsSection.cjs +8 -8
- package/dist/QuattroCardsSection.js +62 -40
- package/dist/ReviewsSection.cjs +8 -8
- package/dist/ReviewsSection.js +92 -67
- package/dist/SalesCampaignsSection.cjs +18 -18
- package/dist/SalesCampaignsSection.js +304 -298
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +25 -23
- package/dist/SimpleCategoriesSection.cjs +4 -4
- package/dist/SimpleCategoriesSection.js +25 -22
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +53 -50
- package/dist/UrgentSaleProductsSection.cjs +4 -4
- package/dist/UrgentSaleProductsSection.js +41 -38
- package/dist/{index-CA59z2ge.js → index-9inVkeN6.js} +46 -40
- package/dist/{index-C8QkdNHi.js → index-BB63Jo6p.js} +42 -36
- package/dist/{index-DHV9awrE.cjs → index-BFc3nxYZ.cjs} +3 -3
- package/dist/{index-MiN854X_.cjs → index-BWE-RCPy.cjs} +6 -6
- package/dist/{index-Bmr3IeZ_.cjs → index-DBokGIps.cjs} +14 -14
- package/dist/{index-BipuzfLW.js → index-DMHtIdm-.js} +39 -29
- package/dist/{index-0p_3g3pT.cjs → index-D_5jNP-o.cjs} +3 -3
- package/dist/{index-DZ8515cZ.js → index-DdUC0zgY.js} +211 -192
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),c=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),q=require("./consts-goSZX3xP.cjs"),a=require("./utils-RnrgDDZP.cjs"),xe=require("./index-uwl7BjRF.cjs"),N=require("./Badge.cjs"),Se=require("./Popover.cjs"),ye=require("./PopoverTrigger.cjs"),Pe=require("./PopoverContent.cjs"),Ce=require("./useDetectMobile-zkbzoOGV.cjs"),r=require("./style-BAcV7F53.cjs"),_e=S.styled.a`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
color: var(--gray-950, #14161a);
|
|
10
10
|
& .seller {
|
|
11
11
|
text-transform: uppercase;
|
|
12
|
-
${
|
|
12
|
+
${a.truncateText()}
|
|
13
13
|
color: var(--gray-500);
|
|
14
14
|
font-size: 0.625rem;
|
|
15
15
|
font-weight: 400;
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
& .card-title {
|
|
63
63
|
font-size: 0.875rem;
|
|
64
64
|
font-weight: 600;
|
|
65
|
-
${
|
|
65
|
+
${a.truncateTextInRows(2)}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
& .price-text {
|
|
69
69
|
font-size: 1rem;
|
|
70
70
|
font-weight: 600;
|
|
71
|
-
${
|
|
71
|
+
${a.truncateText()}
|
|
72
72
|
display: flex;
|
|
73
73
|
align-items: end;
|
|
74
74
|
gap: 0.5rem;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
font-size: 0.75rem;
|
|
92
92
|
font-weight: 400;
|
|
93
93
|
color: var(--gray-600, #676e79);
|
|
94
|
-
${
|
|
94
|
+
${a.truncateText()}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
& .tags-wrapper {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
gap: 0.25rem;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
@media (max-width: ${
|
|
107
|
+
@media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
|
|
108
108
|
overflow: visible;
|
|
109
109
|
|
|
110
110
|
& .wrapper-card-3 {
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
&:hover .product-image-wrapper img {
|
|
168
168
|
transform: scale(1.1);
|
|
169
169
|
}
|
|
170
|
-
`,
|
|
170
|
+
`,Re=S.styled.div`
|
|
171
171
|
position: relative;
|
|
172
172
|
overflow: hidden;
|
|
173
173
|
border-radius: 0.75rem;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
|
|
189
189
|
width: 2.25rem;
|
|
190
190
|
height: 2.25rem;
|
|
191
|
-
border-radius: ${i=>
|
|
191
|
+
border-radius: ${i=>a.getBorderRadiusValueWithUnits(i.theme,"curved")};
|
|
192
192
|
border: 1px solid var(--gray-95008);
|
|
193
193
|
background-color: white;
|
|
194
194
|
color: var(--gray-950);
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
transition: var(--transition, all 0.3s ease);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
@media (max-width: ${
|
|
223
|
+
@media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
|
|
224
224
|
& img {
|
|
225
225
|
width: 8.875rem;
|
|
226
226
|
height: 8.875rem;
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
top: unset;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
`,
|
|
238
|
+
`,Le=S.styled.div`
|
|
239
239
|
background: var(--white, #fff);
|
|
240
240
|
z-index: 1;
|
|
241
241
|
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
color: var(--gray-950, #14161a);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
`,
|
|
288
|
+
`,Ne=S.styled.div`
|
|
289
289
|
display: flex;
|
|
290
290
|
align-items: center;
|
|
291
291
|
gap: 0.25rem;
|
|
@@ -297,12 +297,12 @@
|
|
|
297
297
|
font-size: 1rem;
|
|
298
298
|
color: var(--warning-500, #F59E0B);
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
@media (max-width: ${
|
|
300
|
+
`,$e=c.forwardRef(({sponsoredText:i="Sponsored"},y)=>e.jsxs(Ne,{ref:y,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),We="Vehicles_Cars",Ee="Vehicles_Motorcycles",Te="Vehicles_Trucks",qe="Vehicles_AgriculturalMachines_Tractors",Oe="Vehicles_ConstructionMachines",Ve="Vehicles_Bus",Be="Vehicles_Campers",ze="RealEstates_",s={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},Ie=c.forwardRef((i,y)=>{const{uuid:m,sellerUuid:$,name:A,price:P=0,sellingPrice:w,currency:j,isNegotiable:C,isFree:_,imageUrl:K,location:H,sponsored:Q,imageComponent:O,freeText:J="Free",negotiableText:ee="Negotiable",tags:t=[],categoryCode:R,categoryName:re,condition:V,quantity:W,trade:B,sponsoredText:oe,forCart:ne,forOrder:te,contactSeller:ie,hasVariants:ae,hasQuantities:se,status:le,onBookmark:E=()=>{},actionComponent:k,bookmarked:z,bookmarkLists:ce,metadata:b,sellerName:I,nameSlug:L,onSelectCard:de=()=>{},LinkComponent:M}=i,me=M||"a",T=Ce.useDetectMobile(),he=()=>{var h;if(!a.isDefined(k))return e.jsx(e.Fragment,{});const o=k,n=(h=k==null?void 0:k.props)==null?void 0:h.children,d=c.cloneElement(n,{key:`bookmark_pr__${z}`,bookmarked:z,productUuid:m,onAddToBookmark:()=>E(!0,m),onRemoveFromBookmark:()=>E(!1,m),bookmarkedUuidList:ce,sellerUuid:$,handleBookmarking:E,forCart:ne,forOrder:te,contactSeller:ie,hasVariants:ae,status:le,quantity:W,hasQuantities:se,productBasicInfo:{uuid:m,price:P,sellingPrice:w,categoryCode:R,categoryName:re,currency:j,isNegotiable:C,isFree:_}});return c.cloneElement(o,void 0,d)},D=[We,Ee,Te,qe,Oe,Ve,Be,ze].some(o=>R==null?void 0:R.includes(o)),[pe,F]=c.useState(!1),ue=()=>{F(!0)},ge=()=>{F(!1)},l=c.useRef(null),g=c.useRef([]),[fe,G]=c.useState(t==null?void 0:t.length),be=()=>{var h,v,x;if(!(l!=null&&l.current)||((h=g==null?void 0:g.current)==null?void 0:h.length)===0)return;if(T){G(t==null?void 0:t.length);return}const o=(v=l==null?void 0:l.current)==null?void 0:v.offsetWidth;let n=0,d=0;for(let p=0;p<(t==null?void 0:t.length);p++){const f=((x=g==null?void 0:g.current[p])==null?void 0:x.offsetWidth)||0,u=n+f+4;if(u<=o)n+=u,d++;else break}G(d)};c.useEffect(()=>{const o=l==null?void 0:l.current;if(!o)return;const n=new ResizeObserver(()=>{be()});return n.observe(o),()=>{n.disconnect()}},[t,T]);const ve=()=>{var o;return e.jsx("div",{className:"tags-popover__trigger",children:(o=t==null?void 0:t.slice(0,fe))==null?void 0:o.map((n,d)=>{var f,u,X,Y,Z;const h=((f=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:f.icon)??((u=s==null?void 0:s.default)==null?void 0:u.icon)??"",v=((X=n==null?void 0:n.measurementUnit)==null?void 0:X.symbol)??((Y=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:Y.measure)??"",p=[(n==null?void 0:n.value)??((Z=n==null?void 0:n.multiOptions)==null?void 0:Z[0])??"",v].filter(Boolean).join(" ");return e.jsxs(N,{ref:ke=>g.current[d]=ke,className:"tag",children:[e.jsx("i",{className:h}),p]},`detailed-products-section-tag__${d+1}`)})})},we=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((o,n)=>{var p,f,u;const d=((p=o==null?void 0:o.measurementUnit)==null?void 0:p.symbol)??((f=s==null?void 0:s[o==null?void 0:o.code])==null?void 0:f.measure)??"",v=[(o==null?void 0:o.value)??((u=o==null?void 0:o.multiOptions)==null?void 0:u[0])??"",d].filter(Boolean).join(" "),x=o==null?void 0:o.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${x}: `}),e.jsx("span",{className:"tags-popover__value",children:v})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),je=()=>e.jsxs(e.Fragment,{children:[V&&e.jsx(N,{className:"tag",children:V},"detailed-products-section-tag__condition"),W&&e.jsx(N,{className:"tag",children:W},"detailed-products-section-tag__quantity"),B&&e.jsx(N,{className:"tag",children:B},"detailed-products-section-tag__trade")]}),U=P>0&&j&&C!==!0&&_!==!0&&P!==w;return e.jsxs(_e,{ref:l,className:"product-card","data-accessor":b==null?void 0:b.accessor,name:b==null?void 0:b.name,onClick:o=>de(o,l),as:me,...M?{to:`/product/${a.isDefinedNotEmptyString(L)?`${L}-`:""}${m}`}:{href:`/product/${a.isDefinedNotEmptyString(L)?`${L}-`:""}${m}`},children:[e.jsxs(Re,{className:"product-image-wrapper",children:[e.jsx("div",{onClick:o=>{o==null||o.preventDefault(),o==null||o.stopPropagation()},children:e.jsx(he,{})}),a.isDefined(O)?O:e.jsx(xe.ProductImageWrapper,{src:K})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:I,children:I}),e.jsx("div",{className:"card-title",children:A})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:o=>{o==null||o.preventDefault(),o==null||o.stopPropagation()},children:[D&&e.jsx("div",{...T?{}:{onMouseEnter:ue,onMouseLeave:ge},children:e.jsxs(Se,{placement:"bottom",open:pe,children:[e.jsx(ye,{children:ve()}),e.jsx(Pe,{style:{all:"unset"},children:e.jsx(Le,{children:we()})})]})}),!D&&je()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${U?"new-price":""}`,children:[w>0&&j&&C!==!0&&_!==!0&&e.jsx("div",{children:`${a.formatPrice(w)} ${a.GetCurrencySymbol(j)}`}),U&&e.jsx("div",{className:`${w>0?"full-price":""}`,children:`${a.formatPrice(P)} ${a.GetCurrencySymbol(j)}`}),C&&ee,_&&J]}),e.jsx("div",{className:"location-text",children:H})]}),Q===!0&&e.jsx($e,{sponsoredText:oe})]})}),Me=S.styled(r.SkeletonRowWrapper)`
|
|
301
|
+
@media (max-width: ${q.MOBILE_SIZE_PX+"px"}) {
|
|
302
302
|
& > div {
|
|
303
303
|
&:nth-of-type(even) {
|
|
304
304
|
display: none;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
`,
|
|
308
|
+
`,De=({keyPrefix:i})=>e.jsxs(Me,{children:[e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${i}-1`),e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-2`),e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-3`),e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-4`),e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-5`),e.jsxs(r.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(r.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(r.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(r.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-6`)]}),Fe=({keyPrefix:i,isLoading:y=!1,fallbackComponent:m=e.jsx(e.Fragment,{}),children:$})=>e.jsx(c.Suspense,{fallbackComponent:m,children:y===!0?e.jsx(De,{keyPrefix:i}):$});exports.DetailedProductCard=Ie;exports.SuspenseDetailedProductCard=Fe;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s
|
|
4
|
-
import { M as
|
|
5
|
-
import { o as
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
import { P as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useRef as b } from "react";
|
|
3
|
+
import { s } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as l } from "./consts-BuFChS64.js";
|
|
5
|
+
import { o as y } from "./utils-Dc5zIpaz.js";
|
|
6
|
+
import { u as v } from "./useDetectMobile-Bkvj0VMa.js";
|
|
7
|
+
import c from "./Button.js";
|
|
8
|
+
import { P as C } from "./index-C_NnINik.js";
|
|
9
|
+
const k = s.a`
|
|
10
10
|
text-decoration: none;
|
|
11
11
|
color: var(--gray-950);
|
|
12
12
|
display: flex;
|
|
@@ -35,7 +35,7 @@ const v = d.a`
|
|
|
35
35
|
border-radius: 0.75rem 0 0 0.75rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
@media (max-width: ${
|
|
38
|
+
@media (max-width: ${l + "px"}) {
|
|
39
39
|
padding: 1rem;
|
|
40
40
|
column-gap: 1.5rem;
|
|
41
41
|
row-gap: 1rem;
|
|
@@ -60,7 +60,7 @@ const v = d.a`
|
|
|
60
60
|
margin-top: auto;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
`,
|
|
63
|
+
`, T = s.div`
|
|
64
64
|
padding: 1rem;
|
|
65
65
|
display: flex;
|
|
66
66
|
flex-direction: column;
|
|
@@ -76,7 +76,7 @@ const v = d.a`
|
|
|
76
76
|
font-weight: 400;
|
|
77
77
|
font-size: 0.875rem;
|
|
78
78
|
color: var(--gray-700, #4e555f);
|
|
79
|
-
${
|
|
79
|
+
${y(3)}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
& button {
|
|
@@ -84,27 +84,37 @@ const v = d.a`
|
|
|
84
84
|
margin-top: auto;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
@media (max-width: ${
|
|
87
|
+
@media (max-width: ${l + "px"}) {
|
|
88
88
|
padding: 0;
|
|
89
89
|
}
|
|
90
|
-
`,
|
|
91
|
-
const {
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
`, P = w((p, $) => {
|
|
91
|
+
const {
|
|
92
|
+
title: g,
|
|
93
|
+
imageUrl: h,
|
|
94
|
+
text: x,
|
|
95
|
+
onCardClick: t,
|
|
96
|
+
buttonText: o,
|
|
97
|
+
metadata: r,
|
|
98
|
+
titleSlug: i,
|
|
99
|
+
LinkComponent: a
|
|
100
|
+
} = p, u = a || "a", m = v(), n = b();
|
|
101
|
+
return /* @__PURE__ */ d(
|
|
102
|
+
k,
|
|
94
103
|
{
|
|
95
|
-
ref:
|
|
104
|
+
ref: n,
|
|
96
105
|
className: "blog-card",
|
|
97
106
|
"data-accessor": r == null ? void 0 : r.accessor,
|
|
98
107
|
name: r == null ? void 0 : r.name,
|
|
99
|
-
onClick: (
|
|
100
|
-
|
|
108
|
+
onClick: (f) => t(f, n),
|
|
109
|
+
as: u,
|
|
110
|
+
...a ? { to: `/blog/${i}` } : { href: `/blog/${i}` },
|
|
101
111
|
children: [
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */ e("div", { className: "text-wr-title", children:
|
|
105
|
-
/* @__PURE__ */ e("div", { className: "text-wr", children:
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
/* @__PURE__ */ e(C, { src: h }),
|
|
113
|
+
/* @__PURE__ */ d(T, { children: [
|
|
114
|
+
/* @__PURE__ */ e("div", { className: "text-wr-title", children: g }),
|
|
115
|
+
/* @__PURE__ */ e("div", { className: "text-wr", children: x }),
|
|
116
|
+
m !== !0 && /* @__PURE__ */ e(
|
|
117
|
+
c,
|
|
108
118
|
{
|
|
109
119
|
type: "button",
|
|
110
120
|
btnType: "outline",
|
|
@@ -115,8 +125,8 @@ const v = d.a`
|
|
|
115
125
|
}
|
|
116
126
|
)
|
|
117
127
|
] }),
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
m === !0 && /* @__PURE__ */ e(
|
|
129
|
+
c,
|
|
120
130
|
{
|
|
121
131
|
className: "action",
|
|
122
132
|
type: "button",
|
|
@@ -132,5 +142,5 @@ const v = d.a`
|
|
|
132
142
|
);
|
|
133
143
|
});
|
|
134
144
|
export {
|
|
135
|
-
|
|
145
|
+
P as B
|
|
136
146
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=require("react"),x=require("./Icon.cjs"),c=require("./utils-RnrgDDZP.cjs"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),f=require("./ShopAvatar-CV3lj34D.cjs"),I=require("./index-uwl7BjRF.cjs"),R=$.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
display: flex;
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
@media (max-width: ${
|
|
132
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
133
133
|
max-width: 10rem;
|
|
134
134
|
min-width: 10rem;
|
|
135
135
|
|
|
@@ -139,4 +139,4 @@
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
`,D=t.forwardRef(({uuid:o,image:p,imageComponent:_,title:w,subtitle:d,badges:v,rating:y,reviewCount:m,products:l,onSelectCard:j=()=>{},getProductImage:b=()=>{},canAcceptPayments:N,hideProducts:S=!1,showRating:q=!0,metadata:i={},LinkComponent:g},L)=>{const u=g||"a",s=t.useRef(),h=t.useRef();return t.useEffect(()=>{var n;const e=a=>{a.target.src=f.DefaultShopImage,a.onerror=null};return(n=s==null?void 0:s.current)==null||n.addEventListener("error",e),()=>{var a;(a=s==null?void 0:s.current)==null||a.removeEventListener("error",e)}},[]),r.jsxs(R,{ref:h,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,onClick:e=>j(e,h),as:u,...g?{to:`/shop/${o}`}:{href:`/shop/${o}`},children:[r.jsxs("div",{className:"wrapper__content",children:[c.isDefined(_)?_:p?r.jsx("img",{ref:s,src:p,className:"wrapper__image"}):r.jsx("img",{src:f.DefaultShopImage,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"wrapper__title",children:[w," ",N&&r.jsx(x,{color:"secondary",icon:"credit-card",className:"card"})]}),r.jsx("div",{className:"wrapper__subtitle",children:d}),v&&r.jsx("div",{className:"wrapper__badges"}),q&&r.jsxs("div",{className:"wrapper__rating",children:[r.jsx("div",{className:"wrapper_stars",children:[...Array(5).keys()].map((e,n)=>r.jsx(x,{icon:" mng-lnc-star--filled",className:`wrapper__star ${e>=y?"gold-star":""}`},`shop-card-rating-star__${n+1}`))}),r.jsxs("div",{className:"wrapper__review-count",children:["(",m==null?void 0:m.toLocaleString(),")"]})]})]})]}),S!==!0&&r.jsx("div",{className:"wrapper__products",children:l&&(l==null?void 0:l.map((e,n)=>r.jsx(t.Fragment,{children:r.jsx("div",{className:"wrapper__product",onClick:()=>{var a;return(a=e==null?void 0:e.onSelectProduct)==null?void 0:a.call(e,e==null?void 0:e.uuid)},children:c.isDefined(e==null?void 0:e.imageComponent)?e==null?void 0:e.imageComponent:r.jsx(I.ProductImageWrapper,{src:b(e==null?void 0:e.image,e==null?void 0:e.uuid,o),className:"product__image"})})},n)))})]})});exports.ShopCard=D;
|