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,38 @@
1
+ "use client";
2
+ function f(t) {
3
+ return new Date(t.getFullYear(), t.getMonth(), 1);
4
+ }
5
+ function i(t) {
6
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate());
7
+ }
8
+ function u(t) {
9
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59, 999);
10
+ }
11
+ function o(t, n, r) {
12
+ return (!n || t >= i(n)) && (!r || t <= u(r));
13
+ }
14
+ function c(t, n, r) {
15
+ return t != null && t.from ? !(!o(t.from, n, r) || t.to && !o(t.to, n, r)) : !0;
16
+ }
17
+ function l(t, n) {
18
+ const r = [];
19
+ return t && r.push({
20
+ before: i(t)
21
+ }), n && r.push({
22
+ after: u(n)
23
+ }), r;
24
+ }
25
+ function s(t, n) {
26
+ const r = n === void 0 ? [] : Array.isArray(n) ? n : [n], e = [...t, ...r];
27
+ if (e.length !== 0)
28
+ return e.length === 1 ? e[0] : e;
29
+ }
30
+ export {
31
+ f as calendarMonthAnchor,
32
+ u as endOfDayLocal,
33
+ o as isDateWithinMinMaxLocalDay,
34
+ c as isRangeWithinMinMaxLocalDay,
35
+ s as mergeDisabledMatchers,
36
+ l as minMaxDisabledMatchers,
37
+ i as startOfDayLocal
38
+ };
@@ -0,0 +1,158 @@
1
+ "use client";
2
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
3
+ import { c as Oe } from "react-compiler-runtime";
4
+ import { X as Te } from "lucide-react";
5
+ import { useId as ue, useState as xe } from "react";
6
+ import { Label as $e } from "../../../ui/label.js";
7
+ import { SelectItem as Ne, SelectGroup as je, SelectLabel as qe, SelectValue as ze, SelectTrigger as Fe, SelectContent as Me, Select as Ae } from "../../../ui/select.js";
8
+ import { useExclusiveDropdown as Ge } from "../../../../hooks/use-exclusive-dropdown.js";
9
+ import { cn as X } from "../../../../lib/utils.js";
10
+ function lt(t) {
11
+ var be;
12
+ const e = Oe(84), {
13
+ label: f,
14
+ placeholder: fe,
15
+ options: p,
16
+ value: pe,
17
+ onValueChange: a,
18
+ onChange: i,
19
+ leadingIcon: Ie,
20
+ trailingIcon: Se,
21
+ startIcon: De,
22
+ endIcon: we,
23
+ helperText: j,
24
+ error: n,
25
+ required: q,
26
+ disabled: s,
27
+ loading: me,
28
+ clearable: ve,
29
+ className: B,
30
+ variant: ge,
31
+ selectClassName: H
32
+ } = t, Pe = fe === void 0 ? "Select option" : fe, J = me === void 0 ? !1 : me, Q = ve === void 0 ? !1 : ve, ke = ge === void 0 ? "default" : ge, m = ue(), z = ue(), v = ue(), {
33
+ instanceKey: Le,
34
+ containerProps: U,
35
+ onOpenChange: Y
36
+ } = Ge(), c = De || Ie, F = we || Se, d = pe !== void 0, [Ke, he] = xe(void 0), [Ce, Ee] = xe(0), o = d ? pe : Ke;
37
+ let Z;
38
+ e: {
39
+ if (!o) {
40
+ Z = void 0;
41
+ break e;
42
+ }
43
+ let l;
44
+ e[0] !== p || e[1] !== o ? (l = (be = p.find((W) => W.value === o)) == null ? void 0 : be.label, e[0] = p, e[1] = o, e[2] = l) : l = e[2], Z = l;
45
+ }
46
+ const _ = Z;
47
+ let M;
48
+ e[3] !== d || e[4] !== i || e[5] !== a ? (M = (l) => {
49
+ d || he(l), a == null || a(l), i == null || i(l);
50
+ }, e[3] = d, e[4] = i, e[5] = a, e[6] = M) : M = e[6];
51
+ const ee = M;
52
+ let A;
53
+ e[7] !== d || e[8] !== i || e[9] !== a ? (A = () => {
54
+ d || he(void 0), Ee(He), a == null || a(""), i == null || i("");
55
+ }, e[7] = d, e[8] = i, e[9] = a, e[10] = A) : A = e[10];
56
+ const G = A;
57
+ let R;
58
+ if (e[11] !== p) {
59
+ const l = /* @__PURE__ */ new Map(), W = [];
60
+ p.forEach(($) => {
61
+ var ye;
62
+ $.group ? (l.has($.group) || l.set($.group, []), (ye = l.get($.group)) == null || ye.push($)) : W.push($);
63
+ }), R = {
64
+ groups: l,
65
+ ungrouped: W
66
+ }, e[11] = p, e[12] = R;
67
+ } else
68
+ R = e[12];
69
+ const g = R;
70
+ let h;
71
+ e[13] !== B ? (h = X("space-y-1", B), e[13] = B, e[14] = h) : h = e[14];
72
+ let b;
73
+ e[15] !== s || e[16] !== f || e[17] !== v || e[18] !== q || e[19] !== m ? (b = f && /* @__PURE__ */ u($e, { id: v, htmlFor: m, className: X("text-sm font-medium", s ? "text-gray-400" : "text-gray-700"), children: [
74
+ f,
75
+ q && /* @__PURE__ */ r("span", { className: "text-destructive ml-1", "aria-hidden": "true", children: "*" })
76
+ ] }), e[15] = s, e[16] = f, e[17] = v, e[18] = q, e[19] = m, e[20] = b) : b = e[20];
77
+ let y;
78
+ e[21] !== c ? (y = c && /* @__PURE__ */ r("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none z-10", children: c }), e[21] = c, e[22] = y) : y = e[22];
79
+ const te = `${Le}-${Ce}`, le = o && o !== "" ? o : "", re = j || n ? z : void 0, se = !!n || void 0, ae = q || void 0, ie = s || J, oe = n && "border-destructive", ne = ke === "gray" && "bg-gray-100 border-gray-300 text-gray-700", ce = (s || J) && "opacity-50 cursor-not-allowed";
80
+ let x;
81
+ e[23] !== H || e[24] !== oe || e[25] !== ne || e[26] !== ce ? (x = X("border-input", oe, ne, ce, H), e[23] = H, e[24] = oe, e[25] = ne, e[26] = ce, e[27] = x) : x = e[27];
82
+ let N;
83
+ e[28] !== c ? (N = c && /* @__PURE__ */ r("div", { className: "text-gray-400", children: c }), e[28] = c, e[29] = N) : N = e[29];
84
+ const de = J ? "Loading..." : Pe;
85
+ let I;
86
+ e[30] !== _ || e[31] !== de ? (I = /* @__PURE__ */ r(ze, { placeholder: de, children: _ }), e[30] = _, e[31] = de, e[32] = I) : I = e[32];
87
+ let S;
88
+ e[33] !== F ? (S = F && /* @__PURE__ */ r("div", { className: "ml-auto text-gray-400", children: F }), e[33] = F, e[34] = S) : S = e[34];
89
+ let D;
90
+ e[35] !== Q || e[36] !== s || e[37] !== G || e[38] !== o ? (D = Q && !!o && !s && /* @__PURE__ */ r("button", { type: "button", "aria-label": "Clear selection", className: "ml-auto text-gray-400 hover:text-gray-600 relative z-10", onMouseDown: Be, onPointerDown: Xe, onClick: (l) => {
91
+ l.preventDefault(), l.stopPropagation(), G();
92
+ }, onKeyDown: (l) => {
93
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), G());
94
+ }, children: /* @__PURE__ */ r(Te, { strokeWidth: 1.5, className: "h-4 w-4 mr-3 text-gray-400" }) }), e[35] = Q, e[36] = s, e[37] = G, e[38] = o, e[39] = D) : D = e[39];
95
+ let w;
96
+ e[40] !== N || e[41] !== I || e[42] !== S || e[43] !== D ? (w = /* @__PURE__ */ u("div", { className: "flex items-center gap-2 w-full", children: [
97
+ N,
98
+ I,
99
+ S,
100
+ D
101
+ ] }), e[40] = N, e[41] = I, e[42] = S, e[43] = D, e[44] = w) : w = e[44];
102
+ let P;
103
+ e[45] !== v || e[46] !== m || e[47] !== re || e[48] !== se || e[49] !== ae || e[50] !== ie || e[51] !== x || e[52] !== w ? (P = /* @__PURE__ */ r(Fe, { id: m, "aria-labelledby": v, "aria-describedby": re, "aria-invalid": se, "aria-required": ae, disabled: ie, className: x, children: w }), e[45] = v, e[46] = m, e[47] = re, e[48] = se, e[49] = ae, e[50] = ie, e[51] = x, e[52] = w, e[53] = P) : P = e[53];
104
+ let k;
105
+ e[54] !== U || e[55] !== P ? (k = /* @__PURE__ */ r("div", { ...U, children: P }), e[54] = U, e[55] = P, e[56] = k) : k = e[56];
106
+ let L;
107
+ e[57] !== g.ungrouped ? (L = g.ungrouped.map(We), e[57] = g.ungrouped, e[58] = L) : L = e[58];
108
+ let K;
109
+ e[59] !== g.groups ? (K = Array.from(g.groups.entries()).map(Re), e[59] = g.groups, e[60] = K) : K = e[60];
110
+ let C;
111
+ e[61] !== L || e[62] !== K ? (C = /* @__PURE__ */ u(Me, { children: [
112
+ L,
113
+ K
114
+ ] }), e[61] = L, e[62] = K, e[63] = C) : C = e[63];
115
+ let E;
116
+ e[64] !== ee || e[65] !== Y || e[66] !== te || e[67] !== le || e[68] !== k || e[69] !== C ? (E = /* @__PURE__ */ u(Ae, { value: le, onValueChange: ee, onOpenChange: Y, children: [
117
+ k,
118
+ C
119
+ ] }, te), e[64] = ee, e[65] = Y, e[66] = te, e[67] = le, e[68] = k, e[69] = C, e[70] = E) : E = e[70];
120
+ let O;
121
+ e[71] !== y || e[72] !== E ? (O = /* @__PURE__ */ u("div", { className: "relative", children: [
122
+ y,
123
+ E
124
+ ] }), e[71] = y, e[72] = E, e[73] = O) : O = e[73];
125
+ let T;
126
+ e[74] !== s || e[75] !== n || e[76] !== z || e[77] !== j ? (T = (j || n) && /* @__PURE__ */ r("p", { id: z, className: X("text-xs", n ? "text-destructive" : s ? "text-gray-400" : "text-gray-500"), role: n ? "alert" : void 0, children: n || j }), e[74] = s, e[75] = n, e[76] = z, e[77] = j, e[78] = T) : T = e[78];
127
+ let V;
128
+ return e[79] !== b || e[80] !== O || e[81] !== T || e[82] !== h ? (V = /* @__PURE__ */ u("div", { className: h, children: [
129
+ b,
130
+ O,
131
+ T
132
+ ] }), e[79] = b, e[80] = O, e[81] = T, e[82] = h, e[83] = V) : V = e[83], V;
133
+ }
134
+ function Re(t) {
135
+ const [e, f] = t;
136
+ return /* @__PURE__ */ u(je, { children: [
137
+ /* @__PURE__ */ r(qe, { children: e }),
138
+ f.map(Ve)
139
+ ] }, e);
140
+ }
141
+ function Ve(t) {
142
+ return /* @__PURE__ */ r(Ne, { value: t.value, disabled: t.disabled, className: "pl-2 [&>span]:hidden", children: t.label }, t.value);
143
+ }
144
+ function We(t) {
145
+ return /* @__PURE__ */ r(Ne, { value: t.value, disabled: t.disabled, className: "pl-2", children: t.label }, t.value);
146
+ }
147
+ function Xe(t) {
148
+ t.preventDefault(), t.stopPropagation();
149
+ }
150
+ function Be(t) {
151
+ t.preventDefault(), t.stopPropagation();
152
+ }
153
+ function He(t) {
154
+ return t + 1;
155
+ }
156
+ export {
157
+ lt as SelectField
158
+ };
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
3
+ import { Command as p } from "cmdk";
4
+ import { Check as T } from "lucide-react";
5
+ import { useRef as A, useState as b, useCallback as k } from "react";
6
+ import { CommandInput as F, CommandList as G, CommandGroup as M, CommandItem as O } from "../../../ui/command.js";
7
+ import { Skeleton as P } from "../../../ui/skeleton.js";
8
+ import { cn as x } from "../../../../lib/utils.js";
9
+ import { getInputClasses as q } from "../../../../util/getInputClasses.js";
10
+ const Y = ({
11
+ options: a,
12
+ placeholder: w,
13
+ emptyMessage: N,
14
+ value: c,
15
+ onValueChange: t,
16
+ disabled: v,
17
+ isLoading: o = !1,
18
+ className: y,
19
+ size: S,
20
+ variant: D
21
+ }) => {
22
+ const {
23
+ variantClasses: I,
24
+ combined: g
25
+ } = q(S, D), m = A(null), [d, u] = b(!1), [n, h] = b(c), [E, f] = b((c == null ? void 0 : c.label) || ""), j = k((e) => {
26
+ const l = m.current;
27
+ if (l) {
28
+ if (d || u(!0), e.key === "Enter" && l.value !== "") {
29
+ const s = a.find((K) => K.label === l.value);
30
+ s && (h(s), t == null || t(s));
31
+ }
32
+ e.key === "Escape" && l.blur();
33
+ }
34
+ }, [d, a, t]), z = k(() => {
35
+ u(!1), f((n == null ? void 0 : n.label) || "");
36
+ }, [n]), B = k((e) => {
37
+ f(e.label), h(e), t == null || t(e), setTimeout(() => {
38
+ var l;
39
+ (l = m == null ? void 0 : m.current) == null || l.blur();
40
+ }, 0);
41
+ }, [t]);
42
+ return /* @__PURE__ */ i(p, { onKeyDown: j, children: [
43
+ /* @__PURE__ */ i("div", { className: x("rounded-full border bg-gray-100", I, y), children: [
44
+ " ",
45
+ /* @__PURE__ */ r(F, { ref: m, value: E, onValueChange: o ? void 0 : f, onBlur: z, onFocus: () => u(!0), placeholder: w, disabled: v, className: g })
46
+ ] }),
47
+ /* @__PURE__ */ r("div", { className: "relative mt-1", children: /* @__PURE__ */ r("div", { className: x("animate-in fade-in-0 zoom-in-95 absolute top-0 z-10 w-full rounded-xl bg-white dark:bg-gray-800 outline-none", d ? "block" : "hidden", y), children: /* @__PURE__ */ i(G, { className: "rounded-lg ring-1 ring-slate-200 dark:ring-gray-700", children: [
48
+ o ? /* @__PURE__ */ r(p.Loading, { children: /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r(P, { className: "h-8 w-full" }) }) }) : null,
49
+ a.length > 0 && !o ? /* @__PURE__ */ r(M, { children: a.map((e) => {
50
+ const l = (n == null ? void 0 : n.value) === e.value;
51
+ return /* @__PURE__ */ i(O, { value: e.label, onMouseDown: (s) => {
52
+ s.preventDefault(), s.stopPropagation();
53
+ }, onSelect: () => B(e), className: x("flex w-full items-center gap-2 dark:text-white", l ? null : "pl-8"), children: [
54
+ l ? /* @__PURE__ */ r(T, { className: "w-4" }) : null,
55
+ e.label
56
+ ] }, e.value);
57
+ }) }) : null,
58
+ o ? null : /* @__PURE__ */ r(p.Empty, { className: "select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400", children: N })
59
+ ] }) }) })
60
+ ] });
61
+ };
62
+ export {
63
+ Y as AutoComplete
64
+ };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { jsxs as k, jsx as m } from "react/jsx-runtime";
3
+ import { c as Z } from "react-compiler-runtime";
4
+ import { X as _ } from "lucide-react";
5
+ import { forwardRef as B, useRef as D } from "react";
6
+ import { Input as T } from "../../../ui/input.js";
7
+ import { cn as X } from "../../../../lib/utils.js";
8
+ const $ = {
9
+ small: "h-8 text-sm",
10
+ medium: "h-10",
11
+ large: "h-12 text-base"
12
+ }, A = {
13
+ white: "bg-white border-gray-300",
14
+ grey: "bg-gray-100 border-gray-300"
15
+ }, E = B(function(b, y) {
16
+ const e = Z(32);
17
+ let r, l, s, t, n, c, u, h, f;
18
+ e[0] !== b ? ({
19
+ size: n,
20
+ variant: c,
21
+ placeholder: u,
22
+ className: r,
23
+ onChange: t,
24
+ query: h,
25
+ disabled: l,
26
+ allowClear: f,
27
+ ...s
28
+ } = b, e[0] = b, e[1] = r, e[2] = l, e[3] = s, e[4] = t, e[5] = n, e[6] = c, e[7] = u, e[8] = h, e[9] = f) : (r = e[1], l = e[2], s = e[3], t = e[4], n = e[5], c = e[6], u = e[7], h = e[8], f = e[9]);
29
+ const L = n === void 0 ? "medium" : n, M = c === void 0 ? "white" : c, w = u === void 0 ? "Search here" : u, C = h === void 0 ? "" : h, P = f === void 0 ? !1 : f, j = D(null), d = P && !l && C.length > 0;
30
+ let p;
31
+ e[10] !== t ? (p = (q) => {
32
+ var z, R;
33
+ q.preventDefault(), q.stopPropagation(), t == null || t({
34
+ target: {
35
+ value: ""
36
+ },
37
+ currentTarget: {
38
+ value: ""
39
+ }
40
+ }), (R = (z = j.current) == null ? void 0 : z.querySelector("input")) == null || R.focus();
41
+ }, e[10] = t, e[11] = p) : p = e[11];
42
+ const x = p;
43
+ let g;
44
+ e[12] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ k("svg", { width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "absolute left-4 top-1/2 transform -translate-y-1/2 h-4 w-4 pt-0.5", "aria-label": "Search icon", children: [
45
+ /* @__PURE__ */ m("title", { children: "Search" }),
46
+ /* @__PURE__ */ m("path", { d: "M5.73077 11.4616C4.13206 11.4616 2.77725 10.9061 1.66635 9.7952C0.55545 8.6843 0 7.32949 0 5.73078C0 4.13206 0.55545 2.77725 1.66635 1.66635C2.77725 0.55545 4.13206 0 5.73077 0C7.32951 0 8.68432 0.55545 9.7952 1.66635C10.9061 2.77725 11.4615 4.13206 11.4615 5.73078C11.4615 6.42564 11.3385 7.09807 11.0923 7.74808C10.8462 8.39808 10.5231 8.95385 10.1231 9.4154L16.0308 15.3231C16.1244 15.4167 16.1744 15.5314 16.1808 15.6673C16.1872 15.8032 16.1372 15.9244 16.0308 16.0308C15.9244 16.1372 15.8064 16.1904 15.677 16.1904C15.5475 16.1904 15.4295 16.1372 15.3231 16.0308L9.4154 10.1231C8.9154 10.5487 8.3404 10.8782 7.6904 11.1116C7.0404 11.3449 6.38719 11.4616 5.73077 11.4616ZM5.73077 10.4616C7.05771 10.4616 8.1779 10.0048 9.09135 9.09135C10.0048 8.17788 10.4615 7.05769 10.4615 5.73078C10.4615 4.40386 10.0048 3.28367 9.09135 2.3702C8.1779 1.45673 7.05771 1 5.73077 1C4.40386 1 3.28367 1.45673 2.3702 2.3702C1.45675 3.28367 1.00002 4.40386 1.00002 5.73078C1.00002 7.05769 1.45675 8.17788 2.3702 9.09135C3.28367 10.0048 4.40386 10.4616 5.73077 10.4616Z", fill: "currentColor", className: "text-gray-900" })
47
+ ] }), e[12] = g) : g = e[12];
48
+ const N = d && "pr-10", S = $[L], I = A[M];
49
+ let o;
50
+ e[13] !== r || e[14] !== I || e[15] !== N || e[16] !== S ? (o = X("pl-12 rounded-full", N, S, I, r), e[13] = r, e[14] = I, e[15] = N, e[16] = S, e[17] = o) : o = e[17];
51
+ let a;
52
+ e[18] !== l || e[19] !== s || e[20] !== t || e[21] !== w || e[22] !== C || e[23] !== y || e[24] !== o ? (a = /* @__PURE__ */ m(T, { ref: y, placeholder: w, className: o, onChange: t, value: C, disabled: l, ...s }), e[18] = l, e[19] = s, e[20] = t, e[21] = w, e[22] = C, e[23] = y, e[24] = o, e[25] = a) : a = e[25];
53
+ let i;
54
+ e[26] !== x || e[27] !== d ? (i = d && /* @__PURE__ */ m("button", { type: "button", className: "absolute right-3 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "aria-label": "Clear search", onClick: x, children: /* @__PURE__ */ m(_, { className: "h-4 w-4 shrink-0", "aria-hidden": !0 }) }), e[26] = x, e[27] = d, e[28] = i) : i = e[28];
55
+ let v;
56
+ return e[29] !== a || e[30] !== i ? (v = /* @__PURE__ */ k("div", { ref: j, className: "relative", children: [
57
+ g,
58
+ a,
59
+ i
60
+ ] }), e[29] = a, e[30] = i, e[31] = v) : v = e[31], v;
61
+ });
62
+ E.displayName = "SearchInput";
63
+ export {
64
+ E as SearchInput
65
+ };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx as p, jsxs as b } from "react/jsx-runtime";
3
+ import { c as y } from "react-compiler-runtime";
4
+ import { Badge as u } from "../../../ui/badge.js";
5
+ import { cn as h } from "../../../../lib/utils.js";
6
+ function k(m) {
7
+ const e = y(8), {
8
+ title: s,
9
+ children: c,
10
+ className: a
11
+ } = m;
12
+ let r;
13
+ e[0] !== a ? (r = h("space-y-6", a), e[0] = a, e[1] = r) : r = e[1];
14
+ let i;
15
+ e[2] !== s ? (i = /* @__PURE__ */ p("div", { className: "border-b border-gray-200 pb-3", children: /* @__PURE__ */ p("h2", { className: "text-sm font-semibold text-gray-900 tracking-wide uppercase", children: s }) }), e[2] = s, e[3] = i) : i = e[3];
16
+ let t;
17
+ return e[4] !== c || e[5] !== r || e[6] !== i ? (t = /* @__PURE__ */ b("section", { className: r, children: [
18
+ i,
19
+ c
20
+ ] }), e[4] = c, e[5] = r, e[6] = i, e[7] = t) : t = e[7], t;
21
+ }
22
+ function j(m) {
23
+ const e = y(12), {
24
+ title: s,
25
+ variant: c,
26
+ children: a,
27
+ className: r
28
+ } = m, i = c === void 0 ? "primary" : c;
29
+ let t;
30
+ e[0] !== r ? (t = h("space-y-4", r), e[0] = r, e[1] = t) : t = e[1];
31
+ const d = i === "primary" ? "default" : "secondary", f = i === "primary" && "bg-black text-white hover:bg-black/90";
32
+ let l;
33
+ e[2] !== f ? (l = h(f), e[2] = f, e[3] = l) : l = e[3];
34
+ let n;
35
+ e[4] !== d || e[5] !== l || e[6] !== s ? (n = /* @__PURE__ */ p(u, { variant: d, className: l, children: s }), e[4] = d, e[5] = l, e[6] = s, e[7] = n) : n = e[7];
36
+ let o;
37
+ return e[8] !== a || e[9] !== t || e[10] !== n ? (o = /* @__PURE__ */ b("div", { className: t, children: [
38
+ n,
39
+ a
40
+ ] }), e[8] = a, e[9] = t, e[10] = n, e[11] = o) : o = e[11], o;
41
+ }
42
+ export {
43
+ k as ComponentSection,
44
+ j as ComponentVariant
45
+ };
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { jsx as d, jsxs as I } from "react/jsx-runtime";
3
+ import { c as N } from "react-compiler-runtime";
4
+ import { cva as R } from "class-variance-authority";
5
+ import { AlertCircle as A, AlertTriangle as D, CheckCircle2 as T, Info as C, X as V } from "lucide-react";
6
+ import * as w from "react";
7
+ import { cn as y } from "../../lib/utils.js";
8
+ const $ = R("relative w-full rounded-lg border p-4", {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-background text-foreground border-border",
12
+ info: "bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950/50 dark:text-blue-200 dark:border-blue-900",
13
+ success: "bg-green-50 text-green-900 border-green-200 dark:bg-green-950/50 dark:text-green-200 dark:border-green-900",
14
+ warning: "bg-amber-50 text-amber-900 border-amber-200 dark:bg-amber-950/50 dark:text-amber-200 dark:border-amber-900",
15
+ error: "bg-red-50 text-red-900 border-red-200 dark:bg-red-950/50 dark:text-red-200 dark:border-red-900",
16
+ destructive: "bg-red-50 text-red-900 border-red-200 dark:bg-red-950/50 dark:text-red-200 dark:border-red-900"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "default"
21
+ }
22
+ }), j = {
23
+ default: C,
24
+ info: C,
25
+ success: T,
26
+ warning: D,
27
+ error: A,
28
+ destructive: A
29
+ }, X = w.forwardRef((s, o) => {
30
+ const e = N(33);
31
+ let r, t, a, l, i, n, p, k;
32
+ e[0] !== s ? ({
33
+ className: a,
34
+ variant: k,
35
+ severity: p,
36
+ icon: l,
37
+ onClose: i,
38
+ action: r,
39
+ children: t,
40
+ ...n
41
+ } = s, e[0] = s, e[1] = r, e[2] = t, e[3] = a, e[4] = l, e[5] = i, e[6] = n, e[7] = p, e[8] = k) : (r = e[1], t = e[2], a = e[3], l = e[4], i = e[5], n = e[6], p = e[7], k = e[8]);
42
+ const x = p || k || "default", c = l !== !1, h = j[x];
43
+ let b;
44
+ e[9] !== r || e[10] !== a || e[11] !== x || e[12] !== i || e[13] !== c ? (b = y($({
45
+ variant: x
46
+ }), (c || i || r) && "flex gap-3", a), e[9] = r, e[10] = a, e[11] = x, e[12] = i, e[13] = c, e[14] = b) : b = e[14];
47
+ let m;
48
+ e[15] !== h || e[16] !== l || e[17] !== c ? (m = c && /* @__PURE__ */ d("div", { className: "shrink-0 mt-0.5", children: l === void 0 ? /* @__PURE__ */ d(h, { className: "h-4 w-4" }) : l }), e[15] = h, e[16] = l, e[17] = c, e[18] = m) : m = e[18];
49
+ let f;
50
+ e[19] !== t ? (f = /* @__PURE__ */ d("div", { className: "flex-1 min-w-0", children: t }), e[19] = t, e[20] = f) : f = e[20];
51
+ let u;
52
+ e[21] !== r ? (u = r && /* @__PURE__ */ d("div", { className: "shrink-0", children: r }), e[21] = r, e[22] = u) : u = e[22];
53
+ let g;
54
+ e[23] !== i ? (g = i && /* @__PURE__ */ d("button", { type: "button", onClick: i, className: "shrink-0 rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none", "aria-label": "Close", children: /* @__PURE__ */ d(V, { className: "h-4 w-4" }) }), e[23] = i, e[24] = g) : g = e[24];
55
+ let v;
56
+ return e[25] !== n || e[26] !== o || e[27] !== b || e[28] !== m || e[29] !== f || e[30] !== u || e[31] !== g ? (v = /* @__PURE__ */ I("div", { ref: o, role: "alert", className: b, ...n, children: [
57
+ m,
58
+ f,
59
+ u,
60
+ g
61
+ ] }), e[25] = n, e[26] = o, e[27] = b, e[28] = m, e[29] = f, e[30] = u, e[31] = g, e[32] = v) : v = e[32], v;
62
+ });
63
+ X.displayName = "Alert";
64
+ const _ = w.forwardRef((s, o) => {
65
+ const e = N(9);
66
+ let r, t;
67
+ e[0] !== s ? ({
68
+ className: r,
69
+ ...t
70
+ } = s, e[0] = s, e[1] = r, e[2] = t) : (r = e[1], t = e[2]);
71
+ let a;
72
+ e[3] !== r ? (a = y("mb-1 font-medium leading-none tracking-tight", r), e[3] = r, e[4] = a) : a = e[4];
73
+ let l;
74
+ return e[5] !== t || e[6] !== o || e[7] !== a ? (l = /* @__PURE__ */ d("h5", { ref: o, className: a, ...t }), e[5] = t, e[6] = o, e[7] = a, e[8] = l) : l = e[8], l;
75
+ });
76
+ _.displayName = "AlertTitle";
77
+ const q = w.forwardRef((s, o) => {
78
+ const e = N(9);
79
+ let r, t;
80
+ e[0] !== s ? ({
81
+ className: r,
82
+ ...t
83
+ } = s, e[0] = s, e[1] = r, e[2] = t) : (r = e[1], t = e[2]);
84
+ let a;
85
+ e[3] !== r ? (a = y("text-sm [&_p]:leading-relaxed", r), e[3] = r, e[4] = a) : a = e[4];
86
+ let l;
87
+ return e[5] !== t || e[6] !== o || e[7] !== a ? (l = /* @__PURE__ */ d("p", { ref: o, className: a, ...t }), e[5] = t, e[6] = o, e[7] = a, e[8] = l) : l = e[8], l;
88
+ });
89
+ q.displayName = "AlertDescription";
90
+ export {
91
+ X as Alert,
92
+ q as AlertDescription,
93
+ _ as AlertTitle
94
+ };
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import { c } from "react-compiler-runtime";
4
+ import { Avatar as n } from "@base-ui/react/avatar";
5
+ import { cva as u } from "class-variance-authority";
6
+ import * as p from "react";
7
+ import { cn as d } from "../../lib/utils.js";
8
+ const v = u("relative flex shrink-0 overflow-hidden rounded-full", {
9
+ variants: {
10
+ size: {
11
+ sm: "h-8 w-8",
12
+ md: "h-10 w-10",
13
+ lg: "h-12 w-12",
14
+ xl: "h-16 w-16"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ size: "md"
19
+ }
20
+ }), w = p.forwardRef((f, o) => {
21
+ const e = c(11);
22
+ let a, t, r;
23
+ e[0] !== f ? ({
24
+ className: a,
25
+ size: r,
26
+ ...t
27
+ } = f, e[0] = f, e[1] = a, e[2] = t, e[3] = r) : (a = e[1], t = e[2], r = e[3]);
28
+ const l = o;
29
+ let s;
30
+ e[4] !== a || e[5] !== r ? (s = d(v({
31
+ size: r
32
+ }), a), e[4] = a, e[5] = r, e[6] = s) : s = e[6];
33
+ let i;
34
+ return e[7] !== t || e[8] !== l || e[9] !== s ? (i = /* @__PURE__ */ m(n.Root, { ref: l, className: s, ...t }), e[7] = t, e[8] = l, e[9] = s, e[10] = i) : i = e[10], i;
35
+ });
36
+ w.displayName = "Avatar";
37
+ const N = p.forwardRef((f, o) => {
38
+ const e = c(9);
39
+ let a, t;
40
+ e[0] !== f ? ({
41
+ className: a,
42
+ ...t
43
+ } = f, e[0] = f, e[1] = a, e[2] = t) : (a = e[1], t = e[2]);
44
+ const r = o;
45
+ let l;
46
+ e[3] !== a ? (l = d("aspect-square h-full w-full", a), e[3] = a, e[4] = l) : l = e[4];
47
+ let s;
48
+ return e[5] !== t || e[6] !== r || e[7] !== l ? (s = /* @__PURE__ */ m(n.Image, { ref: r, className: l, ...t }), e[5] = t, e[6] = r, e[7] = l, e[8] = s) : s = e[8], s;
49
+ });
50
+ N.displayName = "AvatarImage";
51
+ const h = p.forwardRef((f, o) => {
52
+ const e = c(9);
53
+ let a, t;
54
+ e[0] !== f ? ({
55
+ className: a,
56
+ ...t
57
+ } = f, e[0] = f, e[1] = a, e[2] = t) : (a = e[1], t = e[2]);
58
+ const r = o;
59
+ let l;
60
+ e[3] !== a ? (l = d("flex h-full w-full items-center justify-center rounded-full bg-muted", a), e[3] = a, e[4] = l) : l = e[4];
61
+ let s;
62
+ return e[5] !== t || e[6] !== r || e[7] !== l ? (s = /* @__PURE__ */ m(n.Fallback, { ref: r, className: l, ...t }), e[5] = t, e[6] = r, e[7] = l, e[8] = s) : s = e[8], s;
63
+ });
64
+ h.displayName = "AvatarFallback";
65
+ export {
66
+ w as Avatar,
67
+ h as AvatarFallback,
68
+ N as AvatarImage
69
+ };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import { c as d } from "react-compiler-runtime";
4
+ import { cva as f } from "class-variance-authority";
5
+ import { cn as c } from "../../lib/utils.js";
6
+ const l = f("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
7
+ variants: {
8
+ variant: {
9
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
10
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
11
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
12
+ outline: "text-foreground"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ variant: "default"
17
+ }
18
+ });
19
+ function v(s) {
20
+ const r = d(10);
21
+ let e, t, o;
22
+ r[0] !== s ? ({
23
+ className: e,
24
+ variant: o,
25
+ ...t
26
+ } = s, r[0] = s, r[1] = e, r[2] = t, r[3] = o) : (e = r[1], t = r[2], o = r[3]);
27
+ let n;
28
+ r[4] !== e || r[5] !== o ? (n = c(l({
29
+ variant: o
30
+ }), e), r[4] = e, r[5] = o, r[6] = n) : n = r[6];
31
+ let a;
32
+ return r[7] !== t || r[8] !== n ? (a = /* @__PURE__ */ i("div", { className: n, ...t }), r[7] = t, r[8] = n, r[9] = a) : a = r[9], a;
33
+ }
34
+ export {
35
+ v as Badge,
36
+ l as badgeVariants
37
+ };