@lanaco/lnc-react-ui 4.0.121 → 4.0.123
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 +112 -126
- package/dist/BannerSectionCarousel.js +654 -1509
- package/dist/BannerSectionGrid.cjs +3 -3
- package/dist/BannerSectionGrid.js +3 -3
- package/dist/BannerSectionSimple.cjs +40 -4
- package/dist/BannerSectionSimple.js +66 -29
- package/dist/BannerSectionWithList.cjs +42 -8
- package/dist/BannerSectionWithList.js +57 -22
- package/dist/BannerSectionWithListImage.cjs +23 -6
- package/dist/BannerSectionWithListImage.js +52 -35
- package/dist/BlogCardsSponsoredSection.cjs +13 -7
- package/dist/BlogCardsSponsoredSection.js +19 -13
- package/dist/BlogListSection.cjs +11 -3
- package/dist/BlogListSection.js +18 -10
- package/dist/BlogsSectionSimple.cjs +16 -7
- package/dist/BlogsSectionSimple.js +47 -32
- package/dist/BlogsSectionSimpleCentered.cjs +19 -10
- package/dist/BlogsSectionSimpleCentered.js +33 -24
- package/dist/DateInput.cjs +1 -1
- package/dist/DateInput.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +22 -15
- package/dist/FieldOfInterestsMasonrySection.js +70 -63
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -9
- package/dist/FieldOfInterestsWithTagsCardsSection.js +49 -44
- package/dist/Kanban.cjs +1 -1
- package/dist/Kanban.js +2 -2
- package/dist/{KanbanCard-Crf-cTxA.js → KanbanCard-68kSAXL6.js} +1 -1
- package/dist/{KanbanCard-CP60mpJO.cjs → KanbanCard-BDvoqTDS.cjs} +1 -1
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +1 -1
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +105 -63
- package/dist/OverlayGeneralCardsSection.js +172 -161
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/index-Bg5OOQN0.cjs +5 -0
- package/dist/{index-BaLBHyTh.cjs → index-CSgGox95.cjs} +6 -6
- package/dist/{index-CsrdUl1x.js → index-DK8dqEUQ.js} +5 -5
- package/dist/{index-BXrmgzsU.js → index-fN7hCOo3.js} +4 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index-BZnmT78f.cjs +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as y, Fragment as v } from "react";
|
|
3
3
|
import { s as n } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { M as
|
|
5
|
-
import
|
|
4
|
+
import { M as a } from "./consts-BuFChS64.js";
|
|
5
|
+
import $ from "./Button.js";
|
|
6
6
|
const H = n.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
border-radius: 0.75rem;
|
|
@@ -26,8 +26,12 @@ const H = n.div`
|
|
|
26
26
|
|
|
27
27
|
`}
|
|
28
28
|
|
|
29
|
-
@media (max-width: ${
|
|
29
|
+
@media (max-width: ${a + "px"}) {
|
|
30
30
|
flex-direction: column;
|
|
31
|
+
border-radius: 0;
|
|
32
|
+
border: none;
|
|
33
|
+
box-shadow: none;
|
|
34
|
+
|
|
31
35
|
& img {
|
|
32
36
|
max-width: 100%;
|
|
33
37
|
min-width: 100%;
|
|
@@ -43,8 +47,8 @@ const H = n.div`
|
|
|
43
47
|
flex: 1;
|
|
44
48
|
flex-direction: column;
|
|
45
49
|
|
|
46
|
-
@media (max-width: ${
|
|
47
|
-
padding: 1.25rem;
|
|
50
|
+
@media (max-width: ${a + "px"}) {
|
|
51
|
+
padding: 0 0 1.25rem 0;
|
|
48
52
|
}
|
|
49
53
|
`, k = n.div`
|
|
50
54
|
display: flex;
|
|
@@ -52,20 +56,27 @@ const H = n.div`
|
|
|
52
56
|
gap: 0.25rem;
|
|
53
57
|
|
|
54
58
|
& .header-title {
|
|
55
|
-
|
|
59
|
+
color: var(--gray-950, #14161a);
|
|
60
|
+
font-size: 1.75rem;
|
|
61
|
+
font-style: normal;
|
|
56
62
|
font-weight: 600;
|
|
63
|
+
line-height: 2.25rem;
|
|
64
|
+
letter-spacing: -0.5904px;
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
& .header-subtitle {
|
|
60
|
-
color: var(--gray-
|
|
68
|
+
color: var(--gray-950, #14161a);
|
|
61
69
|
font-size: 1rem;
|
|
70
|
+
font-style: normal;
|
|
62
71
|
font-weight: 500;
|
|
72
|
+
line-height: 1.5rem;
|
|
73
|
+
letter-spacing: -0.0112rem;
|
|
63
74
|
}
|
|
64
75
|
|
|
65
|
-
@media (max-width: ${
|
|
76
|
+
@media (max-width: ${a + "px"}) {
|
|
66
77
|
flex-direction: column;
|
|
67
78
|
}
|
|
68
|
-
`,
|
|
79
|
+
`, z = n.div`
|
|
69
80
|
display: flex;
|
|
70
81
|
flex-direction: column;
|
|
71
82
|
gap: 0.75rem;
|
|
@@ -73,68 +84,74 @@ const H = n.div`
|
|
|
73
84
|
font-weight: 500;
|
|
74
85
|
|
|
75
86
|
& .list-item {
|
|
87
|
+
color: var(--gray-950, #14161a);
|
|
76
88
|
display: flex;
|
|
77
89
|
align-items: center;
|
|
90
|
+
font-size: 0.875rem;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
line-height: 1.25rem;
|
|
94
|
+
letter-spacing: -0.0056rem;
|
|
78
95
|
|
|
79
96
|
& .mng {
|
|
80
97
|
font-size: 1.25rem;
|
|
81
|
-
color: var(--info-600);
|
|
98
|
+
color: var(--info-600, #6d28d9);
|
|
82
99
|
}
|
|
83
100
|
}
|
|
84
101
|
|
|
85
|
-
@media (max-width: ${
|
|
102
|
+
@media (max-width: ${a + "px"}) {
|
|
86
103
|
}
|
|
87
|
-
`, N =
|
|
104
|
+
`, N = y((e, l) => {
|
|
88
105
|
const {
|
|
89
|
-
title:
|
|
106
|
+
title: d,
|
|
90
107
|
subtitle: s,
|
|
91
|
-
buttonText:
|
|
92
|
-
list:
|
|
93
|
-
imageUrl:
|
|
108
|
+
buttonText: g,
|
|
109
|
+
list: m,
|
|
110
|
+
imageUrl: c,
|
|
94
111
|
imageHeight: h,
|
|
95
|
-
imageWidth:
|
|
96
|
-
imageHeightMobile:
|
|
112
|
+
imageWidth: p,
|
|
113
|
+
imageHeightMobile: x,
|
|
97
114
|
hasBorder: f = !0,
|
|
98
|
-
backgroundColor:
|
|
99
|
-
onButtonAction:
|
|
115
|
+
backgroundColor: b = "transparent",
|
|
116
|
+
onButtonAction: u = () => {
|
|
100
117
|
},
|
|
101
118
|
buttonLink: w
|
|
102
119
|
} = e;
|
|
103
120
|
return /* @__PURE__ */ o(
|
|
104
121
|
H,
|
|
105
122
|
{
|
|
106
|
-
ref:
|
|
123
|
+
ref: l,
|
|
107
124
|
imgH: h,
|
|
108
|
-
imgW:
|
|
109
|
-
imgHMob:
|
|
125
|
+
imgW: p,
|
|
126
|
+
imgHMob: x,
|
|
110
127
|
hasBorder: f,
|
|
111
|
-
bgColor:
|
|
128
|
+
bgColor: b,
|
|
112
129
|
children: [
|
|
113
130
|
/* @__PURE__ */ o(W, { children: [
|
|
114
131
|
/* @__PURE__ */ o(k, { children: [
|
|
115
|
-
/* @__PURE__ */ i("div", { className: "header-title", children:
|
|
132
|
+
/* @__PURE__ */ i("div", { className: "header-title", children: d }),
|
|
116
133
|
/* @__PURE__ */ i("div", { className: "header-subitle", children: s })
|
|
117
134
|
] }),
|
|
118
|
-
/* @__PURE__ */ i(
|
|
135
|
+
/* @__PURE__ */ i(z, { children: m == null ? void 0 : m.map((r, t) => /* @__PURE__ */ i(v, { children: /* @__PURE__ */ o("div", { className: "list-item", children: [
|
|
119
136
|
/* @__PURE__ */ i("i", { className: "mng mng-lnc-checkmark--filled" }),
|
|
120
|
-
/* @__PURE__ */ i("span", { children:
|
|
121
|
-
] }) },
|
|
137
|
+
/* @__PURE__ */ i("span", { children: r })
|
|
138
|
+
] }) }, t)) }),
|
|
122
139
|
/* @__PURE__ */ i(
|
|
123
|
-
|
|
140
|
+
$,
|
|
124
141
|
{
|
|
125
142
|
size: "medium",
|
|
126
143
|
color: "neutral",
|
|
127
144
|
type: "button",
|
|
128
145
|
btnType: "outline",
|
|
129
|
-
onClick: (
|
|
130
|
-
var
|
|
131
|
-
(
|
|
146
|
+
onClick: (r) => {
|
|
147
|
+
var t;
|
|
148
|
+
(t = r == null ? void 0 : r.target) == null || t.blur(), u(w);
|
|
132
149
|
},
|
|
133
|
-
children:
|
|
150
|
+
children: g
|
|
134
151
|
}
|
|
135
152
|
)
|
|
136
153
|
] }),
|
|
137
|
-
/* @__PURE__ */ i("img", { src:
|
|
154
|
+
/* @__PURE__ */ i("img", { src: c })
|
|
138
155
|
]
|
|
139
156
|
}
|
|
140
157
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),p=require("react"),n=require("./utils-CZynEOC_.cjs"),w=require("./Icon.cjs"),N=require("./Chip.cjs"),z=require("./index-BvSNRLNa.cjs"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),p=require("react"),n=require("./utils-CZynEOC_.cjs"),w=require("./Icon.cjs"),N=require("./Chip.cjs"),z=require("./index-BvSNRLNa.cjs"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),I=require("./suspense-large-CtcwWswP.cjs"),R=require("./Button.cjs"),k=y.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
padding: 1rem;
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: 1.25rem;
|
|
6
6
|
border-radius: 1.25rem;
|
|
7
7
|
align-items: stretch;
|
|
8
|
-
border: ${
|
|
8
|
+
border: ${i=>i!=null&&i.isSponsored?"2px solid var(--yellow-500, #f59e0b)":"1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08))"};
|
|
9
9
|
background: var(--white, #fff);
|
|
10
10
|
min-height: 10.5rem;
|
|
11
11
|
position: relative;
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
object-fit: cover;
|
|
39
39
|
height: auto;
|
|
40
|
+
max-width: 12.5rem;
|
|
40
41
|
max-height: 9rem;
|
|
41
42
|
border-radius: 0.75rem;
|
|
42
43
|
}
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
font-weight: 600;
|
|
62
63
|
line-height: 1.5rem;
|
|
63
64
|
letter-spacing: 0.1px;
|
|
64
|
-
${n.truncateTextInRows(
|
|
65
|
+
${n.truncateTextInRows(2)}
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
& .wrapper__tags {
|
|
@@ -98,17 +99,22 @@
|
|
|
98
99
|
font-weight: 400;
|
|
99
100
|
line-height: 1rem;
|
|
100
101
|
letter-spacing: 0.4px;
|
|
102
|
+
|
|
103
|
+
& i {
|
|
104
|
+
color: var(--gray-300, #bcc4cf);
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
|
|
105
|
-
@media (max-width: ${
|
|
110
|
+
@media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
|
|
106
111
|
flex-direction: column;
|
|
107
112
|
padding: 0;
|
|
108
113
|
|
|
109
114
|
& .wrapper__image {
|
|
110
115
|
border-bottom-left-radius: 0;
|
|
111
116
|
border-bottom-right-radius: 0;
|
|
117
|
+
max-width: 100%;
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
& .wrapper__content {
|
|
@@ -126,7 +132,7 @@
|
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
|
-
`,q=p.forwardRef(({title:
|
|
135
|
+
`,q=p.forwardRef(({title:i,imageUrl:c,options:s,publishedAt:g,timeToReadText:_="{0} min read",timeToRead:f=0,numberOfLikes:l=0,numberOfComments:d=0,isSponsored:o=!1,onSelectCard:m=()=>{},onSelectOption:u=()=>{}},b)=>r.jsxs(k,{isSponsored:o,onClick:m,children:[o&&r.jsx("div",{className:"wrapper__sponsored",children:r.jsx(w,{icon:" mng-lnc-paw",sizeInUnits:"1.5rem"})}),r.jsx(z.ProductImageWrapper,{src:c,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:i}),r.jsx("div",{className:"wrapper__tags",children:s&&(s==null?void 0:s.map((a,h)=>r.jsx(N,{label:a==null?void 0:a.name,color:a==null?void 0:a.color,className:"wrapper__tag",onClick:t=>{t==null||t.stopPropagation(),u(a==null?void 0:a.code)}},`blog-card-sponsored-option__${h+1}`)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"info__text",children:`${n.formatLocaleDateString(g)} • ${n.formatString(_,f)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),n.getRoundedNumber(l)]}),r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),n.getRoundedNumber(d)]})]})]})]})]})),$=y.styled.div`
|
|
130
136
|
display: flex;
|
|
131
137
|
flex-direction: column;
|
|
132
138
|
align-items: flex-start;
|
|
@@ -196,7 +202,7 @@
|
|
|
196
202
|
width: 100%;
|
|
197
203
|
}
|
|
198
204
|
|
|
199
|
-
@media (max-width: ${
|
|
205
|
+
@media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
|
|
200
206
|
& .wrapper__title {
|
|
201
207
|
& .title__text {
|
|
202
208
|
font-size: 1.375rem;
|
|
@@ -208,4 +214,4 @@
|
|
|
208
214
|
gap: 1rem;
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
|
-
`,S=p.memo(q),L=p.forwardRef(({title:
|
|
217
|
+
`,S=p.memo(q),L=p.forwardRef(({title:i,subtitle:c,icon:s,buttonText:g,buttonLink:_,timeToReadText:f="{0} min read",items:l,onButtonAction:d=()=>{},onSelectCard:o=()=>{},onSelectOption:m=()=>{},isLoading:u=!1,getImage:b=()=>{}},a)=>{const h=p.useMemo(()=>{var t;return(t=l==null?void 0:l.slice(0,4))==null?void 0:t.map((e,j)=>r.jsx(S,{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:f,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==null?void 0:o(e),onSelectOption:x=>m==null?void 0:m(x),imageUrl:b(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-sponsored__${j+1}`))},[l]);return r.jsxs($,{children:[r.jsxs("div",{className:"wrapper__heading",children:[r.jsxs("div",{className:"wrapper__title",children:[i&&r.jsxs("div",{className:"title__text",children:[n.isDefinedNotEmptyString(s)&&r.jsx("i",{className:s}),r.jsx("span",{children:i})]}),d&&r.jsx(R,{text:g,borderRadius:"curved",btnType:"tinted",className:"title__action",color:"neutral",onClick:t=>{var e;(e=t==null?void 0:t.target)==null||e.blur(),d==null||d(_)}})]}),c&&r.jsx("div",{className:"wrapper__subtitle",children:c})]}),r.jsx("div",{className:"wrapper__cards",children:r.jsx(I.SuspenseBlogLarge,{isLoading:u,limit:4,keyPrefix:"blog-section",children:h})})]})});module.exports=L;
|
|
@@ -15,7 +15,7 @@ const T = N.div`
|
|
|
15
15
|
gap: 1.25rem;
|
|
16
16
|
border-radius: 1.25rem;
|
|
17
17
|
align-items: stretch;
|
|
18
|
-
border: ${(
|
|
18
|
+
border: ${(l) => l != null && l.isSponsored ? "2px solid var(--yellow-500, #f59e0b)" : "1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08))"};
|
|
19
19
|
background: var(--white, #fff);
|
|
20
20
|
min-height: 10.5rem;
|
|
21
21
|
position: relative;
|
|
@@ -47,6 +47,7 @@ const T = N.div`
|
|
|
47
47
|
width: 100%;
|
|
48
48
|
object-fit: cover;
|
|
49
49
|
height: auto;
|
|
50
|
+
max-width: 12.5rem;
|
|
50
51
|
max-height: 9rem;
|
|
51
52
|
border-radius: 0.75rem;
|
|
52
53
|
}
|
|
@@ -71,7 +72,7 @@ const T = N.div`
|
|
|
71
72
|
font-weight: 600;
|
|
72
73
|
line-height: 1.5rem;
|
|
73
74
|
letter-spacing: 0.1px;
|
|
74
|
-
${y(
|
|
75
|
+
${y(2)}
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
& .wrapper__tags {
|
|
@@ -108,6 +109,10 @@ const T = N.div`
|
|
|
108
109
|
font-weight: 400;
|
|
109
110
|
line-height: 1rem;
|
|
110
111
|
letter-spacing: 0.4px;
|
|
112
|
+
|
|
113
|
+
& i {
|
|
114
|
+
color: var(--gray-300, #bcc4cf);
|
|
115
|
+
}
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
}
|
|
@@ -119,6 +124,7 @@ const T = N.div`
|
|
|
119
124
|
& .wrapper__image {
|
|
120
125
|
border-bottom-left-radius: 0;
|
|
121
126
|
border-bottom-right-radius: 0;
|
|
127
|
+
max-width: 100%;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
& .wrapper__content {
|
|
@@ -138,9 +144,9 @@ const T = N.div`
|
|
|
138
144
|
}
|
|
139
145
|
`, E = v(
|
|
140
146
|
({
|
|
141
|
-
title:
|
|
147
|
+
title: l,
|
|
142
148
|
imageUrl: d,
|
|
143
|
-
options:
|
|
149
|
+
options: s,
|
|
144
150
|
publishedAt: c,
|
|
145
151
|
timeToReadText: g = "{0} min read",
|
|
146
152
|
timeToRead: f = 0,
|
|
@@ -156,8 +162,8 @@ const T = N.div`
|
|
|
156
162
|
/* @__PURE__ */ r(P, { src: d, className: "wrapper__image" }),
|
|
157
163
|
/* @__PURE__ */ a("div", { className: "wrapper__content", children: [
|
|
158
164
|
/* @__PURE__ */ a("div", { className: "wrapper__subcontent", children: [
|
|
159
|
-
/* @__PURE__ */ r("div", { className: "wrapper__title", children:
|
|
160
|
-
/* @__PURE__ */ r("div", { className: "wrapper__tags", children:
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "wrapper__title", children: l }),
|
|
166
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: s && (s == null ? void 0 : s.map((i, h) => /* @__PURE__ */ r(
|
|
161
167
|
L,
|
|
162
168
|
{
|
|
163
169
|
label: i == null ? void 0 : i.name,
|
|
@@ -176,11 +182,11 @@ const T = N.div`
|
|
|
176
182
|
)} • ${C(g, f)}` }),
|
|
177
183
|
/* @__PURE__ */ a("div", { className: "info__text", children: [
|
|
178
184
|
/* @__PURE__ */ a("div", { children: [
|
|
179
|
-
/* @__PURE__ */ r(w, { icon: " mng-lnc-thumbs-up", sizeInUnits: "1rem" }),
|
|
185
|
+
/* @__PURE__ */ r(w, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
180
186
|
b(n)
|
|
181
187
|
] }),
|
|
182
188
|
/* @__PURE__ */ a("div", { children: [
|
|
183
|
-
/* @__PURE__ */ r(w, { icon: " mng-lnc-messages", sizeInUnits: "1rem" }),
|
|
189
|
+
/* @__PURE__ */ r(w, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
184
190
|
b(m)
|
|
185
191
|
] })
|
|
186
192
|
] })
|
|
@@ -271,9 +277,9 @@ const T = N.div`
|
|
|
271
277
|
}
|
|
272
278
|
`, B = j(E), Q = v(
|
|
273
279
|
({
|
|
274
|
-
title:
|
|
280
|
+
title: l,
|
|
275
281
|
subtitle: d,
|
|
276
|
-
icon:
|
|
282
|
+
icon: s,
|
|
277
283
|
buttonText: c,
|
|
278
284
|
buttonLink: g,
|
|
279
285
|
timeToReadText: f = "{0} min read",
|
|
@@ -312,9 +318,9 @@ const T = N.div`
|
|
|
312
318
|
return /* @__PURE__ */ a(W, { children: [
|
|
313
319
|
/* @__PURE__ */ a("div", { className: "wrapper__heading", children: [
|
|
314
320
|
/* @__PURE__ */ a("div", { className: "wrapper__title", children: [
|
|
315
|
-
|
|
316
|
-
R(
|
|
317
|
-
/* @__PURE__ */ r("span", { children:
|
|
321
|
+
l && /* @__PURE__ */ a("div", { className: "title__text", children: [
|
|
322
|
+
R(s) && /* @__PURE__ */ r("i", { className: s }),
|
|
323
|
+
/* @__PURE__ */ r("span", { children: l })
|
|
318
324
|
] }),
|
|
319
325
|
m && /* @__PURE__ */ r(
|
|
320
326
|
M,
|
package/dist/BlogListSection.cjs
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
object-fit: cover;
|
|
25
25
|
height: auto;
|
|
26
26
|
max-height: 9rem;
|
|
27
|
+
max-width: 17.75rem;
|
|
27
28
|
border-radius: 0.75rem;
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -79,7 +80,6 @@
|
|
|
79
80
|
& .info__content {
|
|
80
81
|
display: flex;
|
|
81
82
|
align-items: center;
|
|
82
|
-
justify-content: space-between;
|
|
83
83
|
|
|
84
84
|
&:first-of-type {
|
|
85
85
|
flex-grow: 1;
|
|
@@ -95,6 +95,10 @@
|
|
|
95
95
|
font-weight: 400;
|
|
96
96
|
line-height: 1rem;
|
|
97
97
|
letter-spacing: 0.4px;
|
|
98
|
+
|
|
99
|
+
& i {
|
|
100
|
+
color: var(--gray-300, #bcc4cf);
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -106,6 +110,10 @@
|
|
|
106
110
|
background: transparent;
|
|
107
111
|
border: none;
|
|
108
112
|
|
|
113
|
+
& .wrapper__image {
|
|
114
|
+
max-width: 100%;
|
|
115
|
+
}
|
|
116
|
+
|
|
109
117
|
& .desktop-only {
|
|
110
118
|
display: none !important;
|
|
111
119
|
}
|
|
@@ -145,7 +153,7 @@
|
|
|
145
153
|
}
|
|
146
154
|
}
|
|
147
155
|
}
|
|
148
|
-
`,C=p.forwardRef(({title:g,imageUrl:
|
|
156
|
+
`,C=p.forwardRef(({title:g,imageUrl:s,options:i,publishedAt:n,timeToReadText:a="{0} min read",timeToRead:l=0,numberOfLikes:f=0,numberOfComments:u=0,isBookmarked:c=!1,onSelectCard:h=()=>{},onSelectOption:_=()=>{},onBookmark:e=()=>{},onShare:d=()=>{}},w)=>t.jsxs(I,{onClick:h,children:[t.jsx(N.ProductImageWrapper,{src:s,className:"wrapper__image"}),t.jsxs("div",{className:"wrapper__content",children:[t.jsxs("div",{className:"wrapper__subcontent",children:[t.jsx("div",{className:"wrapper__title",children:g}),t.jsxs("div",{className:"wrapper__tags-action",children:[t.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.map((r,v)=>t.jsx(k,{label:r==null?void 0:r.name,color:r==null?void 0:r.color,className:"wrapper__tag",onClick:b=>{b==null||b.stopPropagation(),_(r==null?void 0:r.code)}},`blog-card-sponsored-option__${v+1}`)))}),t.jsxs("div",{className:"info__content mobile-only",children:[t.jsx(m,{icon:c?" mng-lnc-bookmark--filled":" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),e()}}),t.jsx(m,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),d()}})]})]})]}),t.jsxs("div",{className:"wrapper__info",children:[t.jsxs("div",{className:"info__content",children:[t.jsx("div",{className:"info__text",children:`${o.formatLocaleDateString(n)} • ${o.formatString(a,l)}`}),t.jsxs("div",{className:"info__text",children:[t.jsxs("div",{children:[t.jsx(y,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),o.getRoundedNumber(f)]}),t.jsxs("div",{children:[t.jsx(y,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),o.getRoundedNumber(u)]})]})]}),t.jsxs("div",{className:"info__content desktop-only",children:[t.jsx(m,{icon:c?" mng-lnc-bookmark--filled":" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),e()}}),t.jsx(m,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),d()}})]})]})]})]})),P=j.styled.div`
|
|
149
157
|
display: flex;
|
|
150
158
|
flex-direction: column;
|
|
151
159
|
align-items: flex-start;
|
|
@@ -167,4 +175,4 @@
|
|
|
167
175
|
bottom: -0.75rem;
|
|
168
176
|
}
|
|
169
177
|
}
|
|
170
|
-
`,z=p.memo(C),L=p.forwardRef(({timeToReadText:g="{0} min read",items:
|
|
178
|
+
`,z=p.memo(C),L=p.forwardRef(({timeToReadText:g="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:n=()=>{},onShare:a=()=>{},onBookmark:l=()=>{},isLoading:f=!1,getImage:u=()=>{},isSeparated:c=!0},h)=>{const _=p.useMemo(()=>s==null?void 0:s.map((e,d)=>t.jsx(z,{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:g,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,isBookmarked:e==null?void 0:e.isBookmarked,onSelectCard:()=>i==null?void 0:i(e),onSelectOption:w=>n==null?void 0:n(w),onShare:()=>a==null?void 0:a(e),onBookmark:()=>l==null?void 0:l(e),imageUrl:u(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-item__${d+1}`)),[s]);return t.jsx(P,{className:c?"separated":"",children:t.jsx(q.SuspenseBlogLarge,{isLoading:f,limit:5,keyPrefix:"blog-section",children:_})})});module.exports=L;
|
package/dist/BlogListSection.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as v, memo as
|
|
2
|
+
import { forwardRef as v, memo as I, useMemo as P } from "react";
|
|
3
3
|
import w from "./Icon.js";
|
|
4
4
|
import d from "./IconButton.js";
|
|
5
|
-
import
|
|
6
|
-
import { p as
|
|
5
|
+
import R from "./Chip.js";
|
|
6
|
+
import { p as j, s as C, v as z, w as y } from "./utils-BbgAIA9N.js";
|
|
7
7
|
import { P as T } from "./index-YGcWbzeb.js";
|
|
8
8
|
import { s as k } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
9
9
|
import { M as $ } from "./consts-BuFChS64.js";
|
|
@@ -34,6 +34,7 @@ const B = k.div`
|
|
|
34
34
|
object-fit: cover;
|
|
35
35
|
height: auto;
|
|
36
36
|
max-height: 9rem;
|
|
37
|
+
max-width: 17.75rem;
|
|
37
38
|
border-radius: 0.75rem;
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -57,7 +58,7 @@ const B = k.div`
|
|
|
57
58
|
font-weight: 600;
|
|
58
59
|
line-height: 1.5rem;
|
|
59
60
|
letter-spacing: 0.1px;
|
|
60
|
-
${
|
|
61
|
+
${j(3)}
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
& .wrapper__tags {
|
|
@@ -89,7 +90,6 @@ const B = k.div`
|
|
|
89
90
|
& .info__content {
|
|
90
91
|
display: flex;
|
|
91
92
|
align-items: center;
|
|
92
|
-
justify-content: space-between;
|
|
93
93
|
|
|
94
94
|
&:first-of-type {
|
|
95
95
|
flex-grow: 1;
|
|
@@ -105,6 +105,10 @@ const B = k.div`
|
|
|
105
105
|
font-weight: 400;
|
|
106
106
|
line-height: 1rem;
|
|
107
107
|
letter-spacing: 0.4px;
|
|
108
|
+
|
|
109
|
+
& i {
|
|
110
|
+
color: var(--gray-300, #bcc4cf);
|
|
111
|
+
}
|
|
108
112
|
}
|
|
109
113
|
}
|
|
110
114
|
}
|
|
@@ -116,6 +120,10 @@ const B = k.div`
|
|
|
116
120
|
background: transparent;
|
|
117
121
|
border: none;
|
|
118
122
|
|
|
123
|
+
& .wrapper__image {
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
}
|
|
126
|
+
|
|
119
127
|
& .desktop-only {
|
|
120
128
|
display: none !important;
|
|
121
129
|
}
|
|
@@ -181,7 +189,7 @@ const B = k.div`
|
|
|
181
189
|
/* @__PURE__ */ t("div", { className: "wrapper__title", children: p }),
|
|
182
190
|
/* @__PURE__ */ i("div", { className: "wrapper__tags-action", children: [
|
|
183
191
|
/* @__PURE__ */ t("div", { className: "wrapper__tags", children: a && (a == null ? void 0 : a.map((r, N) => /* @__PURE__ */ t(
|
|
184
|
-
|
|
192
|
+
R,
|
|
185
193
|
{
|
|
186
194
|
label: r == null ? void 0 : r.name,
|
|
187
195
|
color: r == null ? void 0 : r.color,
|
|
@@ -227,11 +235,11 @@ const B = k.div`
|
|
|
227
235
|
)} • ${z(o, s)}` }),
|
|
228
236
|
/* @__PURE__ */ i("div", { className: "info__text", children: [
|
|
229
237
|
/* @__PURE__ */ i("div", { children: [
|
|
230
|
-
/* @__PURE__ */ t(w, { icon: " mng-lnc-thumbs-up", sizeInUnits: "1rem" }),
|
|
238
|
+
/* @__PURE__ */ t(w, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
|
|
231
239
|
y(g)
|
|
232
240
|
] }),
|
|
233
241
|
/* @__PURE__ */ i("div", { children: [
|
|
234
|
-
/* @__PURE__ */ t(w, { icon: " mng-lnc-messages", sizeInUnits: "1rem" }),
|
|
242
|
+
/* @__PURE__ */ t(w, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
|
|
235
243
|
y(f)
|
|
236
244
|
] })
|
|
237
245
|
] })
|
|
@@ -287,7 +295,7 @@ const B = k.div`
|
|
|
287
295
|
bottom: -0.75rem;
|
|
288
296
|
}
|
|
289
297
|
}
|
|
290
|
-
`, W =
|
|
298
|
+
`, W = I(M), J = v(
|
|
291
299
|
({
|
|
292
300
|
timeToReadText: p = "{0} min read",
|
|
293
301
|
items: n,
|
|
@@ -304,7 +312,7 @@ const B = k.div`
|
|
|
304
312
|
},
|
|
305
313
|
isSeparated: c = !0
|
|
306
314
|
}, b) => {
|
|
307
|
-
const _ =
|
|
315
|
+
const _ = P(() => n == null ? void 0 : n.map((e, m) => /* @__PURE__ */ t(
|
|
308
316
|
W,
|
|
309
317
|
{
|
|
310
318
|
title: e == null ? void 0 : e.title,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./consts-goSZX3xP.cjs"),N=require("./useDetectMobile-zkbzoOGV.cjs"),u=require("./utils-CZynEOC_.cjs"),q=require("./style-JqDQj4jh.cjs"),x=require("./Button.cjs"),R=require("./Link.cjs"),M=require("./index-BvSNRLNa.cjs"),B=p.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,S=p.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 100%;
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
& img {
|
|
@@ -41,11 +40,21 @@
|
|
|
41
40
|
& .action {
|
|
42
41
|
padding: 0 1rem 1rem 1rem;
|
|
43
42
|
margin-top: auto;
|
|
43
|
+
color: var(--gray-950, #14161a);
|
|
44
|
+
font-size: 0.875rem;
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
line-height: 1.25rem;
|
|
48
|
+
letter-spacing: -0.0056rem;
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
color: var(--gray-700, #4e555f);
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
|
-
@media (max-width: ${
|
|
55
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
47
56
|
}
|
|
48
|
-
`,
|
|
57
|
+
`,b=p.styled.div`
|
|
49
58
|
padding: 1rem 1rem 0 1rem;
|
|
50
59
|
display: flex;
|
|
51
60
|
flex-direction: column;
|
|
@@ -65,4 +74,4 @@
|
|
|
65
74
|
color: var(--gray-700, #4e555f);
|
|
66
75
|
${u.truncateTextInRows(3)}
|
|
67
76
|
}
|
|
68
|
-
`,$=c.forwardRef((t,
|
|
77
|
+
`,$=c.forwardRef((t,o)=>{const{title:i,imageUrl:s,text:l,onCardClick:d,readMoreText:m="Read more"}=t;return r.jsxs(S,{ref:o,className:"blog-card",onClick:d,children:[r.jsx(M.ProductImageWrapper,{src:s}),r.jsxs(b,{children:[r.jsx("div",{className:"text-wr-title",children:i}),r.jsx("div",{className:"text-wr",children:l})]}),r.jsx(R,{className:"action",color:"gray",onClick:d,children:m})]})}),I=c.forwardRef(({},t)=>r.jsxs(S,{className:"product-card",children:[r.jsx("div",{className:"skeleton-img"}),r.jsx("div",{className:"card-title"}),r.jsx(b,{})]})),P=({limit:t=3,isLoading:o=!1,keyPrefix:i})=>r.jsx(r.Fragment,{children:Array.from({length:t},(s,l)=>r.jsx(I,{isLoading:o},`${i}-skeleton-product-card-${l}`))}),T=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:i=!1,limit:s,keyPrefix:l})=>r.jsx(c.Suspense,{fallbackComponent:o,children:i===!0?r.jsx(P,{isLoading:i,limit:s,keyPrefix:l}):t}),j=c.memo($),_=c.forwardRef((t,o)=>{const{icon:i,title:s,onButtonAction:l=()=>{},onSelectCard:d=()=>{},buttonLink:m,items:n,buttonText:v,limit:g=3,isLoading:w=!1,getImage:h=()=>{},readMoreText:f="Read more"}=t,k=N.useDetectMobile(),C=c.useMemo(()=>r.jsx(r.Fragment,{children:k===!0?n==null?void 0:n.map((e,a)=>r.jsx(j,{title:e==null?void 0:e.title,imageUrl:h(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,readMoreText:f,onCardClick:()=>d(e==null?void 0:e.titleSlug)},a)):n==null?void 0:n.slice(0,g).map((e,a)=>r.jsx(j,{title:e==null?void 0:e.title,imageUrl:h(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,readMoreText:f,onCardClick:()=>d(e==null?void 0:e.titleSlug)},a))}),[n]);return r.jsxs(q.RegulatTitleSectionWrapper,{ref:o,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[u.isDefinedNotEmptyString(i)&&r.jsx("i",{className:i}),r.jsx("span",{children:s})]}),u.isDefinedNotEmptyString(m)&&r.jsx(x,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var a;(a=e==null?void 0:e.target)==null||a.blur(),l(m)},borderRadius:"curved",className:"button-link",children:v})]}),r.jsx(B,{limit:g,children:r.jsx(T,{isLoading:w,limit:g,keyPrefix:"explore-landing",children:C})})]})});module.exports=_;
|