docthub-core-components 3.0.0 → 3.2.1
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/auto-complete.js +466 -0
- package/dist/components/overrides/ui/autocomplete-checkbox.js +491 -0
- package/dist/components/overrides/ui/chips/doct-chip.js +157 -0
- package/dist/components/overrides/ui/circular-progress.js +32 -0
- package/dist/components/overrides/ui/composed/address-form-section.js +67 -0
- package/dist/components/overrides/ui/composed/contact-form-section.js +56 -0
- package/dist/components/overrides/ui/composed/search-filter-section.js +132 -0
- package/dist/components/overrides/ui/composed/user-registration-section.js +77 -0
- package/dist/components/overrides/ui/currencyInput/currency-input.js +69 -0
- package/dist/components/overrides/ui/doct-animation-loader.js +13 -0
- package/dist/components/overrides/ui/expandable-card.js +115 -0
- package/dist/components/overrides/ui/footer/doct-footer.js +35 -0
- package/dist/components/overrides/ui/footer/footer-desktop.js +92 -0
- package/dist/components/overrides/ui/footer/footer-mobile.js +123 -0
- package/dist/components/overrides/ui/footer/footer-routes.js +87 -0
- package/dist/components/overrides/ui/footer/footer-shared.js +137 -0
- package/dist/components/overrides/ui/footer/presets.js +269 -0
- package/dist/components/overrides/ui/inputs/labeled-input.js +92 -0
- package/dist/components/overrides/ui/inputs/otp-input.js +101 -0
- package/dist/components/overrides/ui/inputs/password-input.js +77 -0
- package/dist/components/overrides/ui/inputs/phone-input.js +336 -0
- package/dist/components/overrides/ui/navigation-menu/doct-navigation-menu.js +22 -0
- package/dist/components/overrides/ui/navigation-menu/individual-nav-routes.js +46 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-desktop.js +109 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-mobile.js +231 -0
- package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu.js +44 -0
- package/dist/components/overrides/ui/navigation-menu/nav-env.js +64 -0
- package/dist/components/overrides/ui/navigation-menu/navigation-menu-adapter.js +55 -0
- package/dist/components/overrides/ui/navigation-menu/navigation-menu-internal.js +36 -0
- package/dist/components/overrides/ui/navigation-menu/organization-nav-routes.js +34 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-desktop.js +109 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-mobile.js +231 -0
- package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu.js +44 -0
- package/dist/components/overrides/ui/navigation-menu/presets.js +238 -0
- package/dist/components/overrides/ui/navigation-menu/types.js +6 -0
- package/dist/components/overrides/ui/pickers/date-picker-field.js +361 -0
- package/dist/components/overrides/ui/pickers/date-range-picker-field.js +288 -0
- package/dist/components/overrides/ui/pickers/day-picker-bounds.js +38 -0
- package/dist/components/overrides/ui/pickers/select-field.js +158 -0
- package/dist/components/overrides/ui/search/auto-complete.js +64 -0
- package/dist/components/overrides/ui/search/search-input.js +65 -0
- package/dist/components/overrides/ui/showcase/component-section.js +45 -0
- package/dist/components/ui/alert.js +94 -0
- package/dist/components/ui/avatar.js +69 -0
- package/dist/components/ui/badge.js +37 -0
- package/dist/components/ui/breadcrumb.js +117 -0
- package/dist/components/ui/button.js +223 -0
- package/dist/components/ui/calendar.js +100 -0
- package/dist/components/ui/checkbox.js +57 -0
- package/dist/components/ui/collapsible.js +25 -0
- package/dist/components/ui/command.js +132 -0
- package/dist/components/ui/dialog.js +230 -0
- package/dist/components/ui/drawer.js +119 -0
- package/dist/components/ui/dropdown-menu.js +216 -0
- package/dist/components/ui/input.js +48 -0
- package/dist/components/ui/label.js +22 -0
- package/dist/components/ui/popover.js +181 -0
- package/dist/components/ui/progress.js +91 -0
- package/dist/components/ui/radio-group.js +49 -0
- package/dist/components/ui/select.js +169 -0
- package/dist/components/ui/skeleton.js +91 -0
- package/dist/components/ui/spinner.js +32 -0
- package/dist/components/ui/tabs.js +68 -0
- package/dist/components/ui/textarea.js +73 -0
- package/dist/components/ui/timeline.js +177 -0
- package/dist/components/ui/toast.js +82 -0
- package/dist/components/ui/tooltip.js +91 -0
- package/dist/components/ui/typography.js +213 -0
- package/dist/hooks/use-exclusive-dropdown.js +53 -0
- package/dist/hooks/use-mobile.js +19 -0
- package/dist/hooks/useAutocompleteCheckbox.js +204 -0
- package/dist/index.js +187 -0
- package/dist/lib/dropdown-manager.js +17 -0
- package/dist/lib/get-floating-dropdown-position.js +32 -0
- package/dist/lib/get-scroll-parents.js +20 -0
- package/dist/lib/slot.js +40 -0
- package/dist/lib/utils.js +9 -0
- package/dist/src/components/overrides/ui/autocomplete-checkbox.d.ts +16 -1
- package/dist/style.css +1 -1
- package/dist/util/getInputClasses.js +19 -0
- package/package.json +5 -5
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c, jsxs as T, Fragment as $e } from "react/jsx-runtime";
|
|
3
|
+
import { c as he } from "react-compiler-runtime";
|
|
4
|
+
import { ChevronsUpDown as Re, CheckIcon as Pe } from "lucide-react";
|
|
5
|
+
import * as R from "react";
|
|
6
|
+
import * as je from "react-phone-number-input";
|
|
7
|
+
import { isPossiblePhoneNumber as ut, isValidPhoneNumber as mt } from "react-phone-number-input";
|
|
8
|
+
import Te from "react-phone-number-input/flags";
|
|
9
|
+
import { CommandInput as Ae, CommandEmpty as Be, CommandList as Le, CommandGroup as Ve, Command as ze, CommandItem as Ge } from "../../../ui/command.js";
|
|
10
|
+
import { Input as Ue } from "../../../ui/input.js";
|
|
11
|
+
import { Label as qe } from "../../../ui/label.js";
|
|
12
|
+
import { PopoverTrigger as Me, PopoverContent as Xe, Popover as He } from "../../../ui/popover.js";
|
|
13
|
+
import { cn as te } from "../../../../lib/utils.js";
|
|
14
|
+
import { DoctTypography as Se } from "../../../ui/typography.js";
|
|
15
|
+
const Je = /\D/g, re = (r) => r.replace(Je, ""), _e = (r) => {
|
|
16
|
+
const e = r.match(/^\+\s*(\d+)\s*-\s*(\d*)\s*$/);
|
|
17
|
+
return e ? {
|
|
18
|
+
callingCode: e[1],
|
|
19
|
+
national: e[2]
|
|
20
|
+
} : null;
|
|
21
|
+
}, De = (r) => {
|
|
22
|
+
if (r == null) return "";
|
|
23
|
+
const e = String(r).trim(), t = _e(e);
|
|
24
|
+
return t ? t.national : re(e);
|
|
25
|
+
}, q = (r) => {
|
|
26
|
+
if (!r) return "91";
|
|
27
|
+
if (typeof r == "object" && "countryCode" in r)
|
|
28
|
+
return r.countryCode.replace("+", "");
|
|
29
|
+
try {
|
|
30
|
+
return je.getCountryCallingCode(r);
|
|
31
|
+
} catch {
|
|
32
|
+
return "91";
|
|
33
|
+
}
|
|
34
|
+
}, Oe = (r, e) => {
|
|
35
|
+
if (!e) return r ? `+${re(r)}` : "";
|
|
36
|
+
const t = q(e);
|
|
37
|
+
return r ? `+${t}-${r}` : `+${t}`;
|
|
38
|
+
}, Fe = (r, e) => e ? typeof r == "object" && "countryId" in r && typeof e == "object" && "countryId" in e ? r.countryId === e.countryId : r === e : !1, Ie = (r, e, t) => {
|
|
39
|
+
const s = re(e), l = r.map((n) => n.value).filter((n) => !!n).filter((n) => q(n) === s);
|
|
40
|
+
if (l.length !== 0)
|
|
41
|
+
return t && l.some((n) => Fe(n, t)) ? t : l[0];
|
|
42
|
+
}, ke = (r) => {
|
|
43
|
+
const e = he(5), {
|
|
44
|
+
country: t,
|
|
45
|
+
countryName: s
|
|
46
|
+
} = r, l = Te[t];
|
|
47
|
+
let n;
|
|
48
|
+
e[0] !== l || e[1] !== s ? (n = l && /* @__PURE__ */ c(l, { title: s }), e[0] = l, e[1] = s, e[2] = n) : n = e[2];
|
|
49
|
+
let o;
|
|
50
|
+
return e[3] !== n ? (o = /* @__PURE__ */ c("span", { className: "flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: n }), e[3] = n, e[4] = o) : o = e[4], o;
|
|
51
|
+
}, Ke = (r) => {
|
|
52
|
+
const e = he(48), {
|
|
53
|
+
disabled: t,
|
|
54
|
+
value: s,
|
|
55
|
+
options: l,
|
|
56
|
+
onChange: n,
|
|
57
|
+
showFlagVariant: o,
|
|
58
|
+
hasError: x,
|
|
59
|
+
popoverAnchorRef: f
|
|
60
|
+
} = r, C = R.useRef(null), [$, w] = R.useState(""), [y, u] = R.useState(!1);
|
|
61
|
+
let p;
|
|
62
|
+
e[0] !== s ? (p = s ? `+${q(s)}` : "+91", e[0] = s, e[1] = p) : p = e[1];
|
|
63
|
+
const d = p;
|
|
64
|
+
let a;
|
|
65
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (F) => {
|
|
66
|
+
u(F), F && w("");
|
|
67
|
+
}, e[2] = a) : a = e[2];
|
|
68
|
+
const h = x ? "border-destructive" : "border-gray-300", v = y && "bg-gray-100";
|
|
69
|
+
let I;
|
|
70
|
+
e[3] !== h || e[4] !== v ? (I = te("flex h-[40px] items-center gap-1.5 rounded-l-md rounded-r-none border-l-[1px] border-t-[1px] border-b-[1px] bg-white px-3 py-[1px] text-sm font-medium text-gray-900 transition-colors", h, "hover:bg-gray-100 focus:z-10 focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", v), e[3] = h, e[4] = v, e[5] = I) : I = e[5];
|
|
71
|
+
let D;
|
|
72
|
+
e[6] !== s || e[7] !== o ? (D = o && s && typeof s == "string" && /* @__PURE__ */ c("span", { className: "mr-1 flex items-center", children: /* @__PURE__ */ c(ke, { country: s, countryName: s }) }), e[6] = s, e[7] = o, e[8] = D) : D = e[8];
|
|
73
|
+
let O;
|
|
74
|
+
e[9] !== d ? (O = /* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900", children: d }), e[9] = d, e[10] = O) : O = e[10];
|
|
75
|
+
const g = t && "hidden";
|
|
76
|
+
let V;
|
|
77
|
+
e[11] !== g ? (V = te("h-4 w-4 text-gray-500 shrink-0", g), e[11] = g, e[12] = V) : V = e[12];
|
|
78
|
+
let z;
|
|
79
|
+
e[13] !== V ? (z = /* @__PURE__ */ c(Re, { className: V }), e[13] = V, e[14] = z) : z = e[14];
|
|
80
|
+
let S;
|
|
81
|
+
e[15] !== t || e[16] !== z || e[17] !== I || e[18] !== D || e[19] !== O ? (S = /* @__PURE__ */ c(Me, { asChild: !0, children: /* @__PURE__ */ T("button", { type: "button", disabled: t, className: I, children: [
|
|
82
|
+
D,
|
|
83
|
+
O,
|
|
84
|
+
z
|
|
85
|
+
] }) }), e[15] = t, e[16] = z, e[17] = I, e[18] = D, e[19] = O, e[20] = S) : S = e[20];
|
|
86
|
+
let M;
|
|
87
|
+
e[21] === Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
88
|
+
side: "flip",
|
|
89
|
+
align: "shift",
|
|
90
|
+
fallbackAxisSide: "none"
|
|
91
|
+
}, e[21] = M) : M = e[21];
|
|
92
|
+
let k;
|
|
93
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (k = (F) => {
|
|
94
|
+
w(F), window.setTimeout(() => {
|
|
95
|
+
const L = C.current;
|
|
96
|
+
L && (L.scrollTop = 0);
|
|
97
|
+
}, 0);
|
|
98
|
+
}, e[22] = k) : k = e[22];
|
|
99
|
+
let _;
|
|
100
|
+
e[23] !== $ ? (_ = /* @__PURE__ */ c("div", { className: "mb-3 h-[32px] rounded-full border border-gray-300 bg-white overflow-hidden [&_[cmdk-input-wrapper]]:h-full [&_[cmdk-input-wrapper]]:px-3 [&_[cmdk-input-wrapper]_svg]:text-gray-500", children: /* @__PURE__ */ c(Ae, { value: $, onValueChange: k, placeholder: "Search country..." }) }), e[23] = $, e[24] = _) : _ = e[24];
|
|
101
|
+
let A, G;
|
|
102
|
+
e[25] === Symbol.for("react.memo_cache_sentinel") ? (A = {
|
|
103
|
+
msOverflowStyle: "none"
|
|
104
|
+
}, G = /* @__PURE__ */ c(Be, { children: "No country found." }), e[25] = A, e[26] = G) : (A = e[25], G = e[26]);
|
|
105
|
+
let j;
|
|
106
|
+
if (e[27] !== l || e[28] !== n || e[29] !== s || e[30] !== o) {
|
|
107
|
+
let F;
|
|
108
|
+
e[32] !== n || e[33] !== s || e[34] !== o ? (F = (L) => {
|
|
109
|
+
const {
|
|
110
|
+
value: i,
|
|
111
|
+
label: X,
|
|
112
|
+
countryCode: H
|
|
113
|
+
} = L;
|
|
114
|
+
return i ? /* @__PURE__ */ c(Qe, { country: i, countryName: X, countryCode: H, selectedCountry: s, onChange: n, onSelectComplete: () => u(!1), showFlagVariant: o }, typeof i == "object" && "countryId" in i ? i.countryId : i) : null;
|
|
115
|
+
}, e[32] = n, e[33] = s, e[34] = o, e[35] = F) : F = e[35], j = l.map(F), e[27] = l, e[28] = n, e[29] = s, e[30] = o, e[31] = j;
|
|
116
|
+
} else
|
|
117
|
+
j = e[31];
|
|
118
|
+
let P;
|
|
119
|
+
e[36] !== j ? (P = /* @__PURE__ */ c(Le, { children: /* @__PURE__ */ T("div", { ref: C, className: "max-h-[min(288px,calc(100vh-12rem))] overflow-y-auto -mx-1 px-1 [&::-webkit-scrollbar]:hidden [scrollbar-width:none]", style: A, children: [
|
|
120
|
+
G,
|
|
121
|
+
/* @__PURE__ */ c(Ve, { children: j })
|
|
122
|
+
] }) }), e[36] = j, e[37] = P) : P = e[37];
|
|
123
|
+
let E;
|
|
124
|
+
e[38] !== _ || e[39] !== P ? (E = /* @__PURE__ */ T(ze, { children: [
|
|
125
|
+
_,
|
|
126
|
+
P
|
|
127
|
+
] }), e[38] = _, e[39] = P, e[40] = E) : E = e[40];
|
|
128
|
+
let m;
|
|
129
|
+
e[41] !== f || e[42] !== E ? (m = /* @__PURE__ */ c(Xe, { anchor: f, side: "bottom", sideOffset: 6, collisionAvoidance: M, className: "w-[min(var(--anchor-width),calc(100vw-1rem))] max-w-[var(--available-width)] min-w-0 p-1 shadow-md border border-gray-300 rounded-md", align: "start", children: E }), e[41] = f, e[42] = E, e[43] = m) : m = e[43];
|
|
130
|
+
let B;
|
|
131
|
+
return e[44] !== y || e[45] !== S || e[46] !== m ? (B = /* @__PURE__ */ T(He, { open: y, modal: !0, onOpenChange: a, children: [
|
|
132
|
+
S,
|
|
133
|
+
m
|
|
134
|
+
] }), e[44] = y, e[45] = S, e[46] = m, e[47] = B) : B = e[47], B;
|
|
135
|
+
}, Qe = (r) => {
|
|
136
|
+
const e = he(21), {
|
|
137
|
+
country: t,
|
|
138
|
+
countryName: s,
|
|
139
|
+
countryCode: l,
|
|
140
|
+
selectedCountry: n,
|
|
141
|
+
onChange: o,
|
|
142
|
+
onSelectComplete: x,
|
|
143
|
+
showFlagVariant: f
|
|
144
|
+
} = r;
|
|
145
|
+
let C;
|
|
146
|
+
e[0] !== t || e[1] !== o || e[2] !== x ? (C = () => {
|
|
147
|
+
o(t), x();
|
|
148
|
+
}, e[0] = t, e[1] = o, e[2] = x, e[3] = C) : C = e[3];
|
|
149
|
+
const $ = C;
|
|
150
|
+
let w;
|
|
151
|
+
e: {
|
|
152
|
+
if (!n) {
|
|
153
|
+
w = !1;
|
|
154
|
+
break e;
|
|
155
|
+
}
|
|
156
|
+
if (typeof t == "object" && "countryId" in t && typeof n == "object" && "countryId" in n) {
|
|
157
|
+
w = t.countryId === n.countryId;
|
|
158
|
+
break e;
|
|
159
|
+
}
|
|
160
|
+
w = t === n;
|
|
161
|
+
}
|
|
162
|
+
const y = w, u = typeof t == "object" && "countryId" in t ? `${t.countryName} ${t.countryCode}` : `${s} ${l}`;
|
|
163
|
+
let p;
|
|
164
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (p = te("flex items-center gap-3 px-3 py-2.5 text-sm cursor-pointer transition-colors", "data-[selected=true]:bg-[#F5F5F5] data-[selected=true]:text-gray-900", "hover:bg-[#F5F5F5]"), e[4] = p) : p = e[4];
|
|
165
|
+
let d;
|
|
166
|
+
e[5] !== t || e[6] !== s || e[7] !== f ? (d = f && typeof t == "string" && /* @__PURE__ */ c("span", { className: "flex items-center", children: /* @__PURE__ */ c(ke, { country: t, countryName: s }) }), e[5] = t, e[6] = s, e[7] = f, e[8] = d) : d = e[8];
|
|
167
|
+
let a;
|
|
168
|
+
e[9] !== l || e[10] !== s || e[11] !== f ? (a = f ? /* @__PURE__ */ T($e, { children: [
|
|
169
|
+
/* @__PURE__ */ c("span", { className: "flex-1 text-sm font-normal text-gray-700", children: s }),
|
|
170
|
+
/* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px] text-right", children: l })
|
|
171
|
+
] }) : /* @__PURE__ */ T($e, { children: [
|
|
172
|
+
/* @__PURE__ */ c(Se, { variant: "body2", weight: "regular", className: "text-gray-900 min-w-[50px]", children: l }),
|
|
173
|
+
/* @__PURE__ */ c("span", { className: "flex-1 text-sm font-normal text-gray-700", children: s })
|
|
174
|
+
] }), e[9] = l, e[10] = s, e[11] = f, e[12] = a) : a = e[12];
|
|
175
|
+
let h;
|
|
176
|
+
e[13] !== y ? (h = y && /* @__PURE__ */ c(Pe, { className: "ml-auto h-4 w-4 text-gray-900 shrink-0" }), e[13] = y, e[14] = h) : h = e[14];
|
|
177
|
+
let v;
|
|
178
|
+
return e[15] !== $ || e[16] !== u || e[17] !== d || e[18] !== a || e[19] !== h ? (v = /* @__PURE__ */ T(Ge, { value: u, className: p, onSelect: $, children: [
|
|
179
|
+
d,
|
|
180
|
+
a,
|
|
181
|
+
h
|
|
182
|
+
] }), e[15] = $, e[16] = u, e[17] = d, e[18] = a, e[19] = h, e[20] = v) : v = e[20], v;
|
|
183
|
+
}, We = je.getCountries(), Ye = (r) => {
|
|
184
|
+
if (!r || r.length === 0)
|
|
185
|
+
return We.map((t) => ({
|
|
186
|
+
value: t,
|
|
187
|
+
label: new Intl.DisplayNames(["en"], {
|
|
188
|
+
type: "region"
|
|
189
|
+
}).of(t) ?? t,
|
|
190
|
+
countryCode: `+${q(t)}`
|
|
191
|
+
}));
|
|
192
|
+
const e = r[0];
|
|
193
|
+
return e && typeof e == "object" && "countryId" in e ? r.map((t) => ({
|
|
194
|
+
value: t,
|
|
195
|
+
label: t.countryName,
|
|
196
|
+
countryCode: t.countryCode
|
|
197
|
+
})) : r.map((t) => ({
|
|
198
|
+
value: t,
|
|
199
|
+
label: new Intl.DisplayNames(["en"], {
|
|
200
|
+
type: "region"
|
|
201
|
+
}).of(t) ?? t,
|
|
202
|
+
countryCode: `+${q(t)}`
|
|
203
|
+
}));
|
|
204
|
+
};
|
|
205
|
+
function ct(r) {
|
|
206
|
+
const e = he(110);
|
|
207
|
+
let t, s, l, n, o, x, f, C, $, w, y, u, p, d, a, h, v, I, D, O;
|
|
208
|
+
e[0] !== r ? ({
|
|
209
|
+
label: w,
|
|
210
|
+
helperText: C,
|
|
211
|
+
error: f,
|
|
212
|
+
required: v,
|
|
213
|
+
className: s,
|
|
214
|
+
"aria-describedby": t,
|
|
215
|
+
id: $,
|
|
216
|
+
value: D,
|
|
217
|
+
onPhoneChange: p,
|
|
218
|
+
countryCode: n,
|
|
219
|
+
onCountryCodeChange: u,
|
|
220
|
+
onValuesChange: a,
|
|
221
|
+
onCountryChange: y,
|
|
222
|
+
onValueChange: d,
|
|
223
|
+
countries: l,
|
|
224
|
+
defaultCountry: o,
|
|
225
|
+
variant: O,
|
|
226
|
+
disabled: x,
|
|
227
|
+
placeholder: h,
|
|
228
|
+
...I
|
|
229
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = n, e[5] = o, e[6] = x, e[7] = f, e[8] = C, e[9] = $, e[10] = w, e[11] = y, e[12] = u, e[13] = p, e[14] = d, e[15] = a, e[16] = h, e[17] = v, e[18] = I, e[19] = D, e[20] = O) : (t = e[1], s = e[2], l = e[3], n = e[4], o = e[5], x = e[6], f = e[7], C = e[8], $ = e[9], w = e[10], y = e[11], u = e[12], p = e[13], d = e[14], a = e[15], h = e[16], v = e[17], I = e[18], D = e[19], O = e[20]);
|
|
230
|
+
const g = D === void 0 ? "" : D, V = O === void 0 ? "default" : O, z = R.useId(), S = R.useId(), M = R.useRef(null), k = $ ?? z, _ = !!(C || f);
|
|
231
|
+
let A;
|
|
232
|
+
e[21] !== t || e[22] !== _ || e[23] !== S ? (A = [t, _ ? S : void 0].filter(Boolean).join(" ") || void 0, e[21] = t, e[22] = _, e[23] = S, e[24] = A) : A = e[24];
|
|
233
|
+
const G = A, j = !!f, P = V === "flag";
|
|
234
|
+
let E;
|
|
235
|
+
e[25] !== l ? (E = Ye(l), e[25] = l, e[26] = E) : E = e[26];
|
|
236
|
+
const m = E;
|
|
237
|
+
let B;
|
|
238
|
+
e[27] !== l || e[28] !== m || e[29] !== o || e[30] !== g ? (B = () => {
|
|
239
|
+
const b = _e(String(g ?? "").trim());
|
|
240
|
+
if (b) {
|
|
241
|
+
const N = Ie(m, b.callingCode, void 0);
|
|
242
|
+
if (N)
|
|
243
|
+
return N;
|
|
244
|
+
}
|
|
245
|
+
return o == null ? l && l.length > 0 ? l[0] : "IN" : typeof o == "number" && l && l[o] ? l[o] : o;
|
|
246
|
+
}, e[27] = l, e[28] = m, e[29] = o, e[30] = g, e[31] = B) : B = e[31];
|
|
247
|
+
const F = B;
|
|
248
|
+
let L;
|
|
249
|
+
e[32] !== F ? (L = () => F(), e[32] = F, e[33] = L) : L = e[33];
|
|
250
|
+
const [i, X] = R.useState(L);
|
|
251
|
+
let H;
|
|
252
|
+
e[34] !== l || e[35] !== o ? (H = () => {
|
|
253
|
+
o != null && (typeof o == "number" && l && l[o] ? X(l[o]) : typeof o != "number" && X(o));
|
|
254
|
+
}, e[34] = l, e[35] = o, e[36] = H) : H = e[36];
|
|
255
|
+
let oe;
|
|
256
|
+
e[37] !== o ? (oe = [o], e[37] = o, e[38] = oe) : oe = e[38], R.useEffect(H, oe);
|
|
257
|
+
const U = n !== void 0;
|
|
258
|
+
let le, ne;
|
|
259
|
+
e[39] !== U || e[40] !== u || e[41] !== i ? (ne = () => {
|
|
260
|
+
if (!U && i) {
|
|
261
|
+
const b = q(i);
|
|
262
|
+
u == null || u(b);
|
|
263
|
+
}
|
|
264
|
+
}, le = [i, U, u], e[39] = U, e[40] = u, e[41] = i, e[42] = le, e[43] = ne) : (le = e[42], ne = e[43]), R.useEffect(ne, le);
|
|
265
|
+
let se, ie;
|
|
266
|
+
e[44] !== n || e[45] !== m || e[46] !== U || e[47] !== i ? (se = () => {
|
|
267
|
+
if (!U)
|
|
268
|
+
return;
|
|
269
|
+
const b = re(String(n ?? ""));
|
|
270
|
+
if (b === "")
|
|
271
|
+
return;
|
|
272
|
+
const N = Ie(m, b, i);
|
|
273
|
+
N && !Fe(N, i) && X(N);
|
|
274
|
+
}, ie = [n, m, U, i], e[44] = n, e[45] = m, e[46] = U, e[47] = i, e[48] = se, e[49] = ie) : (se = e[48], ie = e[49]), R.useEffect(se, ie);
|
|
275
|
+
let ae, ce;
|
|
276
|
+
e[50] !== m || e[51] !== i || e[52] !== g ? (ae = () => {
|
|
277
|
+
const b = _e(String(g ?? "").trim());
|
|
278
|
+
if (!b)
|
|
279
|
+
return;
|
|
280
|
+
const N = Ie(m, b.callingCode, i);
|
|
281
|
+
N && !Fe(N, i) && X(N);
|
|
282
|
+
}, ce = [g, m, i], e[50] = m, e[51] = i, e[52] = g, e[53] = ae, e[54] = ce) : (ae = e[53], ce = e[54]), R.useEffect(ae, ce);
|
|
283
|
+
let de;
|
|
284
|
+
e[55] !== g ? (de = De(g), e[55] = g, e[56] = de) : de = e[56];
|
|
285
|
+
const fe = de;
|
|
286
|
+
let ue;
|
|
287
|
+
e[57] !== fe || e[58] !== y || e[59] !== u || e[60] !== d || e[61] !== a ? (ue = (b) => {
|
|
288
|
+
X(b);
|
|
289
|
+
const N = q(b);
|
|
290
|
+
u == null || u(N), y == null || y(b), a == null || a([N, fe]), d == null || d(Oe(fe, b));
|
|
291
|
+
}, e[57] = fe, e[58] = y, e[59] = u, e[60] = d, e[61] = a, e[62] = ue) : ue = e[62];
|
|
292
|
+
const ge = ue;
|
|
293
|
+
let me;
|
|
294
|
+
e[63] !== n || e[64] !== p || e[65] !== d || e[66] !== a || e[67] !== i ? (me = (b) => {
|
|
295
|
+
const N = b.target.value, Ne = re(N);
|
|
296
|
+
p == null || p(Ne);
|
|
297
|
+
const Ee = n ?? q(i);
|
|
298
|
+
a == null || a([Ee, Ne]), d == null || d(Oe(Ne, i));
|
|
299
|
+
}, e[63] = n, e[64] = p, e[65] = d, e[66] = a, e[67] = i, e[68] = me) : me = e[68];
|
|
300
|
+
const be = me;
|
|
301
|
+
let pe;
|
|
302
|
+
e[69] !== g ? (pe = De(g), e[69] = g, e[70] = pe) : pe = e[70];
|
|
303
|
+
const ve = pe;
|
|
304
|
+
let J;
|
|
305
|
+
e[71] !== s ? (J = te("space-y-1", s), e[71] = s, e[72] = J) : J = e[72];
|
|
306
|
+
let K;
|
|
307
|
+
e[73] !== w || e[74] !== v || e[75] !== k ? (K = w && /* @__PURE__ */ T(qe, { htmlFor: k, className: "text-sm font-medium text-foreground", children: [
|
|
308
|
+
w,
|
|
309
|
+
v && /* @__PURE__ */ c("span", { className: "ml-1 text-destructive", "aria-hidden": "true", children: "*" })
|
|
310
|
+
] }), e[73] = w, e[74] = v, e[75] = k, e[76] = K) : K = e[76];
|
|
311
|
+
let Q;
|
|
312
|
+
e[77] !== m || e[78] !== x || e[79] !== ge || e[80] !== j || e[81] !== i || e[82] !== P ? (Q = /* @__PURE__ */ c(Ke, { disabled: x, value: i, options: m, onChange: ge, showFlagVariant: P, hasError: j, popoverAnchorRef: M }), e[77] = m, e[78] = x, e[79] = ge, e[80] = j, e[81] = i, e[82] = P, e[83] = Q) : Q = e[83];
|
|
313
|
+
const xe = v || void 0, Ce = j || void 0, we = j ? "border-destructive" : "border-gray-300";
|
|
314
|
+
let W;
|
|
315
|
+
e[84] !== we ? (W = te("h-[40px] rounded-r-md rounded-l-none border-t-[1px] border-b-[1px] border-l-[1px] bg-white px-3 py-[1px] text-sm", we), e[84] = we, e[85] = W) : W = e[85];
|
|
316
|
+
let Y;
|
|
317
|
+
e[86] !== G || e[87] !== x || e[88] !== be || e[89] !== ve || e[90] !== h || e[91] !== k || e[92] !== I || e[93] !== xe || e[94] !== Ce || e[95] !== W ? (Y = /* @__PURE__ */ c(Ue, { ...I, ref: void 0, id: k, type: "text", inputMode: "numeric", value: ve, onChange: be, disabled: x, placeholder: h, "aria-required": xe, "aria-invalid": Ce, "aria-describedby": G, className: W }), e[86] = G, e[87] = x, e[88] = be, e[89] = ve, e[90] = h, e[91] = k, e[92] = I, e[93] = xe, e[94] = Ce, e[95] = W, e[96] = Y) : Y = e[96];
|
|
318
|
+
let Z;
|
|
319
|
+
e[97] !== Q || e[98] !== Y ? (Z = /* @__PURE__ */ T("div", { ref: M, className: "flex w-full min-w-0 items-center", children: [
|
|
320
|
+
Q,
|
|
321
|
+
Y
|
|
322
|
+
] }), e[97] = Q, e[98] = Y, e[99] = Z) : Z = e[99];
|
|
323
|
+
let ee;
|
|
324
|
+
e[100] !== f || e[101] !== _ || e[102] !== S || e[103] !== C ? (ee = _ && /* @__PURE__ */ c("p", { id: S, className: te("text-xs", f ? "text-destructive" : "text-muted-foreground"), role: f ? "alert" : void 0, children: f || C }), e[100] = f, e[101] = _, e[102] = S, e[103] = C, e[104] = ee) : ee = e[104];
|
|
325
|
+
let ye;
|
|
326
|
+
return e[105] !== J || e[106] !== K || e[107] !== Z || e[108] !== ee ? (ye = /* @__PURE__ */ T("div", { className: J, children: [
|
|
327
|
+
K,
|
|
328
|
+
Z,
|
|
329
|
+
ee
|
|
330
|
+
] }), e[105] = J, e[106] = K, e[107] = Z, e[108] = ee, e[109] = ye) : ye = e[109], ye;
|
|
331
|
+
}
|
|
332
|
+
export {
|
|
333
|
+
ct as DoctPhoneInput,
|
|
334
|
+
ut as isPossiblePhoneNumber,
|
|
335
|
+
mt as isValidPhoneNumber
|
|
336
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { c as v } from "react-compiler-runtime";
|
|
4
|
+
import { IndividualNavigationMenu as l } from "./individual-navigation-menu.js";
|
|
5
|
+
import { OrganizationNavigationMenu as m } from "./organization-navigation-menu.js";
|
|
6
|
+
function M(u) {
|
|
7
|
+
const i = v(8), {
|
|
8
|
+
groups: t,
|
|
9
|
+
className: n,
|
|
10
|
+
isMobileOverride: o,
|
|
11
|
+
variant: e
|
|
12
|
+
} = u;
|
|
13
|
+
if ((e === void 0 ? "individual" : e) === "organization") {
|
|
14
|
+
let a;
|
|
15
|
+
return i[0] !== n || i[1] !== t || i[2] !== o ? (a = /* @__PURE__ */ s(m, { groups: t, className: n, isMobileOverride: o }), i[0] = n, i[1] = t, i[2] = o, i[3] = a) : a = i[3], a;
|
|
16
|
+
}
|
|
17
|
+
let r;
|
|
18
|
+
return i[4] !== n || i[5] !== t || i[6] !== o ? (r = /* @__PURE__ */ s(l, { groups: t, className: n, isMobileOverride: o }), i[4] = n, i[5] = t, i[6] = o, i[7] = r) : r = i[7], r;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
M as DoctNavigationMenu
|
|
22
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { resolveNavEnv as t } from "./nav-env.js";
|
|
3
|
+
const e = {
|
|
4
|
+
jobs: "https://jobs.dochub.in/",
|
|
5
|
+
courses: "https://courses.dochub.in/",
|
|
6
|
+
events: "https://events.dochub.in/",
|
|
7
|
+
logbook: "https://dev.dochub.in/logbook",
|
|
8
|
+
"resume-builder": "https://dev.dochub.in/resume-builder",
|
|
9
|
+
// Exhibitor branding page pending; redirect to healthcare career app until dedicated page exists
|
|
10
|
+
exhibitor: "https://dev.dochub.in/healthcare-career-app",
|
|
11
|
+
library: "https://blogs.dochub.in/",
|
|
12
|
+
news: "https://news.dochub.in/",
|
|
13
|
+
"course-pages": "https://dev.dochub.in/course-pages",
|
|
14
|
+
"job-role-pages": "https://dev.dochub.in/jobrole-pages",
|
|
15
|
+
"explore-courses-after-12th": "https://dev.dochub.in/explore-courses-after-12th",
|
|
16
|
+
"about-us": "https://dev.dochub.in/about-us",
|
|
17
|
+
"media-release": "https://dev.dochub.in/media-releases",
|
|
18
|
+
"press-kit": "https://dev.dochub.in/press-kit",
|
|
19
|
+
policies: "https://dev.dochub.in/policies",
|
|
20
|
+
"contact-us": "https://dev.dochub.in/contact-us",
|
|
21
|
+
healthcareCareerApp: "https://dev.dochub.in/healthcare-career-app"
|
|
22
|
+
}, o = {
|
|
23
|
+
jobs: "https://jobs.docthub.com/",
|
|
24
|
+
courses: "https://courses.docthub.com/",
|
|
25
|
+
events: "https://events.docthub.com/",
|
|
26
|
+
logbook: "https://www.docthub.com/logbook",
|
|
27
|
+
"resume-builder": "https://www.docthub.com/resume-builder",
|
|
28
|
+
// Exhibitor branding page pending; redirect to healthcare career app until dedicated page exists
|
|
29
|
+
exhibitor: "https://www.docthub.com/healthcare-career-app",
|
|
30
|
+
library: "https://blogs.docthub.com/",
|
|
31
|
+
news: "https://news.docthub.com/",
|
|
32
|
+
"course-pages": "https://www.docthub.com/course-pages",
|
|
33
|
+
"job-role-pages": "https://www.docthub.com/jobrole-pages",
|
|
34
|
+
"explore-courses-after-12th": "https://www.docthub.com/explore-courses-after-12th",
|
|
35
|
+
"about-us": "https://www.docthub.com/about-us",
|
|
36
|
+
"media-release": "https://www.docthub.com/media-releases",
|
|
37
|
+
"press-kit": "https://www.docthub.com/press-kit",
|
|
38
|
+
policies: "https://www.docthub.com/policies",
|
|
39
|
+
"contact-us": "https://www.docthub.com/contact-us",
|
|
40
|
+
healthcareCareerApp: "https://www.docthub.com/healthcare-career-app"
|
|
41
|
+
}, c = t() === "production" ? o : e;
|
|
42
|
+
export {
|
|
43
|
+
c as INDIVIDUAL_NAV_ROUTES,
|
|
44
|
+
o as INDIVIDUAL_NAV_ROUTES_PROD,
|
|
45
|
+
e as INDIVIDUAL_NAV_ROUTES_QA
|
|
46
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { c as k } from "react-compiler-runtime";
|
|
4
|
+
import { ArrowRight as B } from "lucide-react";
|
|
5
|
+
import * as S from "react";
|
|
6
|
+
import { cn as w } from "../../../../lib/utils.js";
|
|
7
|
+
import { SectionItems as _, NavItemRoot as j } from "./navigation-menu-internal.js";
|
|
8
|
+
import { DoctTypography as D } from "../../../ui/typography.js";
|
|
9
|
+
const I = {
|
|
10
|
+
highlighted: {
|
|
11
|
+
item: {
|
|
12
|
+
hover: "hover:bg-[#DDF3F7]",
|
|
13
|
+
active: "bg-[#DDF3F7]"
|
|
14
|
+
},
|
|
15
|
+
group: "bg-[#F0FAFC] rounded-[12px] border-none"
|
|
16
|
+
},
|
|
17
|
+
default: {
|
|
18
|
+
item: {
|
|
19
|
+
hover: "hover:bg-[#EBF8FA]",
|
|
20
|
+
active: "bg-[#EBF8FA]"
|
|
21
|
+
},
|
|
22
|
+
group: void 0
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function R(s) {
|
|
26
|
+
const e = k(26), {
|
|
27
|
+
variant: t,
|
|
28
|
+
item: n
|
|
29
|
+
} = s, {
|
|
30
|
+
icon: i,
|
|
31
|
+
label: r,
|
|
32
|
+
description: l,
|
|
33
|
+
active: a
|
|
34
|
+
} = n, c = !!(i && l), m = !i && "pl-4 pb-[5px] -mt-2", N = I[t], F = a && I[t].item.active;
|
|
35
|
+
let d;
|
|
36
|
+
e[0] !== m || e[1] !== N.item.hover || e[2] !== F ? (d = w("group flex w-full items-center rounded-[12px] pl-2 pr-[14px] py-1 text-left transition-colors pt-[6px]", m, N.item.hover, F), e[0] = m, e[1] = N.item.hover, e[2] = F, e[3] = d) : d = e[3];
|
|
37
|
+
let p;
|
|
38
|
+
e[4] !== i || e[5] !== c ? (p = i ? /* @__PURE__ */ o("div", { className: w("mr-1 flex shrink-0 items-center justify-center rounded-[999px]", c ? "h-11 w-11" : "h-8 w-8"), children: i }) : null, e[4] = i, e[5] = c, e[6] = p) : p = e[6];
|
|
39
|
+
let f;
|
|
40
|
+
e[7] !== r ? (f = /* @__PURE__ */ o(D, { variant: "textLabel2", weight: "semiBold", color: "#002830", className: "truncate leading-5 font-semibold text-primary", children: r }), e[7] = r, e[8] = f) : f = e[8];
|
|
41
|
+
let h;
|
|
42
|
+
e[9] !== l ? (h = l ? /* @__PURE__ */ o(D, { variant: "textLabel4", weight: "medium", color: "#70868B", className: "mt-0.5 line-clamp-2 leading-4 text-neutral-56", children: l }) : null, e[9] = l, e[10] = h) : h = e[10];
|
|
43
|
+
let x;
|
|
44
|
+
e[11] !== f || e[12] !== h ? (x = /* @__PURE__ */ b("div", { className: "flex-1 leading-none", children: [
|
|
45
|
+
f,
|
|
46
|
+
h
|
|
47
|
+
] }), e[11] = f, e[12] = h, e[13] = x) : x = e[13];
|
|
48
|
+
const A = a && "opacity-100";
|
|
49
|
+
let u;
|
|
50
|
+
e[14] !== A ? (u = w("h-4 w-4 shrink-0 text-primary opacity-0 transition-transform group-hover:translate-x-0.5 group-hover:opacity-100", A), e[14] = A, e[15] = u) : u = e[15];
|
|
51
|
+
let v;
|
|
52
|
+
e[16] !== u ? (v = /* @__PURE__ */ o(B, { className: u }), e[16] = u, e[17] = v) : v = e[17];
|
|
53
|
+
let g;
|
|
54
|
+
e[18] !== v || e[19] !== x ? (g = /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
55
|
+
x,
|
|
56
|
+
v
|
|
57
|
+
] }), e[18] = v, e[19] = x, e[20] = g) : g = e[20];
|
|
58
|
+
let y;
|
|
59
|
+
return e[21] !== n || e[22] !== g || e[23] !== d || e[24] !== p ? (y = /* @__PURE__ */ b(j, { item: n, className: d, children: [
|
|
60
|
+
p,
|
|
61
|
+
g
|
|
62
|
+
] }), e[21] = n, e[22] = g, e[23] = d, e[24] = p, e[25] = y) : y = e[25], y;
|
|
63
|
+
}
|
|
64
|
+
function E(s) {
|
|
65
|
+
const e = k(11), {
|
|
66
|
+
section: t,
|
|
67
|
+
groupVariant: n
|
|
68
|
+
} = s, i = t.variant ?? n ?? "default";
|
|
69
|
+
let r;
|
|
70
|
+
e[0] !== t.title ? (r = t.title && /* @__PURE__ */ o(D, { variant: "body3", weight: "semiBold", color: "#70868B", className: "px-5 pt-5 pb-4 text-[12px] font-semibold leading-4 text-primary/56 ", children: t.title }), e[0] = t.title, e[1] = r) : r = e[1];
|
|
71
|
+
let l;
|
|
72
|
+
e[2] !== t.hasSeparatorAfterIndex || e[3] !== i ? (l = (m, N) => /* @__PURE__ */ b(S.Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ o(R, { variant: i, item: m }),
|
|
74
|
+
t.hasSeparatorAfterIndex === N ? /* @__PURE__ */ o("div", { className: "my-2 h-px w-full bg-neutral-8" }) : null
|
|
75
|
+
] }, m.id), e[2] = t.hasSeparatorAfterIndex, e[3] = i, e[4] = l) : l = e[4];
|
|
76
|
+
let a;
|
|
77
|
+
e[5] !== t || e[6] !== l ? (a = /* @__PURE__ */ o("div", { className: "space-y-1 px-3 pb-4", children: /* @__PURE__ */ o(_, { section: t, renderItem: l }) }), e[5] = t, e[6] = l, e[7] = a) : a = e[7];
|
|
78
|
+
let c;
|
|
79
|
+
return e[8] !== r || e[9] !== a ? (c = /* @__PURE__ */ b("div", { className: "flex flex-col", children: [
|
|
80
|
+
r,
|
|
81
|
+
a
|
|
82
|
+
] }), e[8] = r, e[9] = a, e[10] = c) : c = e[10], c;
|
|
83
|
+
}
|
|
84
|
+
function Y(s) {
|
|
85
|
+
const e = k(9), {
|
|
86
|
+
groups: t,
|
|
87
|
+
className: n
|
|
88
|
+
} = s;
|
|
89
|
+
if (!t.length)
|
|
90
|
+
return null;
|
|
91
|
+
let i;
|
|
92
|
+
e[0] !== n ? (i = w("flex w-full items-stretch bg-white px-4 xl:justify-center pt-2 xl:px-0", "shadow-[0px_54px_24px_rgba(0,0,0,0.12)] backdrop-blur-[12px]", n), e[0] = n, e[1] = i) : i = e[1];
|
|
93
|
+
let r;
|
|
94
|
+
e[2] !== t ? (r = t.map(L), e[2] = t, e[3] = r) : r = e[3];
|
|
95
|
+
let l;
|
|
96
|
+
e[4] !== r ? (l = /* @__PURE__ */ o("div", { className: "flex w-full xl:max-w-6xl", children: r }), e[4] = r, e[5] = l) : l = e[5];
|
|
97
|
+
let a;
|
|
98
|
+
return e[6] !== i || e[7] !== l ? (a = /* @__PURE__ */ o("nav", { "aria-label": "Docthub navigation", className: i, children: l }), e[6] = i, e[7] = l, e[8] = a) : a = e[8], a;
|
|
99
|
+
}
|
|
100
|
+
function L(s, e) {
|
|
101
|
+
const t = s.variant === "highlighted";
|
|
102
|
+
return /* @__PURE__ */ b("div", { className: w("flex min-w-0 flex-1 flex-col border-l border-black/8", e === 0 && "border-l-0", t && I.highlighted.group), children: [
|
|
103
|
+
s.sections.map((n) => /* @__PURE__ */ o(E, { section: n, groupVariant: s.variant }, n.id)),
|
|
104
|
+
s.footer ? /* @__PURE__ */ o("div", { className: "mt-auto px-4 pb-4", children: s.footer }) : null
|
|
105
|
+
] }, s.id);
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
Y as IndividualDesktopMenu
|
|
109
|
+
};
|