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,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,SAAS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CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,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 d } from "react/jsx-runtime";
2
- import { Button as v } from "./ui/button.js";
3
- import { FieldGroup as n } from "./ui/field.js";
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 A } from "./auth-card.js";
6
- import { OTPField as B } from "./otp-field.js";
7
- function z({
8
- logo: a,
9
- title: i,
10
- description: p,
11
- onSubmit: h,
12
- submitButtonText: u,
13
- footerLinks: r,
14
- error: c,
15
- isLoading: l,
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: f,
18
- verificationCode: m,
19
- onVerificationCodeChange: x,
20
- verificationCodeLength: o = 6,
21
- verificationCodePattern: b,
22
- ...F
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 = l || m?.length !== o;
25
+ const g = r || d?.length !== i;
25
26
  return /* @__PURE__ */ e(
26
27
  j,
27
28
  {
28
29
  className: s,
29
- title: i,
30
- description: p,
31
- logo: a,
32
- error: c,
33
- renderForm: () => /* @__PURE__ */ d(n, { className: "flex flex-col gap-3", children: [
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
- B,
41
+ O,
36
42
  {
37
- label: f,
38
- value: m,
39
- onChange: x,
40
- length: o,
41
- pattern: b,
42
- disabled: l,
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(n, { children: /* @__PURE__ */ d(v, { type: "submit", size: "lg", disabled: g, children: [
47
- l ? /* @__PURE__ */ e(N, {}) : null,
48
- u
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: r && r.length > 0 ? () => /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { className: "flex gap-4 flex-wrap", children: r.map((t) => /* @__PURE__ */ e(
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: t.href,
60
+ href: m.href,
55
61
  className: "hover:underline",
56
- children: t.text
62
+ children: m.text
57
63
  },
58
- t.text
64
+ m.text
59
65
  )) }) }) : void 0,
60
- onSubmit: h,
61
- ...F
66
+ onSubmit: u,
67
+ ...v
62
68
  }
63
69
  );
64
70
  }
65
71
  export {
66
- z as OTPForm
72
+ G as OTPForm
67
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiban-design-system",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "type": "module",
5
5
  "description": "Kiban Design System - A React component library",
6
6
  "main": "./dist/index.js",