@lanaco/lnc-react-ui 4.0.124 → 4.0.126

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.
@@ -1,9 +1,9 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as v, memo as I, useMemo as P } from "react";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as v, memo as j, useMemo as I } from "react";
3
3
  import w from "./Icon.js";
4
4
  import d from "./IconButton.js";
5
- import R from "./Chip.js";
6
- import { p as j, s as C, v as z, w as y } from "./utils-BbgAIA9N.js";
5
+ import P from "./Chip.js";
6
+ import { p as R, 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";
@@ -17,7 +17,7 @@ const B = k.div`
17
17
  align-items: stretch;
18
18
  border: 1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08));
19
19
  background: var(--white, #fff);
20
- min-height: 10.5rem;
20
+ min-height: 9.5rem;
21
21
  position: relative;
22
22
  width: 100%;
23
23
 
@@ -33,7 +33,7 @@ const B = k.div`
33
33
  width: 100%;
34
34
  object-fit: cover;
35
35
  height: auto;
36
- max-height: 9rem;
36
+ max-height: 9.5rem;
37
37
  max-width: 17.75rem;
38
38
  border-radius: 0.75rem;
39
39
  }
@@ -58,7 +58,7 @@ const B = k.div`
58
58
  font-weight: 600;
59
59
  line-height: 1.5rem;
60
60
  letter-spacing: 0.1px;
61
- ${j(3)}
61
+ ${R(3)}
62
62
  }
63
63
 
64
64
  & .wrapper__tags {
@@ -158,6 +158,7 @@ const B = k.div`
158
158
 
159
159
  & .info__content {
160
160
  align-items: flex-start;
161
+ justify-content: space-between;
161
162
  width: 100%;
162
163
  }
163
164
  }
@@ -167,7 +168,7 @@ const B = k.div`
167
168
  ({
168
169
  title: p,
169
170
  imageUrl: n,
170
- options: a,
171
+ options: i,
171
172
  publishedAt: l,
172
173
  timeToReadText: o = "{0} min read",
173
174
  timeToRead: s = 0,
@@ -182,14 +183,14 @@ const B = k.div`
182
183
  },
183
184
  onShare: m = () => {
184
185
  }
185
- }, h) => /* @__PURE__ */ i(B, { onClick: b, children: [
186
+ }, h) => /* @__PURE__ */ a(B, { onClick: b, className: "blog-card-item", children: [
186
187
  /* @__PURE__ */ t(T, { src: n, className: "wrapper__image" }),
187
- /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
188
- /* @__PURE__ */ i("div", { className: "wrapper__subcontent", children: [
188
+ /* @__PURE__ */ a("div", { className: "wrapper__content", children: [
189
+ /* @__PURE__ */ a("div", { className: "wrapper__subcontent", children: [
189
190
  /* @__PURE__ */ t("div", { className: "wrapper__title", children: p }),
190
- /* @__PURE__ */ i("div", { className: "wrapper__tags-action", children: [
191
- /* @__PURE__ */ t("div", { className: "wrapper__tags", children: a && (a == null ? void 0 : a.map((r, N) => /* @__PURE__ */ t(
192
- R,
191
+ /* @__PURE__ */ a("div", { className: "wrapper__tags-action", children: [
192
+ /* @__PURE__ */ t("div", { className: "wrapper__tags", children: i && (i == null ? void 0 : i.map((r, N) => /* @__PURE__ */ t(
193
+ P,
193
194
  {
194
195
  label: r == null ? void 0 : r.name,
195
196
  color: r == null ? void 0 : r.color,
@@ -200,7 +201,7 @@ const B = k.div`
200
201
  },
201
202
  `blog-card-sponsored-option__${N + 1}`
202
203
  ))) }),
203
- /* @__PURE__ */ i("div", { className: "info__content mobile-only", children: [
204
+ /* @__PURE__ */ a("div", { className: "info__content mobile-only", children: [
204
205
  /* @__PURE__ */ t(
205
206
  d,
206
207
  {
@@ -228,23 +229,23 @@ const B = k.div`
228
229
  ] })
229
230
  ] })
230
231
  ] }),
231
- /* @__PURE__ */ i("div", { className: "wrapper__info", children: [
232
- /* @__PURE__ */ i("div", { className: "info__content", children: [
232
+ /* @__PURE__ */ a("div", { className: "wrapper__info", children: [
233
+ /* @__PURE__ */ a("div", { className: "info__content", children: [
233
234
  /* @__PURE__ */ t("div", { className: "info__text", children: `${C(
234
235
  l
235
236
  )} • ${z(o, s)}` }),
236
- /* @__PURE__ */ i("div", { className: "info__text", children: [
237
- /* @__PURE__ */ i("div", { children: [
237
+ /* @__PURE__ */ a("div", { className: "info__text", children: [
238
+ /* @__PURE__ */ a("div", { children: [
238
239
  /* @__PURE__ */ t(w, { icon: " mng-lnc-thumbs-up--filled", sizeInUnits: "1rem" }),
239
240
  y(g)
240
241
  ] }),
241
- /* @__PURE__ */ i("div", { children: [
242
+ /* @__PURE__ */ a("div", { children: [
242
243
  /* @__PURE__ */ t(w, { icon: " mng-lnc-messages-filled", sizeInUnits: "1rem" }),
243
244
  y(f)
244
245
  ] })
245
246
  ] })
246
247
  ] }),
247
- /* @__PURE__ */ i("div", { className: "info__content desktop-only", children: [
248
+ /* @__PURE__ */ a("div", { className: "info__content desktop-only", children: [
248
249
  /* @__PURE__ */ t(
249
250
  d,
250
251
  {
@@ -277,9 +278,11 @@ const B = k.div`
277
278
  display: flex;
278
279
  flex-direction: column;
279
280
  align-items: flex-start;
280
- gap: 1.5rem;
281
+ gap: 1.25rem;
281
282
 
282
283
  &.separated {
284
+ gap: 2.5rem;
285
+
283
286
  & > div {
284
287
  position: relative;
285
288
  }
@@ -292,14 +295,14 @@ const B = k.div`
292
295
  background: var(--gray-200, #dddfe4);
293
296
  position: absolute;
294
297
  left: 0;
295
- bottom: -0.75rem;
298
+ bottom: -1.25rem;
296
299
  }
297
300
  }
298
- `, W = I(M), J = v(
301
+ `, W = j(M), J = v(
299
302
  ({
300
303
  timeToReadText: p = "{0} min read",
301
304
  items: n,
302
- onSelectCard: a = () => {
305
+ onSelectCard: i = () => {
303
306
  },
304
307
  onSelectOption: l = () => {
305
308
  },
@@ -312,7 +315,7 @@ const B = k.div`
312
315
  },
313
316
  isSeparated: c = !0
314
317
  }, b) => {
315
- const _ = P(() => n == null ? void 0 : n.map((e, m) => /* @__PURE__ */ t(
318
+ const _ = I(() => n == null ? void 0 : n.map((e, m) => /* @__PURE__ */ t(
316
319
  W,
317
320
  {
318
321
  title: e == null ? void 0 : e.title,
@@ -325,7 +328,7 @@ const B = k.div`
325
328
  numberOfComments: e == null ? void 0 : e.numberOfComments,
326
329
  isSponsored: e == null ? void 0 : e.isSponsored,
327
330
  isBookmarked: e == null ? void 0 : e.isBookmarked,
328
- onSelectCard: () => a == null ? void 0 : a(e),
331
+ onSelectCard: () => i == null ? void 0 : i(e),
329
332
  onSelectOption: (h) => l == null ? void 0 : l(h),
330
333
  onShare: () => o == null ? void 0 : o(e),
331
334
  onBookmark: () => s == null ? void 0 : s(e),
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),u=require("react"),q=require("./useDetectMobile-zkbzoOGV.cjs"),P=require("./index-B_HNDmXL.cjs"),f=require("./suspense-product-card-simple-CJwnghtt.cjs"),h=require("./Button.cjs"),j=require("./style-BTTXJFJN.cjs"),y=u.memo(P.SimpleProductCard),M=u.forwardRef(({buttonText:o,buttonLink:t,items:i,onButtonAction:l=()=>{},onSelectCard:s=()=>{},isLoading:n=!1,limit:d=4,getImage:a=()=>{},isHighlight:p=!1},N)=>{const m=q.useDetectMobile(),b=u.useMemo(()=>{var c;return(c=i==null?void 0:i.slice(0,4))==null?void 0:c.map((e,g)=>r.jsx(y,{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:()=>s==null?void 0:s(e==null?void 0:e.uuid),image:a(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},g))},[i]);return r.jsxs(j.Wrapper,{className:p?"highlight":"",children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(f.SuspenseSimpleProductCard,{isLoading:n,limit:d,keyPrefix:"blog-section",children:b})}),r.jsx(h,{text:o,borderRadius:"curved",btnType:m?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>l(t)})]})});module.exports=M;
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("react"),q=require("./useDetectMobile-zkbzoOGV.cjs"),P=require("./index-B_HNDmXL.cjs"),f=require("./suspense-product-card-simple-CJwnghtt.cjs"),h=require("./Button.cjs"),j=require("./style-BTTXJFJN.cjs"),y=u.memo(P.SimpleProductCard),M=u.forwardRef(({buttonText:o,buttonLink:t,items:i,onButtonAction:l=()=>{},onSelectCard:s=()=>{},isLoading:n=!1,limit:d=4,getImage:a=()=>{},isHighlight:p=!1},N)=>{const m=q.useDetectMobile(),b=u.useMemo(()=>{var c;return(c=i==null?void 0:i.slice(0,4))==null?void 0:c.map((e,g)=>r.jsx(y,{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:()=>s==null?void 0:s(e==null?void 0:e.uuid),image:a(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},g))},[i]);return r.jsxs(j.Wrapper,{className:`blog-product-cards-section ${p?"highlight":""}`,children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(f.SuspenseSimpleProductCard,{isLoading:n,limit:d,keyPrefix:"blog-section",children:b})}),r.jsx(h,{text:o,borderRadius:"curved",btnType:m?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>l(t)})]})});module.exports=M;
@@ -10,11 +10,11 @@ const w = b(y), R = h(
10
10
  buttonText: u,
11
11
  buttonLink: l,
12
12
  items: r,
13
- onButtonAction: a = () => {
13
+ onButtonAction: t = () => {
14
14
  },
15
15
  onSelectCard: o = () => {
16
16
  },
17
- isLoading: t = !1,
17
+ isLoading: a = !1,
18
18
  limit: c = 4,
19
19
  getImage: d = () => {
20
20
  },
@@ -38,28 +38,34 @@ const w = b(y), R = h(
38
38
  f
39
39
  ));
40
40
  }, [r]);
41
- return /* @__PURE__ */ g(_, { className: m ? "highlight" : "", children: [
42
- /* @__PURE__ */ i("div", { className: "wrapper__grid", children: /* @__PURE__ */ i(
43
- M,
44
- {
45
- isLoading: t,
46
- limit: c,
47
- keyPrefix: "blog-section",
48
- children: n
49
- }
50
- ) }),
51
- /* @__PURE__ */ i(
52
- S,
53
- {
54
- text: u,
55
- borderRadius: "curved",
56
- btnType: p ? "basic" : "outline",
57
- color: "neutral",
58
- className: "wrapper__action",
59
- onClick: () => a(l)
60
- }
61
- )
62
- ] });
41
+ return /* @__PURE__ */ g(
42
+ _,
43
+ {
44
+ className: `blog-product-cards-section ${m ? "highlight" : ""}`,
45
+ children: [
46
+ /* @__PURE__ */ i("div", { className: "wrapper__grid", children: /* @__PURE__ */ i(
47
+ M,
48
+ {
49
+ isLoading: a,
50
+ limit: c,
51
+ keyPrefix: "blog-section",
52
+ children: n
53
+ }
54
+ ) }),
55
+ /* @__PURE__ */ i(
56
+ S,
57
+ {
58
+ text: u,
59
+ borderRadius: "curved",
60
+ btnType: p ? "basic" : "outline",
61
+ color: "neutral",
62
+ className: "wrapper__action",
63
+ onClick: () => t(l)
64
+ }
65
+ )
66
+ ]
67
+ }
68
+ );
63
69
  }
64
70
  );
65
71
  export {
@@ -1,176 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),f=require("react"),n=require("./index-BpbMKBf_.cjs"),q=require("./Chip.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),N=require("./useDetectMobile-zkbzoOGV.cjs"),j=require("./Icon.cjs"),P=require("./IconButton.cjs"),C=require("./Button.cjs"),M=b.styled.div`
2
- display: flex;
3
- gap: 0.75rem;
4
- align-items: center;
5
- align-content: center;
6
-
7
- & .tags__item {
8
- color: var(--gray-900, #0c1520);
9
- background: var(--gray-100, #f3f6fb);
10
- font-size: 0.875rem;
11
- font-style: normal;
12
- font-weight: 400;
13
- line-height: 1.25rem;
14
- letter-spacing: -0.0056rem;
15
- padding: 0.5rem 0.75rem;
16
-
17
- &.active {
18
- color: var(--white, #fff);
19
- background: var(--gray-900, #0c1520);
20
- font-weight: 500;
21
-
22
- &:hover {
23
- color: var(--white, #fff);
24
- background: var(--gray-900, #0c1520);
25
- }
26
- }
27
-
28
- &:hover {
29
- background: var(--gray-200, #e4e9f0);
30
- }
31
-
32
- &:focus {
33
- outline: none;
34
- }
35
- }
36
-
37
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
38
- width: 100%;
39
- overflow-x: auto;
40
- white-space: nowrap;
41
-
42
- -webkit-overflow-scrolling: touch;
43
- ::-webkit-scrollbar {
44
- -webkit-appearance: none;
45
- }
46
- -ms-overflow-style: none;
47
- /* Internet Explorer 10+ */
48
- scrollbar-width: none;
49
- /* Firefox */
50
-
51
- &::-webkit-scrollbar {
52
- display: none;
53
- /* Safari and Chrome */
54
- }
55
- }
56
- `,E=b.styled.div`
57
- display: flex;
58
- gap: 1.25rem;
59
- width: 100%;
60
-
61
- & .section__column {
62
- display: flex;
63
- flex-direction: column;
64
- gap: 1.25rem;
65
- width: 100%;
66
- }
67
-
68
- & .section__show-more {
69
- color: var(--neutral-600, #0f2a46);
70
- font-size: 0.875rem;
71
- font-style: normal;
72
- font-weight: 500;
73
- line-height: 1.25rem;
74
- letter-spacing: -0.0056rem;
75
-
76
- &:focus {
77
- outline: none;
78
- }
79
- }
80
-
81
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
82
- flex-direction: column;
83
- }
84
- `,$=b.styled.div`
85
- width: 100%;
86
- height: fit-content;
87
- background: var(--white, #fff);
88
- border: 1px solid var(--gray-100, #f3f6fb);
89
- display: flex;
90
- flex-direction: column;
91
- gap: 0.75rem;
92
- padding: 1rem;
93
- border-radius: 0.75rem;
94
-
95
- &:hover {
96
- cursor: pointer;
97
- }
98
-
99
- &.expanded {
100
- border: 1px solid #ff7621;
101
- box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.16),
102
- 0 1px 4px 0 rgba(255, 118, 33, 0.5) inset;
103
- }
104
-
105
- & .card__heading {
106
- display: flex;
107
- justify-content: space-between;
108
- width: 100%;
109
-
110
- & .card__title {
111
- color: var(--neutral-600, #0f2a46);
112
- font-size: 1rem;
113
- font-style: normal;
114
- font-weight: 500;
115
- line-height: 1.5rem;
116
- }
117
-
118
- & .card__icon {
119
- color: var(--neutral-600, #0f2a46);
120
- }
121
- }
122
-
123
- & .card__description {
124
- color: var(--neutral-400, #47607b);
125
- font-size: 0.875rem;
126
- font-style: normal;
127
- font-weight: 400;
128
- line-height: 1.25rem;
129
- letter-spacing: 0.0156rem;
130
- }
131
-
132
- & .card__impression {
133
- display: flex;
134
- align-items: center;
135
- gap: 0.75rem;
136
-
137
- & .imppression__question {
138
- color: var(--gray-500, #7a8594);
139
- font-size: 0.75rem;
140
- font-style: normal;
141
- font-weight: 500;
142
- line-height: 1rem;
143
- letter-spacing: 0.0313rem;
144
- }
145
-
146
- & .impression__actions {
147
- display: flex;
148
- gap: 0.5rem;
149
-
150
- button {
151
- color: var(--gray-600, #676e79);
152
-
153
- &:focus {
154
- outline: none;
155
- }
156
- }
157
- }
158
-
159
- &.feedback {
160
- gap: 0.25rem;
161
- }
162
- }
163
-
164
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
165
- & .card__impression {
166
- justify-content: space-between;
167
-
168
- &.feedback {
169
- justify-content: flex-start;
170
- }
171
- }
172
- }
173
- `,I=f.forwardRef(({tags:i=[],allTagText:c,selectedTagCode:l=null,onSelectTag:h=()=>{}},d)=>e.jsx(M,{children:[{name:c,code:null},...i].map((t,p)=>e.jsx(q,{label:t==null?void 0:t.name,borderRadius:"curved",color:"neutral",className:`tags__item ${l===(t==null?void 0:t.code)?"active":""}`,onClick:()=>{h(t)}},`faq-section-tag__${p+1}`))}));I.propTypes={tags:n.PropTypes.array,allTagText:n.PropTypes.string,onSelectTag:n.PropTypes.func};const w=({title:i,description:c,questionText:l,feedbackText:h,impressions:d=!1,onSelectItem:t=()=>{},onImpressed:p=()=>{}})=>{const[u,a]=f.useState(!1),[_,m]=f.useState(!1),x=()=>{a(o=>!o),t()},s=(o,g)=>{o==null||o.stopPropagation(),m(!0),p(g)};return e.jsxs($,{className:u?"expanded":"",onClick:x,children:[e.jsxs("div",{className:"card__heading",children:[e.jsx("div",{className:"card__title",children:i}),e.jsx(j,{icon:u?" mng-lnc-subtract":" mng-lnc-add",sizeInUnits:"1.25rem",className:"card__icon"})]}),u&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"card__description",children:c}),d&&e.jsx(e.Fragment,{children:_?e.jsxs("div",{className:"card__impression feedback",children:[e.jsx(j,{icon:" mng-lnc-checkmark--outline",sizeInUnits:"1.25rem",color:"success"}),e.jsx("div",{className:"imppression__question",children:h})]}):e.jsxs("div",{className:"card__impression",children:[e.jsx("div",{className:"imppression__question",children:l}),e.jsxs("div",{className:"impression__actions",children:[e.jsx(P,{icon:" mng-lnc-thumbs-up",borderRadius:"curved",btnType:"outline",onClick:o=>s(o,!0)}),e.jsx(P,{icon:" mng-lnc-thumbs-down",borderRadius:"curved",btnType:"outline",onClick:o=>s(o,!1)})]})]})})]})]})},S=f.forwardRef(({items:i=[],questionText:c,feedbackText:l,showMoreText:h,impressions:d=!1,onSelectItem:t=()=>{},onImpressed:p=()=>{}},u)=>{const a=N.useDetectMobile(),[_,m]=f.useState(!1),x=()=>{m(o=>!o)},s=f.useMemo(()=>{if(a)return i==null?void 0:i.map((r,y)=>e.jsx(w,{title:r==null?void 0:r.title,description:r==null?void 0:r.description,questionText:c,feedbackText:l,impressions:d,onSelectItem:()=>t(r),onImpressed:T=>p(r,T)},`faq-section-item__${y+1}`));const o=[],g=[];return i==null||i.forEach((r,y)=>{y%2===0?o.push(e.jsx(w,{title:r==null?void 0:r.title,description:r==null?void 0:r.description,questionText:c,feedbackText:l,impressions:d,onSelectItem:()=>t(r),onImpressed:T=>p(r,T)},`faq-section-item__${y+1}`)):g.push(e.jsx(w,{title:r==null?void 0:r.title,description:r==null?void 0:r.description,questionText:c,feedbackText:l,impressions:d,onSelectItem:()=>t(r),onImpressed:T=>p(r,T)},`faq-section-item__${y+1}`))}),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"section__column",children:o}),e.jsx("div",{className:"section__column",children:g})]})},[i,a]);return e.jsx(E,{children:a?_?s:e.jsxs(e.Fragment,{children:[s==null?void 0:s.slice(0,4),(s==null?void 0:s.length)>4&&e.jsx(C,{text:h,btnType:"basic",color:"neutral",className:"section__show-more",onClick:x})]}):s})});w.propTypes={title:n.PropTypes.string,description:n.PropTypes.string,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};S.propTypes={items:n.PropTypes.array,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};const F=b.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),h=require("react"),n=require("./index-BpbMKBf_.cjs"),P=require("./tag-BLBeUImg.cjs"),w=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Icon.cjs"),b=require("./IconButton.cjs"),I=require("./Button.cjs"),N=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),m=({title:t,description:i,questionText:a,feedbackText:g,impressions:l=!1,onSelectItem:p=()=>{},onImpressed:d=()=>{}})=>{const[u,c]=h.useState(!1),[x,f]=h.useState(!1),y=()=>{c(o=>!o),p()},r=(o,_)=>{o==null||o.stopPropagation(),f(!0),d(_)};return e.jsxs(P.ItemContainer,{className:u?"expanded":"",onClick:y,children:[e.jsxs("div",{className:"card__heading",children:[e.jsx("div",{className:"card__title",children:t}),e.jsx(q,{icon:u?" mng-lnc-subtract":" mng-lnc-add",sizeInUnits:"1.25rem",className:"card__icon"})]}),u&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"card__description",children:i}),l&&e.jsx(e.Fragment,{children:x?e.jsxs("div",{className:"card__impression feedback",children:[e.jsx(q,{icon:" mng-lnc-checkmark--outline",sizeInUnits:"1.25rem",color:"success"}),e.jsx("div",{className:"imppression__question",children:g})]}):e.jsxs("div",{className:"card__impression",children:[e.jsx("div",{className:"imppression__question",children:a}),e.jsxs("div",{className:"impression__actions",children:[e.jsx(b,{icon:" mng-lnc-thumbs-up",borderRadius:"curved",btnType:"outline",onClick:o=>r(o,!0)}),e.jsx(b,{icon:" mng-lnc-thumbs-down",borderRadius:"curved",btnType:"outline",onClick:o=>r(o,!1)})]})]})})]})]})},v=h.forwardRef(({items:t=[],questionText:i,feedbackText:a,showMoreText:g,impressions:l=!1,onSelectItem:p=()=>{},onImpressed:d=()=>{}},u)=>{const c=w.useDetectMobile(),[x,f]=h.useState(!1),y=()=>{f(o=>!o)},r=h.useMemo(()=>{if(c)return t==null?void 0:t.map((s,T)=>e.jsx(m,{title:s==null?void 0:s.title,description:s==null?void 0:s.description,questionText:i,feedbackText:a,impressions:l,onSelectItem:()=>p(s),onImpressed:j=>d(s,j)},`faq-section-item__${T+1}`));const o=[],_=[];return t==null||t.forEach((s,T)=>{T%2===0?o.push(e.jsx(m,{title:s==null?void 0:s.title,description:s==null?void 0:s.description,questionText:i,feedbackText:a,impressions:l,onSelectItem:()=>p(s),onImpressed:j=>d(s,j)},`faq-section-item__${T+1}`)):_.push(e.jsx(m,{title:s==null?void 0:s.title,description:s==null?void 0:s.description,questionText:i,feedbackText:a,impressions:l,onSelectItem:()=>p(s),onImpressed:j=>d(s,j)},`faq-section-item__${T+1}`))}),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"section__column",children:o}),e.jsx("div",{className:"section__column",children:_})]})},[t,c]);return e.jsx(P.ItemsContainer,{children:c?x?r:e.jsxs(e.Fragment,{children:[r==null?void 0:r.slice(0,4),(r==null?void 0:r.length)>4&&e.jsx(I,{text:g,btnType:"basic",color:"neutral",className:"section__show-more",onClick:y})]}):r})});m.propTypes={title:n.PropTypes.string,description:n.PropTypes.string,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};v.propTypes={items:n.PropTypes.array,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};const M=N.styled.div`
174
2
  display: flex;
175
3
  flex-direction: column;
176
4
  align-items: center;
@@ -202,7 +30,7 @@
202
30
  line-height: 1.5rem;
203
31
  }
204
32
 
205
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
33
+ @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
206
34
  & .section__title {
207
35
  font-size: 1rem;
208
36
  font-weight: 500;
@@ -216,4 +44,4 @@
216
44
  letter-spacing: 0.25px;
217
45
  }
218
46
  }
219
- `,k=f.forwardRef(({title:i,description:c,questionText:l="What do you think about this answer?",feedbackText:h="Thank you for feedback!",showMoreText:d="Show more",allTagText:t="All",impressions:p=!1,tags:u=[],items:a=[],onSelectItem:_=()=>{},onImpressed:m=()=>{}},x)=>{const[s,o]=f.useState(null),g=r=>{o(r==null?void 0:r.code)};return e.jsxs(F,{ref:x,children:[e.jsxs("div",{className:"section__heading",children:[i&&e.jsx("div",{className:"section__title",children:i}),c&&e.jsx("div",{className:"section__description",children:c})]}),e.jsx(I,{tags:u,allTagText:t,selectedTagCode:s,onSelectTag:g}),e.jsx(S,{items:s===null?a:a==null?void 0:a.filter(r=>(r==null?void 0:r.tagCode)===s),questionText:l,feedbackText:h,showMoreText:d,impressions:p,onSelectItem:_,onImpressed:m},`faq-section-items__${s}`)]})});k.propTypes={title:n.PropTypes.string,description:n.PropTypes.string,tags:n.PropTypes.array,items:n.PropTypes.array,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,allTagText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};module.exports=k;
47
+ `,S=h.forwardRef(({title:t,description:i,questionText:a="What do you think about this answer?",feedbackText:g="Thank you for feedback!",showMoreText:l="Show more",allTagText:p="All",impressions:d=!1,tags:u=[],items:c=[],onSelectItem:x=()=>{},onImpressed:f=()=>{}},y)=>{const[r,o]=h.useState(null),_=s=>{o(s==null?void 0:s.code)};return e.jsxs(M,{ref:y,children:[e.jsxs("div",{className:"section__heading",children:[t&&e.jsx("div",{className:"section__title",children:t}),i&&e.jsx("div",{className:"section__description",children:i})]}),e.jsx(P.FaqSectionTags,{tags:u,allTagText:p,selectedTagCode:r,onSelectTag:_}),e.jsx(v,{items:r===null?c:c==null?void 0:c.filter(s=>(s==null?void 0:s.tagCode)===r),questionText:a,feedbackText:g,showMoreText:l,impressions:d,onSelectItem:x,onImpressed:f},`faq-section-items__${r}`)]})});S.propTypes={title:n.PropTypes.string,description:n.PropTypes.string,tags:n.PropTypes.array,items:n.PropTypes.array,questionText:n.PropTypes.string,feedbackText:n.PropTypes.string,showMoreText:n.PropTypes.string,allTagText:n.PropTypes.string,impressions:n.PropTypes.bool,onSelectItem:n.PropTypes.func,onImpressed:n.PropTypes.func};module.exports=S;