@lanaco/lnc-react-ui 4.0.79 → 4.0.81
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 +6 -6
- package/dist/BlogsSectionWithFilters.js +61 -65
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/LoanCalculatorSection.cjs +226 -1
- package/dist/LoanCalculatorSection.js +673 -23
- package/dist/{index-CcLiL4eM.js → index-D0Cl3mpJ.js} +2 -2
- package/dist/{index-BuKj-ITH.cjs → index-Dy-o153l.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("react"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-CtNoHdBj.cjs"),C=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./utils-BXPz9bck.cjs"),N=require("./style-C571ywKV.cjs"),q=require("./Button.cjs"),$=require("./Link.cjs"),T=require("./index-CAqPGuiA.cjs"),B=require("./index-ryadTWiS.cjs"),M=h.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,w=h.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
width: 100%;
|
|
12
12
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
margin-top: auto;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
@media (max-width: ${
|
|
45
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,k=h.styled.div`
|
|
48
48
|
display: flex;
|
|
49
49
|
flex-direction: column;
|
|
50
50
|
gap: 0.5rem;
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
color: var(--gray-700, #4e555f);
|
|
74
74
|
${a.truncateTextInRows(3)}
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,R=c.forwardRef((i,o)=>{const{title:n,imageUrl:l,text:r,buttonText:m,onCardClick:s}=i;return e.jsxs(w,{ref:o,className:"blog-card",onClick:s,children:[e.jsxs(k,{children:[e.jsx("div",{className:"text-wr-title",children:n}),e.jsx("div",{className:"text-wr",children:r}),e.jsx($,{color:"gray",onClick:s,children:m})]}),e.jsx(T.ProductImageWrapper,{src:l})]})}),W=c.forwardRef(({},i)=>e.jsxs(w,{className:"blog-card",children:[e.jsxs(k,{children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"text-wr"}),e.jsx("div",{className:"skeleton-action"})]}),e.jsx("div",{className:"skeleton-img"})]})),P=({limit:i=3,isLoading:o=!1,keyPrefix:n})=>e.jsx(e.Fragment,{children:Array.from({length:i},(l,r)=>e.jsx(W,{isLoading:o},`${n}-skeleton-product-card-${r}`))}),_=({children:i,fallbackComponent:o=e.jsx(e.Fragment,{}),isLoading:n=!1,limit:l,keyPrefix:r})=>e.jsx(c.Suspense,{fallbackComponent:o,children:n===!0?e.jsx(P,{isLoading:n,limit:l,keyPrefix:r}):i}),b=c.memo(R),z=c.forwardRef((i,o)=>{const{icon:n,title:l,items:r,buttonText:m,limit:s=3,options:d,onButtonAction:y=()=>{},buttonLink:p,onSelectOption:x=()=>{},isLoading:v=!1,onSelectCard:u=()=>{}}=i,j=C.useDetectMobile(),S=c.useMemo(()=>e.jsx(e.Fragment,{children:j===!0?r==null?void 0:r.map((t,g)=>e.jsx(b,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>u(t)},g)):r==null?void 0:r.slice(0,s).map((t,g)=>e.jsx(b,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>u(t)},g))}),[r,j,s,u]);return e.jsxs(N.TitleWithOptionsSectionWrapper,{ref:o,children:[e.jsxs("div",{className:"regular-title",children:[e.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(n)&&e.jsx("i",{className:n}),e.jsx("span",{children:l})]}),a.isDefinedNotEmptyString(p)&&e.jsx(q,{type:"button",btnType:"tinted",color:"gray",onClick:()=>y(p),borderRadius:"curved",children:m})]}),(d==null?void 0:d.length)>0&&e.jsx(B.SelectBar,{items:d,onRemove:t=>{x(t)},onSelect:t=>{x(t)},labelKey:"name",valueKey:"code",noMargin:!0}),e.jsx(M,{limit:s,children:e.jsx(_,{isLoading:v,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=z;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as l, jsx as t, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, Suspense as W, memo as x, useMemo as M } from "react";
|
|
3
3
|
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { m as
|
|
7
|
-
import { T as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { P as
|
|
11
|
-
import { S as
|
|
12
|
-
const
|
|
4
|
+
import { M as S } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as P } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as g, t as z, k as v } from "./utils-DCs-SbIv.js";
|
|
7
|
+
import { T as I } from "./style-CsMpu4iC.js";
|
|
8
|
+
import R from "./Button.js";
|
|
9
|
+
import j from "./Link.js";
|
|
10
|
+
import { P as A } from "./index-BLxkXrqU.js";
|
|
11
|
+
import { S as E } from "./index-DXmajb7F.js";
|
|
12
|
+
const F = f.div`
|
|
13
13
|
display: grid;
|
|
14
14
|
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
15
15
|
gap: 1.25rem;
|
|
16
16
|
|
|
17
|
-
@media (max-width: ${
|
|
17
|
+
@media (max-width: ${S + "px"}) {
|
|
18
18
|
grid-template-columns: repeat(1, 1fr);
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`, C = f.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
width: 100%;
|
|
23
23
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
@@ -46,16 +46,16 @@ const L = f.div`
|
|
|
46
46
|
min-height: 3.3125rem;
|
|
47
47
|
max-height: 3.3125rem;
|
|
48
48
|
border-radius: 0.75rem;
|
|
49
|
-
background-color: ${
|
|
49
|
+
background-color: ${g("-90deg")};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
& a {
|
|
53
53
|
margin-top: auto;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
@media (max-width: ${
|
|
56
|
+
@media (max-width: ${S + "px"}) {
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`, N = f.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
gap: 0.5rem;
|
|
@@ -69,118 +69,114 @@ const L = f.div`
|
|
|
69
69
|
& .skeleton-title {
|
|
70
70
|
height: 1.5rem;
|
|
71
71
|
width: 80%;
|
|
72
|
-
background-color: ${
|
|
72
|
+
background-color: ${g("-90deg")};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
& .skeleton-action {
|
|
76
76
|
height: 1.25rem;
|
|
77
77
|
width: 20%;
|
|
78
|
-
background-color: ${
|
|
78
|
+
background-color: ${g("-90deg")};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
& .text-wr {
|
|
82
82
|
font-weight: 400;
|
|
83
83
|
font-size: 0.875rem;
|
|
84
84
|
color: var(--gray-700, #4e555f);
|
|
85
|
-
${
|
|
85
|
+
${z(3)}
|
|
86
86
|
}
|
|
87
|
-
`,
|
|
88
|
-
const { title: o, imageUrl: m, text: r, buttonText: c, onCardClick:
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
87
|
+
`, L = u((i, a) => {
|
|
88
|
+
const { title: o, imageUrl: m, text: r, buttonText: c, onCardClick: n } = i;
|
|
89
|
+
return /* @__PURE__ */ l(C, { ref: a, className: "blog-card", onClick: n, children: [
|
|
90
|
+
/* @__PURE__ */ l(N, { children: [
|
|
91
91
|
/* @__PURE__ */ t("div", { className: "text-wr-title", children: o }),
|
|
92
92
|
/* @__PURE__ */ t("div", { className: "text-wr", children: r }),
|
|
93
|
-
/* @__PURE__ */ t(
|
|
93
|
+
/* @__PURE__ */ t(j, { color: "gray", onClick: n, children: c })
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */ t(
|
|
95
|
+
/* @__PURE__ */ t(A, { src: m })
|
|
96
96
|
] });
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */
|
|
97
|
+
}), O = u(({}, i) => /* @__PURE__ */ l(C, { className: "blog-card", children: [
|
|
98
|
+
/* @__PURE__ */ l(N, { children: [
|
|
99
99
|
/* @__PURE__ */ t("div", { className: "skeleton-title" }),
|
|
100
100
|
/* @__PURE__ */ t("div", { className: "text-wr" }),
|
|
101
101
|
/* @__PURE__ */ t("div", { className: "skeleton-action" })
|
|
102
102
|
] }),
|
|
103
103
|
/* @__PURE__ */ t("div", { className: "skeleton-img" })
|
|
104
|
-
] })),
|
|
105
|
-
|
|
104
|
+
] })), U = ({ limit: i = 3, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ t(h, { children: Array.from({ length: i }, (m, r) => /* @__PURE__ */ t(
|
|
105
|
+
O,
|
|
106
106
|
{
|
|
107
|
-
isLoading:
|
|
107
|
+
isLoading: a
|
|
108
108
|
},
|
|
109
109
|
`${o}-skeleton-product-card-${r}`
|
|
110
|
-
)) }),
|
|
110
|
+
)) }), _ = ({
|
|
111
111
|
children: i,
|
|
112
|
-
fallbackComponent:
|
|
112
|
+
fallbackComponent: a = /* @__PURE__ */ t(h, {}),
|
|
113
113
|
isLoading: o = !1,
|
|
114
114
|
limit: m,
|
|
115
115
|
keyPrefix: r
|
|
116
|
-
}) => /* @__PURE__ */ t(
|
|
117
|
-
|
|
116
|
+
}) => /* @__PURE__ */ t(W, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ t(
|
|
117
|
+
U,
|
|
118
118
|
{
|
|
119
119
|
isLoading: o,
|
|
120
120
|
limit: m,
|
|
121
121
|
keyPrefix: r
|
|
122
122
|
}
|
|
123
|
-
) : i }), y =
|
|
123
|
+
) : i }), y = x(L), ee = u((i, a) => {
|
|
124
124
|
const {
|
|
125
125
|
icon: o,
|
|
126
126
|
title: m,
|
|
127
127
|
items: r,
|
|
128
128
|
buttonText: c,
|
|
129
|
-
limit:
|
|
129
|
+
limit: n = 3,
|
|
130
130
|
options: d,
|
|
131
|
-
onButtonAction:
|
|
131
|
+
onButtonAction: T = () => {
|
|
132
132
|
},
|
|
133
133
|
buttonLink: b,
|
|
134
134
|
onSelectOption: k = () => {
|
|
135
135
|
},
|
|
136
|
-
isLoading:
|
|
136
|
+
isLoading: $ = !1,
|
|
137
137
|
onSelectCard: s = () => {
|
|
138
|
-
},
|
|
139
|
-
getImage: w = () => {
|
|
140
138
|
}
|
|
141
|
-
} = i,
|
|
139
|
+
} = i, w = P(), B = M(() => /* @__PURE__ */ t(h, { children: w === !0 ? r == null ? void 0 : r.map((e, p) => /* @__PURE__ */ t(
|
|
142
140
|
y,
|
|
143
141
|
{
|
|
144
142
|
title: e == null ? void 0 : e.title,
|
|
145
|
-
imageUrl:
|
|
146
|
-
text: e == null ? void 0 : e.
|
|
147
|
-
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
143
|
+
imageUrl: (e == null ? void 0 : e.image) || null,
|
|
144
|
+
text: e == null ? void 0 : e.text,
|
|
148
145
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
149
146
|
onCardClick: () => s(e)
|
|
150
147
|
},
|
|
151
|
-
|
|
152
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
148
|
+
p
|
|
149
|
+
)) : r == null ? void 0 : r.slice(0, n).map((e, p) => /* @__PURE__ */ t(
|
|
153
150
|
y,
|
|
154
151
|
{
|
|
155
152
|
title: e == null ? void 0 : e.title,
|
|
156
|
-
imageUrl:
|
|
157
|
-
text: e == null ? void 0 : e.
|
|
158
|
-
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
153
|
+
imageUrl: (e == null ? void 0 : e.image) || null,
|
|
154
|
+
text: e == null ? void 0 : e.text,
|
|
159
155
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
160
156
|
onCardClick: () => s(e)
|
|
161
157
|
},
|
|
162
|
-
|
|
163
|
-
)) }), [r,
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
158
|
+
p
|
|
159
|
+
)) }), [r, w, n, s]);
|
|
160
|
+
return /* @__PURE__ */ l(I, { ref: a, children: [
|
|
161
|
+
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
162
|
+
/* @__PURE__ */ l("div", { className: "regular-title-text", children: [
|
|
163
|
+
v(o) && /* @__PURE__ */ t("i", { className: o }),
|
|
168
164
|
/* @__PURE__ */ t("span", { children: m })
|
|
169
165
|
] }),
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
v(b) && /* @__PURE__ */ t(
|
|
167
|
+
R,
|
|
172
168
|
{
|
|
173
169
|
type: "button",
|
|
174
170
|
btnType: "tinted",
|
|
175
171
|
color: "gray",
|
|
176
|
-
onClick: () =>
|
|
172
|
+
onClick: () => T(b),
|
|
177
173
|
borderRadius: "curved",
|
|
178
174
|
children: c
|
|
179
175
|
}
|
|
180
176
|
)
|
|
181
177
|
] }),
|
|
182
178
|
(d == null ? void 0 : d.length) > 0 && /* @__PURE__ */ t(
|
|
183
|
-
|
|
179
|
+
E,
|
|
184
180
|
{
|
|
185
181
|
items: d,
|
|
186
182
|
onRemove: (e) => {
|
|
@@ -194,17 +190,17 @@ const L = f.div`
|
|
|
194
190
|
noMargin: !0
|
|
195
191
|
}
|
|
196
192
|
),
|
|
197
|
-
/* @__PURE__ */ t(
|
|
198
|
-
|
|
193
|
+
/* @__PURE__ */ t(F, { limit: n, children: /* @__PURE__ */ t(
|
|
194
|
+
_,
|
|
199
195
|
{
|
|
200
|
-
isLoading:
|
|
201
|
-
limit:
|
|
196
|
+
isLoading: $,
|
|
197
|
+
limit: n,
|
|
202
198
|
keyPrefix: "explore-landing",
|
|
203
|
-
children:
|
|
199
|
+
children: B
|
|
204
200
|
}
|
|
205
201
|
) })
|
|
206
202
|
] });
|
|
207
203
|
});
|
|
208
204
|
export {
|
|
209
|
-
|
|
205
|
+
ee as default
|
|
210
206
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),h=require("react"),C=require("./emotion-styled.browser.esm-BtEseadx.cjs"),T=require("./consts-CtNoHdBj.cjs"),f=require("./index-opywxmcY.cjs"),q=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),h=require("react"),C=require("./emotion-styled.browser.esm-BtEseadx.cjs"),T=require("./consts-CtNoHdBj.cjs"),f=require("./index-opywxmcY.cjs"),q=require("./index-Dy-o153l.cjs"),L=C.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: 2rem;
|
|
4
4
|
|
|
@@ -3,7 +3,7 @@ import { forwardRef as h } from "react";
|
|
|
3
3
|
import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as L } from "./consts-C1uHV4xc.js";
|
|
5
5
|
import { L as T } from "./index-5F6QsgOG.js";
|
|
6
|
-
import { L as F } from "./index-
|
|
6
|
+
import { L as F } from "./index-D0Cl3mpJ.js";
|
|
7
7
|
const M = C.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
gap: 2rem;
|
|
@@ -1 +1,226 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),W=require("./index-Dy-o153l.cjs"),D=require("./Modal.cjs"),V=require("./Button.cjs"),F=require("./TextInput.cjs"),K=require("./RangeSlider.cjs"),O=require("./emotion-styled.browser.esm-BtEseadx.cjs"),G=require("./IconButton.cjs"),J=O.styled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
align-self: stretch;
|
|
6
|
+
position: relative;
|
|
7
|
+
margin-bottom: 0.5rem;
|
|
8
|
+
margin-top: -0.5rem;
|
|
9
|
+
padding-bottom: 1rem;
|
|
10
|
+
|
|
11
|
+
&::after {
|
|
12
|
+
content: "";
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: -1.5rem;
|
|
15
|
+
right: -1.5rem;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
height: 0.0625rem;
|
|
18
|
+
background: var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& .header__title {
|
|
23
|
+
color: var(--gray-950, #14161a);
|
|
24
|
+
text-align: center;
|
|
25
|
+
font-size: 1rem;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
line-height: 1.5rem;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& .header__action {
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: 0;
|
|
35
|
+
}
|
|
36
|
+
`,Q=O.styled.div`
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: flex-end;
|
|
39
|
+
align-items: center;
|
|
40
|
+
align-self: stretch;
|
|
41
|
+
padding: 0.5rem;
|
|
42
|
+
border-top: 0.0625rem solid var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
43
|
+
|
|
44
|
+
& .footer__action {
|
|
45
|
+
color: var(--gray-950-beta, #14161a);
|
|
46
|
+
font-size: 0.875rem;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
line-height: 1.25rem;
|
|
50
|
+
letter-spacing: -0.0056rem;
|
|
51
|
+
}
|
|
52
|
+
`,X=O.styled.div`
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: flex-start;
|
|
55
|
+
gap: 2rem;
|
|
56
|
+
align-self: stretch;
|
|
57
|
+
padding-top: 0.5rem;
|
|
58
|
+
|
|
59
|
+
& .loan-calculator__right {
|
|
60
|
+
max-width: 22rem;
|
|
61
|
+
|
|
62
|
+
& .loan-calculator__summary {
|
|
63
|
+
display: flex;
|
|
64
|
+
padding: 1.25rem;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
align-items: flex-start;
|
|
67
|
+
gap: 1.25rem;
|
|
68
|
+
flex: 1 0 0;
|
|
69
|
+
border-radius: 0.75rem;
|
|
70
|
+
border: 0.0625rem solid var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
71
|
+
background: var(--neutral-95004, rgba(20, 22, 26, 0.04));
|
|
72
|
+
|
|
73
|
+
& .summary__hint {
|
|
74
|
+
color: var(--gray-600, #676e79);
|
|
75
|
+
font-size: 0.75rem;
|
|
76
|
+
font-style: normal;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
line-height: 1rem;
|
|
79
|
+
letter-spacing: 0.025rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
& .summary__separator {
|
|
83
|
+
height: 1px;
|
|
84
|
+
align-self: stretch;
|
|
85
|
+
background: var(--neutral-95008, rgba(20, 22, 26, 0.08));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
& .summary__down {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 0.5rem;
|
|
93
|
+
align-self: stretch;
|
|
94
|
+
|
|
95
|
+
& .summary__title-wrapper {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-between;
|
|
98
|
+
align-items: center;
|
|
99
|
+
align-self: stretch;
|
|
100
|
+
|
|
101
|
+
& .summary__title {
|
|
102
|
+
color: var(--gray-950, #14161a);
|
|
103
|
+
font-size: 0.875rem;
|
|
104
|
+
font-style: normal;
|
|
105
|
+
font-weight: 400;
|
|
106
|
+
line-height: 1.25rem;
|
|
107
|
+
letter-spacing: 0.0156rem;
|
|
108
|
+
|
|
109
|
+
&.strong {
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
letter-spacing: 0.0063rem;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
& .summary__up {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
align-items: flex-start;
|
|
121
|
+
gap: 8px;
|
|
122
|
+
align-self: stretch;
|
|
123
|
+
|
|
124
|
+
& .summary__title-wrapper {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
align-items: flex-start;
|
|
128
|
+
gap: 0.125rem;
|
|
129
|
+
|
|
130
|
+
& .summary__title {
|
|
131
|
+
color: var(--gray-950, #14161a);
|
|
132
|
+
font-size: 1rem;
|
|
133
|
+
font-style: normal;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
line-height: 1.5rem;
|
|
136
|
+
letter-spacing: 0.0063rem;
|
|
137
|
+
|
|
138
|
+
&.large {
|
|
139
|
+
font-size: 1.375rem;
|
|
140
|
+
font-style: normal;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
line-height: 1.75rem;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& .loan-calculator__left {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
align-items: flex-start;
|
|
154
|
+
gap: 2rem;
|
|
155
|
+
|
|
156
|
+
& .loan-calculator__submit {
|
|
157
|
+
width: 100%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
& .loan-calculator__range-inputs {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
align-items: flex-start;
|
|
164
|
+
gap: 1.5rem;
|
|
165
|
+
align-self: stretch;
|
|
166
|
+
|
|
167
|
+
& .loan-calculator__range-input {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
align-items: flex-start;
|
|
171
|
+
gap: 1rem;
|
|
172
|
+
align-self: stretch;
|
|
173
|
+
|
|
174
|
+
& .range-input__hint {
|
|
175
|
+
color: var(--gray-500, #868c98);
|
|
176
|
+
font-size: 0.75rem;
|
|
177
|
+
font-style: normal;
|
|
178
|
+
font-weight: 400;
|
|
179
|
+
line-height: 1rem;
|
|
180
|
+
letter-spacing: 0.025rem;
|
|
181
|
+
|
|
182
|
+
&.center {
|
|
183
|
+
display: flex;
|
|
184
|
+
justify-content: space-between;
|
|
185
|
+
align-items: center;
|
|
186
|
+
align-self: stretch;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
& .range-input__form-field {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
align-items: flex-start;
|
|
194
|
+
gap: 0.75rem;
|
|
195
|
+
align-self: stretch;
|
|
196
|
+
|
|
197
|
+
& .range-input__label-field {
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
align-self: stretch;
|
|
201
|
+
justify-content: space-between;
|
|
202
|
+
& .range-input__label {
|
|
203
|
+
color: var(--gray-950, #14161a);
|
|
204
|
+
font-size: 0.875rem;
|
|
205
|
+
font-style: normal;
|
|
206
|
+
font-weight: 500;
|
|
207
|
+
line-height: 1.25rem;
|
|
208
|
+
letter-spacing: -0.0056rem;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
& .range-input__text {
|
|
212
|
+
max-width: 100px;
|
|
213
|
+
width: 100%;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
& .range-input__ranger-wrapper {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
width: 100%;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
`,Y=i.forwardRef(({defaultLoanAmount:a=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:r="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(a),[l,P]=i.useState(n),[m,H]=i.useState(o),I=t=>{var s;A(+((s=t==null?void 0:t.target)==null?void 0:s.value))},k=t=>{var s;P(+((s=t==null?void 0:t.target)==null?void 0:s.value))},E=t=>{var s;H(+((s=t==null?void 0:t.target)==null?void 0:s.value))},B=()=>{S({loanAmount:f,interestRate:l,loanPeriod:m})};return e.jsxs(X,{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} (${r})`}),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} ${r}`}),e.jsx("div",{children:`${u} ${r}`})]})]}),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:l,onChange:k,className:"range-input__text"})]}),e.jsxs("div",{className:"range-input__ranger-wrapper",children:[e.jsx(K,{className:"range-input__ranger",defaultValue:l,value:l,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} ${r}`})]}),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} ${r}`})]}),e.jsx("div",{className:"summary__hint",children:M})]})]})})]})}),Z=i.forwardRef(({defaultLoanAmount:a=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:r="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:a,defaultInterestRate:n,defaultLoanPeriod:o,monthlyPayment:x,totalInterestPaid:y,currency:r,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:a="Loan calculator",handleClick:n=()=>{}},o)=>e.jsxs(J,{children:[e.jsx("div",{className:"header__title",children:a}),e.jsx(G,{icon:"times",borderRadius:"curved",btnType:"basic",color:"neutral",size:"small",className:"header__action",onClick:n})]})),ee=i.forwardRef(({footerTitleText:a="Close",handleClick:n=()=>{}},o)=>e.jsx(Q,{children:e.jsx(V,{text:a,btnType:"basic",color:"neutral",onClick:n,className:"footer__action"})})),te=i.forwardRef(({defaultLoanAmount:a=2e4,defaultInterestRate:n=5,defaultLoanPeriod:o=36,monthlyPayment:x=599,totalInterestPaid:y=21579,currency:r="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=()=>{}},l)=>{const P=()=>{var m;(m=l==null?void 0:l.current)==null||m.close(),A()};return e.jsx(D,{ref:l,header:e.jsx(U,{headerTitleText:j,handleClick:P}),footer:e.jsx(ee,{footerTitleText:b,handleClick:P}),showCloseButton:!1,children:e.jsx(Z,{defaultLoanAmount:a,defaultInterestRate:n,defaultLoanPeriod:o,monthlyPayment:x,totalInterestPaid:y,currency:r,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})})}),ae=i.forwardRef((a,n)=>{const{loanCalculatorTitle:o,loanCalculatorText:x,loanCalculatorPlaceholder:y,openCalculatorText:r,onOpenCalculator:c=t=>{},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:l,summaryMonthlyPaymentHint:P,summaryTotalPaymentText:m,summaryTotalPaymentHint:H,handleSubmit:I,handleCancel:k}=a,E=i.useRef(),B=t=>{var s;(s=E==null?void 0:E.current)==null||s.open(),c(t)};return e.jsxs(e.Fragment,{children:[e.jsx(W.LoanCalculator,{ref:n,title:o,text:x,openCalculatorText:r,onOpenCalculator:B,placeholderText:y}),e.jsx(te,{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:l,summaryMonthlyPaymentHint:P,summaryTotalPaymentText:m,summaryTotalPaymentHint:H,handleSubmit:I,handleCancel:k})]})});module.exports=ae;
|