docthub-core-components 3.3.5 → 3.3.6

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,268 +1,369 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as E, Fragment as de } from "react/jsx-runtime";
2
+ import { jsx as o, jsxs as A, Fragment as pt } from "react/jsx-runtime";
3
3
  import { c as D } from "react-compiler-runtime";
4
- import { Smartphone as fe, X as ue } from "lucide-react";
5
- import * as ie from "react";
6
- import { DoctButton as z } from "../../../ui/button.js";
7
- import { DialogHeader as me, DialogTitle as he, DialogContent as be, Dialog as pe } from "../../../ui/dialog.js";
8
- import { DrawerHeader as ge, DrawerTitle as Ne, DrawerContent as ve, Drawer as _e } from "../../../ui/drawer.js";
9
- import { DoctTypography as H } from "../../../ui/typography.js";
10
- import { useIsMobile as xe } from "../../../../hooks/use-mobile.js";
11
- import { cn as se } from "../../../../lib/utils.js";
12
- import { DoctPhoneInput as De } from "../inputs/phone-input.js";
13
- import { MOBILE_NUMBER_DIALOG_DEFAULT_COUNTRY_CODE as Me, buildMobileNumberDisplay as ye, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER as Le, MOBILE_NUMBER_DIALOG_BODY_TITLE as Ce, MOBILE_NUMBER_DIALOG_HEADER_TITLE as Ee, MOBILE_NUMBER_DIALOG_DEFAULT_INFO_MESSAGE as ae, MOBILE_NUMBER_DIALOG_PRIMARY_LABEL as we, buildLoginWithMobileNumberLabel as Ae, MOBILE_NUMBER_DIALOG_LOGIN_UNIFY_HINT as Ie, isMobileNumberDialogPrimaryDisabled as Oe, MOBILE_NUMBER_DIALOG_SECONDARY_LABEL as Be } from "./presets.js";
14
- import { MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS as oe } from "./types.js";
15
- const Re = "[&>div:first-child]:pointer-events-none [&>div:first-child]:sr-only [&>div:first-child]:m-0 [&>div:first-child]:h-0 [&>div:first-child]:w-0 [&>div:first-child]:overflow-hidden", Te = "flex w-full flex-col overflow-hidden border border-black/[0.12] bg-white";
16
- function ke(r) {
4
+ import { Smartphone as ht, X as bt } from "lucide-react";
5
+ import * as G from "react";
6
+ import { CircularProgress as lt } from "../circular-progress.js";
7
+ import { DoctButton as ae } from "../../../ui/button.js";
8
+ import { DialogHeader as gt, DialogTitle as _t, DialogContent as Lt, Dialog as Nt } from "../../../ui/dialog.js";
9
+ import { DrawerHeader as vt, DrawerTitle as Et, DrawerContent as xt, Drawer as Dt } from "../../../ui/drawer.js";
10
+ import { DoctTypography as ce } from "../../../ui/typography.js";
11
+ import { useIsMobile as Mt } from "../../../../hooks/use-mobile.js";
12
+ import { cn as qe } from "../../../../lib/utils.js";
13
+ import { DoctPhoneInput as yt } from "../inputs/phone-input.js";
14
+ import { MobileNumberDialogOtpSurface as it } from "./otp-dialog.js";
15
+ import { MOBILE_NUMBER_DIALOG_DEFAULT_COUNTRY_CODE as Ct, buildMobileNumberDisplay as Ot, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER as wt, MOBILE_NUMBER_DIALOG_BODY_TITLE as It, MOBILE_NUMBER_DIALOG_HEADER_TITLE as At, MOBILE_NUMBER_DIALOG_DEFAULT_INFO_MESSAGE as st, MOBILE_NUMBER_DIALOG_OTP_HEADER_TITLE as Bt, MOBILE_NUMBER_DIALOG_OTP_SUBMIT_LABEL as Tt, MOBILE_NUMBER_DIALOG_OTP_TITLE as St, MOBILE_NUMBER_DIALOG_OTP_RESEND_LABEL as Rt, MOBILE_NUMBER_DIALOG_PRIMARY_LABEL as kt, buildLoginWithMobileNumberLabel as Pt, MOBILE_NUMBER_DIALOG_LOGIN_UNIFY_HINT as Ut, isMobileNumberDialogPrimaryDisabled as Gt, MOBILE_NUMBER_DIALOG_SECONDARY_LABEL as Ft } from "./presets.js";
16
+ import { MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS as Xe } from "./types.js";
17
+ const Ht = "[&>div:first-child]:pointer-events-none [&>div:first-child]:sr-only [&>div:first-child]:m-0 [&>div:first-child]:h-0 [&>div:first-child]:w-0 [&>div:first-child]:overflow-hidden", zt = "flex w-full flex-col overflow-hidden border border-black/[0.12] bg-white";
18
+ function $t(a) {
17
19
  const e = D(3), {
18
20
  onClose: i
19
- } = r;
21
+ } = a;
20
22
  let t;
21
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(ue, { className: "size-6", "aria-hidden": !0 }), e[0] = t) : t = e[0];
23
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(bt, { className: "size-6", "aria-hidden": !0 }), e[0] = t) : t = e[0];
22
24
  let l;
23
- return e[1] !== i ? (l = /* @__PURE__ */ o(z, { type: "button", variant: "ghost", onClick: i, className: "flex size-12 shrink-0 items-center justify-center rounded-full p-0 text-black/70", "aria-label": "Close", icon: t }), e[1] = i, e[2] = l) : l = e[2], l;
25
+ return e[1] !== i ? (l = /* @__PURE__ */ o(ae, { type: "button", variant: "ghost", onClick: i, className: "flex size-12 shrink-0 items-center justify-center rounded-full p-0 text-black/70", "aria-label": "Close", icon: t }), e[1] = i, e[2] = l) : l = e[2], l;
24
26
  }
25
- function Se(r) {
27
+ function Wt(a) {
26
28
  const e = D(7), {
27
29
  title: i,
28
30
  onClose: t
29
- } = r;
31
+ } = a;
30
32
  let l;
31
- e[0] !== i ? (l = /* @__PURE__ */ o("div", { className: "flex min-h-12 min-w-0 flex-1 items-center py-[18px]", children: /* @__PURE__ */ o(H, { as: "p", variant: "textLabel1", weight: "semiBold", align: "left", className: "min-w-0 !text-black/80", children: i }) }), e[0] = i, e[1] = l) : l = e[1];
32
- let n;
33
- e[2] !== t ? (n = /* @__PURE__ */ o(ke, { onClose: t }), e[2] = t, e[3] = n) : n = e[3];
33
+ e[0] !== i ? (l = /* @__PURE__ */ o("div", { className: "flex min-h-12 min-w-0 flex-1 items-center py-[18px]", children: /* @__PURE__ */ o(ce, { as: "p", variant: "textLabel1", weight: "semiBold", align: "left", className: "min-w-0 !text-black/80", children: i }) }), e[0] = i, e[1] = l) : l = e[1];
34
34
  let s;
35
- return e[4] !== l || e[5] !== n ? (s = /* @__PURE__ */ E("div", { className: "flex w-full shrink-0 items-start justify-between overflow-hidden pl-4", children: [
35
+ e[2] !== t ? (s = /* @__PURE__ */ o($t, { onClose: t }), e[2] = t, e[3] = s) : s = e[3];
36
+ let n;
37
+ return e[4] !== l || e[5] !== s ? (n = /* @__PURE__ */ A("div", { className: "flex w-full shrink-0 items-start justify-between overflow-hidden pl-4", children: [
36
38
  l,
37
- n
38
- ] }), e[4] = l, e[5] = n, e[6] = s) : s = e[6], s;
39
+ s
40
+ ] }), e[4] = l, e[5] = s, e[6] = n) : n = e[6], n;
39
41
  }
40
- function Pe(r) {
42
+ function jt(a) {
41
43
  const e = D(4), {
42
44
  icon: i
43
- } = r;
45
+ } = a;
44
46
  let t;
45
- e[0] !== i ? (t = i ?? /* @__PURE__ */ o(fe, { className: "size-6 text-white", strokeWidth: 1.75, "aria-hidden": !0 }), e[0] = i, e[1] = t) : t = e[1];
47
+ e[0] !== i ? (t = i ?? /* @__PURE__ */ o(ht, { className: "size-6 text-white", strokeWidth: 1.75, "aria-hidden": !0 }), e[0] = i, e[1] = t) : t = e[1];
46
48
  let l;
47
49
  return e[2] !== t ? (l = /* @__PURE__ */ o("div", { className: "flex size-12 shrink-0 items-center justify-center rounded-xl bg-[#00A0C0] px-3", children: t }), e[2] = t, e[3] = l) : l = e[3], l;
48
50
  }
49
- function Fe() {
50
- const r = D(1);
51
+ function Yt() {
52
+ const a = D(1);
51
53
  let e;
52
- return r[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o(H, { as: "p", variant: "textLabel3", weight: "medium", align: "left", className: "w-full !text-[#4389FF]", children: ae }), r[0] = e) : e = r[0], e;
54
+ return a[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o(ce, { as: "p", variant: "textLabel3", weight: "medium", align: "left", className: "w-full !text-[#4389FF]", children: st }), a[0] = e) : e = a[0], e;
53
55
  }
54
- function Ue(r) {
56
+ function Kt(a) {
55
57
  const e = D(3), {
56
58
  message: i,
57
59
  isDefaultMessage: t
58
- } = r;
60
+ } = a;
59
61
  let l;
60
- return e[0] !== t || e[1] !== i ? (l = /* @__PURE__ */ o("div", { className: "w-full self-stretch rounded-xl bg-[rgba(67,137,255,0.12)] p-[14px]", children: t ? /* @__PURE__ */ o(Fe, {}) : /* @__PURE__ */ o(H, { as: "p", variant: "textLabel3", weight: "medium", align: "left", className: "w-full !text-[#4389FF]", children: i }) }), e[0] = t, e[1] = i, e[2] = l) : l = e[2], l;
62
+ return e[0] !== t || e[1] !== i ? (l = /* @__PURE__ */ o("div", { className: "w-full self-stretch rounded-xl bg-[rgba(67,137,255,0.12)] p-[14px]", children: t ? /* @__PURE__ */ o(Yt, {}) : /* @__PURE__ */ o(ce, { as: "p", variant: "textLabel3", weight: "medium", align: "left", className: "w-full !text-[#4389FF]", children: i }) }), e[0] = t, e[1] = i, e[2] = l) : l = e[2], l;
61
63
  }
62
- function ne(r) {
64
+ function ot(a) {
63
65
  const e = D(14), {
64
66
  countryCode: i,
65
67
  placeholder: t,
66
68
  value: l,
67
- onChange: n,
68
- onCountryCodeChange: s,
69
- error: m
70
- } = r;
69
+ onChange: s,
70
+ onCountryCodeChange: n,
71
+ error: c
72
+ } = a;
73
+ let m;
74
+ e[0] !== i ? (m = i.replace(/\D/g, "") || void 0, e[0] = i, e[1] = m) : m = e[1];
75
+ const u = m;
71
76
  let d;
72
- e[0] !== i ? (d = i.replace(/\D/g, "") || void 0, e[0] = i, e[1] = d) : d = e[1];
73
- const f = d;
74
- let a;
75
- e[2] !== s ? (a = (M) => s == null ? void 0 : s(`+${M}`), e[2] = s, e[3] = a) : a = e[3];
76
- const c = !m && "[&>div>button]:border-black/10 [&>div>input]:border-black/10";
77
- let h;
78
- e[4] !== c ? (h = se("w-full space-y-1 [&>div>button]:h-[44px] [&>div>button]:rounded-l-lg [&>div>input]:h-[44px] [&>div>input]:rounded-r-lg [&>div>input]:shadow-none [&>div>input]:placeholder:text-black/40 [&>div>input]:focus-visible:ring-0", c), e[4] = c, e[5] = h) : h = e[5];
79
- let p;
80
- return e[6] !== m || e[7] !== f || e[8] !== n || e[9] !== t || e[10] !== a || e[11] !== h || e[12] !== l ? (p = /* @__PURE__ */ o(De, { countryCode: f, placeholder: t, value: l, onPhoneChange: n, onCountryCodeChange: a, error: m, "aria-label": "Mobile number", className: h }), e[6] = m, e[7] = f, e[8] = n, e[9] = t, e[10] = a, e[11] = h, e[12] = l, e[13] = p) : p = e[13], p;
77
+ e[2] !== n ? (d = (h) => n == null ? void 0 : n(`+${h}`), e[2] = n, e[3] = d) : d = e[3];
78
+ const p = !c && "[&>div>button]:border-black/10 [&>div>input]:border-black/10";
79
+ let r;
80
+ e[4] !== p ? (r = qe("w-full space-y-1 [&>div>button]:h-[44px] [&>div>button]:rounded-l-lg [&>div>input]:h-[44px] [&>div>input]:rounded-r-lg [&>div>input]:shadow-none [&>div>input]:placeholder:text-black/40 [&>div>input]:focus-visible:ring-0", p), e[4] = p, e[5] = r) : r = e[5];
81
+ let f;
82
+ return e[6] !== c || e[7] !== u || e[8] !== s || e[9] !== t || e[10] !== d || e[11] !== r || e[12] !== l ? (f = /* @__PURE__ */ o(yt, { countryCode: u, placeholder: t, value: l, onPhoneChange: s, onCountryCodeChange: d, error: c, "aria-label": "Mobile number", className: r }), e[6] = c, e[7] = u, e[8] = s, e[9] = t, e[10] = d, e[11] = r, e[12] = l, e[13] = f) : f = e[13], f;
81
83
  }
82
- function Ge(r) {
83
- const e = D(7), {
84
- phoneDisplay: i
85
- } = r;
86
- let t;
87
- e[0] !== i ? (t = Ae(i), e[0] = i, e[1] = t) : t = e[1];
84
+ function Vt(a) {
85
+ const e = D(8), {
86
+ phoneDisplay: i,
87
+ onLogin: t
88
+ } = a;
88
89
  let l;
89
- e[2] !== t ? (l = /* @__PURE__ */ o(z, { type: "button", variant: "outline", size: "medium", fullWidth: !0, children: t }), e[2] = t, e[3] = l) : l = e[3];
90
- let n;
91
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ o(H, { as: "p", variant: "body5", weight: "regular", className: "w-full !text-center !text-black/44", children: Ie }), e[4] = n) : n = e[4];
90
+ e[0] !== i ? (l = Pt(i), e[0] = i, e[1] = l) : l = e[1];
92
91
  let s;
93
- return e[5] !== l ? (s = /* @__PURE__ */ E("div", { className: "flex w-full flex-col items-center gap-1.5 rounded-xl bg-black/[0.04] p-3", children: [
94
- l,
92
+ e[2] !== t || e[3] !== l ? (s = /* @__PURE__ */ o(ae, { type: "button", variant: "outline", size: "medium", fullWidth: !0, onClick: t, children: l }), e[2] = t, e[3] = l, e[4] = s) : s = e[4];
93
+ let n;
94
+ e[5] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ o(ce, { as: "p", variant: "body5", weight: "regular", className: "w-full !text-center !text-black/44", children: Ut }), e[5] = n) : n = e[5];
95
+ let c;
96
+ return e[6] !== s ? (c = /* @__PURE__ */ A("div", { className: "flex w-full flex-col items-center gap-1.5 rounded-xl bg-black/[0.04] p-3", children: [
97
+ s,
95
98
  n
96
- ] }), e[5] = l, e[6] = s) : s = e[6], s;
99
+ ] }), e[6] = s, e[7] = c) : c = e[7], c;
97
100
  }
98
- function $e(r) {
99
- const e = D(11), {
101
+ function Xt(a) {
102
+ const e = D(24), {
100
103
  trigger: i,
101
- state: t
102
- } = r, l = we[i][t];
103
- let n;
104
- e[0] !== t ? (n = Oe(t), e[0] = t, e[1] = n) : n = e[1];
105
- const s = n;
104
+ state: t,
105
+ onPrimaryClick: l,
106
+ onSecondaryClick: s,
107
+ isPrimaryLoading: n
108
+ } = a, c = kt[i][t];
109
+ let m;
110
+ e[0] !== n || e[1] !== t ? (m = Gt(t) || n, e[0] = n, e[1] = t, e[2] = m) : m = e[2];
111
+ const u = m;
106
112
  if (i === "action") {
107
- const a = s ? "disabled" : "primary";
108
- let c;
109
- return e[2] !== s || e[3] !== l || e[4] !== a ? (c = /* @__PURE__ */ o(z, { type: "button", size: "medium", fullWidth: !0, variant: a, disabled: s, children: l }), e[2] = s, e[3] = l, e[4] = a, e[5] = c) : c = e[5], c;
113
+ const _ = u ? "disabled" : "primary";
114
+ let L;
115
+ e[3] !== n || e[4] !== c ? (L = n ? /* @__PURE__ */ o(lt, { size: 24, strokeWidth: 2 }) : c, e[3] = n, e[4] = c, e[5] = L) : L = e[5];
116
+ let N;
117
+ return e[6] !== l || e[7] !== u || e[8] !== _ || e[9] !== L ? (N = /* @__PURE__ */ o(ae, { type: "button", size: "medium", fullWidth: !0, variant: _, disabled: u, onClick: l, children: L }), e[6] = l, e[7] = u, e[8] = _, e[9] = L, e[10] = N) : N = e[10], N;
110
118
  }
111
- let m;
112
- e[6] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ o(z, { type: "button", size: "medium", variant: "secondary", className: "shrink-0", children: Be }), e[6] = m) : m = e[6];
113
- const d = s ? "disabled" : "primary";
119
+ let d;
120
+ e[11] !== s ? (d = /* @__PURE__ */ o(ae, { type: "button", size: "medium", variant: "secondary", className: "shrink-0", onClick: s, children: Ft }), e[11] = s, e[12] = d) : d = e[12];
121
+ const p = u ? "disabled" : "primary";
122
+ let r;
123
+ e[13] !== n || e[14] !== c ? (r = n ? /* @__PURE__ */ o(lt, { size: 24, strokeWidth: 2 }) : c, e[13] = n, e[14] = c, e[15] = r) : r = e[15];
114
124
  let f;
115
- return e[7] !== s || e[8] !== l || e[9] !== d ? (f = /* @__PURE__ */ E("div", { className: "flex w-full items-start gap-2.5", children: [
116
- m,
117
- /* @__PURE__ */ o(z, { type: "button", size: "medium", fullWidth: !0, variant: d, disabled: s, className: "min-w-0 flex-1", children: l })
118
- ] }), e[7] = s, e[8] = l, e[9] = d, e[10] = f) : f = e[10], f;
125
+ e[16] !== l || e[17] !== u || e[18] !== p || e[19] !== r ? (f = /* @__PURE__ */ o(ae, { type: "button", size: "medium", fullWidth: !0, variant: p, disabled: u, className: "min-w-0 flex-1", onClick: l, children: r }), e[16] = l, e[17] = u, e[18] = p, e[19] = r, e[20] = f) : f = e[20];
126
+ let h;
127
+ return e[21] !== d || e[22] !== f ? (h = /* @__PURE__ */ A("div", { className: "flex w-full items-start gap-2.5", children: [
128
+ d,
129
+ f
130
+ ] }), e[21] = d, e[22] = f, e[23] = h) : h = e[23], h;
119
131
  }
120
- function re(r) {
121
- const e = D(35), {
132
+ function nt(a) {
133
+ const e = D(40), {
122
134
  trigger: i,
123
135
  state: t,
124
136
  headerTitle: l,
125
- bodyTitle: n,
126
- infoMessage: s,
127
- isDefaultInfoMessage: m,
128
- phoneNumber: d,
129
- onPhoneNumberChange: f,
130
- existingAccountErrorMessage: a,
131
- phoneDisplay: c,
132
- phonePlaceholder: h,
133
- countryCode: p,
134
- onCountryCodeChange: M,
135
- icon: w,
136
- onClose: $,
137
- className: A,
138
- surface: I
139
- } = r, O = t === "existingAccount", N = I === "drawer" ? "h-auto max-w-none rounded-t-[16px]" : "max-w-[320px] rounded-[16px] shadow-[0_8px_24px_rgba(0,0,0,0.12)]";
140
- let L;
141
- e[0] !== A || e[1] !== N ? (L = se(Te, N, A), e[0] = A, e[1] = N, e[2] = L) : L = e[2];
142
- const y = L;
143
- let C;
144
- e[3] !== l || e[4] !== $ ? (C = /* @__PURE__ */ o(Se, { title: l, onClose: $ }), e[3] = l, e[4] = $, e[5] = C) : C = e[5];
145
- let g;
146
- e[6] !== w ? (g = /* @__PURE__ */ o(Pe, { icon: w }), e[6] = w, e[7] = g) : g = e[7];
147
- let u;
148
- e[8] !== n ? (u = /* @__PURE__ */ o(H, { as: "h2", variant: "textLabel1", weight: "semiBold", align: "center", className: "shrink-0 whitespace-nowrap !text-black/80", children: n }), e[8] = n, e[9] = u) : u = e[9];
137
+ bodyTitle: s,
138
+ infoMessage: n,
139
+ isDefaultInfoMessage: c,
140
+ phoneNumber: m,
141
+ onPhoneNumberChange: u,
142
+ existingAccountErrorMessage: d,
143
+ phoneErrorMessage: p,
144
+ phoneDisplay: r,
145
+ phonePlaceholder: f,
146
+ countryCode: h,
147
+ onCountryCodeChange: _,
148
+ onExistingAccountLogin: L,
149
+ onPrimaryClick: N,
150
+ onSecondaryClick: B,
151
+ isPrimaryLoading: T,
152
+ icon: S,
153
+ onClose: F,
154
+ className: R,
155
+ surface: ie
156
+ } = a, k = t === "existingAccount", P = ie === "drawer" ? "h-auto max-w-none rounded-t-[16px]" : "!max-w-[384px] rounded-[16px] shadow-[0_8px_24px_rgba(0,0,0,0.12)]";
157
+ let H;
158
+ e[0] !== R || e[1] !== P ? (H = qe(zt, P, R), e[0] = R, e[1] = P, e[2] = H) : H = e[2];
159
+ const U = H;
160
+ let E;
161
+ e[3] !== l || e[4] !== F ? (E = /* @__PURE__ */ o(Wt, { title: l, onClose: F }), e[3] = l, e[4] = F, e[5] = E) : E = e[5];
149
162
  let v;
150
- e[10] !== s || e[11] !== m ? (v = /* @__PURE__ */ o(Ue, { message: s, isDefaultMessage: m }), e[10] = s, e[11] = m, e[12] = v) : v = e[12];
151
- let _;
152
- e[13] !== p || e[14] !== a || e[15] !== O || e[16] !== M || e[17] !== f || e[18] !== c || e[19] !== d || e[20] !== h ? (_ = /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start gap-4", children: O ? /* @__PURE__ */ E(de, { children: [
153
- /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start gap-1.5", children: /* @__PURE__ */ o(ne, { countryCode: p, placeholder: h, value: d, onChange: f, onCountryCodeChange: M, error: a }) }),
154
- /* @__PURE__ */ o(Ge, { phoneDisplay: c })
155
- ] }) : /* @__PURE__ */ o(ne, { countryCode: p, placeholder: h, value: d, onChange: f, onCountryCodeChange: M }) }), e[13] = p, e[14] = a, e[15] = O, e[16] = M, e[17] = f, e[18] = c, e[19] = d, e[20] = h, e[21] = _) : _ = e[21];
163
+ e[6] !== S ? (v = /* @__PURE__ */ o(jt, { icon: S }), e[6] = S, e[7] = v) : v = e[7];
164
+ let M;
165
+ e[8] !== s ? (M = /* @__PURE__ */ o(ce, { as: "h2", variant: "textLabel1", weight: "semiBold", align: "center", className: "shrink-0 whitespace-nowrap !text-black/80", children: s }), e[8] = s, e[9] = M) : M = e[9];
156
166
  let x;
157
- e[22] !== g || e[23] !== u || e[24] !== v || e[25] !== _ ? (x = /* @__PURE__ */ E("div", { className: "flex w-full flex-col items-center gap-4 px-4 pb-5 pt-4", children: [
158
- g,
159
- u,
167
+ e[10] !== n || e[11] !== c ? (x = /* @__PURE__ */ o(Kt, { message: n, isDefaultMessage: c }), e[10] = n, e[11] = c, e[12] = x) : x = e[12];
168
+ let y;
169
+ e[13] !== h || e[14] !== d || e[15] !== k || e[16] !== _ || e[17] !== L || e[18] !== u || e[19] !== r || e[20] !== p || e[21] !== m || e[22] !== f ? (y = /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start gap-4", children: k ? /* @__PURE__ */ A(pt, { children: [
170
+ /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start gap-1.5", children: /* @__PURE__ */ o(ot, { countryCode: h, placeholder: f, value: m, onChange: u, onCountryCodeChange: _, error: d }) }),
171
+ /* @__PURE__ */ o(Vt, { phoneDisplay: r, onLogin: L })
172
+ ] }) : /* @__PURE__ */ o(ot, { countryCode: h, placeholder: f, value: m, onChange: u, onCountryCodeChange: _, error: p }) }), e[13] = h, e[14] = d, e[15] = k, e[16] = _, e[17] = L, e[18] = u, e[19] = r, e[20] = p, e[21] = m, e[22] = f, e[23] = y) : y = e[23];
173
+ let C;
174
+ e[24] !== v || e[25] !== M || e[26] !== x || e[27] !== y ? (C = /* @__PURE__ */ A("div", { className: "flex w-full flex-col items-center gap-4 px-4 pb-5 pt-4", children: [
160
175
  v,
161
- _
162
- ] }), e[22] = g, e[23] = u, e[24] = v, e[25] = _, e[26] = x) : x = e[26];
163
- let b;
164
- e[27] !== t || e[28] !== i ? (b = /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start border-t border-black/10 bg-[#FAFAFA] p-4", children: /* @__PURE__ */ o($e, { trigger: i, state: t }) }), e[27] = t, e[28] = i, e[29] = b) : b = e[29];
165
- let B;
166
- return e[30] !== y || e[31] !== C || e[32] !== x || e[33] !== b ? (B = /* @__PURE__ */ E("div", { className: y, children: [
167
- C,
176
+ M,
168
177
  x,
169
- b
170
- ] }), e[30] = y, e[31] = C, e[32] = x, e[33] = b, e[34] = B) : B = e[34], B;
178
+ y
179
+ ] }), e[24] = v, e[25] = M, e[26] = x, e[27] = y, e[28] = C) : C = e[28];
180
+ let O;
181
+ e[29] !== T || e[30] !== N || e[31] !== B || e[32] !== t || e[33] !== i ? (O = /* @__PURE__ */ o("div", { className: "flex w-full flex-col items-start border-t border-black/10 bg-[#FAFAFA] p-4", children: /* @__PURE__ */ o(Xt, { trigger: i, state: t, onPrimaryClick: N, onSecondaryClick: B, isPrimaryLoading: T }) }), e[29] = T, e[30] = N, e[31] = B, e[32] = t, e[33] = i, e[34] = O) : O = e[34];
182
+ let I;
183
+ return e[35] !== U || e[36] !== E || e[37] !== C || e[38] !== O ? (I = /* @__PURE__ */ A("div", { className: U, children: [
184
+ E,
185
+ C,
186
+ O
187
+ ] }), e[35] = U, e[36] = E, e[37] = C, e[38] = O, e[39] = I) : I = e[39], I;
188
+ }
189
+ function Ae(a) {
190
+ return Array.from({
191
+ length: a
192
+ }, () => "");
171
193
  }
172
- function ce(r) {
173
- const e = D(54), {
194
+ function rt(a) {
195
+ const e = D(106), {
174
196
  open: i,
175
197
  onOpenChange: t,
176
198
  trigger: l,
177
- state: n,
178
- headerTitle: s,
179
- bodyTitle: m,
180
- infoMessage: d,
181
- phoneNumber: f,
182
- onPhoneNumberChange: a,
183
- onCountryCodeChange: c,
184
- existingAccountErrorMessage: h,
185
- phonePlaceholder: p,
186
- countryCode: M,
187
- icon: w,
188
- isMobileOverride: $,
189
- className: A
190
- } = r, I = l === void 0 ? "action" : l, O = n === void 0 ? "addNumber" : n, N = f === void 0 ? "" : f, L = p === void 0 ? Le : p, y = M === void 0 ? Me : M, C = xe(), g = $ ?? C, u = s ?? Ee[I], v = m ?? Ce[I], _ = d ?? ae, x = d == null, [b, B] = ie.useState(y);
191
- let W;
192
- e[0] !== b || e[1] !== N ? (W = ye(b, N), e[0] = b, e[1] = N, e[2] = W) : W = e[2];
193
- const ee = W;
194
- let j;
195
- e[3] !== t ? (j = () => {
199
+ state: s,
200
+ headerTitle: n,
201
+ bodyTitle: c,
202
+ infoMessage: m,
203
+ phoneNumber: u,
204
+ onPhoneNumberChange: d,
205
+ onCountryCodeChange: p,
206
+ step: r,
207
+ defaultStep: f,
208
+ onStepChange: h,
209
+ onExistingAccountLoginClick: _,
210
+ phoneErrorMessage: L,
211
+ onPrimaryClick: N,
212
+ onSecondaryClick: B,
213
+ isPrimaryLoading: T,
214
+ maskedRecipient: S,
215
+ otpHeaderTitle: F,
216
+ onOtpBack: R,
217
+ otpError: ie,
218
+ otpCanResend: k,
219
+ onOtpResend: P,
220
+ otpTimerText: H,
221
+ isOtpSubmitting: U,
222
+ otpValue: E,
223
+ onOtpChange: v,
224
+ otpLength: M,
225
+ onOtpSubmit: x,
226
+ otpTitle: y,
227
+ otpResendLabel: C,
228
+ otpSubmitLabel: O,
229
+ existingAccountErrorMessage: I,
230
+ phonePlaceholder: Je,
231
+ countryCode: Qe,
232
+ icon: Be,
233
+ isMobileOverride: at,
234
+ closeOnOutsideClick: Ze,
235
+ className: z
236
+ } = a, oe = l === void 0 ? "action" : l, de = s === void 0 ? "addNumber" : s, $ = u === void 0 ? "" : u, ne = f === void 0 ? "mobileNumber" : f, Te = F === void 0 ? Bt : F, b = M === void 0 ? 6 : M, Se = y === void 0 ? St : y, ct = C === void 0 ? Rt : C, Re = O === void 0 ? Tt : O, ke = Je === void 0 ? wt : Je, se = Qe === void 0 ? Ct : Qe, Pe = Ze === void 0 ? !0 : Ze, dt = Mt(), re = at ?? dt, w = n ?? At[oe], Ue = c ?? It[oe], Ge = m ?? st, Fe = m == null, [W, et] = G.useState(se), [ut, tt] = G.useState(ne);
237
+ let ue;
238
+ e[0] !== b ? (ue = () => Ae(b), e[0] = b, e[1] = ue) : ue = e[1];
239
+ const [ft, He] = G.useState(ue), mt = r ?? ut, ze = E ?? ft;
240
+ let fe;
241
+ e[2] !== b || e[3] !== ze ? (fe = ze.slice(0, b).concat(Ae(b)).slice(0, b), e[2] = b, e[3] = ze, e[4] = fe) : fe = e[4];
242
+ const $e = fe;
243
+ let me;
244
+ e[5] !== W || e[6] !== S || e[7] !== $ ? (me = S ?? Ot(W, $), e[5] = W, e[6] = S, e[7] = $, e[8] = me) : me = e[8];
245
+ const j = me;
246
+ let pe;
247
+ e[9] !== t ? (pe = () => {
196
248
  t(!1);
197
- }, e[3] = t, e[4] = j) : j = e[4];
198
- const te = j;
199
- let Y, K;
200
- e[5] !== y ? (Y = () => {
201
- B(y);
202
- }, K = [y], e[5] = y, e[6] = Y, e[7] = K) : (Y = e[6], K = e[7]), ie.useEffect(Y, K);
203
- let X;
204
- e[8] !== c ? (X = (R) => {
205
- B(R), c == null || c(R);
206
- }, e[8] = c, e[9] = X) : X = e[9];
207
- const le = X;
208
- let q, J;
209
- e[10] !== g || e[11] !== i ? (q = () => {
210
- if (g)
211
- return i ? document.body.classList.add(oe) : document.body.classList.remove(oe), ze;
212
- }, J = [g, i], e[10] = g, e[11] = i, e[12] = q, e[13] = J) : (q = e[12], J = e[13]), ie.useEffect(q, J);
213
- let Q;
214
- e[14] !== b || e[15] !== A || e[16] !== h || e[17] !== te || e[18] !== le || e[19] !== w || e[20] !== x || e[21] !== a || e[22] !== N || e[23] !== L || e[24] !== v || e[25] !== u || e[26] !== _ || e[27] !== ee || e[28] !== O || e[29] !== I ? (Q = {
215
- trigger: I,
216
- state: O,
217
- headerTitle: u,
218
- bodyTitle: v,
219
- infoMessage: _,
220
- isDefaultInfoMessage: x,
221
- phoneNumber: N,
222
- onPhoneNumberChange: a,
223
- existingAccountErrorMessage: h,
224
- phoneDisplay: ee,
225
- phonePlaceholder: L,
226
- countryCode: b,
227
- onCountryCodeChange: le,
228
- icon: w,
229
- onClose: te,
230
- className: A
231
- }, e[14] = b, e[15] = A, e[16] = h, e[17] = te, e[18] = le, e[19] = w, e[20] = x, e[21] = a, e[22] = N, e[23] = L, e[24] = v, e[25] = u, e[26] = _, e[27] = ee, e[28] = O, e[29] = I, e[30] = Q) : Q = e[30];
232
- const T = Q;
233
- if (g) {
234
- let R;
235
- e[31] === Symbol.for("react.memo_cache_sentinel") ? (R = se(Re, "flex h-auto max-h-[90vh] w-full flex-col overflow-hidden rounded-t-[16px] border-0 p-0"), e[31] = R) : R = e[31];
236
- let F;
237
- e[32] !== u ? (F = /* @__PURE__ */ o(ge, { className: "sr-only", children: /* @__PURE__ */ o(Ne, { children: u }) }), e[32] = u, e[33] = F) : F = e[33];
238
- let U;
239
- e[34] !== T ? (U = /* @__PURE__ */ o(re, { ...T, surface: "drawer" }), e[34] = T, e[35] = U) : U = e[35];
240
- let G;
241
- e[36] !== F || e[37] !== U ? (G = /* @__PURE__ */ E(ve, { "aria-describedby": void 0, className: R, "data-mobile-number-dialog-drawer-content": !0, children: [
242
- F,
243
- U
244
- ] }), e[36] = F, e[37] = U, e[38] = G) : G = e[38];
245
- let Z;
246
- return e[39] !== t || e[40] !== i || e[41] !== G ? (Z = /* @__PURE__ */ o(_e, { dismissible: !0, open: i, onOpenChange: t, children: G }), e[39] = t, e[40] = i, e[41] = G, e[42] = Z) : Z = e[42], Z;
247
- }
248
- let k;
249
- e[43] !== u ? (k = /* @__PURE__ */ o(me, { className: "sr-only", children: /* @__PURE__ */ o(he, { children: u }) }), e[43] = u, e[44] = k) : k = e[44];
250
- let S;
251
- e[45] !== T ? (S = /* @__PURE__ */ o(re, { ...T, surface: "dialog" }), e[45] = T, e[46] = S) : S = e[46];
252
- let P;
253
- e[47] !== k || e[48] !== S ? (P = /* @__PURE__ */ E(be, { "aria-describedby": void 0, className: "max-w-[320px] overflow-visible rounded-[16px] border-0 bg-transparent p-0 shadow-none outline-none focus:outline-none focus-visible:outline-none", closeOnOutsideClick: !0, showCloseButton: !1, size: "sm", children: [
254
- k,
255
- S
256
- ] }), e[47] = k, e[48] = S, e[49] = P) : P = e[49];
249
+ }, e[9] = t, e[10] = pe) : pe = e[10];
250
+ const We = pe;
251
+ let he, be;
252
+ e[11] !== se ? (he = () => {
253
+ et(se);
254
+ }, be = [se], e[11] = se, e[12] = he, e[13] = be) : (he = e[12], be = e[13]), G.useEffect(he, be);
255
+ let ge;
256
+ e[14] !== p ? (ge = (g) => {
257
+ et(g), p == null || p(g);
258
+ }, e[14] = p, e[15] = ge) : ge = e[15];
259
+ const je = ge;
260
+ let _e;
261
+ e[16] !== h || e[17] !== r ? (_e = (g) => {
262
+ r == null && tt(g), h == null || h(g);
263
+ }, e[16] = h, e[17] = r, e[18] = _e) : _e = e[18];
264
+ const Y = _e;
265
+ let Le;
266
+ e[19] !== v || e[20] !== E ? (Le = (g) => {
267
+ E == null && He(g), v == null || v(g);
268
+ }, e[19] = v, e[20] = E, e[21] = Le) : Le = e[21];
269
+ const Ye = Le;
270
+ let Ne;
271
+ e[22] !== Y || e[23] !== _ ? (Ne = () => {
272
+ _ == null || _(), Y("otp");
273
+ }, e[22] = Y, e[23] = _, e[24] = Ne) : Ne = e[24];
274
+ const Ke = Ne;
275
+ let ve, Ee;
276
+ e[25] !== ne || e[26] !== i || e[27] !== b || e[28] !== r ? (ve = () => {
277
+ i || (r == null && tt(ne), He(Ae(b)));
278
+ }, Ee = [ne, i, b, r], e[25] = ne, e[26] = i, e[27] = b, e[28] = r, e[29] = ve, e[30] = Ee) : (ve = e[29], Ee = e[30]), G.useEffect(ve, Ee);
279
+ let xe, De;
280
+ e[31] !== b ? (xe = () => {
281
+ He((g) => g.length === b ? g : Ae(b));
282
+ }, De = [b], e[31] = b, e[32] = xe, e[33] = De) : (xe = e[32], De = e[33]), G.useEffect(xe, De);
283
+ let Me, ye;
284
+ e[34] !== re || e[35] !== i ? (Me = () => {
285
+ if (re)
286
+ return i ? document.body.classList.add(Xe) : document.body.classList.remove(Xe), qt;
287
+ }, ye = [re, i], e[34] = re, e[35] = i, e[36] = Me, e[37] = ye) : (Me = e[36], ye = e[37]), G.useEffect(Me, ye);
288
+ let Ce;
289
+ e[38] !== W || e[39] !== z || e[40] !== I || e[41] !== We || e[42] !== je || e[43] !== Ke || e[44] !== Be || e[45] !== Fe || e[46] !== T || e[47] !== d || e[48] !== N || e[49] !== B || e[50] !== L || e[51] !== $ || e[52] !== ke || e[53] !== Ue || e[54] !== w || e[55] !== Ge || e[56] !== j || e[57] !== de || e[58] !== oe ? (Ce = {
290
+ trigger: oe,
291
+ state: de,
292
+ headerTitle: w,
293
+ bodyTitle: Ue,
294
+ infoMessage: Ge,
295
+ isDefaultInfoMessage: Fe,
296
+ phoneNumber: $,
297
+ onPhoneNumberChange: d,
298
+ existingAccountErrorMessage: I,
299
+ phoneErrorMessage: L,
300
+ phoneDisplay: j,
301
+ phonePlaceholder: ke,
302
+ countryCode: W,
303
+ onCountryCodeChange: je,
304
+ onExistingAccountLogin: Ke,
305
+ onPrimaryClick: N,
306
+ onSecondaryClick: B,
307
+ isPrimaryLoading: T,
308
+ icon: Be,
309
+ onClose: We,
310
+ className: z
311
+ }, e[38] = W, e[39] = z, e[40] = I, e[41] = We, e[42] = je, e[43] = Ke, e[44] = Be, e[45] = Fe, e[46] = T, e[47] = d, e[48] = N, e[49] = B, e[50] = L, e[51] = $, e[52] = ke, e[53] = Ue, e[54] = w, e[55] = Ge, e[56] = j, e[57] = de, e[58] = oe, e[59] = Ce) : Ce = e[59];
312
+ const K = Ce;
257
313
  let V;
258
- return e[50] !== t || e[51] !== i || e[52] !== P ? (V = /* @__PURE__ */ o(pe, { open: i, onOpenChange: t, modal: !0, children: P }), e[50] = t, e[51] = i, e[52] = P, e[53] = V) : V = e[53], V;
314
+ e[60] !== Y || e[61] !== R ? (V = R ?? (() => Y("mobileNumber")), e[60] = Y, e[61] = R, e[62] = V) : V = e[62];
315
+ const Ve = H ?? ct;
316
+ let Oe;
317
+ e[63] !== z || e[64] !== Ye || e[65] !== U || e[66] !== P || e[67] !== x || e[68] !== $e || e[69] !== k || e[70] !== ie || e[71] !== Te || e[72] !== Re || e[73] !== Se || e[74] !== j || e[75] !== V || e[76] !== Ve ? (Oe = {
318
+ headerTitle: Te,
319
+ title: Se,
320
+ phoneDisplay: j,
321
+ otp: $e,
322
+ onOtpChange: Ye,
323
+ onOtpSubmit: x,
324
+ onBack: V,
325
+ otpError: ie,
326
+ canResend: k,
327
+ onResend: P,
328
+ timerText: Ve,
329
+ submitLabel: Re,
330
+ isSubmitting: U,
331
+ className: z
332
+ }, e[63] = z, e[64] = Ye, e[65] = U, e[66] = P, e[67] = x, e[68] = $e, e[69] = k, e[70] = ie, e[71] = Te, e[72] = Re, e[73] = Se, e[74] = j, e[75] = V, e[76] = Ve, e[77] = Oe) : Oe = e[77];
333
+ const X = Oe, q = mt === "otp" && de === "existingAccount";
334
+ if (re) {
335
+ let g;
336
+ e[78] === Symbol.for("react.memo_cache_sentinel") ? (g = qe(Ht, "mx-auto flex h-auto max-h-[90vh] w-full max-w-[384px] flex-col overflow-hidden rounded-t-[16px] border-0 p-0"), e[78] = g) : g = e[78];
337
+ let ee;
338
+ e[79] !== w ? (ee = /* @__PURE__ */ o(vt, { className: "sr-only", children: /* @__PURE__ */ o(Et, { children: w }) }), e[79] = w, e[80] = ee) : ee = e[80];
339
+ let te;
340
+ e[81] !== X || e[82] !== q || e[83] !== K ? (te = q ? /* @__PURE__ */ o(it, { ...X, surface: "drawer" }) : /* @__PURE__ */ o(nt, { ...K, surface: "drawer" }), e[81] = X, e[82] = q, e[83] = K, e[84] = te) : te = e[84];
341
+ let le;
342
+ e[85] !== ee || e[86] !== te ? (le = /* @__PURE__ */ A(xt, { "aria-describedby": void 0, className: g, "data-mobile-number-dialog-drawer-content": !0, children: [
343
+ ee,
344
+ te
345
+ ] }), e[85] = ee, e[86] = te, e[87] = le) : le = e[87];
346
+ let Ie;
347
+ return e[88] !== t || e[89] !== i || e[90] !== le ? (Ie = /* @__PURE__ */ o(Dt, { dismissible: !0, open: i, onOpenChange: t, children: le }), e[88] = t, e[89] = i, e[90] = le, e[91] = Ie) : Ie = e[91], Ie;
348
+ }
349
+ let J;
350
+ e[92] !== w ? (J = /* @__PURE__ */ o(gt, { className: "sr-only", children: /* @__PURE__ */ o(_t, { children: w }) }), e[92] = w, e[93] = J) : J = e[93];
351
+ let Q;
352
+ e[94] !== X || e[95] !== q || e[96] !== K ? (Q = q ? /* @__PURE__ */ o(it, { ...X, surface: "dialog" }) : /* @__PURE__ */ o(nt, { ...K, surface: "dialog" }), e[94] = X, e[95] = q, e[96] = K, e[97] = Q) : Q = e[97];
353
+ let Z;
354
+ e[98] !== Pe || e[99] !== J || e[100] !== Q ? (Z = /* @__PURE__ */ A(Lt, { "aria-describedby": void 0, className: "max-w-[384px] overflow-visible rounded-[16px] border-0 bg-transparent p-0 shadow-none outline-none focus:outline-none focus-visible:outline-none", closeOnOutsideClick: Pe, showCloseButton: !1, size: "sm", children: [
355
+ J,
356
+ Q
357
+ ] }), e[98] = Pe, e[99] = J, e[100] = Q, e[101] = Z) : Z = e[101];
358
+ let we;
359
+ return e[102] !== t || e[103] !== i || e[104] !== Z ? (we = /* @__PURE__ */ o(Nt, { open: i, onOpenChange: t, modal: !0, children: Z }), e[102] = t, e[103] = i, e[104] = Z, e[105] = we) : we = e[105], we;
259
360
  }
260
- function ze() {
261
- return document.body.classList.remove(oe);
361
+ function qt() {
362
+ return document.body.classList.remove(Xe);
262
363
  }
263
- const tt = ce, lt = ce;
364
+ const ul = rt, fl = rt;
264
365
  export {
265
- lt as DoctAccountConflictPrompt,
266
- tt as DoctMobileNumberDialog,
267
- ce as MobileNumberDialog
366
+ fl as DoctAccountConflictPrompt,
367
+ ul as DoctMobileNumberDialog,
368
+ rt as MobileNumberDialog
268
369
  };