docthub-core-components 3.3.4 → 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.
- package/dist/components/overrides/ui/mobile-number-dialog/mobile-number-dialog.js +310 -209
- package/dist/components/overrides/ui/mobile-number-dialog/otp-dialog.js +99 -0
- package/dist/components/overrides/ui/mobile-number-dialog/presets.js +49 -44
- package/dist/components/ui/cookie-dialog.js +46 -41
- package/dist/index.js +135 -128
- package/dist/src/components/overrides/ui/mobile-number-dialog/index.d.ts +3 -2
- package/dist/src/components/overrides/ui/mobile-number-dialog/mobile-number-dialog.d.ts +1 -1
- package/dist/src/components/overrides/ui/mobile-number-dialog/otp-dialog.d.ts +18 -0
- package/dist/src/components/overrides/ui/mobile-number-dialog/presets.d.ts +6 -0
- package/dist/src/components/overrides/ui/mobile-number-dialog/types.d.ts +52 -0
- package/dist/src/components/ui/cookie-dialog.d.ts +6 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,268 +1,369 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
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
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
} =
|
|
21
|
+
} = a;
|
|
20
22
|
let t;
|
|
21
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(
|
|
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(
|
|
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
|
|
27
|
+
function Wt(a) {
|
|
26
28
|
const e = D(7), {
|
|
27
29
|
title: i,
|
|
28
30
|
onClose: t
|
|
29
|
-
} =
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
] }), e[4] = l, e[5] =
|
|
39
|
+
s
|
|
40
|
+
] }), e[4] = l, e[5] = s, e[6] = n) : n = e[6], n;
|
|
39
41
|
}
|
|
40
|
-
function
|
|
42
|
+
function jt(a) {
|
|
41
43
|
const e = D(4), {
|
|
42
44
|
icon: i
|
|
43
|
-
} =
|
|
45
|
+
} = a;
|
|
44
46
|
let t;
|
|
45
|
-
e[0] !== i ? (t = i ?? /* @__PURE__ */ o(
|
|
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
|
|
50
|
-
const
|
|
51
|
+
function Yt() {
|
|
52
|
+
const a = D(1);
|
|
51
53
|
let e;
|
|
52
|
-
return
|
|
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
|
|
56
|
+
function Kt(a) {
|
|
55
57
|
const e = D(3), {
|
|
56
58
|
message: i,
|
|
57
59
|
isDefaultMessage: t
|
|
58
|
-
} =
|
|
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(
|
|
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
|
|
64
|
+
function ot(a) {
|
|
63
65
|
const e = D(14), {
|
|
64
66
|
countryCode: i,
|
|
65
67
|
placeholder: t,
|
|
66
68
|
value: l,
|
|
67
|
-
onChange:
|
|
68
|
-
onCountryCodeChange:
|
|
69
|
-
error:
|
|
70
|
-
} =
|
|
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[
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
e[
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
83
|
-
const e = D(
|
|
84
|
-
phoneDisplay: i
|
|
85
|
-
|
|
86
|
-
|
|
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[
|
|
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
|
-
|
|
94
|
-
|
|
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[
|
|
99
|
+
] }), e[6] = s, e[7] = c) : c = e[7], c;
|
|
97
100
|
}
|
|
98
|
-
function
|
|
99
|
-
const e = D(
|
|
101
|
+
function Xt(a) {
|
|
102
|
+
const e = D(24), {
|
|
100
103
|
trigger: i,
|
|
101
|
-
state: t
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
|
108
|
-
let
|
|
109
|
-
|
|
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
|
|
112
|
-
e[
|
|
113
|
-
const
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
121
|
-
const e = D(
|
|
132
|
+
function nt(a) {
|
|
133
|
+
const e = D(40), {
|
|
122
134
|
trigger: i,
|
|
123
135
|
state: t,
|
|
124
136
|
headerTitle: l,
|
|
125
|
-
bodyTitle:
|
|
126
|
-
infoMessage:
|
|
127
|
-
isDefaultInfoMessage:
|
|
128
|
-
phoneNumber:
|
|
129
|
-
onPhoneNumberChange:
|
|
130
|
-
existingAccountErrorMessage:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
let
|
|
146
|
-
e[
|
|
147
|
-
|
|
148
|
-
|
|
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[
|
|
151
|
-
let
|
|
152
|
-
e[
|
|
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[
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
170
|
-
] }), e[
|
|
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
|
|
173
|
-
const e = D(
|
|
194
|
+
function rt(a) {
|
|
195
|
+
const e = D(106), {
|
|
174
196
|
open: i,
|
|
175
197
|
onOpenChange: t,
|
|
176
198
|
trigger: l,
|
|
177
|
-
state:
|
|
178
|
-
headerTitle:
|
|
179
|
-
bodyTitle:
|
|
180
|
-
infoMessage:
|
|
181
|
-
phoneNumber:
|
|
182
|
-
onPhoneNumberChange:
|
|
183
|
-
onCountryCodeChange:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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[
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
e[
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
let
|
|
204
|
-
e[
|
|
205
|
-
|
|
206
|
-
}, e[
|
|
207
|
-
const
|
|
208
|
-
let
|
|
209
|
-
e[
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
let
|
|
214
|
-
e[
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
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
|
|
261
|
-
return document.body.classList.remove(
|
|
361
|
+
function qt() {
|
|
362
|
+
return document.body.classList.remove(Xe);
|
|
262
363
|
}
|
|
263
|
-
const
|
|
364
|
+
const ul = rt, fl = rt;
|
|
264
365
|
export {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
366
|
+
fl as DoctAccountConflictPrompt,
|
|
367
|
+
ul as DoctMobileNumberDialog,
|
|
368
|
+
rt as MobileNumberDialog
|
|
268
369
|
};
|