@incodetech/web 0.0.0-dev-20260402-43cf9b8 → 0.0.0-dev-20260402-7cf9db4

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.
@@ -1,13 +1,13 @@
1
- import { b, u as e, I as O, a as C, S as w, B as y } from "../button-DXIWeie9.js";
1
+ import { b as v, u as e, I as O, a as w, S as C, B as y } from "../button-DXIWeie9.js";
2
2
  import { createEmailManager as P } from "@incodetech/core/email";
3
- import { d as h, y as V } from "../vendor-preact-BoMmvSgn.js";
3
+ import { d as b, y as V } from "../vendor-preact-BoMmvSgn.js";
4
4
  import "@incodetech/core";
5
- import { O as S } from "../otpInput-B85heGC5.js";
5
+ import { O as R } from "../otpInput-B85heGC5.js";
6
6
  import { P as I } from "../page-D4OThpFS.js";
7
- import { r as k } from "../incodeModule-C4XIllao.js";
7
+ import { r as S } from "../incodeModule-C4XIllao.js";
8
8
  import "../uiConfig-DmIn-g8M.js";
9
9
  import "../typography-CBPoLoAP.js";
10
- import { a as L } from "../inputComposed-QzDneavl.js";
10
+ import { a as k } from "../inputComposed-QzDneavl.js";
11
11
  import "../checkbox-wo8qk7tM.js";
12
12
  import "../phoneInputComposed-BAFZQ4Y8.js";
13
13
  import "../dateInputComposed-D5kgh_aC.js";
@@ -15,43 +15,43 @@ import "../captureOverlay-Crv6ZBp_.js";
15
15
  import "../manualCaptureButton-CPZ2xxEI.js";
16
16
  import "../captureFooter-CKqO4KY2.js";
17
17
  import "../countries-DfLkrF0x.js";
18
- const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
18
+ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
19
19
  prefilledEmail: i,
20
20
  emailError: s,
21
- label: m,
22
- disabled: u = !1,
23
- required: n = !1,
21
+ label: d,
22
+ disabled: c = !1,
23
+ required: a = !1,
24
24
  onEmailChange: t
25
25
  }) => {
26
- const { t: r } = b(), [E, p] = h("");
26
+ const { t: l } = v(), [E, p] = b("");
27
27
  V(() => {
28
28
  if (i) {
29
29
  p(i);
30
- const a = v.test(i.trim());
31
- t(i.trim(), a);
30
+ const r = h.test(i.trim());
31
+ t(i.trim(), r);
32
32
  }
33
33
  }, [i, t]);
34
- const f = (a) => {
35
- const d = a.target.value;
36
- p(d);
37
- const l = d.trim(), g = l.length > 0 && v.test(l);
38
- t(l, g);
39
- }, o = s ? "email-error" : void 0;
34
+ const f = (r) => {
35
+ const m = r.target.value;
36
+ p(m);
37
+ const o = m.trim(), u = o.length > 0 && h.test(o);
38
+ t(o, u);
39
+ }, n = s ? "email-error" : void 0;
40
40
  return /* @__PURE__ */ e("div", { class: "IncodeEmailInput", children: /* @__PURE__ */ e("div", { class: "IncodeEmailInputContainer", children: /* @__PURE__ */ e(
41
- L,
41
+ k,
42
42
  {
43
43
  id: "email-input",
44
44
  type: "email",
45
45
  value: E,
46
46
  onInput: f,
47
- placeholder: r("email.placeholder"),
48
- disabled: u,
49
- required: n,
50
- label: m,
47
+ placeholder: l("email.placeholder"),
48
+ disabled: c,
49
+ required: a,
50
+ label: d,
51
51
  "data-testid": "email-input",
52
- "aria-label": m ? void 0 : "Email address",
52
+ "aria-label": d ? void 0 : "Email address",
53
53
  "aria-invalid": s ? "true" : void 0,
54
- "aria-describedby": o || void 0,
54
+ "aria-describedby": n || void 0,
55
55
  autocomplete: "email",
56
56
  error: s,
57
57
  showErrorIcon: !0
@@ -60,10 +60,10 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
60
60
  }, T = ({
61
61
  config: i,
62
62
  manager: s,
63
- onFinish: m,
64
- onError: u
63
+ onFinish: d,
64
+ onError: c
65
65
  }) => {
66
- const { t: n } = b(), [t, r] = C(
66
+ const { t: a } = v(), [t, l] = w(
67
67
  () => {
68
68
  if (s) return s;
69
69
  if (!i)
@@ -71,36 +71,36 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
71
71
  return P({ config: i });
72
72
  },
73
73
  { manageLifecycle: !s }
74
- ), [E, p] = h(!1);
74
+ ), [E, p] = b(!1);
75
75
  if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
76
- const o = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.prefilledEmail : void 0, c = t.status === "inputting" && t.emailError ? n(t.emailError) : void 0, d = t.status === "inputting" ? t.otpVerification ?? !1 : !1;
76
+ const n = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", r = t.status === "inputting" ? t.prefilledEmail : void 0, g = t.status === "inputting" && t.emailError ? a(t.emailError) : void 0, m = t.status === "inputting" ? t.otpVerification ?? !1 : !1;
77
77
  return /* @__PURE__ */ e(
78
78
  I,
79
79
  {
80
80
  className: "IncodeEmailPage",
81
- title: n("otp.enterCodeEmail"),
82
- subtitle: d ? n("email.willSendCode") : void 0,
81
+ title: a("otp.enterCodeEmail"),
82
+ subtitle: m ? a("email.willSendCode") : void 0,
83
83
  children: [
84
84
  /* @__PURE__ */ e(
85
- R,
85
+ L,
86
86
  {
87
- prefilledEmail: a,
88
- emailError: c,
89
- disabled: o,
90
- onEmailChange: (l, g) => {
91
- r.setEmail(l, g), p(g);
87
+ prefilledEmail: r,
88
+ emailError: g,
89
+ disabled: n,
90
+ onEmailChange: (o, u) => {
91
+ l.setEmail(o, u), p(u);
92
92
  }
93
93
  }
94
94
  ),
95
- /* @__PURE__ */ e(w, {}),
95
+ /* @__PURE__ */ e(C, {}),
96
96
  /* @__PURE__ */ e(
97
97
  y,
98
98
  {
99
- onClick: () => r.submit(),
99
+ onClick: () => l.submit(),
100
100
  disabled: !E,
101
- isLoading: o,
101
+ isLoading: n,
102
102
  "data-testid": "email-submit",
103
- children: n("common.continue")
103
+ children: a("common.continue")
104
104
  }
105
105
  )
106
106
  ]
@@ -108,45 +108,45 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
108
108
  );
109
109
  }
110
110
  if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
111
- const o = t.status === "verifyingOtp", a = t.status === "otpError", c = t.status === "awaitingOtp", d = t.status === "resendingOtp";
111
+ const n = t.status === "verifyingOtp", r = t.status === "otpError", g = t.status === "awaitingOtp", m = t.status === "resendingOtp", o = g || r || n;
112
112
  return /* @__PURE__ */ e(
113
113
  I,
114
114
  {
115
115
  className: "IncodeEmailPage IncodeEmailOtpPage",
116
- title: n("otp.enterCodeEmail"),
116
+ title: a("otp.enterCodeEmail"),
117
117
  children: /* @__PURE__ */ e(
118
- S,
118
+ R,
119
119
  {
120
- resendTimer: c || a ? t.resendTimer : 0,
121
- canResend: c || a ? t.canResend : !1,
122
- error: a ? n(t.otpError) : void 0,
123
- isLoading: o,
124
- disabled: d || o,
125
- onSubmit: (l) => r.submitOtp(l),
126
- onResend: () => r.resendOtp(),
127
- onBack: () => r.back(),
120
+ resendTimer: o ? t.resendTimer : 0,
121
+ canResend: o ? t.canResend : !1,
122
+ error: r ? a(t.otpError) : void 0,
123
+ isLoading: n,
124
+ disabled: m || n,
125
+ onSubmit: (u) => l.submitOtp(u),
126
+ onResend: () => l.resendOtp(),
127
+ onBack: () => l.back(),
128
128
  backLinkText: "otp.changeEmail"
129
129
  }
130
130
  )
131
131
  }
132
132
  );
133
133
  }
134
- return t.status === "finished" ? (m?.(), null) : (t.status === "error" && u?.(t.error), null);
134
+ return t.status === "finished" ? (d?.(), null) : (t.status === "error" && c?.(t.error), null);
135
135
  }, B = ({
136
136
  config: i,
137
137
  manager: s,
138
- onFinish: m,
139
- onError: u
138
+ onFinish: d,
139
+ onError: c
140
140
  }) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
141
141
  T,
142
142
  {
143
143
  config: i,
144
144
  manager: s,
145
- onFinish: m,
146
- onError: u
145
+ onFinish: d,
146
+ onError: c
147
147
  }
148
148
  ) : null });
149
- k(B, "incode-email");
149
+ S(B, "incode-email");
150
150
  export {
151
151
  B as Email
152
152
  };
@@ -1,15 +1,15 @@
1
- import { u as e, I as O, b as C, a as E, S as f, B as v } from "../button-DXIWeie9.js";
2
- import { createPhoneManager as S } from "@incodetech/core/phone";
3
- import { d as w } from "../vendor-preact-BoMmvSgn.js";
1
+ import { u as e, I as O, b as C, a as E, S as g, B as v } from "../button-DXIWeie9.js";
2
+ import { createPhoneManager as w } from "@incodetech/core/phone";
3
+ import { d as S } from "../vendor-preact-BoMmvSgn.js";
4
4
  import "../uiConfig-DmIn-g8M.js";
5
5
  import "@incodetech/core";
6
6
  import { C as y } from "../checkbox-wo8qk7tM.js";
7
7
  import { O as k } from "../otpInput-B85heGC5.js";
8
- import { P as g } from "../page-D4OThpFS.js";
8
+ import { P } from "../page-D4OThpFS.js";
9
9
  import { P as R } from "../phoneInputComposed-BAFZQ4Y8.js";
10
10
  import { r as V } from "../incodeModule-C4XIllao.js";
11
11
  const B = ({
12
- config: i,
12
+ config: r,
13
13
  manager: s,
14
14
  onFinish: d,
15
15
  onError: p
@@ -17,20 +17,20 @@ const B = ({
17
17
  const { t: n } = C(), [t, o] = E(
18
18
  () => {
19
19
  if (s) return s;
20
- if (!i)
20
+ if (!r)
21
21
  throw new Error("Phone config is required");
22
- return S({ config: i });
22
+ return w({ config: r });
23
23
  },
24
24
  { manageLifecycle: !s }
25
- ), [P, b] = w(!1);
25
+ ), [b, I] = S(!1);
26
26
  if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
27
- const r = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", u = t.status === "inputting" ? t.prefilledPhone : void 0, l = t.status === "inputting" && t.phoneError ? n(t.phoneError) : void 0, c = t.status === "inputting" ? t.otpVerification ?? !1 : !1, I = t.status === "inputting" ? t.optinEnabled ?? !1 : !1;
27
+ const i = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", l = t.status === "inputting" ? t.prefilledPhone : void 0, c = t.status === "inputting" && t.phoneError ? n(t.phoneError) : void 0, u = t.status === "inputting" ? t.otpVerification ?? !1 : !1, h = t.status === "inputting" ? t.optinEnabled ?? !1 : !1;
28
28
  return /* @__PURE__ */ e(
29
- g,
29
+ P,
30
30
  {
31
31
  className: "IncodePhonePage",
32
32
  title: n("phone.verify"),
33
- subtitle: c ? n("email.willSendCode") : void 0,
33
+ subtitle: u ? n("email.willSendCode") : void 0,
34
34
  children: [
35
35
  /* @__PURE__ */ e("div", { class: "IncodePhoneInputContainer", children: [
36
36
  /* @__PURE__ */ e(
@@ -38,18 +38,18 @@ const B = ({
38
38
  {
39
39
  id: "phone",
40
40
  countryCode: a,
41
- value: u,
42
- error: l,
43
- disabled: r,
44
- onChange: (m, h) => {
45
- o.setPhoneNumber(m, h), b(h);
41
+ value: l,
42
+ error: c,
43
+ disabled: i,
44
+ onChange: (m, f) => {
45
+ o.setPhoneNumber(m, f), I(f);
46
46
  },
47
47
  "data-testid": "phone-input",
48
48
  showErrorIcon: !0
49
49
  }
50
50
  ),
51
- /* @__PURE__ */ e(f, { size: 16 }),
52
- I && /* @__PURE__ */ e(
51
+ /* @__PURE__ */ e(g, { size: 16 }),
52
+ h && /* @__PURE__ */ e(
53
53
  y,
54
54
  {
55
55
  id: "phone-optin",
@@ -59,13 +59,13 @@ const B = ({
59
59
  }
60
60
  )
61
61
  ] }),
62
- /* @__PURE__ */ e(f, {}),
62
+ /* @__PURE__ */ e(g, {}),
63
63
  /* @__PURE__ */ e(
64
64
  v,
65
65
  {
66
66
  onClick: () => o.submit(),
67
- disabled: !P,
68
- isLoading: r,
67
+ disabled: !b,
68
+ isLoading: i,
69
69
  "data-testid": "phone-submit",
70
70
  children: n("common.continue")
71
71
  }
@@ -75,16 +75,16 @@ const B = ({
75
75
  );
76
76
  }
77
77
  if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
78
- const r = t.status === "verifyingOtp", a = t.status === "otpError", u = t.status === "awaitingOtp", l = t.status === "resendingOtp";
79
- return /* @__PURE__ */ e(g, { className: "IncodePhonePage", title: n("otp.enterCodeSMS"), children: /* @__PURE__ */ e(
78
+ const i = t.status === "verifyingOtp", a = t.status === "otpError", l = t.status === "awaitingOtp", c = t.status === "resendingOtp", u = l || a || i;
79
+ return /* @__PURE__ */ e(P, { className: "IncodePhonePage", title: n("otp.enterCodeSMS"), children: /* @__PURE__ */ e(
80
80
  k,
81
81
  {
82
- resendTimer: u || a ? t.resendTimer : 0,
83
- canResend: u || a ? t.canResend : !1,
84
- isLoading: r,
85
- disabled: l || r,
82
+ resendTimer: u ? t.resendTimer : 0,
83
+ canResend: u ? t.canResend : !1,
84
+ isLoading: i,
85
+ disabled: c || i,
86
86
  error: a ? n(t.otpError) : void 0,
87
- onSubmit: (c) => o.submitOtp(c),
87
+ onSubmit: (h) => o.submitOtp(h),
88
88
  onResend: () => o.resendOtp(),
89
89
  onBack: () => o.back()
90
90
  }
@@ -92,14 +92,14 @@ const B = ({
92
92
  }
93
93
  return t.status === "finished" ? (d?.(), null) : (t.status === "error" && p?.(t.error), null);
94
94
  }, L = ({
95
- config: i,
95
+ config: r,
96
96
  manager: s,
97
97
  onFinish: d,
98
98
  onError: p
99
- }) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
99
+ }) => /* @__PURE__ */ e(O, { children: r || s ? /* @__PURE__ */ e(
100
100
  B,
101
101
  {
102
- config: i,
102
+ config: r,
103
103
  manager: s,
104
104
  onFinish: d,
105
105
  onError: p
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260402-43cf9b8",
3
+ "version": "0.0.0-dev-20260402-7cf9db4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -137,7 +137,7 @@
137
137
  "qrcode": "^1.5.4",
138
138
  "signature_pad": "^5.1.3",
139
139
  "tailwindcss": "^4.1.17",
140
- "@incodetech/core": "0.0.0-dev-20260402-43cf9b8"
140
+ "@incodetech/core": "0.0.0-dev-20260402-7cf9db4"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@microsoft/api-extractor": "^7.53.3",