@cuemath/leap 2.9.5-j5 → 2.9.5-j6
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/features/auth/comps/resend-otp/otp-timer/otp-timer.js +19 -22
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +12 -12
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +46 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +7 -7
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input-styled.js +61 -60
- package/dist/features/ui/inputs/base-input/base-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +38 -35
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input-styled.js +22 -20
- package/dist/features/ui/inputs/text-input/text-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +35 -32
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/theme/input.js +84 -11
- package/dist/features/ui/theme/input.js.map +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/index.js +339 -337
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,28 +1,25 @@
|
|
1
|
-
import {
|
2
|
-
import { memo as T, useState as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
const
|
6
|
-
const [r, i] =
|
7
|
-
return
|
1
|
+
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
2
|
+
import { memo as T, useState as d, useEffect as s } from "react";
|
3
|
+
import f from "../../../../ui/layout/flex-view.js";
|
4
|
+
import o from "../../../../ui/text/text.js";
|
5
|
+
const m = ({ onComplete: t, timerSeconds: e }) => {
|
6
|
+
const [r, i] = d(e);
|
7
|
+
return s(() => {
|
8
8
|
if (r <= 0) {
|
9
|
-
|
9
|
+
t == null || t();
|
10
10
|
return;
|
11
11
|
}
|
12
|
-
const
|
13
|
-
return () => clearTimeout(
|
14
|
-
}, [r,
|
15
|
-
i(
|
16
|
-
}, [
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
" "
|
23
|
-
] });
|
24
|
-
}, I = T($);
|
12
|
+
const n = setTimeout(() => i(r - 1), 1e3);
|
13
|
+
return () => clearTimeout(n);
|
14
|
+
}, [r, t]), s(() => {
|
15
|
+
i(e);
|
16
|
+
}, [e]), /* @__PURE__ */ u(f, { $width: 105, children: /* @__PURE__ */ c(o, { $renderAs: "ub2", $color: "WHITE_T_60", children: [
|
17
|
+
"Resend in",
|
18
|
+
" ",
|
19
|
+
/* @__PURE__ */ u(o, { $renderAs: "ub2-bold", $inline: !0, $color: "WHITE_T_60", children: `0:${r < 10 ? "0" : ""}${r}` })
|
20
|
+
] }) });
|
21
|
+
}, h = T(m);
|
25
22
|
export {
|
26
|
-
|
23
|
+
h as default
|
27
24
|
};
|
28
25
|
//# sourceMappingURL=otp-timer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"otp-timer.js","sources":["../../../../../../src/features/auth/comps/resend-otp/otp-timer/otp-timer.tsx"],"sourcesContent":["import type { IOTPTimerProps } from './otp-timer-types';\n\nimport { memo, useState, useEffect } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nconst OTPTimer = ({ onComplete, timerSeconds }: IOTPTimerProps) => {\n const [count, setCount] = useState(timerSeconds);\n\n useEffect(() => {\n if (count <= 0) {\n onComplete?.();\n\n return;\n }\n\n const timeoutId = setTimeout(() => setCount(count - 1), 1000);\n\n return () => clearTimeout(timeoutId);\n }, [count, onComplete]);\n\n useEffect(() => {\n setCount(timerSeconds);\n }, [timerSeconds]);\n\n return (\n <FlexView $
|
1
|
+
{"version":3,"file":"otp-timer.js","sources":["../../../../../../src/features/auth/comps/resend-otp/otp-timer/otp-timer.tsx"],"sourcesContent":["import type { IOTPTimerProps } from './otp-timer-types';\n\nimport { memo, useState, useEffect } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nconst OTPTimer = ({ onComplete, timerSeconds }: IOTPTimerProps) => {\n const [count, setCount] = useState(timerSeconds);\n\n useEffect(() => {\n if (count <= 0) {\n onComplete?.();\n\n return;\n }\n\n const timeoutId = setTimeout(() => setCount(count - 1), 1000);\n\n return () => clearTimeout(timeoutId);\n }, [count, onComplete]);\n\n useEffect(() => {\n setCount(timerSeconds);\n }, [timerSeconds]);\n\n return (\n <FlexView $width={105}>\n <Text $renderAs=\"ub2\" $color=\"WHITE_T_60\">\n Resend in{' '}\n <Text $renderAs=\"ub2-bold\" $inline $color=\"WHITE_T_60\">\n {`0:${count < 10 ? '0' : ''}${count}`}\n </Text>\n </Text>\n </FlexView>\n );\n};\n\nexport default memo(OTPTimer);\n"],"names":["OTPTimer","onComplete","timerSeconds","count","setCount","useState","useEffect","timeoutId","jsx","FlexView","Text","OtpTimer","memo"],"mappings":";;;;AAOA,MAAMA,IAAW,CAAC,EAAE,YAAAC,GAAY,cAAAC,QAAmC;AACjE,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAASH,CAAY;AAE/C,SAAAI,EAAU,MAAM;AACd,QAAIH,KAAS,GAAG;AACD,MAAAF,KAAA,QAAAA;AAEb;AAAA,IACF;AAEA,UAAMM,IAAY,WAAW,MAAMH,EAASD,IAAQ,CAAC,GAAG,GAAI;AAErD,WAAA,MAAM,aAAaI,CAAS;AAAA,EAAA,GAClC,CAACJ,GAAOF,CAAU,CAAC,GAEtBK,EAAU,MAAM;AACd,IAAAF,EAASF,CAAY;AAAA,EAAA,GACpB,CAACA,CAAY,CAAC,GAGf,gBAAAM,EAACC,KAAS,QAAQ,KAChB,4BAACC,GAAK,EAAA,WAAU,OAAM,QAAO,cAAa,UAAA;AAAA,IAAA;AAAA,IAC9B;AAAA,IACT,gBAAAF,EAAAE,GAAA,EAAK,WAAU,YAAW,SAAO,IAAC,QAAO,cACvC,UAAA,KAAKP,IAAQ,KAAK,MAAM,EAAE,GAAGA,CAAK,IACrC;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEeQ,IAAAC,EAAKZ,CAAQ;"}
|
@@ -1,27 +1,27 @@
|
|
1
1
|
import { jsx as l, jsxs as c, Fragment as h } from "react/jsx-runtime";
|
2
|
-
import { useState as C, useCallback as
|
2
|
+
import { useState as C, useCallback as o } from "react";
|
3
3
|
import i from "../../../ui/buttons/text-button/text-button.js";
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
4
|
+
import a from "../../../ui/layout/flex-view.js";
|
5
|
+
import u from "../../../ui/text/text.js";
|
6
|
+
import x from "./otp-timer/otp-timer.js";
|
7
7
|
const $ = ({
|
8
8
|
onResendOTP: e,
|
9
9
|
onResendVoiceOTP: r,
|
10
10
|
timerSeconds: m = 15,
|
11
11
|
showVoiceOTP: s = !1
|
12
12
|
}) => {
|
13
|
-
const [n, t] = C(!1), f =
|
13
|
+
const [n, t] = C(!1), f = o(() => {
|
14
14
|
t(!0);
|
15
|
-
}, []), p =
|
15
|
+
}, []), p = o(() => {
|
16
16
|
e == null || e(), t(!1);
|
17
|
-
}, [e]), d =
|
17
|
+
}, [e]), d = o(() => {
|
18
18
|
r == null || r(), t(!1);
|
19
19
|
}, [r]);
|
20
|
-
return /* @__PURE__ */ l(
|
20
|
+
return /* @__PURE__ */ l(a, { children: n ? /* @__PURE__ */ c(a, { $flexDirection: "row", $alignItems: "center", $flexColumnGapX: 0.5, children: [
|
21
21
|
/* @__PURE__ */ l(i, { label: "Resend", color: "WHITE_T_60", onClick: p }),
|
22
|
-
|
23
|
-
/* @__PURE__ */ l(
|
24
|
-
/* @__PURE__ */ l(
|
22
|
+
s && /* @__PURE__ */ c(h, { children: [
|
23
|
+
/* @__PURE__ */ l(u, { $renderAs: "ub2", $color: "WHITE_T_60", children: "or" }),
|
24
|
+
/* @__PURE__ */ l(a, { $width: 116, children: /* @__PURE__ */ l(
|
25
25
|
i,
|
26
26
|
{
|
27
27
|
label: "Get code via call",
|
@@ -30,7 +30,7 @@ const $ = ({
|
|
30
30
|
}
|
31
31
|
) })
|
32
32
|
] })
|
33
|
-
] }) : /* @__PURE__ */ l(
|
33
|
+
] }) : /* @__PURE__ */ l(x, { timerSeconds: m, onComplete: f }) });
|
34
34
|
}, H = $;
|
35
35
|
export {
|
36
36
|
H as default
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resend-otp.js","sources":["../../../../../src/features/auth/comps/resend-otp/resend-otp.tsx"],"sourcesContent":["import type { IOTPResendProps } from './resend-otp-types';\n\nimport { useState, useCallback } from 'react';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport OtpTimer from './otp-timer/otp-timer';\n\nconst ResendOTP: React.FC<IOTPResendProps> = ({\n onResendOTP,\n onResendVoiceOTP,\n timerSeconds = 15,\n showVoiceOTP = false,\n}) => {\n const [canResend, setCanResend] = useState(false);\n\n const handleTimerComplete = useCallback(() => {\n setCanResend(true);\n }, []);\n\n const handleResendClick = useCallback(() => {\n onResendOTP?.();\n setCanResend(false);\n }, [onResendOTP]);\n\n const handleVoiceResendClick = useCallback(() => {\n onResendVoiceOTP?.();\n setCanResend(false);\n }, [onResendVoiceOTP]);\n\n return (\n <FlexView>\n {!canResend ? (\n <OtpTimer timerSeconds={timerSeconds} onComplete={handleTimerComplete} />\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.5}>\n <TextButton label=\"Resend\" color=\"WHITE_T_60\" onClick={handleResendClick} />\n {
|
1
|
+
{"version":3,"file":"resend-otp.js","sources":["../../../../../src/features/auth/comps/resend-otp/resend-otp.tsx"],"sourcesContent":["import type { IOTPResendProps } from './resend-otp-types';\n\nimport { useState, useCallback } from 'react';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport OtpTimer from './otp-timer/otp-timer';\n\nconst ResendOTP: React.FC<IOTPResendProps> = ({\n onResendOTP,\n onResendVoiceOTP,\n timerSeconds = 15,\n showVoiceOTP = false,\n}) => {\n const [canResend, setCanResend] = useState(false);\n\n const handleTimerComplete = useCallback(() => {\n setCanResend(true);\n }, []);\n\n const handleResendClick = useCallback(() => {\n onResendOTP?.();\n setCanResend(false);\n }, [onResendOTP]);\n\n const handleVoiceResendClick = useCallback(() => {\n onResendVoiceOTP?.();\n setCanResend(false);\n }, [onResendVoiceOTP]);\n\n return (\n <FlexView>\n {!canResend ? (\n <OtpTimer timerSeconds={timerSeconds} onComplete={handleTimerComplete} />\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.5}>\n <TextButton label=\"Resend\" color=\"WHITE_T_60\" onClick={handleResendClick} />\n {showVoiceOTP && (\n <>\n <Text $renderAs=\"ub2\" $color=\"WHITE_T_60\">\n or\n </Text>\n <FlexView $width={116}>\n <TextButton\n label=\"Get code via call\"\n color=\"WHITE_T_60\"\n onClick={handleVoiceResendClick}\n />\n </FlexView>\n </>\n )}\n </FlexView>\n )}\n </FlexView>\n );\n};\n\nexport default ResendOTP;\n"],"names":["ResendOTP","onResendOTP","onResendVoiceOTP","timerSeconds","showVoiceOTP","canResend","setCanResend","useState","handleTimerComplete","useCallback","handleResendClick","handleVoiceResendClick","FlexView","jsx","TextButton","jsxs","Fragment","Text","OtpTimer","ResendOTP$1"],"mappings":";;;;;;AASA,MAAMA,IAAuC,CAAC;AAAA,EAC5C,aAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,cAAAC,IAAe;AACjB,MAAM;AACJ,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAE1CC,IAAsBC,EAAY,MAAM;AAC5C,IAAAH,EAAa,EAAI;AAAA,EACnB,GAAG,CAAE,CAAA,GAECI,IAAoBD,EAAY,MAAM;AAC5B,IAAAR,KAAA,QAAAA,KACdK,EAAa,EAAK;AAAA,EAAA,GACjB,CAACL,CAAW,CAAC,GAEVU,IAAyBF,EAAY,MAAM;AAC5B,IAAAP,KAAA,QAAAA,KACnBI,EAAa,EAAK;AAAA,EAAA,GACjB,CAACJ,CAAgB,CAAC;AAErB,2BACGU,GACE,EAAA,UAACP,sBAGCO,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,iBAAiB,KACnE,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAW,OAAM,UAAS,OAAM,cAAa,SAASJ,GAAmB;AAAA,IACzEN,KAEG,gBAAAW,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAK,EAAA,WAAU,OAAM,QAAO,cAAa,UAE1C,MAAA;AAAA,MACA,gBAAAJ,EAACD,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,OAAM;AAAA,UACN,SAASH;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,IAAA,GACF;AAAA,EAAA,EAEJ,CAAA,IAlBA,gBAAAE,EAACK,KAAS,cAAAf,GAA4B,YAAYK,EAAqB,CAAA,EAoB3E,CAAA;AAEJ,GAEAW,IAAenB;"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { LOTTIE as i } from "../../../../assets/lottie/lottie.js";
|
3
|
+
import e from "../../../ui/buttons/button/button.js";
|
4
|
+
import c from "../../../ui/layout/flex-view.js";
|
5
|
+
import l from "../../../ui/separator/separator.js";
|
6
|
+
import m from "../../signup/circular-step-wrapper/circular-step-wrapper.js";
|
7
|
+
const s = ({
|
8
|
+
provider: t,
|
9
|
+
onRetryLogin: r,
|
10
|
+
onGoToSignup: n
|
11
|
+
}) => /* @__PURE__ */ o(
|
12
|
+
m,
|
13
|
+
{
|
14
|
+
label: `Your ${t === "google" ? "Google" : "Apple"} account is not linked with any cuemath account.`,
|
15
|
+
animation: i.KEY,
|
16
|
+
introFrames: [0, 23],
|
17
|
+
outroFrames: [23, 40],
|
18
|
+
children: /* @__PURE__ */ a(c, { $alignItems: "center", $justifyContent: "center", children: [
|
19
|
+
/* @__PURE__ */ o(
|
20
|
+
e,
|
21
|
+
{
|
22
|
+
size: "small",
|
23
|
+
renderAs: "secondary",
|
24
|
+
label: "Create a new account",
|
25
|
+
width: 232,
|
26
|
+
onClick: n
|
27
|
+
}
|
28
|
+
),
|
29
|
+
/* @__PURE__ */ o(l, { heightX: 1 }),
|
30
|
+
/* @__PURE__ */ o(
|
31
|
+
e,
|
32
|
+
{
|
33
|
+
size: "small",
|
34
|
+
renderAs: "secondary",
|
35
|
+
label: "Try another Login method",
|
36
|
+
width: 232,
|
37
|
+
onClick: r
|
38
|
+
}
|
39
|
+
)
|
40
|
+
] })
|
41
|
+
}
|
42
|
+
), w = s;
|
43
|
+
export {
|
44
|
+
w as default
|
45
|
+
};
|
46
|
+
//# sourceMappingURL=social-account-not-found.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"social-account-not-found.js","sources":["../../../../../src/features/auth/login/social-account-not-found/social-account-not-found.tsx"],"sourcesContent":["import type { ISocialAccountNotFoundProps } from './social-account-not-found-types';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport CircularStepWrapper from '../../signup/circular-step-wrapper/circular-step-wrapper';\n\nconst SocialAccountNotFound = ({\n provider,\n onRetryLogin,\n onGoToSignup,\n}: ISocialAccountNotFoundProps) => {\n return (\n <CircularStepWrapper\n label={`Your ${\n provider === 'google' ? 'Google' : 'Apple'\n } account is not linked with any cuemath account.`}\n animation={LOTTIE.KEY}\n introFrames={[0, 23]}\n outroFrames={[23, 40]}\n >\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <Button\n size=\"small\"\n renderAs=\"secondary\"\n label=\"Create a new account\"\n width={232}\n onClick={onGoToSignup}\n />\n <Separator heightX={1} />\n <Button\n size=\"small\"\n renderAs=\"secondary\"\n label=\"Try another Login method\"\n width={232}\n onClick={onRetryLogin}\n />\n </FlexView>\n </CircularStepWrapper>\n );\n};\n\nexport default SocialAccountNotFound;\n"],"names":["SocialAccountNotFound","provider","onRetryLogin","onGoToSignup","jsx","CircularStepWrapper","LOTTIE","jsxs","FlexView","Button","Separator","SocialAccountNotFound$1"],"mappings":";;;;;;AAQA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AACF,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,OAAO,QACLJ,MAAa,WAAW,WAAW,OACrC;AAAA,IACA,WAAWK,EAAO;AAAA,IAClB,aAAa,CAAC,GAAG,EAAE;AAAA,IACnB,aAAa,CAAC,IAAI,EAAE;AAAA,IAEpB,UAAC,gBAAAC,EAAAC,GAAA,EAAS,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAO;AAAA,UACP,SAASN;AAAA,QAAA;AAAA,MACX;AAAA,MACA,gBAAAC,EAACM,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,MACvB,gBAAAN;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAO;AAAA,UACP,SAASP;AAAA,QAAA;AAAA,MACX;AAAA,IAAA,GACF;AAAA,EAAA;AAAA,GAKNS,IAAeX;"}
|
@@ -7,15 +7,15 @@ import j from "../../../ui/layout/flex-view.js";
|
|
7
7
|
import N from "../../../ui/lottie-animation/lottie-animation.js";
|
8
8
|
import T from "../../../ui/separator/separator.js";
|
9
9
|
import z from "../../../ui/text/text.js";
|
10
|
-
import { Container as F, CircularStepContainer as M, ContentWrapper as O, InputContainer as P, PrevButtonWrapper as V, NextButtonWrapper as
|
11
|
-
const
|
10
|
+
import { Container as F, CircularStepContainer as M, ContentWrapper as O, InputContainer as P, PrevButtonWrapper as V, NextButtonWrapper as X } from "./circular-step-wrapper-styled.js";
|
11
|
+
const D = {
|
12
12
|
autoplay: !1,
|
13
13
|
loop: !1,
|
14
14
|
renderer: "svg",
|
15
15
|
rendererSettings: {
|
16
16
|
preserveAspectRatio: "xMidYMin slice"
|
17
17
|
}
|
18
|
-
},
|
18
|
+
}, K = v(
|
19
19
|
({
|
20
20
|
children: g,
|
21
21
|
onGoBack: C,
|
@@ -61,7 +61,7 @@ const K = {
|
|
61
61
|
src: r,
|
62
62
|
ref: t,
|
63
63
|
onRender: R,
|
64
|
-
settings:
|
64
|
+
settings: D
|
65
65
|
}
|
66
66
|
),
|
67
67
|
/* @__PURE__ */ e(
|
@@ -73,7 +73,7 @@ const K = {
|
|
73
73
|
$alignItems: "center",
|
74
74
|
$justifyContent: "center",
|
75
75
|
children: /* @__PURE__ */ o(O, { $isVisible: L, children: [
|
76
|
-
i ? /* @__PURE__ */ o(j, { children: [
|
76
|
+
i ? /* @__PURE__ */ o(j, { $gutterX: 4, children: [
|
77
77
|
/* @__PURE__ */ e(z, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: i }),
|
78
78
|
/* @__PURE__ */ e(T, { heightX: 1 })
|
79
79
|
] }) : null,
|
@@ -92,7 +92,7 @@ const K = {
|
|
92
92
|
size: "regular"
|
93
93
|
}
|
94
94
|
) }),
|
95
|
-
y && /* @__PURE__ */ e(
|
95
|
+
y && /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
96
96
|
h,
|
97
97
|
{
|
98
98
|
size: "regular",
|
@@ -107,7 +107,7 @@ const K = {
|
|
107
107
|
}
|
108
108
|
);
|
109
109
|
}
|
110
|
-
), re =
|
110
|
+
), re = K;
|
111
111
|
export {
|
112
112
|
re as default
|
113
113
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'svg',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setTimeout(() => setShowContent(true), 500);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n setShowContent(false);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.ContentWrapper $isVisible={showContent}>\n {label ? (\n <FlexView>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n ) : null}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"regular\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"regular\"\n Icon={Next2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default CircularStepWrapper;\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","onLottieRender","useCallback","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","CircularStepWrapper$1"],"mappings":";;;;;;;;;;AAsBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAeD,EAAuB,IAAI,GAC1C,CAACE,GAAiBC,CAAkB,IAAIC,EAA6B,GACrE,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAK,GAE9CG,IAAiBC,EAAY,MAAM;AACnC,MAAAd,KAAaK,EAAa,YACfA,EAAA,QAAQ,aAAaJ,GAAa,EAAI,GACnD,WAAW,MAAMW,EAAe,EAAI,GAAG,GAAG;AAAA,IAC5C,GAEC,CAACZ,CAAS,CAAC;AAEd,WAAAe,EAAoBX,GAAK,OAAO;AAAA,MAC9B,qBAAqB,YACZ,IAAI,QAAc,CAAWY,MAAA;;AAClC,cAAMC,IAAiB,MAAM;;AACnB,UAAAD,MACKE,IAAAb,EAAA,YAAA,QAAAa,EAAS,oBAAoB,YAAYD;AAAA,QAAc;AAGzD,SAAAC,IAAAb,EAAA,YAAA,QAAAa,EAAS,aAAahB,GAAa,KAChDU,EAAe,EAAK,IACPO,IAAAd,EAAA,YAAA,QAAAc,EAAS,iBAAiB,YAAYF;AAAA,MAAc,CAClE;AAAA,IAEH,EAAA,GAEFG,EAAgB,MAAM;AACpB,MAAIb,EAAa,WACIE,EAAAF,EAAa,QAAQ,YAAY;AAAA,IAExD,GAAG,CAAE,CAAA,GAGH,gBAAAc;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,KAAKf;AAAA,QAEJ,UAAA;AAAA,UACCC,KAAA,gBAAAe;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,OAAO;AAAA,cACP,QAAQhB;AAAA,cACR,KAAKR;AAAA,cACL,KAAKK;AAAA,cACL,UAAUQ;AAAA,cACV,UAAUtB;AAAA,YAAA;AAAA,UACZ;AAAA,UAEF,gBAAAgC;AAAA,YAACE;AAAAA,YAAA;AAAA,cACC,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,aAAY;AAAA,cACZ,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAEhB,UAAC,gBAAAJ,EAAAK,GAAA,EAAsB,YAAYf,GAChC,UAAA;AAAA,
|
1
|
+
{"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'svg',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setTimeout(() => setShowContent(true), 500);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n setShowContent(false);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.ContentWrapper $isVisible={showContent}>\n {label ? (\n <FlexView $gutterX={4}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n ) : null}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"regular\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"regular\"\n Icon={Next2Icon}\n renderAs=\"secondary\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default CircularStepWrapper;\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","onLottieRender","useCallback","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","CircularStepWrapper$1"],"mappings":";;;;;;;;;;AAsBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAA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A,cACL,UAAUQ;AAAA,cACV,UAAUtB;AAAA,YAAA;AAAA,UACZ;AAAA,UAEF,gBAAAgC;AAAA,YAACE;AAAAA,YAAA;AAAA,cACC,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,aAAY;AAAA,cACZ,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAEhB,UAAC,gBAAAJ,EAAAK,GAAA,EAAsB,YAAYf,GAChC,UAAA;AAAA,gBACCd,IAAA,gBAAAwB,EAACM,GAAS,EAAA,UAAU,GAClB,UAAA;AAAA,kBAAA,gBAAAJ,EAACK,KAAK,WAAU,OAAM,QAAO,SAAQ,QAAO,UACzC,UACH/B,EAAA,CAAA;AAAA,kBACA,gBAAA0B,EAACM,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,gBAAA,EAAA,CACzB,IACE;AAAA,gBACH,gBAAAN,EAAAO,GAAA,EAAuB,UAAApC,GAAS;AAAA,cAAA,GACnC;AAAA,YAAA;AAAA,UACF;AAAA,UACCK,KACC,gBAAAwB,EAACQ,GAAA,EACC,UAAA,gBAAAR;AAAA,YAACS;AAAA,YAAA;AAAA,cACC,MAAMC;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAAStC;AAAA,cACT,UAAUQ;AAAA,cACV,MAAK;AAAA,YAAA;AAAA,UAAA,GAET;AAAA,UAEDL,KACC,gBAAAyB,EAACW,GAAA,EACC,UAAA,gBAAAX;AAAA,YAACS;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASvC;AAAA,cACT,MAAMO;AAAA,YAAA;AAAA,UAAA,GAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEAiC,KAAe5C;"}
|
@@ -1,114 +1,115 @@
|
|
1
|
-
import
|
1
|
+
import u from "styled-components";
|
2
2
|
import C from "../../text/text.js";
|
3
|
-
const
|
4
|
-
({ theme:
|
5
|
-
const { height:
|
3
|
+
const W = u.div(
|
4
|
+
({ theme: n, $size: a, $willShowMessage: i, $width: t, $widthX: r }) => {
|
5
|
+
const { height: s, marginTop: c, marginBottom: e } = n.input.sizes[a], o = s + c + (i ? e : 0);
|
6
6
|
return `
|
7
|
-
width: ${
|
8
|
-
${
|
9
|
-
height: ${
|
7
|
+
width: ${t || "auto"}${typeof t == "number" ? "px" : ""};
|
8
|
+
${r ? `width: ${r * n.layout.gutter}px;` : ""}
|
9
|
+
height: ${o}px;
|
10
10
|
`;
|
11
11
|
}
|
12
|
-
),
|
13
|
-
({ theme:
|
14
|
-
const { colors:
|
12
|
+
), f = u.div(
|
13
|
+
({ theme: n, $size: a, $renderAs: i, $disabled: t, $shape: r, $isTransparent: s, $colorTheme: c }) => {
|
14
|
+
const { colors: e, input: o } = n, { height: l, marginTop: m, paddingLeft: h, paddingRight: $, borderRadius: k } = o.sizes[a], { borderColorName: d, backgroundColorName: b } = c === "dark" ? o.darkVariants[i] : o.variants[i], p = r === "borderLess", g = r === "curved", v = p ? 0 : k, x = s ? "transparent" : e[b ?? "WHITE"];
|
15
15
|
return `
|
16
16
|
position: relative;
|
17
17
|
display: flex;
|
18
|
-
height: ${
|
19
|
-
margin-top: ${
|
20
|
-
padding-left: ${p ? 0 :
|
21
|
-
padding-right: ${p ? 0 :
|
22
|
-
padding-top: ${
|
23
|
-
padding-bottom: ${
|
18
|
+
height: ${l}px;
|
19
|
+
margin-top: ${m}px;
|
20
|
+
padding-left: ${p ? 0 : h}px;
|
21
|
+
padding-right: ${p ? 0 : $}px;
|
22
|
+
padding-top: ${g ? 1 : 0}px;
|
23
|
+
padding-bottom: ${g ? 1 : 0}px;
|
24
24
|
${p ? `
|
25
25
|
border: none;
|
26
|
-
border-bottom: 1px solid ${
|
27
|
-
` : `border: 1px solid ${
|
28
|
-
border-radius: ${
|
26
|
+
border-bottom: 1px solid ${e[d[t ? "disabled" : "inactive"]]};
|
27
|
+
` : `border: 1px solid ${e[d[t ? "disabled" : g ? "active" : "inactive"]]};`}
|
28
|
+
border-radius: ${g ? 40 : v}px;
|
29
29
|
transition: border-color 0.2s ease-in-out;
|
30
30
|
|
31
|
-
background: ${
|
31
|
+
background: ${x};
|
32
32
|
|
33
33
|
&:focus-within {
|
34
|
-
border-color: ${
|
34
|
+
border-color: ${e[d.active]};
|
35
35
|
}
|
36
36
|
|
37
37
|
&:hover {
|
38
|
-
${
|
38
|
+
${t ? "" : `border-color: ${e[d.active]};`}
|
39
39
|
}
|
40
40
|
`;
|
41
41
|
}
|
42
|
-
),
|
42
|
+
), B = u.div`
|
43
43
|
flex-grow: 1;
|
44
|
-
`,
|
45
|
-
({ theme:
|
46
|
-
const { colors:
|
44
|
+
`, R = u.div(
|
45
|
+
({ theme: n, $inputRenderAs: a, $disabled: i, $size: t, $siblingPosition: r }) => {
|
46
|
+
const { colors: s, input: c } = n, { iconPadding: e } = c.sizes[t], { labelColorName: o } = c.variants[a];
|
47
47
|
return `
|
48
|
-
order: ${
|
49
|
-
padding-${
|
48
|
+
order: ${r === "left" ? -1 : 1};
|
49
|
+
padding-${r === "left" ? "right" : "left"}: ${e}px;
|
50
50
|
align-self: center;
|
51
|
-
color: ${
|
51
|
+
color: ${s[o[i ? "disabled" : "inactive"]]};
|
52
52
|
|
53
|
-
${
|
54
|
-
color: ${
|
53
|
+
${f}:focus-within & {
|
54
|
+
color: ${s[o.active]};
|
55
55
|
}
|
56
56
|
|
57
|
-
${
|
58
|
-
${
|
57
|
+
${f}:hover & {
|
58
|
+
${i ? "" : `color: ${s[o.active]};`}
|
59
59
|
}
|
60
60
|
`;
|
61
61
|
}
|
62
|
-
), y =
|
63
|
-
theme:
|
64
|
-
$size:
|
65
|
-
$inputRenderAs:
|
66
|
-
$stickyLabel:
|
67
|
-
$disabled:
|
68
|
-
$shape:
|
69
|
-
$isTransparent:
|
62
|
+
), y = u(C)(({
|
63
|
+
theme: n,
|
64
|
+
$size: a,
|
65
|
+
$inputRenderAs: i,
|
66
|
+
$stickyLabel: t,
|
67
|
+
$disabled: r,
|
68
|
+
$shape: s,
|
69
|
+
$isTransparent: c,
|
70
|
+
$colorTheme: e
|
70
71
|
}) => {
|
71
|
-
const { colors:
|
72
|
+
const { colors: o, input: l, text: m, layout: h } = n, { gutter: $ } = h, { height: k, paddingLeft: d } = l.sizes[a], { lineHeight: b } = m[l.sizes[a].labelTextVariant], { labelColorName: p, labelBackgroundColorName: g } = e === "dark" ? l.darkVariants[i] : l.variants[i], v = k / 2 - b / 2 - 1, x = -v - b / 2 - 1, E = s === "borderLess", L = c ? "transparent" : o[g ?? "WHITE"];
|
72
73
|
return `
|
73
74
|
position: absolute;
|
74
|
-
top: ${
|
75
|
-
left: ${(
|
76
|
-
padding: 0 ${
|
75
|
+
top: ${v}px;
|
76
|
+
left: ${(E ? 0 : d) - $ * 0.375}px;
|
77
|
+
padding: 0 ${$ * 0.375}px;
|
77
78
|
background-color: ${L};
|
78
|
-
color: ${
|
79
|
+
color: ${o[p[r ? "disabled" : "inactive"]]};
|
79
80
|
pointer-events: none;
|
80
81
|
transform-origin: left;
|
81
|
-
transform: translateY(${
|
82
|
+
transform: translateY(${t ? x : 0}px) scale(${t ? 0.75 : 1});
|
82
83
|
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
|
83
84
|
|
84
|
-
${
|
85
|
-
color: ${
|
86
|
-
transform: translateY(${
|
85
|
+
${f}:focus-within & {
|
86
|
+
color: ${o[p.active]};
|
87
|
+
transform: translateY(${x}px) scale(0.75);
|
87
88
|
}
|
88
89
|
|
89
|
-
${
|
90
|
-
${
|
90
|
+
${f}:hover & {
|
91
|
+
${r ? "" : `color: ${o[p.active]};`}
|
91
92
|
}
|
92
93
|
|
93
94
|
& span {
|
94
|
-
color: ${
|
95
|
+
color: ${o.RED};
|
95
96
|
margin-left: 2px;
|
96
97
|
}
|
97
98
|
`;
|
98
|
-
}), z =
|
99
|
-
({ theme: { colors:
|
99
|
+
}), z = u(C)(
|
100
|
+
({ theme: { colors: n }, $colorTheme: a }) => `
|
100
101
|
position: absolute;
|
101
102
|
bottom: -2px;
|
102
103
|
transform: translateY(calc(100%));
|
103
|
-
color: ${
|
104
|
+
color: ${n[a === "dark" ? "ORANGE_4" : "RED"]};
|
104
105
|
`
|
105
106
|
);
|
106
107
|
export {
|
107
|
-
|
108
|
+
W as Container,
|
108
109
|
z as Error,
|
109
|
-
|
110
|
+
B as InputWrapper,
|
110
111
|
y as Label,
|
111
|
-
|
112
|
-
|
112
|
+
R as SiblingWrapper,
|
113
|
+
f as Wrapper
|
113
114
|
};
|
114
115
|
//# sourceMappingURL=base-input-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-input-styled.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input-styled.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IContainerProps {\n $width?: string | number;\n $widthX?: number;\n $size: IBaseInputProps['size'];\n $willShowMessage: IBaseInputProps['willShowMessage'];\n}\n\nconst Container = styled.div<IContainerProps>(\n ({ theme, $size, $willShowMessage, $width, $widthX }) => {\n const { height, marginTop, marginBottom } = theme.input.sizes[$size];\n const containerHeight = height + marginTop + ($willShowMessage ? marginBottom : 0);\n\n return `\n width: ${$width ? $width : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * theme.layout.gutter}px;` : ''}\n height: ${containerHeight}px;\n `;\n },\n);\n\ninterface IWrapperProps {\n $size: IBaseInputProps['size'];\n $disabled?: boolean;\n $renderAs: IBaseInputProps['renderAs'];\n $shape?: IBaseInputProps['shape'];\n $isTransparent?: boolean;\n}\n\nconst Wrapper = styled.div<IWrapperProps>(\n ({ theme, $size, $renderAs, $disabled, $shape, $isTransparent }) => {\n const { colors, input } = theme;\n const { height, marginTop, paddingLeft, paddingRight, borderRadius } = input.sizes[$size];\n const { borderColorName, backgroundColorName } = input.variants[$renderAs];\n\n const isBorderLessShape = $shape === 'borderLess';\n const isCurvedShape = $shape === 'curved';\n const defaultBorderRadius = isBorderLessShape ? 0 : borderRadius;\n\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n display: flex;\n height: ${height}px;\n margin-top: ${marginTop}px;\n padding-left: ${isBorderLessShape ? 0 : paddingLeft}px;\n padding-right: ${isBorderLessShape ? 0 : paddingRight}px;\n padding-top: ${isCurvedShape ? 1 : 0}px;\n padding-bottom: ${isCurvedShape ? 1 : 0}px;\n ${\n isBorderLessShape\n ? `\n border: none;\n border-bottom: 1px solid ${colors[borderColorName[$disabled ? 'disabled' : 'inactive']]};\n `\n : `border: 1px solid ${\n colors[borderColorName[$disabled ? 'disabled' : isCurvedShape ? 'active' : 'inactive']]\n };`\n }\n border-radius: ${isCurvedShape ? 40 : defaultBorderRadius}px;\n transition: border-color 0.2s ease-in-out;\n \n background: ${background};\n \n &:focus-within {\n border-color: ${colors[borderColorName.active]};\n }\n \n &:hover {\n ${!$disabled ? `border-color: ${colors[borderColorName.active]};` : ''}\n }\n `;\n },\n);\n\nconst InputWrapper = styled.div`\n flex-grow: 1;\n`;\n\ninterface ISiblingWrapperProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $siblingPosition: NonNullable<IBaseInputProps['siblingPosition']>;\n $disabled?: boolean;\n}\n\nconst SiblingWrapper = styled.div<ISiblingWrapperProps>(\n ({ theme, $inputRenderAs, $disabled, $size, $siblingPosition }) => {\n const { colors, input } = theme;\n const { iconPadding } = input.sizes[$size];\n const { labelColorName } = input.variants[$inputRenderAs];\n\n return `\n order: ${$siblingPosition === 'left' ? -1 : 1};\n padding-${$siblingPosition === 'left' ? 'right' : 'left'}: ${iconPadding}px;\n align-self: center;\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n `;\n },\n);\n\ninterface ILabelProps {\n $size: IBaseInputProps['size'];\n $inputRenderAs: IBaseInputProps['renderAs'];\n $stickyLabel: IBaseInputProps['stickyLabel'];\n $disabled?: boolean;\n $shape?: IBaseInputProps['shape'];\n $isTransparent: IBaseInputProps['isTransparent'];\n}\n\nconst Label = styled(Text)<ILabelProps>(({\n theme,\n $size,\n $inputRenderAs,\n $stickyLabel,\n $disabled,\n $shape,\n $isTransparent,\n}) => {\n const { colors, input, text, layout } = theme;\n const { gutter } = layout;\n const { height, paddingLeft } = input.sizes[$size];\n const { lineHeight } = text[input.sizes[$size].labelTextVariant];\n const { labelColorName } = input.variants[$inputRenderAs];\n const topPosition = height / 2 - lineHeight / 2 - 1;\n const topPositionWhenActive = -topPosition - lineHeight / 2 - 1;\n\n const isBorderLessShape = $shape === 'borderLess';\n\n const backgroundColor = $isTransparent ? 'transparent' : colors.WHITE;\n\n return `\n position: absolute;\n top: ${topPosition}px;\n left: ${(isBorderLessShape ? 0 : paddingLeft) - gutter * 0.375}px;\n padding: 0 ${gutter * 0.375}px;\n background-color: ${backgroundColor};\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n pointer-events: none;\n transform-origin: left;\n transform: translateY(${$stickyLabel ? topPositionWhenActive : 0}px) scale(${\n $stickyLabel ? 0.75 : 1\n });\n transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n transform: translateY(${topPositionWhenActive}px) scale(0.75);\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n\n & span {\n color: ${colors.RED};\n margin-left: 2px;\n }\n `;\n});\n\nconst Error = styled(Text)(\n ({ theme: { colors } }) => `\nposition: absolute;\nbottom: -2px;\ntransform: translateY(calc(100%));\ncolor: ${colors.RED};\n`,\n);\n\nexport { Container, Wrapper, InputWrapper, SiblingWrapper, Label, Error };\n"],"names":["Container","styled","theme","$size","$willShowMessage","$width","$widthX","height","marginTop","marginBottom","containerHeight","Wrapper","$renderAs","$disabled","$shape","$isTransparent","colors","input","paddingLeft","paddingRight","borderRadius","borderColorName","backgroundColorName","isBorderLessShape","isCurvedShape","defaultBorderRadius","background","InputWrapper","SiblingWrapper","$inputRenderAs","$siblingPosition","iconPadding","labelColorName","Label","Text","$stickyLabel","text","layout","gutter","lineHeight","topPosition","topPositionWhenActive","backgroundColor","Error"],"mappings":";;AAaA,MAAMA,IAAYC,EAAO;AAAA,EACvB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,QAAAC,GAAQ,SAAAC,QAAc;AACjD,UAAA,EAAE,QAAAC,GAAQ,WAAAC,GAAW,cAAAC,EAAA,IAAiBP,EAAM,MAAM,MAAMC,CAAK,GAC7DO,IAAkBH,IAASC,KAAaJ,IAAmBK,IAAe;AAEzE,WAAA;AAAA,eACIJ,KAAkB,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QACxEC,IAAU,UAAUA,IAAUJ,EAAM,OAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDQ,CAAe;AAAA;AAAA,EAE7B;AACF,GAUMC,IAAUV,EAAO;AAAA,EACrB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAS,GAAW,WAAAC,GAAW,QAAAC,GAAQ,gBAAAC,QAAqB;AAC5D,UAAA,EAAE,QAAAC,GAAQ,OAAAC,EAAU,IAAAf,GACpB,EAAE,QAAAK,GAAQ,WAAAC,GAAW,aAAAU,GAAa,cAAAC,GAAc,cAAAC,EAAa,IAAIH,EAAM,MAAMd,CAAK,GAClF,EAAE,iBAAAkB,GAAiB,qBAAAC,EAAA,IAAwBL,EAAM,SAASL,CAAS,GAEnEW,IAAoBT,MAAW,cAC/BU,IAAgBV,MAAW,UAC3BW,IAAsBF,IAAoB,IAAIH,GAE9CM,IAAaX,IAAiB,gBAAgBC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O,GAAG;AAAA;AAAA;AAAA;AAIzB,CAAC,GAEK2B,IAAQ1C,EAAOiC,CAAI;AAAA,EACvB,CAAC,EAAE,OAAO,EAAE,QAAAlB,EAAA,EAAe,MAAA;AAAA;AAAA;AAAA;AAAA,SAIpBA,EAAO,GAAG;AAAA;AAEnB;"}
|
1
|
+
{"version":3,"file":"base-input-styled.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input-styled.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IContainerProps {\n $width?: string | number;\n $widthX?: number;\n $size: IBaseInputProps['size'];\n $willShowMessage: IBaseInputProps['willShowMessage'];\n}\n\nconst Container = styled.div<IContainerProps>(\n ({ theme, $size, $willShowMessage, $width, $widthX }) => {\n const { height, marginTop, marginBottom } = theme.input.sizes[$size];\n const containerHeight = height + marginTop + ($willShowMessage ? marginBottom : 0);\n\n return `\n width: ${$width ? $width : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * theme.layout.gutter}px;` : ''}\n height: ${containerHeight}px;\n `;\n },\n);\n\ninterface IWrapperProps {\n $size: IBaseInputProps['size'];\n $disabled?: boolean;\n $renderAs: IBaseInputProps['renderAs'];\n $shape?: IBaseInputProps['shape'];\n $isTransparent?: boolean;\n $colorTheme?: IBaseInputProps['colorTheme'];\n}\n\nconst Wrapper = styled.div<IWrapperProps>(\n ({ theme, $size, $renderAs, $disabled, $shape, $isTransparent, $colorTheme }) => {\n const { colors, input } = theme;\n const { height, marginTop, paddingLeft, paddingRight, borderRadius } = input.sizes[$size];\n const { borderColorName, backgroundColorName } =\n $colorTheme === 'dark' ? input.darkVariants[$renderAs] : input.variants[$renderAs];\n\n const isBorderLessShape = $shape === 'borderLess';\n const isCurvedShape = $shape === 'curved';\n const defaultBorderRadius = isBorderLessShape ? 0 : borderRadius;\n\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n display: flex;\n height: ${height}px;\n margin-top: ${marginTop}px;\n padding-left: ${isBorderLessShape ? 0 : paddingLeft}px;\n padding-right: ${isBorderLessShape ? 0 : paddingRight}px;\n padding-top: ${isCurvedShape ? 1 : 0}px;\n padding-bottom: ${isCurvedShape ? 1 : 0}px;\n ${\n isBorderLessShape\n ? `\n border: none;\n border-bottom: 1px solid ${colors[borderColorName[$disabled ? 'disabled' : 'inactive']]};\n `\n : `border: 1px solid ${\n colors[borderColorName[$disabled ? 'disabled' : isCurvedShape ? 'active' : 'inactive']]\n };`\n }\n border-radius: ${isCurvedShape ? 40 : defaultBorderRadius}px;\n transition: border-color 0.2s ease-in-out;\n \n background: ${background};\n \n &:focus-within {\n border-color: ${colors[borderColorName.active]};\n }\n \n &:hover {\n ${!$disabled ? `border-color: ${colors[borderColorName.active]};` : ''}\n }\n `;\n },\n);\n\nconst InputWrapper = styled.div`\n flex-grow: 1;\n`;\n\ninterface ISiblingWrapperProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $siblingPosition: NonNullable<IBaseInputProps['siblingPosition']>;\n $disabled?: boolean;\n}\n\nconst SiblingWrapper = styled.div<ISiblingWrapperProps>(\n ({ theme, $inputRenderAs, $disabled, $size, $siblingPosition }) => {\n const { colors, input } = theme;\n const { iconPadding } = input.sizes[$size];\n const { labelColorName } = input.variants[$inputRenderAs];\n\n return `\n order: ${$siblingPosition === 'left' ? -1 : 1};\n padding-${$siblingPosition === 'left' ? 'right' : 'left'}: ${iconPadding}px;\n align-self: center;\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n `;\n },\n);\n\ninterface ILabelProps {\n $size: IBaseInputProps['size'];\n $inputRenderAs: IBaseInputProps['renderAs'];\n $stickyLabel: IBaseInputProps['stickyLabel'];\n $disabled?: boolean;\n $shape?: IBaseInputProps['shape'];\n $isTransparent: IBaseInputProps['isTransparent'];\n $colorTheme: IBaseInputProps['colorTheme'];\n}\n\nconst Label = styled(Text)<ILabelProps>(({\n theme,\n $size,\n $inputRenderAs,\n $stickyLabel,\n $disabled,\n $shape,\n $isTransparent,\n $colorTheme,\n}) => {\n const { colors, input, text, layout } = theme;\n const { gutter } = layout;\n const { height, paddingLeft } = input.sizes[$size];\n const { lineHeight } = text[input.sizes[$size].labelTextVariant];\n const { labelColorName, labelBackgroundColorName } =\n $colorTheme === 'dark' ? input.darkVariants[$inputRenderAs] : input.variants[$inputRenderAs];\n const topPosition = height / 2 - lineHeight / 2 - 1;\n const topPositionWhenActive = -topPosition - lineHeight / 2 - 1;\n\n const isBorderLessShape = $shape === 'borderLess';\n\n const backgroundColor = $isTransparent\n ? 'transparent'\n : colors[labelBackgroundColorName ?? 'WHITE'];\n\n return `\n position: absolute;\n top: ${topPosition}px;\n left: ${(isBorderLessShape ? 0 : paddingLeft) - gutter * 0.375}px;\n padding: 0 ${gutter * 0.375}px;\n background-color: ${backgroundColor};\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n pointer-events: none;\n transform-origin: left;\n transform: translateY(${$stickyLabel ? topPositionWhenActive : 0}px) scale(${\n $stickyLabel ? 0.75 : 1\n });\n transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n transform: translateY(${topPositionWhenActive}px) scale(0.75);\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n\n & span {\n color: ${colors.RED};\n margin-left: 2px;\n }\n `;\n});\n\ninterface IErrorProps {\n $colorTheme?: IBaseInputProps['colorTheme'];\n}\n\nconst Error = styled(Text)<IErrorProps>(\n ({ theme: { colors }, $colorTheme }) => `\nposition: absolute;\nbottom: -2px;\ntransform: translateY(calc(100%));\ncolor: ${colors[$colorTheme === 'dark' ? 'ORANGE_4' : 'RED']};\n`,\n);\n\nexport { Container, Wrapper, InputWrapper, SiblingWrapper, Label, Error };\n"],"names":["Container","styled","theme","$size","$willShowMessage","$width","$widthX","height","marginTop","marginBottom","containerHeight","Wrapper","$renderAs","$disabled","$shape","$isTransparent","$colorTheme","colors","input","paddingLeft","paddingRight","borderRadius","borderColorName","backgroundColorName","isBorderLessShape","isCurvedShape","defaultBorderRadius","background","InputWrapper","SiblingWrapper","$inputRenderAs","$siblingPosition","iconPadding","labelColorName","Label","Text","$stickyLabel","text","layout","gutter","lineHeight","labelBackgroundColorName","topPosition","topPositionWhenActive","backgroundColor","Error"],"mappings":";;AAaA,MAAMA,IAAYC,EAAO;AAAA,EACvB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,QAAAC,GAAQ,SAAAC,QAAc;AACjD,UAAA,EAAE,QAAAC,GAAQ,WAAAC,GAAW,cAAAC,EAAA,IAAiBP,EAAM,MAAM,MAAMC,CAAK,GAC7DO,IAAkBH,IAASC,KAAaJ,IAAmBK,IAAe;AAEzE,WAAA;AAAA,eACIJ,KAAkB,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QACxEC,IAAU,UAAUA,IAAUJ,EAAM,OAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDQ,CAAe;AAAA;AAAA,EAE7B;AACF,GAWMC,IAAUV,EAAO;AAAA,EACrB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAS,GAAW,WAAAC,GAAW,QAAAC,GAAQ,gBAAAC,GAAgB,aAAAC,QAAkB;AACzE,UAAA,EAAE,QAAAC,GAAQ,OAAAC,EAAU,IAAAhB,GACpB,EAAE,QAAAK,GAAQ,WAAAC,GAAW,aAAAW,GAAa,cAAAC,GAAc,cAAAC,EAAa,IAAIH,EAAM,MAAMf,CAAK,GAClF,EAAE,iBAAAmB,GAAiB,qBAAAC,MACvBP,MAAgB,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Ae,OAAO,CACxB;AAAA;AAAA;AAAA,MAGEzB,CAAO;AAAA,eACEM,EAAOgB,EAAe,MAAM,CAAC;AAAA,8BACdU,CAAqB;AAAA;AAAA;AAAA,MAG7ChC,CAAO;AAAA,QACJE,IAAyD,KAA7C,UAAUI,EAAOgB,EAAe,MAAM,CAAC,GAAQ;AAAA;AAAA;AAAA;AAAA,eAIrDhB,EAAO,GAAG;AAAA;AAAA;AAAA;AAIzB,CAAC,GAMK4B,IAAQ5C,EAAOkC,CAAI;AAAA,EACvB,CAAC,EAAE,OAAO,EAAE,QAAAlB,EAAO,GAAG,aAAAD,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,SAIjCC,EAAOD,MAAgB,SAAS,aAAa,KAAK,CAAC;AAAA;AAE5D;"}
|
@@ -1,60 +1,63 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
2
2
|
import { useTheme as z } from "styled-components";
|
3
|
-
import { Container as A, Wrapper as f, InputWrapper as L, Error as
|
4
|
-
const
|
3
|
+
import { Container as A, Wrapper as f, InputWrapper as L, Error as x, SiblingWrapper as y, Label as E } from "./base-input-styled.js";
|
4
|
+
const k = ($) => {
|
5
5
|
const {
|
6
6
|
label: t,
|
7
|
-
stickyLabel:
|
8
|
-
renderAs:
|
9
|
-
width:
|
7
|
+
stickyLabel: p,
|
8
|
+
renderAs: s,
|
9
|
+
width: c,
|
10
10
|
widthX: b,
|
11
|
-
disabled:
|
12
|
-
willShowMessage:
|
13
|
-
inputElement:
|
14
|
-
siblingElement:
|
15
|
-
siblingPosition:
|
11
|
+
disabled: i,
|
12
|
+
willShowMessage: m,
|
13
|
+
inputElement: u,
|
14
|
+
siblingElement: o,
|
15
|
+
siblingPosition: w,
|
16
16
|
size: e,
|
17
17
|
errorMessage: d,
|
18
|
-
mandatory:
|
18
|
+
mandatory: T,
|
19
19
|
shape: n,
|
20
|
-
isTransparent:
|
21
|
-
|
22
|
-
|
20
|
+
isTransparent: h = !1,
|
21
|
+
colorTheme: a
|
22
|
+
} = $, { input: g } = z();
|
23
|
+
return /* @__PURE__ */ r(A, { $width: c, $widthX: b, $size: e, $willShowMessage: m, children: /* @__PURE__ */ l(
|
23
24
|
f,
|
24
25
|
{
|
25
|
-
$renderAs:
|
26
|
+
$renderAs: s,
|
26
27
|
$size: e,
|
27
|
-
$disabled:
|
28
|
+
$disabled: i,
|
28
29
|
$shape: n,
|
29
|
-
$isTransparent:
|
30
|
+
$isTransparent: h,
|
31
|
+
$colorTheme: a,
|
30
32
|
children: [
|
31
|
-
/* @__PURE__ */
|
32
|
-
|
33
|
-
d && /* @__PURE__ */
|
33
|
+
/* @__PURE__ */ l(L, { children: [
|
34
|
+
u,
|
35
|
+
d && /* @__PURE__ */ r(x, { $renderAs: "body3", $colorTheme: a, children: d })
|
34
36
|
] }),
|
35
|
-
|
36
|
-
|
37
|
+
o ? /* @__PURE__ */ r(
|
38
|
+
y,
|
37
39
|
{
|
38
|
-
$inputRenderAs:
|
39
|
-
$disabled:
|
40
|
+
$inputRenderAs: s,
|
41
|
+
$disabled: i,
|
40
42
|
$size: e,
|
41
|
-
$siblingPosition:
|
42
|
-
children:
|
43
|
+
$siblingPosition: w ?? "right",
|
44
|
+
children: o
|
43
45
|
}
|
44
46
|
) : void 0,
|
45
|
-
t && n !== "curved" && /* @__PURE__ */
|
46
|
-
|
47
|
+
t && n !== "curved" && /* @__PURE__ */ l(
|
48
|
+
E,
|
47
49
|
{
|
48
50
|
$renderAs: g.sizes[e].labelTextVariant,
|
49
|
-
$inputRenderAs:
|
51
|
+
$inputRenderAs: s,
|
50
52
|
$size: e,
|
51
|
-
$stickyLabel:
|
52
|
-
$disabled:
|
53
|
+
$stickyLabel: p,
|
54
|
+
$disabled: i,
|
53
55
|
$shape: n,
|
54
|
-
$isTransparent:
|
56
|
+
$isTransparent: h,
|
57
|
+
$colorTheme: a,
|
55
58
|
children: [
|
56
59
|
t,
|
57
|
-
|
60
|
+
T && /* @__PURE__ */ r("span", { children: "*" })
|
58
61
|
]
|
59
62
|
}
|
60
63
|
)
|
@@ -63,6 +66,6 @@ const j = (p) => {
|
|
63
66
|
) });
|
64
67
|
};
|
65
68
|
export {
|
66
|
-
|
69
|
+
k as default
|
67
70
|
};
|
68
71
|
//# sourceMappingURL=base-input.js.map
|