@incodetech/web 0.0.0-dev-20260325-72e1e24 → 0.0.0-dev-20260326-ac8336a
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/base.css +12 -2
- package/dist/curp-validation/curp-validation.es.js +1 -1
- package/dist/curp-validation/styles.css +12 -0
- package/dist/dropdownComposed-CnmITmQb.js +367 -0
- package/dist/{ekybModule-ly0wrPsV.js → ekybModule-BLdLDQLO.js} +1 -1
- package/dist/{ekycModule-BkTDINkE.js → ekycModule-CmuQbdiJ.js} +2 -2
- package/dist/email/email.es.js +1 -1
- package/dist/extensibility.es.js +4 -4
- package/dist/{flipAnimation-CmG-kgPi.js → flipAnimation-BXWZxnGC.js} +1 -1
- package/dist/flow/flow.es.js +2 -2
- package/dist/flow/styles.css +12 -0
- package/dist/governmentValidation/governmentValidation.es.js +1 -1
- package/dist/id/id.es.js +1 -1
- package/dist/{otpInput-cZblmynr.js → otpInput-B4ic8127.js} +26 -30
- package/dist/phone/phone.es.js +2 -2
- package/dist/{phoneInputComposed-B4OTfqLt.js → phoneInputComposed-DYE5UsRs.js} +23 -23
- package/dist/themes/dark.css +1 -0
- package/dist/themes/light.css +1 -0
- package/dist/types/extensibility.d.ts +1 -0
- package/package.json +2 -2
- package/dist/dropdownComposed-LjhdF9Jx.js +0 -345
package/dist/base.css
CHANGED
|
@@ -972,6 +972,17 @@
|
|
|
972
972
|
.IncodeDropdownComposedOption:hover, .IncodeDropdownComposedOption[data-highlighted="true"] {
|
|
973
973
|
background-color: var(--surface-neutral-200, var(--color-surface-neutral-200));
|
|
974
974
|
}
|
|
975
|
+
.IncodeDropdownComposedLiveRegion {
|
|
976
|
+
clip-path: inset(50%);
|
|
977
|
+
white-space: nowrap;
|
|
978
|
+
border-width: 0;
|
|
979
|
+
width: 1px;
|
|
980
|
+
height: 1px;
|
|
981
|
+
margin: -1px;
|
|
982
|
+
padding: 0;
|
|
983
|
+
position: absolute;
|
|
984
|
+
overflow: hidden;
|
|
985
|
+
}
|
|
975
986
|
.IncodeDropdownComposedNoResults {
|
|
976
987
|
padding: var(--spacing-16, var(--spacing-16, 16px));
|
|
977
988
|
text-align: center;
|
|
@@ -1029,9 +1040,8 @@
|
|
|
1029
1040
|
max-width: none;
|
|
1030
1041
|
}
|
|
1031
1042
|
.IncodePhoneInputComposedDropdown .IncodeDropdownComposedTrigger {
|
|
1043
|
+
width: var(--phone-input-country-code-width);
|
|
1032
1044
|
flex-shrink: 0;
|
|
1033
|
-
width: auto;
|
|
1034
|
-
min-width: 120px;
|
|
1035
1045
|
}
|
|
1036
1046
|
.IncodePhoneInputComposedDropdown .IncodeDropdownComposedSibling .IncodeInputComposed, .IncodePhoneInputComposedDropdown .IncodeDropdownComposedSibling .IncodeInput {
|
|
1037
1047
|
max-width: none;
|
|
@@ -10,7 +10,7 @@ import { S as k } from "../spinner-_-QbAnd8.js";
|
|
|
10
10
|
import { r as E } from "../incodeModule-DtbbjNTQ.js";
|
|
11
11
|
import { a as C } from "../inputComposed-7r-2MfA7.js";
|
|
12
12
|
import { D as F } from "../dateInputComposed-DzB7gNed.js";
|
|
13
|
-
import { D as P } from "../dropdownComposed-
|
|
13
|
+
import { D as P } from "../dropdownComposed-CnmITmQb.js";
|
|
14
14
|
const T = ({
|
|
15
15
|
curp: s,
|
|
16
16
|
isValid: d,
|
|
@@ -418,6 +418,18 @@
|
|
|
418
418
|
background-color: var(--surface-neutral-200, var(--color-surface-neutral-200));
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
+
.IncodeDropdownComposedLiveRegion {
|
|
422
|
+
clip-path: inset(50%);
|
|
423
|
+
white-space: nowrap;
|
|
424
|
+
border-width: 0;
|
|
425
|
+
width: 1px;
|
|
426
|
+
height: 1px;
|
|
427
|
+
margin: -1px;
|
|
428
|
+
padding: 0;
|
|
429
|
+
position: absolute;
|
|
430
|
+
overflow: hidden;
|
|
431
|
+
}
|
|
432
|
+
|
|
421
433
|
.IncodeDropdownComposedNoResults {
|
|
422
434
|
padding: var(--spacing-16, var(--spacing-16, 16px));
|
|
423
435
|
text-align: center;
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { u as o, c as U } from "./button-qiC4m4lf.js";
|
|
2
|
+
import { d as g, A as p, y as C } from "./vendor-preact-BY8u4mdq.js";
|
|
3
|
+
import { C as ie } from "./chevronDown-J1Yx1Jy7.js";
|
|
4
|
+
import { E as le } from "./errorIcon-DbJL-4MJ.js";
|
|
5
|
+
import { S as pe } from "./successIcon-C-3-t1kz.js";
|
|
6
|
+
const ue = ({ size: c = 20 }) => /* @__PURE__ */ o(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: c,
|
|
11
|
+
height: c,
|
|
12
|
+
viewBox: "0 0 20 20",
|
|
13
|
+
fill: "none",
|
|
14
|
+
class: "IncodeSearchIcon",
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ o("title", { children: "Search" }),
|
|
18
|
+
/* @__PURE__ */ o(
|
|
19
|
+
"path",
|
|
20
|
+
{
|
|
21
|
+
d: "M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z",
|
|
22
|
+
stroke: "var(--icon-neutral-300)",
|
|
23
|
+
"stroke-width": "2",
|
|
24
|
+
"stroke-linecap": "round",
|
|
25
|
+
"stroke-linejoin": "round"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ o(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M19 19L14.65 14.65",
|
|
32
|
+
stroke: "var(--icon-neutral-300)",
|
|
33
|
+
"stroke-width": "2",
|
|
34
|
+
"stroke-linecap": "round",
|
|
35
|
+
"stroke-linejoin": "round"
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
), De = ({
|
|
41
|
+
id: c,
|
|
42
|
+
label: u,
|
|
43
|
+
placeholder: W = "Choose an option",
|
|
44
|
+
value: b,
|
|
45
|
+
options: k,
|
|
46
|
+
onChange: V,
|
|
47
|
+
error: l,
|
|
48
|
+
helper: y,
|
|
49
|
+
showErrorIcon: Z,
|
|
50
|
+
showHelperIcon: _,
|
|
51
|
+
suppressMessages: S = !1,
|
|
52
|
+
disabled: f = !1,
|
|
53
|
+
required: $,
|
|
54
|
+
searchable: h = !1,
|
|
55
|
+
searchPlaceholder: H = "Search...",
|
|
56
|
+
noResultsText: K = "No results found",
|
|
57
|
+
name: L,
|
|
58
|
+
tabIndex: G,
|
|
59
|
+
onKeyDown: J,
|
|
60
|
+
onBlur: P,
|
|
61
|
+
renderSelectedLabel: O,
|
|
62
|
+
siblingElement: T,
|
|
63
|
+
enterKeyHint: fe,
|
|
64
|
+
class: X,
|
|
65
|
+
"aria-label": B,
|
|
66
|
+
"data-testid": Y
|
|
67
|
+
}) => {
|
|
68
|
+
const [r, d] = g(!1), [ee, j] = g(!1), [a, t] = g(-1), [w, z] = g(""), N = p(null), m = p(null), q = p(null), x = p([]), R = p(null), A = p(""), v = p(), I = k.find((e) => e.value === b), oe = I ? O ? O(I) : I.label : W, s = h && w ? k.filter(
|
|
69
|
+
(e) => e.label.toLowerCase().includes(w.toLowerCase())
|
|
70
|
+
) : k, E = `${c}-label`, F = `${c}-listbox`, M = `${c}-helper`, Q = `${c}-error`, re = S ? "" : [y ? M : null, l ? Q : null].filter(Boolean).join(" ");
|
|
71
|
+
C(() => {
|
|
72
|
+
if (!r) return;
|
|
73
|
+
const e = requestAnimationFrame(() => {
|
|
74
|
+
h && R.current && R.current.focus(), requestAnimationFrame(() => {
|
|
75
|
+
q.current?.scrollIntoView({
|
|
76
|
+
behavior: "smooth",
|
|
77
|
+
block: "nearest",
|
|
78
|
+
inline: "nearest"
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
return () => cancelAnimationFrame(e);
|
|
83
|
+
}, [r, h]), C(() => {
|
|
84
|
+
r || (t(-1), z(""));
|
|
85
|
+
}, [r]), C(() => {
|
|
86
|
+
a >= 0 && x.current[a] && x.current[a]?.scrollIntoView({
|
|
87
|
+
block: "nearest",
|
|
88
|
+
inline: "nearest"
|
|
89
|
+
});
|
|
90
|
+
}, [a]), C(() => () => {
|
|
91
|
+
v.current && clearTimeout(v.current);
|
|
92
|
+
}, []);
|
|
93
|
+
const ne = () => {
|
|
94
|
+
f || d((e) => !e);
|
|
95
|
+
}, D = (e) => {
|
|
96
|
+
V(e), d(!1), t(-1), m.current?.focus();
|
|
97
|
+
}, te = () => {
|
|
98
|
+
j(!0);
|
|
99
|
+
}, ae = (e) => {
|
|
100
|
+
j(!1), N.current?.contains(e.relatedTarget) || (d(!1), P?.());
|
|
101
|
+
}, se = (e) => {
|
|
102
|
+
if (f) return;
|
|
103
|
+
J?.(e);
|
|
104
|
+
const { key: i } = e;
|
|
105
|
+
if (i.length === 1 && /^[a-zA-Z0-9]$/.test(i)) {
|
|
106
|
+
e.preventDefault(), v.current && clearTimeout(v.current), A.current += i.toLowerCase();
|
|
107
|
+
const n = s.findIndex(
|
|
108
|
+
(de) => de.label.toLowerCase().startsWith(A.current)
|
|
109
|
+
);
|
|
110
|
+
n !== -1 && (r || d(!0), t(n)), v.current = setTimeout(() => {
|
|
111
|
+
A.current = "";
|
|
112
|
+
}, 500);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
switch (i) {
|
|
116
|
+
case "ArrowDown":
|
|
117
|
+
e.preventDefault(), r ? t(
|
|
118
|
+
(n) => n < s.length - 1 ? n + 1 : n
|
|
119
|
+
) : (d(!0), t(0));
|
|
120
|
+
break;
|
|
121
|
+
case "ArrowUp":
|
|
122
|
+
e.preventDefault(), r ? t((n) => n > 0 ? n - 1 : n) : (d(!0), t(s.length - 1));
|
|
123
|
+
break;
|
|
124
|
+
case "Home":
|
|
125
|
+
e.preventDefault(), r && t(0);
|
|
126
|
+
break;
|
|
127
|
+
case "End":
|
|
128
|
+
e.preventDefault(), r && t(s.length - 1);
|
|
129
|
+
break;
|
|
130
|
+
case "Enter":
|
|
131
|
+
e.preventDefault(), r && a >= 0 && s[a] ? D(s[a].value) : r || d(!0);
|
|
132
|
+
break;
|
|
133
|
+
case " ":
|
|
134
|
+
e.preventDefault(), r && a >= 0 && s[a] ? D(s[a].value) : r || (d(!0), t(0));
|
|
135
|
+
break;
|
|
136
|
+
case "Escape":
|
|
137
|
+
e.preventDefault(), r && (d(!1), t(-1), m.current?.focus());
|
|
138
|
+
break;
|
|
139
|
+
case "Tab":
|
|
140
|
+
r && (d(!1), t(-1));
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}, ce = (e) => {
|
|
144
|
+
const { key: i } = e;
|
|
145
|
+
switch (i) {
|
|
146
|
+
case "ArrowDown":
|
|
147
|
+
e.preventDefault(), t(
|
|
148
|
+
(n) => n < s.length - 1 ? n + 1 : n
|
|
149
|
+
);
|
|
150
|
+
break;
|
|
151
|
+
case "ArrowUp":
|
|
152
|
+
e.preventDefault(), t((n) => n > 0 ? n - 1 : n);
|
|
153
|
+
break;
|
|
154
|
+
case "Home":
|
|
155
|
+
e.preventDefault(), t(0);
|
|
156
|
+
break;
|
|
157
|
+
case "End":
|
|
158
|
+
e.preventDefault(), t(s.length - 1);
|
|
159
|
+
break;
|
|
160
|
+
case "Enter":
|
|
161
|
+
e.preventDefault(), a >= 0 && s[a] && D(s[a].value);
|
|
162
|
+
break;
|
|
163
|
+
case "Escape":
|
|
164
|
+
e.preventDefault(), d(!1), t(-1), m.current?.focus();
|
|
165
|
+
break;
|
|
166
|
+
case "Tab":
|
|
167
|
+
d(!1), t(-1);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
return /* @__PURE__ */ o(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
class: U("IncodeDropdownComposed", X),
|
|
175
|
+
ref: N,
|
|
176
|
+
onBlur: ae,
|
|
177
|
+
children: [
|
|
178
|
+
L && /* @__PURE__ */ o(
|
|
179
|
+
"input",
|
|
180
|
+
{
|
|
181
|
+
type: "hidden",
|
|
182
|
+
name: L,
|
|
183
|
+
value: b || "",
|
|
184
|
+
disabled: f,
|
|
185
|
+
required: $
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
u && /* @__PURE__ */ o(
|
|
189
|
+
"label",
|
|
190
|
+
{
|
|
191
|
+
class: "IncodeDropdownComposedLabel",
|
|
192
|
+
id: E,
|
|
193
|
+
htmlFor: c,
|
|
194
|
+
"data-testid": `${c}-label`,
|
|
195
|
+
children: [
|
|
196
|
+
u,
|
|
197
|
+
$ && /* @__PURE__ */ o("span", { class: "IncodeDropdownComposedRequired", children: " *" })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
/* @__PURE__ */ o("div", { class: "IncodeDropdownComposedWrapper", children: [
|
|
202
|
+
/* @__PURE__ */ o(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
class: U("IncodeDropdownComposedTriggerRow", {
|
|
206
|
+
IncodeDropdownComposedTriggerRowWithSibling: !!T
|
|
207
|
+
}),
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ o(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
ref: m,
|
|
213
|
+
type: "button",
|
|
214
|
+
id: c,
|
|
215
|
+
class: "IncodeDropdownComposedTrigger",
|
|
216
|
+
onClick: ne,
|
|
217
|
+
onFocus: te,
|
|
218
|
+
onKeyDown: se,
|
|
219
|
+
tabIndex: f ? -1 : G ?? 0,
|
|
220
|
+
disabled: f,
|
|
221
|
+
"aria-haspopup": "listbox",
|
|
222
|
+
"aria-expanded": r ? "true" : "false",
|
|
223
|
+
"aria-disabled": f ? "true" : void 0,
|
|
224
|
+
"aria-labelledby": u ? E : void 0,
|
|
225
|
+
"aria-label": u ? void 0 : B,
|
|
226
|
+
"aria-controls": r ? F : void 0,
|
|
227
|
+
"aria-activedescendant": r && a >= 0 ? `${c}-option-${a}` : void 0,
|
|
228
|
+
"aria-invalid": l ? "true" : void 0,
|
|
229
|
+
"aria-required": $ ? "true" : void 0,
|
|
230
|
+
"aria-describedby": re || void 0,
|
|
231
|
+
"data-error": l ? "true" : void 0,
|
|
232
|
+
"data-focused": ee || r ? "true" : void 0,
|
|
233
|
+
"data-testid": Y,
|
|
234
|
+
children: [
|
|
235
|
+
/* @__PURE__ */ o(
|
|
236
|
+
"span",
|
|
237
|
+
{
|
|
238
|
+
class: I ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
|
|
239
|
+
children: oe
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ o(
|
|
243
|
+
"span",
|
|
244
|
+
{
|
|
245
|
+
class: "IncodeDropdownComposedTriggerIcon",
|
|
246
|
+
"aria-hidden": "true",
|
|
247
|
+
"data-open": r,
|
|
248
|
+
children: /* @__PURE__ */ o(ie, {})
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
T && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSibling", children: T })
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
r && /* @__PURE__ */ o(
|
|
259
|
+
"div",
|
|
260
|
+
{
|
|
261
|
+
ref: q,
|
|
262
|
+
class: "IncodeDropdownComposedList",
|
|
263
|
+
"data-error": l ? "true" : void 0,
|
|
264
|
+
children: [
|
|
265
|
+
h && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSearchWrapper", children: /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSearchInner", children: [
|
|
266
|
+
/* @__PURE__ */ o(
|
|
267
|
+
"input",
|
|
268
|
+
{
|
|
269
|
+
ref: R,
|
|
270
|
+
type: "text",
|
|
271
|
+
class: "IncodeDropdownComposedSearchInput",
|
|
272
|
+
value: w,
|
|
273
|
+
onInput: (e) => {
|
|
274
|
+
z(e.target.value), t(0);
|
|
275
|
+
},
|
|
276
|
+
onKeyDown: ce,
|
|
277
|
+
placeholder: H,
|
|
278
|
+
role: "combobox",
|
|
279
|
+
"aria-autocomplete": "list",
|
|
280
|
+
"aria-expanded": "true",
|
|
281
|
+
"aria-controls": F,
|
|
282
|
+
"aria-activedescendant": a >= 0 ? `${c}-option-${a}` : void 0,
|
|
283
|
+
"aria-label": H,
|
|
284
|
+
autocomplete: "off"
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
/* @__PURE__ */ o(
|
|
288
|
+
"span",
|
|
289
|
+
{
|
|
290
|
+
class: "IncodeDropdownComposedSearchIcon",
|
|
291
|
+
"aria-hidden": "true",
|
|
292
|
+
children: /* @__PURE__ */ o(ue, { size: 20 })
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
] }) }),
|
|
296
|
+
/* @__PURE__ */ o(
|
|
297
|
+
"div",
|
|
298
|
+
{
|
|
299
|
+
id: F,
|
|
300
|
+
role: "listbox",
|
|
301
|
+
"aria-labelledby": u ? E : void 0,
|
|
302
|
+
"aria-label": u ? void 0 : B ?? W,
|
|
303
|
+
class: "IncodeDropdownComposedOptionsScroll",
|
|
304
|
+
children: s.length === 0 ? /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedNoResults", children: K }) : s.map((e, i) => /* @__PURE__ */ o(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
id: `${c}-option-${i}`,
|
|
308
|
+
role: "option",
|
|
309
|
+
"aria-selected": b === e.value ? "true" : "false",
|
|
310
|
+
class: "IncodeDropdownComposedOption",
|
|
311
|
+
"data-highlighted": a === i,
|
|
312
|
+
ref: (n) => {
|
|
313
|
+
x.current[i] = n;
|
|
314
|
+
},
|
|
315
|
+
onClick: () => D(e.value),
|
|
316
|
+
onMouseDown: (n) => n.preventDefault(),
|
|
317
|
+
onMouseEnter: () => t(i),
|
|
318
|
+
children: e.label
|
|
319
|
+
},
|
|
320
|
+
e.value
|
|
321
|
+
))
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
)
|
|
327
|
+
] }),
|
|
328
|
+
h && /* @__PURE__ */ o(
|
|
329
|
+
"div",
|
|
330
|
+
{
|
|
331
|
+
class: "IncodeDropdownComposedLiveRegion",
|
|
332
|
+
role: "status",
|
|
333
|
+
"aria-live": "polite",
|
|
334
|
+
"aria-atomic": "true",
|
|
335
|
+
children: r && w ? s.length === 0 ? K : `${s.length} result${s.length !== 1 ? "s" : ""} available` : ""
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
!S && l && /* @__PURE__ */ o(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
class: "IncodeDropdownComposedErrorWrapper",
|
|
342
|
+
"data-testid": `${c}-error-wrapper`,
|
|
343
|
+
children: [
|
|
344
|
+
Z && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ o(le, { size: 17 }) }),
|
|
345
|
+
/* @__PURE__ */ o("p", { id: Q, class: "IncodeDropdownComposedError", children: l })
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
!S && y && !l && /* @__PURE__ */ o(
|
|
350
|
+
"div",
|
|
351
|
+
{
|
|
352
|
+
class: "IncodeDropdownComposedHelperWrapper",
|
|
353
|
+
"data-testid": `${c}-helper-wrapper`,
|
|
354
|
+
children: [
|
|
355
|
+
_ && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ o(pe, { size: 17 }) }),
|
|
356
|
+
/* @__PURE__ */ o("p", { id: M, class: "IncodeDropdownComposedHelper", children: y })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
};
|
|
364
|
+
export {
|
|
365
|
+
De as D,
|
|
366
|
+
ue as S
|
|
367
|
+
};
|
|
@@ -8,7 +8,7 @@ import { P as K } from "./page-CH1_PpOG.js";
|
|
|
8
8
|
import { S as ae } from "./spinner-_-QbAnd8.js";
|
|
9
9
|
import { t as G, F as le, V as P } from "./formField-CMNAU-Eh.js";
|
|
10
10
|
import { r as ce } from "./incodeModule-DtbbjNTQ.js";
|
|
11
|
-
import { D as Y } from "./dropdownComposed-
|
|
11
|
+
import { D as Y } from "./dropdownComposed-CnmITmQb.js";
|
|
12
12
|
import { a as _ } from "./inputComposed-7r-2MfA7.js";
|
|
13
13
|
function ue(t) {
|
|
14
14
|
return [...t.toUpperCase()].map((r) => String.fromCodePoint(127462 + r.charCodeAt(0) - 65)).join("");
|
|
@@ -6,11 +6,11 @@ import "@incodetech/core";
|
|
|
6
6
|
import { u as U, A as W } from "./addressAutocomplete-CnuyGGR4.js";
|
|
7
7
|
import { V as v, t as X, F as Z } from "./formField-CMNAU-Eh.js";
|
|
8
8
|
import { D as f } from "./dateInputComposed-DzB7gNed.js";
|
|
9
|
-
import { D as ee } from "./dropdownComposed-
|
|
9
|
+
import { D as ee } from "./dropdownComposed-CnmITmQb.js";
|
|
10
10
|
import { P as T } from "./page-CH1_PpOG.js";
|
|
11
11
|
import { S as re } from "./spinner-_-QbAnd8.js";
|
|
12
12
|
import { r as oe } from "./incodeModule-DtbbjNTQ.js";
|
|
13
|
-
import { P as te } from "./phoneInputComposed-
|
|
13
|
+
import { P as te } from "./phoneInputComposed-DYE5UsRs.js";
|
|
14
14
|
const ae = ({ config: p, onFinish: s }) => {
|
|
15
15
|
const { t: l } = $(), [a, d] = G(() => z({ config: p }));
|
|
16
16
|
return q(() => {
|
package/dist/email/email.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { u as e, S as g, I as v, b as O, a as y, B as C } from "../button-qiC4m4
|
|
|
2
2
|
import { createEmailManager as P } from "@incodetech/core/email";
|
|
3
3
|
import { d as f, y as k, k as w } from "../vendor-preact-BY8u4mdq.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { O as L } from "../otpInput-
|
|
5
|
+
import { O as L } from "../otpInput-B4ic8127.js";
|
|
6
6
|
import { P as E } from "../page-CH1_PpOG.js";
|
|
7
7
|
import { r as S } from "../incodeModule-DtbbjNTQ.js";
|
|
8
8
|
import "../uiConfig-BSR3Bl6G.js";
|
package/dist/extensibility.es.js
CHANGED
|
@@ -9,12 +9,12 @@ import { E as A } from "./errorContent-BudafcKL.js";
|
|
|
9
9
|
import { F as U, V as j } from "./formField-CMNAU-Eh.js";
|
|
10
10
|
import { a as q, C as z, c as G, b as J, e as K, d as N, H as Q, L as X, P as Y } from "./captureFooter-BIPDtCn6.js";
|
|
11
11
|
import { I as _, a as $ } from "./inputComposed-7r-2MfA7.js";
|
|
12
|
-
import { O as ea } from "./otpInput-
|
|
12
|
+
import { O as ea } from "./otpInput-B4ic8127.js";
|
|
13
13
|
import { C as oa, a as ta } from "./checkbox-KYc1FnQr.js";
|
|
14
|
-
import { P as na } from "./phoneInputComposed-
|
|
15
|
-
import { D as ca, S as ia } from "./dropdownComposed-
|
|
14
|
+
import { P as na } from "./phoneInputComposed-DYE5UsRs.js";
|
|
15
|
+
import { D as ca, S as ia } from "./dropdownComposed-CnmITmQb.js";
|
|
16
16
|
import { C as la, D as ma } from "./dateInputComposed-DzB7gNed.js";
|
|
17
|
-
import { f as Ca, C as fa, d as Ia, I as xa, e as ha, F as ga, c as ya, S as Ta, T as va, a as Sa, V as Ba, b as Fa } from "./flipAnimation-
|
|
17
|
+
import { f as Ca, C as fa, d as Ia, I as xa, e as ha, F as ga, c as ya, S as Ta, T as va, a as Sa, V as Ba, b as Fa } from "./flipAnimation-BXWZxnGC.js";
|
|
18
18
|
import { B as La, L as Oa, M as ba, P as Ha } from "./manualCaptureButton-6WD7GhPe.js";
|
|
19
19
|
import { A as i, y as u, q as l } from "./vendor-preact-BY8u4mdq.js";
|
|
20
20
|
import { T as Va, a as Ea, b as ka, c as Da, d as wa, e as Aa } from "./typography-DgyeaZWI.js";
|
|
@@ -9,7 +9,7 @@ import { M as V, L as U, B as n1 } from "./manualCaptureButton-6WD7GhPe.js";
|
|
|
9
9
|
import "@incodetech/core";
|
|
10
10
|
import "./inputComposed-7r-2MfA7.js";
|
|
11
11
|
import "./checkbox-KYc1FnQr.js";
|
|
12
|
-
import "./phoneInputComposed-
|
|
12
|
+
import "./phoneInputComposed-DYE5UsRs.js";
|
|
13
13
|
import "./dateInputComposed-DzB7gNed.js";
|
|
14
14
|
import { E as r1 } from "./errorIcon-DbJL-4MJ.js";
|
|
15
15
|
import { S as l1 } from "./successIcon-C-3-t1kz.js";
|
package/dist/flow/flow.es.js
CHANGED
|
@@ -2003,8 +2003,8 @@ 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-
|
|
2007
|
-
EKYB: () => import("../ekybModule-
|
|
2006
|
+
EXTERNAL_VERIFICATION: () => import("../ekycModule-CmuQbdiJ.js").then((e) => e.EkycModule),
|
|
2007
|
+
EKYB: () => import("../ekybModule-BLdLDQLO.js").then((e) => e.EkybModule),
|
|
2008
2008
|
DOCUMENT_CAPTURE: () => import("../documentCapture-B4JcCGTV.js").then(
|
|
2009
2009
|
(e) => e.DocumentCapture
|
|
2010
2010
|
),
|
package/dist/flow/styles.css
CHANGED
|
@@ -4864,6 +4864,18 @@
|
|
|
4864
4864
|
background-color: var(--surface-neutral-200, var(--color-surface-neutral-200));
|
|
4865
4865
|
}
|
|
4866
4866
|
|
|
4867
|
+
.IncodeDropdownComposedLiveRegion {
|
|
4868
|
+
clip-path: inset(50%);
|
|
4869
|
+
white-space: nowrap;
|
|
4870
|
+
border-width: 0;
|
|
4871
|
+
width: 1px;
|
|
4872
|
+
height: 1px;
|
|
4873
|
+
margin: -1px;
|
|
4874
|
+
padding: 0;
|
|
4875
|
+
position: absolute;
|
|
4876
|
+
overflow: hidden;
|
|
4877
|
+
}
|
|
4878
|
+
|
|
4867
4879
|
.IncodeDropdownComposedNoResults {
|
|
4868
4880
|
padding: var(--spacing-16, var(--spacing-16, 16px));
|
|
4869
4881
|
text-align: center;
|
|
@@ -6,7 +6,7 @@ import "../uiConfig-BSR3Bl6G.js";
|
|
|
6
6
|
import { E as h } from "../errorIcon-DbJL-4MJ.js";
|
|
7
7
|
import { S as c } from "../successIcon-C-3-t1kz.js";
|
|
8
8
|
import { W as I } from "../warningIcon-BEDHbr3Z.js";
|
|
9
|
-
import { O as V } from "../otpInput-
|
|
9
|
+
import { O as V } from "../otpInput-B4ic8127.js";
|
|
10
10
|
import { P as r } from "../page-CH1_PpOG.js";
|
|
11
11
|
import { S as G } from "../spinner-_-QbAnd8.js";
|
|
12
12
|
import { r as S } from "../incodeModule-DtbbjNTQ.js";
|
package/dist/id/id.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import "@incodetech/core";
|
|
|
5
5
|
import { P as p } from "../manualCaptureButton-6WD7GhPe.js";
|
|
6
6
|
import { r as f } from "../incodeModule-DtbbjNTQ.js";
|
|
7
7
|
import { P as C } from "../processing-DW3Cq3ot.js";
|
|
8
|
-
import { d as g, c as h, F as a, C as I, e as y, I as F } from "../flipAnimation-
|
|
8
|
+
import { d as g, c as h, F as a, C as I, e as y, I as F } from "../flipAnimation-BXWZxnGC.js";
|
|
9
9
|
import "../uiConfig-BSR3Bl6G.js";
|
|
10
10
|
import "../typography-DgyeaZWI.js";
|
|
11
11
|
const M = c(
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
import { b as N, u as e, S as
|
|
2
|
-
import { d as R, A as p, q as S, y as
|
|
1
|
+
import { b as N, u as e, S as T, B as g } from "./button-qiC4m4lf.js";
|
|
2
|
+
import { d as R, A as p, q as S, y as I } from "./vendor-preact-BY8u4mdq.js";
|
|
3
3
|
import { a as $ } from "./inputComposed-7r-2MfA7.js";
|
|
4
4
|
import "./uiConfig-BSR3Bl6G.js";
|
|
5
5
|
const s = 6, B = (l) => {
|
|
6
|
-
const c = Math.floor(l / 60),
|
|
7
|
-
return `${c}:${
|
|
6
|
+
const c = Math.floor(l / 60), i = l % 60;
|
|
7
|
+
return `${c}:${i.toString().padStart(2, "0")}`;
|
|
8
8
|
}, k = (l) => l.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, s), q = ({
|
|
9
9
|
resendTimer: l,
|
|
10
10
|
canResend: c,
|
|
11
|
-
error:
|
|
12
|
-
onSubmit:
|
|
11
|
+
error: i,
|
|
12
|
+
onSubmit: u,
|
|
13
13
|
onResend: y,
|
|
14
14
|
onBack: A,
|
|
15
15
|
backLinkText: z = "otp.changePhoneNumber",
|
|
16
|
-
disabled:
|
|
16
|
+
disabled: f = !1,
|
|
17
17
|
isLoading: n = !1
|
|
18
18
|
}) => {
|
|
19
|
-
const { t: o } = N(), [r, C] = R(""),
|
|
19
|
+
const { t: o } = N(), [r, C] = R(""), m = p(null), v = p(0), b = p(null), O = p(c), h = p(), x = S((t) => {
|
|
20
20
|
const a = b.current;
|
|
21
|
-
a && (clearTimeout(
|
|
21
|
+
a && (clearTimeout(h.current), a.textContent = "", h.current = setTimeout(() => {
|
|
22
22
|
a.textContent = t;
|
|
23
23
|
}, 50));
|
|
24
24
|
}, []);
|
|
25
|
-
|
|
25
|
+
I(() => {
|
|
26
26
|
const t = !O.current;
|
|
27
|
-
return O.current = c, t && c &&
|
|
28
|
-
}, [c,
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
31
|
-
u && setTimeout(() => {
|
|
32
|
-
d.current?.focus();
|
|
33
|
-
}, 0);
|
|
34
|
-
}, [u]), m(() => {
|
|
27
|
+
return O.current = c, t && c && x(o("otp.resendCodeAvailable")), () => clearTimeout(h.current);
|
|
28
|
+
}, [c, x, o]), I(() => {
|
|
29
|
+
m.current && m.current.focus();
|
|
30
|
+
}, []), I(() => {
|
|
35
31
|
if (!r) return;
|
|
36
32
|
const t = r.length === s && v.current < s;
|
|
37
|
-
v.current = r.length, t && !n &&
|
|
38
|
-
}, [r, n,
|
|
33
|
+
v.current = r.length, t && !n && u(r);
|
|
34
|
+
}, [r, n, u]);
|
|
39
35
|
const P = (t) => {
|
|
40
36
|
t.target.select();
|
|
41
37
|
}, w = (t) => {
|
|
@@ -43,8 +39,8 @@ const s = 6, B = (l) => {
|
|
|
43
39
|
C(k(a.value));
|
|
44
40
|
}, D = (t) => {
|
|
45
41
|
t.preventDefault();
|
|
46
|
-
const a = t.clipboardData?.getData("text") || "",
|
|
47
|
-
|
|
42
|
+
const a = t.clipboardData?.getData("text") || "", d = k(a);
|
|
43
|
+
d && (C(d), d.length === s && !n && u(d));
|
|
48
44
|
}, M = () => /* @__PURE__ */ e("div", { class: "IncodeOtpInputActions", children: c && !n ? /* @__PURE__ */ e("p", { class: "IncodeOtpInputResendText", "data-testid": "otp-resend-section", children: [
|
|
49
45
|
o("otp.didYouNotGetIt"),
|
|
50
46
|
/* @__PURE__ */ e(
|
|
@@ -53,7 +49,7 @@ const s = 6, B = (l) => {
|
|
|
53
49
|
type: "button",
|
|
54
50
|
class: "IncodeOtpInputLink",
|
|
55
51
|
onClick: y,
|
|
56
|
-
disabled:
|
|
52
|
+
disabled: f || n,
|
|
57
53
|
"data-testid": "otp-resend",
|
|
58
54
|
children: o("otp.resendCode")
|
|
59
55
|
}
|
|
@@ -65,7 +61,7 @@ const s = 6, B = (l) => {
|
|
|
65
61
|
type: "button",
|
|
66
62
|
class: "IncodeOtpInputLink",
|
|
67
63
|
onClick: A,
|
|
68
|
-
disabled:
|
|
64
|
+
disabled: f || n,
|
|
69
65
|
"data-testid": "otp-back",
|
|
70
66
|
children: o(z)
|
|
71
67
|
}
|
|
@@ -87,14 +83,14 @@ const s = 6, B = (l) => {
|
|
|
87
83
|
id: "otp-code",
|
|
88
84
|
type: "text",
|
|
89
85
|
inputMode: "text",
|
|
90
|
-
ref:
|
|
86
|
+
ref: m,
|
|
91
87
|
maxLength: s,
|
|
92
88
|
value: r,
|
|
93
|
-
error:
|
|
89
|
+
error: i,
|
|
94
90
|
onInput: w,
|
|
95
91
|
onPaste: D,
|
|
96
92
|
onFocus: P,
|
|
97
|
-
disabled:
|
|
93
|
+
disabled: f || n,
|
|
98
94
|
autocomplete: "one-time-code",
|
|
99
95
|
"data-testid": "otp-input-0",
|
|
100
96
|
"aria-label": o("otp.verificationCode"),
|
|
@@ -102,12 +98,12 @@ const s = 6, B = (l) => {
|
|
|
102
98
|
showErrorIcon: !0
|
|
103
99
|
}
|
|
104
100
|
),
|
|
105
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(T, {}),
|
|
106
102
|
/* @__PURE__ */ e(
|
|
107
103
|
g,
|
|
108
104
|
{
|
|
109
105
|
onClick: () => {
|
|
110
|
-
r.length === s &&
|
|
106
|
+
r.length === s && u(r);
|
|
111
107
|
},
|
|
112
108
|
disabled: r.length < s || n,
|
|
113
109
|
isLoading: n,
|
|
@@ -115,7 +111,7 @@ const s = 6, B = (l) => {
|
|
|
115
111
|
children: o("common.continue")
|
|
116
112
|
}
|
|
117
113
|
),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
114
|
+
/* @__PURE__ */ e(T, { size: 12 }),
|
|
119
115
|
M()
|
|
120
116
|
] });
|
|
121
117
|
};
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -4,9 +4,9 @@ import { d as S } from "../vendor-preact-BY8u4mdq.js";
|
|
|
4
4
|
import "../uiConfig-BSR3Bl6G.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
6
|
import { C as E } from "../checkbox-KYc1FnQr.js";
|
|
7
|
-
import { O as y } from "../otpInput-
|
|
7
|
+
import { O as y } from "../otpInput-B4ic8127.js";
|
|
8
8
|
import { P as m } from "../page-CH1_PpOG.js";
|
|
9
|
-
import { P as w } from "../phoneInputComposed-
|
|
9
|
+
import { P as w } from "../phoneInputComposed-DYE5UsRs.js";
|
|
10
10
|
import { r as k } from "../incodeModule-DtbbjNTQ.js";
|
|
11
11
|
const B = ({
|
|
12
12
|
config: n,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { u as r } from "./button-qiC4m4lf.js";
|
|
2
|
-
import { D as J, d as
|
|
2
|
+
import { D as J, d as g, A as x, T as M, y as Q, q as A } from "./vendor-preact-BY8u4mdq.js";
|
|
3
3
|
import { w as X, g as I, c as j, b as k } from "./countries-DfLkrF0x.js";
|
|
4
|
-
import { D as z } from "./dropdownComposed-
|
|
4
|
+
import { D as z } from "./dropdownComposed-CnmITmQb.js";
|
|
5
5
|
import { E as q } from "./errorIcon-DbJL-4MJ.js";
|
|
6
6
|
import { S as _ } from "./successIcon-C-3-t1kz.js";
|
|
7
7
|
import { a as e2 } from "./inputComposed-7r-2MfA7.js";
|
|
8
|
-
import { P as n2, p as
|
|
8
|
+
import { P as n2, p as L, A as b } from "./AsYouType-D1H_js4X.js";
|
|
9
9
|
function o2(e, o, a) {
|
|
10
10
|
if (o[e])
|
|
11
11
|
return new n2(e, o[e], a);
|
|
@@ -15,7 +15,7 @@ function t2() {
|
|
|
15
15
|
}
|
|
16
16
|
const r2 = { AC: "40123", AD: "312345", AE: "501234567", AF: "701234567", AG: "2684641234", AI: "2642351234", AL: "672123456", AM: "77123456", AO: "923123456", AR: "91123456789", AS: "6847331234", AT: "664123456", AU: "412345678", AW: "5601234", AX: "412345678", AZ: "401234567", BA: "61123456", BB: "2462501234", BD: "1812345678", BE: "470123456", BF: "70123456", BG: "43012345", BH: "36001234", BI: "79561234", BJ: "0195123456", BL: "690001234", BM: "4413701234", BN: "7123456", BO: "71234567", BQ: "3181234", BR: "11961234567", BS: "2423591234", BT: "17123456", BW: "71123456", BY: "294911911", BZ: "6221234", CA: "5062345678", CC: "412345678", CD: "991234567", CF: "70012345", CG: "061234567", CH: "781234567", CI: "0123456789", CK: "71234", CL: "221234567", CM: "671234567", CN: "13123456789", CO: "3211234567", CR: "83123456", CU: "51234567", CV: "9911234", CW: "95181234", CX: "412345678", CY: "96123456", CZ: "601123456", DE: "15123456789", DJ: "77831001", DK: "34412345", DM: "7672251234", DO: "8092345678", DZ: "551234567", EC: "991234567", EE: "51234567", EG: "1001234567", EH: "650123456", ER: "7123456", ES: "612345678", ET: "911234567", FI: "412345678", FJ: "7012345", FK: "51234", FM: "3501234", FO: "211234", FR: "612345678", GA: "06031234", GB: "7400123456", GD: "4734031234", GE: "555123456", GF: "694201234", GG: "7781123456", GH: "231234567", GI: "57123456", GL: "221234", GM: "3012345", GN: "601123456", GP: "690001234", GQ: "222123456", GR: "6912345678", GT: "51234567", GU: "6713001234", GW: "955012345", GY: "6091234", HK: "51234567", HN: "91234567", HR: "921234567", HT: "34101234", HU: "201234567", ID: "812345678", IE: "850123456", IL: "502345678", IM: "7924123456", IN: "8123456789", IO: "3801234", IQ: "7912345678", IR: "9123456789", IS: "6111234", IT: "3123456789", JE: "7797712345", JM: "8762101234", JO: "790123456", JP: "9012345678", KE: "712123456", KG: "700123456", KH: "91234567", KI: "72001234", KM: "3212345", KN: "8697652917", KP: "1921234567", KR: "1020000000", KW: "50012345", KY: "3453231234", KZ: "7710009998", LA: "2023123456", LB: "71123456", LC: "7582845678", LI: "660234567", LK: "712345678", LR: "770123456", LS: "50123456", LT: "61234567", LU: "628123456", LV: "21234567", LY: "912345678", MA: "650123456", MC: "612345678", MD: "62112345", ME: "60123456", MF: "690001234", MG: "321234567", MH: "2351234", MK: "72345678", ML: "65012345", MM: "92123456", MN: "88123456", MO: "66123456", MP: "6702345678", MQ: "696201234", MR: "22123456", MS: "6644923456", MT: "96961234", MU: "52512345", MV: "7712345", MW: "991234567", MX: "2221234567", MY: "123456789", MZ: "821234567", NA: "811234567", NC: "751234", NE: "93123456", NF: "381234", NG: "8021234567", NI: "81234567", NL: "612345678", NO: "40612345", NP: "9841234567", NR: "5551234", NU: "8884012", NZ: "211234567", OM: "92123456", PA: "61234567", PE: "912345678", PF: "87123456", PG: "70123456", PH: "9051234567", PK: "3012345678", PL: "512345678", PM: "551234", PR: "7872345678", PS: "599123456", PT: "912345678", PW: "6201234", PY: "961456789", QA: "33123456", RE: "692123456", RO: "712034567", RS: "601234567", RU: "9123456789", RW: "720123456", SA: "512345678", SB: "7421234", SC: "2510123", SD: "911231234", SE: "701234567", SG: "81234567", SH: "51234", SI: "31234567", SJ: "41234567", SK: "912123456", SL: "25123456", SM: "66661212", SN: "701234567", SO: "71123456", SR: "7412345", SS: "977123456", ST: "9812345", SV: "70123456", SX: "7215205678", SY: "944567890", SZ: "76123456", TA: "8999", TC: "6492311234", TD: "63012345", TG: "90112345", TH: "812345678", TJ: "917123456", TK: "7290", TL: "77212345", TM: "66123456", TN: "20123456", TO: "7715123", TR: "5012345678", TT: "8682911234", TV: "901234", TW: "912345678", TZ: "621234567", UA: "501234567", UG: "712345678", US: "2015550123", UY: "94231234", UZ: "912345678", VA: "3123456789", VC: "7844301234", VE: "4121234567", VG: "2843001234", VI: "3406421234", VN: "912345678", VU: "5912345", WF: "821234", WS: "7212345", XK: "43201234", YE: "712345678", YT: "639012345", ZA: "711234567", ZM: "955123456", ZW: "712345678" };
|
|
17
17
|
function y(e, o, a) {
|
|
18
|
-
return new
|
|
18
|
+
return new b(a).input(`${o}${e}`).replace(o, "").trimStart();
|
|
19
19
|
}
|
|
20
20
|
function s2(e, o) {
|
|
21
21
|
const a = e.replace(/\D/g, "");
|
|
@@ -56,34 +56,34 @@ const l2 = J(
|
|
|
56
56
|
"data-testid": W,
|
|
57
57
|
...F
|
|
58
58
|
}, H) => {
|
|
59
|
-
const [
|
|
59
|
+
const [d, T] = g(a), [u, f] = g(""), G = x(!1), U = M(
|
|
60
60
|
() => j.map((t) => ({
|
|
61
61
|
value: t.code,
|
|
62
62
|
label: `${t.emoji} ${t.callingCode} ${t.name}`
|
|
63
63
|
})),
|
|
64
64
|
[]
|
|
65
|
-
),
|
|
66
|
-
() => I(
|
|
67
|
-
[
|
|
65
|
+
), i = M(
|
|
66
|
+
() => I(d) ?? I("US"),
|
|
67
|
+
[d]
|
|
68
68
|
), O = M(
|
|
69
|
-
() => c ?? a2(
|
|
70
|
-
[c,
|
|
69
|
+
() => c ?? a2(d),
|
|
70
|
+
[c, d]
|
|
71
71
|
);
|
|
72
72
|
Q(() => {
|
|
73
|
-
if (G.current || !s || !
|
|
73
|
+
if (G.current || !s || !i) return;
|
|
74
74
|
G.current = !0;
|
|
75
|
-
const t = s.startsWith("+") ? s : `+${s}`, n =
|
|
75
|
+
const t = s.startsWith("+") ? s : `+${s}`, n = L(t);
|
|
76
76
|
if (n?.isValid() && n.country) {
|
|
77
|
-
n.country !==
|
|
78
|
-
const p = new
|
|
77
|
+
n.country !== d && T(n.country);
|
|
78
|
+
const p = new b(n.country);
|
|
79
79
|
f(p.input(n.nationalNumber));
|
|
80
80
|
}
|
|
81
|
-
}, [s,
|
|
81
|
+
}, [s, i, d]);
|
|
82
82
|
const C = A(
|
|
83
83
|
(t, n) => {
|
|
84
84
|
const p = `${n.callingCode}${t.replace(/\D/g, "")}`;
|
|
85
85
|
try {
|
|
86
|
-
const Y =
|
|
86
|
+
const Y = L(p, n.code);
|
|
87
87
|
S?.(p, Y?.isValid() ?? !1);
|
|
88
88
|
} catch {
|
|
89
89
|
S?.(p, !1);
|
|
@@ -100,18 +100,18 @@ const l2 = J(
|
|
|
100
100
|
), Z = A(
|
|
101
101
|
(t) => {
|
|
102
102
|
const n = t.target.value;
|
|
103
|
-
if (!
|
|
103
|
+
if (!i) {
|
|
104
104
|
f(n);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
const p = y(
|
|
108
108
|
n,
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
i.callingCode,
|
|
110
|
+
i.code
|
|
111
111
|
);
|
|
112
|
-
f(p), C(n,
|
|
112
|
+
f(p), C(n, i);
|
|
113
113
|
},
|
|
114
|
-
[
|
|
114
|
+
[i, C]
|
|
115
115
|
), v = `${e}-country`, m = `${e}-phone`, E = `${m}-helper`, B = `${m}-error`, w = [h ? E : null, l ? B : null].filter(Boolean).join(" ");
|
|
116
116
|
return /* @__PURE__ */ r("div", { class: "IncodePhoneInputComposed", children: [
|
|
117
117
|
o && /* @__PURE__ */ r(
|
|
@@ -131,14 +131,14 @@ const l2 = J(
|
|
|
131
131
|
{
|
|
132
132
|
id: v,
|
|
133
133
|
options: U,
|
|
134
|
-
value:
|
|
134
|
+
value: d,
|
|
135
135
|
onChange: V,
|
|
136
136
|
disabled: N || R,
|
|
137
137
|
required: P,
|
|
138
138
|
searchable: !0,
|
|
139
139
|
searchPlaceholder: "Search countries...",
|
|
140
140
|
suppressMessages: !0,
|
|
141
|
-
"aria-label":
|
|
141
|
+
"aria-label": `Country code ${i.callingCode}, ${i.name}`,
|
|
142
142
|
renderSelectedLabel: (t) => {
|
|
143
143
|
const n = I(t.value);
|
|
144
144
|
return n ? `${n.emoji} ${n.callingCode}` : t.label;
|
package/dist/themes/dark.css
CHANGED
package/dist/themes/light.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260326-ac8336a",
|
|
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-
|
|
139
|
+
"@incodetech/core": "0.0.0-dev-20260326-ac8336a"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@microsoft/api-extractor": "^7.53.3",
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { u as o, c as M } from "./button-qiC4m4lf.js";
|
|
2
|
-
import { d as D, A as p, y as C } from "./vendor-preact-BY8u4mdq.js";
|
|
3
|
-
import { C as ce } from "./chevronDown-J1Yx1Jy7.js";
|
|
4
|
-
import { E as de } from "./errorIcon-DbJL-4MJ.js";
|
|
5
|
-
import { S as ie } from "./successIcon-C-3-t1kz.js";
|
|
6
|
-
const le = ({ size: s = 20 }) => /* @__PURE__ */ o(
|
|
7
|
-
"svg",
|
|
8
|
-
{
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
width: s,
|
|
11
|
-
height: s,
|
|
12
|
-
viewBox: "0 0 20 20",
|
|
13
|
-
fill: "none",
|
|
14
|
-
class: "IncodeSearchIcon",
|
|
15
|
-
"aria-hidden": "true",
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ o("title", { children: "Search" }),
|
|
18
|
-
/* @__PURE__ */ o(
|
|
19
|
-
"path",
|
|
20
|
-
{
|
|
21
|
-
d: "M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z",
|
|
22
|
-
stroke: "var(--icon-neutral-300)",
|
|
23
|
-
"stroke-width": "2",
|
|
24
|
-
"stroke-linecap": "round",
|
|
25
|
-
"stroke-linejoin": "round"
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ o(
|
|
29
|
-
"path",
|
|
30
|
-
{
|
|
31
|
-
d: "M19 19L14.65 14.65",
|
|
32
|
-
stroke: "var(--icon-neutral-300)",
|
|
33
|
-
"stroke-width": "2",
|
|
34
|
-
"stroke-linecap": "round",
|
|
35
|
-
"stroke-linejoin": "round"
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
), ve = ({
|
|
41
|
-
id: s,
|
|
42
|
-
label: u,
|
|
43
|
-
placeholder: b = "Choose an option",
|
|
44
|
-
value: g,
|
|
45
|
-
options: k,
|
|
46
|
-
onChange: Q,
|
|
47
|
-
error: l,
|
|
48
|
-
helper: y,
|
|
49
|
-
showErrorIcon: U,
|
|
50
|
-
showHelperIcon: V,
|
|
51
|
-
suppressMessages: S = !1,
|
|
52
|
-
disabled: f = !1,
|
|
53
|
-
required: T,
|
|
54
|
-
searchable: w = !1,
|
|
55
|
-
searchPlaceholder: W = "Search...",
|
|
56
|
-
noResultsText: Z = "No results found",
|
|
57
|
-
name: H,
|
|
58
|
-
tabIndex: _,
|
|
59
|
-
onKeyDown: G,
|
|
60
|
-
onBlur: J,
|
|
61
|
-
renderSelectedLabel: K,
|
|
62
|
-
siblingElement: x,
|
|
63
|
-
enterKeyHint: pe,
|
|
64
|
-
class: P,
|
|
65
|
-
"data-testid": X
|
|
66
|
-
}) => {
|
|
67
|
-
const [n, d] = D(!1), [Y, L] = D(!1), [a, t] = D(-1), [$, O] = D(""), B = p(null), m = p(null), j = p(null), R = p([]), A = p(null), E = p(""), h = p(), v = k.find((e) => e.value === g), c = w && $ ? k.filter(
|
|
68
|
-
(e) => e.label.toLowerCase().includes($.toLowerCase())
|
|
69
|
-
) : k, F = `${s}-label`, z = `${s}-listbox`, N = `${s}-helper`, q = `${s}-error`, ee = S ? "" : [y ? N : null, l ? q : null].filter(Boolean).join(" ");
|
|
70
|
-
C(() => {
|
|
71
|
-
if (!n) return;
|
|
72
|
-
const e = requestAnimationFrame(() => {
|
|
73
|
-
w && A.current && A.current.focus(), requestAnimationFrame(() => {
|
|
74
|
-
j.current?.scrollIntoView({
|
|
75
|
-
behavior: "smooth",
|
|
76
|
-
block: "nearest",
|
|
77
|
-
inline: "nearest"
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
return () => cancelAnimationFrame(e);
|
|
82
|
-
}, [n, w]), C(() => {
|
|
83
|
-
n || (t(-1), O(""));
|
|
84
|
-
}, [n]), C(() => {
|
|
85
|
-
a >= 0 && R.current[a] && R.current[a]?.scrollIntoView({
|
|
86
|
-
block: "nearest",
|
|
87
|
-
inline: "nearest"
|
|
88
|
-
});
|
|
89
|
-
}, [a]), C(() => () => {
|
|
90
|
-
h.current && clearTimeout(h.current);
|
|
91
|
-
}, []);
|
|
92
|
-
const oe = () => {
|
|
93
|
-
f || d((e) => !e);
|
|
94
|
-
}, I = (e) => {
|
|
95
|
-
Q(e), d(!1), t(-1), m.current?.focus();
|
|
96
|
-
}, re = () => {
|
|
97
|
-
L(!0);
|
|
98
|
-
}, ne = (e) => {
|
|
99
|
-
L(!1), B.current?.contains(e.relatedTarget) || (d(!1), J?.());
|
|
100
|
-
}, te = (e) => {
|
|
101
|
-
if (f) return;
|
|
102
|
-
G?.(e);
|
|
103
|
-
const { key: i } = e;
|
|
104
|
-
if (i.length === 1 && /^[a-zA-Z0-9]$/.test(i)) {
|
|
105
|
-
e.preventDefault(), h.current && clearTimeout(h.current), E.current += i.toLowerCase();
|
|
106
|
-
const r = c.findIndex(
|
|
107
|
-
(se) => se.label.toLowerCase().startsWith(E.current)
|
|
108
|
-
);
|
|
109
|
-
r !== -1 && (n || d(!0), t(r)), h.current = setTimeout(() => {
|
|
110
|
-
E.current = "";
|
|
111
|
-
}, 500);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
switch (i) {
|
|
115
|
-
case "ArrowDown":
|
|
116
|
-
e.preventDefault(), n ? t(
|
|
117
|
-
(r) => r < c.length - 1 ? r + 1 : r
|
|
118
|
-
) : (d(!0), t(0));
|
|
119
|
-
break;
|
|
120
|
-
case "ArrowUp":
|
|
121
|
-
e.preventDefault(), n ? t((r) => r > 0 ? r - 1 : r) : (d(!0), t(c.length - 1));
|
|
122
|
-
break;
|
|
123
|
-
case "Home":
|
|
124
|
-
e.preventDefault(), n && t(0);
|
|
125
|
-
break;
|
|
126
|
-
case "End":
|
|
127
|
-
e.preventDefault(), n && t(c.length - 1);
|
|
128
|
-
break;
|
|
129
|
-
case "Enter":
|
|
130
|
-
e.preventDefault(), n && a >= 0 && c[a] ? I(c[a].value) : n || d(!0);
|
|
131
|
-
break;
|
|
132
|
-
case " ":
|
|
133
|
-
e.preventDefault(), n && a >= 0 && c[a] ? I(c[a].value) : n || (d(!0), t(0));
|
|
134
|
-
break;
|
|
135
|
-
case "Escape":
|
|
136
|
-
e.preventDefault(), n && (d(!1), t(-1), m.current?.focus());
|
|
137
|
-
break;
|
|
138
|
-
case "Tab":
|
|
139
|
-
n && (d(!1), t(-1));
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
}, ae = (e) => {
|
|
143
|
-
const { key: i } = e;
|
|
144
|
-
switch (i) {
|
|
145
|
-
case "ArrowDown":
|
|
146
|
-
e.preventDefault(), t(
|
|
147
|
-
(r) => r < c.length - 1 ? r + 1 : r
|
|
148
|
-
);
|
|
149
|
-
break;
|
|
150
|
-
case "ArrowUp":
|
|
151
|
-
e.preventDefault(), t((r) => r > 0 ? r - 1 : r);
|
|
152
|
-
break;
|
|
153
|
-
case "Home":
|
|
154
|
-
e.preventDefault(), t(0);
|
|
155
|
-
break;
|
|
156
|
-
case "End":
|
|
157
|
-
e.preventDefault(), t(c.length - 1);
|
|
158
|
-
break;
|
|
159
|
-
case "Enter":
|
|
160
|
-
e.preventDefault(), a >= 0 && c[a] && I(c[a].value);
|
|
161
|
-
break;
|
|
162
|
-
case "Escape":
|
|
163
|
-
e.preventDefault(), d(!1), t(-1), m.current?.focus();
|
|
164
|
-
break;
|
|
165
|
-
case "Tab":
|
|
166
|
-
d(!1), t(-1);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
return /* @__PURE__ */ o(
|
|
171
|
-
"div",
|
|
172
|
-
{
|
|
173
|
-
class: M("IncodeDropdownComposed", P),
|
|
174
|
-
ref: B,
|
|
175
|
-
onBlur: ne,
|
|
176
|
-
children: [
|
|
177
|
-
H && /* @__PURE__ */ o(
|
|
178
|
-
"input",
|
|
179
|
-
{
|
|
180
|
-
type: "hidden",
|
|
181
|
-
name: H,
|
|
182
|
-
value: g || "",
|
|
183
|
-
disabled: f,
|
|
184
|
-
required: T
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
u && /* @__PURE__ */ o(
|
|
188
|
-
"label",
|
|
189
|
-
{
|
|
190
|
-
class: "IncodeDropdownComposedLabel",
|
|
191
|
-
id: F,
|
|
192
|
-
htmlFor: s,
|
|
193
|
-
"data-testid": `${s}-label`,
|
|
194
|
-
children: [
|
|
195
|
-
u,
|
|
196
|
-
T && /* @__PURE__ */ o("span", { class: "IncodeDropdownComposedRequired", children: " *" })
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
),
|
|
200
|
-
/* @__PURE__ */ o("div", { class: "IncodeDropdownComposedWrapper", children: [
|
|
201
|
-
/* @__PURE__ */ o(
|
|
202
|
-
"div",
|
|
203
|
-
{
|
|
204
|
-
class: M("IncodeDropdownComposedTriggerRow", {
|
|
205
|
-
IncodeDropdownComposedTriggerRowWithSibling: !!x
|
|
206
|
-
}),
|
|
207
|
-
children: [
|
|
208
|
-
/* @__PURE__ */ o(
|
|
209
|
-
"button",
|
|
210
|
-
{
|
|
211
|
-
ref: m,
|
|
212
|
-
type: "button",
|
|
213
|
-
id: s,
|
|
214
|
-
class: "IncodeDropdownComposedTrigger",
|
|
215
|
-
onClick: oe,
|
|
216
|
-
onFocus: re,
|
|
217
|
-
onKeyDown: te,
|
|
218
|
-
tabIndex: f ? -1 : _ ?? 0,
|
|
219
|
-
disabled: f,
|
|
220
|
-
"aria-haspopup": "listbox",
|
|
221
|
-
"aria-expanded": n ? "true" : "false",
|
|
222
|
-
"aria-disabled": f ? "true" : void 0,
|
|
223
|
-
"aria-labelledby": u ? F : void 0,
|
|
224
|
-
"aria-label": u ? void 0 : b,
|
|
225
|
-
"aria-controls": n ? z : void 0,
|
|
226
|
-
"aria-activedescendant": n && a >= 0 ? `${s}-option-${a}` : void 0,
|
|
227
|
-
"aria-invalid": l ? "true" : void 0,
|
|
228
|
-
"aria-required": T ? "true" : void 0,
|
|
229
|
-
"aria-describedby": ee || void 0,
|
|
230
|
-
"data-error": l ? "true" : void 0,
|
|
231
|
-
"data-focused": Y || n ? "true" : void 0,
|
|
232
|
-
"data-testid": X,
|
|
233
|
-
children: [
|
|
234
|
-
/* @__PURE__ */ o(
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
class: v ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
|
|
238
|
-
children: v ? K ? K(v) : v.label : b
|
|
239
|
-
}
|
|
240
|
-
),
|
|
241
|
-
/* @__PURE__ */ o(
|
|
242
|
-
"span",
|
|
243
|
-
{
|
|
244
|
-
class: "IncodeDropdownComposedTriggerIcon",
|
|
245
|
-
"aria-hidden": "true",
|
|
246
|
-
"data-open": n,
|
|
247
|
-
children: /* @__PURE__ */ o(ce, {})
|
|
248
|
-
}
|
|
249
|
-
)
|
|
250
|
-
]
|
|
251
|
-
}
|
|
252
|
-
),
|
|
253
|
-
x && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSibling", children: x })
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
),
|
|
257
|
-
n && /* @__PURE__ */ o(
|
|
258
|
-
"div",
|
|
259
|
-
{
|
|
260
|
-
ref: j,
|
|
261
|
-
id: z,
|
|
262
|
-
class: "IncodeDropdownComposedList",
|
|
263
|
-
role: "listbox",
|
|
264
|
-
"aria-labelledby": u ? F : void 0,
|
|
265
|
-
"aria-label": u ? void 0 : b,
|
|
266
|
-
"data-error": l ? "true" : void 0,
|
|
267
|
-
children: [
|
|
268
|
-
w && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSearchWrapper", children: /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedSearchInner", children: [
|
|
269
|
-
/* @__PURE__ */ o(
|
|
270
|
-
"input",
|
|
271
|
-
{
|
|
272
|
-
ref: A,
|
|
273
|
-
type: "text",
|
|
274
|
-
class: "IncodeDropdownComposedSearchInput",
|
|
275
|
-
value: $,
|
|
276
|
-
onInput: (e) => {
|
|
277
|
-
O(e.target.value), t(0);
|
|
278
|
-
},
|
|
279
|
-
onKeyDown: ae,
|
|
280
|
-
placeholder: W,
|
|
281
|
-
"aria-label": W,
|
|
282
|
-
autocomplete: "off"
|
|
283
|
-
}
|
|
284
|
-
),
|
|
285
|
-
/* @__PURE__ */ o(
|
|
286
|
-
"span",
|
|
287
|
-
{
|
|
288
|
-
class: "IncodeDropdownComposedSearchIcon",
|
|
289
|
-
"aria-hidden": "true",
|
|
290
|
-
children: /* @__PURE__ */ o(le, { size: 20 })
|
|
291
|
-
}
|
|
292
|
-
)
|
|
293
|
-
] }) }),
|
|
294
|
-
/* @__PURE__ */ o("div", { class: "IncodeDropdownComposedOptionsScroll", children: c.length === 0 ? /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedNoResults", children: Z }) : c.map((e, i) => /* @__PURE__ */ o(
|
|
295
|
-
"div",
|
|
296
|
-
{
|
|
297
|
-
id: `${s}-option-${i}`,
|
|
298
|
-
role: "option",
|
|
299
|
-
"aria-selected": g === e.value ? "true" : "false",
|
|
300
|
-
class: "IncodeDropdownComposedOption",
|
|
301
|
-
"data-highlighted": a === i,
|
|
302
|
-
ref: (r) => {
|
|
303
|
-
R.current[i] = r;
|
|
304
|
-
},
|
|
305
|
-
onClick: () => I(e.value),
|
|
306
|
-
onMouseDown: (r) => r.preventDefault(),
|
|
307
|
-
onMouseEnter: () => t(i),
|
|
308
|
-
children: e.label
|
|
309
|
-
},
|
|
310
|
-
e.value
|
|
311
|
-
)) })
|
|
312
|
-
]
|
|
313
|
-
}
|
|
314
|
-
)
|
|
315
|
-
] }),
|
|
316
|
-
!S && l && /* @__PURE__ */ o(
|
|
317
|
-
"div",
|
|
318
|
-
{
|
|
319
|
-
class: "IncodeDropdownComposedErrorWrapper",
|
|
320
|
-
"data-testid": `${s}-error-wrapper`,
|
|
321
|
-
children: [
|
|
322
|
-
U && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ o(de, { size: 17 }) }),
|
|
323
|
-
/* @__PURE__ */ o("p", { id: q, class: "IncodeDropdownComposedError", children: l })
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
),
|
|
327
|
-
!S && y && !l && /* @__PURE__ */ o(
|
|
328
|
-
"div",
|
|
329
|
-
{
|
|
330
|
-
class: "IncodeDropdownComposedHelperWrapper",
|
|
331
|
-
"data-testid": `${s}-helper-wrapper`,
|
|
332
|
-
children: [
|
|
333
|
-
V && /* @__PURE__ */ o("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ o(ie, { size: 17 }) }),
|
|
334
|
-
/* @__PURE__ */ o("p", { id: N, class: "IncodeDropdownComposedHelper", children: y })
|
|
335
|
-
]
|
|
336
|
-
}
|
|
337
|
-
)
|
|
338
|
-
]
|
|
339
|
-
}
|
|
340
|
-
);
|
|
341
|
-
};
|
|
342
|
-
export {
|
|
343
|
-
ve as D,
|
|
344
|
-
le as S
|
|
345
|
-
};
|