@lanaco/lnc-react-ui 4.0.213 → 4.0.214
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/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +9 -11
- package/dist/FieldOfInterestsMasonrySection.cjs +14 -9
- package/dist/FieldOfInterestsMasonrySection.js +53 -48
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/{index-of6WydGq.cjs → index-Cav6G7wx.cjs} +6 -5
- package/dist/{index-9KyU46J0.js → index-D9fI5BvI.js} +13 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),c=require("react"),j=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./index-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),c=require("react"),j=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./index-Cav6G7wx.cjs"),N=require("./Button.cjs"),y=require("./style-AYc9hnFj.cjs"),P=c.memo(M.SimpleProductCard),R=c.forwardRef(({buttonText:o,buttonLink:t,items:r,onButtonAction:a=()=>{},onSelectCard:s=()=>{},getImage:l=()=>{},isHighlight:n=!1,componentName:d,LinkComponent:p},m)=>{const b=j.useDetectMobile(),g=c.useMemo(()=>{var u;return(u=r==null?void 0:r.slice(0,4))==null?void 0:u.map((e,q)=>i.jsx(P,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:(_,h)=>s==null?void 0:s(e==null?void 0:e.uuid,h),image:l(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,metadata:{name:d,accessor:e==null?void 0:e.accessor},LinkComponent:p},q))},[r]);return i.jsxs(y.Wrapper,{ref:m,className:`blog-product-cards-section ${n?"highlight":""}`,children:[i.jsx("div",{className:"wrapper__grid",children:g}),i.jsx(N,{text:o,borderRadius:"curved",btnType:b?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>a(t)})]})});module.exports=R;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { memo as N, forwardRef as M, useMemo as P } from "react";
|
|
3
3
|
import { u as _ } from "./useDetectMobile-CcVo3PNi.js";
|
|
4
|
-
import { S as w } from "./index-
|
|
4
|
+
import { S as w } from "./index-D9fI5BvI.js";
|
|
5
5
|
import y from "./Button.js";
|
|
6
6
|
import { W as U } from "./style-Bq3rMbnN.js";
|
|
7
|
-
const j = N(w),
|
|
7
|
+
const j = N(w), C = M(
|
|
8
8
|
({
|
|
9
9
|
buttonText: a,
|
|
10
10
|
buttonLink: c,
|
|
11
11
|
items: r,
|
|
12
12
|
onButtonAction: t = () => {
|
|
13
13
|
},
|
|
14
|
-
onSelectCard:
|
|
14
|
+
onSelectCard: o = () => {
|
|
15
15
|
},
|
|
16
|
-
isLoading: v = !1,
|
|
17
|
-
limit: z = 4,
|
|
18
16
|
getImage: u = () => {
|
|
19
17
|
},
|
|
20
18
|
isHighlight: l = !1,
|
|
@@ -23,7 +21,7 @@ const j = N(w), L = M(
|
|
|
23
21
|
}, p) => {
|
|
24
22
|
const n = _(), f = P(() => {
|
|
25
23
|
var s;
|
|
26
|
-
return (s = r == null ? void 0 : r.slice(0, 4)) == null ? void 0 : s.map((e, g) => /* @__PURE__ */
|
|
24
|
+
return (s = r == null ? void 0 : r.slice(0, 4)) == null ? void 0 : s.map((e, g) => /* @__PURE__ */ i(
|
|
27
25
|
j,
|
|
28
26
|
{
|
|
29
27
|
title: e == null ? void 0 : e.name,
|
|
@@ -33,7 +31,7 @@ const j = N(w), L = M(
|
|
|
33
31
|
currency: e == null ? void 0 : e.currency,
|
|
34
32
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
35
33
|
uuid: e == null ? void 0 : e.uuid,
|
|
36
|
-
onSelectCard: (
|
|
34
|
+
onSelectCard: (v, b) => o == null ? void 0 : o(e == null ? void 0 : e.uuid, b),
|
|
37
35
|
image: u(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
38
36
|
metadata: { name: d, accessor: e == null ? void 0 : e.accessor },
|
|
39
37
|
LinkComponent: m
|
|
@@ -47,8 +45,8 @@ const j = N(w), L = M(
|
|
|
47
45
|
ref: p,
|
|
48
46
|
className: `blog-product-cards-section ${l ? "highlight" : ""}`,
|
|
49
47
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ i("div", { className: "wrapper__grid", children: f }),
|
|
49
|
+
/* @__PURE__ */ i(
|
|
52
50
|
y,
|
|
53
51
|
{
|
|
54
52
|
text: a,
|
|
@@ -65,5 +63,5 @@ const j = N(w), L = M(
|
|
|
65
63
|
}
|
|
66
64
|
);
|
|
67
65
|
export {
|
|
68
|
-
|
|
66
|
+
C as default
|
|
69
67
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),_=require("react"),g=require("./utils-CITgSxXe.cjs"),z=require("./Icon.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./breakpoints-CcVm-gVm.cjs"),L=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),n=require("./style-BAcV7F53.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),_=require("react"),g=require("./utils-CITgSxXe.cjs"),z=require("./Icon.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./breakpoints-CcVm-gVm.cjs"),L=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),n=require("./style-BAcV7F53.cjs"),M=j.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
display: flex;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
align-self: stretch;
|
|
11
11
|
border-radius: 0.75rem;
|
|
12
12
|
border: 1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08));
|
|
13
|
-
background: var(--
|
|
13
|
+
background: var(--white, #fff);
|
|
14
14
|
|
|
15
15
|
&:hover {
|
|
16
16
|
cursor: pointer;
|
|
@@ -65,13 +65,12 @@
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,R=j.styled.div`
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
71
|
align-items: center;
|
|
72
72
|
gap: 0.75rem;
|
|
73
73
|
height: 100%;
|
|
74
|
-
max-width: 8rem;
|
|
75
74
|
min-width: 8rem;
|
|
76
75
|
|
|
77
76
|
&:hover {
|
|
@@ -105,8 +104,8 @@
|
|
|
105
104
|
font-style: normal;
|
|
106
105
|
font-weight: 400;
|
|
107
106
|
line-height: 1.5rem;
|
|
108
|
-
max-width:
|
|
109
|
-
${g.
|
|
107
|
+
max-width: 16rem;
|
|
108
|
+
${g.truncateText()}
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
&.active {
|
|
@@ -156,7 +155,7 @@
|
|
|
156
155
|
max-width: unset;
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
|
-
`,E=_.forwardRef(({text:t,isActive:s=!1,icon:i,onSelectCard:o=()=>{}},c)=>e.jsxs(
|
|
158
|
+
`,E=_.forwardRef(({text:t,isActive:s=!1,icon:i,onSelectCard:o=()=>{}},c)=>e.jsxs(R,{ref:c,className:s?"active":"",onClick:o,children:[e.jsx(z,{icon:i,className:"wrapper__icon"}),e.jsx("div",{className:"wrapper__text",children:t})]})),F=_.forwardRef(({image:t,imageComponent:s,title:i,description:o,className:c,onSelectCard:k=()=>{},link:x,LinkComponent:u},b)=>{const m=u||"a",{theme:h}=L.useTheme();return e.jsxs(M,{ref:b,theme:h,className:c,onClick:k,as:m,...u?{to:`/${x}`}:{href:`/${x}`},children:[g.isDefined(s)?s:e.jsx("img",{src:t,className:"wrapper__image"}),e.jsxs("div",{className:"wrapper__content",children:[i&&e.jsx("div",{className:"wrapper__title",children:i}),o&&e.jsx("div",{className:"wrapper__description",children:o})]})]})}),W=j.styled.div`
|
|
160
159
|
display: flex;
|
|
161
160
|
flex-direction: column;
|
|
162
161
|
align-items: center;
|
|
@@ -196,7 +195,9 @@
|
|
|
196
195
|
display: flex;
|
|
197
196
|
flex-wrap: wrap;
|
|
198
197
|
justify-content: center;
|
|
199
|
-
|
|
198
|
+
align-items: center;
|
|
199
|
+
align-self: stretch;
|
|
200
|
+
gap: 2rem;
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
& .wrapper__cards {
|
|
@@ -213,6 +214,10 @@
|
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
@media ${f.down("M")} {
|
|
217
|
+
& .wrapper__tags {
|
|
218
|
+
gap: 0.75rem;
|
|
219
|
+
}
|
|
220
|
+
|
|
216
221
|
& .wrapper__cards {
|
|
217
222
|
grid-template-columns: repeat(2, minmax(12.5rem, 1fr));
|
|
218
223
|
}
|
|
@@ -235,4 +240,4 @@
|
|
|
235
240
|
overflow-x: hidden;
|
|
236
241
|
}
|
|
237
242
|
}
|
|
238
|
-
`,O=({keyPrefix:t})=>e.jsxs(P,{className:"skeleton__tags",children:[e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-1`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-2`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-3`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-4`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-5`)]}),T=({keyPrefix:t,isLoading:s=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:o})=>e.jsx(_.Suspense,{fallbackComponent:i,children:s===!0?e.jsx(O,{keyPrefix:t}):o}),G=_.forwardRef(({title:t,subtitle:s,tags:i=[],items:o=[],limitTags:c=5,limitTagsForMobile:k=5,limit:x=3,limitForMobile:u=2,selectedTag:b,onSelectTag:m=()=>{},onSelectCard:h=()=>{},className:w,isLoadingTags:S=!1,LinkComponent:C},I)=>(_.useLayoutEffect(()=>{if(!g.isDefinedNotEmptyString(w))return;const r=()=>{const
|
|
243
|
+
`,O=({keyPrefix:t})=>e.jsxs(P,{className:"skeleton__tags",children:[e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-1`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-2`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-3`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-4`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-5`)]}),T=({keyPrefix:t,isLoading:s=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:o})=>e.jsx(_.Suspense,{fallbackComponent:i,children:s===!0?e.jsx(O,{keyPrefix:t}):o}),G=_.forwardRef(({title:t,subtitle:s,tags:i=[],items:o=[],limitTags:c=5,limitTagsForMobile:k=5,limit:x=3,limitForMobile:u=2,selectedTag:b,onSelectTag:m=()=>{},onSelectCard:h=()=>{},className:w,isLoadingTags:S=!1,LinkComponent:C},I)=>(_.useLayoutEffect(()=>{if(!g.isDefinedNotEmptyString(w))return;const r=()=>{const d=document==null?void 0:document.querySelector(`.${w} .wrapper__cards`),l=d==null?void 0:d.querySelectorAll(".wrapper__card");l==null||l.forEach(v=>{const q=v.getBoundingClientRect().height,N=Math.ceil((q+10)/20);v.style.gridRowEnd=`span ${N}`});const $=l==null?void 0:l[(l==null?void 0:l.length)-1];if($){const v=$.offsetTop+$.offsetHeight;d.style.height=`${v}px`}},p=document==null?void 0:document.querySelector(`.${w} .wrapper__cards`),a=p==null?void 0:p.querySelectorAll(".wrapper__image");let y=0;return(a==null?void 0:a.length)===0?r():(a==null||a.forEach(d=>{d.complete?y++:d.addEventListener("load",()=>{y++,y===(a==null?void 0:a.length)&&r()})}),y===(a==null?void 0:a.length)&&r()),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[w,o]),e.jsxs(W,{ref:I,limitTags:c,limitTagsForMobile:k,limitCards:x,limitCardsForMobile:u,className:w,numberOfTags:i==null?void 0:i.length,children:[e.jsxs("div",{className:"wrapper__heading",children:[t&&e.jsx("div",{className:"wrapper__title",children:t}),s&&e.jsx("div",{className:"wrapper__subtitle",children:s})]}),e.jsx(T,{isLoading:S,keyPrefix:"field-of-interests-masonry-tag",children:e.jsx("div",{className:"wrapper__tags__external",children:e.jsx("div",{className:"wrapper__tags",children:i==null?void 0:i.map((r,p)=>e.jsx(E,{icon:r==null?void 0:r.icon,text:r==null?void 0:r.title,isActive:(r==null?void 0:r.code)===b,onSelectCard:()=>m==null?void 0:m(r)},`field-of-interests-masonry-tag__${p+1}`))})})}),e.jsx("div",{className:"wrapper__cards",children:o==null?void 0:o.map((r,p)=>e.jsx(F,{image:r==null?void 0:r.image,imageComponent:r==null?void 0:r.imageComponent,title:r==null?void 0:r.title,description:r==null?void 0:r.description,onSelectCard:()=>h==null?void 0:h(r),className:"wrapper__card",link:r==null?void 0:r.link,LinkComponent:C},`field-of-interests-with-tags-card__${p+1}`))})]})));module.exports=G;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import
|
|
2
|
+
import { forwardRef as N, Suspense as R, useLayoutEffect as T } from "react";
|
|
3
|
+
import { n as z, t as W, m as q, l as G } from "./utils-B2fsQ6PS.js";
|
|
4
|
+
import j from "./Icon.js";
|
|
5
5
|
import { s as $ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
6
6
|
import { d as u } from "./breakpoints-ff0SIcV3.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { S as
|
|
9
|
-
const
|
|
7
|
+
import { u as A } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
|
+
import { S as D, b as f, d as _, a as w } from "./style-BwQ4djFC.js";
|
|
9
|
+
const H = $.a`
|
|
10
10
|
text-decoration: none;
|
|
11
11
|
color: var(--gray-950);
|
|
12
12
|
display: flex;
|
|
@@ -18,7 +18,7 @@ const D = $.a`
|
|
|
18
18
|
align-self: stretch;
|
|
19
19
|
border-radius: 0.75rem;
|
|
20
20
|
border: 1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08));
|
|
21
|
-
background: var(--
|
|
21
|
+
background: var(--white, #fff);
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
24
|
cursor: pointer;
|
|
@@ -47,7 +47,7 @@ const D = $.a`
|
|
|
47
47
|
font-style: normal;
|
|
48
48
|
font-weight: 500;
|
|
49
49
|
line-height: 1.5rem;
|
|
50
|
-
${
|
|
50
|
+
${z(2)}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
& .wrapper__description {
|
|
@@ -57,7 +57,7 @@ const D = $.a`
|
|
|
57
57
|
font-weight: 400;
|
|
58
58
|
line-height: 1rem;
|
|
59
59
|
letter-spacing: 0.025rem;
|
|
60
|
-
${
|
|
60
|
+
${z(2)}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -73,13 +73,12 @@ const D = $.a`
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`, B = $.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
flex-direction: column;
|
|
79
79
|
align-items: center;
|
|
80
80
|
gap: 0.75rem;
|
|
81
81
|
height: 100%;
|
|
82
|
-
max-width: 8rem;
|
|
83
82
|
min-width: 8rem;
|
|
84
83
|
|
|
85
84
|
&:hover {
|
|
@@ -113,8 +112,8 @@ const D = $.a`
|
|
|
113
112
|
font-style: normal;
|
|
114
113
|
font-weight: 400;
|
|
115
114
|
line-height: 1.5rem;
|
|
116
|
-
max-width:
|
|
117
|
-
${
|
|
115
|
+
max-width: 16rem;
|
|
116
|
+
${W()}
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
&.active {
|
|
@@ -164,21 +163,21 @@ const D = $.a`
|
|
|
164
163
|
max-width: unset;
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
`,
|
|
166
|
+
`, J = N(
|
|
168
167
|
({ text: t, isActive: l = !1, icon: i, onSelectCard: a = () => {
|
|
169
168
|
} }, d) => /* @__PURE__ */ o(
|
|
170
|
-
|
|
169
|
+
B,
|
|
171
170
|
{
|
|
172
171
|
ref: d,
|
|
173
172
|
className: l ? "active" : "",
|
|
174
173
|
onClick: a,
|
|
175
174
|
children: [
|
|
176
|
-
/* @__PURE__ */ r(
|
|
175
|
+
/* @__PURE__ */ r(j, { icon: i, className: "wrapper__icon" }),
|
|
177
176
|
/* @__PURE__ */ r("div", { className: "wrapper__text", children: t })
|
|
178
177
|
]
|
|
179
178
|
}
|
|
180
179
|
)
|
|
181
|
-
),
|
|
180
|
+
), K = N(
|
|
182
181
|
({
|
|
183
182
|
image: t,
|
|
184
183
|
imageComponent: l,
|
|
@@ -190,9 +189,9 @@ const D = $.a`
|
|
|
190
189
|
link: x,
|
|
191
190
|
LinkComponent: v
|
|
192
191
|
}, I) => {
|
|
193
|
-
const c = v || "a", { theme: h } =
|
|
192
|
+
const c = v || "a", { theme: h } = A();
|
|
194
193
|
return /* @__PURE__ */ o(
|
|
195
|
-
|
|
194
|
+
H,
|
|
196
195
|
{
|
|
197
196
|
ref: I,
|
|
198
197
|
theme: h,
|
|
@@ -201,7 +200,7 @@ const D = $.a`
|
|
|
201
200
|
as: c,
|
|
202
201
|
...v ? { to: `/${x}` } : { href: `/${x}` },
|
|
203
202
|
children: [
|
|
204
|
-
|
|
203
|
+
q(l) ? l : /* @__PURE__ */ r("img", { src: t, className: "wrapper__image" }),
|
|
205
204
|
/* @__PURE__ */ o("div", { className: "wrapper__content", children: [
|
|
206
205
|
i && /* @__PURE__ */ r("div", { className: "wrapper__title", children: i }),
|
|
207
206
|
a && /* @__PURE__ */ r("div", { className: "wrapper__description", children: a })
|
|
@@ -210,7 +209,7 @@ const D = $.a`
|
|
|
210
209
|
}
|
|
211
210
|
);
|
|
212
211
|
}
|
|
213
|
-
),
|
|
212
|
+
), Q = $.div`
|
|
214
213
|
display: flex;
|
|
215
214
|
flex-direction: column;
|
|
216
215
|
align-items: center;
|
|
@@ -250,7 +249,9 @@ const D = $.a`
|
|
|
250
249
|
display: flex;
|
|
251
250
|
flex-wrap: wrap;
|
|
252
251
|
justify-content: center;
|
|
253
|
-
|
|
252
|
+
align-items: center;
|
|
253
|
+
align-self: stretch;
|
|
254
|
+
gap: 2rem;
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
& .wrapper__cards {
|
|
@@ -267,6 +268,10 @@ const D = $.a`
|
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
@media ${u("M")} {
|
|
271
|
+
& .wrapper__tags {
|
|
272
|
+
gap: 0.75rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
270
275
|
& .wrapper__cards {
|
|
271
276
|
grid-template-columns: repeat(2, minmax(12.5rem, 1fr));
|
|
272
277
|
}
|
|
@@ -279,7 +284,7 @@ const D = $.a`
|
|
|
279
284
|
grid-template-columns: ${(t) => `repeat(${t == null ? void 0 : t.limitCardsForMobile}, minmax(0, 1fr))`};
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
|
-
`,
|
|
287
|
+
`, U = $(D)`
|
|
283
288
|
&.skeleton__tags {
|
|
284
289
|
max-width: 50rem;
|
|
285
290
|
}
|
|
@@ -289,77 +294,77 @@ const D = $.a`
|
|
|
289
294
|
overflow-x: hidden;
|
|
290
295
|
}
|
|
291
296
|
}
|
|
292
|
-
`,
|
|
297
|
+
`, V = ({ keyPrefix: t }) => /* @__PURE__ */ o(U, { className: "skeleton__tags", children: [
|
|
293
298
|
/* @__PURE__ */ o(
|
|
294
|
-
|
|
299
|
+
f,
|
|
295
300
|
{
|
|
296
301
|
alignItems: "center",
|
|
297
302
|
gap: "0.5rem",
|
|
298
303
|
children: [
|
|
299
304
|
/* @__PURE__ */ r(_, { width: "2.75rem", height: "2.75rem" }),
|
|
300
|
-
/* @__PURE__ */ r(
|
|
305
|
+
/* @__PURE__ */ r(w, { height: "1.5rem", width: "8rem" })
|
|
301
306
|
]
|
|
302
307
|
},
|
|
303
308
|
`${t}-1`
|
|
304
309
|
),
|
|
305
310
|
/* @__PURE__ */ o(
|
|
306
|
-
|
|
311
|
+
f,
|
|
307
312
|
{
|
|
308
313
|
alignItems: "center",
|
|
309
314
|
gap: "0.5rem",
|
|
310
315
|
noGradient: !0,
|
|
311
316
|
children: [
|
|
312
317
|
/* @__PURE__ */ r(_, { width: "2.75rem", height: "2.75rem" }),
|
|
313
|
-
/* @__PURE__ */ r(
|
|
318
|
+
/* @__PURE__ */ r(w, { height: "1.5rem", width: "8rem" })
|
|
314
319
|
]
|
|
315
320
|
},
|
|
316
321
|
`${t}-2`
|
|
317
322
|
),
|
|
318
323
|
/* @__PURE__ */ o(
|
|
319
|
-
|
|
324
|
+
f,
|
|
320
325
|
{
|
|
321
326
|
alignItems: "center",
|
|
322
327
|
gap: "0.5rem",
|
|
323
328
|
noGradient: !0,
|
|
324
329
|
children: [
|
|
325
330
|
/* @__PURE__ */ r(_, { width: "2.75rem", height: "2.75rem" }),
|
|
326
|
-
/* @__PURE__ */ r(
|
|
331
|
+
/* @__PURE__ */ r(w, { height: "1.5rem", width: "8rem" })
|
|
327
332
|
]
|
|
328
333
|
},
|
|
329
334
|
`${t}-3`
|
|
330
335
|
),
|
|
331
336
|
/* @__PURE__ */ o(
|
|
332
|
-
|
|
337
|
+
f,
|
|
333
338
|
{
|
|
334
339
|
alignItems: "center",
|
|
335
340
|
gap: "0.5rem",
|
|
336
341
|
noGradient: !0,
|
|
337
342
|
children: [
|
|
338
343
|
/* @__PURE__ */ r(_, { width: "2.75rem", height: "2.75rem" }),
|
|
339
|
-
/* @__PURE__ */ r(
|
|
344
|
+
/* @__PURE__ */ r(w, { height: "1.5rem", width: "8rem" })
|
|
340
345
|
]
|
|
341
346
|
},
|
|
342
347
|
`${t}-4`
|
|
343
348
|
),
|
|
344
349
|
/* @__PURE__ */ o(
|
|
345
|
-
|
|
350
|
+
f,
|
|
346
351
|
{
|
|
347
352
|
alignItems: "center",
|
|
348
353
|
gap: "0.5rem",
|
|
349
354
|
noGradient: !0,
|
|
350
355
|
children: [
|
|
351
356
|
/* @__PURE__ */ r(_, { width: "2.75rem", height: "2.75rem" }),
|
|
352
|
-
/* @__PURE__ */ r(
|
|
357
|
+
/* @__PURE__ */ r(w, { height: "1.5rem", width: "8rem" })
|
|
353
358
|
]
|
|
354
359
|
},
|
|
355
360
|
`${t}-5`
|
|
356
361
|
)
|
|
357
|
-
] }),
|
|
362
|
+
] }), X = ({
|
|
358
363
|
keyPrefix: t,
|
|
359
364
|
isLoading: l = !1,
|
|
360
365
|
fallbackComponent: i = /* @__PURE__ */ r(O, {}),
|
|
361
366
|
children: a
|
|
362
|
-
}) => /* @__PURE__ */ r(
|
|
367
|
+
}) => /* @__PURE__ */ r(R, { fallbackComponent: i, children: l === !0 ? /* @__PURE__ */ r(V, { keyPrefix: t }) : a }), ae = N(
|
|
363
368
|
({
|
|
364
369
|
title: t,
|
|
365
370
|
subtitle: l,
|
|
@@ -374,15 +379,15 @@ const D = $.a`
|
|
|
374
379
|
},
|
|
375
380
|
onSelectCard: h = () => {
|
|
376
381
|
},
|
|
377
|
-
className:
|
|
382
|
+
className: g,
|
|
378
383
|
isLoadingTags: C = !1,
|
|
379
384
|
// isLoadingCards = false,
|
|
380
385
|
LinkComponent: M
|
|
381
|
-
}, E) => (
|
|
382
|
-
if (!
|
|
386
|
+
}, E) => (T(() => {
|
|
387
|
+
if (!G(g))
|
|
383
388
|
return;
|
|
384
389
|
const e = () => {
|
|
385
|
-
const m = document == null ? void 0 : document.querySelector(`.${
|
|
390
|
+
const m = document == null ? void 0 : document.querySelector(`.${g} .wrapper__cards`), s = m == null ? void 0 : m.querySelectorAll(".wrapper__card");
|
|
386
391
|
s == null || s.forEach((b) => {
|
|
387
392
|
const F = b.getBoundingClientRect().height, L = Math.ceil((F + 10) / 20);
|
|
388
393
|
b.style.gridRowEnd = `span ${L}`;
|
|
@@ -392,7 +397,7 @@ const D = $.a`
|
|
|
392
397
|
const b = S.offsetTop + S.offsetHeight;
|
|
393
398
|
m.style.height = `${b}px`;
|
|
394
399
|
}
|
|
395
|
-
}, p = document == null ? void 0 : document.querySelector(`.${
|
|
400
|
+
}, p = document == null ? void 0 : document.querySelector(`.${g} .wrapper__cards`), n = p == null ? void 0 : p.querySelectorAll(".wrapper__image");
|
|
396
401
|
let y = 0;
|
|
397
402
|
return (n == null ? void 0 : n.length) === 0 ? e() : (n == null || n.forEach((m) => {
|
|
398
403
|
m.complete ? y++ : m.addEventListener("load", () => {
|
|
@@ -401,15 +406,15 @@ const D = $.a`
|
|
|
401
406
|
}), y === (n == null ? void 0 : n.length) && e()), window.addEventListener("resize", e), () => {
|
|
402
407
|
window.removeEventListener("resize", e);
|
|
403
408
|
};
|
|
404
|
-
}, [
|
|
405
|
-
|
|
409
|
+
}, [g, a]), /* @__PURE__ */ o(
|
|
410
|
+
Q,
|
|
406
411
|
{
|
|
407
412
|
ref: E,
|
|
408
413
|
limitTags: d,
|
|
409
414
|
limitTagsForMobile: k,
|
|
410
415
|
limitCards: x,
|
|
411
416
|
limitCardsForMobile: v,
|
|
412
|
-
className:
|
|
417
|
+
className: g,
|
|
413
418
|
numberOfTags: i == null ? void 0 : i.length,
|
|
414
419
|
children: [
|
|
415
420
|
/* @__PURE__ */ o("div", { className: "wrapper__heading", children: [
|
|
@@ -417,12 +422,12 @@ const D = $.a`
|
|
|
417
422
|
l && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: l })
|
|
418
423
|
] }),
|
|
419
424
|
/* @__PURE__ */ r(
|
|
420
|
-
|
|
425
|
+
X,
|
|
421
426
|
{
|
|
422
427
|
isLoading: C,
|
|
423
428
|
keyPrefix: "field-of-interests-masonry-tag",
|
|
424
429
|
children: /* @__PURE__ */ r("div", { className: "wrapper__tags__external", children: /* @__PURE__ */ r("div", { className: "wrapper__tags", children: i == null ? void 0 : i.map((e, p) => /* @__PURE__ */ r(
|
|
425
|
-
|
|
430
|
+
J,
|
|
426
431
|
{
|
|
427
432
|
icon: e == null ? void 0 : e.icon,
|
|
428
433
|
text: e == null ? void 0 : e.title,
|
|
@@ -434,7 +439,7 @@ const D = $.a`
|
|
|
434
439
|
}
|
|
435
440
|
),
|
|
436
441
|
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: a == null ? void 0 : a.map((e, p) => /* @__PURE__ */ r(
|
|
437
|
-
|
|
442
|
+
K,
|
|
438
443
|
{
|
|
439
444
|
image: e == null ? void 0 : e.image,
|
|
440
445
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
@@ -452,5 +457,5 @@ const D = $.a`
|
|
|
452
457
|
))
|
|
453
458
|
);
|
|
454
459
|
export {
|
|
455
|
-
|
|
460
|
+
ae as default
|
|
456
461
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),p=require("react"),y=require("./utils-CITgSxXe.cjs"),C=require("./emotion-styled.browser.esm-BtEseadx.cjs"),d=require("./breakpoints-CcVm-gVm.cjs"),b=require("./index-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),p=require("react"),y=require("./utils-CITgSxXe.cjs"),C=require("./emotion-styled.browser.esm-BtEseadx.cjs"),d=require("./breakpoints-CcVm-gVm.cjs"),b=require("./index-Cav6G7wx.cjs"),l=require("./style-BAcV7F53.cjs"),F=C.styled.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: auto;
|
|
4
4
|
border-radius: 999px;
|
|
@@ -3,7 +3,7 @@ import { forwardRef as F, Suspense as N } from "react";
|
|
|
3
3
|
import { m as S } from "./utils-B2fsQ6PS.js";
|
|
4
4
|
import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
5
|
import { d as _ } from "./breakpoints-ff0SIcV3.js";
|
|
6
|
-
import { S as j } from "./index-
|
|
6
|
+
import { S as j } from "./index-D9fI5BvI.js";
|
|
7
7
|
import { S as k, d as g, a as h } from "./style-BwQ4djFC.js";
|
|
8
8
|
const I = b.div`
|
|
9
9
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("react"),q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),l=require("./breakpoints-CcVm-gVm.cjs"),y=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),q=require("./emotion-styled.browser.esm-BtEseadx.cjs"),l=require("./breakpoints-CcVm-gVm.cjs"),y=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./index-Cav6G7wx.cjs"),F=require("./index-B9c6y2J5.cjs"),i=require("./style-BAcV7F53.cjs"),U=q.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(6, 1fr);
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -3,7 +3,7 @@ import { Suspense as y, memo as L, forwardRef as W, useMemo as j } from "react";
|
|
|
3
3
|
import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { d as a } from "./breakpoints-ff0SIcV3.js";
|
|
5
5
|
import { u as q } from "./useDetectMobile-CcVo3PNi.js";
|
|
6
|
-
import { S as z } from "./index-
|
|
6
|
+
import { S as z } from "./index-D9fI5BvI.js";
|
|
7
7
|
import { T as B } from "./index-CoQ9APCD.js";
|
|
8
8
|
import { b as R, S as $, a as A, c as i } from "./style-BwQ4djFC.js";
|
|
9
9
|
const D = N.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),p=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),r=require("./utils-CITgSxXe.cjs"),j=require("./index-DsINTjQk.cjs"),k=v.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
display: flex;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
background: linear-gradient(
|
|
12
|
-
|
|
12
|
+
178.16deg,
|
|
13
13
|
rgba(0, 0, 0, 0) 1.5%,
|
|
14
|
-
rgba(0, 0, 0, 0
|
|
15
|
-
#
|
|
14
|
+
rgba(0, 0, 0, 0) 37.37%,
|
|
15
|
+
#000000 98.39%
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
& .text-block {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
object-fit: cover; /* making sure the image isn't distorted */
|
|
45
45
|
border-radius: 0.75rem;
|
|
46
46
|
mix-blend-mode: multiply;
|
|
47
|
+
border: 1px solid var(--gray-95008, #14161a14);
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
& .fallback-image {
|
|
@@ -81,4 +82,4 @@
|
|
|
81
82
|
z-index: 1;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
`,C=p.forwardRef((u,$)=>{const{uuid:o,title:f,price:n=0,currency:a,isNegotiable:c,isFree:s,image:g,sellerUuid:N,nameSlug:
|
|
85
|
+
`,C=p.forwardRef((u,$)=>{const{uuid:o,title:f,price:n=0,currency:a,isNegotiable:c,isFree:s,image:g,sellerUuid:N,nameSlug:t,onSelectCard:x=()=>{},imageComponent:d,negotiableText:b="Negotiable",freeText:h="Free",metadata:e,LinkComponent:l}=u,y=l||"a",m=p.useRef();return i.jsxs(k,{ref:m,className:"simple-product-card","data-accessor":e==null?void 0:e.accessor,name:e==null?void 0:e.name,onClick:w=>x(w,m),as:y,...l?{to:`/product/${r.isDefinedNotEmptyString(t)?`${t}-`:""}${o}`}:{href:`/product/${r.isDefinedNotEmptyString(t)?`${t}-`:""}${o}`},children:[r.isDefined(d)?d:i.jsx(j.ProductImageWrapper,{src:g}),i.jsxs("div",{className:"text-block",children:[i.jsx("div",{className:"title-simple-product-card",children:f}),i.jsxs("div",{className:"price-chip",children:[n>0&&a&&c!==!0&&s!==!0&&`${r.formatPrice(n)} ${r.GetCurrencySymbol(a)}`,c&&b,s&&h]})]})]})});exports.SimpleProductCard=C;
|
|
@@ -14,10 +14,10 @@ const P = $.a`
|
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
background: linear-gradient(
|
|
17
|
-
|
|
17
|
+
178.16deg,
|
|
18
18
|
rgba(0, 0, 0, 0) 1.5%,
|
|
19
|
-
rgba(0, 0, 0, 0
|
|
20
|
-
#
|
|
19
|
+
rgba(0, 0, 0, 0) 37.37%,
|
|
20
|
+
#000000 98.39%
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
& .text-block {
|
|
@@ -49,6 +49,7 @@ const P = $.a`
|
|
|
49
49
|
object-fit: cover; /* making sure the image isn't distorted */
|
|
50
50
|
border-radius: 0.75rem;
|
|
51
51
|
mix-blend-mode: multiply;
|
|
52
|
+
border: 1px solid var(--gray-95008, #14161a14);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
& .fallback-image {
|
|
@@ -97,14 +98,14 @@ const P = $.a`
|
|
|
97
98
|
image: u,
|
|
98
99
|
sellerUuid: T,
|
|
99
100
|
nameSlug: r,
|
|
100
|
-
onSelectCard:
|
|
101
|
+
onSelectCard: b = () => {
|
|
101
102
|
},
|
|
102
|
-
imageComponent:
|
|
103
|
-
negotiableText:
|
|
103
|
+
imageComponent: d,
|
|
104
|
+
negotiableText: h = "Negotiable",
|
|
104
105
|
freeText: x = "Free",
|
|
105
106
|
metadata: e,
|
|
106
|
-
LinkComponent:
|
|
107
|
-
} = f, y =
|
|
107
|
+
LinkComponent: s
|
|
108
|
+
} = f, y = s || "a", l = k();
|
|
108
109
|
return /* @__PURE__ */ i(
|
|
109
110
|
P,
|
|
110
111
|
{
|
|
@@ -112,20 +113,20 @@ const P = $.a`
|
|
|
112
113
|
className: "simple-product-card",
|
|
113
114
|
"data-accessor": e == null ? void 0 : e.accessor,
|
|
114
115
|
name: e == null ? void 0 : e.name,
|
|
115
|
-
onClick: (w) =>
|
|
116
|
+
onClick: (w) => b(w, l),
|
|
116
117
|
as: y,
|
|
117
|
-
...
|
|
118
|
+
...s ? {
|
|
118
119
|
to: `/product/${p(r) ? `${r}-` : ""}${t}`
|
|
119
120
|
} : {
|
|
120
121
|
href: `/product/${p(r) ? `${r}-` : ""}${t}`
|
|
121
122
|
},
|
|
122
123
|
children: [
|
|
123
|
-
z(
|
|
124
|
+
z(d) ? d : /* @__PURE__ */ m(j, { src: u }),
|
|
124
125
|
/* @__PURE__ */ i("div", { className: "text-block", children: [
|
|
125
126
|
/* @__PURE__ */ m("div", { className: "title-simple-product-card", children: g }),
|
|
126
127
|
/* @__PURE__ */ i("div", { className: "price-chip", children: [
|
|
127
128
|
o > 0 && a && n !== !0 && c !== !0 && `${N(o)} ${S(a)}`,
|
|
128
|
-
n &&
|
|
129
|
+
n && h,
|
|
129
130
|
c && x
|
|
130
131
|
] })
|
|
131
132
|
] })
|