@incodetech/web 0.0.0-dev-20260401-620f105 → 0.0.0-dev-20260401-2082c59

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.
@@ -10,7 +10,7 @@ import { D as ee } from "./dropdownComposed-CzAsPPqv.js";
10
10
  import { P as T } from "./page-D4OThpFS.js";
11
11
  import { S as re } from "./spinner-CLwSl2tJ.js";
12
12
  import { r as oe } from "./incodeModule-C4XIllao.js";
13
- import { P as te } from "./phoneInputComposed-FjM87j1t.js";
13
+ import { P as te } from "./phoneInputComposed-BAFZQ4Y8.js";
14
14
  const ae = ({ config: p, onFinish: s }) => {
15
15
  const { t: l } = $(), [a, d] = G(() => z({ config: p }));
16
16
  return q(() => {
@@ -9,7 +9,7 @@ import "../uiConfig-DmIn-g8M.js";
9
9
  import "../typography-CBPoLoAP.js";
10
10
  import { a as L } from "../inputComposed-QzDneavl.js";
11
11
  import "../checkbox-wo8qk7tM.js";
12
- import "../phoneInputComposed-FjM87j1t.js";
12
+ import "../phoneInputComposed-BAFZQ4Y8.js";
13
13
  import "../dateInputComposed-D5kgh_aC.js";
14
14
  import "../captureOverlay-Crv6ZBp_.js";
15
15
  import "../manualCaptureButton-CPZ2xxEI.js";
@@ -11,11 +11,11 @@ import { C as q, P as z } from "./cameraView-DXT7CWqE.js";
11
11
  import { I as J, a as K } from "./inputComposed-QzDneavl.js";
12
12
  import { O as Q } from "./otpInput-B85heGC5.js";
13
13
  import { C as Y, a as Z } from "./checkbox-wo8qk7tM.js";
14
- import { P as $ } from "./phoneInputComposed-FjM87j1t.js";
14
+ import { P as $ } from "./phoneInputComposed-BAFZQ4Y8.js";
15
15
  import { D as ra, S as ea } from "./dropdownComposed-CzAsPPqv.js";
16
16
  import { C as ta, D as sa } from "./dateInputComposed-D5kgh_aC.js";
17
17
  import { T as pa, a as ca } from "./captureOverlay-Crv6ZBp_.js";
18
- import { d as ua, C as ma, b as la, I as Ca, c as da, F as fa, T as Ia, S as xa, V as ha, a as ga } from "./flipAnimation-Bq6Yj6PU.js";
18
+ import { d as ua, C as ma, b as la, I as Ca, c as da, F as fa, T as Ia, S as xa, V as ha, a as ga } from "./flipAnimation-CPzQqCvm.js";
19
19
  import { L as Ta, M as va } from "./manualCaptureButton-CPZ2xxEI.js";
20
20
  import { a as Ba, C as Fa, b as Pa, d as La, c as Oa, H as ba, L as Ha } from "./captureFooter-CKqO4KY2.js";
21
21
  import { A as i, y as u, q as m } from "./vendor-preact-BoMmvSgn.js";
@@ -12,7 +12,7 @@ import { B as W } from "./permissions-BeU3HuVB.js";
12
12
  import "@incodetech/core";
13
13
  import "./inputComposed-QzDneavl.js";
14
14
  import "./checkbox-wo8qk7tM.js";
15
- import "./phoneInputComposed-FjM87j1t.js";
15
+ import "./phoneInputComposed-BAFZQ4Y8.js";
16
16
  import "./dateInputComposed-D5kgh_aC.js";
17
17
  import "./countries-DfLkrF0x.js";
18
18
  const $ = ({
@@ -2003,7 +2003,7 @@ const Pe = () => import("../id/id.es.js").then((e) => e.Id), ke = {
2003
2003
  (e) => e.GovernmentValidation
2004
2004
  ),
2005
2005
  GEOLOCATION: () => import("../geolocation/geolocation.es.js").then((e) => e.Geolocation),
2006
- EXTERNAL_VERIFICATION: () => import("../ekycModule-CT6sxv3k.js").then((e) => e.EkycModule),
2006
+ EXTERNAL_VERIFICATION: () => import("../ekycModule-BgFGstuw.js").then((e) => e.EkycModule),
2007
2007
  EKYB: () => import("../ekybModule-G2eXzUMi.js").then((e) => e.EkybModule),
2008
2008
  DOCUMENT_CAPTURE: () => import("../documentCapture-DyhxCgpZ.js").then(
2009
2009
  (e) => e.DocumentCapture
package/dist/id/id.es.js CHANGED
@@ -5,7 +5,7 @@ import "@incodetech/core";
5
5
  import { P as f } from "../permissions-BeU3HuVB.js";
6
6
  import { r as l } from "../incodeModule-C4XIllao.js";
7
7
  import { P as h } from "../processing-Ss26Ad0W.js";
8
- import { b as C, T as I, F as a, C as g, c as y, I as F } from "../flipAnimation-Bq6Yj6PU.js";
8
+ import { b as C, T as I, F as a, C as g, c as y, I as F } from "../flipAnimation-CPzQqCvm.js";
9
9
  import "../captureOverlay-Crv6ZBp_.js";
10
10
  import "../uiConfig-DmIn-g8M.js";
11
11
  import "../typography-CBPoLoAP.js";
@@ -6,7 +6,7 @@ import "@incodetech/core";
6
6
  import { C as y } from "../checkbox-wo8qk7tM.js";
7
7
  import { O as k } from "../otpInput-B85heGC5.js";
8
8
  import { P as g } from "../page-D4OThpFS.js";
9
- import { P as R } from "../phoneInputComposed-FjM87j1t.js";
9
+ import { P as R } from "../phoneInputComposed-BAFZQ4Y8.js";
10
10
  import { r as V } from "../incodeModule-C4XIllao.js";
11
11
  const B = ({
12
12
  config: i,
@@ -1,11 +1,11 @@
1
- import { u as a } from "./button-DXIWeie9.js";
2
- import { D as J, d as L, A as x, T as M, y as Q, q as A } from "./vendor-preact-BoMmvSgn.js";
3
- import { w as X, g as I, c as j, b as k } from "./countries-DfLkrF0x.js";
1
+ import { u as s } from "./button-DXIWeie9.js";
2
+ import { D as J, d as D, A as x, T as M, y as Q, q as A } from "./vendor-preact-BoMmvSgn.js";
3
+ import { w as X, g as h, c as j, b as k } from "./countries-DfLkrF0x.js";
4
4
  import { D as z } from "./dropdownComposed-CzAsPPqv.js";
5
5
  import { E as _ } from "./errorIcon-DOuc6ONw.js";
6
6
  import { S as q } from "./successIcon-BZphSsQr.js";
7
7
  import { a as e2 } from "./inputComposed-QzDneavl.js";
8
- import { P as n2, p as D, A as g } from "./AsYouType-D1H_js4X.js";
8
+ import { P as n2, p as L, A as g } from "./AsYouType-D1H_js4X.js";
9
9
  function o2(e, o, r) {
10
10
  if (o[e])
11
11
  return new n2(e, o[e], r);
@@ -21,123 +21,124 @@ function s2(e, o) {
21
21
  const r = e.replace(/\D/g, "");
22
22
  if (r === o) return e;
23
23
  if (!r.endsWith(o)) return null;
24
- const l = r.length - o.length;
25
- if (l <= 0) return e;
24
+ const a = r.length - o.length;
25
+ if (a <= 0) return e;
26
+ const l = e.replace(/[()]/g, "");
26
27
  let c = 0;
27
- for (let s = 0; s < e.length; s++)
28
- if (/\d/.test(e[s]) && (c++, c === l))
29
- return e.slice(s + 1).trimStart();
28
+ for (let d = 0; d < l.length; d++)
29
+ if (/\d/.test(l[d]) && (c++, c === a))
30
+ return l.slice(d + 1).replace(/^\D+/, "");
30
31
  return e;
31
32
  }
32
33
  const a2 = {
33
34
  US: "(123) 456-7890",
34
35
  CA: "(123) 456-7890"
35
36
  };
36
- function l2(e) {
37
+ function c2(e) {
37
38
  const o = a2[e];
38
39
  if (o) return o;
39
40
  const r = t2(e, r2);
40
41
  if (!r) return "";
41
- const l = r.formatNational(), c = s2(l, r.nationalNumber);
42
- if (c) return c;
43
- const s = `+${k(e)}`;
44
- return b(r.nationalNumber, s, e);
42
+ const a = r.formatNational(), l = s2(a, r.nationalNumber);
43
+ if (l) return l;
44
+ const c = `+${k(e)}`;
45
+ return b(r.nationalNumber, c, e);
45
46
  }
46
- const c2 = J(
47
+ const l2 = J(
47
48
  ({
48
49
  id: e,
49
50
  label: o,
50
51
  countryCode: r = "US",
51
- value: l,
52
- placeholder: c,
53
- error: s,
54
- helper: h,
52
+ value: a,
53
+ placeholder: l,
54
+ error: c,
55
+ helper: d,
55
56
  showErrorIcon: R,
56
57
  showHelperIcon: y,
57
58
  disabled: E = !1,
58
59
  disableCountrySelector: K = !1,
59
60
  required: P,
60
- onChange: S,
61
+ onChange: f,
61
62
  "aria-labelledby": $,
62
63
  "data-testid": H,
63
64
  ...W
64
65
  }, U) => {
65
- const [d, N] = L(r), [u, f] = L(""), T = x(!1), F = M(
66
+ const [p, N] = D(r), [C, S] = D(""), T = x(!1), F = M(
66
67
  () => j.map((t) => ({
67
68
  value: t.code,
68
69
  label: `${t.emoji} ${t.callingCode} ${t.name}`
69
70
  })),
70
71
  []
71
72
  ), i = M(
72
- () => I(d) ?? I("US"),
73
- [d]
73
+ () => h(p) ?? h("US"),
74
+ [p]
74
75
  ), O = M(
75
- () => c ?? l2(d),
76
- [c, d]
76
+ () => l ?? c2(p),
77
+ [l, p]
77
78
  );
78
79
  Q(() => {
79
- if (T.current || !l || !i) return;
80
+ if (T.current || !a || !i) return;
80
81
  T.current = !0;
81
- const t = l.startsWith("+") ? l : `+${l}`, n = D(t);
82
+ const t = a.startsWith("+") ? a : `+${a}`, n = L(t);
82
83
  if (n?.isValid() && n.country) {
83
- n.country !== d && N(n.country);
84
- const p = new g(n.country);
85
- f(p.input(n.nationalNumber));
84
+ n.country !== p && N(n.country);
85
+ const u = new g(n.country);
86
+ S(u.input(n.nationalNumber));
86
87
  }
87
- }, [l, i, d]);
88
- const C = A(
88
+ }, [a, i, p]);
89
+ const m = A(
89
90
  (t, n) => {
90
- const p = `${n.callingCode}${t.replace(/\D/g, "")}`;
91
+ const u = `${n.callingCode}${t.replace(/\D/g, "")}`;
91
92
  try {
92
- const Y = D(p, n.code);
93
- S?.(p, Y?.isValid() ?? !1);
93
+ const Y = L(u, n.code);
94
+ f?.(u, Y?.isValid() ?? !1);
94
95
  } catch {
95
- S?.(p, !1);
96
+ f?.(u, !1);
96
97
  }
97
98
  },
98
- [S]
99
+ [f]
99
100
  ), V = A(
100
101
  (t) => {
101
102
  N(t);
102
- const n = I(t);
103
- n && u && C(u, n);
103
+ const n = h(t);
104
+ n && C && m(C, n);
104
105
  },
105
- [u, C]
106
+ [C, m]
106
107
  ), Z = A(
107
108
  (t) => {
108
109
  const n = t.target.value;
109
110
  if (!i) {
110
- f(n);
111
+ S(n);
111
112
  return;
112
113
  }
113
- const p = b(
114
+ const u = b(
114
115
  n,
115
116
  i.callingCode,
116
117
  i.code
117
118
  );
118
- f(p), C(n, i);
119
+ S(u), m(n, i);
119
120
  },
120
- [i, C]
121
- ), v = `${e}-country`, m = `${e}-phone`, G = `${m}-helper`, B = `${m}-error`, w = [h ? G : null, s ? B : null].filter(Boolean).join(" ");
122
- return /* @__PURE__ */ a("div", { class: "IncodePhoneInputComposed", children: [
123
- o && /* @__PURE__ */ a(
121
+ [i, m]
122
+ ), v = `${e}-country`, I = `${e}-phone`, G = `${I}-helper`, B = `${I}-error`, w = [d ? G : null, c ? B : null].filter(Boolean).join(" ");
123
+ return /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposed", children: [
124
+ o && /* @__PURE__ */ s(
124
125
  "label",
125
126
  {
126
127
  class: "IncodePhoneInputComposedLabel",
127
- htmlFor: m,
128
+ htmlFor: I,
128
129
  "data-testid": `${e}-label`,
129
130
  children: [
130
131
  o,
131
- P && /* @__PURE__ */ a("span", { class: "IncodePhoneInputComposedRequired", children: " *" })
132
+ P && /* @__PURE__ */ s("span", { class: "IncodePhoneInputComposedRequired", children: " *" })
132
133
  ]
133
134
  }
134
135
  ),
135
- /* @__PURE__ */ a(
136
+ /* @__PURE__ */ s(
136
137
  z,
137
138
  {
138
139
  id: v,
139
140
  options: F,
140
- value: d,
141
+ value: p,
141
142
  onChange: V,
142
143
  disabled: E || K,
143
144
  required: P,
@@ -146,60 +147,60 @@ const c2 = J(
146
147
  suppressMessages: !0,
147
148
  "aria-label": `Country code ${i.callingCode}, ${i.name}`,
148
149
  renderSelectedLabel: (t) => {
149
- const n = I(t.value);
150
+ const n = h(t.value);
150
151
  return n ? `${n.emoji} ${n.callingCode}` : t.label;
151
152
  },
152
153
  class: "IncodePhoneInputComposedDropdown",
153
- siblingElement: /* @__PURE__ */ a(
154
+ siblingElement: /* @__PURE__ */ s(
154
155
  e2,
155
156
  {
156
- id: m,
157
+ id: I,
157
158
  ref: U,
158
159
  type: "tel",
159
- value: u,
160
+ value: C,
160
161
  onInput: Z,
161
162
  placeholder: O,
162
- error: s,
163
+ error: c,
163
164
  disabled: E,
164
165
  required: P,
165
166
  suppressMessages: !0,
166
167
  "aria-label": o ? void 0 : "Phone number",
167
168
  "aria-labelledby": $,
168
169
  "aria-describedby": w || void 0,
169
- "aria-invalid": s ? "true" : void 0,
170
+ "aria-invalid": c ? "true" : void 0,
170
171
  "data-testid": H,
171
172
  ...W
172
173
  }
173
174
  )
174
175
  }
175
176
  ),
176
- s && /* @__PURE__ */ a(
177
+ c && /* @__PURE__ */ s(
177
178
  "div",
178
179
  {
179
180
  class: "IncodePhoneInputComposedErrorWrapper",
180
181
  role: "alert",
181
182
  "data-testid": `${e}-error-wrapper`,
182
183
  children: [
183
- R && /* @__PURE__ */ a("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ a(_, { size: 16 }) }),
184
- /* @__PURE__ */ a("p", { id: B, class: "IncodePhoneInputComposedError", children: s })
184
+ R && /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ s(_, { size: 16 }) }),
185
+ /* @__PURE__ */ s("p", { id: B, class: "IncodePhoneInputComposedError", children: c })
185
186
  ]
186
187
  }
187
188
  ),
188
- h && !s && /* @__PURE__ */ a(
189
+ d && !c && /* @__PURE__ */ s(
189
190
  "div",
190
191
  {
191
192
  class: "IncodePhoneInputComposedHelperWrapper",
192
193
  "data-testid": `${e}-helper-wrapper`,
193
194
  children: [
194
- y && /* @__PURE__ */ a("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ a(q, { size: 16 }) }),
195
- /* @__PURE__ */ a("p", { id: G, class: "IncodePhoneInputComposedHelper", children: h })
195
+ y && /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ s(q, { size: 16 }) }),
196
+ /* @__PURE__ */ s("p", { id: G, class: "IncodePhoneInputComposedHelper", children: d })
196
197
  ]
197
198
  }
198
199
  )
199
200
  ] });
200
201
  }
201
202
  );
202
- c2.displayName = "PhoneInputComposed";
203
+ l2.displayName = "PhoneInputComposed";
203
204
  export {
204
- c2 as P
205
+ l2 as P
205
206
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260401-620f105",
3
+ "version": "0.0.0-dev-20260401-2082c59",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -136,7 +136,7 @@
136
136
  "preact-markup": "^2.1.1",
137
137
  "qrcode": "^1.5.4",
138
138
  "tailwindcss": "^4.1.17",
139
- "@incodetech/core": "0.0.0-dev-20260401-620f105"
139
+ "@incodetech/core": "0.0.0-dev-20260401-2082c59"
140
140
  },
141
141
  "devDependencies": {
142
142
  "@microsoft/api-extractor": "^7.53.3",