kiban-design-system 3.7.0 → 3.8.0
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.
|
@@ -16,7 +16,12 @@ interface OTPFormProps extends React.ComponentProps<"div"> {
|
|
|
16
16
|
onVerificationCodeChange?: (verificationCode: string) => void;
|
|
17
17
|
verificationCodeLength?: number;
|
|
18
18
|
verificationCodePattern?: string;
|
|
19
|
+
secondaryAction?: {
|
|
20
|
+
text?: string;
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
|
-
export declare function OTPForm({ logo, title, description, onSubmit, submitButtonText, footerLinks, error, isLoading, className, otpFieldLabel, verificationCode, onVerificationCodeChange, verificationCodeLength, verificationCodePattern, ...props }: OTPFormProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function OTPForm({ logo, title, description, onSubmit, submitButtonText, footerLinks, error, isLoading, className, otpFieldLabel, verificationCode, onVerificationCodeChange, verificationCodeLength, verificationCodePattern, secondaryAction, ...props }: OTPFormProps): import("react/jsx-runtime").JSX.Element;
|
|
21
26
|
export {};
|
|
22
27
|
//# sourceMappingURL=otp-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp-form.d.ts","sourceRoot":"","sources":["../../src/components/otp-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD,UAAU,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MA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CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,sBAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,GAAG,KAAK,EACT,EAAE,YAAY,2CA6Dd"}
|
|
@@ -1,67 +1,73 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { FieldGroup as
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Button as C } from "./ui/button.js";
|
|
3
|
+
import { FieldGroup as a } from "./ui/field.js";
|
|
4
4
|
import { Spinner as N } from "./ui/spinner.js";
|
|
5
|
-
import { AuthCard as j, AuthCardFooter as
|
|
6
|
-
import { OTPField as
|
|
7
|
-
function
|
|
8
|
-
logo:
|
|
9
|
-
title:
|
|
10
|
-
description:
|
|
11
|
-
onSubmit:
|
|
12
|
-
submitButtonText:
|
|
13
|
-
footerLinks:
|
|
14
|
-
error:
|
|
15
|
-
isLoading:
|
|
5
|
+
import { AuthCard as j, AuthCardFooter as B } from "./auth-card.js";
|
|
6
|
+
import { OTPField as O } from "./otp-field.js";
|
|
7
|
+
function G({
|
|
8
|
+
logo: p,
|
|
9
|
+
title: h,
|
|
10
|
+
description: n,
|
|
11
|
+
onSubmit: u,
|
|
12
|
+
submitButtonText: x,
|
|
13
|
+
footerLinks: t,
|
|
14
|
+
error: f,
|
|
15
|
+
isLoading: r,
|
|
16
16
|
className: s,
|
|
17
|
-
otpFieldLabel:
|
|
18
|
-
verificationCode:
|
|
19
|
-
onVerificationCodeChange:
|
|
20
|
-
verificationCodeLength:
|
|
21
|
-
verificationCodePattern:
|
|
22
|
-
|
|
17
|
+
otpFieldLabel: c,
|
|
18
|
+
verificationCode: d,
|
|
19
|
+
onVerificationCodeChange: b,
|
|
20
|
+
verificationCodeLength: i = 6,
|
|
21
|
+
verificationCodePattern: F,
|
|
22
|
+
secondaryAction: l,
|
|
23
|
+
...v
|
|
23
24
|
}) {
|
|
24
|
-
const g =
|
|
25
|
+
const g = r || d?.length !== i;
|
|
25
26
|
return /* @__PURE__ */ e(
|
|
26
27
|
j,
|
|
27
28
|
{
|
|
28
29
|
className: s,
|
|
29
|
-
title:
|
|
30
|
-
description:
|
|
31
|
-
logo:
|
|
32
|
-
error:
|
|
33
|
-
|
|
30
|
+
title: h,
|
|
31
|
+
description: n,
|
|
32
|
+
logo: p,
|
|
33
|
+
error: f,
|
|
34
|
+
extraAction: l ? {
|
|
35
|
+
text: l.text,
|
|
36
|
+
onClick: l.onClick,
|
|
37
|
+
disabled: l.disabled ?? r
|
|
38
|
+
} : void 0,
|
|
39
|
+
renderForm: () => /* @__PURE__ */ o(a, { className: "flex flex-col gap-3", children: [
|
|
34
40
|
/* @__PURE__ */ e(
|
|
35
|
-
|
|
41
|
+
O,
|
|
36
42
|
{
|
|
37
|
-
label:
|
|
38
|
-
value:
|
|
39
|
-
onChange:
|
|
40
|
-
length:
|
|
41
|
-
pattern:
|
|
42
|
-
disabled:
|
|
43
|
+
label: c,
|
|
44
|
+
value: d,
|
|
45
|
+
onChange: b,
|
|
46
|
+
length: i,
|
|
47
|
+
pattern: F,
|
|
48
|
+
disabled: r,
|
|
43
49
|
id: "verification-code-input"
|
|
44
50
|
}
|
|
45
51
|
),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
/* @__PURE__ */ e(a, { children: /* @__PURE__ */ o(C, { type: "submit", size: "lg", disabled: g, children: [
|
|
53
|
+
r ? /* @__PURE__ */ e(N, {}) : null,
|
|
54
|
+
x
|
|
49
55
|
] }) })
|
|
50
56
|
] }),
|
|
51
|
-
renderFooter:
|
|
57
|
+
renderFooter: t && t.length > 0 ? () => /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e("div", { className: "flex gap-4 flex-wrap", children: t.map((m) => /* @__PURE__ */ e(
|
|
52
58
|
"a",
|
|
53
59
|
{
|
|
54
|
-
href:
|
|
60
|
+
href: m.href,
|
|
55
61
|
className: "hover:underline",
|
|
56
|
-
children:
|
|
62
|
+
children: m.text
|
|
57
63
|
},
|
|
58
|
-
|
|
64
|
+
m.text
|
|
59
65
|
)) }) }) : void 0,
|
|
60
|
-
onSubmit:
|
|
61
|
-
...
|
|
66
|
+
onSubmit: u,
|
|
67
|
+
...v
|
|
62
68
|
}
|
|
63
69
|
);
|
|
64
70
|
}
|
|
65
71
|
export {
|
|
66
|
-
|
|
72
|
+
G as OTPForm
|
|
67
73
|
};
|