@lanaco/lnc-react-ui 4.0.81 → 4.0.83
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/BlogsSectionWithFilters.cjs +2 -2
- package/dist/BlogsSectionWithFilters.js +36 -34
- package/dist/BrandHitsSection.cjs +6 -6
- package/dist/BrandHitsSection.js +1 -8
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +54 -52
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +9 -9
- package/dist/FieldOfInterestsWithTagsCardsSection.js +53 -51
- package/dist/LoanCalculatorSection.cjs +1 -1
- package/dist/LoanCalculatorSection.js +80 -79
- package/dist/LocationSearchSection.cjs +4 -4
- package/dist/LocationSearchSection.js +21 -21
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +45 -48
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
3
|
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import { M as
|
|
8
|
-
const
|
|
4
|
+
import { t as y, m as b, l as $ } from "./utils-DCs-SbIv.js";
|
|
5
|
+
import N from "./Icon.js";
|
|
6
|
+
import { u as C } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
+
import { M as I } from "./consts-C1uHV4xc.js";
|
|
8
|
+
const W = m.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -42,7 +42,7 @@ const I = m.div`
|
|
|
42
42
|
font-style: normal;
|
|
43
43
|
font-weight: 500;
|
|
44
44
|
line-height: 1.5rem;
|
|
45
|
-
${
|
|
45
|
+
${y(2)}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
& .wrapper__description {
|
|
@@ -52,7 +52,7 @@ const I = m.div`
|
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
line-height: 1rem;
|
|
54
54
|
letter-spacing: 0.025rem;
|
|
55
|
-
${
|
|
55
|
+
${y(2)}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -65,12 +65,12 @@ const I = m.div`
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`, F = m.div`
|
|
69
69
|
width: 100%;
|
|
70
70
|
height: 11.625rem;
|
|
71
71
|
border-radius: 0.75rem;
|
|
72
|
-
background: ${
|
|
73
|
-
`,
|
|
72
|
+
background: ${b("-90deg")};
|
|
73
|
+
`, j = m.div`
|
|
74
74
|
display: flex;
|
|
75
75
|
padding: 0 0.5rem 0 0;
|
|
76
76
|
align-items: center;
|
|
@@ -114,30 +114,30 @@ const I = m.div`
|
|
|
114
114
|
color: var(--white, #fff);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`, z = m.div`
|
|
118
118
|
width: 7rem;
|
|
119
119
|
height: 3rem;
|
|
120
120
|
border-radius: 999px;
|
|
121
|
-
background: ${
|
|
122
|
-
`,
|
|
121
|
+
background: ${b("-90deg")};
|
|
122
|
+
`, O = p(({}, r) => /* @__PURE__ */ i(z, {})), A = p(
|
|
123
123
|
({ name: r, isActive: n, icon: t, onSelectCard: s = () => {
|
|
124
|
-
} }, f) => /* @__PURE__ */ l(
|
|
125
|
-
/* @__PURE__ */ i(
|
|
124
|
+
} }, f) => /* @__PURE__ */ l(j, { className: n ? "active" : "", onClick: s, children: [
|
|
125
|
+
/* @__PURE__ */ i(N, { icon: t, className: "wrapper__icon" }),
|
|
126
126
|
/* @__PURE__ */ i("div", { className: "wrapper__text", children: r })
|
|
127
127
|
] })
|
|
128
|
-
),
|
|
128
|
+
), M = p(
|
|
129
129
|
({ image: r, imageComponent: n, name: t, description: s, onSelectCard: f = () => {
|
|
130
|
-
} },
|
|
131
|
-
const { theme: d } =
|
|
132
|
-
return /* @__PURE__ */ l(
|
|
133
|
-
|
|
130
|
+
} }, u) => {
|
|
131
|
+
const { theme: d } = C();
|
|
132
|
+
return /* @__PURE__ */ l(W, { theme: d, onClick: f, children: [
|
|
133
|
+
$(n) ? n : /* @__PURE__ */ i("img", { src: r, className: "wrapper__image" }),
|
|
134
134
|
/* @__PURE__ */ l("div", { className: "wrapper__content", children: [
|
|
135
135
|
t && /* @__PURE__ */ i("div", { className: "wrapper__title", children: t }),
|
|
136
136
|
s && /* @__PURE__ */ i("div", { className: "wrapper__description", children: s })
|
|
137
137
|
] })
|
|
138
138
|
] });
|
|
139
139
|
}
|
|
140
|
-
),
|
|
140
|
+
), E = p(({}, r) => /* @__PURE__ */ i(F, {})), D = m.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
align-items: center;
|
|
@@ -185,7 +185,7 @@ const I = m.div`
|
|
|
185
185
|
width: 100%;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
@media (max-width: ${
|
|
188
|
+
@media (max-width: ${I + "px"}) {
|
|
189
189
|
& .wrapper__tags {
|
|
190
190
|
overflow-x: scroll;
|
|
191
191
|
justify-content: flex-start;
|
|
@@ -211,68 +211,70 @@ const I = m.div`
|
|
|
211
211
|
gap: 1rem;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
`,
|
|
214
|
+
`, Z = p(
|
|
215
215
|
({
|
|
216
216
|
title: r,
|
|
217
217
|
subtitle: n,
|
|
218
218
|
tags: t = [],
|
|
219
219
|
limitTags: s = 7,
|
|
220
220
|
limitTagsForMobile: f = 7,
|
|
221
|
-
limit:
|
|
221
|
+
limit: u = 3,
|
|
222
222
|
limitForMobile: d = 2,
|
|
223
|
-
items:
|
|
224
|
-
|
|
223
|
+
items: o = [],
|
|
224
|
+
selectedTag: c,
|
|
225
|
+
onSelectTag: h = () => {
|
|
225
226
|
},
|
|
226
|
-
onSelectCard:
|
|
227
|
+
onSelectCard: _ = () => {
|
|
227
228
|
},
|
|
228
|
-
getImage:
|
|
229
|
+
getImage: k = () => {
|
|
229
230
|
}
|
|
230
|
-
},
|
|
231
|
-
var x,
|
|
232
|
-
const
|
|
233
|
-
c == null || c(e);
|
|
234
|
-
}, w = (e) => {
|
|
231
|
+
}, G) => {
|
|
232
|
+
var x, v;
|
|
233
|
+
const w = (e) => {
|
|
235
234
|
h == null || h(e);
|
|
235
|
+
}, g = (e) => {
|
|
236
|
+
_ == null || _(e);
|
|
236
237
|
};
|
|
237
238
|
return /* @__PURE__ */ l(
|
|
238
|
-
|
|
239
|
+
D,
|
|
239
240
|
{
|
|
240
241
|
limitTags: s,
|
|
241
242
|
limitTagsForMobile: f,
|
|
242
|
-
limitCards:
|
|
243
|
+
limitCards: u,
|
|
243
244
|
limitCardsForMobile: d,
|
|
244
245
|
children: [
|
|
245
246
|
/* @__PURE__ */ l("div", { className: "wrapper__heading", children: [
|
|
246
247
|
r && /* @__PURE__ */ i("div", { className: "wrapper__title", children: r }),
|
|
247
248
|
n && /* @__PURE__ */ i("div", { className: "wrapper__subtitle", children: n })
|
|
248
249
|
] }),
|
|
249
|
-
/* @__PURE__ */ i("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((e,
|
|
250
|
-
|
|
250
|
+
/* @__PURE__ */ i("div", { className: "wrapper__tags", children: t && (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((e, a) => /* @__PURE__ */ i(
|
|
251
|
+
A,
|
|
251
252
|
{
|
|
252
253
|
icon: e == null ? void 0 : e.icon,
|
|
253
254
|
name: e == null ? void 0 : e.name,
|
|
254
|
-
|
|
255
|
+
isActive: (e == null ? void 0 : e.uuid) === (c == null ? void 0 : c.uuid),
|
|
256
|
+
onSelectCard: () => w == null ? void 0 : w(e)
|
|
255
257
|
},
|
|
256
|
-
`field-of-interests-with-tags-card-tag__${
|
|
257
|
-
)) : (x = Array.from("123")) == null ? void 0 : x.map((e,
|
|
258
|
-
|
|
258
|
+
`field-of-interests-with-tags-card-tag__${a + 1}`
|
|
259
|
+
)) : (x = Array.from("123")) == null ? void 0 : x.map((e, a) => /* @__PURE__ */ i(
|
|
260
|
+
O,
|
|
259
261
|
{},
|
|
260
|
-
`field-of-interests-with-tags-card-tag-skeleton__${
|
|
262
|
+
`field-of-interests-with-tags-card-tag-skeleton__${a + 1}`
|
|
261
263
|
)) }),
|
|
262
|
-
/* @__PURE__ */ i("div", { className: "wrapper__cards", children:
|
|
263
|
-
|
|
264
|
+
/* @__PURE__ */ i("div", { className: "wrapper__cards", children: o && (o == null ? void 0 : o.length) > 0 ? o == null ? void 0 : o.map((e, a) => /* @__PURE__ */ i(
|
|
265
|
+
M,
|
|
264
266
|
{
|
|
265
|
-
image:
|
|
267
|
+
image: k(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid),
|
|
266
268
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
267
269
|
name: e == null ? void 0 : e.name,
|
|
268
270
|
description: (e == null ? void 0 : e.shortDescription) || (e == null ? void 0 : e.description),
|
|
269
|
-
onSelectCard: () =>
|
|
271
|
+
onSelectCard: () => g == null ? void 0 : g(e)
|
|
270
272
|
},
|
|
271
|
-
`field-of-interests-with-tags-card__${
|
|
272
|
-
)) : (
|
|
273
|
-
|
|
273
|
+
`field-of-interests-with-tags-card__${a + 1}`
|
|
274
|
+
)) : (v = Array.from("123")) == null ? void 0 : v.map((e, a) => /* @__PURE__ */ i(
|
|
275
|
+
E,
|
|
274
276
|
{},
|
|
275
|
-
`field-of-interests-with-tags-card-skeleton__${
|
|
277
|
+
`field-of-interests-with-tags-card-skeleton__${a + 1}`
|
|
276
278
|
)) })
|
|
277
279
|
]
|
|
278
280
|
}
|
|
@@ -280,5 +282,5 @@ const I = m.div`
|
|
|
280
282
|
}
|
|
281
283
|
);
|
|
282
284
|
export {
|
|
283
|
-
|
|
285
|
+
Z as default
|
|
284
286
|
};
|
|
@@ -223,4 +223,4 @@
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
`,Y=i.forwardRef(({defaultLoanAmount:
|
|
226
|
+
`,Y=i.forwardRef(({defaultLoanAmount:t=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:l="KM",loanPeriodUnit:c="months",minLoanAmount:d=1,maxLoanAmount:u=3e5,minInterestRate:h=1,maxInterestRate:g=15,isFixedInterestRate:v=!1,minLoanPeriod:_=1,maxLoanPeriod:p=240,loanAmountLabel:j="Loan amount",loanAmountHint:b="Enter the total loan amount you want to borrow.",interestRateLabel:N="Interest rate",interestRateHint:w="Enter the annual interest rate for loan.",loanPeriodLabel:C="Loan period",loanPeriodHint:L="Enter the duration of the loan in months.",submitText:T="Calculate",summaryMonthlyPaymentText:$="Monthly payment",summaryMonthlyPaymentHint:q="Lorem ipsum dolor sit amet consectetur. Eu eu velit faucibus hendrerit egestas aliquam.",summaryTotalPaymentText:R="Total interest paid",summaryTotalPaymentHint:M="Lorem ipsum dolor sit amet consectetur. Sed sed viverra sed lobortis. At eu tellus tristique hac quis.",handleSubmit:S=()=>{}},z)=>{const[f,A]=i.useState(t),[r,P]=i.useState(n),[m,H]=i.useState(o),I=a=>{var s;A(+((s=a==null?void 0:a.target)==null?void 0:s.value))},k=a=>{var s;P(+((s=a==null?void 0:a.target)==null?void 0:s.value))},E=a=>{var s;H(+((s=a==null?void 0:a.target)==null?void 0:s.value))},B=()=>{S({loanAmount:f,interestRate:r,loanPeriod:m})};return e.jsxs(X,{className:"loan-calculator__modal-content",children:[e.jsxs("div",{className:"loan-calculator__left",children:[e.jsxs("div",{className:"loan-calculator__range-inputs",children:[e.jsx("div",{className:"loan-calculator__range-input",children:e.jsxs("div",{className:"range-input__form-field",children:[e.jsxs("div",{className:"range-input__label-field",children:[e.jsx("div",{className:"range-input__label",children:`${j} (${l})`}),e.jsx(F,{value:f,onChange:I,className:"range-input__text"})]}),e.jsxs("div",{className:"range-input__ranger-wrapper",children:[e.jsx(K,{className:"range-input__ranger",defaultValue:f,value:f,min:d,max:u,onChange:I}),e.jsxs("div",{className:"range-input__hint center",children:[e.jsx("div",{children:`${d} ${l}`}),e.jsx("div",{children:`${u} ${l}`})]})]}),e.jsx("div",{className:"range-input__hint",children:b})]})}),e.jsx("div",{className:"loan-calculator__range-input",children:e.jsxs("div",{className:"range-input__form-field",children:[e.jsxs("div",{className:"range-input__label-field",children:[e.jsx("div",{className:"range-input__label",children:`${N} (%)`}),e.jsx(F,{value:r,onChange:k,className:"range-input__text"})]}),e.jsxs("div",{className:"range-input__ranger-wrapper",children:[e.jsx(K,{className:"range-input__ranger",defaultValue:r,value:r,min:h,max:g,disabled:v,onChange:k}),e.jsxs("div",{className:"range-input__hint center",children:[e.jsx("div",{children:`${h} %`}),e.jsx("div",{children:`${g} %`})]})]}),e.jsx("div",{className:"range-input__hint",children:w})]})}),e.jsx("div",{className:"loan-calculator__range-input",children:e.jsxs("div",{className:"range-input__form-field",children:[e.jsxs("div",{className:"range-input__label-field",children:[e.jsx("div",{className:"range-input__label",children:`${C} (${c})`}),e.jsx(F,{value:m,onChange:E,className:"range-input__text"})]}),e.jsxs("div",{className:"range-input__ranger-wrapper",children:[e.jsx(K,{className:"range-input__ranger",defaultValue:m,value:m,min:_,max:p,onChange:E}),e.jsxs("div",{className:"range-input__hint center",children:[e.jsx("div",{children:`${_} ${c}`}),e.jsx("div",{children:`${p} ${c}`})]})]}),e.jsx("div",{className:"range-input__hint",children:L})]})})]}),e.jsx(V,{text:T,className:"loan-calculator__submit",onClick:B})]}),e.jsx("div",{className:"loan-calculator__right",children:e.jsxs("div",{className:"loan-calculator__summary",children:[e.jsxs("div",{className:"summary__up",children:[e.jsxs("div",{className:"summary__title-wrapper",children:[e.jsx("div",{className:"summary__title",children:$}),e.jsx("div",{className:"summary__title large",children:`${x} ${l}`})]}),e.jsx("div",{className:"summary__hint",children:q})]}),e.jsx("div",{className:"summary__separator"}),e.jsxs("div",{className:"summary__down",children:[e.jsxs("div",{className:"summary__title-wrapper",children:[e.jsx("div",{className:"summary__title strong",children:R}),e.jsx("div",{className:"summary__title",children:`${y} ${l}`})]}),e.jsx("div",{className:"summary__hint",children:M})]})]})})]})}),Z=i.forwardRef(({defaultLoanAmount:t=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:l="KM",loanPeriodUnit:c="months",minLoanAmount:d=1,maxLoanAmount:u=3e5,minInterestRate:h=1,maxInterestRate:g=15,minLoanPeriod:v=1,maxLoanPeriod:_=240,isFixedInterestRate:p=!1,loanAmountLabel:j="Loan amount",loanAmountHint:b="Enter the total loan amount you want to borrow.",interestRateLabel:N="Interest rate",interestRateHint:w="Enter the annual interest rate for loan.",loanPeriodLabel:C="Loan period",loanPeriodHint:L="Enter the duration of the loan in months.",submitText:T="Calculate",summaryMonthlyPaymentText:$="Monthly payment",summaryMonthlyPaymentHint:q="Lorem ipsum dolor sit amet consectetur. Eu eu velit faucibus hendrerit egestas aliquam.",summaryTotalPaymentText:R="Total interest paid",summaryTotalPaymentHint:M="Lorem ipsum dolor sit amet consectetur. Sed sed viverra sed lobortis. At eu tellus tristique hac quis.",handleSubmit:S=()=>{}},z)=>e.jsx(Y,{defaultLoanAmount:t,defaultInterestRate:n,defaultLoanPeriod:o,monthlyPayment:x,totalInterestPaid:y,currency:l,loanPeriodUnit:c,minLoanAmount:d,maxLoanAmount:u,minInterestRate:h,maxInterestRate:g,isFixedInterestRate:p,minLoanPeriod:v,maxLoanPeriod:_,loanAmountLabel:j,loanAmountHint:b,interestRateLabel:N,interestRateHint:w,loanPeriodLabel:C,loanPeriodHint:L,submitText:T,summaryMonthlyPaymentText:$,summaryMonthlyPaymentHint:q,summaryTotalPaymentText:R,summaryTotalPaymentHint:M,handleSubmit:S})),U=i.forwardRef(({headerTitleText:t="Loan calculator",handleClick:n=()=>{}},o)=>e.jsxs(J,{className:"loan-calculator__modal-header",children:[e.jsx("div",{className:"header__title",children:t}),e.jsx(G,{icon:"times",borderRadius:"curved",btnType:"basic",color:"neutral",size:"small",className:"header__action",onClick:n})]})),ee=i.forwardRef(({footerTitleText:t="Close",handleClick:n=()=>{}},o)=>e.jsx(Q,{className:"loan-calculator__modal-footer",children:e.jsx(V,{text:t,btnType:"basic",color:"neutral",onClick:n,className:"footer__action"})})),ae=i.forwardRef(({defaultLoanAmount:t=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:l="KM",loanPeriodUnit:c="months",minLoanAmount:d=1,maxLoanAmount:u=3e5,minInterestRate:h=1,maxInterestRate:g=15,isFixedInterestRate:v=!1,minLoanPeriod:_=1,maxLoanPeriod:p=240,headerTitleText:j="Loan calculator",footerTitleText:b="Close",loanAmountLabel:N="Loan amount",loanAmountHint:w="Enter the total loan amount you want to borrow.",interestRateLabel:C="Interest rate",interestRateHint:L="Enter the annual interest rate for loan.",loanPeriodLabel:T="Loan period",loanPeriodHint:$="Enter the duration of the loan in months.",submitText:q="Calculate",summaryMonthlyPaymentText:R="Monthly payment",summaryMonthlyPaymentHint:M="Lorem ipsum dolor sit amet consectetur. Eu eu velit faucibus hendrerit egestas aliquam.",summaryTotalPaymentText:S="Total interest paid",summaryTotalPaymentHint:z="Lorem ipsum dolor sit amet consectetur. Sed sed viverra sed lobortis. At eu tellus tristique hac quis.",handleSubmit:f=()=>{},handleCancel:A=()=>{}},r)=>{const P=()=>{var m;(m=r==null?void 0:r.current)==null||m.close(),A()};return e.jsx(D,{ref:r,header:e.jsx(U,{headerTitleText:j,handleClick:P}),footer:e.jsx(ee,{footerTitleText:b,handleClick:P}),showCloseButton:!1,className:"loan-calculator__modal",children:e.jsx(Z,{defaultLoanAmount:t,defaultInterestRate:n,defaultLoanPeriod:o,monthlyPayment:x,totalInterestPaid:y,currency:l,loanPeriodUnit:c,minLoanAmount:d,maxLoanAmount:u,minInterestRate:h,maxInterestRate:g,minLoanPeriod:_,maxLoanPeriod:p,isFixedInterestRate:v,loanAmountLabel:N,loanAmountHint:w,interestRateLabel:C,interestRateHint:L,loanPeriodLabel:T,loanPeriodHint:$,submitText:q,summaryMonthlyPaymentText:R,summaryMonthlyPaymentHint:M,summaryTotalPaymentText:S,summaryTotalPaymentHint:z,handleSubmit:f})})}),te=i.forwardRef((t,n)=>{const{loanCalculatorTitle:o,loanCalculatorText:x,loanCalculatorPlaceholder:y,openCalculatorText:l,onOpenCalculator:c=a=>{},defaultLoanAmount:d,defaultInterestRate:u,defaultLoanPeriod:h,monthlyPayment:g,totalInterestPaid:v,currency:_,loanPeriodUnit:p,minLoanAmount:j,maxLoanAmount:b,minInterestRate:N,maxInterestRate:w,minLoanPeriod:C,maxLoanPeriod:L,headerTitleText:T,footerTitleText:$,loanAmountLabel:q,loanAmountHint:R,interestRateLabel:M,interestRateHint:S,loanPeriodLabel:z,loanPeriodHint:f,submitText:A,summaryMonthlyPaymentText:r,summaryMonthlyPaymentHint:P,summaryTotalPaymentText:m,summaryTotalPaymentHint:H,handleSubmit:I,handleCancel:k}=t,E=i.useRef(),B=a=>{var s;(s=E==null?void 0:E.current)==null||s.open(),c(a)};return e.jsxs(e.Fragment,{children:[e.jsx(W.LoanCalculator,{ref:n,title:o,text:x,openCalculatorText:l,onOpenCalculator:B,placeholderText:y}),e.jsx(ae,{ref:E,defaultLoanAmount:d,defaultInterestRate:u,defaultLoanPeriod:h,monthlyPayment:g,totalInterestPaid:v,currency:_,loanPeriodUnit:p,minLoanAmount:j,maxLoanAmount:b,minInterestRate:N,maxInterestRate:w,minLoanPeriod:C,maxLoanPeriod:L,headerTitleText:T,footerTitleText:$,loanAmountLabel:q,loanAmountHint:R,interestRateLabel:M,interestRateHint:S,loanPeriodLabel:z,loanPeriodHint:f,submitText:A,summaryMonthlyPaymentText:r,summaryMonthlyPaymentHint:P,summaryTotalPaymentText:m,summaryTotalPaymentHint:H,handleSubmit:I,handleCancel:k})]})});module.exports=te;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I, useState as B, useRef as J } from "react";
|
|
3
3
|
import { L as Q } from "./index-D0Cl3mpJ.js";
|
|
4
4
|
import X from "./Modal.js";
|
|
@@ -232,10 +232,10 @@ const Z = V.div`
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
`,
|
|
235
|
+
`, ae = I(
|
|
236
236
|
({
|
|
237
|
-
defaultLoanAmount:
|
|
238
|
-
defaultInterestRate:
|
|
237
|
+
defaultLoanAmount: l = 2e4,
|
|
238
|
+
defaultInterestRate: n = 5,
|
|
239
239
|
defaultLoanPeriod: s = 36,
|
|
240
240
|
monthlyPayment: v = 599,
|
|
241
241
|
totalInterestPaid: y = 21579,
|
|
@@ -246,8 +246,8 @@ const Z = V.div`
|
|
|
246
246
|
minInterestRate: h = 1,
|
|
247
247
|
maxInterestRate: g = 15,
|
|
248
248
|
isFixedInterestRate: x = !1,
|
|
249
|
-
minLoanPeriod:
|
|
250
|
-
maxLoanPeriod:
|
|
249
|
+
minLoanPeriod: _ = 1,
|
|
250
|
+
maxLoanPeriod: p = 240,
|
|
251
251
|
loanAmountLabel: b = "Loan amount",
|
|
252
252
|
loanAmountHint: N = "Enter the total loan amount you want to borrow.",
|
|
253
253
|
interestRateLabel: C = "Interest rate",
|
|
@@ -262,15 +262,15 @@ const Z = V.div`
|
|
|
262
262
|
handleSubmit: S = () => {
|
|
263
263
|
}
|
|
264
264
|
}, R) => {
|
|
265
|
-
const [f, k] = B(
|
|
265
|
+
const [f, k] = B(l), [i, A] = B(n), [m, O] = B(s), H = (t) => {
|
|
266
266
|
var o;
|
|
267
|
-
k(+((o =
|
|
268
|
-
}, j = (
|
|
267
|
+
k(+((o = t == null ? void 0 : t.target) == null ? void 0 : o.value));
|
|
268
|
+
}, j = (t) => {
|
|
269
269
|
var o;
|
|
270
|
-
A(+((o =
|
|
271
|
-
}, q = (
|
|
270
|
+
A(+((o = t == null ? void 0 : t.target) == null ? void 0 : o.value));
|
|
271
|
+
}, q = (t) => {
|
|
272
272
|
var o;
|
|
273
|
-
O(+((o =
|
|
273
|
+
O(+((o = t == null ? void 0 : t.target) == null ? void 0 : o.value));
|
|
274
274
|
}, W = () => {
|
|
275
275
|
S({
|
|
276
276
|
loanAmount: f,
|
|
@@ -278,11 +278,11 @@ const Z = V.div`
|
|
|
278
278
|
loanPeriod: m
|
|
279
279
|
});
|
|
280
280
|
};
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
281
|
+
return /* @__PURE__ */ a(ee, { className: "loan-calculator__modal-content", children: [
|
|
282
|
+
/* @__PURE__ */ a("div", { className: "loan-calculator__left", children: [
|
|
283
|
+
/* @__PURE__ */ a("div", { className: "loan-calculator__range-inputs", children: [
|
|
284
|
+
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */ a("div", { className: "range-input__form-field", children: [
|
|
285
|
+
/* @__PURE__ */ a("div", { className: "range-input__label-field", children: [
|
|
286
286
|
/* @__PURE__ */ e("div", { className: "range-input__label", children: `${b} (${r})` }),
|
|
287
287
|
/* @__PURE__ */ e(
|
|
288
288
|
F,
|
|
@@ -293,7 +293,7 @@ const Z = V.div`
|
|
|
293
293
|
}
|
|
294
294
|
)
|
|
295
295
|
] }),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ a("div", { className: "range-input__ranger-wrapper", children: [
|
|
297
297
|
/* @__PURE__ */ e(
|
|
298
298
|
K,
|
|
299
299
|
{
|
|
@@ -305,15 +305,15 @@ const Z = V.div`
|
|
|
305
305
|
onChange: H
|
|
306
306
|
}
|
|
307
307
|
),
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ a("div", { className: "range-input__hint center", children: [
|
|
309
309
|
/* @__PURE__ */ e("div", { children: `${d} ${r}` }),
|
|
310
310
|
/* @__PURE__ */ e("div", { children: `${u} ${r}` })
|
|
311
311
|
] })
|
|
312
312
|
] }),
|
|
313
313
|
/* @__PURE__ */ e("div", { className: "range-input__hint", children: N })
|
|
314
314
|
] }) }),
|
|
315
|
-
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */ a("div", { className: "range-input__form-field", children: [
|
|
316
|
+
/* @__PURE__ */ a("div", { className: "range-input__label-field", children: [
|
|
317
317
|
/* @__PURE__ */ e("div", { className: "range-input__label", children: `${C} (%)` }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
319
|
F,
|
|
@@ -324,7 +324,7 @@ const Z = V.div`
|
|
|
324
324
|
}
|
|
325
325
|
)
|
|
326
326
|
] }),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ a("div", { className: "range-input__ranger-wrapper", children: [
|
|
328
328
|
/* @__PURE__ */ e(
|
|
329
329
|
K,
|
|
330
330
|
{
|
|
@@ -337,15 +337,15 @@ const Z = V.div`
|
|
|
337
337
|
onChange: j
|
|
338
338
|
}
|
|
339
339
|
),
|
|
340
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ a("div", { className: "range-input__hint center", children: [
|
|
341
341
|
/* @__PURE__ */ e("div", { children: `${h} %` }),
|
|
342
342
|
/* @__PURE__ */ e("div", { children: `${g} %` })
|
|
343
343
|
] })
|
|
344
344
|
] }),
|
|
345
345
|
/* @__PURE__ */ e("div", { className: "range-input__hint", children: w })
|
|
346
346
|
] }) }),
|
|
347
|
-
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ e("div", { className: "loan-calculator__range-input", children: /* @__PURE__ */ a("div", { className: "range-input__form-field", children: [
|
|
348
|
+
/* @__PURE__ */ a("div", { className: "range-input__label-field", children: [
|
|
349
349
|
/* @__PURE__ */ e("div", { className: "range-input__label", children: `${L} (${c})` }),
|
|
350
350
|
/* @__PURE__ */ e(
|
|
351
351
|
F,
|
|
@@ -356,21 +356,21 @@ const Z = V.div`
|
|
|
356
356
|
}
|
|
357
357
|
)
|
|
358
358
|
] }),
|
|
359
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ a("div", { className: "range-input__ranger-wrapper", children: [
|
|
360
360
|
/* @__PURE__ */ e(
|
|
361
361
|
K,
|
|
362
362
|
{
|
|
363
363
|
className: "range-input__ranger",
|
|
364
364
|
defaultValue: m,
|
|
365
365
|
value: m,
|
|
366
|
-
min:
|
|
367
|
-
max:
|
|
366
|
+
min: _,
|
|
367
|
+
max: p,
|
|
368
368
|
onChange: q
|
|
369
369
|
}
|
|
370
370
|
),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */ e("div", { children: `${
|
|
373
|
-
/* @__PURE__ */ e("div", { children: `${
|
|
371
|
+
/* @__PURE__ */ a("div", { className: "range-input__hint center", children: [
|
|
372
|
+
/* @__PURE__ */ e("div", { children: `${_} ${c}` }),
|
|
373
|
+
/* @__PURE__ */ e("div", { children: `${p} ${c}` })
|
|
374
374
|
] })
|
|
375
375
|
] }),
|
|
376
376
|
/* @__PURE__ */ e("div", { className: "range-input__hint", children: $ })
|
|
@@ -385,17 +385,17 @@ const Z = V.div`
|
|
|
385
385
|
}
|
|
386
386
|
)
|
|
387
387
|
] }),
|
|
388
|
-
/* @__PURE__ */ e("div", { className: "loan-calculator__right", children: /* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ e("div", { className: "loan-calculator__right", children: /* @__PURE__ */ a("div", { className: "loan-calculator__summary", children: [
|
|
389
|
+
/* @__PURE__ */ a("div", { className: "summary__up", children: [
|
|
390
|
+
/* @__PURE__ */ a("div", { className: "summary__title-wrapper", children: [
|
|
391
391
|
/* @__PURE__ */ e("div", { className: "summary__title", children: M }),
|
|
392
392
|
/* @__PURE__ */ e("div", { className: "summary__title large", children: `${v} ${r}` })
|
|
393
393
|
] }),
|
|
394
394
|
/* @__PURE__ */ e("div", { className: "summary__hint", children: E })
|
|
395
395
|
] }),
|
|
396
396
|
/* @__PURE__ */ e("div", { className: "summary__separator" }),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ a("div", { className: "summary__down", children: [
|
|
398
|
+
/* @__PURE__ */ a("div", { className: "summary__title-wrapper", children: [
|
|
399
399
|
/* @__PURE__ */ e("div", { className: "summary__title strong", children: P }),
|
|
400
400
|
/* @__PURE__ */ e("div", { className: "summary__title", children: `${y} ${r}` })
|
|
401
401
|
] }),
|
|
@@ -404,10 +404,10 @@ const Z = V.div`
|
|
|
404
404
|
] }) })
|
|
405
405
|
] });
|
|
406
406
|
}
|
|
407
|
-
),
|
|
407
|
+
), te = I(
|
|
408
408
|
({
|
|
409
|
-
defaultLoanAmount:
|
|
410
|
-
defaultInterestRate:
|
|
409
|
+
defaultLoanAmount: l = 2e4,
|
|
410
|
+
defaultInterestRate: n = 5,
|
|
411
411
|
defaultLoanPeriod: s = 36,
|
|
412
412
|
monthlyPayment: v = 599,
|
|
413
413
|
totalInterestPaid: y = 21579,
|
|
@@ -418,8 +418,8 @@ const Z = V.div`
|
|
|
418
418
|
minInterestRate: h = 1,
|
|
419
419
|
maxInterestRate: g = 15,
|
|
420
420
|
minLoanPeriod: x = 1,
|
|
421
|
-
maxLoanPeriod:
|
|
422
|
-
isFixedInterestRate:
|
|
421
|
+
maxLoanPeriod: _ = 240,
|
|
422
|
+
isFixedInterestRate: p = !1,
|
|
423
423
|
loanAmountLabel: b = "Loan amount",
|
|
424
424
|
loanAmountHint: N = "Enter the total loan amount you want to borrow.",
|
|
425
425
|
interestRateLabel: C = "Interest rate",
|
|
@@ -434,10 +434,10 @@ const Z = V.div`
|
|
|
434
434
|
handleSubmit: S = () => {
|
|
435
435
|
}
|
|
436
436
|
}, R) => /* @__PURE__ */ e(
|
|
437
|
-
|
|
437
|
+
ae,
|
|
438
438
|
{
|
|
439
|
-
defaultLoanAmount:
|
|
440
|
-
defaultInterestRate:
|
|
439
|
+
defaultLoanAmount: l,
|
|
440
|
+
defaultInterestRate: n,
|
|
441
441
|
defaultLoanPeriod: s,
|
|
442
442
|
monthlyPayment: v,
|
|
443
443
|
totalInterestPaid: y,
|
|
@@ -447,9 +447,9 @@ const Z = V.div`
|
|
|
447
447
|
maxLoanAmount: u,
|
|
448
448
|
minInterestRate: h,
|
|
449
449
|
maxInterestRate: g,
|
|
450
|
-
isFixedInterestRate:
|
|
450
|
+
isFixedInterestRate: p,
|
|
451
451
|
minLoanPeriod: x,
|
|
452
|
-
maxLoanPeriod:
|
|
452
|
+
maxLoanPeriod: _,
|
|
453
453
|
loanAmountLabel: b,
|
|
454
454
|
loanAmountHint: N,
|
|
455
455
|
interestRateLabel: C,
|
|
@@ -464,10 +464,10 @@ const Z = V.div`
|
|
|
464
464
|
handleSubmit: S
|
|
465
465
|
}
|
|
466
466
|
)
|
|
467
|
-
),
|
|
468
|
-
({ headerTitleText:
|
|
469
|
-
} }, s) => /* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */ e("div", { className: "header__title", children:
|
|
467
|
+
), le = I(
|
|
468
|
+
({ headerTitleText: l = "Loan calculator", handleClick: n = () => {
|
|
469
|
+
} }, s) => /* @__PURE__ */ a(Z, { className: "loan-calculator__modal-header", children: [
|
|
470
|
+
/* @__PURE__ */ e("div", { className: "header__title", children: l }),
|
|
471
471
|
/* @__PURE__ */ e(
|
|
472
472
|
Y,
|
|
473
473
|
{
|
|
@@ -477,26 +477,26 @@ const Z = V.div`
|
|
|
477
477
|
color: "neutral",
|
|
478
478
|
size: "small",
|
|
479
479
|
className: "header__action",
|
|
480
|
-
onClick:
|
|
480
|
+
onClick: n
|
|
481
481
|
}
|
|
482
482
|
)
|
|
483
483
|
] })
|
|
484
|
-
),
|
|
485
|
-
({ footerTitleText:
|
|
486
|
-
} }, s) => /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
484
|
+
), ne = I(
|
|
485
|
+
({ footerTitleText: l = "Close", handleClick: n = () => {
|
|
486
|
+
} }, s) => /* @__PURE__ */ e(U, { className: "loan-calculator__modal-footer", children: /* @__PURE__ */ e(
|
|
487
487
|
D,
|
|
488
488
|
{
|
|
489
|
-
text:
|
|
489
|
+
text: l,
|
|
490
490
|
btnType: "basic",
|
|
491
491
|
color: "neutral",
|
|
492
|
-
onClick:
|
|
492
|
+
onClick: n,
|
|
493
493
|
className: "footer__action"
|
|
494
494
|
}
|
|
495
495
|
) })
|
|
496
496
|
), re = I(
|
|
497
497
|
({
|
|
498
|
-
defaultLoanAmount:
|
|
499
|
-
defaultInterestRate:
|
|
498
|
+
defaultLoanAmount: l = 2e4,
|
|
499
|
+
defaultInterestRate: n = 5,
|
|
500
500
|
defaultLoanPeriod: s = 36,
|
|
501
501
|
monthlyPayment: v = 599,
|
|
502
502
|
totalInterestPaid: y = 21579,
|
|
@@ -507,8 +507,8 @@ const Z = V.div`
|
|
|
507
507
|
minInterestRate: h = 1,
|
|
508
508
|
maxInterestRate: g = 15,
|
|
509
509
|
isFixedInterestRate: x = !1,
|
|
510
|
-
minLoanPeriod:
|
|
511
|
-
maxLoanPeriod:
|
|
510
|
+
minLoanPeriod: _ = 1,
|
|
511
|
+
maxLoanPeriod: p = 240,
|
|
512
512
|
headerTitleText: b = "Loan calculator",
|
|
513
513
|
footerTitleText: N = "Close",
|
|
514
514
|
loanAmountLabel: C = "Loan amount",
|
|
@@ -536,25 +536,26 @@ const Z = V.div`
|
|
|
536
536
|
{
|
|
537
537
|
ref: i,
|
|
538
538
|
header: /* @__PURE__ */ e(
|
|
539
|
-
|
|
539
|
+
le,
|
|
540
540
|
{
|
|
541
541
|
headerTitleText: b,
|
|
542
542
|
handleClick: A
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
545
|
footer: /* @__PURE__ */ e(
|
|
546
|
-
|
|
546
|
+
ne,
|
|
547
547
|
{
|
|
548
548
|
footerTitleText: N,
|
|
549
549
|
handleClick: A
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
552
|
showCloseButton: !1,
|
|
553
|
+
className: "loan-calculator__modal",
|
|
553
554
|
children: /* @__PURE__ */ e(
|
|
554
|
-
|
|
555
|
+
te,
|
|
555
556
|
{
|
|
556
|
-
defaultLoanAmount:
|
|
557
|
-
defaultInterestRate:
|
|
557
|
+
defaultLoanAmount: l,
|
|
558
|
+
defaultInterestRate: n,
|
|
558
559
|
defaultLoanPeriod: s,
|
|
559
560
|
monthlyPayment: v,
|
|
560
561
|
totalInterestPaid: y,
|
|
@@ -564,8 +565,8 @@ const Z = V.div`
|
|
|
564
565
|
maxLoanAmount: u,
|
|
565
566
|
minInterestRate: h,
|
|
566
567
|
maxInterestRate: g,
|
|
567
|
-
minLoanPeriod:
|
|
568
|
-
maxLoanPeriod:
|
|
568
|
+
minLoanPeriod: _,
|
|
569
|
+
maxLoanPeriod: p,
|
|
569
570
|
isFixedInterestRate: x,
|
|
570
571
|
loanAmountLabel: C,
|
|
571
572
|
loanAmountHint: w,
|
|
@@ -584,21 +585,21 @@ const Z = V.div`
|
|
|
584
585
|
}
|
|
585
586
|
);
|
|
586
587
|
}
|
|
587
|
-
),
|
|
588
|
+
), _e = I((l, n) => {
|
|
588
589
|
const {
|
|
589
590
|
loanCalculatorTitle: s,
|
|
590
591
|
loanCalculatorText: v,
|
|
591
592
|
loanCalculatorPlaceholder: y,
|
|
592
593
|
openCalculatorText: r,
|
|
593
|
-
onOpenCalculator: c = (
|
|
594
|
+
onOpenCalculator: c = (t) => {
|
|
594
595
|
},
|
|
595
596
|
defaultLoanAmount: d,
|
|
596
597
|
defaultInterestRate: u,
|
|
597
598
|
defaultLoanPeriod: h,
|
|
598
599
|
monthlyPayment: g,
|
|
599
600
|
totalInterestPaid: x,
|
|
600
|
-
currency:
|
|
601
|
-
loanPeriodUnit:
|
|
601
|
+
currency: _,
|
|
602
|
+
loanPeriodUnit: p,
|
|
602
603
|
minLoanAmount: b,
|
|
603
604
|
maxLoanAmount: N,
|
|
604
605
|
minInterestRate: C,
|
|
@@ -620,18 +621,18 @@ const Z = V.div`
|
|
|
620
621
|
summaryTotalPaymentHint: O,
|
|
621
622
|
handleSubmit: H,
|
|
622
623
|
handleCancel: j
|
|
623
|
-
} =
|
|
624
|
-
return /* @__PURE__ */
|
|
624
|
+
} = l, q = J();
|
|
625
|
+
return /* @__PURE__ */ a(G, { children: [
|
|
625
626
|
/* @__PURE__ */ e(
|
|
626
627
|
Q,
|
|
627
628
|
{
|
|
628
|
-
ref:
|
|
629
|
+
ref: n,
|
|
629
630
|
title: s,
|
|
630
631
|
text: v,
|
|
631
632
|
openCalculatorText: r,
|
|
632
|
-
onOpenCalculator: (
|
|
633
|
+
onOpenCalculator: (t) => {
|
|
633
634
|
var o;
|
|
634
|
-
(o = q == null ? void 0 : q.current) == null || o.open(), c(
|
|
635
|
+
(o = q == null ? void 0 : q.current) == null || o.open(), c(t);
|
|
635
636
|
},
|
|
636
637
|
placeholderText: y
|
|
637
638
|
}
|
|
@@ -645,8 +646,8 @@ const Z = V.div`
|
|
|
645
646
|
defaultLoanPeriod: h,
|
|
646
647
|
monthlyPayment: g,
|
|
647
648
|
totalInterestPaid: x,
|
|
648
|
-
currency:
|
|
649
|
-
loanPeriodUnit:
|
|
649
|
+
currency: _,
|
|
650
|
+
loanPeriodUnit: p,
|
|
650
651
|
minLoanAmount: b,
|
|
651
652
|
maxLoanAmount: N,
|
|
652
653
|
minInterestRate: C,
|
|
@@ -673,5 +674,5 @@ const Z = V.div`
|
|
|
673
674
|
] });
|
|
674
675
|
});
|
|
675
676
|
export {
|
|
676
|
-
|
|
677
|
+
_e as default
|
|
677
678
|
};
|