@wealthx/shadcn 1.3.0 → 1.3.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.
@@ -0,0 +1,449 @@
1
+ import {
2
+ Tooltip,
3
+ TooltipContent,
4
+ TooltipProvider,
5
+ TooltipTrigger
6
+ } from "./chunk-6JQFUE5I.mjs";
7
+ import {
8
+ formatCurrency
9
+ } from "./chunk-MN5NYQCL.mjs";
10
+ import {
11
+ Accordion,
12
+ AccordionContent,
13
+ AccordionItem
14
+ } from "./chunk-MARPPFOJ.mjs";
15
+ import {
16
+ Button
17
+ } from "./chunk-XREGSKX3.mjs";
18
+ import {
19
+ cn
20
+ } from "./chunk-VLQZANBF.mjs";
21
+
22
+ // src/components/ui/sidebar-nav.tsx
23
+ import * as React from "react";
24
+ import {
25
+ ChevronDown,
26
+ ChevronRight,
27
+ Info,
28
+ LogOut,
29
+ PanelLeftClose,
30
+ PanelLeftOpen
31
+ } from "lucide-react";
32
+ import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
33
+ import { jsx, jsxs } from "react/jsx-runtime";
34
+ function getInitials(name) {
35
+ return name.split(" ").filter(Boolean).map((word) => word[0]).join("").toUpperCase().slice(0, 2);
36
+ }
37
+ function navIconCn(isActive) {
38
+ return cn(
39
+ "shrink-0 transition-colors",
40
+ isActive ? "text-primary" : "text-brand-secondary-foreground/50 group-hover:text-brand-secondary-foreground"
41
+ );
42
+ }
43
+ function NavTooltip({ label, collapsed, children }) {
44
+ if (!collapsed) return children;
45
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
46
+ /* @__PURE__ */ jsx(TooltipTrigger, { render: children }),
47
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", children: label })
48
+ ] });
49
+ }
50
+ function MetricsGroup({ group }) {
51
+ return /* @__PURE__ */ jsx("div", { className: "border-b border-white/15 py-4 px-5 flex flex-col gap-1.5", children: group.items.map((item) => /* @__PURE__ */ jsxs(
52
+ "div",
53
+ {
54
+ className: "flex items-center justify-between gap-2",
55
+ children: [
56
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 min-w-0", children: [
57
+ /* @__PURE__ */ jsx(
58
+ "span",
59
+ {
60
+ className: cn(
61
+ "text-sm truncate text-brand-secondary-foreground/80",
62
+ item.isNetItem && "font-semibold text-brand-secondary-foreground border-b-2 border-primary pb-px"
63
+ ),
64
+ children: item.name
65
+ }
66
+ ),
67
+ item.info && /* @__PURE__ */ jsx(
68
+ Info,
69
+ {
70
+ size: 11,
71
+ strokeWidth: 2,
72
+ className: "shrink-0 text-brand-secondary-foreground/50"
73
+ }
74
+ )
75
+ ] }),
76
+ /* @__PURE__ */ jsx(
77
+ "span",
78
+ {
79
+ className: cn(
80
+ "text-sm font-semibold tabular-nums shrink-0 text-brand-secondary-foreground",
81
+ item.isNetItem && item.value < 0 && "text-destructive"
82
+ ),
83
+ children: formatCurrency(item.value, { showSign: item.isNetItem })
84
+ }
85
+ )
86
+ ]
87
+ },
88
+ item.name
89
+ )) });
90
+ }
91
+ function SidebarNavItemView({
92
+ item,
93
+ collapsed,
94
+ onNavigate
95
+ }) {
96
+ var _a;
97
+ const Icon = item.icon;
98
+ return /* @__PURE__ */ jsx(NavTooltip, { label: item.title, collapsed, children: /* @__PURE__ */ jsxs(
99
+ Button,
100
+ {
101
+ type: "button",
102
+ variant: "ghost",
103
+ onClick: () => onNavigate == null ? void 0 : onNavigate(item.href),
104
+ className: cn(
105
+ "group h-auto w-full items-center gap-3 py-2.5 text-base font-medium transition-colors",
106
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
107
+ collapsed ? "justify-center px-2" : cn(
108
+ "justify-start px-3 border-l-4",
109
+ item.isActive ? "bg-white/15 text-brand-secondary-foreground border-primary" : "border-transparent"
110
+ )
111
+ ),
112
+ children: [
113
+ /* @__PURE__ */ jsx(
114
+ Icon,
115
+ {
116
+ className: navIconCn((_a = item.isActive) != null ? _a : false),
117
+ size: 24,
118
+ strokeWidth: 1.75
119
+ }
120
+ ),
121
+ !collapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: item.title })
122
+ ]
123
+ }
124
+ ) });
125
+ }
126
+ function CollapsibleNavItem({
127
+ item,
128
+ collapsed,
129
+ onNavigate
130
+ }) {
131
+ var _a, _b;
132
+ const Icon = item.icon;
133
+ const hasActiveChild = (_b = (_a = item.subItems) == null ? void 0 : _a.some((sub) => sub.isActive)) != null ? _b : false;
134
+ const [open, setOpen] = React.useState(hasActiveChild);
135
+ React.useEffect(() => {
136
+ if (hasActiveChild) setOpen(true);
137
+ }, [hasActiveChild]);
138
+ if (collapsed) {
139
+ return /* @__PURE__ */ jsx(NavTooltip, { label: item.title, collapsed, children: /* @__PURE__ */ jsx(
140
+ Button,
141
+ {
142
+ type: "button",
143
+ variant: "ghost",
144
+ onClick: () => onNavigate == null ? void 0 : onNavigate(item.href),
145
+ className: cn(
146
+ "group h-auto w-full justify-center px-2 py-2.5 transition-colors",
147
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
148
+ hasActiveChild && "bg-white/15 text-brand-secondary-foreground"
149
+ ),
150
+ children: /* @__PURE__ */ jsx(
151
+ Icon,
152
+ {
153
+ className: navIconCn(hasActiveChild),
154
+ size: 24,
155
+ strokeWidth: 1.75
156
+ }
157
+ )
158
+ }
159
+ ) });
160
+ }
161
+ return /* @__PURE__ */ jsx(
162
+ Accordion,
163
+ {
164
+ value: open ? [item.href] : [],
165
+ onValueChange: (values) => setOpen(values.length > 0),
166
+ children: /* @__PURE__ */ jsxs(AccordionItem, { className: "border-none", value: item.href, children: [
167
+ /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
168
+ AccordionPrimitive.Trigger,
169
+ {
170
+ className: cn(
171
+ "group flex h-auto w-full items-center justify-start gap-3 px-3 py-2.5 text-base font-medium transition-colors",
172
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground",
173
+ "border-l-4 border-transparent",
174
+ hasActiveChild && "bg-white/15 text-brand-secondary-foreground border-primary"
175
+ ),
176
+ children: [
177
+ /* @__PURE__ */ jsx(
178
+ Icon,
179
+ {
180
+ className: navIconCn(hasActiveChild),
181
+ size: 24,
182
+ strokeWidth: 1.75
183
+ }
184
+ ),
185
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: item.title }),
186
+ /* @__PURE__ */ jsx(
187
+ ChevronDown,
188
+ {
189
+ className: cn(
190
+ "ml-auto shrink-0 text-brand-secondary-foreground/40 transition-transform duration-200",
191
+ "group-data-[panel-open]:rotate-180"
192
+ ),
193
+ size: 14,
194
+ strokeWidth: 2
195
+ }
196
+ )
197
+ ]
198
+ }
199
+ ) }),
200
+ item.subItems && /* @__PURE__ */ jsx(AccordionContent, { className: "p-0 text-inherit", children: /* @__PURE__ */ jsx("div", { className: "ml-9 border-l border-white/15 pl-3", children: item.subItems.map((sub) => /* @__PURE__ */ jsxs(
201
+ Button,
202
+ {
203
+ type: "button",
204
+ variant: "ghost",
205
+ onClick: () => onNavigate == null ? void 0 : onNavigate(sub.href),
206
+ className: cn(
207
+ "h-auto w-full justify-start gap-2 py-1.5 pl-1 text-sm transition-colors",
208
+ "text-brand-secondary-foreground/50 hover:text-brand-secondary-foreground",
209
+ sub.isActive && "text-primary font-medium"
210
+ ),
211
+ children: [
212
+ /* @__PURE__ */ jsx(
213
+ ChevronRight,
214
+ {
215
+ size: 11,
216
+ strokeWidth: 2,
217
+ className: cn(
218
+ "shrink-0",
219
+ sub.isActive ? "text-primary" : "text-brand-secondary-foreground/30"
220
+ )
221
+ }
222
+ ),
223
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: sub.title })
224
+ ]
225
+ },
226
+ sub.href
227
+ )) }) })
228
+ ] })
229
+ }
230
+ );
231
+ }
232
+ function SidebarNav({
233
+ items,
234
+ userName = "Anonymous User",
235
+ collapsed = false,
236
+ logo,
237
+ logoCollapsed,
238
+ metricsGroups,
239
+ onNavigate,
240
+ onLogout,
241
+ onCollapsedChange,
242
+ className
243
+ }) {
244
+ const [userMenuOpen, setUserMenuOpen] = React.useState(false);
245
+ const navScrollRef = React.useRef(null);
246
+ const expandedScrollRef = React.useRef(0);
247
+ React.useEffect(() => {
248
+ if (collapsed) setUserMenuOpen(false);
249
+ }, [collapsed]);
250
+ React.useLayoutEffect(() => {
251
+ const nav = navScrollRef.current;
252
+ if (!nav) return;
253
+ if (!collapsed) {
254
+ nav.scrollTop = expandedScrollRef.current;
255
+ }
256
+ return () => {
257
+ if (!collapsed && nav) {
258
+ expandedScrollRef.current = nav.scrollTop;
259
+ }
260
+ };
261
+ }, [collapsed]);
262
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(
263
+ "nav",
264
+ {
265
+ "data-slot": "sidebar-nav",
266
+ "data-collapsed": collapsed,
267
+ className: cn(
268
+ // Force dark-mode CSS variable resolution — sidebar is always dark-backgrounded
269
+ // regardless of system theme, so semantic tokens (destructive, success, etc.)
270
+ // must use their dark-mode values to maintain WCAG contrast.
271
+ "dark flex h-full flex-col bg-brand-secondary text-brand-secondary-foreground",
272
+ "transition-all duration-200 ease-in-out",
273
+ collapsed ? "w-14" : "w-[279px]",
274
+ className
275
+ ),
276
+ children: [
277
+ (logo || logoCollapsed) && /* @__PURE__ */ jsxs("div", { className: "relative flex items-center border-b border-white/15 py-4 overflow-hidden", children: [
278
+ logo && /* @__PURE__ */ jsx(
279
+ "img",
280
+ {
281
+ src: logo,
282
+ alt: "Logo",
283
+ className: cn(
284
+ "h-8 w-auto object-contain object-left px-5 transition-opacity duration-200",
285
+ collapsed ? "opacity-0" : "opacity-100"
286
+ ),
287
+ style: { filter: "brightness(0) invert(1)" }
288
+ }
289
+ ),
290
+ logoCollapsed && /* @__PURE__ */ jsx(
291
+ "img",
292
+ {
293
+ src: logoCollapsed,
294
+ alt: "Logo",
295
+ className: cn(
296
+ "absolute inset-y-0 left-0 right-0 m-auto h-8 w-8 object-contain transition-opacity duration-200",
297
+ collapsed ? "opacity-100" : "opacity-0"
298
+ ),
299
+ style: { filter: "brightness(0) invert(1)" }
300
+ }
301
+ )
302
+ ] }),
303
+ /* @__PURE__ */ jsxs("div", { className: "relative border-b border-white/15", children: [
304
+ /* @__PURE__ */ jsx(
305
+ "div",
306
+ {
307
+ className: cn(
308
+ collapsed ? "opacity-0 pointer-events-none" : "opacity-100"
309
+ ),
310
+ children: /* @__PURE__ */ jsx(
311
+ Accordion,
312
+ {
313
+ value: userMenuOpen ? ["user-menu"] : [],
314
+ onValueChange: (values) => setUserMenuOpen(values.length > 0),
315
+ children: /* @__PURE__ */ jsxs(AccordionItem, { className: "border-none", value: "user-menu", children: [
316
+ /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
317
+ AccordionPrimitive.Trigger,
318
+ {
319
+ className: cn(
320
+ "group flex h-auto w-full items-center justify-start gap-3 px-5 py-5 text-base transition-colors",
321
+ "text-brand-secondary-foreground hover:bg-white/10"
322
+ ),
323
+ children: [
324
+ /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) }),
325
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left font-medium text-brand-secondary-foreground", children: userName }),
326
+ /* @__PURE__ */ jsx(
327
+ ChevronDown,
328
+ {
329
+ className: "ml-auto shrink-0 text-brand-secondary-foreground/50 transition-transform duration-200 group-data-[panel-open]:rotate-180",
330
+ size: 16,
331
+ strokeWidth: 2
332
+ }
333
+ )
334
+ ]
335
+ }
336
+ ) }),
337
+ /* @__PURE__ */ jsx(AccordionContent, { className: "p-0 text-inherit", children: /* @__PURE__ */ jsx("div", { className: "border-t border-white/15 bg-black/20", children: /* @__PURE__ */ jsxs(
338
+ Button,
339
+ {
340
+ type: "button",
341
+ variant: "ghost",
342
+ onClick: onLogout,
343
+ className: cn(
344
+ "h-auto w-full justify-start gap-3 px-5 py-3 text-base",
345
+ "text-brand-secondary-foreground/70 hover:bg-white/10 hover:text-brand-secondary-foreground transition-colors"
346
+ ),
347
+ children: [
348
+ /* @__PURE__ */ jsx(
349
+ LogOut,
350
+ {
351
+ size: 16,
352
+ strokeWidth: 1.75,
353
+ className: "shrink-0 text-destructive"
354
+ }
355
+ ),
356
+ /* @__PURE__ */ jsx("span", { children: "Logout" })
357
+ ]
358
+ }
359
+ ) }) })
360
+ ] })
361
+ }
362
+ )
363
+ }
364
+ ),
365
+ /* @__PURE__ */ jsx(NavTooltip, { label: userName, collapsed, children: /* @__PURE__ */ jsx(
366
+ "div",
367
+ {
368
+ className: cn(
369
+ "absolute inset-0 flex items-center justify-center transition-opacity duration-200",
370
+ collapsed ? "opacity-100" : "opacity-0 pointer-events-none"
371
+ ),
372
+ children: /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center font-semibold text-xs bg-primary text-primary-foreground", children: getInitials(userName) })
373
+ }
374
+ ) })
375
+ ] }),
376
+ !!(metricsGroups == null ? void 0 : metricsGroups.length) && /* @__PURE__ */ jsx(
377
+ Accordion,
378
+ {
379
+ value: !collapsed ? ["metrics"] : [],
380
+ onValueChange: () => {
381
+ },
382
+ children: /* @__PURE__ */ jsx(AccordionItem, { className: "border-none", value: "metrics", children: /* @__PURE__ */ jsx(AccordionContent, { className: "p-0 text-inherit", children: metricsGroups.map((group, i) => /* @__PURE__ */ jsx(MetricsGroup, { group }, i)) }) })
383
+ }
384
+ ),
385
+ /* @__PURE__ */ jsx("div", { ref: navScrollRef, className: "flex flex-col overflow-y-auto py-3", children: items.map(
386
+ (item) => item.isCollapsible ? /* @__PURE__ */ jsx(
387
+ CollapsibleNavItem,
388
+ {
389
+ item,
390
+ collapsed,
391
+ onNavigate
392
+ },
393
+ item.href
394
+ ) : /* @__PURE__ */ jsx(
395
+ SidebarNavItemView,
396
+ {
397
+ item,
398
+ collapsed,
399
+ onNavigate
400
+ },
401
+ item.href
402
+ )
403
+ ) }),
404
+ onCollapsedChange && /* @__PURE__ */ jsx("div", { className: "mt-auto border-t border-white/15 bg-white/8", children: /* @__PURE__ */ jsx(
405
+ NavTooltip,
406
+ {
407
+ label: collapsed ? "Expand" : "Collapse",
408
+ collapsed,
409
+ children: /* @__PURE__ */ jsxs(
410
+ Button,
411
+ {
412
+ type: "button",
413
+ variant: "ghost",
414
+ onClick: () => onCollapsedChange(!collapsed),
415
+ className: cn(
416
+ "h-12 w-full justify-start gap-3 px-3 py-3 transition-colors",
417
+ "text-brand-secondary-foreground/80 hover:bg-white/10 hover:text-brand-secondary-foreground",
418
+ collapsed && "justify-center px-2"
419
+ ),
420
+ children: [
421
+ collapsed ? /* @__PURE__ */ jsx(
422
+ PanelLeftOpen,
423
+ {
424
+ size: 24,
425
+ strokeWidth: 1.75,
426
+ className: "shrink-0"
427
+ }
428
+ ) : /* @__PURE__ */ jsx(
429
+ PanelLeftClose,
430
+ {
431
+ size: 24,
432
+ strokeWidth: 1.75,
433
+ className: "shrink-0"
434
+ }
435
+ ),
436
+ !collapsed && /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Collapse" })
437
+ ]
438
+ }
439
+ )
440
+ }
441
+ ) })
442
+ ]
443
+ }
444
+ ) });
445
+ }
446
+
447
+ export {
448
+ SidebarNav
449
+ };
@@ -14,13 +14,15 @@ import {
14
14
  } from "./chunk-XREGSKX3.mjs";
15
15
 
16
16
  // src/components/ui/advisor-card.tsx
17
+ import React from "react";
17
18
  import {
18
19
  Calendar,
19
20
  CalendarCheck,
20
21
  ChevronRight,
21
22
  Mail,
22
23
  MoreVertical,
23
- Phone
24
+ Phone,
25
+ Plus
24
26
  } from "lucide-react";
25
27
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
26
28
  var STATUS_VARIANT = {
@@ -46,31 +48,34 @@ function AdvisorCard({
46
48
  role,
47
49
  phone,
48
50
  email,
51
+ companyName,
49
52
  companyLogoUrl,
50
53
  avatarInitials,
51
54
  isPrimary = false,
52
- appointment,
55
+ appointments,
53
56
  onRefer,
54
57
  onMoreOptions,
55
58
  onBookAppointment,
56
59
  onViewAppointment
57
60
  }) {
61
+ const hasAppointments = appointments !== void 0;
62
+ const appointmentList = appointments === null || Array.isArray(appointments) && appointments.length === 0 ? null : appointments;
58
63
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col border border-border bg-card", children: [
59
64
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 p-4", children: [
60
65
  /* @__PURE__ */ jsxs(Avatar, { className: "h-10 w-10 shrink-0", children: [
61
66
  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() })
67
+ /* @__PURE__ */ jsx(AvatarFallback, { className: "text-sm", children: avatarInitials != null ? avatarInitials : companyName ? companyName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() : name.slice(0, 2).toUpperCase() })
63
68
  ] }),
64
69
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
65
70
  /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold leading-tight", children: name }),
66
71
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: role }),
67
72
  /* @__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" }),
73
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
74
+ /* @__PURE__ */ jsx(Phone, { className: "h-4 w-4 shrink-0" }),
70
75
  /* @__PURE__ */ jsx("span", { children: phone })
71
76
  ] }),
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" }),
77
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
78
+ /* @__PURE__ */ jsx(Mail, { className: "h-4 w-4 shrink-0" }),
74
79
  /* @__PURE__ */ jsx("span", { children: email })
75
80
  ] })
76
81
  ] })
@@ -90,14 +95,14 @@ function AdvisorCard({
90
95
  )
91
96
  ] })
92
97
  ] }),
93
- appointment !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
98
+ hasAppointments && /* @__PURE__ */ jsxs(Fragment, { children: [
94
99
  /* @__PURE__ */ jsx(Separator, {}),
95
- appointment ? (
96
- /* Has appointment */
100
+ appointmentList ? appointmentList.map((appt, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
101
+ i > 0 && /* @__PURE__ */ jsx(Separator, {}),
97
102
  /* @__PURE__ */ jsxs(
98
103
  "div",
99
104
  {
100
- className: `flex items-center gap-3 px-4 py-3 ${STRIP_BG[appointment.status]}`,
105
+ className: `flex items-center gap-3 px-4 py-3 ${STRIP_BG[appt.status]}`,
101
106
  children: [
102
107
  /* @__PURE__ */ jsx(CalendarCheck, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
103
108
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
@@ -105,19 +110,19 @@ function AdvisorCard({
105
110
  /* @__PURE__ */ jsx(
106
111
  Badge,
107
112
  {
108
- variant: STATUS_VARIANT[appointment.status],
113
+ variant: STATUS_VARIANT[appt.status],
109
114
  className: "text-[10px]",
110
- children: STATUS_LABEL[appointment.status]
115
+ children: STATUS_LABEL[appt.status]
111
116
  }
112
117
  ),
113
- appointment.appointmentType && /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: appointment.appointmentType })
118
+ appt.appointmentType && /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold", children: appt.appointmentType })
114
119
  ] }),
115
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
116
- appointment.date,
120
+ /* @__PURE__ */ jsxs("p", { className: "whitespace-nowrap text-sm text-muted-foreground", children: [
121
+ appt.date,
117
122
  " \xB7 ",
118
- appointment.timeStart,
123
+ appt.timeStart,
119
124
  "\u2013",
120
- appointment.timeEnd
125
+ appt.timeEnd
121
126
  ] })
122
127
  ] }),
123
128
  onViewAppointment && /* @__PURE__ */ jsxs(
@@ -126,7 +131,7 @@ function AdvisorCard({
126
131
  variant: "ghost",
127
132
  size: "sm",
128
133
  className: "h-7 shrink-0 gap-1 px-2 text-xs",
129
- onClick: onViewAppointment,
134
+ onClick: () => onViewAppointment(i),
130
135
  children: [
131
136
  "View",
132
137
  /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3" })
@@ -136,8 +141,8 @@ function AdvisorCard({
136
141
  ]
137
142
  }
138
143
  )
139
- ) : (
140
- /* No appointment */
144
+ ] }, i)) : (
145
+ /* Empty state */
141
146
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-4 py-3", children: [
142
147
  /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
143
148
  /* @__PURE__ */ jsx("p", { className: "flex-1 text-xs text-muted-foreground", children: "No upcoming appointments" })
@@ -145,25 +150,53 @@ function AdvisorCard({
145
150
  )
146
151
  ] }),
147
152
  /* @__PURE__ */ jsx(Separator, {}),
148
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
153
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-4 py-3", children: [
149
154
  onBookAppointment && /* @__PURE__ */ jsx(
150
155
  Button,
151
156
  {
152
157
  variant: "outline-primary",
153
158
  size: "sm",
159
+ className: "w-full",
154
160
  onClick: onBookAppointment,
155
161
  children: "Book Appointment"
156
162
  }
157
163
  ),
158
- onRefer && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onRefer, children: [
159
- "Refer ",
160
- name,
161
- " to Others"
162
- ] })
164
+ onRefer && /* @__PURE__ */ jsxs(
165
+ Button,
166
+ {
167
+ variant: "outline",
168
+ size: "sm",
169
+ className: "w-full",
170
+ onClick: onRefer,
171
+ children: [
172
+ "Refer ",
173
+ name,
174
+ " to Others"
175
+ ]
176
+ }
177
+ )
163
178
  ] })
164
179
  ] });
165
180
  }
181
+ function AdvisorInviteCard({ onInvite }) {
182
+ return /* @__PURE__ */ jsxs(
183
+ Button,
184
+ {
185
+ variant: "ghost",
186
+ onClick: onInvite,
187
+ className: "flex h-auto w-full flex-col items-center justify-center gap-3 border border-dashed border-border bg-card p-8 text-center transition-colors hover:bg-muted/40",
188
+ children: [
189
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center border border-dashed border-muted-foreground/40", children: /* @__PURE__ */ jsx(Plus, { className: "h-5 w-5 text-muted-foreground" }) }),
190
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
191
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Add Another Advisor" }),
192
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Connect more advisors to your account" })
193
+ ] })
194
+ ]
195
+ }
196
+ );
197
+ }
166
198
 
167
199
  export {
168
- AdvisorCard
200
+ AdvisorCard,
201
+ AdvisorInviteCard
169
202
  };