@wealthx/shadcn 1.2.1 → 1.3.0

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 (247) hide show
  1. package/.turbo/turbo-build.log +203 -150
  2. package/CHANGELOG.md +29 -0
  3. package/dist/{chunk-4Y6R4WEC.mjs → chunk-2A5RRQGG.mjs} +9 -22
  4. package/dist/{chunk-TS2ZX2VS.mjs → chunk-2UM72RJ7.mjs} +11 -15
  5. package/dist/{chunk-A56YQQHG.mjs → chunk-3NCUZIFP.mjs} +2 -2
  6. package/dist/chunk-3OYFOX3X.mjs +79 -0
  7. package/dist/{chunk-RP3SQYA3.mjs → chunk-3TTACBDP.mjs} +9 -4
  8. package/dist/chunk-4GAWMKMI.mjs +710 -0
  9. package/dist/{chunk-SYOD63OZ.mjs → chunk-5FQIKDKP.mjs} +6 -6
  10. package/dist/{chunk-K3JYD4IU.mjs → chunk-5IS7G74I.mjs} +11 -4
  11. package/dist/chunk-6AW4KJHE.mjs +235 -0
  12. package/dist/chunk-6CR5N2JW.mjs +302 -0
  13. package/dist/{chunk-XIRTEFKH.mjs → chunk-6DZEXFNB.mjs} +36 -8
  14. package/dist/chunk-6O6KD7CE.mjs +271 -0
  15. package/dist/chunk-7PV3IWCN.mjs +33 -0
  16. package/dist/{chunk-SPJ5KXW7.mjs → chunk-7S5AESZO.mjs} +5 -5
  17. package/dist/{chunk-RYCLWMZ7.mjs → chunk-ABFDMHOR.mjs} +9 -7
  18. package/dist/{chunk-SWGT756Z.mjs → chunk-AMQZRHEZ.mjs} +10 -4
  19. package/dist/{chunk-WOEHFRGB.mjs → chunk-BDYZCBRT.mjs} +4 -4
  20. package/dist/{chunk-WAZD7NFU.mjs → chunk-BKNFWEH2.mjs} +6 -6
  21. package/dist/{chunk-CLIN5525.mjs → chunk-C7CQJNMR.mjs} +1 -1
  22. package/dist/{chunk-D4ILTPOG.mjs → chunk-CFMQP5QS.mjs} +5 -4
  23. package/dist/{chunk-VPBN3WOO.mjs → chunk-DGHAXJBN.mjs} +9 -7
  24. package/dist/chunk-DOEO3CDL.mjs +27 -0
  25. package/dist/{chunk-KUDCQ4FI.mjs → chunk-DUJTAXMH.mjs} +9 -4
  26. package/dist/{chunk-GGM2UYGG.mjs → chunk-EBXQWIYG.mjs} +10 -4
  27. package/dist/{chunk-PMB3A7V3.mjs → chunk-EI5F6FMT.mjs} +1 -1
  28. package/dist/chunk-EWRB4PAD.mjs +468 -0
  29. package/dist/chunk-FAKPBKLT.mjs +253 -0
  30. package/dist/chunk-FNQXOAYJ.mjs +169 -0
  31. package/dist/{chunk-4CX4SBRO.mjs → chunk-GHC7LLUX.mjs} +14 -5
  32. package/dist/chunk-HBZLGDIN.mjs +507 -0
  33. package/dist/{chunk-SIZMLSRU.mjs → chunk-HISNT2MG.mjs} +8 -6
  34. package/dist/{chunk-PR6V5XKM.mjs → chunk-HVY6KCCF.mjs} +7 -4
  35. package/dist/chunk-I3RZS7V2.mjs +136 -0
  36. package/dist/chunk-IAE3F7DR.mjs +1962 -0
  37. package/dist/{chunk-ZRO5JO3H.mjs → chunk-IHMFS7NZ.mjs} +81 -84
  38. package/dist/{chunk-PCPLO5HT.mjs → chunk-IOJRDS6V.mjs} +96 -14
  39. package/dist/{chunk-LHYCMLVA.mjs → chunk-JKGDCQTZ.mjs} +11 -4
  40. package/dist/{chunk-H45TKD34.mjs → chunk-JMHR3YGZ.mjs} +1 -1
  41. package/dist/{chunk-4MN6UQHG.mjs → chunk-K5A5L6T2.mjs} +17 -39
  42. package/dist/{chunk-CSDO6VBW.mjs → chunk-LBMRIB3G.mjs} +10 -10
  43. package/dist/chunk-LV35NGVG.mjs +272 -0
  44. package/dist/{chunk-FZIXGLMV.mjs → chunk-M3FV7LOK.mjs} +5 -12
  45. package/dist/{chunk-FMAXJ2SI.mjs → chunk-MBON7YRJ.mjs} +1 -1
  46. package/dist/chunk-MIZQHHUO.mjs +441 -0
  47. package/dist/chunk-MN5NYQCL.mjs +29 -0
  48. package/dist/chunk-NL3ZO62D.mjs +31 -0
  49. package/dist/{chunk-Q76O3RIQ.mjs → chunk-NMOI6CQD.mjs} +1 -1
  50. package/dist/{chunk-P6AM5V7O.mjs → chunk-OODBHKG7.mjs} +1 -1
  51. package/dist/chunk-PBL4OQV2.mjs +283 -0
  52. package/dist/{chunk-3WMX6KWS.mjs → chunk-PU4YZQXV.mjs} +11 -12
  53. package/dist/chunk-QMY3AZJH.mjs +80 -0
  54. package/dist/{chunk-BL3DXM2X.mjs → chunk-QZ4RE6NA.mjs} +11 -4
  55. package/dist/{chunk-VACKZOMY.mjs → chunk-R3VSPKNP.mjs} +3 -3
  56. package/dist/{chunk-OPNQAVVH.mjs → chunk-RJI6GKVF.mjs} +8 -6
  57. package/dist/{chunk-WG6JGJXB.mjs → chunk-T4BJLT57.mjs} +1 -1
  58. package/dist/chunk-U4NDAF2P.mjs +207 -0
  59. package/dist/{chunk-DOH3EHX7.mjs → chunk-U5X52X37.mjs} +1 -1
  60. package/dist/chunk-UMTOX62O.mjs +415 -0
  61. package/dist/{chunk-7MMXNK3C.mjs → chunk-VLARHE5V.mjs} +8 -6
  62. package/dist/{chunk-2I5S2AMY.mjs → chunk-XREGSKX3.mjs} +2 -2
  63. package/dist/{chunk-JNQORUPP.mjs → chunk-YJG55G2H.mjs} +14 -11
  64. package/dist/chunk-ZC45IGZO.mjs +388 -0
  65. package/dist/components/ui/add-column-modal.js +42 -14
  66. package/dist/components/ui/add-column-modal.mjs +4 -4
  67. package/dist/components/ui/add-lead-modal.js +42 -11
  68. package/dist/components/ui/add-lead-modal.mjs +3 -3
  69. package/dist/components/ui/advisor-card.js +497 -0
  70. package/dist/components/ui/advisor-card.mjs +13 -0
  71. package/dist/components/ui/ai-assistant-drawer.js +11 -10
  72. package/dist/components/ui/ai-assistant-drawer.mjs +3 -3
  73. package/dist/components/ui/alert-dialog.js +2 -2
  74. package/dist/components/ui/alert-dialog.mjs +2 -2
  75. package/dist/components/ui/appointment-action-dialogs.js +1160 -0
  76. package/dist/components/ui/appointment-action-dialogs.mjs +23 -0
  77. package/dist/components/ui/appointment-availability-settings.js +1590 -0
  78. package/dist/components/ui/appointment-availability-settings.mjs +23 -0
  79. package/dist/components/ui/appointment-book-dialog.js +1744 -0
  80. package/dist/components/ui/appointment-book-dialog.mjs +27 -0
  81. package/dist/components/ui/appointment-calendar-view.js +833 -0
  82. package/dist/components/ui/appointment-calendar-view.mjs +14 -0
  83. package/dist/components/ui/appointment-detail-sheet.js +1517 -0
  84. package/dist/components/ui/appointment-detail-sheet.mjs +24 -0
  85. package/dist/components/ui/appointment-gmail-connect.js +467 -0
  86. package/dist/components/ui/appointment-gmail-connect.mjs +14 -0
  87. package/dist/components/ui/appointment-mini-card.js +345 -0
  88. package/dist/components/ui/appointment-mini-card.mjs +11 -0
  89. package/dist/components/ui/appointment-time-slot-picker.js +311 -0
  90. package/dist/components/ui/appointment-time-slot-picker.mjs +13 -0
  91. package/dist/components/ui/appointment-upcoming-card.js +1268 -0
  92. package/dist/components/ui/appointment-upcoming-card.mjs +21 -0
  93. package/dist/components/ui/backoffice-alert-history-chart.js +11 -5
  94. package/dist/components/ui/backoffice-alert-history-chart.mjs +5 -4
  95. package/dist/components/ui/backoffice-alerts-chart.js +786 -0
  96. package/dist/components/ui/backoffice-alerts-chart.mjs +19 -0
  97. package/dist/components/ui/backoffice-connections-chart.js +817 -0
  98. package/dist/components/ui/backoffice-connections-chart.mjs +19 -0
  99. package/dist/components/ui/backoffice-contact-history-chart.js +11 -5
  100. package/dist/components/ui/backoffice-contact-history-chart.mjs +5 -4
  101. package/dist/components/ui/badge.js +6 -6
  102. package/dist/components/ui/badge.mjs +1 -1
  103. package/dist/components/ui/borrowing-capacity-line-chart.js +30 -21
  104. package/dist/components/ui/borrowing-capacity-line-chart.mjs +5 -4
  105. package/dist/components/ui/button.js +2 -2
  106. package/dist/components/ui/button.mjs +1 -1
  107. package/dist/components/ui/calendar.js +2 -2
  108. package/dist/components/ui/calendar.mjs +2 -2
  109. package/dist/components/ui/card.js +1 -1
  110. package/dist/components/ui/card.mjs +1 -1
  111. package/dist/components/ui/cash-balance-line-chart.js +31 -23
  112. package/dist/components/ui/cash-balance-line-chart.mjs +5 -4
  113. package/dist/components/ui/cashflow-bar-chart.js +12 -5
  114. package/dist/components/ui/cashflow-bar-chart.mjs +5 -4
  115. package/dist/components/ui/chip.js +97 -18
  116. package/dist/components/ui/chip.mjs +3 -2
  117. package/dist/components/ui/color-picker.js +547 -0
  118. package/dist/components/ui/color-picker.mjs +24 -0
  119. package/dist/components/ui/data-table.js +182 -129
  120. package/dist/components/ui/data-table.mjs +3 -2
  121. package/dist/components/ui/date-picker.js +48 -27
  122. package/dist/components/ui/date-picker.mjs +4 -3
  123. package/dist/components/ui/dialog.js +37 -9
  124. package/dist/components/ui/dialog.mjs +2 -2
  125. package/dist/components/ui/expense-bar-chart.js +12 -5
  126. package/dist/components/ui/expense-bar-chart.mjs +5 -4
  127. package/dist/components/ui/field.mjs +2 -2
  128. package/dist/components/ui/financial-cards.js +322 -155
  129. package/dist/components/ui/financial-cards.mjs +5 -3
  130. package/dist/components/ui/financial-drawers.js +2 -2
  131. package/dist/components/ui/financial-drawers.mjs +3 -3
  132. package/dist/components/ui/financial-sections.js +14 -10
  133. package/dist/components/ui/financial-sections.mjs +6 -5
  134. package/dist/components/ui/form-primitives.js +4 -4
  135. package/dist/components/ui/form-primitives.mjs +3 -3
  136. package/dist/components/ui/income-bar-chart.js +12 -5
  137. package/dist/components/ui/income-bar-chart.mjs +5 -4
  138. package/dist/components/ui/input-group.js +2 -2
  139. package/dist/components/ui/input-group.mjs +2 -2
  140. package/dist/components/ui/kanban-column.js +52 -44
  141. package/dist/components/ui/kanban-column.mjs +7 -5
  142. package/dist/components/ui/opportunity-card.js +52 -44
  143. package/dist/components/ui/opportunity-card.mjs +6 -4
  144. package/dist/components/ui/opportunity-edit-modals.js +1371 -1267
  145. package/dist/components/ui/opportunity-edit-modals.mjs +10 -10
  146. package/dist/components/ui/opportunity-summary-tab.js +2748 -2161
  147. package/dist/components/ui/opportunity-summary-tab.mjs +16 -16
  148. package/dist/components/ui/page-header.js +92 -0
  149. package/dist/components/ui/page-header.mjs +8 -0
  150. package/dist/components/ui/page-top-bar.js +88 -0
  151. package/dist/components/ui/page-top-bar.mjs +8 -0
  152. package/dist/components/ui/pagination.js +303 -19
  153. package/dist/components/ui/pagination.mjs +11 -4
  154. package/dist/components/ui/pipeline-board.js +209 -195
  155. package/dist/components/ui/pipeline-board.mjs +10 -8
  156. package/dist/components/ui/pipeline-dialogs.js +118 -69
  157. package/dist/components/ui/pipeline-dialogs.mjs +8 -7
  158. package/dist/components/ui/pipeline-primitives.js +6 -6
  159. package/dist/components/ui/pipeline-primitives.mjs +2 -2
  160. package/dist/components/ui/property-cashflow-doughnut-chart.js +14 -12
  161. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +5 -4
  162. package/dist/components/ui/property-debt-equity-doughnut-chart.js +14 -12
  163. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +5 -4
  164. package/dist/components/ui/property-mobile-estimate-line-chart.js +16 -14
  165. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +5 -4
  166. package/dist/components/ui/sidebar-nav.js +679 -0
  167. package/dist/components/ui/sidebar-nav.mjs +14 -0
  168. package/dist/components/ui/stage-timeline.js +6 -6
  169. package/dist/components/ui/stage-timeline.mjs +3 -3
  170. package/dist/components/ui/stepper.js +283 -0
  171. package/dist/components/ui/stepper.mjs +18 -0
  172. package/dist/components/ui/toggle-group.js +4 -4
  173. package/dist/components/ui/toggle-group.mjs +2 -2
  174. package/dist/components/ui/toggle.js +4 -4
  175. package/dist/components/ui/toggle.mjs +1 -1
  176. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +18 -16
  177. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +5 -4
  178. package/dist/components/ui/transactions-income-expense-bar-chart.js +28 -12
  179. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -4
  180. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +18 -16
  181. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +5 -4
  182. package/dist/index.js +12927 -8522
  183. package/dist/index.mjs +288 -190
  184. package/dist/lib/typography.js +10 -10
  185. package/dist/lib/typography.mjs +1 -1
  186. package/dist/styles.css +1 -1
  187. package/package.json +86 -1
  188. package/src/components/index.tsx +146 -0
  189. package/src/components/ui/add-column-modal.tsx +7 -7
  190. package/src/components/ui/add-lead-modal.tsx +6 -3
  191. package/src/components/ui/advisor-card.tsx +227 -0
  192. package/src/components/ui/ai-assistant-drawer.tsx +4 -3
  193. package/src/components/ui/appointment-action-dialogs.tsx +297 -0
  194. package/src/components/ui/appointment-availability-settings.tsx +645 -0
  195. package/src/components/ui/appointment-book-dialog.tsx +618 -0
  196. package/src/components/ui/appointment-calendar-view.tsx +510 -0
  197. package/src/components/ui/appointment-detail-sheet.tsx +415 -0
  198. package/src/components/ui/appointment-gmail-connect.tsx +188 -0
  199. package/src/components/ui/appointment-mini-card.tsx +104 -0
  200. package/src/components/ui/appointment-time-slot-picker.tsx +123 -0
  201. package/src/components/ui/appointment-upcoming-card.tsx +635 -0
  202. package/src/components/ui/backoffice-alert-history-chart.tsx +10 -2
  203. package/src/components/ui/backoffice-alerts-chart.tsx +312 -0
  204. package/src/components/ui/backoffice-connections-chart.tsx +339 -0
  205. package/src/components/ui/backoffice-contact-history-chart.tsx +10 -2
  206. package/src/components/ui/badge.tsx +12 -6
  207. package/src/components/ui/borrowing-capacity-line-chart.tsx +4 -11
  208. package/src/components/ui/button.tsx +2 -2
  209. package/src/components/ui/card.tsx +1 -1
  210. package/src/components/ui/cash-balance-line-chart.tsx +4 -23
  211. package/src/components/ui/cashflow-bar-chart.tsx +9 -2
  212. package/src/components/ui/chart-shared.tsx +4 -11
  213. package/src/components/ui/chip.tsx +23 -19
  214. package/src/components/ui/color-picker.tsx +309 -0
  215. package/src/components/ui/data-table.tsx +117 -83
  216. package/src/components/ui/date-picker.tsx +42 -37
  217. package/src/components/ui/dialog.tsx +72 -6
  218. package/src/components/ui/expense-bar-chart.tsx +11 -2
  219. package/src/components/ui/financial-cards.tsx +99 -10
  220. package/src/components/ui/income-bar-chart.tsx +11 -2
  221. package/src/components/ui/opportunity-card.tsx +10 -39
  222. package/src/components/ui/opportunity-edit-modals.tsx +98 -36
  223. package/src/components/ui/opportunity-summary-tab.tsx +548 -232
  224. package/src/components/ui/page-header.tsx +57 -0
  225. package/src/components/ui/page-top-bar.tsx +48 -0
  226. package/src/components/ui/pagination.tsx +171 -22
  227. package/src/components/ui/pipeline-board.tsx +12 -5
  228. package/src/components/ui/property-cashflow-doughnut-chart.tsx +3 -1
  229. package/src/components/ui/property-debt-equity-doughnut-chart.tsx +3 -1
  230. package/src/components/ui/property-mobile-estimate-line-chart.tsx +3 -1
  231. package/src/components/ui/sidebar-nav.tsx +516 -0
  232. package/src/components/ui/stepper.tsx +347 -0
  233. package/src/components/ui/toggle.tsx +4 -4
  234. package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +3 -1
  235. package/src/components/ui/transactions-income-expense-bar-chart.tsx +12 -9
  236. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +3 -1
  237. package/src/lib/format-currency.ts +44 -0
  238. package/src/lib/format-date.ts +50 -0
  239. package/src/lib/opportunity-constants.ts +12 -0
  240. package/src/lib/typography.ts +11 -11
  241. package/src/styles/globals.css +36 -34
  242. package/src/styles/styles-css.ts +1 -1
  243. package/tsup.config.ts +17 -0
  244. package/dist/chunk-PG6K5XEC.mjs +0 -475
  245. package/dist/chunk-WA6O6EUR.mjs +0 -1885
  246. package/dist/chunk-WNGWBVLV.mjs +0 -148
  247. package/dist/{chunk-LLVQKSU3.mjs → chunk-GD4BJDJR.mjs} +3 -3
@@ -0,0 +1,253 @@
1
+ import {
2
+ Popover,
3
+ PopoverContent,
4
+ PopoverTrigger
5
+ } from "./chunk-3GF7OVTP.mjs";
6
+ import {
7
+ Input
8
+ } from "./chunk-GYMYRIZP.mjs";
9
+ import {
10
+ Button
11
+ } from "./chunk-XREGSKX3.mjs";
12
+ import {
13
+ cn
14
+ } from "./chunk-VLQZANBF.mjs";
15
+
16
+ // src/components/ui/color-picker.tsx
17
+ import * as React from "react";
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ var COLOR_PICKER_PRESETS = [
20
+ // Blues
21
+ "#1E40AF",
22
+ "#2563EB",
23
+ "#3B82F6",
24
+ "#60A5FA",
25
+ // Purples
26
+ "#7C3AED",
27
+ "#8B5CF6",
28
+ "#A78BFA",
29
+ "#C4B5FD",
30
+ // Greens
31
+ "#15803D",
32
+ "#16A34A",
33
+ "#22C55E",
34
+ "#4ADE80",
35
+ // Reds
36
+ "#B91C1C",
37
+ "#DC2626",
38
+ "#EF4444",
39
+ "#F87171",
40
+ // Oranges
41
+ "#C2410C",
42
+ "#EA580C",
43
+ "#F97316",
44
+ "#FB923C",
45
+ // Teals
46
+ "#0F766E",
47
+ "#0D9488",
48
+ "#14B8A6",
49
+ "#2DD4BF",
50
+ // Neutrals
51
+ "#111827",
52
+ "#374151",
53
+ "#6B7280",
54
+ "#D1D5DB"
55
+ ];
56
+ function isValidHex(value) {
57
+ return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(value);
58
+ }
59
+ function normalizeHex(value) {
60
+ const stripped = value.replace(/^#/, "");
61
+ return `#${stripped}`;
62
+ }
63
+ function ColorSwatch({
64
+ color,
65
+ selected,
66
+ size = "md",
67
+ onClick,
68
+ className
69
+ }) {
70
+ return /* @__PURE__ */ jsx(
71
+ Button,
72
+ {
73
+ type: "button",
74
+ variant: "ghost",
75
+ title: color,
76
+ "aria-label": `Select color ${color}`,
77
+ "aria-pressed": selected,
78
+ onClick: () => onClick == null ? void 0 : onClick(color),
79
+ className: cn(
80
+ "relative shrink-0 p-0 transition-all outline-none shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]",
81
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
82
+ size === "md" ? "size-7" : "size-5",
83
+ selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background",
84
+ className
85
+ ),
86
+ style: { backgroundColor: color }
87
+ }
88
+ );
89
+ }
90
+ function ColorPickerContent({
91
+ value,
92
+ onChange,
93
+ presets = COLOR_PICKER_PRESETS
94
+ }) {
95
+ const [hexInput, setHexInput] = React.useState(value);
96
+ React.useEffect(() => {
97
+ setHexInput(value);
98
+ }, [value]);
99
+ function handleHexInputChange(e) {
100
+ const raw = e.target.value;
101
+ setHexInput(raw);
102
+ const normalized = normalizeHex(raw);
103
+ if (isValidHex(normalized)) {
104
+ onChange(normalized);
105
+ }
106
+ }
107
+ function handleHexBlur() {
108
+ const normalized = normalizeHex(hexInput);
109
+ if (isValidHex(normalized)) {
110
+ setHexInput(normalized);
111
+ if (normalized !== value) onChange(normalized);
112
+ } else {
113
+ setHexInput(value);
114
+ }
115
+ }
116
+ const normalizedInput = normalizeHex(hexInput);
117
+ const isValid = isValidHex(normalizedInput);
118
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "color-picker-content", className: "flex flex-col gap-4", children: [
119
+ /* @__PURE__ */ jsxs("div", { children: [
120
+ /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Presets" }),
121
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1.5", children: presets.map((color) => /* @__PURE__ */ jsx(
122
+ ColorSwatch,
123
+ {
124
+ color,
125
+ selected: value.toLowerCase() === color.toLowerCase(),
126
+ onClick: onChange
127
+ },
128
+ color
129
+ )) })
130
+ ] }),
131
+ /* @__PURE__ */ jsxs("div", { children: [
132
+ /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Custom hex" }),
133
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
134
+ /* @__PURE__ */ jsx(
135
+ "label",
136
+ {
137
+ className: "relative size-9 shrink-0 cursor-pointer border border-border",
138
+ title: "Open color picker",
139
+ style: {
140
+ backgroundColor: isValid ? normalizedInput : value
141
+ },
142
+ children: /* @__PURE__ */ jsx(
143
+ "input",
144
+ {
145
+ type: "color",
146
+ "aria-label": "Native color picker",
147
+ value: isValid ? normalizedInput : value,
148
+ onChange: (e) => {
149
+ setHexInput(e.target.value);
150
+ onChange(e.target.value);
151
+ },
152
+ className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
153
+ }
154
+ )
155
+ }
156
+ ),
157
+ /* @__PURE__ */ jsx(
158
+ Input,
159
+ {
160
+ "aria-label": "Hex color value",
161
+ placeholder: "#000000",
162
+ value: hexInput,
163
+ onChange: handleHexInputChange,
164
+ onBlur: handleHexBlur,
165
+ maxLength: 7,
166
+ className: "h-9 flex-1 font-mono text-sm uppercase"
167
+ }
168
+ )
169
+ ] })
170
+ ] })
171
+ ] });
172
+ }
173
+ function ColorPicker({
174
+ value: controlledValue,
175
+ defaultValue = "#3B82F6",
176
+ onChange,
177
+ presets,
178
+ disabled,
179
+ label,
180
+ className
181
+ }) {
182
+ const isControlled = controlledValue !== void 0;
183
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
184
+ const color = isControlled ? controlledValue : internalValue;
185
+ const [open, setOpen] = React.useState(false);
186
+ React.useEffect(() => {
187
+ if (disabled) setOpen(false);
188
+ }, [disabled]);
189
+ function handleChange(newColor) {
190
+ if (!isControlled) setInternalValue(newColor);
191
+ onChange == null ? void 0 : onChange(newColor);
192
+ }
193
+ return /* @__PURE__ */ jsxs(
194
+ "div",
195
+ {
196
+ "data-slot": "color-picker",
197
+ className: cn("inline-flex flex-col gap-1.5 font-sans", className),
198
+ children: [
199
+ label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: label }),
200
+ /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
201
+ /* @__PURE__ */ jsxs(
202
+ PopoverTrigger,
203
+ {
204
+ disabled,
205
+ className: cn(
206
+ "flex h-9 min-w-[140px] cursor-pointer items-center gap-2.5 border border-input bg-background px-3 text-sm outline-none transition-colors",
207
+ "hover:border-ring",
208
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
209
+ "disabled:cursor-not-allowed disabled:opacity-50"
210
+ ),
211
+ children: [
212
+ /* @__PURE__ */ jsx(
213
+ "span",
214
+ {
215
+ "aria-hidden": true,
216
+ className: "size-5 shrink-0 border border-border/50",
217
+ style: { backgroundColor: color }
218
+ }
219
+ ),
220
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-xs uppercase tracking-wide", children: color })
221
+ ]
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsx(
225
+ PopoverContent,
226
+ {
227
+ className: "w-[220px] p-4",
228
+ align: "start",
229
+ "data-shadcn-scope": true,
230
+ children: /* @__PURE__ */ jsx(
231
+ ColorPickerContent,
232
+ {
233
+ value: color,
234
+ onChange: handleChange,
235
+ presets
236
+ }
237
+ )
238
+ }
239
+ )
240
+ ] })
241
+ ]
242
+ }
243
+ );
244
+ }
245
+
246
+ export {
247
+ COLOR_PICKER_PRESETS,
248
+ isValidHex,
249
+ normalizeHex,
250
+ ColorSwatch,
251
+ ColorPickerContent,
252
+ ColorPicker
253
+ };
@@ -0,0 +1,169 @@
1
+ import {
2
+ Avatar,
3
+ AvatarFallback,
4
+ AvatarImage
5
+ } from "./chunk-24FUO7TD.mjs";
6
+ import {
7
+ Badge
8
+ } from "./chunk-BKNFWEH2.mjs";
9
+ import {
10
+ Separator
11
+ } from "./chunk-FH6QVUVZ.mjs";
12
+ import {
13
+ Button
14
+ } from "./chunk-XREGSKX3.mjs";
15
+
16
+ // src/components/ui/advisor-card.tsx
17
+ import {
18
+ Calendar,
19
+ CalendarCheck,
20
+ ChevronRight,
21
+ Mail,
22
+ MoreVertical,
23
+ Phone
24
+ } from "lucide-react";
25
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
26
+ var STATUS_VARIANT = {
27
+ pending: "warning",
28
+ confirmed: "success",
29
+ cancelled: "destructive",
30
+ rescheduled: "info"
31
+ };
32
+ var STATUS_LABEL = {
33
+ pending: "Pending",
34
+ confirmed: "Confirmed",
35
+ cancelled: "Cancelled",
36
+ rescheduled: "Rescheduled"
37
+ };
38
+ var STRIP_BG = {
39
+ pending: "bg-warning/5",
40
+ confirmed: "bg-success/5",
41
+ cancelled: "bg-destructive/5",
42
+ rescheduled: "bg-info/5"
43
+ };
44
+ function AdvisorCard({
45
+ name,
46
+ role,
47
+ phone,
48
+ email,
49
+ companyLogoUrl,
50
+ avatarInitials,
51
+ isPrimary = false,
52
+ appointment,
53
+ onRefer,
54
+ onMoreOptions,
55
+ onBookAppointment,
56
+ onViewAppointment
57
+ }) {
58
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col border border-border bg-card", children: [
59
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 p-4", children: [
60
+ /* @__PURE__ */ jsxs(Avatar, { className: "h-10 w-10 shrink-0", children: [
61
+ companyLogoUrl && /* @__PURE__ */ jsx(AvatarImage, { src: companyLogoUrl, alt: `${name} company logo` }),
62
+ /* @__PURE__ */ jsx(AvatarFallback, { className: "text-sm", children: avatarInitials != null ? avatarInitials : name.slice(0, 2).toUpperCase() })
63
+ ] }),
64
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
65
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold leading-tight", children: name }),
66
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: role }),
67
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [
68
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
69
+ /* @__PURE__ */ jsx(Phone, { className: "h-3 w-3 shrink-0" }),
70
+ /* @__PURE__ */ jsx("span", { children: phone })
71
+ ] }),
72
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
73
+ /* @__PURE__ */ jsx(Mail, { className: "h-3 w-3 shrink-0" }),
74
+ /* @__PURE__ */ jsx("span", { children: email })
75
+ ] })
76
+ ] })
77
+ ] }),
78
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
79
+ isPrimary && /* @__PURE__ */ jsx(Badge, { variant: "success", children: "Primary" }),
80
+ /* @__PURE__ */ jsx(
81
+ Button,
82
+ {
83
+ variant: "ghost",
84
+ size: "icon",
85
+ className: "h-7 w-7",
86
+ onClick: onMoreOptions,
87
+ "aria-label": "More options",
88
+ children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
89
+ }
90
+ )
91
+ ] })
92
+ ] }),
93
+ appointment !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
94
+ /* @__PURE__ */ jsx(Separator, {}),
95
+ appointment ? (
96
+ /* Has appointment */
97
+ /* @__PURE__ */ jsxs(
98
+ "div",
99
+ {
100
+ className: `flex items-center gap-3 px-4 py-3 ${STRIP_BG[appointment.status]}`,
101
+ children: [
102
+ /* @__PURE__ */ jsx(CalendarCheck, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
103
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
104
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
105
+ /* @__PURE__ */ jsx(
106
+ Badge,
107
+ {
108
+ variant: STATUS_VARIANT[appointment.status],
109
+ className: "text-[10px]",
110
+ children: STATUS_LABEL[appointment.status]
111
+ }
112
+ ),
113
+ appointment.appointmentType && /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: appointment.appointmentType })
114
+ ] }),
115
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
116
+ appointment.date,
117
+ " \xB7 ",
118
+ appointment.timeStart,
119
+ "\u2013",
120
+ appointment.timeEnd
121
+ ] })
122
+ ] }),
123
+ onViewAppointment && /* @__PURE__ */ jsxs(
124
+ Button,
125
+ {
126
+ variant: "ghost",
127
+ size: "sm",
128
+ className: "h-7 shrink-0 gap-1 px-2 text-xs",
129
+ onClick: onViewAppointment,
130
+ children: [
131
+ "View",
132
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3" })
133
+ ]
134
+ }
135
+ )
136
+ ]
137
+ }
138
+ )
139
+ ) : (
140
+ /* No appointment */
141
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3", children: [
142
+ /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
143
+ /* @__PURE__ */ jsx("p", { className: "flex-1 text-xs text-muted-foreground", children: "No upcoming appointments" })
144
+ ] })
145
+ )
146
+ ] }),
147
+ /* @__PURE__ */ jsx(Separator, {}),
148
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
149
+ onBookAppointment && /* @__PURE__ */ jsx(
150
+ Button,
151
+ {
152
+ variant: "outline-primary",
153
+ size: "sm",
154
+ onClick: onBookAppointment,
155
+ children: "Book Appointment"
156
+ }
157
+ ),
158
+ onRefer && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onRefer, children: [
159
+ "Refer ",
160
+ name,
161
+ " to Others"
162
+ ] })
163
+ ] })
164
+ ] });
165
+ }
166
+
167
+ export {
168
+ AdvisorCard
169
+ };
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  KanbanColumn
3
- } from "./chunk-VACKZOMY.mjs";
3
+ } from "./chunk-R3VSPKNP.mjs";
4
4
  import {
5
5
  ToggleGroup,
6
6
  ToggleGroupItem
7
- } from "./chunk-PMB3A7V3.mjs";
7
+ } from "./chunk-EI5F6FMT.mjs";
8
8
  import {
9
9
  Input
10
10
  } from "./chunk-GYMYRIZP.mjs";
11
+ import {
12
+ Button
13
+ } from "./chunk-XREGSKX3.mjs";
11
14
  import {
12
15
  cn
13
16
  } from "./chunk-VLQZANBF.mjs";
@@ -36,10 +39,13 @@ function Toolbar({
36
39
  }
37
40
  ),
38
41
  searchValue && /* @__PURE__ */ jsx(
39
- "button",
42
+ Button,
40
43
  {
44
+ type: "button",
45
+ variant: "ghost",
46
+ size: "icon",
41
47
  onClick: () => onSearchChange(""),
42
- className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
48
+ className: "absolute right-2 top-1/2 size-6 -translate-y-1/2 text-muted-foreground hover:text-foreground",
43
49
  "aria-label": "Clear search",
44
50
  children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
45
51
  }
@@ -62,8 +68,11 @@ function Toolbar({
62
68
  }
63
69
  ),
64
70
  onRefresh && /* @__PURE__ */ jsx(
65
- "button",
71
+ Button,
66
72
  {
73
+ type: "button",
74
+ variant: "ghost",
75
+ size: "icon",
67
76
  onClick: onRefresh,
68
77
  className: "ml-auto text-muted-foreground hover:text-foreground",
69
78
  "aria-label": "Refresh board",