docthub-core-components 3.3.10 → 3.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as F, jsxs as Z } from "react/jsx-runtime";
2
+ import { jsx as B, jsxs as Z } from "react/jsx-runtime";
3
3
  import { c as x } from "react-compiler-runtime";
4
4
  import { useRef as _, useId as G, useLayoutEffect as tt } from "react";
5
5
  import { Input as et } from "../../../ui/input.js";
@@ -10,46 +10,46 @@ const ut = (N) => {
10
10
  length: H,
11
11
  label: f,
12
12
  value: d,
13
- onChange: j,
13
+ onChange: K,
14
14
  onComplete: g,
15
15
  className: C,
16
- error: n,
16
+ error: a,
17
17
  inputClassName: J,
18
18
  autoFocus: Q,
19
19
  autoSubmit: U,
20
20
  secure: V
21
- } = N, o = H === void 0 ? 6 : H, K = J === void 0 ? "h-10 w-10" : J, q = Q === void 0 ? !1 : Q, L = U === void 0 ? !1 : U, E = V === void 0 ? !1 : V;
21
+ } = N, o = H === void 0 ? 6 : H, F = J === void 0 ? "h-10 w-10" : J, j = Q === void 0 ? !1 : Q, q = U === void 0 ? !1 : U, E = V === void 0 ? !1 : V;
22
+ let L;
23
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (L = [], t[0] = L) : L = t[0];
24
+ const n = _(L), h = G(), y = G(), S = G();
22
25
  let M;
23
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (M = [], t[0] = M) : M = t[0];
24
- const a = _(M), h = G(), v = G(), S = G();
25
- let O;
26
26
  if (t[1] !== o || t[2] !== S) {
27
27
  let i;
28
- t[4] !== S ? (i = (W, z) => `${S}-digit-${z + 1}`, t[4] = S, t[5] = i) : i = t[5], O = Array.from({
28
+ t[4] !== S ? (i = (W, z) => `${S}-digit-${z + 1}`, t[4] = S, t[5] = i) : i = t[5], M = Array.from({
29
29
  length: o
30
- }, i), t[1] = o, t[2] = S, t[3] = O;
30
+ }, i), t[1] = o, t[2] = S, t[3] = M;
31
31
  } else
32
- O = t[3];
33
- const T = O;
34
- let A, P;
35
- t[6] !== q ? (A = () => {
32
+ M = t[3];
33
+ const T = M;
34
+ let O, A;
35
+ t[6] !== j ? (O = () => {
36
36
  var i;
37
- q && ((i = a.current[0]) == null || i.focus({
37
+ j && ((i = n.current[0]) == null || i.focus({
38
38
  preventScroll: !0
39
39
  }));
40
- }, P = [q], t[6] = q, t[7] = A, t[8] = P) : (A = t[7], P = t[8]), tt(A, P);
41
- let b, y, D, I, u, m;
42
- if (t[9] !== L || t[10] !== C || t[11] !== n || t[12] !== v || t[13] !== K || t[14] !== f || t[15] !== h || t[16] !== o || t[17] !== j || t[18] !== g || t[19] !== T || t[20] !== E || t[21] !== d) {
40
+ }, A = [j], t[6] = j, t[7] = O, t[8] = A) : (O = t[7], A = t[8]), tt(O, A);
41
+ let v, b, D, I, u, m;
42
+ if (t[9] !== q || t[10] !== C || t[11] !== a || t[12] !== y || t[13] !== F || t[14] !== f || t[15] !== h || t[16] !== o || t[17] !== K || t[18] !== g || t[19] !== T || t[20] !== E || t[21] !== d) {
43
43
  const i = (r, e) => {
44
44
  var c;
45
45
  const l = e.replace(/\D/g, "").slice(0, 1);
46
46
  if (e && !l || e.length > 1 && l.length <= 1)
47
47
  return;
48
48
  const s = [...d];
49
- s[r] = l, j(s), l && r < o - 1 && ((c = a.current[r + 1]) == null || c.focus()), s.every(st) && (g && g(s.join("")), L && queueMicrotask(() => {
49
+ s[r] = l, K(s), l && r < o - 1 && ((c = n.current[r + 1]) == null || c.focus()), s.every(st) && (g && g(s.join("")), q && queueMicrotask(() => {
50
50
  var $;
51
- const B = ($ = a.current[r]) == null ? void 0 : $.closest("form");
52
- B && B.requestSubmit();
51
+ const R = ($ = n.current[r]) == null ? void 0 : $.closest("form");
52
+ R && R.requestSubmit();
53
53
  }));
54
54
  }, W = (r, e) => {
55
55
  var $;
@@ -60,35 +60,35 @@ const ut = (N) => {
60
60
  const c = [...d];
61
61
  for (let p = 0; p < s.length && r + p < o; p++)
62
62
  c[r + p] = s[p];
63
- j(c);
64
- const B = Math.min(r + s.length, o - 1);
65
- ($ = a.current[B]) == null || $.focus(), c.every(ot) && (g && g(c.join("")), L && queueMicrotask(() => {
63
+ K(c);
64
+ const R = Math.min(r + s.length, o - 1);
65
+ ($ = n.current[R]) == null || $.focus(), c.every(ot) && (g && g(c.join("")), q && queueMicrotask(() => {
66
66
  var X;
67
- const p = (X = a.current[r]) == null ? void 0 : X.closest("form");
67
+ const p = (X = n.current[r]) == null ? void 0 : X.closest("form");
68
68
  p && p.requestSubmit();
69
69
  }));
70
70
  }, z = (r, e) => {
71
71
  var l, s, c;
72
- e.key.length === 1 && !/\d/.test(e.key) ? e.preventDefault() : e.key === "Backspace" && !d[r] && r > 0 ? (l = a.current[r - 1]) == null || l.focus() : e.key === "ArrowLeft" && r > 0 ? (e.preventDefault(), (s = a.current[r - 1]) == null || s.focus()) : e.key === "ArrowRight" && r < o - 1 && (e.preventDefault(), (c = a.current[r + 1]) == null || c.focus());
72
+ !e.ctrlKey && !e.metaKey && !e.altKey && e.key.length === 1 && !/\d/.test(e.key) ? e.preventDefault() : e.key === "Backspace" && !d[r] && r > 0 ? (l = n.current[r - 1]) == null || l.focus() : e.key === "ArrowLeft" && r > 0 ? (e.preventDefault(), (s = n.current[r - 1]) == null || s.focus()) : e.key === "ArrowRight" && r < o - 1 && (e.preventDefault(), (c = n.current[r + 1]) == null || c.focus());
73
73
  };
74
- t[28] !== C ? (u = Y("space-y-2", C), t[28] = C, t[29] = u) : u = t[29], t[30] !== f || t[31] !== h ? (m = f && /* @__PURE__ */ F(rt, { id: h, className: "text-sm font-medium text-gray-700", children: f }), t[30] = f, t[31] = h, t[32] = m) : m = t[32], b = "flex gap-2 border-0 p-0 m-0", y = f ? h : void 0, D = n ? v : void 0, I = T.map((r, e) => {
74
+ t[28] !== C ? (u = Y("space-y-2", C), t[28] = C, t[29] = u) : u = t[29], t[30] !== f || t[31] !== h ? (m = f && /* @__PURE__ */ B(rt, { id: h, className: "text-sm font-medium text-gray-700", children: f }), t[30] = f, t[31] = h, t[32] = m) : m = t[32], v = "flex gap-2 border-0 p-0 m-0", b = f ? h : void 0, D = a ? y : void 0, I = T.map((r, e) => {
75
75
  const l = d[e] ?? "";
76
- return /* @__PURE__ */ F(et, { ref: (s) => {
77
- a.current[e] = s;
78
- }, type: E ? "password" : "text", inputMode: "numeric", maxLength: 1, value: l, onChange: (s) => i(e, s.target.value), onKeyDown: (s) => z(e, s), onPaste: (s) => W(e, s), className: Y("text-center p-0 text-lg font-semibold", n && "border-destructive", K), "aria-label": `${f || "OTP"} digit ${e + 1} of ${o}`, "aria-invalid": n ? "true" : "false" }, r);
79
- }), t[9] = L, t[10] = C, t[11] = n, t[12] = v, t[13] = K, t[14] = f, t[15] = h, t[16] = o, t[17] = j, t[18] = g, t[19] = T, t[20] = E, t[21] = d, t[22] = b, t[23] = y, t[24] = D, t[25] = I, t[26] = u, t[27] = m;
76
+ return /* @__PURE__ */ B(et, { ref: (s) => {
77
+ n.current[e] = s;
78
+ }, type: E ? "password" : "text", inputMode: "numeric", maxLength: 1, value: l, onChange: (s) => i(e, s.target.value), onKeyDown: (s) => z(e, s), onPaste: (s) => W(e, s), className: Y("text-center p-0 text-lg font-semibold", a && "border-destructive", F), "aria-label": `${f || "OTP"} digit ${e + 1} of ${o}`, "aria-invalid": a ? "true" : "false" }, r);
79
+ }), t[9] = q, t[10] = C, t[11] = a, t[12] = y, t[13] = F, t[14] = f, t[15] = h, t[16] = o, t[17] = K, t[18] = g, t[19] = T, t[20] = E, t[21] = d, t[22] = v, t[23] = b, t[24] = D, t[25] = I, t[26] = u, t[27] = m;
80
80
  } else
81
- b = t[22], y = t[23], D = t[24], I = t[25], u = t[26], m = t[27];
81
+ v = t[22], b = t[23], D = t[24], I = t[25], u = t[26], m = t[27];
82
82
  let k;
83
- t[33] !== b || t[34] !== y || t[35] !== D || t[36] !== I ? (k = /* @__PURE__ */ F("fieldset", { className: b, "aria-labelledby": y, "aria-describedby": D, children: I }), t[33] = b, t[34] = y, t[35] = D, t[36] = I, t[37] = k) : k = t[37];
83
+ t[33] !== v || t[34] !== b || t[35] !== D || t[36] !== I ? (k = /* @__PURE__ */ B("fieldset", { className: v, "aria-labelledby": b, "aria-describedby": D, children: I }), t[33] = v, t[34] = b, t[35] = D, t[36] = I, t[37] = k) : k = t[37];
84
84
  let w;
85
- t[38] !== n || t[39] !== v ? (w = n && /* @__PURE__ */ F("p", { id: v, className: "text-xs text-destructive mt-1", role: "alert", children: n }), t[38] = n, t[39] = v, t[40] = w) : w = t[40];
86
- let R;
87
- return t[41] !== u || t[42] !== m || t[43] !== k || t[44] !== w ? (R = /* @__PURE__ */ Z("div", { className: u, children: [
85
+ t[38] !== a || t[39] !== y ? (w = a && /* @__PURE__ */ B("p", { id: y, className: "text-xs text-destructive mt-1", role: "alert", children: a }), t[38] = a, t[39] = y, t[40] = w) : w = t[40];
86
+ let P;
87
+ return t[41] !== u || t[42] !== m || t[43] !== k || t[44] !== w ? (P = /* @__PURE__ */ Z("div", { className: u, children: [
88
88
  m,
89
89
  k,
90
90
  w
91
- ] }), t[41] = u, t[42] = m, t[43] = k, t[44] = w, t[45] = R) : R = t[45], R;
91
+ ] }), t[41] = u, t[42] = m, t[43] = k, t[44] = w, t[45] = P) : P = t[45], P;
92
92
  };
93
93
  function st(N) {
94
94
  return N !== "";
@@ -1,205 +1,205 @@
1
1
  "use client";
2
- import { jsx as c, jsxs as T, Fragment as $e } from "react/jsx-runtime";
3
- import { c as he } from "react-compiler-runtime";
4
- import { ChevronsUpDown as Pe, CheckIcon as Te } from "lucide-react";
5
- import * as R from "react";
6
- import * as ke from "react-phone-number-input";
7
- import { isPossiblePhoneNumber as ut, isValidPhoneNumber as pt } from "react-phone-number-input";
8
- import Ae from "react-phone-number-input/flags";
9
- import { CommandInput as Be, CommandEmpty as Le, CommandList as Ve, CommandGroup as ze, Command as Ge, CommandItem as Ue } from "../../../ui/command.js";
10
- import { Input as qe } from "../../../ui/input.js";
11
- import { Label as Me } from "../../../ui/label.js";
12
- import { PopoverTrigger as Xe, PopoverContent as He, Popover as Je } from "../../../ui/popover.js";
13
- import { cn as ee } from "../../../../lib/utils.js";
14
- import { DoctTypography as Se } from "../../../ui/typography.js";
15
- const Ke = /\D/g, te = (r) => r.replace(Ke, ""), _e = (r) => {
2
+ import { jsxs as j, jsx as i, Fragment as V } from "react/jsx-runtime";
3
+ import { c as Z } from "react-compiler-runtime";
4
+ import { ChevronsUpDown as se, CheckIcon as ie } from "lucide-react";
5
+ import * as h from "react";
6
+ import * as oe from "react-phone-number-input";
7
+ import { isPossiblePhoneNumber as Te, isValidPhoneNumber as Be } from "react-phone-number-input";
8
+ import ce from "react-phone-number-input/flags";
9
+ import { CommandInput as ae, CommandEmpty as de, CommandList as me, CommandGroup as fe, Command as ue, CommandItem as pe } from "../../../ui/command.js";
10
+ import { Input as ye } from "../../../ui/input.js";
11
+ import { Label as he } from "../../../ui/label.js";
12
+ import { PopoverTrigger as be, PopoverContent as ge, Popover as xe } from "../../../ui/popover.js";
13
+ import { cn as H } from "../../../../lib/utils.js";
14
+ import { DoctTypography as W } from "../../../ui/typography.js";
15
+ const ve = /\D/g, J = (r) => r.replace(ve, ""), Y = (r) => {
16
16
  const e = r.match(/^\+\s*(\d+)\s*-\s*(\d*)\s*$/);
17
17
  return e ? {
18
18
  callingCode: e[1],
19
19
  national: e[2]
20
20
  } : null;
21
- }, De = (r) => {
21
+ }, ee = (r) => {
22
22
  if (r == null) return "";
23
- const e = String(r).trim(), t = _e(e);
24
- return t ? t.national : te(e);
25
- }, U = (r) => {
23
+ const e = String(r).trim(), t = Y(e);
24
+ return t ? t.national : J(e);
25
+ }, B = (r) => {
26
26
  if (!r) return "91";
27
27
  if (typeof r == "object" && "countryCode" in r)
28
- return te(r.countryCode) || "91";
28
+ return J(r.countryCode) || "91";
29
29
  try {
30
- return ke.getCountryCallingCode(r);
30
+ return oe.getCountryCallingCode(r);
31
31
  } catch {
32
32
  return "91";
33
33
  }
34
- }, je = (r, e) => {
34
+ }, te = (r, e) => {
35
35
  if (r == null)
36
36
  return e && e.length > 0 ? e[0] : "IN";
37
37
  if (typeof r == "number" && (e != null && e.length)) {
38
38
  const t = e[0];
39
39
  if (t && typeof t == "object" && "countryId" in t) {
40
- const o = e.find((n) => n.countryId === r);
40
+ const o = e.find((c) => c.countryId === r);
41
41
  if (o) return o;
42
42
  }
43
43
  return e[r];
44
44
  }
45
45
  return r;
46
- }, Oe = (r, e) => {
47
- if (!e) return r ? `+${te(r)}` : "";
48
- const t = U(e);
46
+ }, re = (r, e) => {
47
+ if (!e) return r ? `+${J(r)}` : "";
48
+ const t = B(e);
49
49
  return r ? `+${t}-${r}` : `+${t}`;
50
- }, Fe = (r, e) => e ? typeof r == "object" && "countryId" in r && typeof e == "object" && "countryId" in e ? r.countryId === e.countryId : r === e : !1, Ie = (r, e, t) => {
51
- const o = te(e), n = r.map((l) => l.value).filter((l) => !!l).filter((l) => U(l) === o);
52
- if (n.length !== 0)
53
- return t && n.some((l) => Fe(l, t)) ? t : n[0];
54
- }, Ee = (r) => {
55
- const e = he(5), {
50
+ }, K = (r, e) => e ? typeof r == "object" && "countryId" in r && typeof e == "object" && "countryId" in e ? r.countryId === e.countryId : r === e : !1, Q = (r, e, t) => {
51
+ const o = J(e), c = r.map((n) => n.value).filter((n) => !!n).filter((n) => B(n) === o);
52
+ if (c.length !== 0)
53
+ return t && c.some((n) => K(n, t)) ? t : c[0];
54
+ }, ne = (r) => {
55
+ const e = Z(5), {
56
56
  country: t,
57
57
  countryName: o
58
- } = r, n = Ae[t];
59
- let l;
60
- e[0] !== n || e[1] !== o ? (l = n && /* @__PURE__ */ c(n, { title: o }), e[0] = n, e[1] = o, e[2] = l) : l = e[2];
61
- let s;
62
- return e[3] !== l ? (s = /* @__PURE__ */ c("span", { className: "flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: l }), e[3] = l, e[4] = s) : s = e[4], s;
63
- }, Qe = (r) => {
64
- const e = he(48), {
58
+ } = r, c = ce[t];
59
+ let n;
60
+ e[0] !== c || e[1] !== o ? (n = c && /* @__PURE__ */ i(c, { title: o }), e[0] = c, e[1] = o, e[2] = n) : n = e[2];
61
+ let a;
62
+ return e[3] !== n ? (a = /* @__PURE__ */ i("span", { className: "flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: n }), e[3] = n, e[4] = a) : a = e[4], a;
63
+ }, we = (r) => {
64
+ const e = Z(48), {
65
65
  disabled: t,
66
66
  value: o,
67
- options: n,
68
- onChange: l,
69
- showFlagVariant: s,
70
- hasError: x,
71
- popoverAnchorRef: f
72
- } = r, C = R.useRef(null), [$, w] = R.useState(""), [h, m] = R.useState(!1);
73
- let y;
74
- e[0] !== o ? (y = o ? `+${U(o)}` : "+91", e[0] = o, e[1] = y) : y = e[1];
75
- const d = y;
76
- let a;
77
- e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (F) => {
78
- m(F), F && w("");
79
- }, e[2] = a) : a = e[2];
80
- const g = x ? "border-destructive" : "border-gray-300", v = h && "bg-gray-100";
81
- let I;
82
- e[3] !== g || e[4] !== v ? (I = ee("flex h-[40px] items-center gap-1.5 rounded-l-md rounded-r-none border-l-[1px] border-t-[1px] border-b-[1px] bg-white px-3 py-[1px] text-sm font-medium text-gray-900 transition-colors", g, "hover:bg-gray-100 focus:z-10 focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", v), e[3] = g, e[4] = v, e[5] = I) : I = e[5];
67
+ options: c,
68
+ onChange: n,
69
+ showFlagVariant: a,
70
+ hasError: I,
71
+ popoverAnchorRef: u
72
+ } = r, w = h.useRef(null), [F, p] = h.useState(""), [N, b] = h.useState(!1);
73
+ let f;
74
+ e[0] !== o ? (f = o ? `+${B(o)}` : "+91", e[0] = o, e[1] = f) : f = e[1];
75
+ const m = f;
76
+ let g;
77
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (g = (_) => {
78
+ b(_), _ && p("");
79
+ }, e[2] = g) : g = e[2];
80
+ const x = I ? "border-destructive" : "border-gray-300", $ = N && "bg-gray-100";
81
+ let R;
82
+ e[3] !== x || e[4] !== $ ? (R = H("flex h-[40px] items-center gap-1.5 rounded-l-md rounded-r-none border-l-[1px] border-t-[1px] border-b-[1px] bg-white px-3 py-[1px] text-sm font-medium text-gray-900 transition-colors", x, "hover:bg-gray-100 focus:z-10 focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", $), e[3] = x, e[4] = $, e[5] = R) : R = e[5];
83
+ let P;
84
+ e[6] !== o || e[7] !== a ? (P = a && o && typeof o == "string" && /* @__PURE__ */ i("span", { className: "mr-1 flex items-center", children: /* @__PURE__ */ i(ne, { country: o, countryName: o }) }), e[6] = o, e[7] = a, e[8] = P) : P = e[8];
83
85
  let D;
84
- e[6] !== o || e[7] !== s ? (D = s && o && typeof o == "string" && /* @__PURE__ */ c("span", { className: "mr-1 flex items-center", children: /* @__PURE__ */ c(Ee, { country: o, countryName: o }) }), e[6] = o, e[7] = s, e[8] = D) : D = e[8];
85
- let j;
86
- e[9] !== d ? (j = /* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900", children: d }), e[9] = d, e[10] = j) : j = e[10];
87
- const b = t && "hidden";
88
- let V;
89
- e[11] !== b ? (V = ee("h-4 w-4 text-gray-500 shrink-0", b), e[11] = b, e[12] = V) : V = e[12];
90
- let z;
91
- e[13] !== V ? (z = /* @__PURE__ */ c(Pe, { className: V }), e[13] = V, e[14] = z) : z = e[14];
92
- let S;
93
- e[15] !== t || e[16] !== z || e[17] !== I || e[18] !== D || e[19] !== j ? (S = /* @__PURE__ */ c(Xe, { asChild: !0, children: /* @__PURE__ */ T("button", { type: "button", disabled: t, className: I, children: [
86
+ e[9] !== m ? (D = /* @__PURE__ */ i(W, { variant: "body2", weight: "regular", className: "text-gray-900", children: m }), e[9] = m, e[10] = D) : D = e[10];
87
+ const G = t && "hidden";
88
+ let O;
89
+ e[11] !== G ? (O = H("h-4 w-4 text-gray-500 shrink-0", G), e[11] = G, e[12] = O) : O = e[12];
90
+ let k;
91
+ e[13] !== O ? (k = /* @__PURE__ */ i(se, { className: O }), e[13] = O, e[14] = k) : k = e[14];
92
+ let A;
93
+ e[15] !== t || e[16] !== k || e[17] !== R || e[18] !== P || e[19] !== D ? (A = /* @__PURE__ */ i(be, { asChild: !0, children: /* @__PURE__ */ j("button", { type: "button", disabled: t, className: R, children: [
94
+ P,
94
95
  D,
95
- j,
96
- z
97
- ] }) }), e[15] = t, e[16] = z, e[17] = I, e[18] = D, e[19] = j, e[20] = S) : S = e[20];
98
- let q;
99
- e[21] === Symbol.for("react.memo_cache_sentinel") ? (q = {
96
+ k
97
+ ] }) }), e[15] = t, e[16] = k, e[17] = R, e[18] = P, e[19] = D, e[20] = A) : A = e[20];
98
+ let L;
99
+ e[21] === Symbol.for("react.memo_cache_sentinel") ? (L = {
100
100
  side: "flip",
101
101
  align: "shift",
102
102
  fallbackAxisSide: "none"
103
- }, e[21] = q) : q = e[21];
104
- let k;
105
- e[22] === Symbol.for("react.memo_cache_sentinel") ? (k = (F) => {
106
- w(F), window.setTimeout(() => {
107
- const L = C.current;
108
- L && (L.scrollTop = 0);
103
+ }, e[21] = L) : L = e[21];
104
+ let M;
105
+ e[22] === Symbol.for("react.memo_cache_sentinel") ? (M = (_) => {
106
+ p(_), window.setTimeout(() => {
107
+ const X = w.current;
108
+ X && (X.scrollTop = 0);
109
109
  }, 0);
110
- }, e[22] = k) : k = e[22];
111
- let _;
112
- e[23] !== $ ? (_ = /* @__PURE__ */ c("div", { className: "mb-3 h-[32px] rounded-full border border-gray-300 bg-white overflow-hidden [&_[cmdk-input-wrapper]]:h-full [&_[cmdk-input-wrapper]]:px-3 [&_[cmdk-input-wrapper]_svg]:text-gray-500", children: /* @__PURE__ */ c(Be, { value: $, onValueChange: k, placeholder: "Search country..." }) }), e[23] = $, e[24] = _) : _ = e[24];
113
- let A, G;
114
- e[25] === Symbol.for("react.memo_cache_sentinel") ? (A = {
110
+ }, e[22] = M) : M = e[22];
111
+ let v;
112
+ e[23] !== F ? (v = /* @__PURE__ */ i("div", { className: "mb-3 h-[32px] rounded-full border border-gray-300 bg-white overflow-hidden [&_[cmdk-input-wrapper]]:h-full [&_[cmdk-input-wrapper]]:px-3 [&_[cmdk-input-wrapper]_svg]:text-gray-500", children: /* @__PURE__ */ i(ae, { value: F, onValueChange: M, placeholder: "Search country..." }) }), e[23] = F, e[24] = v) : v = e[24];
113
+ let U, d;
114
+ e[25] === Symbol.for("react.memo_cache_sentinel") ? (U = {
115
115
  msOverflowStyle: "none"
116
- }, G = /* @__PURE__ */ c(Le, { children: "No country found." }), e[25] = A, e[26] = G) : (A = e[25], G = e[26]);
117
- let O;
118
- if (e[27] !== n || e[28] !== l || e[29] !== o || e[30] !== s) {
119
- let F;
120
- e[32] !== l || e[33] !== o || e[34] !== s ? (F = (L) => {
116
+ }, d = /* @__PURE__ */ i(de, { children: "No country found." }), e[25] = U, e[26] = d) : (U = e[25], d = e[26]);
117
+ let S;
118
+ if (e[27] !== c || e[28] !== n || e[29] !== o || e[30] !== a) {
119
+ let _;
120
+ e[32] !== n || e[33] !== o || e[34] !== a ? (_ = (X) => {
121
121
  const {
122
- value: i,
123
- label: M,
124
- countryCode: X
125
- } = L;
126
- return i ? /* @__PURE__ */ c(We, { country: i, countryName: M, countryCode: X, selectedCountry: o, onChange: l, onSelectComplete: () => m(!1), showFlagVariant: s }, typeof i == "object" && "countryId" in i ? i.countryId : i) : null;
127
- }, e[32] = l, e[33] = o, e[34] = s, e[35] = F) : F = e[35], O = n.map(F), e[27] = n, e[28] = l, e[29] = o, e[30] = s, e[31] = O;
122
+ value: T,
123
+ label: l,
124
+ countryCode: s
125
+ } = X;
126
+ return T ? /* @__PURE__ */ i(Ne, { country: T, countryName: l, countryCode: s, selectedCountry: o, onChange: n, onSelectComplete: () => b(!1), showFlagVariant: a }, typeof T == "object" && "countryId" in T ? T.countryId : T) : null;
127
+ }, e[32] = n, e[33] = o, e[34] = a, e[35] = _) : _ = e[35], S = c.map(_), e[27] = c, e[28] = n, e[29] = o, e[30] = a, e[31] = S;
128
128
  } else
129
- O = e[31];
130
- let P;
131
- e[36] !== O ? (P = /* @__PURE__ */ c(Ve, { children: /* @__PURE__ */ T("div", { ref: C, className: "max-h-[min(288px,calc(100vh-12rem))] overflow-y-auto -mx-1 px-1 [&::-webkit-scrollbar]:hidden [scrollbar-width:none]", style: A, children: [
132
- G,
133
- /* @__PURE__ */ c(ze, { children: O })
134
- ] }) }), e[36] = O, e[37] = P) : P = e[37];
129
+ S = e[31];
135
130
  let E;
136
- e[38] !== _ || e[39] !== P ? (E = /* @__PURE__ */ T(Ge, { children: [
137
- _,
138
- P
139
- ] }), e[38] = _, e[39] = P, e[40] = E) : E = e[40];
140
- let u;
141
- e[41] !== f || e[42] !== E ? (u = /* @__PURE__ */ c(He, { anchor: f, side: "bottom", sideOffset: 6, collisionAvoidance: q, className: "w-[min(var(--anchor-width),calc(100vw-1rem))] max-w-[var(--available-width)] min-w-0 p-1 shadow-md border border-gray-300 rounded-md", align: "start", children: E }), e[41] = f, e[42] = E, e[43] = u) : u = e[43];
142
- let B;
143
- return e[44] !== h || e[45] !== S || e[46] !== u ? (B = /* @__PURE__ */ T(Je, { open: h, modal: !0, onOpenChange: a, children: [
144
- S,
145
- u
146
- ] }), e[44] = h, e[45] = S, e[46] = u, e[47] = B) : B = e[47], B;
147
- }, We = (r) => {
148
- const e = he(21), {
131
+ e[36] !== S ? (E = /* @__PURE__ */ i(me, { children: /* @__PURE__ */ j("div", { ref: w, className: "max-h-[min(288px,calc(100vh-12rem))] overflow-y-auto -mx-1 px-1 [&::-webkit-scrollbar]:hidden [scrollbar-width:none]", style: U, children: [
132
+ d,
133
+ /* @__PURE__ */ i(fe, { children: S })
134
+ ] }) }), e[36] = S, e[37] = E) : E = e[37];
135
+ let y;
136
+ e[38] !== v || e[39] !== E ? (y = /* @__PURE__ */ j(ue, { children: [
137
+ v,
138
+ E
139
+ ] }), e[38] = v, e[39] = E, e[40] = y) : y = e[40];
140
+ let C;
141
+ e[41] !== u || e[42] !== y ? (C = /* @__PURE__ */ i(ge, { anchor: u, side: "bottom", sideOffset: 6, collisionAvoidance: L, className: "w-[min(var(--anchor-width),calc(100vw-1rem))] max-w-[var(--available-width)] min-w-0 p-1 shadow-md border border-gray-300 rounded-md", align: "start", children: y }), e[41] = u, e[42] = y, e[43] = C) : C = e[43];
142
+ let z;
143
+ return e[44] !== N || e[45] !== A || e[46] !== C ? (z = /* @__PURE__ */ j(xe, { open: N, modal: !0, onOpenChange: g, children: [
144
+ A,
145
+ C
146
+ ] }), e[44] = N, e[45] = A, e[46] = C, e[47] = z) : z = e[47], z;
147
+ }, Ne = (r) => {
148
+ const e = Z(21), {
149
149
  country: t,
150
150
  countryName: o,
151
- countryCode: n,
152
- selectedCountry: l,
153
- onChange: s,
154
- onSelectComplete: x,
155
- showFlagVariant: f
151
+ countryCode: c,
152
+ selectedCountry: n,
153
+ onChange: a,
154
+ onSelectComplete: I,
155
+ showFlagVariant: u
156
156
  } = r;
157
- let C;
158
- e[0] !== t || e[1] !== s || e[2] !== x ? (C = () => {
159
- s(t), x();
160
- }, e[0] = t, e[1] = s, e[2] = x, e[3] = C) : C = e[3];
161
- const $ = C;
162
157
  let w;
158
+ e[0] !== t || e[1] !== a || e[2] !== I ? (w = () => {
159
+ a(t), I();
160
+ }, e[0] = t, e[1] = a, e[2] = I, e[3] = w) : w = e[3];
161
+ const F = w;
162
+ let p;
163
163
  e: {
164
- if (!l) {
165
- w = !1;
164
+ if (!n) {
165
+ p = !1;
166
166
  break e;
167
167
  }
168
- if (typeof t == "object" && "countryId" in t && typeof l == "object" && "countryId" in l) {
169
- w = t.countryId === l.countryId;
168
+ if (typeof t == "object" && "countryId" in t && typeof n == "object" && "countryId" in n) {
169
+ p = t.countryId === n.countryId;
170
170
  break e;
171
171
  }
172
- w = t === l;
172
+ p = t === n;
173
173
  }
174
- const h = w, m = typeof t == "object" && "countryId" in t ? `${t.countryName} ${t.countryCode}` : `${o} ${n}`;
175
- let y;
176
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (y = ee("flex items-center gap-3 px-3 py-2.5 text-sm cursor-pointer transition-colors", "data-[selected=true]:bg-[#F5F5F5] data-[selected=true]:text-gray-900", "hover:bg-[#F5F5F5]"), e[4] = y) : y = e[4];
177
- let d;
178
- e[5] !== t || e[6] !== o || e[7] !== f ? (d = f && typeof t == "string" && /* @__PURE__ */ c("span", { className: "flex items-center", children: /* @__PURE__ */ c(Ee, { country: t, countryName: o }) }), e[5] = t, e[6] = o, e[7] = f, e[8] = d) : d = e[8];
179
- let a;
180
- e[9] !== n || e[10] !== o || e[11] !== f ? (a = f ? /* @__PURE__ */ T($e, { children: [
181
- /* @__PURE__ */ c("span", { className: "flex-1 text-sm font-normal text-gray-700", children: o }),
182
- /* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px] text-right", children: n })
183
- ] }) : /* @__PURE__ */ T($e, { children: [
184
- /* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px]", children: n }),
185
- /* @__PURE__ */ c("span", { className: "flex-1 text-sm font-normal text-gray-700", children: o })
186
- ] }), e[9] = n, e[10] = o, e[11] = f, e[12] = a) : a = e[12];
174
+ const N = p, b = typeof t == "object" && "countryId" in t ? `${t.countryName} ${t.countryCode}` : `${o} ${c}`;
175
+ let f;
176
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = H("flex items-center gap-3 px-3 py-2.5 text-sm cursor-pointer transition-colors", "data-[selected=true]:bg-[#F5F5F5] data-[selected=true]:text-gray-900", "hover:bg-[#F5F5F5]"), e[4] = f) : f = e[4];
177
+ let m;
178
+ e[5] !== t || e[6] !== o || e[7] !== u ? (m = u && typeof t == "string" && /* @__PURE__ */ i("span", { className: "flex items-center", children: /* @__PURE__ */ i(ne, { country: t, countryName: o }) }), e[5] = t, e[6] = o, e[7] = u, e[8] = m) : m = e[8];
187
179
  let g;
188
- e[13] !== h ? (g = h && /* @__PURE__ */ c(Te, { className: "ml-auto h-4 w-4 text-gray-900 shrink-0" }), e[13] = h, e[14] = g) : g = e[14];
189
- let v;
190
- return e[15] !== $ || e[16] !== m || e[17] !== d || e[18] !== a || e[19] !== g ? (v = /* @__PURE__ */ T(Ue, { value: m, className: y, onSelect: $, children: [
191
- d,
192
- a,
193
- g
194
- ] }), e[15] = $, e[16] = m, e[17] = d, e[18] = a, e[19] = g, e[20] = v) : v = e[20], v;
195
- }, Ye = ke.getCountries(), Ze = (r) => {
180
+ e[9] !== c || e[10] !== o || e[11] !== u ? (g = u ? /* @__PURE__ */ j(V, { children: [
181
+ /* @__PURE__ */ i("span", { className: "flex-1 text-sm font-normal text-gray-700", children: o }),
182
+ /* @__PURE__ */ i(W, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px] text-right", children: c })
183
+ ] }) : /* @__PURE__ */ j(V, { children: [
184
+ /* @__PURE__ */ i(W, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px]", children: c }),
185
+ /* @__PURE__ */ i("span", { className: "flex-1 text-sm font-normal text-gray-700", children: o })
186
+ ] }), e[9] = c, e[10] = o, e[11] = u, e[12] = g) : g = e[12];
187
+ let x;
188
+ e[13] !== N ? (x = N && /* @__PURE__ */ i(ie, { className: "ml-auto h-4 w-4 text-gray-900 shrink-0" }), e[13] = N, e[14] = x) : x = e[14];
189
+ let $;
190
+ return e[15] !== F || e[16] !== b || e[17] !== m || e[18] !== g || e[19] !== x ? ($ = /* @__PURE__ */ j(pe, { value: b, className: f, onSelect: F, children: [
191
+ m,
192
+ g,
193
+ x
194
+ ] }), e[15] = F, e[16] = b, e[17] = m, e[18] = g, e[19] = x, e[20] = $) : $ = e[20], $;
195
+ }, Ie = oe.getCountries(), Se = (r) => {
196
196
  if (!r || r.length === 0)
197
- return Ye.map((t) => ({
197
+ return Ie.map((t) => ({
198
198
  value: t,
199
199
  label: new Intl.DisplayNames(["en"], {
200
200
  type: "region"
201
201
  }).of(t) ?? t,
202
- countryCode: `+${U(t)}`
202
+ countryCode: `+${B(t)}`
203
203
  }));
204
204
  const e = r[0];
205
205
  return e && typeof e == "object" && "countryId" in e ? r.map((t) => ({
@@ -211,139 +211,88 @@ const Ke = /\D/g, te = (r) => r.replace(Ke, ""), _e = (r) => {
211
211
  label: new Intl.DisplayNames(["en"], {
212
212
  type: "region"
213
213
  }).of(t) ?? t,
214
- countryCode: `+${U(t)}`
214
+ countryCode: `+${B(t)}`
215
215
  }));
216
216
  };
217
- function dt(r) {
218
- const e = he(108);
219
- let t, o, n, l, s, x, f, C, $, w, h, m, y, d, a, g, v, I, D, j;
220
- e[0] !== r ? ({
221
- label: w,
222
- helperText: C,
223
- error: f,
224
- required: v,
225
- className: o,
226
- "aria-describedby": t,
227
- id: $,
228
- value: D,
229
- onPhoneChange: y,
230
- countryCode: l,
231
- onCountryCodeChange: m,
232
- onValuesChange: a,
233
- onCountryChange: h,
234
- onValueChange: d,
235
- countries: n,
236
- defaultCountry: s,
237
- variant: j,
238
- disabled: x,
239
- placeholder: g,
240
- ...I
241
- } = r, e[0] = r, e[1] = t, e[2] = o, e[3] = n, e[4] = l, e[5] = s, e[6] = x, e[7] = f, e[8] = C, e[9] = $, e[10] = w, e[11] = h, e[12] = m, e[13] = y, e[14] = d, e[15] = a, e[16] = g, e[17] = v, e[18] = I, e[19] = D, e[20] = j) : (t = e[1], o = e[2], n = e[3], l = e[4], s = e[5], x = e[6], f = e[7], C = e[8], $ = e[9], w = e[10], h = e[11], m = e[12], y = e[13], d = e[14], a = e[15], g = e[16], v = e[17], I = e[18], D = e[19], j = e[20]);
242
- const b = D === void 0 ? "" : D, V = j === void 0 ? "default" : j, z = R.useId(), S = R.useId(), q = R.useRef(null), k = $ ?? z, _ = !!(C || f);
243
- let A;
244
- e[21] !== t || e[22] !== _ || e[23] !== S ? (A = [t, _ ? S : void 0].filter(Boolean).join(" ") || void 0, e[21] = t, e[22] = _, e[23] = S, e[24] = A) : A = e[24];
245
- const G = A, O = !!f, P = V === "flag";
246
- let E;
247
- e[25] !== n ? (E = Ze(n), e[25] = n, e[26] = E) : E = e[26];
248
- const u = E;
249
- let B;
250
- e[27] !== n || e[28] !== u || e[29] !== s || e[30] !== b ? (B = () => {
251
- const p = _e(String(b ?? "").trim());
252
- if (p) {
253
- const N = Ie(u, p.callingCode, void 0);
254
- if (N)
255
- return N;
217
+ function Pe({
218
+ label: r,
219
+ helperText: e,
220
+ error: t,
221
+ required: o,
222
+ className: c,
223
+ "aria-describedby": n,
224
+ id: a,
225
+ value: I = "",
226
+ onPhoneChange: u,
227
+ countryCode: w,
228
+ onCountryCodeChange: F,
229
+ onValuesChange: p,
230
+ onCountryChange: N,
231
+ onValueChange: b,
232
+ countries: f,
233
+ defaultCountry: m,
234
+ variant: g = "default",
235
+ disabled: x,
236
+ placeholder: $,
237
+ ...R
238
+ }) {
239
+ const P = h.useId(), D = h.useId(), G = h.useRef(null), O = a ?? P, k = !!(e || t), A = [n, k ? D : void 0].filter(Boolean).join(" ") || void 0, L = !!t, M = g === "flag", v = h.useMemo(() => Se(f), [f]), U = () => {
240
+ const l = Y(String(I ?? "").trim());
241
+ if (l) {
242
+ const s = Q(v, l.callingCode, void 0);
243
+ if (s) return s;
256
244
  }
257
- return je(s, n);
258
- }, e[27] = n, e[28] = u, e[29] = s, e[30] = b, e[31] = B) : B = e[31];
259
- const F = B;
260
- let L;
261
- e[32] !== F ? (L = () => F(), e[32] = F, e[33] = L) : L = e[33];
262
- const [i, M] = R.useState(L);
263
- let X, re;
264
- e[34] !== n || e[35] !== s ? (X = () => {
265
- if (s != null) {
266
- const p = je(s, n);
267
- p && M(p);
245
+ return te(m, f);
246
+ }, [d, S] = h.useState(() => U()), E = w !== void 0, y = h.useRef(F);
247
+ y.current = F;
248
+ const C = h.useRef(null);
249
+ h.useEffect(() => {
250
+ if (m != null) {
251
+ const l = te(m, f);
252
+ l && S((s) => s && K(l, s) ? s : l);
268
253
  }
269
- }, re = [s, n], e[34] = n, e[35] = s, e[36] = X, e[37] = re) : (X = e[36], re = e[37]), R.useEffect(X, re);
270
- const oe = l !== void 0;
271
- let le, ne;
272
- e[38] !== m || e[39] !== i ? (ne = () => {
273
- if (!i)
274
- return;
275
- const p = U(i);
276
- m == null || m(p);
277
- }, le = [i, m], e[38] = m, e[39] = i, e[40] = le, e[41] = ne) : (le = e[40], ne = e[41]), R.useEffect(ne, le);
278
- let se, ie;
279
- e[42] !== l || e[43] !== u || e[44] !== oe || e[45] !== i ? (se = () => {
280
- if (!oe)
281
- return;
282
- const p = te(String(l ?? ""));
283
- if (p === "")
284
- return;
285
- const N = Ie(u, p, i);
286
- N && !Fe(N, i) && M(N);
287
- }, ie = [l, u, oe, i], e[42] = l, e[43] = u, e[44] = oe, e[45] = i, e[46] = se, e[47] = ie) : (se = e[46], ie = e[47]), R.useEffect(se, ie);
288
- let ae, ce;
289
- e[48] !== u || e[49] !== i || e[50] !== b ? (ae = () => {
290
- const p = _e(String(b ?? "").trim());
291
- if (!p)
292
- return;
293
- const N = Ie(u, p.callingCode, i);
294
- N && !Fe(N, i) && M(N);
295
- }, ce = [b, u, i], e[48] = u, e[49] = i, e[50] = b, e[51] = ae, e[52] = ce) : (ae = e[51], ce = e[52]), R.useEffect(ae, ce);
296
- let de;
297
- e[53] !== b ? (de = De(b), e[53] = b, e[54] = de) : de = e[54];
298
- const fe = de;
299
- let me;
300
- e[55] !== fe || e[56] !== h || e[57] !== m || e[58] !== d || e[59] !== a ? (me = (p) => {
301
- M(p);
302
- const N = U(p);
303
- m == null || m(N), h == null || h(p), a == null || a([N, fe]), d == null || d(Oe(fe, p));
304
- }, e[55] = fe, e[56] = h, e[57] = m, e[58] = d, e[59] = a, e[60] = me) : me = e[60];
305
- const ge = me;
306
- let ue;
307
- e[61] !== l || e[62] !== y || e[63] !== d || e[64] !== a || e[65] !== i ? (ue = (p) => {
308
- const N = p.target.value, Ne = te(N);
309
- y == null || y(Ne);
310
- const Re = l ?? U(i);
311
- a == null || a([Re, Ne]), d == null || d(Oe(Ne, i));
312
- }, e[61] = l, e[62] = y, e[63] = d, e[64] = a, e[65] = i, e[66] = ue) : ue = e[66];
313
- const be = ue;
314
- let pe;
315
- e[67] !== b ? (pe = De(b), e[67] = b, e[68] = pe) : pe = e[68];
316
- const ve = pe;
317
- let H;
318
- e[69] !== o ? (H = ee("space-y-1", o), e[69] = o, e[70] = H) : H = e[70];
319
- let J;
320
- e[71] !== w || e[72] !== v || e[73] !== k ? (J = w && /* @__PURE__ */ T(Me, { htmlFor: k, className: "text-sm font-medium text-foreground", children: [
321
- w,
322
- v && /* @__PURE__ */ c("span", { className: "ml-1 text-destructive", "aria-hidden": "true", children: "*" })
323
- ] }), e[71] = w, e[72] = v, e[73] = k, e[74] = J) : J = e[74];
324
- let K;
325
- e[75] !== u || e[76] !== x || e[77] !== ge || e[78] !== O || e[79] !== i || e[80] !== P ? (K = /* @__PURE__ */ c(Qe, { disabled: x, value: i, options: u, onChange: ge, showFlagVariant: P, hasError: O, popoverAnchorRef: q }), e[75] = u, e[76] = x, e[77] = ge, e[78] = O, e[79] = i, e[80] = P, e[81] = K) : K = e[81];
326
- const xe = v || void 0, Ce = O || void 0, we = O ? "border-destructive" : "border-gray-300";
327
- let Q;
328
- e[82] !== we ? (Q = ee("h-[40px] rounded-r-md rounded-l-none border-t-[1px] border-b-[1px] border-l-[1px] bg-white px-3 py-[1px] text-sm", we), e[82] = we, e[83] = Q) : Q = e[83];
329
- let W;
330
- e[84] !== G || e[85] !== x || e[86] !== be || e[87] !== ve || e[88] !== g || e[89] !== k || e[90] !== I || e[91] !== xe || e[92] !== Ce || e[93] !== Q ? (W = /* @__PURE__ */ c(qe, { ...I, ref: void 0, id: k, type: "text", inputMode: "numeric", value: ve, onChange: be, disabled: x, placeholder: g, "aria-required": xe, "aria-invalid": Ce, "aria-describedby": G, className: Q }), e[84] = G, e[85] = x, e[86] = be, e[87] = ve, e[88] = g, e[89] = k, e[90] = I, e[91] = xe, e[92] = Ce, e[93] = Q, e[94] = W) : W = e[94];
331
- let Y;
332
- e[95] !== K || e[96] !== W ? (Y = /* @__PURE__ */ T("div", { ref: q, className: "flex w-full min-w-0 items-center", children: [
333
- K,
334
- W
335
- ] }), e[95] = K, e[96] = W, e[97] = Y) : Y = e[97];
336
- let Z;
337
- e[98] !== f || e[99] !== _ || e[100] !== S || e[101] !== C ? (Z = _ && /* @__PURE__ */ c("p", { id: S, className: ee("text-xs", f ? "text-destructive" : "text-muted-foreground"), role: f ? "alert" : void 0, children: f || C }), e[98] = f, e[99] = _, e[100] = S, e[101] = C, e[102] = Z) : Z = e[102];
338
- let ye;
339
- return e[103] !== H || e[104] !== J || e[105] !== Y || e[106] !== Z ? (ye = /* @__PURE__ */ T("div", { className: H, children: [
340
- J,
341
- Y,
342
- Z
343
- ] }), e[103] = H, e[104] = J, e[105] = Y, e[106] = Z, e[107] = ye) : ye = e[107], ye;
254
+ }, [m, f]), h.useEffect(() => {
255
+ var s;
256
+ if (!d) return;
257
+ const l = B(d);
258
+ C.current !== l && (C.current = l, (s = y.current) == null || s.call(y, l));
259
+ }, [d]), h.useEffect(() => {
260
+ if (!E) return;
261
+ const l = J(String(w ?? ""));
262
+ if (l === "") return;
263
+ const s = Q(v, l, d);
264
+ s && !K(s, d) && S(s);
265
+ }, [w, v, E, d]), h.useEffect(() => {
266
+ const l = Y(String(I ?? "").trim());
267
+ if (!l) return;
268
+ const s = Q(v, l.callingCode, d);
269
+ s && !K(s, d) && S(s);
270
+ }, [I, v, d]);
271
+ const z = ee(I), _ = (l) => {
272
+ var q;
273
+ S(l);
274
+ const s = B(l);
275
+ C.current = s, (q = y.current) == null || q.call(y, s), N == null || N(l), p == null || p([s, z]), b == null || b(re(z, l));
276
+ }, X = (l) => {
277
+ const s = l.target.value, q = J(s);
278
+ u == null || u(q);
279
+ const le = w ?? B(d);
280
+ p == null || p([le, q]), b == null || b(re(q, d));
281
+ }, T = ee(I);
282
+ return /* @__PURE__ */ j("div", { className: H("space-y-1", c), children: [
283
+ r && /* @__PURE__ */ j(he, { htmlFor: O, className: "text-sm font-medium text-foreground", children: [
284
+ r,
285
+ o && /* @__PURE__ */ i("span", { className: "ml-1 text-destructive", "aria-hidden": "true", children: "*" })
286
+ ] }),
287
+ /* @__PURE__ */ j("div", { ref: G, className: "flex w-full min-w-0 items-center", children: [
288
+ /* @__PURE__ */ i(we, { disabled: x, value: d, options: v, onChange: _, showFlagVariant: M, hasError: L, popoverAnchorRef: G }),
289
+ /* @__PURE__ */ i(ye, { ...R, ref: void 0, id: O, type: "text", inputMode: "numeric", value: T, onChange: X, disabled: x, placeholder: $, "aria-required": o || void 0, "aria-invalid": L || void 0, "aria-describedby": A, className: H("h-[40px] rounded-r-md rounded-l-none border-t-[1px] border-b-[1px] border-l-[1px] bg-white px-3 py-[1px] text-sm", L ? "border-destructive" : "border-gray-300") })
290
+ ] }),
291
+ k && /* @__PURE__ */ i("p", { id: D, className: H("text-xs", t ? "text-destructive" : "text-muted-foreground"), role: t ? "alert" : void 0, children: t || e })
292
+ ] });
344
293
  }
345
294
  export {
346
- dt as DoctPhoneInput,
347
- ut as isPossiblePhoneNumber,
348
- pt as isValidPhoneNumber
295
+ Pe as DoctPhoneInput,
296
+ Te as isPossiblePhoneNumber,
297
+ Be as isValidPhoneNumber
349
298
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docthub-core-components",
3
- "version": "3.3.10",
3
+ "version": "3.3.11",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",