se-design 1.0.87-dev.1 → 1.0.87
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/components/InputWithTags/index.d.ts +2 -3
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +2 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -2
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +2 -2
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +2 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +2 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +2 -2
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +1 -1
- package/dist/index160.js +2 -2
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +2 -2
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +2 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -2
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +1 -1
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +1 -1
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +1 -1
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +1 -1
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +1 -1
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +2 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +149 -2
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +9 -149
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +5 -8
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -5
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +1 -1
- package/dist/{index225.js → index224.js} +1 -1
- package/dist/{index225.js.map → index224.js.map} +1 -1
- package/dist/index23.js +16 -16
- package/dist/index23.js.map +1 -1
- package/dist/{index233.js → index232.js} +1 -1
- package/dist/{index233.js.map → index232.js.map} +1 -1
- package/dist/{index236.js → index235.js} +1 -1
- package/dist/{index236.js.map → index235.js.map} +1 -1
- package/dist/index244.js +173 -0
- package/dist/index244.js.map +1 -0
- package/dist/index245.js +3 -169
- package/dist/index245.js.map +1 -1
- package/dist/index247.js +22 -0
- package/dist/index247.js.map +1 -0
- package/dist/index248.js +9 -18
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +9 -9
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +1 -2
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +4 -9
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +170 -5
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +11 -170
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +6 -11
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +5 -5
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +37 -5
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +2 -38
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +8 -2
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +326 -7
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +47 -324
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +2 -50
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +76 -2
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +82 -65
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +48 -89
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +7 -51
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +4 -7
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +51 -4
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +2 -52
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +2 -2
- package/dist/index29.js +1 -1
- package/dist/index30.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +40 -54
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +112 -113
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +51 -55
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +1 -1
- package/dist/index45.js +38 -39
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +51 -52
- package/dist/index46.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index6.js +102 -104
- package/dist/index6.js.map +1 -1
- package/dist/index61.js +1 -1
- package/dist/index63.js +1 -1
- package/dist/index65.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.js +7 -9
- package/dist/index81.js.map +1 -1
- package/dist/index9.js +20 -20
- package/dist/index9.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/cloud-check.svg +0 -4
- package/dist/index223.js +0 -8
- package/dist/index223.js.map +0 -1
- package/dist/index246.js +0 -7
- package/dist/index246.js.map +0 -1
- package/dist/index269.js +0 -5
- package/dist/index269.js.map +0 -1
package/dist/index46.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import t, { useState as h, useRef as f, useCallback as g, useEffect as
|
|
1
|
+
import t, { useState as h, useRef as f, useCallback as g, useEffect as _ } from "react";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import C from "./
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { useStableId as
|
|
6
|
-
import { getA11yNameAttributes as
|
|
3
|
+
import C from "./index232.js";
|
|
4
|
+
import { Icon as M } from "./index6.js";
|
|
5
|
+
import { useStableId as v } from "./index205.js";
|
|
6
|
+
import { getA11yNameAttributes as T } from "./index81.js";
|
|
7
7
|
import "./index72.js";
|
|
8
8
|
import { useCombobox as le } from "./index68.js";
|
|
9
9
|
function c() {
|
|
@@ -15,7 +15,7 @@ function c() {
|
|
|
15
15
|
return i;
|
|
16
16
|
}, c.apply(null, arguments);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const ve = ({
|
|
19
19
|
onCountrycodeChange: i,
|
|
20
20
|
onNumberChange: l,
|
|
21
21
|
error: r,
|
|
@@ -23,86 +23,85 @@ const ye = ({
|
|
|
23
23
|
value: d,
|
|
24
24
|
label: s,
|
|
25
25
|
automationId: p = "",
|
|
26
|
-
ariaLabel:
|
|
27
|
-
ariaLabelledBy:
|
|
26
|
+
ariaLabel: P,
|
|
27
|
+
ariaLabelledBy: x,
|
|
28
28
|
ariaDescribedBy: z,
|
|
29
|
-
phoneNumberAriaLabel:
|
|
29
|
+
phoneNumberAriaLabel: $,
|
|
30
30
|
countryCodeAriaLabel: G,
|
|
31
31
|
disabled: a = !1
|
|
32
32
|
}) => {
|
|
33
|
-
const [
|
|
34
|
-
y(!1),
|
|
33
|
+
const [E, k] = h(d?.countryCode || C[0].dial_code), [n, y] = h(!1), [w, B] = h(C), [Q, R] = h(""), [U, F] = h(""), W = f(null), O = f(null), K = f(null), m = f(!1), N = v(p, "phone-label"), V = v(p, "phone-listbox"), X = v(p, "phone-input"), j = v(p, "phone-error"), b = C.find((e) => e.dial_code === E), q = g(() => {
|
|
34
|
+
y(!1), R(""), B(C);
|
|
35
35
|
}, []), I = g((e) => {
|
|
36
|
-
e && (
|
|
37
|
-
}, [i,
|
|
36
|
+
e && (k(e), i(e)), q();
|
|
37
|
+
}, [i, q]), Y = g((e) => {
|
|
38
38
|
m.current = !0, I(e.dial_code);
|
|
39
39
|
}, [I]), {
|
|
40
|
-
containerProps:
|
|
40
|
+
containerProps: H,
|
|
41
41
|
inputProps: Z,
|
|
42
42
|
listboxProps: ee,
|
|
43
43
|
getOptionProps: te,
|
|
44
44
|
highlightedIndex: ne,
|
|
45
|
-
setHighlightedIndex:
|
|
45
|
+
setHighlightedIndex: J
|
|
46
46
|
} = le({
|
|
47
47
|
items: w,
|
|
48
48
|
isOpen: n,
|
|
49
49
|
onOpenChange: y,
|
|
50
50
|
onSelect: Y,
|
|
51
|
-
listboxId:
|
|
51
|
+
listboxId: V
|
|
52
52
|
}), oe = (e) => {
|
|
53
53
|
const o = e.target.value;
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
54
|
+
R(o), J(-1);
|
|
55
|
+
const S = C.filter((A) => A.name.toLowerCase().includes(o.toLowerCase()) || A.dial_code.toLowerCase().includes(o.toLowerCase()) || A.code.toLowerCase().includes(o.toLowerCase()));
|
|
56
|
+
B(S);
|
|
57
57
|
}, D = f(n);
|
|
58
|
-
|
|
58
|
+
_(() => {
|
|
59
59
|
let e = null;
|
|
60
60
|
return D.current && !n && m.current && (e = requestAnimationFrame(() => {
|
|
61
|
-
|
|
61
|
+
O.current?.focus();
|
|
62
62
|
})), D.current && !n && (m.current = !1), D.current = n, () => {
|
|
63
63
|
e !== null && cancelAnimationFrame(e);
|
|
64
64
|
};
|
|
65
|
-
}, [n]),
|
|
66
|
-
d && (
|
|
67
|
-
}, [d]),
|
|
65
|
+
}, [n]), _(() => {
|
|
66
|
+
d && (k(d.countryCode), F(d.number));
|
|
67
|
+
}, [d]), _(() => {
|
|
68
68
|
let e = null;
|
|
69
69
|
return n && (e = requestAnimationFrame(() => {
|
|
70
|
-
|
|
70
|
+
K.current?.focus();
|
|
71
71
|
})), () => {
|
|
72
72
|
e !== null && cancelAnimationFrame(e);
|
|
73
73
|
};
|
|
74
74
|
}, [n]);
|
|
75
75
|
const re = (e) => {
|
|
76
76
|
const o = e.replace(/\D/g, "");
|
|
77
|
-
|
|
78
|
-
},
|
|
77
|
+
F(o), l(o);
|
|
78
|
+
}, L = g(() => {
|
|
79
79
|
a || y((e) => !e);
|
|
80
80
|
}, [a]), ae = g((e) => {
|
|
81
81
|
if (!a)
|
|
82
82
|
switch (e.key) {
|
|
83
83
|
case "Enter":
|
|
84
84
|
case " ":
|
|
85
|
-
e.preventDefault(),
|
|
85
|
+
e.preventDefault(), L();
|
|
86
86
|
break;
|
|
87
87
|
case "ArrowDown":
|
|
88
88
|
e.preventDefault(), n || y(!0);
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
|
-
}, [a, n,
|
|
92
|
-
ariaLabelledBy:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}), ie = G || `Select country code. Current: ${E?.name} ${E?.dial_code}`;
|
|
91
|
+
}, [a, n, L]), ce = T({
|
|
92
|
+
ariaLabelledBy: x || (!P && s ? N : void 0),
|
|
93
|
+
ariaLabel: x ? void 0 : P || (s ? void 0 : "Phone number")
|
|
94
|
+
}), se = T({
|
|
95
|
+
ariaLabelledBy: !$ && s ? N : void 0,
|
|
96
|
+
ariaLabel: $ || (s ? void 0 : "Phone number"),
|
|
97
|
+
ariaDescribedBy: r ? j : z
|
|
98
|
+
}), ie = G || `Select country code. Current: ${b?.name} ${b?.dial_code}`;
|
|
100
99
|
return /* @__PURE__ */ t.createElement("div", c({
|
|
101
100
|
className: "phone-input-container-se-design-main-container",
|
|
102
101
|
"data-automation-id": p
|
|
103
|
-
},
|
|
102
|
+
}, H, {
|
|
104
103
|
onKeyDownCapture: (e) => {
|
|
105
|
-
e.key === "Escape" && n && (m.current = !0),
|
|
104
|
+
e.key === "Escape" && n && (m.current = !0), H.onKeyDownCapture(e);
|
|
106
105
|
}
|
|
107
106
|
}), s && /* @__PURE__ */ t.createElement("div", {
|
|
108
107
|
id: N,
|
|
@@ -115,23 +114,23 @@ const ye = ({
|
|
|
115
114
|
}), /* @__PURE__ */ t.createElement("div", {
|
|
116
115
|
className: "phone-input-container-se-design"
|
|
117
116
|
}, /* @__PURE__ */ t.createElement("button", {
|
|
118
|
-
ref:
|
|
117
|
+
ref: O,
|
|
119
118
|
type: "button",
|
|
120
119
|
className: `phone-input-container-se-design-country-code focus-outline rounded ${a ? "cursor-not-allowed opacity-60" : ""}`,
|
|
121
|
-
onClick:
|
|
120
|
+
onClick: L,
|
|
122
121
|
onKeyDown: ae,
|
|
123
122
|
"aria-haspopup": "listbox",
|
|
124
123
|
"aria-expanded": n,
|
|
125
|
-
"aria-controls": n ?
|
|
124
|
+
"aria-controls": n ? V : void 0,
|
|
126
125
|
"aria-label": ie,
|
|
127
126
|
disabled: a,
|
|
128
127
|
"data-automation-id": "country-code-selector"
|
|
129
128
|
}, /* @__PURE__ */ t.createElement("img", {
|
|
130
|
-
src: `https://flagcdn.com/${
|
|
129
|
+
src: `https://flagcdn.com/${b?.code.toLowerCase()}.svg`,
|
|
131
130
|
alt: "",
|
|
132
131
|
"aria-hidden": "true",
|
|
133
132
|
width: "16"
|
|
134
|
-
}), /* @__PURE__ */ t.createElement("span", null,
|
|
133
|
+
}), /* @__PURE__ */ t.createElement("span", null, b?.dial_code), /* @__PURE__ */ t.createElement(M, {
|
|
135
134
|
name: "chevron",
|
|
136
135
|
className: n ? "rotate-180" : "",
|
|
137
136
|
"aria-hidden": "true"
|
|
@@ -156,12 +155,12 @@ const ye = ({
|
|
|
156
155
|
"data-automation-id": "country-code-list"
|
|
157
156
|
}), /* @__PURE__ */ t.createElement("div", {
|
|
158
157
|
className: "search-input-wrapper"
|
|
159
|
-
}, /* @__PURE__ */ t.createElement(
|
|
158
|
+
}, /* @__PURE__ */ t.createElement(M, {
|
|
160
159
|
name: "search",
|
|
161
160
|
className: "search-icon",
|
|
162
161
|
"aria-hidden": "true"
|
|
163
162
|
}), /* @__PURE__ */ t.createElement("input", c({
|
|
164
|
-
ref:
|
|
163
|
+
ref: K
|
|
165
164
|
}, Z, {
|
|
166
165
|
type: "text",
|
|
167
166
|
placeholder: "Search countries",
|
|
@@ -171,15 +170,15 @@ const ye = ({
|
|
|
171
170
|
"aria-label": "Search countries",
|
|
172
171
|
"data-automation-id": "country-code-search-input"
|
|
173
172
|
}))), w.length > 0 ? w.map((e, o) => {
|
|
174
|
-
const
|
|
173
|
+
const S = te(o, e.dial_code === E);
|
|
175
174
|
return /* @__PURE__ */ t.createElement("div", c({
|
|
176
175
|
key: e.code
|
|
177
|
-
},
|
|
178
|
-
className: `phone-input-container-se-design-country-code-list-item ${ne === o ? "highlighted" : ""} ${e.dial_code ===
|
|
176
|
+
}, S, {
|
|
177
|
+
className: `phone-input-container-se-design-country-code-list-item ${ne === o ? "highlighted" : ""} ${e.dial_code === E ? "selected" : ""}`,
|
|
179
178
|
onClick: () => {
|
|
180
179
|
m.current = !0, I(e.dial_code);
|
|
181
180
|
},
|
|
182
|
-
onMouseEnter: () =>
|
|
181
|
+
onMouseEnter: () => J(o)
|
|
183
182
|
}), /* @__PURE__ */ t.createElement("img", {
|
|
184
183
|
src: `https://flagcdn.com/${e.code.toLowerCase()}.svg`,
|
|
185
184
|
alt: "",
|
|
@@ -190,12 +189,12 @@ const ye = ({
|
|
|
190
189
|
className: "phone-input-container-se-design-country-code-list-item-no-results",
|
|
191
190
|
role: "status"
|
|
192
191
|
}, "No results found"))), r && /* @__PURE__ */ t.createElement("div", {
|
|
193
|
-
id:
|
|
192
|
+
id: j,
|
|
194
193
|
className: "error-message",
|
|
195
194
|
role: "alert"
|
|
196
195
|
}, u));
|
|
197
196
|
};
|
|
198
197
|
export {
|
|
199
|
-
|
|
198
|
+
ve as PhoneInput
|
|
200
199
|
};
|
|
201
200
|
//# sourceMappingURL=index46.js.map
|
package/dist/index46.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index46.js","sources":["../src/components/PhoneInput/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, useCallback } from 'react';\nimport './style.scss';\nimport countriesInfoJson from './countriesInfo.json';\nimport { Icon } from '../Icon';\nimport { useStableId } from '../../utils/useStableId';\nimport { getA11yNameAttributes, useCombobox } from '../../utils/a11y';\n\nexport interface PhoneInputProps {\n onCountrycodeChange: (countryCode: string) => void;\n onNumberChange: (number: string) => void;\n error?: boolean;\n errorMessage?: string;\n value?: {\n countryCode: string;\n number: string;\n };\n label?: string;\n automationId?: string;\n /**\n * Accessible label for the entire phone input group (role=\"group\").\n * Provides context for screen readers (e.g., \"Two-step verification phone number for signer 1\").\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label the group (highest precedence over ariaLabel).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) providing additional description for the phone number input.\n */\n ariaDescribedBy?: string;\n /**\n * Override aria-label for the phone number input specifically.\n * Defaults to the visible label text or 'Phone number'.\n */\n phoneNumberAriaLabel?: string;\n /**\n * Override aria-label for the country code combobox button.\n * Defaults to \"Select country code. Current: {name} {dial_code}\".\n */\n countryCodeAriaLabel?: string;\n /**\n * Whether the input is disabled\n */\n disabled?: boolean;\n}\n\nexport const PhoneInput: React.FC<PhoneInputProps> = ({\n onCountrycodeChange,\n onNumberChange,\n error,\n errorMessage,\n value,\n label,\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n phoneNumberAriaLabel,\n countryCodeAriaLabel,\n disabled = false\n}) => {\n const [countryCode, setCountryCode] = useState(value?.countryCode || countriesInfoJson[0].dial_code);\n const [displaySelectCountryCode, setDisplaySelectCountryCode] = useState(false);\n const [countriesInfo, setCountriesInfo] = useState(countriesInfoJson);\n const [searchValue, setSearchValue] = useState('');\n const [enteredNumber, setEnteredNumber] = useState('');\n const containerRef = useRef<HTMLDivElement>(null);\n const countryButtonRef = useRef<HTMLButtonElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const restoreFocusToButtonRef = useRef(false);\n\n // Generate stable IDs for ARIA relationships\n const labelId = useStableId(automationId, 'phone-label');\n const listboxId = useStableId(automationId, 'phone-listbox');\n const phoneInputId = useStableId(automationId, 'phone-input');\n const errorId = useStableId(automationId, 'phone-error');\n\n const countryInfo = countriesInfoJson.find((country) => country.dial_code === countryCode);\n\n // Close dropdown and reset state\n const closeDropdown = useCallback(() => {\n setDisplaySelectCountryCode(false);\n setSearchValue('');\n setCountriesInfo(countriesInfoJson);\n }, []);\n\n const handleCountryCodeSelect = useCallback(\n (country: string) => {\n if (country) {\n setCountryCode(country);\n onCountrycodeChange(country);\n }\n closeDropdown();\n // Focus return is handled by useEffect that watches displaySelectCountryCode\n },\n [onCountrycodeChange, closeDropdown]\n );\n\n const handleSelectFromDropdown = useCallback(\n (country: typeof countriesInfoJson[0]) => {\n restoreFocusToButtonRef.current = true;\n handleCountryCodeSelect(country.dial_code);\n },\n [handleCountryCodeSelect]\n );\n\n // Use comprehensive useCombobox hook for country search\n const {\n containerProps,\n inputProps: comboboxInputProps,\n listboxProps,\n getOptionProps,\n highlightedIndex,\n setHighlightedIndex\n } = useCombobox({\n items: countriesInfo,\n isOpen: displaySelectCountryCode,\n onOpenChange: setDisplaySelectCountryCode,\n onSelect: handleSelectFromDropdown,\n listboxId\n });\n\n const handleCountryCodeSearch = (event: React.ChangeEvent<HTMLInputElement>) => {\n const searchVal = event.target.value;\n setSearchValue(searchVal);\n setHighlightedIndex(-1);\n const filteredCountries = countriesInfoJson.filter(\n (country) =>\n country.name.toLowerCase().includes(searchVal.toLowerCase()) ||\n country.dial_code.toLowerCase().includes(searchVal.toLowerCase()) ||\n country.code.toLowerCase().includes(searchVal.toLowerCase())\n );\n setCountriesInfo(filteredCountries);\n };\n\n // Return focus to button when dropdown closes\n const prevDisplaySelectCountryCodeRef = useRef(displaySelectCountryCode);\n useEffect(() => {\n let rafId: number | null = null;\n // If dropdown was open and is now closed, return focus to button\n // ONLY when the close was triggered from within the component (Escape/selection),\n // not when the user moved focus outside (focus-out dismissal).\n if (prevDisplaySelectCountryCodeRef.current && !displaySelectCountryCode && restoreFocusToButtonRef.current) {\n rafId = requestAnimationFrame(() => {\n countryButtonRef.current?.focus();\n });\n }\n if (prevDisplaySelectCountryCodeRef.current && !displaySelectCountryCode) {\n restoreFocusToButtonRef.current = false;\n }\n prevDisplaySelectCountryCodeRef.current = displaySelectCountryCode;\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n };\n }, [displaySelectCountryCode]);\n\n useEffect(() => {\n if (value) {\n setCountryCode(value.countryCode);\n setEnteredNumber(value.number);\n }\n }, [value]);\n\n // Focus search input when dropdown opens\n useEffect(() => {\n let rafId: number | null = null;\n if (displaySelectCountryCode) {\n rafId = requestAnimationFrame(() => {\n searchInputRef.current?.focus();\n });\n }\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n };\n }, [displaySelectCountryCode]);\n\n const handleEnteredNumberChange = (val: string) => {\n const numericValue = val.replace(/\\D/g, ''); // Remove non-numeric characters\n setEnteredNumber(numericValue);\n onNumberChange(numericValue);\n };\n\n const toggleDropdown = useCallback(() => {\n if (disabled) return;\n setDisplaySelectCountryCode((prev) => !prev);\n }, [disabled]);\n\n const handleCountryButtonKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault();\n toggleDropdown();\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (!displaySelectCountryCode) {\n setDisplaySelectCountryCode(true);\n }\n break;\n // Escape is handled by useDismissOnEscape hook\n }\n },\n [disabled, displaySelectCountryCode, toggleDropdown]\n );\n\n // Group label (role=\"group\"): combines the visible label with any external ariaLabelledBy\n // (handled inside getA11yNameAttributes); ariaLabel overrides the visible label; falls back to 'Phone number'.\n const groupA11yProps = getA11yNameAttributes({\n ariaLabelledBy,\n internalLabelId: label ? labelId : undefined,\n ariaLabel: ariaLabel || (!label ? 'Phone number' : undefined)\n });\n\n // Phone number input: caller override > visible label > fallback 'Phone number'\n const phoneInputA11yProps = getA11yNameAttributes({\n ariaLabelledBy: !phoneNumberAriaLabel && label ? labelId : undefined,\n ariaLabel: phoneNumberAriaLabel || (!label ? 'Phone number' : undefined),\n ariaDescribedBy: error ? errorId : ariaDescribedBy\n });\n\n // Country code button label: caller override > default dynamic label\n const computedCountryCodeAriaLabel = countryCodeAriaLabel ||\n `Select country code. Current: ${countryInfo?.name} ${countryInfo?.dial_code}`;\n\n return (\n <div \n className=\"phone-input-container-se-design-main-container\" \n data-automation-id={automationId}\n {...containerProps}\n onKeyDownCapture={(e) => {\n if (e.key === 'Escape' && displaySelectCountryCode) {\n restoreFocusToButtonRef.current = true;\n }\n containerProps.onKeyDownCapture(e);\n }}\n >\n {label && (\n <div id={labelId} className=\"label-container\">\n {label}\n </div>\n )}\n <div\n role=\"group\"\n {...groupA11yProps}\n className={`phone-input-container-se-design-main ${error ? 'error' : ''}`}\n ref={containerRef}\n >\n <div className=\"phone-input-container-se-design\">\n <button\n ref={countryButtonRef}\n type=\"button\"\n className={`phone-input-container-se-design-country-code focus-outline rounded ${disabled ? 'cursor-not-allowed opacity-60' : ''}`}\n onClick={toggleDropdown}\n onKeyDown={handleCountryButtonKeyDown}\n aria-haspopup=\"listbox\"\n aria-expanded={displaySelectCountryCode}\n aria-controls={displaySelectCountryCode ? listboxId : undefined}\n aria-label={computedCountryCodeAriaLabel}\n disabled={disabled}\n data-automation-id=\"country-code-selector\"\n >\n <img\n src={`https://flagcdn.com/${countryInfo?.code.toLowerCase()}.svg`}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"16\"\n />\n <span>{countryInfo?.dial_code}</span>\n <Icon\n name=\"chevron\"\n className={!displaySelectCountryCode ? '' : 'rotate-180'}\n aria-hidden=\"true\"\n />\n </button>\n <span className=\"divider\" aria-hidden=\"true\" />\n <input\n id={phoneInputId}\n type=\"tel\"\n placeholder=\"Enter phone number\"\n className={`phone-input-container-se-design-phone-number-input ${disabled ? 'disabled' : ''}`}\n onChange={(event) => handleEnteredNumberChange(event.target.value)}\n value={enteredNumber}\n pattern=\"[0-9]*\"\n disabled={disabled}\n aria-invalid={error || undefined}\n {...phoneInputA11yProps}\n data-automation-id=\"phone-number-input-field\"\n />\n </div>\n\n {displaySelectCountryCode && (\n <div\n {...listboxProps}\n className=\"phone-input-container-se-design-country-code-list\"\n aria-label=\"Select country\"\n data-automation-id=\"country-code-list\"\n >\n <div className=\"search-input-wrapper\">\n <Icon name=\"search\" className=\"search-icon\" aria-hidden=\"true\" />\n <input\n ref={searchInputRef}\n {...comboboxInputProps}\n type=\"text\"\n placeholder=\"Search countries\"\n className=\"phone-input-container-se-design-country-code-list-item-input\"\n onChange={handleCountryCodeSearch}\n value={searchValue}\n aria-label=\"Search countries\"\n data-automation-id=\"country-code-search-input\"\n />\n </div>\n {countriesInfo.length > 0 ? (\n countriesInfo.map((country, index) => {\n const optionProps = getOptionProps(index, country.dial_code === countryCode);\n return (\n <div\n key={country.code}\n {...optionProps}\n className={`phone-input-container-se-design-country-code-list-item ${\n highlightedIndex === index ? 'highlighted' : ''\n } ${country.dial_code === countryCode ? 'selected' : ''}`}\n onClick={() => {\n restoreFocusToButtonRef.current = true;\n handleCountryCodeSelect(country.dial_code);\n }}\n onMouseEnter={() => setHighlightedIndex(index)}\n >\n <img\n src={`https://flagcdn.com/${country.code.toLowerCase()}.svg`}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"16\"\n />\n <span>{country.name}</span>\n <span>({country.dial_code})</span>\n </div>\n );\n })\n ) : (\n <div className=\"phone-input-container-se-design-country-code-list-item-no-results\" role=\"status\">\n No results found\n </div>\n )}\n </div>\n )}\n </div>\n {error && (\n <div id={errorId} className=\"error-message\" role=\"alert\">\n {errorMessage}\n </div>\n )}\n </div>\n );\n};\n"],"names":["PhoneInput","onCountrycodeChange","onNumberChange","error","errorMessage","value","label","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","phoneNumberAriaLabel","countryCodeAriaLabel","disabled","countryCode","setCountryCode","useState","countriesInfoJson","dial_code","displaySelectCountryCode","setDisplaySelectCountryCode","countriesInfo","setCountriesInfo","searchValue","setSearchValue","enteredNumber","setEnteredNumber","containerRef","useRef","countryButtonRef","searchInputRef","restoreFocusToButtonRef","labelId","useStableId","listboxId","phoneInputId","errorId","countryInfo","find","country","closeDropdown","useCallback","handleCountryCodeSelect","handleSelectFromDropdown","current","containerProps","inputProps","comboboxInputProps","listboxProps","getOptionProps","highlightedIndex","setHighlightedIndex","useCombobox","items","isOpen","onOpenChange","onSelect","handleCountryCodeSearch","event","searchVal","target","filteredCountries","filter","name","toLowerCase","includes","code","prevDisplaySelectCountryCodeRef","useEffect","rafId","requestAnimationFrame","focus","cancelAnimationFrame","number","handleEnteredNumberChange","val","numericValue","replace","toggleDropdown","prev","handleCountryButtonKeyDown","e","key","preventDefault","groupA11yProps","getA11yNameAttributes","internalLabelId","undefined","phoneInputA11yProps","computedCountryCodeAriaLabel","React","createElement","_extends","className","onKeyDownCapture","id","role","ref","type","onClick","onKeyDown","src","alt","width","Icon","placeholder","onChange","pattern","length","map","index","optionProps","onMouseEnter"],"mappings":";;;;;;;;;;;;;;;;;AA+CO,MAAMA,KAAwCA,CAAC;AAAA,EACpDC,qBAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,sBAAAA;AAAAA,EACAC,sBAAAA;AAAAA,EACAC,UAAAA,IAAW;AACb,MAAM;AACJ,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAASX,GAAOS,eAAeG,EAAkB,CAAC,EAAEC,SA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a,UAAU,IAClCF,EAAwBH,EAAQrB,SAAS;AAAA,MAC3C;AAAA,MACA8F,cAAcA,MAAM7D,EAAoB2D,CAAK;AAAA,IAAA,CAAE,GAE/CpB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,MACEU,KAAK,uBAAuB9D,EAAQ2B,KAAKF,aAAa;AAAA,MACtDsC,KAAI;AAAA,MACJ,eAAY;AAAA,MACZC,OAAM;AAAA,IAAA,CACP,GACDb,gBAAAA,EAAAC,cAAA,QAAA,MAAOpD,EAAQwB,IAAW,GAC1B2B,gBAAAA,EAAAC,cAAA,QAAA,MAAM,KAAEpD,EAAQrB,WAAU,GAAO,CAC9B;AAAA,EAET,CAAC,IAEDwE,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKE,WAAU;AAAA,IAAoEG,MAAK;AAAA,EAAA,GAAS,kBAE5F,CAEJ,CAEJ,GACJ7F,KACCuF,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKI,IAAI3D;AAAAA,IAASyD,WAAU;AAAA,IAAgBG,MAAK;AAAA,EAAA,GAC9C5F,CACE,CAEJ;AAET;"}
|
|
1
|
+
{"version":3,"file":"index46.js","sources":["../src/components/PhoneInput/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, useCallback } from 'react';\nimport './style.scss';\nimport countriesInfoJson from './countriesInfo.json';\nimport { Icon } from '../Icon';\nimport { useStableId } from '../../utils/useStableId';\nimport { getA11yNameAttributes, useCombobox } from '../../utils/a11y';\n\nexport interface PhoneInputProps {\n onCountrycodeChange: (countryCode: string) => void;\n onNumberChange: (number: string) => void;\n error?: boolean;\n errorMessage?: string;\n value?: {\n countryCode: string;\n number: string;\n };\n label?: string;\n automationId?: string;\n /**\n * Accessible label for the entire phone input group (role=\"group\").\n * Provides context for screen readers (e.g., \"Two-step verification phone number for signer 1\").\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label the group (highest precedence over ariaLabel).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) providing additional description for the phone number input.\n */\n ariaDescribedBy?: string;\n /**\n * Override aria-label for the phone number input specifically.\n * Defaults to the visible label text or 'Phone number'.\n */\n phoneNumberAriaLabel?: string;\n /**\n * Override aria-label for the country code combobox button.\n * Defaults to \"Select country code. Current: {name} {dial_code}\".\n */\n countryCodeAriaLabel?: string;\n /**\n * Whether the input is disabled\n */\n disabled?: boolean;\n}\n\nexport const PhoneInput: React.FC<PhoneInputProps> = ({\n onCountrycodeChange,\n onNumberChange,\n error,\n errorMessage,\n value,\n label,\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n phoneNumberAriaLabel,\n countryCodeAriaLabel,\n disabled = false\n}) => {\n const [countryCode, setCountryCode] = useState(value?.countryCode || countriesInfoJson[0].dial_code);\n const [displaySelectCountryCode, setDisplaySelectCountryCode] = useState(false);\n const [countriesInfo, setCountriesInfo] = useState(countriesInfoJson);\n const [searchValue, setSearchValue] = useState('');\n const [enteredNumber, setEnteredNumber] = useState('');\n const containerRef = useRef<HTMLDivElement>(null);\n const countryButtonRef = useRef<HTMLButtonElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const restoreFocusToButtonRef = useRef(false);\n\n // Generate stable IDs for ARIA relationships\n const labelId = useStableId(automationId, 'phone-label');\n const listboxId = useStableId(automationId, 'phone-listbox');\n const phoneInputId = useStableId(automationId, 'phone-input');\n const errorId = useStableId(automationId, 'phone-error');\n\n const countryInfo = countriesInfoJson.find((country) => country.dial_code === countryCode);\n\n // Close dropdown and reset state\n const closeDropdown = useCallback(() => {\n setDisplaySelectCountryCode(false);\n setSearchValue('');\n setCountriesInfo(countriesInfoJson);\n }, []);\n\n const handleCountryCodeSelect = useCallback(\n (country: string) => {\n if (country) {\n setCountryCode(country);\n onCountrycodeChange(country);\n }\n closeDropdown();\n // Focus return is handled by useEffect that watches displaySelectCountryCode\n },\n [onCountrycodeChange, closeDropdown]\n );\n\n const handleSelectFromDropdown = useCallback(\n (country: typeof countriesInfoJson[0]) => {\n restoreFocusToButtonRef.current = true;\n handleCountryCodeSelect(country.dial_code);\n },\n [handleCountryCodeSelect]\n );\n\n // Use comprehensive useCombobox hook for country search\n const {\n containerProps,\n inputProps: comboboxInputProps,\n listboxProps,\n getOptionProps,\n highlightedIndex,\n setHighlightedIndex\n } = useCombobox({\n items: countriesInfo,\n isOpen: displaySelectCountryCode,\n onOpenChange: setDisplaySelectCountryCode,\n onSelect: handleSelectFromDropdown,\n listboxId\n });\n\n const handleCountryCodeSearch = (event: React.ChangeEvent<HTMLInputElement>) => {\n const searchVal = event.target.value;\n setSearchValue(searchVal);\n setHighlightedIndex(-1);\n const filteredCountries = countriesInfoJson.filter(\n (country) =>\n country.name.toLowerCase().includes(searchVal.toLowerCase()) ||\n country.dial_code.toLowerCase().includes(searchVal.toLowerCase()) ||\n country.code.toLowerCase().includes(searchVal.toLowerCase())\n );\n setCountriesInfo(filteredCountries);\n };\n\n // Return focus to button when dropdown closes\n const prevDisplaySelectCountryCodeRef = useRef(displaySelectCountryCode);\n useEffect(() => {\n let rafId: number | null = null;\n // If dropdown was open and is now closed, return focus to button\n // ONLY when the close was triggered from within the component (Escape/selection),\n // not when the user moved focus outside (focus-out dismissal).\n if (prevDisplaySelectCountryCodeRef.current && !displaySelectCountryCode && restoreFocusToButtonRef.current) {\n rafId = requestAnimationFrame(() => {\n countryButtonRef.current?.focus();\n });\n }\n if (prevDisplaySelectCountryCodeRef.current && !displaySelectCountryCode) {\n restoreFocusToButtonRef.current = false;\n }\n prevDisplaySelectCountryCodeRef.current = displaySelectCountryCode;\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n };\n }, [displaySelectCountryCode]);\n\n useEffect(() => {\n if (value) {\n setCountryCode(value.countryCode);\n setEnteredNumber(value.number);\n }\n }, [value]);\n\n // Focus search input when dropdown opens\n useEffect(() => {\n let rafId: number | null = null;\n if (displaySelectCountryCode) {\n rafId = requestAnimationFrame(() => {\n searchInputRef.current?.focus();\n });\n }\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n };\n }, [displaySelectCountryCode]);\n\n const handleEnteredNumberChange = (val: string) => {\n const numericValue = val.replace(/\\D/g, ''); // Remove non-numeric characters\n setEnteredNumber(numericValue);\n onNumberChange(numericValue);\n };\n\n const toggleDropdown = useCallback(() => {\n if (disabled) return;\n setDisplaySelectCountryCode((prev) => !prev);\n }, [disabled]);\n\n const handleCountryButtonKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault();\n toggleDropdown();\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (!displaySelectCountryCode) {\n setDisplaySelectCountryCode(true);\n }\n break;\n // Escape is handled by useDismissOnEscape hook\n }\n },\n [disabled, displaySelectCountryCode, toggleDropdown]\n );\n\n // Group label (role=\"group\"): ariaLabelledBy > ariaLabel > visible label > fallback\n const groupAriaLabelledBy = ariaLabelledBy || (!ariaLabel && label ? labelId : undefined);\n const groupAriaLabel = !ariaLabelledBy ? (ariaLabel || (!label ? 'Phone number' : undefined)) : undefined;\n const groupA11yProps = getA11yNameAttributes({ ariaLabelledBy: groupAriaLabelledBy, ariaLabel: groupAriaLabel });\n\n // Phone number input: caller override > visible label > fallback 'Phone number'\n const phoneInputA11yProps = getA11yNameAttributes({\n ariaLabelledBy: !phoneNumberAriaLabel && label ? labelId : undefined,\n ariaLabel: phoneNumberAriaLabel || (!label ? 'Phone number' : undefined),\n ariaDescribedBy: error ? errorId : ariaDescribedBy\n });\n\n // Country code button label: caller override > default dynamic label\n const computedCountryCodeAriaLabel = countryCodeAriaLabel ||\n `Select country code. Current: ${countryInfo?.name} ${countryInfo?.dial_code}`;\n\n return (\n <div \n className=\"phone-input-container-se-design-main-container\" \n data-automation-id={automationId}\n {...containerProps}\n onKeyDownCapture={(e) => {\n if (e.key === 'Escape' && displaySelectCountryCode) {\n restoreFocusToButtonRef.current = true;\n }\n containerProps.onKeyDownCapture(e);\n }}\n >\n {label && (\n <div id={labelId} className=\"label-container\">\n {label}\n </div>\n )}\n <div\n role=\"group\"\n {...groupA11yProps}\n className={`phone-input-container-se-design-main ${error ? 'error' : ''}`}\n ref={containerRef}\n >\n <div className=\"phone-input-container-se-design\">\n <button\n ref={countryButtonRef}\n type=\"button\"\n className={`phone-input-container-se-design-country-code focus-outline rounded ${disabled ? 'cursor-not-allowed opacity-60' : ''}`}\n onClick={toggleDropdown}\n onKeyDown={handleCountryButtonKeyDown}\n aria-haspopup=\"listbox\"\n aria-expanded={displaySelectCountryCode}\n aria-controls={displaySelectCountryCode ? listboxId : undefined}\n aria-label={computedCountryCodeAriaLabel}\n disabled={disabled}\n data-automation-id=\"country-code-selector\"\n >\n <img\n src={`https://flagcdn.com/${countryInfo?.code.toLowerCase()}.svg`}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"16\"\n />\n <span>{countryInfo?.dial_code}</span>\n <Icon\n name=\"chevron\"\n className={!displaySelectCountryCode ? '' : 'rotate-180'}\n aria-hidden=\"true\"\n />\n </button>\n <span className=\"divider\" aria-hidden=\"true\" />\n <input\n id={phoneInputId}\n type=\"tel\"\n placeholder=\"Enter phone number\"\n className={`phone-input-container-se-design-phone-number-input ${disabled ? 'disabled' : ''}`}\n onChange={(event) => handleEnteredNumberChange(event.target.value)}\n value={enteredNumber}\n pattern=\"[0-9]*\"\n disabled={disabled}\n aria-invalid={error || undefined}\n {...phoneInputA11yProps}\n data-automation-id=\"phone-number-input-field\"\n />\n </div>\n\n {displaySelectCountryCode && (\n <div\n {...listboxProps}\n className=\"phone-input-container-se-design-country-code-list\"\n aria-label=\"Select country\"\n data-automation-id=\"country-code-list\"\n >\n <div className=\"search-input-wrapper\">\n <Icon name=\"search\" className=\"search-icon\" aria-hidden=\"true\" />\n <input\n ref={searchInputRef}\n {...comboboxInputProps}\n type=\"text\"\n placeholder=\"Search countries\"\n className=\"phone-input-container-se-design-country-code-list-item-input\"\n onChange={handleCountryCodeSearch}\n value={searchValue}\n aria-label=\"Search countries\"\n data-automation-id=\"country-code-search-input\"\n />\n </div>\n {countriesInfo.length > 0 ? (\n countriesInfo.map((country, index) => {\n const optionProps = getOptionProps(index, country.dial_code === countryCode);\n return (\n <div\n key={country.code}\n {...optionProps}\n className={`phone-input-container-se-design-country-code-list-item ${\n highlightedIndex === index ? 'highlighted' : ''\n } ${country.dial_code === countryCode ? 'selected' : ''}`}\n onClick={() => {\n restoreFocusToButtonRef.current = true;\n handleCountryCodeSelect(country.dial_code);\n }}\n onMouseEnter={() => setHighlightedIndex(index)}\n >\n <img\n src={`https://flagcdn.com/${country.code.toLowerCase()}.svg`}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"16\"\n />\n <span>{country.name}</span>\n <span>({country.dial_code})</span>\n </div>\n );\n })\n ) : (\n <div className=\"phone-input-container-se-design-country-code-list-item-no-results\" role=\"status\">\n No results found\n </div>\n )}\n </div>\n )}\n </div>\n {error && (\n <div id={errorId} className=\"error-message\" role=\"alert\">\n {errorMessage}\n </div>\n )}\n </div>\n );\n};\n"],"names":["PhoneInput","onCountrycodeChange","onNumberChange","error","errorMessage","value","label","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","phoneNumberAriaLabel","countryCodeAriaLabel","disabled","countryCode","setCountryCode","useState","countriesInfoJson","dial_code","displaySelectCountryCode","setDisplaySelectCountryCode","countriesInfo","setCountriesInfo","searchValue","setSearchValue","enteredNumber","setEnteredNumber","containerRef","useRef","countryButtonRef","searchInputRef","restoreFocusToButtonRef","labelId","useStableId","listboxId","phoneInputId","errorId","countryInfo","find","country","closeDropdown","useCallback","handleCountryCodeSelect","handleSelectFromDropdown","current","containerProps","inputProps","comboboxInputProps","listboxProps","getOptionProps","highlightedIndex","setHighlightedIndex","useCombobox","items","isOpen","onOpenChange","onSelect","handleCountryCodeSearch","event","searchVal","target","filteredCountries","filter","name","toLowerCase","includes","code","prevDisplaySelectCountryCodeRef","useEffect","rafId","requestAnimationFrame","focus","cancelAnimationFrame","number","handleEnteredNumberChange","val","numericValue","replace","toggleDropdown","prev","handleCountryButtonKeyDown","e","key","preventDefault","groupA11yProps","getA11yNameAttributes","undefined","groupAriaLabel","phoneInputA11yProps","computedCountryCodeAriaLabel","React","createElement","_extends","className","onKeyDownCapture","id","role","ref","type","onClick","onKeyDown","src","alt","width","Icon","placeholder","onChange","pattern","length","map","index","optionProps","onMouseEnter"],"mappings":";;;;;;;;;;;;;;;;;AA+CO,MAAMA,KAAwCA,CAAC;AAAA,EACpDC,qBAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,sBAAAA;AAAAA,EACAC,sBAAAA;AAAAA,EACAC,UAAAA,IAAW;AACb,MAAM;AACJ,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAASX,GAAOS,eAAeG,EAAkB,CAAC,EAAEC,SAAS,GAC7F,CAACC,GAA0BC,CAA2B,IAAIJ,EAAS,EAAK,GACxE,CAACK,GAAeC,CAAgB,IAAIN,EAASC,CAAiB,GAC9D,CAACM,GAAaC,CAAc,IAAIR,EAAS,EAAE,GAC3C,CAACS,GAAeC,CAAgB,IAAIV,EAAS,EAAE,GAC/CW,IAAeC,EAAuB,IAAI,GAC1CC,IAAmBD,EAA0B,IAAI,GACjDE,IAAiBF,EAAyB,IAAI,GAC9CG,IAA0BH,EAAO,EAAK,GAGtCI,IAAUC,EAAY1B,GAAc,aAAa,GACjD2B,IAAYD,EAAY1B,GAAc,eAAe,GACrD4B,IAAeF,EAAY1B,GAAc,aAAa,GACtD6B,IAAUH,EAAY1B,GAAc,aAAa,GAEjD8B,IAAcpB,EAAkBqB,KAAMC,CAAAA,MAAYA,EAAQrB,cAAcJ,CAAW,GAGnF0B,IAAgBC,EAA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F,CAEJ,CAEJ,GACJ7F,KACCuF,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKI,IAAI3D;AAAAA,IAASyD,WAAU;AAAA,IAAgBG,MAAK;AAAA,EAAA,GAC9C5F,CACE,CAEJ;AAET;"}
|
package/dist/index49.js
CHANGED
|
@@ -31,7 +31,7 @@ import { Popover as $ } from "./index19.js";
|
|
|
31
31
|
/* empty css */
|
|
32
32
|
/* empty css */
|
|
33
33
|
/* empty css */
|
|
34
|
-
import { TabButton as j } from "./
|
|
34
|
+
import { TabButton as j } from "./index235.js";
|
|
35
35
|
/* empty css */
|
|
36
36
|
/* empty css */
|
|
37
37
|
/* empty css */
|
package/dist/index51.js
CHANGED
|
@@ -2,7 +2,7 @@ import r, { useState as S } from "react";
|
|
|
2
2
|
import { Button as z } from "./index4.js";
|
|
3
3
|
import { Icon as _ } from "./index6.js";
|
|
4
4
|
import { Dropdown as te } from "./index25.js";
|
|
5
|
-
import { useDatePickerA11y as Fe, formatDateId as Pe, getCellAriaLabel as Ce } from "./
|
|
5
|
+
import { useDatePickerA11y as Fe, formatDateId as Pe, getCellAriaLabel as Ce } from "./index244.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
function T() {
|
|
8
8
|
return T = Object.assign ? Object.assign.bind() : function(p) {
|
package/dist/index52.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { Icon as W } from "./index6.js";
|
|
3
|
-
import { useStableId as j } from "./
|
|
3
|
+
import { useStableId as j } from "./index205.js";
|
|
4
4
|
import { getA11yNameAttributes as q } from "./index81.js";
|
|
5
5
|
import "./index72.js";
|
|
6
6
|
/* empty css */
|
package/dist/index53.js
CHANGED
package/dist/index57.js
CHANGED