docthub-core-components 3.3.6 → 3.3.8

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,22 +1,22 @@
1
1
  "use client";
2
2
  import { jsx as o, jsxs as A, Fragment as pt } from "react/jsx-runtime";
3
- import { c as D } from "react-compiler-runtime";
3
+ import { c as M } from "react-compiler-runtime";
4
4
  import { Smartphone as ht, X as bt } from "lucide-react";
5
5
  import * as G from "react";
6
6
  import { CircularProgress as lt } from "../circular-progress.js";
7
7
  import { DoctButton as ae } from "../../../ui/button.js";
8
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";
9
+ import { DrawerHeader as vt, DrawerTitle as Et, DrawerContent as Dt, Drawer as Mt } from "../../../ui/drawer.js";
10
10
  import { DoctTypography as ce } from "../../../ui/typography.js";
11
- import { useIsMobile as Mt } from "../../../../hooks/use-mobile.js";
11
+ import { useIsMobile as xt } from "../../../../hooks/use-mobile.js";
12
12
  import { cn as qe } from "../../../../lib/utils.js";
13
13
  import { DoctPhoneInput as yt } from "../inputs/phone-input.js";
14
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";
15
+ import { MOBILE_NUMBER_DIALOG_DEFAULT_COUNTRY_CODE as Ct, buildMobileNumberDisplay as Ot, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER as It, MOBILE_NUMBER_DIALOG_BODY_TITLE as wt, 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
16
  import { MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS as Xe } from "./types.js";
17
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
18
  function $t(a) {
19
- const e = D(3), {
19
+ const e = M(3), {
20
20
  onClose: i
21
21
  } = a;
22
22
  let t;
@@ -25,7 +25,7 @@ function $t(a) {
25
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;
26
26
  }
27
27
  function Wt(a) {
28
- const e = D(7), {
28
+ const e = M(7), {
29
29
  title: i,
30
30
  onClose: t
31
31
  } = a;
@@ -40,7 +40,7 @@ function Wt(a) {
40
40
  ] }), e[4] = l, e[5] = s, e[6] = n) : n = e[6], n;
41
41
  }
42
42
  function jt(a) {
43
- const e = D(4), {
43
+ const e = M(4), {
44
44
  icon: i
45
45
  } = a;
46
46
  let t;
@@ -49,12 +49,12 @@ function jt(a) {
49
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;
50
50
  }
51
51
  function Yt() {
52
- const a = D(1);
52
+ const a = M(1);
53
53
  let e;
54
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;
55
55
  }
56
56
  function Kt(a) {
57
- const e = D(3), {
57
+ const e = M(3), {
58
58
  message: i,
59
59
  isDefaultMessage: t
60
60
  } = a;
@@ -62,7 +62,7 @@ function Kt(a) {
62
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;
63
63
  }
64
64
  function ot(a) {
65
- const e = D(14), {
65
+ const e = M(14), {
66
66
  countryCode: i,
67
67
  placeholder: t,
68
68
  value: l,
@@ -82,7 +82,7 @@ function ot(a) {
82
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;
83
83
  }
84
84
  function Vt(a) {
85
- const e = D(8), {
85
+ const e = M(8), {
86
86
  phoneDisplay: i,
87
87
  onLogin: t
88
88
  } = a;
@@ -99,7 +99,7 @@ function Vt(a) {
99
99
  ] }), e[6] = s, e[7] = c) : c = e[7], c;
100
100
  }
101
101
  function Xt(a) {
102
- const e = D(24), {
102
+ const e = M(24), {
103
103
  trigger: i,
104
104
  state: t,
105
105
  onPrimaryClick: l,
@@ -130,7 +130,7 @@ function Xt(a) {
130
130
  ] }), e[21] = d, e[22] = f, e[23] = h) : h = e[23], h;
131
131
  }
132
132
  function nt(a) {
133
- const e = D(40), {
133
+ const e = M(40), {
134
134
  trigger: i,
135
135
  state: t,
136
136
  headerTitle: l,
@@ -161,30 +161,30 @@ function nt(a) {
161
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];
162
162
  let v;
163
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];
166
164
  let x;
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];
165
+ e[8] !== s ? (x = /* @__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] = x) : x = e[9];
166
+ let D;
167
+ e[10] !== n || e[11] !== c ? (D = /* @__PURE__ */ o(Kt, { message: n, isDefaultMessage: c }), e[10] = n, e[11] = c, e[12] = D) : D = e[12];
168
168
  let y;
169
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
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
171
  /* @__PURE__ */ o(Vt, { phoneDisplay: r, onLogin: L })
172
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
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: [
174
+ e[24] !== v || e[25] !== x || e[26] !== D || e[27] !== y ? (C = /* @__PURE__ */ A("div", { className: "flex w-full flex-col items-center gap-4 px-4 pb-5 pt-4", children: [
175
175
  v,
176
- M,
177
176
  x,
177
+ D,
178
178
  y
179
- ] }), e[24] = v, e[25] = M, e[26] = x, e[27] = y, e[28] = C) : C = e[28];
179
+ ] }), e[24] = v, e[25] = x, e[26] = D, e[27] = y, e[28] = C) : C = e[28];
180
180
  let O;
181
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: [
182
+ let w;
183
+ return e[35] !== U || e[36] !== E || e[37] !== C || e[38] !== O ? (w = /* @__PURE__ */ A("div", { className: U, children: [
184
184
  E,
185
185
  C,
186
186
  O
187
- ] }), e[35] = U, e[36] = E, e[37] = C, e[38] = O, e[39] = I) : I = e[39], I;
187
+ ] }), e[35] = U, e[36] = E, e[37] = C, e[38] = O, e[39] = w) : w = e[39], w;
188
188
  }
189
189
  function Ae(a) {
190
190
  return Array.from({
@@ -192,7 +192,7 @@ function Ae(a) {
192
192
  }, () => "");
193
193
  }
194
194
  function rt(a) {
195
- const e = D(106), {
195
+ const e = M(106), {
196
196
  open: i,
197
197
  onOpenChange: t,
198
198
  trigger: l,
@@ -221,19 +221,19 @@ function rt(a) {
221
221
  isOtpSubmitting: U,
222
222
  otpValue: E,
223
223
  onOtpChange: v,
224
- otpLength: M,
225
- onOtpSubmit: x,
224
+ otpLength: x,
225
+ onOtpSubmit: D,
226
226
  otpTitle: y,
227
227
  otpResendLabel: C,
228
228
  otpSubmitLabel: O,
229
- existingAccountErrorMessage: I,
229
+ existingAccountErrorMessage: w,
230
230
  phonePlaceholder: Je,
231
231
  countryCode: Qe,
232
232
  icon: Be,
233
233
  isMobileOverride: at,
234
234
  closeOnOutsideClick: Ze,
235
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);
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 = x === void 0 ? 6 : x, Se = y === void 0 ? St : y, ct = C === void 0 ? Rt : C, Re = O === void 0 ? Tt : O, ke = Je === void 0 ? It : Je, se = Qe === void 0 ? Ct : Qe, Pe = Ze === void 0 ? !0 : Ze, dt = xt(), re = at ?? dt, I = n ?? At[oe], Ue = c ?? wt[oe], Ge = m ?? st, Fe = m == null, [W, et] = G.useState(se), [ut, tt] = G.useState(ne);
237
237
  let ue;
238
238
  e[0] !== b ? (ue = () => Ae(b), e[0] = b, e[1] = ue) : ue = e[1];
239
239
  const [ft, He] = G.useState(ue), mt = r ?? ut, ze = E ?? ft;
@@ -276,26 +276,26 @@ function rt(a) {
276
276
  e[25] !== ne || e[26] !== i || e[27] !== b || e[28] !== r ? (ve = () => {
277
277
  i || (r == null && tt(ne), He(Ae(b)));
278
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 = () => {
279
+ let De, Me;
280
+ e[31] !== b ? (De = () => {
281
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 = () => {
282
+ }, Me = [b], e[31] = b, e[32] = De, e[33] = Me) : (De = e[32], Me = e[33]), G.useEffect(De, Me);
283
+ let xe, ye;
284
+ e[34] !== re || e[35] !== i ? (xe = () => {
285
285
  if (re)
286
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);
287
+ }, ye = [re, i], e[34] = re, e[35] = i, e[36] = xe, e[37] = ye) : (xe = e[36], ye = e[37]), G.useEffect(xe, ye);
288
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 = {
289
+ e[38] !== W || e[39] !== z || e[40] !== w || 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] !== I || e[55] !== Ge || e[56] !== j || e[57] !== de || e[58] !== oe ? (Ce = {
290
290
  trigger: oe,
291
291
  state: de,
292
- headerTitle: w,
292
+ headerTitle: I,
293
293
  bodyTitle: Ue,
294
294
  infoMessage: Ge,
295
295
  isDefaultInfoMessage: Fe,
296
296
  phoneNumber: $,
297
297
  onPhoneNumberChange: d,
298
- existingAccountErrorMessage: I,
298
+ existingAccountErrorMessage: w,
299
299
  phoneErrorMessage: L,
300
300
  phoneDisplay: j,
301
301
  phonePlaceholder: ke,
@@ -308,19 +308,19 @@ function rt(a) {
308
308
  icon: Be,
309
309
  onClose: We,
310
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];
311
+ }, e[38] = W, e[39] = z, e[40] = w, 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] = I, e[55] = Ge, e[56] = j, e[57] = de, e[58] = oe, e[59] = Ce) : Ce = e[59];
312
312
  const K = Ce;
313
313
  let V;
314
314
  e[60] !== Y || e[61] !== R ? (V = R ?? (() => Y("mobileNumber")), e[60] = Y, e[61] = R, e[62] = V) : V = e[62];
315
315
  const Ve = H ?? ct;
316
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 = {
317
+ e[63] !== z || e[64] !== Ye || e[65] !== U || e[66] !== P || e[67] !== D || 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
318
  headerTitle: Te,
319
319
  title: Se,
320
320
  phoneDisplay: j,
321
321
  otp: $e,
322
322
  onOtpChange: Ye,
323
- onOtpSubmit: x,
323
+ onOtpSubmit: D,
324
324
  onBack: V,
325
325
  otpError: ie,
326
326
  canResend: k,
@@ -329,25 +329,25 @@ function rt(a) {
329
329
  submitLabel: Re,
330
330
  isSubmitting: U,
331
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];
332
+ }, e[63] = z, e[64] = Ye, e[65] = U, e[66] = P, e[67] = D, 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
333
  const X = Oe, q = mt === "otp" && de === "existingAccount";
334
334
  if (re) {
335
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];
336
+ e[78] === Symbol.for("react.memo_cache_sentinel") ? (g = qe(Ht, "flex h-auto max-h-[90vh] w-full flex-col overflow-hidden rounded-t-[16px] border-0 p-0"), e[78] = g) : g = e[78];
337
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];
338
+ e[79] !== I ? (ee = /* @__PURE__ */ o(vt, { className: "sr-only", children: /* @__PURE__ */ o(Et, { children: I }) }), e[79] = I, e[80] = ee) : ee = e[80];
339
339
  let te;
340
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
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: [
342
+ e[85] !== ee || e[86] !== te ? (le = /* @__PURE__ */ A(Dt, { "aria-describedby": void 0, className: g, "data-mobile-number-dialog-drawer-content": !0, children: [
343
343
  ee,
344
344
  te
345
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;
346
+ let we;
347
+ return e[88] !== t || e[89] !== i || e[90] !== le ? (we = /* @__PURE__ */ o(Mt, { dismissible: !0, open: i, onOpenChange: t, children: le }), e[88] = t, e[89] = i, e[90] = le, e[91] = we) : we = e[91], we;
348
348
  }
349
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];
350
+ e[92] !== I ? (J = /* @__PURE__ */ o(gt, { className: "sr-only", children: /* @__PURE__ */ o(_t, { children: I }) }), e[92] = I, e[93] = J) : J = e[93];
351
351
  let Q;
352
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
353
  let Z;
@@ -355,8 +355,8 @@ function rt(a) {
355
355
  J,
356
356
  Q
357
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;
358
+ let Ie;
359
+ return e[102] !== t || e[103] !== i || e[104] !== Z ? (Ie = /* @__PURE__ */ o(Nt, { open: i, onOpenChange: t, modal: !0, children: Z }), e[102] = t, e[103] = i, e[104] = Z, e[105] = Ie) : Ie = e[105], Ie;
360
360
  }
361
361
  function qt() {
362
362
  return document.body.classList.remove(Xe);
@@ -1,98 +1,95 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as k } from "react/jsx-runtime";
3
- import { c as I } from "react-compiler-runtime";
2
+ import { jsx as t, jsxs as w } from "react/jsx-runtime";
3
+ import { c as j } from "react-compiler-runtime";
4
4
  import { ArrowLeft as U } from "lucide-react";
5
5
  import { CircularProgress as H } from "../circular-progress.js";
6
- import { DoctButton as M } from "../../../ui/button.js";
6
+ import { DoctButton as T } from "../../../ui/button.js";
7
7
  import { DoctTypography as L } from "../../../ui/typography.js";
8
8
  import { cn as P } from "../../../../lib/utils.js";
9
9
  import { OtpInput as W } from "../inputs/otp-input.js";
10
10
  import { MOBILE_NUMBER_DIALOG_OTP_RESEND_BUTTON_LABEL as $ } from "./presets.js";
11
11
  const V = "flex w-full flex-col overflow-hidden border border-black/[0.12] bg-white";
12
- function q(B) {
13
- const e = I(9), {
14
- title: n,
15
- onBack: o
16
- } = B;
12
+ function q(y) {
13
+ const e = j(8), {
14
+ title: s,
15
+ onBack: n
16
+ } = y;
17
17
  let r;
18
18
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ t(U, { className: "size-6", "aria-hidden": !0 }), e[0] = r) : r = e[0];
19
19
  let l;
20
- e[1] !== o ? (l = /* @__PURE__ */ t(M, { type: "button", variant: "ghost", onClick: o, className: "flex size-12 shrink-0 items-center justify-center rounded-full p-0 text-black/70", "aria-label": "Go back", icon: r }), e[1] = o, e[2] = l) : l = e[2];
20
+ e[1] !== n ? (l = /* @__PURE__ */ t(T, { type: "button", variant: "ghost", onClick: n, className: "flex size-12 shrink-0 items-center justify-center rounded-full p-0 text-black/70", "aria-label": "Go back", icon: r }), e[1] = n, e[2] = l) : l = e[2];
21
21
  let i;
22
- e[3] !== n ? (i = /* @__PURE__ */ t("div", { className: "flex min-h-12 min-w-0 flex-1 items-center justify-center py-[18px]", children: /* @__PURE__ */ t(L, { as: "p", variant: "textLabel1", weight: "semiBold", align: "left", className: "min-w-0 !text-black/80", children: n }) }), e[3] = n, e[4] = i) : i = e[4];
22
+ e[3] !== s ? (i = /* @__PURE__ */ t("div", { className: "flex min-h-12 min-w-0 flex-1 items-center py-[18px] pr-4", children: /* @__PURE__ */ t(L, { as: "p", variant: "textLabel1", weight: "semiBold", align: "left", className: "min-w-0 !text-black/80", children: s }) }), e[3] = s, e[4] = i) : i = e[4];
23
23
  let a;
24
- e[5] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ t("div", { className: "size-12 shrink-0", "aria-hidden": !0 }), e[5] = a) : a = e[5];
25
- let s;
26
- return e[6] !== l || e[7] !== i ? (s = /* @__PURE__ */ k("div", { className: "flex w-full shrink-0 items-start justify-between overflow-hidden border-b border-black/10", children: [
24
+ return e[5] !== l || e[6] !== i ? (a = /* @__PURE__ */ w("div", { className: "flex w-full shrink-0 items-center overflow-hidden border-b border-black/10", children: [
27
25
  l,
28
- i,
29
- a
30
- ] }), e[6] = l, e[7] = i, e[8] = s) : s = e[8], s;
26
+ i
27
+ ] }), e[5] = l, e[6] = i, e[7] = a) : a = e[7], a;
31
28
  }
32
- function ie(B) {
33
- const e = I(44), {
34
- headerTitle: n,
35
- title: o,
29
+ function ie(y) {
30
+ const e = j(44), {
31
+ headerTitle: s,
32
+ title: n,
36
33
  phoneDisplay: r,
37
34
  otp: l,
38
35
  onOtpChange: i,
39
36
  onOtpSubmit: a,
40
- onBack: s,
37
+ onBack: B,
41
38
  otpError: D,
42
- canResend: R,
39
+ canResend: z,
43
40
  onResend: E,
44
41
  timerText: O,
45
- submitLabel: S,
46
- isSubmitting: T,
47
- className: A,
42
+ submitLabel: A,
43
+ isSubmitting: I,
44
+ className: C,
48
45
  surface: F
49
- } = B, C = R === void 0 ? !1 : R, c = T === void 0 ? !1 : T, j = F === "drawer" ? "h-auto max-w-none rounded-t-[16px]" : "!max-w-[384px] rounded-[16px] shadow-[0_8px_24px_rgba(0,0,0,0.12)]";
50
- let _;
51
- e[0] !== A || e[1] !== j ? (_ = P(V, j, A), e[0] = A, e[1] = j, e[2] = _) : _ = e[2];
52
- const z = _;
46
+ } = y, S = z === void 0 ? !1 : z, o = I === void 0 ? !1 : I, M = F === "drawer" ? "h-auto max-w-none rounded-t-[16px]" : "!max-w-[384px] rounded-[16px] shadow-[0_8px_24px_rgba(0,0,0,0.12)]";
47
+ let k;
48
+ e[0] !== C || e[1] !== M ? (k = P(V, M, C), e[0] = C, e[1] = M, e[2] = k) : k = e[2];
49
+ const R = k;
50
+ let c;
51
+ e[3] !== s || e[4] !== B ? (c = /* @__PURE__ */ t(q, { title: s, onBack: B }), e[3] = s, e[4] = B, e[5] = c) : c = e[5];
53
52
  let f;
54
- e[3] !== n || e[4] !== s ? (f = /* @__PURE__ */ t(q, { title: n, onBack: s }), e[3] = n, e[4] = s, e[5] = f) : f = e[5];
55
- let m;
56
- e[6] !== a || e[7] !== l ? (m = (G) => {
53
+ e[6] !== a || e[7] !== l ? (f = (G) => {
57
54
  G.preventDefault(), a == null || a(l.join(""));
58
- }, e[6] = a, e[7] = l, e[8] = m) : m = e[8];
55
+ }, e[6] = a, e[7] = l, e[8] = f) : f = e[8];
56
+ let m;
57
+ e[9] !== n ? (m = /* @__PURE__ */ t(L, { variant: "h6", weight: "extraBold", align: "left", className: "text-neutral-black", children: n }), e[9] = n, e[10] = m) : m = e[10];
59
58
  let d;
60
- e[9] !== o ? (d = /* @__PURE__ */ t(L, { variant: "h6", weight: "extraBold", align: "left", className: "text-neutral-black", children: o }), e[9] = o, e[10] = d) : d = e[10];
59
+ e[11] !== r ? (d = /* @__PURE__ */ t(L, { variant: "title2", align: "left", className: "text-neutral-black", children: r }), e[11] = r, e[12] = d) : d = e[12];
61
60
  let u;
62
- e[11] !== r ? (u = /* @__PURE__ */ t(L, { variant: "title2", align: "left", className: "text-neutral-black", children: r }), e[11] = r, e[12] = u) : u = e[12];
63
- let h;
64
- e[13] !== d || e[14] !== u ? (h = /* @__PURE__ */ k("div", { className: "flex w-full flex-col gap-6", children: [
65
- d,
66
- u
67
- ] }), e[13] = d, e[14] = u, e[15] = h) : h = e[15];
61
+ e[13] !== m || e[14] !== d ? (u = /* @__PURE__ */ w("div", { className: "flex w-full flex-col gap-6", children: [
62
+ m,
63
+ d
64
+ ] }), e[13] = m, e[14] = d, e[15] = u) : u = e[15];
68
65
  let p;
69
66
  e[16] !== i || e[17] !== l || e[18] !== D ? (p = /* @__PURE__ */ t(W, { autoFocus: !0, length: l.length, value: l, onChange: i, error: D, inputClassName: "!h-[44px] !w-[44px]" }), e[16] = i, e[17] = l, e[18] = D, e[19] = p) : p = e[19];
67
+ let h;
68
+ e[20] !== S || e[21] !== E || e[22] !== O ? (h = /* @__PURE__ */ t("div", { className: "flex min-h-7 items-center font-medium", children: S ? /* @__PURE__ */ t(T, { type: "button", variant: "outline", size: "small", onClick: E, className: "!h-[28px]", children: $ }) : /* @__PURE__ */ t(L, { variant: "textLabel3", align: "left", className: "text-neutral-black", children: O }) }), e[20] = S, e[21] = E, e[22] = O, e[23] = h) : h = e[23];
70
69
  let x;
71
- e[20] !== C || e[21] !== E || e[22] !== O ? (x = /* @__PURE__ */ t("div", { className: "flex min-h-7 items-center font-medium", children: C ? /* @__PURE__ */ t(M, { type: "button", variant: "outline", size: "small", onClick: E, className: "!h-[28px]", children: $ }) : /* @__PURE__ */ t(L, { variant: "textLabel3", align: "left", className: "text-neutral-black", children: O }) }), e[20] = C, e[21] = E, e[22] = O, e[23] = x) : x = e[23];
72
- let b;
73
- e[24] !== p || e[25] !== x ? (b = /* @__PURE__ */ k("div", { className: "flex w-full flex-col gap-5", children: [
70
+ e[24] !== p || e[25] !== h ? (x = /* @__PURE__ */ w("div", { className: "flex w-full flex-col gap-5", children: [
74
71
  p,
72
+ h
73
+ ] }), e[24] = p, e[25] = h, e[26] = x) : x = e[26];
74
+ let b;
75
+ e[27] !== x || e[28] !== u ? (b = /* @__PURE__ */ w("div", { className: "flex w-full flex-col items-center gap-7 px-4 py-5", children: [
76
+ u,
75
77
  x
76
- ] }), e[24] = p, e[25] = x, e[26] = b) : b = e[26];
78
+ ] }), e[27] = x, e[28] = u, e[29] = b) : b = e[29];
77
79
  let N;
78
- e[27] !== b || e[28] !== h ? (N = /* @__PURE__ */ k("div", { className: "flex w-full flex-col items-center gap-7 px-4 py-5", children: [
79
- h,
80
- b
81
- ] }), e[27] = b, e[28] = h, e[29] = N) : N = e[29];
80
+ e[30] !== o || e[31] !== A ? (N = o ? /* @__PURE__ */ t(H, { size: 32, strokeWidth: 2 }) : A, e[30] = o, e[31] = A, e[32] = N) : N = e[32];
82
81
  let g;
83
- e[30] !== c || e[31] !== S ? (g = c ? /* @__PURE__ */ t(H, { size: 32, strokeWidth: 2 }) : S, e[30] = c, e[31] = S, e[32] = g) : g = e[32];
82
+ e[33] !== o || e[34] !== N ? (g = /* @__PURE__ */ t("div", { className: "flex w-full flex-col items-start border-t border-black/10 bg-[#FAFAFA] p-4", children: /* @__PURE__ */ t(T, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: o, children: N }) }), e[33] = o, e[34] = N, e[35] = g) : g = e[35];
84
83
  let v;
85
- e[33] !== c || e[34] !== g ? (v = /* @__PURE__ */ t("div", { className: "flex w-full flex-col items-start border-t border-black/10 bg-[#FAFAFA] p-4", children: /* @__PURE__ */ t(M, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: c, children: g }) }), e[33] = c, e[34] = g, e[35] = v) : v = e[35];
86
- let w;
87
- e[36] !== N || e[37] !== v || e[38] !== m ? (w = /* @__PURE__ */ k("form", { className: "flex w-full flex-col", noValidate: !0, onSubmit: m, children: [
88
- N,
84
+ e[36] !== b || e[37] !== g || e[38] !== f ? (v = /* @__PURE__ */ w("form", { className: "flex w-full flex-col", noValidate: !0, onSubmit: f, children: [
85
+ b,
86
+ g
87
+ ] }), e[36] = b, e[37] = g, e[38] = f, e[39] = v) : v = e[39];
88
+ let _;
89
+ return e[40] !== R || e[41] !== v || e[42] !== c ? (_ = /* @__PURE__ */ w("div", { className: R, children: [
90
+ c,
89
91
  v
90
- ] }), e[36] = N, e[37] = v, e[38] = m, e[39] = w) : w = e[39];
91
- let y;
92
- return e[40] !== z || e[41] !== w || e[42] !== f ? (y = /* @__PURE__ */ k("div", { className: z, children: [
93
- f,
94
- w
95
- ] }), e[40] = z, e[41] = w, e[42] = f, e[43] = y) : y = e[43], y;
92
+ ] }), e[40] = R, e[41] = v, e[42] = c, e[43] = _) : _ = e[43], _;
96
93
  }
97
94
  export {
98
95
  ie as MobileNumberDialogOtpSurface