@lanaco/lnc-react-ui 4.0.183 → 4.0.185
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/BlogCardsSponsoredSection.cjs +5 -3
- package/dist/BlogCardsSponsoredSection.js +68 -64
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogListSection.cjs +8 -6
- package/dist/BlogListSection.js +122 -114
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +1 -1
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +5 -3
- package/dist/BlogsSectionDetailed.js +53 -49
- package/dist/BlogsSectionLarge.cjs +2 -2
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +9 -7
- package/dist/BlogsSectionSimple.js +53 -47
- package/dist/BlogsSectionSimpleCentered.cjs +7 -5
- package/dist/BlogsSectionSimpleCentered.js +31 -26
- package/dist/BlogsSectionWithFilters.cjs +9 -7
- package/dist/BlogsSectionWithFilters.js +47 -42
- package/dist/BrandHitsSection.cjs +9 -7
- package/dist/BrandHitsSection.js +40 -35
- package/dist/{CategorySimpleCard-BNYjZQTH.cjs → CategorySimpleCard-D5N8cx0Z.cjs} +4 -3
- package/dist/{CategorySimpleCard-BA0S7TaN.js → CategorySimpleCard-DRQuoxXu.js} +17 -15
- package/dist/CheckBoxInput.cjs +27 -27
- package/dist/CheckBoxInput.js +61 -98
- package/dist/ColorInput.cjs +26 -26
- package/dist/ColorInput.js +127 -162
- package/dist/DetailedProductsInfinitiveSection.cjs +2 -2
- package/dist/DetailedProductsInfinitiveSection.js +6 -5
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +12 -10
- package/dist/FieldOfInterestsMasonrySection.cjs +5 -3
- package/dist/FieldOfInterestsMasonrySection.js +90 -85
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +4 -4
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +49 -46
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +8 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +44 -40
- package/dist/GeneralWithTagsCardsSection.cjs +12 -8
- package/dist/GeneralWithTagsCardsSection.js +50 -44
- package/dist/GiftCardsSection.cjs +7 -5
- package/dist/GiftCardsSection.js +46 -40
- package/dist/MasonryGeneralCardsSection.cjs +6 -5
- package/dist/MasonryGeneralCardsSection.js +26 -23
- package/dist/Modal.cjs +14 -13
- package/dist/Modal.js +88 -86
- package/dist/OverlayGeneralCardsSection.cjs +7 -5
- package/dist/OverlayGeneralCardsSection.js +30 -35
- package/dist/ProductsWithBannerSection.cjs +8 -6
- package/dist/ProductsWithBannerSection.js +71 -77
- package/dist/QuattroCardsSection.cjs +8 -6
- package/dist/QuattroCardsSection.js +31 -28
- package/dist/ReviewsSection.cjs +11 -9
- package/dist/ReviewsSection.js +38 -36
- package/dist/SalesCampaignsSection.cjs +22 -19
- package/dist/SalesCampaignsSection.js +299 -300
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +2 -2
- package/dist/SimpleCategoriesSection.js +7 -3
- package/dist/SimpleProductsSection.cjs +5 -5
- package/dist/SimpleProductsSection.js +62 -72
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +9 -7
- package/dist/{index-DoKMLSVY.cjs → index-0p_3g3pT.cjs} +4 -2
- package/dist/{index-Bhfq_YpE.js → index-BipuzfLW.js} +28 -25
- package/dist/{index-CaAhRJ2-.cjs → index-Bmr3IeZ_.cjs} +12 -11
- package/dist/{index-DWLKvVyZ.js → index-C8QkdNHi.js} +27 -23
- package/dist/{index-B8I1mHMA.js → index-CA59z2ge.js} +29 -26
- package/dist/{index-BnYqZk-h.cjs → index-DHV9awrE.cjs} +4 -2
- package/dist/{index-DxZ71UZ1.js → index-DZ8515cZ.js} +144 -137
- package/dist/{index-D55MR8tU.cjs → index-MiN854X_.cjs} +6 -4
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),d=require("react"),s=require("./utils-RnrgDDZP.cjs"),w=require("./Icon.cjs"),S=require("./style-CkcozOY6.cjs"),x=require("./index-uwl7BjRF.cjs"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),R=require("./Button.cjs"),z=require("./index-D0IYt1s3.cjs"),I=y.styled.a`
|
|
2
|
+
text-decoration: none;
|
|
3
|
+
color: var(--gray-950);
|
|
2
4
|
display: flex;
|
|
3
5
|
padding: 1rem;
|
|
4
6
|
align-items: center;
|
|
@@ -121,7 +123,7 @@
|
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
`,$=d.forwardRef(({title:t,imageUrl:p,options:n,publishedAt:m,timeToReadText:g="{0} min read",timeToRead:u=0,numberOfLikes:o=0,numberOfComments:c=0,isSponsored:l=!1,onSelectCard:f=()=>{},metadata:a,titleSlug:h},b)=>{const _=d.useRef();return r.jsxs(I,{ref:_,isSponsored:l,"data-accessor":a==null?void 0:a.accessor,name:a==null?void 0:a.name,onClick:i=>f(i,_),href:`/blog/${h}`,children:[l&&r.jsx("div",{className:"wrapper__sponsored",children:r.jsx(w,{icon:" mng-lnc-paw",sizeInUnits:"1.5rem"})}),r.jsx(x.ProductImageWrapper,{src:p,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:t}),r.jsx("div",{className:"wrapper__tags",children:n&&(n==null?void 0:n.map((i,e)=>r.jsx(S.BlogTag,{color:i==null?void 0:i.color,children:i==null?void 0:i.name},e)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"info__text",children:`${s.formatLocaleDateString(m)} • ${s.formatString(g,u)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),s.getRoundedNumber(o)]}),r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),s.getRoundedNumber(c)]})]})]})]})]})}),q=y.styled.div`
|
|
125
127
|
display: flex;
|
|
126
128
|
flex-direction: column;
|
|
127
129
|
align-items: flex-start;
|
|
@@ -205,4 +207,4 @@
|
|
|
205
207
|
gap: 1.5rem;
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
|
-
`,k=
|
|
210
|
+
`,k=d.memo($),E=d.forwardRef(({title:t,subtitle:p,icon:n,buttonText:m,buttonLink:g,timeToReadText:u="{0} min read",items:o,onButtonAction:c=()=>{},onSelectCard:l=()=>{},isLoading:f=!1,getImage:a=()=>{},componentName:h},b)=>{const _=d.useMemo(()=>{var i;return(i=o==null?void 0:o.slice(0,4))==null?void 0:i.map((e,j)=>r.jsx(k,{title:e==null?void 0:e.title,titleSlug:e==null?void 0:e.titleSlug,options:e==null?void 0:e.options,publishedAt:e==null?void 0:e.publishedAt,timeToReadText:u,timeToRead:e==null?void 0:e.timeToRead,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:(O,N)=>l==null?void 0:l(e,N),imageUrl:a(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,metadata:{name:h,accessor:e==null?void 0:e.accessor}},`blog-card-sponsored__${j+1}`))},[o]);return r.jsxs(q,{ref:b,children:[r.jsxs("div",{className:"wrapper__heading",children:[r.jsxs("div",{className:"wrapper__title",children:[t&&r.jsxs("div",{className:"title__text",children:[s.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:t})]}),s.isDefinedNotEmptyString(m)&&s.isDefinedNotEmptyString(g)&&!f&&r.jsx(R,{text:m,borderRadius:"curved",btnType:"tinted",className:"title__action",color:"neutral",onClick:i=>{var e;(e=i==null?void 0:i.target)==null||e.blur(),c==null||c(g)}})]}),p&&r.jsx("div",{className:"wrapper__subtitle",children:p})]}),r.jsx(z.SuspenseBlogCardsSponsored,{isLoading:f,keyPrefix:"blog-cards-sponsored-skeleton",children:r.jsx("div",{className:"wrapper__cards",children:_})})]})});module.exports=E;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y, useRef as j, memo as I, useMemo as R } from "react";
|
|
3
3
|
import { o as N, q as B, s as C, v, k as w } from "./utils-Dc5zIpaz.js";
|
|
4
4
|
import u from "./Icon.js";
|
|
@@ -8,7 +8,9 @@ import { s as S } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
|
8
8
|
import { M as z } from "./consts-BuFChS64.js";
|
|
9
9
|
import M from "./Button.js";
|
|
10
10
|
import { S as P } from "./index-BSpdEGFd.js";
|
|
11
|
-
const T = S.
|
|
11
|
+
const T = S.a`
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
color: var(--gray-950);
|
|
12
14
|
display: flex;
|
|
13
15
|
padding: 1rem;
|
|
14
16
|
align-items: center;
|
|
@@ -134,47 +136,49 @@ const T = S.div`
|
|
|
134
136
|
`, E = y(
|
|
135
137
|
({
|
|
136
138
|
title: t,
|
|
137
|
-
imageUrl:
|
|
138
|
-
options:
|
|
139
|
-
publishedAt:
|
|
140
|
-
timeToReadText:
|
|
141
|
-
timeToRead:
|
|
142
|
-
numberOfLikes:
|
|
143
|
-
numberOfComments:
|
|
144
|
-
isSponsored:
|
|
145
|
-
onSelectCard:
|
|
139
|
+
imageUrl: m,
|
|
140
|
+
options: s,
|
|
141
|
+
publishedAt: d,
|
|
142
|
+
timeToReadText: c = "{0} min read",
|
|
143
|
+
timeToRead: _ = 0,
|
|
144
|
+
numberOfLikes: n = 0,
|
|
145
|
+
numberOfComments: p = 0,
|
|
146
|
+
isSponsored: l = !1,
|
|
147
|
+
onSelectCard: f = () => {
|
|
146
148
|
},
|
|
147
|
-
metadata:
|
|
149
|
+
metadata: o,
|
|
150
|
+
titleSlug: h
|
|
148
151
|
}, b) => {
|
|
149
|
-
const
|
|
150
|
-
return /* @__PURE__ */
|
|
152
|
+
const g = j();
|
|
153
|
+
return /* @__PURE__ */ a(
|
|
151
154
|
T,
|
|
152
155
|
{
|
|
153
|
-
ref:
|
|
154
|
-
isSponsored:
|
|
155
|
-
"data-accessor":
|
|
156
|
-
name:
|
|
157
|
-
onClick: (
|
|
156
|
+
ref: g,
|
|
157
|
+
isSponsored: l,
|
|
158
|
+
"data-accessor": o == null ? void 0 : o.accessor,
|
|
159
|
+
name: o == null ? void 0 : o.name,
|
|
160
|
+
onClick: (i) => f(i, g),
|
|
161
|
+
href: `/blog/${h}`,
|
|
158
162
|
children: [
|
|
159
|
-
|
|
160
|
-
/* @__PURE__ */ r(U, { src:
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
+
l && /* @__PURE__ */ r("div", { className: "wrapper__sponsored", children: /* @__PURE__ */ r(u, { icon: " mng-lnc-paw", sizeInUnits: "1.5rem" }) }),
|
|
164
|
+
/* @__PURE__ */ r(U, { src: m, className: "wrapper__image" }),
|
|
165
|
+
/* @__PURE__ */ a("div", { className: "wrapper__content", children: [
|
|
166
|
+
/* @__PURE__ */ a("div", { className: "wrapper__subcontent", children: [
|
|
163
167
|
/* @__PURE__ */ r("div", { className: "wrapper__title", children: t }),
|
|
164
|
-
/* @__PURE__ */ r("div", { className: "wrapper__tags", children:
|
|
168
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: s && (s == null ? void 0 : s.map((i, e) => /* @__PURE__ */ r(O, { color: i == null ? void 0 : i.color, children: i == null ? void 0 : i.name }, e))) })
|
|
165
169
|
] }),
|
|
166
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ a("div", { className: "wrapper__info", children: [
|
|
167
171
|
/* @__PURE__ */ r("div", { className: "info__text", children: `${B(
|
|
168
|
-
|
|
169
|
-
)} • ${C(
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
d
|
|
173
|
+
)} • ${C(c, _)}` }),
|
|
174
|
+
/* @__PURE__ */ a("div", { className: "info__text", children: [
|
|
175
|
+
/* @__PURE__ */ a("div", { children: [
|
|
172
176
|
/* @__PURE__ */ r(u, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
173
|
-
v(
|
|
177
|
+
v(n)
|
|
174
178
|
] }),
|
|
175
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ a("div", { children: [
|
|
176
180
|
/* @__PURE__ */ r(u, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
177
|
-
v(
|
|
181
|
+
v(p)
|
|
178
182
|
] })
|
|
179
183
|
] })
|
|
180
184
|
] })
|
|
@@ -270,72 +274,72 @@ const T = S.div`
|
|
|
270
274
|
`, D = I(E), Y = y(
|
|
271
275
|
({
|
|
272
276
|
title: t,
|
|
273
|
-
subtitle:
|
|
274
|
-
icon:
|
|
275
|
-
buttonText:
|
|
276
|
-
buttonLink:
|
|
277
|
-
timeToReadText:
|
|
278
|
-
items:
|
|
279
|
-
onButtonAction:
|
|
277
|
+
subtitle: m,
|
|
278
|
+
icon: s,
|
|
279
|
+
buttonText: d,
|
|
280
|
+
buttonLink: c,
|
|
281
|
+
timeToReadText: _ = "{0} min read",
|
|
282
|
+
items: n,
|
|
283
|
+
onButtonAction: p = () => {
|
|
280
284
|
},
|
|
281
|
-
onSelectCard:
|
|
285
|
+
onSelectCard: l = () => {
|
|
282
286
|
},
|
|
283
|
-
isLoading:
|
|
284
|
-
getImage:
|
|
287
|
+
isLoading: f = !1,
|
|
288
|
+
getImage: o = () => {
|
|
285
289
|
},
|
|
286
|
-
componentName:
|
|
287
|
-
},
|
|
288
|
-
const
|
|
289
|
-
var
|
|
290
|
-
return (
|
|
290
|
+
componentName: h
|
|
291
|
+
}, b) => {
|
|
292
|
+
const g = R(() => {
|
|
293
|
+
var i;
|
|
294
|
+
return (i = n == null ? void 0 : n.slice(0, 4)) == null ? void 0 : i.map((e, k) => /* @__PURE__ */ r(
|
|
291
295
|
D,
|
|
292
296
|
{
|
|
293
297
|
title: e == null ? void 0 : e.title,
|
|
294
298
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
295
299
|
options: e == null ? void 0 : e.options,
|
|
296
300
|
publishedAt: e == null ? void 0 : e.publishedAt,
|
|
297
|
-
timeToReadText:
|
|
301
|
+
timeToReadText: _,
|
|
298
302
|
timeToRead: e == null ? void 0 : e.timeToRead,
|
|
299
303
|
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
300
304
|
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
301
305
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
302
|
-
onSelectCard: (L, $) =>
|
|
303
|
-
imageUrl:
|
|
304
|
-
metadata: { name:
|
|
306
|
+
onSelectCard: (L, $) => l == null ? void 0 : l(e, $),
|
|
307
|
+
imageUrl: o(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
308
|
+
metadata: { name: h, accessor: e == null ? void 0 : e.accessor }
|
|
305
309
|
},
|
|
306
310
|
`blog-card-sponsored__${k + 1}`
|
|
307
311
|
));
|
|
308
|
-
}, [
|
|
309
|
-
return /* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
t && /* @__PURE__ */
|
|
313
|
-
w(
|
|
312
|
+
}, [n]);
|
|
313
|
+
return /* @__PURE__ */ a(W, { ref: b, children: [
|
|
314
|
+
/* @__PURE__ */ a("div", { className: "wrapper__heading", children: [
|
|
315
|
+
/* @__PURE__ */ a("div", { className: "wrapper__title", children: [
|
|
316
|
+
t && /* @__PURE__ */ a("div", { className: "title__text", children: [
|
|
317
|
+
w(s) && /* @__PURE__ */ r("i", { className: s }),
|
|
314
318
|
/* @__PURE__ */ r("span", { children: t })
|
|
315
319
|
] }),
|
|
316
|
-
w(
|
|
320
|
+
w(d) && w(c) && !f && /* @__PURE__ */ r(
|
|
317
321
|
M,
|
|
318
322
|
{
|
|
319
|
-
text:
|
|
323
|
+
text: d,
|
|
320
324
|
borderRadius: "curved",
|
|
321
325
|
btnType: "tinted",
|
|
322
326
|
className: "title__action",
|
|
323
327
|
color: "neutral",
|
|
324
|
-
onClick: (
|
|
328
|
+
onClick: (i) => {
|
|
325
329
|
var e;
|
|
326
|
-
(e =
|
|
330
|
+
(e = i == null ? void 0 : i.target) == null || e.blur(), p == null || p(c);
|
|
327
331
|
}
|
|
328
332
|
}
|
|
329
333
|
)
|
|
330
334
|
] }),
|
|
331
|
-
|
|
335
|
+
m && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: m })
|
|
332
336
|
] }),
|
|
333
337
|
/* @__PURE__ */ r(
|
|
334
338
|
P,
|
|
335
339
|
{
|
|
336
|
-
isLoading:
|
|
340
|
+
isLoading: f,
|
|
337
341
|
keyPrefix: "blog-cards-sponsored-skeleton",
|
|
338
|
-
children: /* @__PURE__ */ r("div", { className: "wrapper__cards", children:
|
|
342
|
+
children: /* @__PURE__ */ r("div", { className: "wrapper__cards", children: g })
|
|
339
343
|
}
|
|
340
344
|
)
|
|
341
345
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react"),c=require("./CategorySimpleCard-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),c=require("./CategorySimpleCard-D5N8cx0Z.cjs"),d=require("./style-BTTXJFJN.cjs"),g=s.memo(c.CategorySimpleCard),l=s.forwardRef(({items:r,onSelectCard:i=()=>{},isLoading:p=!1,limit:C=4,isHighlight:t=!1},u)=>{const m=s.useMemo(()=>{var o;return(o=r==null?void 0:r.slice(0,4))==null?void 0:o.map((e,n)=>a.jsx(g,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},n))},[r]);return a.jsx(d.Wrapper,{ref:u,className:t?"highlight":"",children:a.jsx("div",{className:"wrapper__grid",children:m})})});module.exports=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as g, forwardRef as l, useMemo as t } from "react";
|
|
3
|
-
import { C as u } from "./CategorySimpleCard-
|
|
3
|
+
import { C as u } from "./CategorySimpleCard-DRQuoxXu.js";
|
|
4
4
|
import { W as f } from "./style-tw6KjI2J.js";
|
|
5
5
|
const n = g(u), M = l(
|
|
6
6
|
({
|
package/dist/BlogListSection.cjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("react"),v=require("./Icon.cjs"),P=require("./IconButton.cjs"),d=require("./utils-RnrgDDZP.cjs"),C=require("./index-uwl7BjRF.cjs"),$=require("./style-CkcozOY6.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),R=require("./consts-goSZX3xP.cjs"),t=require("./style-BAcV7F53.cjs"),N=b.styled.a`
|
|
2
|
+
text-decoration: none;
|
|
3
|
+
color: var(--gray-950);
|
|
2
4
|
display: flex;
|
|
3
5
|
padding: 1rem;
|
|
4
6
|
align-items: center;
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
@media (max-width: ${
|
|
98
|
+
@media (max-width: ${R.MOBILE_SIZE_PX+"px"}) {
|
|
97
99
|
flex-direction: column;
|
|
98
100
|
padding: 0;
|
|
99
101
|
background: transparent;
|
|
@@ -144,7 +146,7 @@
|
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
|
-
`,
|
|
149
|
+
`,q=a.forwardRef(({blogUuid:i,title:s,imageUrl:c,options:o,publishedAt:h,timeToReadText:g="{0} min read",timeToRead:u=0,numberOfLikes:j=0,numberOfComments:w=0,isBookmarked:m=!1,onSelectCard:f=()=>{},onBookmark:_=()=>{},onShare:r=()=>{},bookmarkComponent:p=e.jsx(e.Fragment,{}),metadata:l,titleSlug:y},k)=>{const x=()=>d.isDefined(p)?a.cloneElement(p,{key:`bookmark_blog__${i}__${m}`,isBookmarked:m,blogUuid:i,onBookmark:(S,W)=>_(S,W),ref:k,componentName:"ExploreBlogSectionCard"}):e.jsx(e.Fragment,{}),L=a.useRef();return e.jsxs(N,{ref:L,name:l==null?void 0:l.name,"data-accessor":l==null?void 0:l.accessor,onClick:n=>f(n,L),className:"blog-card-item",href:`/blog/${y}`,children:[e.jsx(C.ProductImageWrapper,{src:c,className:"wrapper__image"}),e.jsxs("div",{className:"wrapper__content",children:[e.jsxs("div",{className:"wrapper__subcontent",children:[e.jsx("div",{className:"wrapper__title",children:s}),e.jsxs("div",{className:"wrapper__tags-action",children:[e.jsx("div",{className:"wrapper__tags",children:o&&(o==null?void 0:o.map((n,S)=>e.jsx($.BlogTag,{color:n==null?void 0:n.color,children:n==null?void 0:n.name},`blog-card-sponsored-option__${S+1}`)))}),e.jsxs("div",{className:"info__content mobile-only",onClick:n=>{n.stopPropagation(),n.preventDefault()},children:[e.jsx(x,{}),e.jsx(P,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{r()}})]})]})]}),e.jsxs("div",{className:"wrapper__info",children:[e.jsxs("div",{className:"info__content",children:[e.jsx("div",{className:"info__text",children:`${d.formatLocaleDateString(h)} • ${d.formatString(g,u)}`}),e.jsxs("div",{className:"info__text",children:[e.jsxs("div",{children:[e.jsx(v,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),d.getRoundedNumber(j)]}),e.jsxs("div",{children:[e.jsx(v,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),d.getRoundedNumber(w)]})]})]}),e.jsxs("div",{className:"info__content desktop-only",onClick:n=>{n==null||n.preventDefault(),n==null||n.stopPropagation()},children:[e.jsx(x,{}),e.jsx(P,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:()=>{r()}})]})]})]})]})}),B=b.styled.div`
|
|
148
150
|
display: flex;
|
|
149
151
|
flex-direction: column;
|
|
150
152
|
align-items: flex-start;
|
|
@@ -168,10 +170,10 @@
|
|
|
168
170
|
bottom: -1.25rem;
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
|
-
`,
|
|
172
|
-
@media (max-width: ${
|
|
173
|
+
`,I=b.styled(t.SkeletonColumnWrapper)`
|
|
174
|
+
@media (max-width: ${R.MOBILE_SIZE_PX+"px"}) {
|
|
173
175
|
& > div {
|
|
174
176
|
flex-direction: column;
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
|
-
`,
|
|
179
|
+
`,G=({keyPrefix:i})=>e.jsxs(I,{children:[e.jsxs(t.SkeletonRowWrapper,{children:[e.jsx(t.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(t.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(t.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-1`),e.jsxs(t.SkeletonRowWrapper,{children:[e.jsx(t.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(t.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(t.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-2`),e.jsxs(t.SkeletonRowWrapper,{children:[e.jsx(t.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(t.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(t.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-3`),e.jsxs(t.SkeletonRowWrapper,{children:[e.jsx(t.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(t.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(t.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-4`),e.jsxs(t.SkeletonRowWrapper,{children:[e.jsx(t.SkeletonSquarePlaceholder,{height:"9.5rem",width:"17.75rem"}),e.jsxs(t.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{height:"1.5rem"}),e.jsxs(t.SkeletonRowWrapper,{noGradient:!0,children:[e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"}),e.jsx(t.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]},`${i}-5`)]}),z=({keyPrefix:i,isLoading:s=!1,fallbackComponent:c=e.jsx(e.Fragment,{}),children:o})=>e.jsx(a.Suspense,{fallbackComponent:c,children:s===!0?e.jsx(G,{keyPrefix:i}):o}),E=a.memo(q),O=a.forwardRef(({timeToReadText:i="{0} min read",items:s,isLoading:c=!1,onSelectCard:o=()=>{},onShare:h=()=>{},onBookmark:g=()=>{},getImage:u=()=>{},isSeparated:j=!0,bookmarkComponent:w=e.jsx(e.Fragment,{}),componentName:m},f)=>{const _=a.useMemo(()=>s==null?void 0:s.map((r,p)=>{var l;return e.jsx(E,{blogUuid:r==null?void 0:r.uuid,title:r==null?void 0:r.title,titleSlug:r==null?void 0:r.titleSlug,options:r==null?void 0:r.options,publishedAt:r==null?void 0:r.publishedAt,timeToReadText:i,timeToRead:r==null?void 0:r.timeToRead,numberOfLikes:r==null?void 0:r.numberOfLikes,numberOfComments:r==null?void 0:r.numberOfComments,isSponsored:r==null?void 0:r.isSponsored,isBookmarked:r==null?void 0:r.isBookmarked,onSelectCard:(y,k)=>o==null?void 0:o(r,k),onShare:()=>h==null?void 0:h(r),onBookmark:g,imageUrl:u(r==null?void 0:r.imageUrl,r==null?void 0:r.uuid)||null,bookmarkComponent:w,metadata:{name:m,accessor:r==null?void 0:r.accessor}},`blog-card-item__${p+1}__${(l=r==null?void 0:r.isBookmarked)==null?void 0:l.toString()}`)}),[s]);return e.jsx(z,{isLoading:c,keyPrefix:"blog-list-skeleton",children:e.jsx(B,{ref:f,className:j?"separated":"",children:_})})});module.exports=O;
|