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.
Files changed (81) hide show
  1. package/dist/components/overrides/ui/auto-complete.js +466 -0
  2. package/dist/components/overrides/ui/autocomplete-checkbox.js +491 -0
  3. package/dist/components/overrides/ui/chips/doct-chip.js +157 -0
  4. package/dist/components/overrides/ui/circular-progress.js +32 -0
  5. package/dist/components/overrides/ui/composed/address-form-section.js +67 -0
  6. package/dist/components/overrides/ui/composed/contact-form-section.js +56 -0
  7. package/dist/components/overrides/ui/composed/search-filter-section.js +132 -0
  8. package/dist/components/overrides/ui/composed/user-registration-section.js +77 -0
  9. package/dist/components/overrides/ui/currencyInput/currency-input.js +69 -0
  10. package/dist/components/overrides/ui/doct-animation-loader.js +13 -0
  11. package/dist/components/overrides/ui/expandable-card.js +115 -0
  12. package/dist/components/overrides/ui/footer/doct-footer.js +35 -0
  13. package/dist/components/overrides/ui/footer/footer-desktop.js +92 -0
  14. package/dist/components/overrides/ui/footer/footer-mobile.js +123 -0
  15. package/dist/components/overrides/ui/footer/footer-routes.js +87 -0
  16. package/dist/components/overrides/ui/footer/footer-shared.js +137 -0
  17. package/dist/components/overrides/ui/footer/presets.js +269 -0
  18. package/dist/components/overrides/ui/inputs/labeled-input.js +92 -0
  19. package/dist/components/overrides/ui/inputs/otp-input.js +101 -0
  20. package/dist/components/overrides/ui/inputs/password-input.js +77 -0
  21. package/dist/components/overrides/ui/inputs/phone-input.js +336 -0
  22. package/dist/components/overrides/ui/navigation-menu/doct-navigation-menu.js +22 -0
  23. package/dist/components/overrides/ui/navigation-menu/individual-nav-routes.js +46 -0
  24. package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-desktop.js +109 -0
  25. package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu-mobile.js +231 -0
  26. package/dist/components/overrides/ui/navigation-menu/individual-navigation-menu.js +44 -0
  27. package/dist/components/overrides/ui/navigation-menu/nav-env.js +64 -0
  28. package/dist/components/overrides/ui/navigation-menu/navigation-menu-adapter.js +55 -0
  29. package/dist/components/overrides/ui/navigation-menu/navigation-menu-internal.js +36 -0
  30. package/dist/components/overrides/ui/navigation-menu/organization-nav-routes.js +34 -0
  31. package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-desktop.js +109 -0
  32. package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu-mobile.js +231 -0
  33. package/dist/components/overrides/ui/navigation-menu/organization-navigation-menu.js +44 -0
  34. package/dist/components/overrides/ui/navigation-menu/presets.js +238 -0
  35. package/dist/components/overrides/ui/navigation-menu/types.js +6 -0
  36. package/dist/components/overrides/ui/pickers/date-picker-field.js +361 -0
  37. package/dist/components/overrides/ui/pickers/date-range-picker-field.js +288 -0
  38. package/dist/components/overrides/ui/pickers/day-picker-bounds.js +38 -0
  39. package/dist/components/overrides/ui/pickers/select-field.js +158 -0
  40. package/dist/components/overrides/ui/search/auto-complete.js +64 -0
  41. package/dist/components/overrides/ui/search/search-input.js +65 -0
  42. package/dist/components/overrides/ui/showcase/component-section.js +45 -0
  43. package/dist/components/ui/alert.js +94 -0
  44. package/dist/components/ui/avatar.js +69 -0
  45. package/dist/components/ui/badge.js +37 -0
  46. package/dist/components/ui/breadcrumb.js +117 -0
  47. package/dist/components/ui/button.js +223 -0
  48. package/dist/components/ui/calendar.js +100 -0
  49. package/dist/components/ui/checkbox.js +57 -0
  50. package/dist/components/ui/collapsible.js +25 -0
  51. package/dist/components/ui/command.js +132 -0
  52. package/dist/components/ui/dialog.js +230 -0
  53. package/dist/components/ui/drawer.js +119 -0
  54. package/dist/components/ui/dropdown-menu.js +216 -0
  55. package/dist/components/ui/input.js +48 -0
  56. package/dist/components/ui/label.js +22 -0
  57. package/dist/components/ui/popover.js +181 -0
  58. package/dist/components/ui/progress.js +91 -0
  59. package/dist/components/ui/radio-group.js +49 -0
  60. package/dist/components/ui/select.js +169 -0
  61. package/dist/components/ui/skeleton.js +91 -0
  62. package/dist/components/ui/spinner.js +32 -0
  63. package/dist/components/ui/tabs.js +68 -0
  64. package/dist/components/ui/textarea.js +73 -0
  65. package/dist/components/ui/timeline.js +177 -0
  66. package/dist/components/ui/toast.js +82 -0
  67. package/dist/components/ui/tooltip.js +91 -0
  68. package/dist/components/ui/typography.js +213 -0
  69. package/dist/hooks/use-exclusive-dropdown.js +53 -0
  70. package/dist/hooks/use-mobile.js +19 -0
  71. package/dist/hooks/useAutocompleteCheckbox.js +204 -0
  72. package/dist/index.js +187 -0
  73. package/dist/lib/dropdown-manager.js +17 -0
  74. package/dist/lib/get-floating-dropdown-position.js +32 -0
  75. package/dist/lib/get-scroll-parents.js +20 -0
  76. package/dist/lib/slot.js +40 -0
  77. package/dist/lib/utils.js +9 -0
  78. package/dist/src/components/overrides/ui/autocomplete-checkbox.d.ts +16 -1
  79. package/dist/style.css +1 -1
  80. package/dist/util/getInputClasses.js +19 -0
  81. package/package.json +5 -5
@@ -0,0 +1,231 @@
1
+ "use client";
2
+ import { jsxs as O, Fragment as E, jsx as r } from "react/jsx-runtime";
3
+ import { c as S } from "react-compiler-runtime";
4
+ import { Collapsible as A } from "@base-ui/react/collapsible";
5
+ import { ChevronDown as j, Minus as F } from "lucide-react";
6
+ import * as T from "react";
7
+ import { DoctButton as z } from "../../../ui/button.js";
8
+ import { DoctTypography as B } from "../../../ui/typography.js";
9
+ import { cn as N } from "../../../../lib/utils.js";
10
+ import { NavItemRoot as P } from "./navigation-menu-internal.js";
11
+ import { MOBILE_CATEGORY_INDIVIDUALS as M, MOBILE_CATEGORY_ORGANIZATIONS as D } from "./types.js";
12
+ function V(h) {
13
+ const e = S(21), {
14
+ item: t,
15
+ taglineLayout: l,
16
+ hasIconSibling: f,
17
+ categoryId: a
18
+ } = h, c = a === void 0 ? M : a, {
19
+ icon: n,
20
+ label: o,
21
+ description: i
22
+ } = t, d = l === "vertical", u = c === D, p = u && "py-1", b = !n && (u || f) && "pl-2", m = !u && !n && f && "pb-2 pt-1";
23
+ let s;
24
+ e[0] !== p || e[1] !== b || e[2] !== m ? (s = N("flex w-full items-center gap-1 rounded-xl text-left", p, b, m), e[0] = p, e[1] = b, e[2] = m, e[3] = s) : s = e[3];
25
+ let g;
26
+ e[4] !== n ? (g = n ? /* @__PURE__ */ r("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full", children: n }) : null, e[4] = n, e[5] = g) : g = e[5];
27
+ const k = d ? "flex-col items-start gap-0.5" : "flex-row gap-2.5";
28
+ let w;
29
+ e[6] !== k ? (w = N("flex min-w-0 flex-1 items-center", k), e[6] = k, e[7] = w) : w = e[7];
30
+ let x;
31
+ e[8] !== o ? (x = /* @__PURE__ */ r(B, { variant: "textLabel4", weight: "semiBold", color: "#002830", className: "truncate text-sm font-semibold text-primary", children: o }), e[8] = o, e[9] = x) : x = e[9];
32
+ let y;
33
+ e[10] !== i ? (y = i ? /* @__PURE__ */ r(B, { variant: "textLabel4", weight: "regular", color: "#8FA1A4", className: "text-[11px] font-medium leading-4 text-neutral-44", children: i }) : null, e[10] = i, e[11] = y) : y = e[11];
34
+ let v;
35
+ e[12] !== y || e[13] !== w || e[14] !== x ? (v = /* @__PURE__ */ O("div", { className: w, children: [
36
+ x,
37
+ y
38
+ ] }), e[12] = y, e[13] = w, e[14] = x, e[15] = v) : v = e[15];
39
+ let I;
40
+ return e[16] !== t || e[17] !== v || e[18] !== s || e[19] !== g ? (I = /* @__PURE__ */ O(P, { item: t, className: s, children: [
41
+ g,
42
+ v
43
+ ] }), e[16] = t, e[17] = v, e[18] = s, e[19] = g, e[20] = I) : I = e[20], I;
44
+ }
45
+ function Y(h) {
46
+ const e = [];
47
+ for (const t of h)
48
+ if (t.title.trim().length > 0)
49
+ e.push({
50
+ id: t.id,
51
+ title: t.title,
52
+ items: [...t.items],
53
+ hasSeparatorAfterIndex: t.hasSeparatorAfterIndex,
54
+ footer: t.footer
55
+ });
56
+ else if (e.length > 0) {
57
+ const f = e[e.length - 1];
58
+ f.items.push(...t.items), t.hasSeparatorAfterIndex !== void 0 && (f.hasSeparatorAfterIndex = f.items.length - t.items.length + t.hasSeparatorAfterIndex);
59
+ }
60
+ return e;
61
+ }
62
+ function $(h) {
63
+ const e = S(35), {
64
+ section: t,
65
+ taglineLayout: l,
66
+ categoryId: f
67
+ } = h, a = f === void 0 ? M : f, [c, n] = T.useState(!0), o = a === D;
68
+ let i;
69
+ e[0] !== t.items ? (i = t.items.some(Z), e[0] = t.items, e[1] = i) : i = e[1];
70
+ const d = i, u = o ? "py-1.5" : "py-0";
71
+ let p;
72
+ e[2] !== u ? (p = N("flex flex-1 items-center justify-between px-0 text-left hover:!bg-transparent", u), e[2] = u, e[3] = p) : p = e[3];
73
+ let b;
74
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (b = () => n(U), e[4] = b) : b = e[4];
75
+ let m;
76
+ e[5] !== t.title ? (m = /* @__PURE__ */ r(B, { variant: "textLabel4", weight: "semiBold", color: "#70868B", children: t.title }), e[5] = t.title, e[6] = m) : m = e[6];
77
+ let s;
78
+ e[7] !== c ? (s = /* @__PURE__ */ r("span", { className: "ml-2 inline-flex h-5 w-5 items-center justify-center", children: c ? /* @__PURE__ */ r(F, { className: "h-3 w-3 text-neutral-56" }) : /* @__PURE__ */ r(j, { className: "h-3 w-3 text-neutral-56" }) }), e[7] = c, e[8] = s) : s = e[8];
79
+ let g;
80
+ e[9] !== p || e[10] !== m || e[11] !== s ? (g = /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-0.5 py-2", children: /* @__PURE__ */ O(z, { type: "button", variant: "ghost", size: "small", className: p, onClick: b, children: [
81
+ m,
82
+ s
83
+ ] }) }), e[9] = p, e[10] = m, e[11] = s, e[12] = g) : g = e[12];
84
+ const k = o ? "space-y-3 pb-3" : "space-y-2 pb-2", w = t.footer && (o ? "-mx-1 px-1" : "-mx-4 px-2");
85
+ let x;
86
+ e[13] !== w || e[14] !== k ? (x = N(k, w, "overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down"), e[13] = w, e[14] = k, e[15] = x) : x = e[15];
87
+ let y;
88
+ if (e[16] !== a || e[17] !== d || e[18] !== t.items || e[19] !== l) {
89
+ let C;
90
+ e[21] !== a || e[22] !== d || e[23] !== l ? (C = (R) => /* @__PURE__ */ r(V, { item: R, taglineLayout: l, hasIconSibling: d, categoryId: a }, R.id), e[21] = a, e[22] = d, e[23] = l, e[24] = C) : C = e[24], y = t.items.map(C), e[16] = a, e[17] = d, e[18] = t.items, e[19] = l, e[20] = y;
91
+ } else
92
+ y = e[20];
93
+ let v;
94
+ e[25] !== t.footer ? (v = t.footer ? /* @__PURE__ */ r("div", { className: "pt-2", children: t.footer }) : null, e[25] = t.footer, e[26] = v) : v = e[26];
95
+ let I;
96
+ e[27] !== x || e[28] !== y || e[29] !== v ? (I = /* @__PURE__ */ O(A.Panel, { className: x, children: [
97
+ y,
98
+ v
99
+ ] }), e[27] = x, e[28] = y, e[29] = v, e[30] = I) : I = e[30];
100
+ let _;
101
+ return e[31] !== c || e[32] !== I || e[33] !== g ? (_ = /* @__PURE__ */ O(A.Root, { open: c, onOpenChange: n, className: "w-full", children: [
102
+ g,
103
+ I
104
+ ] }), e[31] = c, e[32] = I, e[33] = g, e[34] = _) : _ = e[34], _;
105
+ }
106
+ function U(h) {
107
+ return !h;
108
+ }
109
+ function Z(h) {
110
+ return h.icon;
111
+ }
112
+ function G(h) {
113
+ const e = S(19), {
114
+ group: t,
115
+ taglineLayout: l,
116
+ className: f,
117
+ categoryId: a
118
+ } = h, c = a === void 0 ? M : a;
119
+ let n, o;
120
+ if (e[0] !== c || e[1] !== f || e[2] !== t.sections || e[3] !== l) {
121
+ const u = Y(t.sections), p = c === D, b = p ? "space-y-0" : "space-y-4";
122
+ e[6] !== f || e[7] !== b ? (n = N(b, f), e[6] = f, e[7] = b, e[8] = n) : n = e[8];
123
+ let m;
124
+ e[9] !== c || e[10] !== p || e[11] !== l ? (m = (s, g) => p ? /* @__PURE__ */ r("div", { className: N(g > 0 && "border-t border-black/8 pt-2"), children: /* @__PURE__ */ r($, { section: s, taglineLayout: l, categoryId: c }) }, s.id) : /* @__PURE__ */ r($, { section: s, taglineLayout: l, categoryId: c }, s.id), e[9] = c, e[10] = p, e[11] = l, e[12] = m) : m = e[12], o = u.map(m), e[0] = c, e[1] = f, e[2] = t.sections, e[3] = l, e[4] = n, e[5] = o;
125
+ } else
126
+ n = e[4], o = e[5];
127
+ let i;
128
+ e[13] !== t.footer ? (i = t.footer ? /* @__PURE__ */ r("div", { className: "pt-2", children: t.footer }) : null, e[13] = t.footer, e[14] = i) : i = e[14];
129
+ let d;
130
+ return e[15] !== n || e[16] !== o || e[17] !== i ? (d = /* @__PURE__ */ O("div", { className: n, children: [
131
+ o,
132
+ i
133
+ ] }), e[15] = n, e[16] = o, e[17] = i, e[18] = d) : d = e[18], d;
134
+ }
135
+ function q(h) {
136
+ const e = S(19), {
137
+ group: t,
138
+ categoryId: l
139
+ } = h, f = t.taglineLayout ?? "horizontal", [a, c] = T.useState(t.defaultOpen ?? !1);
140
+ let n;
141
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = () => c(H), e[0] = n) : n = e[0];
142
+ let o;
143
+ e[1] !== t.title ? (o = /* @__PURE__ */ r(B, { variant: "textLabel4", weight: "semiBold", color: "#70868B", children: t.title }), e[1] = t.title, e[2] = o) : o = e[2];
144
+ const i = a ? "rotate-180" : "rotate-0";
145
+ let d;
146
+ e[3] !== i ? (d = N("h-4 w-4 text-neutral-56 transition-transform", i), e[3] = i, e[4] = d) : d = e[4];
147
+ let u;
148
+ e[5] !== d ? (u = /* @__PURE__ */ r(j, { className: d }), e[5] = d, e[6] = u) : u = e[6];
149
+ let p;
150
+ e[7] !== o || e[8] !== u ? (p = /* @__PURE__ */ O("button", { type: "button", className: "flex h-14 w-full items-center justify-between bg-white px-4", onClick: n, children: [
151
+ o,
152
+ u
153
+ ] }), e[7] = o, e[8] = u, e[9] = p) : p = e[9];
154
+ let b;
155
+ e[10] === Symbol.for("react.memo_cache_sentinel") ? (b = N("border-t border-black/8 bg-white px-4 pb-4 pt-2", "overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down"), e[10] = b) : b = e[10];
156
+ let m;
157
+ e[11] !== l || e[12] !== t || e[13] !== f ? (m = /* @__PURE__ */ r(A.Panel, { className: b, children: /* @__PURE__ */ r(G, { group: t, taglineLayout: f, categoryId: l }) }), e[11] = l, e[12] = t, e[13] = f, e[14] = m) : m = e[14];
158
+ let s;
159
+ return e[15] !== a || e[16] !== p || e[17] !== m ? (s = /* @__PURE__ */ O(A.Root, { open: a, onOpenChange: c, className: "w-full border-t border-black/8", children: [
160
+ p,
161
+ m
162
+ ] }), e[15] = a, e[16] = p, e[17] = m, e[18] = s) : s = e[18], s;
163
+ }
164
+ function H(h) {
165
+ return !h;
166
+ }
167
+ function L(h) {
168
+ const e = S(11), {
169
+ category: t,
170
+ isOpen: l,
171
+ onClick: f
172
+ } = h;
173
+ let a;
174
+ e[0] !== t.title ? (a = /* @__PURE__ */ r("p", { className: "text-sm font-semibold text-primary", children: t.title }), e[0] = t.title, e[1] = a) : a = e[1];
175
+ const c = l ? "rotate-180" : "";
176
+ let n;
177
+ e[2] !== c ? (n = N("h-4 w-4 text-neutral-56 transition-transform", c), e[2] = c, e[3] = n) : n = e[3];
178
+ let o;
179
+ e[4] !== n ? (o = /* @__PURE__ */ r(j, { className: n }), e[4] = n, e[5] = o) : o = e[5];
180
+ let i;
181
+ return e[6] !== l || e[7] !== f || e[8] !== a || e[9] !== o ? (i = /* @__PURE__ */ O("button", { type: "button", className: "flex h-14 w-full shrink-0 items-center justify-between border-t border-black/8 bg-white px-4 first:border-t-0", onClick: f, "aria-expanded": l, children: [
182
+ a,
183
+ o
184
+ ] }), e[6] = l, e[7] = f, e[8] = a, e[9] = o, e[10] = i) : i = e[10], i;
185
+ }
186
+ function ie(h) {
187
+ const e = S(19), {
188
+ categories: t,
189
+ groups: l,
190
+ className: f
191
+ } = h, [a, c] = T.useState(null);
192
+ let n, o, i;
193
+ if (e[0] !== t || e[1] !== f || e[2] !== (l == null ? void 0 : l.length) || e[3] !== a) {
194
+ i = Symbol.for("react.early_return_sentinel");
195
+ e: {
196
+ const p = N("flex w-full flex-col border-y border-black/8 bg-white", "shadow-[0px_54px_24px_rgba(0,0,0,0.12)] backdrop-blur-[12px]", "max-h-[90vh]", "[&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent", "[&::-webkit-scrollbar-thumb]:bg-neutral-24 [&::-webkit-scrollbar-thumb]:rounded-full", "scrollbar-thin scrollbar-thumb-neutral-24 scrollbar-track-transparent", f);
197
+ if (t != null && t.length) {
198
+ const b = a, m = b !== null && b < t.length, s = m ? t[b] : null, g = b === 0, k = b === 1;
199
+ let w;
200
+ e[7] !== t || e[8] !== g || e[9] !== k || e[10] !== m || e[11] !== s ? (w = m && s ? /* @__PURE__ */ O(E, { children: [
201
+ /* @__PURE__ */ O("div", { className: "flex shrink-0 flex-col", children: [
202
+ /* @__PURE__ */ r(L, { category: t[0], isOpen: g, onClick: () => c(g ? null : 0) }),
203
+ k && t[1] && /* @__PURE__ */ r(L, { category: t[1], isOpen: !0, onClick: () => c(null) })
204
+ ] }),
205
+ /* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain border-t border-black/8 bg-white", children: /* @__PURE__ */ r("div", { className: "space-y-2 px-4 pb-4 pt-2", children: s.groups.map((x, y) => /* @__PURE__ */ r(G, { group: x, taglineLayout: x.taglineLayout ?? "horizontal", categoryId: s.id, className: N(y > 0 && !x.noTopBorder && "border-t border-black/8 pt-2") }, x.id)) }) }),
206
+ g && t[1] && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-black/8", children: /* @__PURE__ */ r(L, { category: t[1], isOpen: !1, onClick: () => c(1) }) })
207
+ ] }) : /* @__PURE__ */ r("div", { className: "overflow-y-auto", children: t.map((x, y) => /* @__PURE__ */ r(L, { category: x, isOpen: !1, onClick: () => c(y) }, x.id)) }), e[7] = t, e[8] = g, e[9] = k, e[10] = m, e[11] = s, e[12] = w) : w = e[12], i = /* @__PURE__ */ r("nav", { "aria-label": "Docthub navigation", className: N(p, "flex overflow-hidden"), children: w });
208
+ break e;
209
+ }
210
+ if (!(l != null && l.length)) {
211
+ i = null;
212
+ break e;
213
+ }
214
+ n = "Docthub navigation", o = N(p, "overflow-y-auto");
215
+ }
216
+ e[0] = t, e[1] = f, e[2] = l == null ? void 0 : l.length, e[3] = a, e[4] = n, e[5] = o, e[6] = i;
217
+ } else
218
+ n = e[4], o = e[5], i = e[6];
219
+ if (i !== Symbol.for("react.early_return_sentinel"))
220
+ return i;
221
+ let d;
222
+ e[13] !== l ? (d = l.map(J), e[13] = l, e[14] = d) : d = e[14];
223
+ let u;
224
+ return e[15] !== n || e[16] !== o || e[17] !== d ? (u = /* @__PURE__ */ r("nav", { "aria-label": n, className: o, children: d }), e[15] = n, e[16] = o, e[17] = d, e[18] = u) : u = e[18], u;
225
+ }
226
+ function J(h) {
227
+ return /* @__PURE__ */ r(q, { group: h, categoryId: M }, h.id);
228
+ }
229
+ export {
230
+ ie as IndividualMobileMenu
231
+ };
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as c } from "react/jsx-runtime";
3
+ import { c as N } from "react-compiler-runtime";
4
+ import { useIsMobile as b } from "../../../../hooks/use-mobile.js";
5
+ import { cn as I } from "../../../../lib/utils.js";
6
+ import { IndividualDesktopMenu as G } from "./individual-navigation-menu-desktop.js";
7
+ import { IndividualMobileMenu as p } from "./individual-navigation-menu-mobile.js";
8
+ import { getMobileCategoriesFromPresets as h } from "./navigation-menu-adapter.js";
9
+ import { individualNavigationGroups as k } from "./presets.js";
10
+ function P(d) {
11
+ const e = N(15), {
12
+ groups: t,
13
+ className: f,
14
+ isMobileOverride: g
15
+ } = d, v = b(), M = g ?? v;
16
+ let s;
17
+ e[0] !== f ? (s = I("w-full", f), e[0] = f, e[1] = s) : s = e[1];
18
+ const o = s;
19
+ if (M) {
20
+ let n;
21
+ e[2] !== t ? (n = t ? void 0 : h(), e[2] = t, e[3] = n) : n = e[3];
22
+ const m = n;
23
+ let u;
24
+ e[4] !== t ? (u = t ?? [], e[4] = t, e[5] = u) : u = e[5];
25
+ const a = u;
26
+ if (m) {
27
+ let i;
28
+ return e[6] !== m || e[7] !== o ? (i = /* @__PURE__ */ c(p, { categories: m, className: o }), e[6] = m, e[7] = o, e[8] = i) : i = e[8], i;
29
+ }
30
+ if (a.length) {
31
+ let i;
32
+ return e[9] !== o || e[10] !== a ? (i = /* @__PURE__ */ c(p, { groups: a, className: o }), e[9] = o, e[10] = a, e[11] = i) : i = e[11], i;
33
+ }
34
+ return null;
35
+ }
36
+ const r = t ?? k;
37
+ if (!r.length)
38
+ return null;
39
+ let l;
40
+ return e[12] !== o || e[13] !== r ? (l = /* @__PURE__ */ c(G, { groups: r, className: o }), e[12] = o, e[13] = r, e[14] = l) : l = e[14], l;
41
+ }
42
+ export {
43
+ P as IndividualNavigationMenu
44
+ };
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ const c = ["localhost", "127.0.0.1", "[::1]"];
3
+ function f(n) {
4
+ return c.some((o) => n === o);
5
+ }
6
+ function d(n) {
7
+ return n.endsWith(".com");
8
+ }
9
+ function p(n) {
10
+ return n.endsWith(".in");
11
+ }
12
+ function u(n) {
13
+ const o = n.toLowerCase();
14
+ return f(o) ? "qa" : d(o) ? "production" : p(o) ? "qa" : null;
15
+ }
16
+ function a() {
17
+ var e, r;
18
+ const n = typeof import.meta < "u" ? import.meta : void 0, o = (e = n == null ? void 0 : n.env) == null ? void 0 : e.VITE_NAV_ENV;
19
+ if (o === "production" || o === "prod") return "production";
20
+ if (o === "qa" || o === "dev") return "qa";
21
+ if (typeof process < "u" && ((r = process.env) != null && r.NEXT_PUBLIC_NAV_ENV)) {
22
+ const t = process.env.NEXT_PUBLIC_NAV_ENV;
23
+ if (t === "production" || t === "prod") return "production";
24
+ if (t === "qa" || t === "dev") return "qa";
25
+ }
26
+ return null;
27
+ }
28
+ function l() {
29
+ var n;
30
+ if (typeof process > "u" || !((n = process.env) != null && n.NEXT_PUBLIC_BASE_URL)) return null;
31
+ try {
32
+ const o = new URL(process.env.NEXT_PUBLIC_BASE_URL).hostname;
33
+ return u(o);
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+ function s() {
39
+ var o, e, r;
40
+ const n = a();
41
+ if (n !== null) return n;
42
+ if (typeof window < "u" && ((o = window.location) != null && o.hostname)) {
43
+ const t = u(window.location.hostname);
44
+ if (t !== null) return t;
45
+ }
46
+ if (typeof window > "u") {
47
+ const t = l();
48
+ if (t !== null) return t;
49
+ const i = typeof import.meta < "u" ? import.meta : void 0;
50
+ if ((e = i == null ? void 0 : i.env) != null && e.PROD || typeof process < "u" && ((r = process.env) == null ? void 0 : r.NODE_ENV) === "production") return "production";
51
+ }
52
+ return "qa";
53
+ }
54
+ function v() {
55
+ return s() === "production";
56
+ }
57
+ function E() {
58
+ return s() === "qa";
59
+ }
60
+ export {
61
+ v as isProdNav,
62
+ E as isQaNav,
63
+ s as resolveNavEnv
64
+ };
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
3
+ import { DoctButton as r } from "../../../ui/button.js";
4
+ import { individualNavigationGroups as m, organizationNavigationGroups as f } from "./presets.js";
5
+ import { MOBILE_CATEGORY_INDIVIDUALS as g, MOBILE_CATEGORY_ORGANIZATIONS as x } from "./types.js";
6
+ function N() {
7
+ const n = m.filter((t) => t.id !== "about-docthub"), o = {
8
+ id: g,
9
+ title: "For Individuals",
10
+ groups: n.map((t) => ({
11
+ ...t,
12
+ taglineLayout: "horizontal"
13
+ }))
14
+ }, a = /* @__PURE__ */ new Set([
15
+ "enterprise-access-links",
16
+ "enterprise-login",
17
+ "create-enterprise-account"
18
+ // contact-support hidden for now
19
+ ]), l = /* @__PURE__ */ s("div", { className: "rounded-2xl bg-[#F0F6FF] px-3 py-3 -mx-2 -mb-3", children: [
20
+ /* @__PURE__ */ i("p", { className: "text-[11px] font-semibold leading-4 text-[#69828B]", children: "Enterprise Access" }),
21
+ /* @__PURE__ */ s("div", { className: "mt-2", children: [
22
+ /* @__PURE__ */ i(r, { type: "button", variant: "ghost", size: "small", fullWidth: !0, className: "justify-start text-[12px] font-semibold leading-[18px] text-primary hover:bg-transparent", children: "Enterprise Login" }),
23
+ /* @__PURE__ */ i(r, { type: "button", variant: "ghost", size: "small", fullWidth: !0, className: "justify-start text-[12px] font-semibold leading-[18px] text-primary hover:bg-transparent", children: "Create Enterprise/ Business Account" })
24
+ ] })
25
+ ] }), c = f.filter((t) => t.id !== "enterprise-access").map((t) => {
26
+ if (t.id !== "for-organizations-business-solutions")
27
+ return {
28
+ ...t,
29
+ taglineLayout: "vertical"
30
+ };
31
+ const u = t.sections.map((e) => {
32
+ if (e.id !== "business-solutions")
33
+ return e;
34
+ const d = e.items.filter((p) => !a.has(p.id));
35
+ return {
36
+ ...e,
37
+ items: d,
38
+ footer: l
39
+ };
40
+ });
41
+ return {
42
+ ...t,
43
+ sections: u,
44
+ taglineLayout: "vertical"
45
+ };
46
+ });
47
+ return [o, {
48
+ id: x,
49
+ title: "For Organizations",
50
+ groups: c
51
+ }];
52
+ }
53
+ export {
54
+ N as getMobileCategoriesFromPresets
55
+ };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { jsx as u, Fragment as p } from "react/jsx-runtime";
3
+ import { c as a } from "react-compiler-runtime";
4
+ import { cn as b } from "../../../../lib/utils.js";
5
+ function h(f) {
6
+ const e = a(9), {
7
+ item: c,
8
+ className: o,
9
+ children: t
10
+ } = f, {
11
+ href: n,
12
+ onClick: i
13
+ } = c, l = n ? "a" : "button", r = n ? void 0 : "button";
14
+ let s;
15
+ e[0] !== o ? (s = b("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brandBlue", o), e[0] = o, e[1] = s) : s = e[1];
16
+ let m;
17
+ return e[2] !== l || e[3] !== t || e[4] !== n || e[5] !== i || e[6] !== r || e[7] !== s ? (m = /* @__PURE__ */ u(l, { type: r, href: n, onClick: i, className: s, children: t }), e[2] = l, e[3] = t, e[4] = n, e[5] = i, e[6] = r, e[7] = s, e[8] = m) : m = e[8], m;
18
+ }
19
+ function I(f) {
20
+ const e = a(7), {
21
+ section: c,
22
+ renderItem: o
23
+ } = f;
24
+ let t;
25
+ if (e[0] !== o || e[1] !== c.items) {
26
+ let i;
27
+ e[3] !== o ? (i = (l, r) => o(l, r), e[3] = o, e[4] = i) : i = e[4], t = c.items.map(i), e[0] = o, e[1] = c.items, e[2] = t;
28
+ } else
29
+ t = e[2];
30
+ let n;
31
+ return e[5] !== t ? (n = /* @__PURE__ */ u(p, { children: t }), e[5] = t, e[6] = n) : n = e[6], n;
32
+ }
33
+ export {
34
+ h as NavItemRoot,
35
+ I as SectionItems
36
+ };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { resolveNavEnv as t } from "./nav-env.js";
3
+ const e = {
4
+ "recruiter-solution": "https://dev.dochub.in/recruiter",
5
+ "institute-solution": "https://dev.dochub.in/institute",
6
+ "events-organizer-solution": "https://dev.dochub.in/event-organizer",
7
+ "membership-management": "https://dev.dochub.in/membership-management",
8
+ "qr-check-in-app": "https://dev.dochub.in/qr-check-in-app",
9
+ "what-is-enterprise": "https://dev.dochub.in/enterprise-solutions",
10
+ "request-demo": "https://dev.dochub.in/contact-us",
11
+ "contact-sales": "https://dev.dochub.in/contact-us",
12
+ // Due to removing localization, `/en` is omitted from enterprise login/register URLs (QA + PROD).
13
+ "enterprise-login": "https://enterprise.ibns.in/login",
14
+ "create-enterprise-account": "https://enterprise.ibns.in/register",
15
+ "contact-support": "https://dev.dochub.in/contact-us"
16
+ }, o = {
17
+ "recruiter-solution": "https://www.docthub.com/recruiter",
18
+ "institute-solution": "https://www.docthub.com/institute",
19
+ "events-organizer-solution": "https://www.docthub.com/event-organizer",
20
+ "membership-management": "https://www.docthub.com/membership-management",
21
+ "qr-check-in-app": "https://www.docthub.com/qr-check-in-app",
22
+ "what-is-enterprise": "https://www.docthub.com/enterprise-solutions",
23
+ "request-demo": "https://www.docthub.com/contact-us",
24
+ "contact-sales": "https://www.docthub.com/contact-us",
25
+ // Due to removing localization, `/en` is omitted from enterprise login/register URLs (QA + PROD).
26
+ "enterprise-login": "https://enterprise.docthub.com/login",
27
+ "create-enterprise-account": "https://enterprise.docthub.com/register",
28
+ "contact-support": "https://www.docthub.com/contact-us"
29
+ }, s = t() === "production" ? o : e;
30
+ export {
31
+ s as ORGANIZATION_NAV_ROUTES,
32
+ o as ORGANIZATION_NAV_ROUTES_PROD,
33
+ e as ORGANIZATION_NAV_ROUTES_QA
34
+ };
@@ -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 N } 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-[#DEF0FA]"
14
+ },
15
+ group: "bg-[#F0F6FF] 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 E(s) {
26
+ const e = k(26), {
27
+ variant: t,
28
+ item: a
29
+ } = s, {
30
+ icon: i,
31
+ label: r,
32
+ description: l,
33
+ active: n
34
+ } = a, c = !!(i && l), d = !i && "pl-4 pb-[6px]", w = I[t], F = n && I[t].item.active;
35
+ let m;
36
+ e[0] !== d || e[1] !== w.item.hover || e[2] !== F ? (m = N("group flex w-full items-center rounded-[12px] pl-2 pr-[14px] py-1 text-left transition-colors pt-[6px]", d, w.item.hover, F), e[0] = d, e[1] = w.item.hover, e[2] = F, e[3] = m) : m = e[3];
37
+ let p;
38
+ e[4] !== i || e[5] !== c ? (p = i ? /* @__PURE__ */ o("div", { className: N("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 font-semibold leading-5 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 = n && "opacity-100";
49
+ let u;
50
+ e[14] !== A ? (u = N("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 g;
52
+ e[16] !== u ? (g = /* @__PURE__ */ o(B, { className: u }), e[16] = u, e[17] = g) : g = e[17];
53
+ let v;
54
+ e[18] !== g || e[19] !== x ? (v = /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
55
+ x,
56
+ g
57
+ ] }), e[18] = g, e[19] = x, e[20] = v) : v = e[20];
58
+ let y;
59
+ return e[21] !== a || e[22] !== v || e[23] !== m || e[24] !== p ? (y = /* @__PURE__ */ b(j, { item: a, className: m, children: [
60
+ p,
61
+ v
62
+ ] }), e[21] = a, e[22] = v, e[23] = m, e[24] = p, e[25] = y) : y = e[25], y;
63
+ }
64
+ function R(s) {
65
+ const e = k(12), {
66
+ section: t,
67
+ groupVariant: a
68
+ } = s, i = t.variant ?? a ?? "default";
69
+ let r;
70
+ e[0] !== t.noPadding || e[1] !== t.title ? (r = t.title && /* @__PURE__ */ o(D, { variant: "body3", weight: "semiBold", color: "#70868B", className: N(t.noPadding ? "pt-1 pb-2" : "pt-5 pb-3", "px-6 text-[12px] font-semibold leading-4 text-primary/56"), children: t.title }), e[0] = t.noPadding, e[1] = t.title, e[2] = r) : r = e[2];
71
+ let l;
72
+ e[3] !== t.hasSeparatorAfterIndex || e[4] !== i ? (l = (d, w) => /* @__PURE__ */ b(S.Fragment, { children: [
73
+ /* @__PURE__ */ o(E, { variant: i, item: d }),
74
+ t.hasSeparatorAfterIndex === w ? /* @__PURE__ */ o("div", { className: "my-2 !mt-3 h-px w-full bg-neutral-8" }) : null
75
+ ] }, d.id), e[3] = t.hasSeparatorAfterIndex, e[4] = i, e[5] = l) : l = e[5];
76
+ let n;
77
+ e[6] !== t || e[7] !== l ? (n = /* @__PURE__ */ o("div", { className: "space-y-1 px-3 pb-4", children: /* @__PURE__ */ o(_, { section: t, renderItem: l }) }), e[6] = t, e[7] = l, e[8] = n) : n = e[8];
78
+ let c;
79
+ return e[9] !== r || e[10] !== n ? (c = /* @__PURE__ */ b("div", { className: "flex flex-col", children: [
80
+ r,
81
+ n
82
+ ] }), e[9] = r, e[10] = n, e[11] = c) : c = e[11], c;
83
+ }
84
+ function M(s) {
85
+ const e = k(9), {
86
+ groups: t,
87
+ className: a
88
+ } = s;
89
+ if (!t.length)
90
+ return null;
91
+ let i;
92
+ e[0] !== a ? (i = N("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]", a), e[0] = a, e[1] = i) : i = e[1];
93
+ let r;
94
+ e[2] !== t ? (r = t.map($), 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 n;
98
+ return e[6] !== i || e[7] !== l ? (n = /* @__PURE__ */ o("nav", { "aria-label": "Docthub navigation", className: i, children: l }), e[6] = i, e[7] = l, e[8] = n) : n = e[8], n;
99
+ }
100
+ function $(s, e) {
101
+ const t = s.variant === "highlighted";
102
+ return /* @__PURE__ */ b("div", { className: N("flex min-w-0 flex-1 flex-col border-l border-black/8", e === 0 && "border-l-0", t && `${I.highlighted.group} rounded-[12px] border-none`), children: [
103
+ s.sections.map((a) => /* @__PURE__ */ o(R, { section: a, groupVariant: s.variant }, a.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
+ M as OrganizationDesktopMenu
109
+ };