@lanaco/lnc-react-ui 4.0.190 → 4.0.192
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,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),a=require("react"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("react"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),I=require("./consts-goSZX3xP.cjs"),L=require("./IconButton.cjs"),T=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),z=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Coo0aVuh.cjs"),R=E.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
white-space: nowrap;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@media (max-width: ${
|
|
50
|
+
@media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
|
|
51
51
|
gap: 1.25rem;
|
|
52
52
|
|
|
53
53
|
& .section__items {
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,
|
|
73
|
+
`,U=a.memo(g.DetailedProductCard),A=a.forwardRef((r,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:S,onBookmark:C=()=>{},actionComponent:N,componentName:P,hasNextPage:j=!1,LinkComponent:q,urgentText:D}=r,u=z.useDetectMobile(),M=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(U,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(F,B)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:B}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:S,onBookmark:C,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:P},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants,LinkComponent:q,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:D},o)),[i]);return t.jsxs(R,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(m)&&!s&&t.jsx(T,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:M})}),!u&&!s&&j&&t.jsx(L,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=A;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as D, forwardRef as I, useMemo as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as D, forwardRef as I, useMemo as z } from "react";
|
|
3
|
+
import { s as E } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as U } from "./consts-BuFChS64.js";
|
|
5
|
+
import $ from "./IconButton.js";
|
|
6
|
+
import j from "./Button.js";
|
|
7
7
|
import { k as r } from "./utils-Dc5zIpaz.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { D as
|
|
10
|
-
const
|
|
8
|
+
import { u as A } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
+
import { D as F, S as O } from "./index-PhMLWAC1.js";
|
|
10
|
+
const R = E.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
gap: 1.5rem;
|
|
@@ -56,7 +56,7 @@ const O = z.div`
|
|
|
56
56
|
white-space: nowrap;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
@media (max-width: ${
|
|
59
|
+
@media (max-width: ${U + "px"}) {
|
|
60
60
|
gap: 1.25rem;
|
|
61
61
|
|
|
62
62
|
& .section__items {
|
|
@@ -79,14 +79,14 @@ const O = z.div`
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`, V = D(F), x = I((a, p) => {
|
|
83
83
|
const {
|
|
84
84
|
title: l,
|
|
85
85
|
icon: c,
|
|
86
|
-
items:
|
|
87
|
-
limit:
|
|
86
|
+
items: o,
|
|
87
|
+
limit: g = 4,
|
|
88
88
|
isLoading: n = !1,
|
|
89
|
-
onSelectCard:
|
|
89
|
+
onSelectCard: f = () => {
|
|
90
90
|
},
|
|
91
91
|
onLoadMore: h = () => {
|
|
92
92
|
},
|
|
@@ -97,17 +97,18 @@ const O = z.div`
|
|
|
97
97
|
viewAllbuttonLink: m,
|
|
98
98
|
viewAllButonText: d = "View all",
|
|
99
99
|
negotiableText: _,
|
|
100
|
-
freeText:
|
|
101
|
-
loadMoreButtonIcon:
|
|
100
|
+
freeText: k,
|
|
101
|
+
loadMoreButtonIcon: y = "angle-down",
|
|
102
102
|
sponsoredText: v,
|
|
103
103
|
onBookmark: C = () => {
|
|
104
104
|
},
|
|
105
105
|
actionComponent: S,
|
|
106
106
|
componentName: N,
|
|
107
107
|
hasNextPage: P = !1,
|
|
108
|
-
LinkComponent: M
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
LinkComponent: M,
|
|
109
|
+
urgentText: B
|
|
110
|
+
} = a, u = A(), L = z(() => o == null ? void 0 : o.map((e, i) => /* @__PURE__ */ t(
|
|
111
|
+
V,
|
|
111
112
|
{
|
|
112
113
|
name: e == null ? void 0 : e.name,
|
|
113
114
|
price: e == null ? void 0 : e.price,
|
|
@@ -118,13 +119,13 @@ const O = z.div`
|
|
|
118
119
|
uuid: e == null ? void 0 : e.uuid,
|
|
119
120
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
120
121
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
121
|
-
onSelectCard: (
|
|
122
|
+
onSelectCard: (q, T) => f({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: T }),
|
|
122
123
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
123
124
|
imageUrl: w(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
124
125
|
isFree: e == null ? void 0 : e.isFree,
|
|
125
126
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
126
127
|
negotiableText: _,
|
|
127
|
-
freeText:
|
|
128
|
+
freeText: k,
|
|
128
129
|
tags: e == null ? void 0 : e.tags,
|
|
129
130
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
130
131
|
condition: e == null ? void 0 : e.condition,
|
|
@@ -143,19 +144,21 @@ const O = z.div`
|
|
|
143
144
|
forOrder: e == null ? void 0 : e.forOrder,
|
|
144
145
|
contactSeller: e == null ? void 0 : e.contactSeller,
|
|
145
146
|
hasVariants: e == null ? void 0 : e.hasVariants,
|
|
146
|
-
LinkComponent: M
|
|
147
|
+
LinkComponent: M,
|
|
148
|
+
activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
|
|
149
|
+
urgentText: B
|
|
147
150
|
},
|
|
148
151
|
i
|
|
149
|
-
)), [
|
|
150
|
-
return /* @__PURE__ */ s(
|
|
152
|
+
)), [o]);
|
|
153
|
+
return /* @__PURE__ */ s(R, { ref: p, limit: g, children: [
|
|
151
154
|
/* @__PURE__ */ s("div", { className: "section__heading", children: [
|
|
152
155
|
r(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
|
|
153
|
-
r(c) && /* @__PURE__ */
|
|
156
|
+
r(c) && /* @__PURE__ */ t("i", { className: c }),
|
|
154
157
|
" ",
|
|
155
158
|
l
|
|
156
159
|
] }),
|
|
157
|
-
u && r(m) && r(d) && !n && /* @__PURE__ */
|
|
158
|
-
|
|
160
|
+
u && r(m) && r(d) && !n && /* @__PURE__ */ t(
|
|
161
|
+
j,
|
|
159
162
|
{
|
|
160
163
|
type: "button",
|
|
161
164
|
btnType: "tinted",
|
|
@@ -170,18 +173,18 @@ const O = z.div`
|
|
|
170
173
|
}
|
|
171
174
|
)
|
|
172
175
|
] }),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
176
|
+
/* @__PURE__ */ t(
|
|
177
|
+
O,
|
|
175
178
|
{
|
|
176
179
|
isLoading: n,
|
|
177
180
|
keyPrefix: "detailed-product-card-skeleton",
|
|
178
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ t("div", { className: "section__items", children: L })
|
|
179
182
|
}
|
|
180
183
|
),
|
|
181
|
-
!u && !n && P && /* @__PURE__ */
|
|
182
|
-
|
|
184
|
+
!u && !n && P && /* @__PURE__ */ t(
|
|
185
|
+
$,
|
|
183
186
|
{
|
|
184
|
-
icon:
|
|
187
|
+
icon: y,
|
|
185
188
|
borderRadius: "curved",
|
|
186
189
|
btnType: "basic",
|
|
187
190
|
color: "neutral",
|
|
@@ -192,5 +195,5 @@ const O = z.div`
|
|
|
192
195
|
] });
|
|
193
196
|
});
|
|
194
197
|
export {
|
|
195
|
-
|
|
198
|
+
x as default
|
|
196
199
|
};
|
package/dist/ToggleSection.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),g=require("react"),p=require("./index-BpbMKBf_.cjs"),w=require("./Chip.cjs"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),h=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),u=require("./Button.cjs"),b=m.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
|
|
4
4
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@media (max-width: ${
|
|
61
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
62
62
|
width: 100%;
|
|
63
63
|
|
|
64
64
|
& .options__item {
|
|
65
65
|
width: 100%;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,j=m.styled.div`
|
|
69
69
|
display: flex;
|
|
70
70
|
gap: 1.25rem;
|
|
71
71
|
flex-wrap: wrap;
|
|
@@ -86,14 +86,16 @@
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
@media (max-width: ${
|
|
89
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
90
90
|
flex-direction: column;
|
|
91
91
|
|
|
92
92
|
& .learn-more {
|
|
93
93
|
display: none;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
`,S=
|
|
96
|
+
`,S=m.styled.a`
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
color: var(--gray-950);
|
|
97
99
|
display: flex;
|
|
98
100
|
padding: 2rem 1.25rem 1.25rem 1.25rem;
|
|
99
101
|
flex-direction: column;
|
|
@@ -158,7 +160,7 @@
|
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
@media (max-width: ${
|
|
163
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
162
164
|
max-width: 100%;
|
|
163
165
|
flex-direction: row;
|
|
164
166
|
padding: 1rem;
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
|
-
`,y=
|
|
196
|
+
`,y=g.forwardRef(({options:r=[],selectedOptionCode:o=null,onSelectOption:a=()=>{}},s)=>e.jsx(b,{ref:s,children:r==null?void 0:r.map((l,n)=>e.jsx(w,{label:l,borderRadius:"curved",color:"neutral",className:`options__item ${o===n?"active":""}`,onClick:()=>{a(n)}},`toggle-section-tag__${n+1}`))}));y.propTypes={options:p.PropTypes.array,selectedOptionCode:p.PropTypes.any,onSelectOption:p.PropTypes.func};const N=({title:r,description:o,image:a,learnMoreText:s,onSelectItem:l=()=>{},LinkComponent:n,link:c})=>{const d=n||"a";return e.jsxs(S,{onClick:l,as:d,...n?{to:`/${c}`}:{href:`/${c}`},children:[e.jsxs("div",{className:"card__content",children:[e.jsx("img",{src:a,alt:`Card ${r}`,className:"card__image"}),e.jsxs("div",{className:"card__text",children:[e.jsx("div",{className:"card__title",children:r}),e.jsx("div",{className:"card__divider"}),e.jsx("div",{className:"card__description",children:o})]})]}),e.jsx(u,{text:s,btnType:"basic",color:"neutral",className:"section__show-more learn-more"})]})},O=g.forwardRef(({items:r=[],showMoreText:o,learnMoreText:a,onSelectItem:s=()=>{},LinkComponent:l},n)=>{const c=v.useDetectMobile(),[d,_]=g.useState(!1),f=()=>{_(t=>!t)},i=g.useMemo(()=>r==null?void 0:r.map((t,x)=>e.jsx(N,{title:t==null?void 0:t.title,description:t==null?void 0:t.description,image:t==null?void 0:t.image,learnMoreText:a,onSelectItem:()=>s(t),LinkComponent:l,link:t==null?void 0:t.link},`toggle-section-item__${x+1}`)),[r]);return e.jsx(j,{ref:n,children:c?d?i:e.jsxs(e.Fragment,{children:[i==null?void 0:i.slice(0,4),(i==null?void 0:i.length)>4&&e.jsx(u,{text:o,btnType:"basic",color:"neutral",className:"section__show-more",onClick:f})]}):i})}),C=m.styled.div`
|
|
195
197
|
display: flex;
|
|
196
198
|
flex-direction: column;
|
|
197
199
|
align-items: center;
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
line-height: 1.5rem;
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
@media (max-width: ${
|
|
228
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
227
229
|
gap: 1.5rem;
|
|
228
230
|
|
|
229
231
|
& .section__heading {
|
|
@@ -245,4 +247,4 @@
|
|
|
245
247
|
text-align: left;
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
|
-
`,
|
|
250
|
+
`,M=g.forwardRef(({title:r,description:o,showMoreText:a="Show more",learnMoreText:s="Learn more",options:l=[],items:n=[],onSelectItem:c=()=>{},LinkComponent:d},_)=>{const[f,i]=g.useState(0),t=x=>{i(x)};return e.jsxs(C,{ref:_,children:[e.jsxs("div",{className:"section__heading",children:[r&&e.jsx("div",{className:"section__title",children:r}),o&&e.jsx("div",{className:"section__description",children:o})]}),e.jsx(y,{options:l,selectedOptionCode:f,onSelectOption:t,LinkComponent:d}),e.jsx(O,{items:n==null?void 0:n[f],showMoreText:a,learnMoreText:s,onSelectItem:c,LinkComponent:d},`toggle-section-items__${f}`)]})});module.exports=M;
|
package/dist/ToggleSection.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as r, jsxs as d, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { P as
|
|
4
|
-
import
|
|
5
|
-
import { s as
|
|
6
|
-
import { M as
|
|
7
|
-
import { u as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as d, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, useState as v, useMemo as S } from "react";
|
|
3
|
+
import { P as x } from "./index-CblbdqjE.js";
|
|
4
|
+
import C from "./Chip.js";
|
|
5
|
+
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
6
|
+
import { M as h } from "./consts-BuFChS64.js";
|
|
7
|
+
import { u as N } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
|
+
import w from "./Button.js";
|
|
9
|
+
const $ = f.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
|
|
12
12
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
@@ -66,14 +66,14 @@ const N = m.div`
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
@media (max-width: ${
|
|
69
|
+
@media (max-width: ${h + "px"}) {
|
|
70
70
|
width: 100%;
|
|
71
71
|
|
|
72
72
|
& .options__item {
|
|
73
73
|
width: 100%;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
`, O =
|
|
76
|
+
`, O = f.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
gap: 1.25rem;
|
|
79
79
|
flex-wrap: wrap;
|
|
@@ -94,14 +94,16 @@ const N = m.div`
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
@media (max-width: ${
|
|
97
|
+
@media (max-width: ${h + "px"}) {
|
|
98
98
|
flex-direction: column;
|
|
99
99
|
|
|
100
100
|
& .learn-more {
|
|
101
101
|
display: none;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`, k =
|
|
104
|
+
`, k = f.a`
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
color: var(--gray-950);
|
|
105
107
|
display: flex;
|
|
106
108
|
padding: 2rem 1.25rem 1.25rem 1.25rem;
|
|
107
109
|
flex-direction: column;
|
|
@@ -166,7 +168,7 @@ const N = m.div`
|
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
@media (max-width: ${
|
|
171
|
+
@media (max-width: ${h + "px"}) {
|
|
170
172
|
max-width: 100%;
|
|
171
173
|
flex-direction: row;
|
|
172
174
|
padding: 1rem;
|
|
@@ -199,97 +201,101 @@ const N = m.div`
|
|
|
199
201
|
}
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
|
-
`,
|
|
203
|
-
({ options: t = [], selectedOptionCode:
|
|
204
|
-
} },
|
|
205
|
-
|
|
204
|
+
`, y = u(
|
|
205
|
+
({ options: t = [], selectedOptionCode: o = null, onSelectOption: a = () => {
|
|
206
|
+
} }, l) => /* @__PURE__ */ r($, { ref: l, children: t == null ? void 0 : t.map((c, n) => /* @__PURE__ */ r(
|
|
207
|
+
C,
|
|
206
208
|
{
|
|
207
|
-
label:
|
|
209
|
+
label: c,
|
|
208
210
|
borderRadius: "curved",
|
|
209
211
|
color: "neutral",
|
|
210
|
-
className: `options__item ${
|
|
212
|
+
className: `options__item ${o === n ? "active" : ""}`,
|
|
211
213
|
onClick: () => {
|
|
212
|
-
|
|
214
|
+
a(n);
|
|
213
215
|
}
|
|
214
216
|
},
|
|
215
|
-
`toggle-section-tag__${
|
|
217
|
+
`toggle-section-tag__${n + 1}`
|
|
216
218
|
)) })
|
|
217
219
|
);
|
|
218
|
-
|
|
219
|
-
options:
|
|
220
|
-
selectedOptionCode:
|
|
221
|
-
onSelectOption:
|
|
220
|
+
y.propTypes = {
|
|
221
|
+
options: x.array,
|
|
222
|
+
selectedOptionCode: x.any,
|
|
223
|
+
onSelectOption: x.func
|
|
222
224
|
};
|
|
223
|
-
const
|
|
225
|
+
const z = ({
|
|
224
226
|
title: t,
|
|
225
|
-
description:
|
|
226
|
-
image:
|
|
227
|
-
learnMoreText:
|
|
228
|
-
onSelectItem:
|
|
227
|
+
description: o,
|
|
228
|
+
image: a,
|
|
229
|
+
learnMoreText: l,
|
|
230
|
+
onSelectItem: c = () => {
|
|
231
|
+
},
|
|
232
|
+
LinkComponent: n,
|
|
233
|
+
link: s
|
|
234
|
+
}) => /* @__PURE__ */ d(
|
|
235
|
+
k,
|
|
236
|
+
{
|
|
237
|
+
onClick: c,
|
|
238
|
+
as: n || "a",
|
|
239
|
+
...n ? { to: `/${s}` } : { href: `/${s}` },
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ d("div", { className: "card__content", children: [
|
|
242
|
+
/* @__PURE__ */ r("img", { src: a, alt: `Card ${t}`, className: "card__image" }),
|
|
243
|
+
/* @__PURE__ */ d("div", { className: "card__text", children: [
|
|
244
|
+
/* @__PURE__ */ r("div", { className: "card__title", children: t }),
|
|
245
|
+
/* @__PURE__ */ r("div", { className: "card__divider" }),
|
|
246
|
+
/* @__PURE__ */ r("div", { className: "card__description", children: o })
|
|
247
|
+
] })
|
|
248
|
+
] }),
|
|
249
|
+
/* @__PURE__ */ r(
|
|
250
|
+
w,
|
|
251
|
+
{
|
|
252
|
+
text: l,
|
|
253
|
+
btnType: "basic",
|
|
254
|
+
color: "neutral",
|
|
255
|
+
className: "section__show-more learn-more"
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
]
|
|
229
259
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
btnType: "basic",
|
|
244
|
-
color: "neutral",
|
|
245
|
-
className: "section__show-more learn-more"
|
|
246
|
-
}
|
|
247
|
-
)
|
|
248
|
-
] }), b = x(
|
|
249
|
-
({ items: t = [], showMoreText: a, learnMoreText: l, onSelectItem: c = () => {
|
|
250
|
-
} }, s) => {
|
|
251
|
-
const o = C(), [f, h] = u(!1), g = () => {
|
|
252
|
-
h((n) => !n);
|
|
253
|
-
}, i = T(() => t == null ? void 0 : t.map((n, _) => /* @__PURE__ */ r(
|
|
254
|
-
v,
|
|
260
|
+
), M = u(
|
|
261
|
+
({
|
|
262
|
+
items: t = [],
|
|
263
|
+
showMoreText: o,
|
|
264
|
+
learnMoreText: a,
|
|
265
|
+
onSelectItem: l = () => {
|
|
266
|
+
},
|
|
267
|
+
LinkComponent: c
|
|
268
|
+
}, n) => {
|
|
269
|
+
const s = N(), [g, p] = v(!1), m = () => {
|
|
270
|
+
p((e) => !e);
|
|
271
|
+
}, i = S(() => t == null ? void 0 : t.map((e, _) => /* @__PURE__ */ r(
|
|
272
|
+
z,
|
|
255
273
|
{
|
|
256
|
-
title:
|
|
257
|
-
description:
|
|
258
|
-
image:
|
|
259
|
-
learnMoreText:
|
|
260
|
-
onSelectItem: () =>
|
|
274
|
+
title: e == null ? void 0 : e.title,
|
|
275
|
+
description: e == null ? void 0 : e.description,
|
|
276
|
+
image: e == null ? void 0 : e.image,
|
|
277
|
+
learnMoreText: a,
|
|
278
|
+
onSelectItem: () => l(e),
|
|
279
|
+
LinkComponent: c,
|
|
280
|
+
link: e == null ? void 0 : e.link
|
|
261
281
|
},
|
|
262
282
|
`toggle-section-item__${_ + 1}`
|
|
263
283
|
)), [t]);
|
|
264
|
-
return /* @__PURE__ */ r(O, { ref:
|
|
284
|
+
return /* @__PURE__ */ r(O, { ref: n, children: s ? g ? i : /* @__PURE__ */ d(b, { children: [
|
|
265
285
|
i == null ? void 0 : i.slice(0, 4),
|
|
266
286
|
(i == null ? void 0 : i.length) > 4 && /* @__PURE__ */ r(
|
|
267
|
-
|
|
287
|
+
w,
|
|
268
288
|
{
|
|
269
|
-
text:
|
|
289
|
+
text: o,
|
|
270
290
|
btnType: "basic",
|
|
271
291
|
color: "neutral",
|
|
272
292
|
className: "section__show-more",
|
|
273
|
-
onClick:
|
|
293
|
+
onClick: m
|
|
274
294
|
}
|
|
275
295
|
)
|
|
276
296
|
] }) : i });
|
|
277
297
|
}
|
|
278
|
-
)
|
|
279
|
-
v.propTypes = {
|
|
280
|
-
title: e.string,
|
|
281
|
-
description: e.string,
|
|
282
|
-
image: e.string,
|
|
283
|
-
learnMoreText: e.string,
|
|
284
|
-
onSelectItem: e.func
|
|
285
|
-
};
|
|
286
|
-
b.propTypes = {
|
|
287
|
-
items: e.array,
|
|
288
|
-
showMoreText: e.string,
|
|
289
|
-
learnMoreText: e.string,
|
|
290
|
-
onSelectItem: e.func
|
|
291
|
-
};
|
|
292
|
-
const $ = m.div`
|
|
298
|
+
), T = f.div`
|
|
293
299
|
display: flex;
|
|
294
300
|
flex-direction: column;
|
|
295
301
|
align-items: center;
|
|
@@ -321,7 +327,7 @@ const $ = m.div`
|
|
|
321
327
|
line-height: 1.5rem;
|
|
322
328
|
}
|
|
323
329
|
|
|
324
|
-
@media (max-width: ${
|
|
330
|
+
@media (max-width: ${h + "px"}) {
|
|
325
331
|
gap: 1.5rem;
|
|
326
332
|
|
|
327
333
|
& .section__heading {
|
|
@@ -343,55 +349,49 @@ const $ = m.div`
|
|
|
343
349
|
text-align: left;
|
|
344
350
|
}
|
|
345
351
|
}
|
|
346
|
-
`,
|
|
352
|
+
`, X = u(
|
|
347
353
|
({
|
|
348
354
|
title: t,
|
|
349
|
-
description:
|
|
350
|
-
showMoreText:
|
|
351
|
-
learnMoreText:
|
|
352
|
-
options:
|
|
353
|
-
items:
|
|
354
|
-
onSelectItem:
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
description: o,
|
|
356
|
+
showMoreText: a = "Show more",
|
|
357
|
+
learnMoreText: l = "Learn more",
|
|
358
|
+
options: c = [],
|
|
359
|
+
items: n = [],
|
|
360
|
+
onSelectItem: s = () => {
|
|
361
|
+
},
|
|
362
|
+
LinkComponent: g
|
|
363
|
+
}, p) => {
|
|
364
|
+
const [m, i] = v(0);
|
|
365
|
+
return /* @__PURE__ */ d(T, { ref: p, children: [
|
|
359
366
|
/* @__PURE__ */ d("div", { className: "section__heading", children: [
|
|
360
367
|
t && /* @__PURE__ */ r("div", { className: "section__title", children: t }),
|
|
361
|
-
|
|
368
|
+
o && /* @__PURE__ */ r("div", { className: "section__description", children: o })
|
|
362
369
|
] }),
|
|
363
370
|
/* @__PURE__ */ r(
|
|
364
|
-
|
|
371
|
+
y,
|
|
365
372
|
{
|
|
366
|
-
options:
|
|
367
|
-
selectedOptionCode:
|
|
373
|
+
options: c,
|
|
374
|
+
selectedOptionCode: m,
|
|
368
375
|
onSelectOption: (_) => {
|
|
369
376
|
i(_);
|
|
370
|
-
}
|
|
377
|
+
},
|
|
378
|
+
LinkComponent: g
|
|
371
379
|
}
|
|
372
380
|
),
|
|
373
381
|
/* @__PURE__ */ r(
|
|
374
|
-
|
|
382
|
+
M,
|
|
375
383
|
{
|
|
376
|
-
items:
|
|
377
|
-
showMoreText:
|
|
378
|
-
learnMoreText:
|
|
379
|
-
onSelectItem:
|
|
384
|
+
items: n == null ? void 0 : n[m],
|
|
385
|
+
showMoreText: a,
|
|
386
|
+
learnMoreText: l,
|
|
387
|
+
onSelectItem: s,
|
|
388
|
+
LinkComponent: g
|
|
380
389
|
},
|
|
381
|
-
`toggle-section-items__${
|
|
390
|
+
`toggle-section-items__${m}`
|
|
382
391
|
)
|
|
383
392
|
] });
|
|
384
393
|
}
|
|
385
394
|
);
|
|
386
|
-
z.propTypes = {
|
|
387
|
-
title: e.string,
|
|
388
|
-
description: e.string,
|
|
389
|
-
options: e.array,
|
|
390
|
-
items: e.array,
|
|
391
|
-
showMoreText: e.string,
|
|
392
|
-
learnMoreText: e.string,
|
|
393
|
-
onSelectItem: e.func
|
|
394
|
-
};
|
|
395
395
|
export {
|
|
396
|
-
|
|
396
|
+
X as default
|
|
397
397
|
};
|