@wealthx/shadcn 1.5.9 → 1.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +157 -157
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-AANINK2B.mjs → chunk-2KNQZG5S.mjs} +1 -1
- package/dist/chunk-3KLJ4XRE.mjs +375 -0
- package/dist/{chunk-6U4NQGVM.mjs → chunk-4X4MGYHE.mjs} +2 -2
- package/dist/{chunk-CEEVYRQA.mjs → chunk-67DGIPQ4.mjs} +1 -1
- package/dist/{chunk-7UIL5UN3.mjs → chunk-7II6QRCZ.mjs} +1 -1
- package/dist/{chunk-W5QJ57PU.mjs → chunk-7LN5OGC2.mjs} +1 -1
- package/dist/{chunk-ZXEUBBHJ.mjs → chunk-7TMPOZDE.mjs} +1 -1
- package/dist/{chunk-AHSCWXYJ.mjs → chunk-AJUAJC5O.mjs} +1 -1
- package/dist/{chunk-3CGM3QXQ.mjs → chunk-AKWN5ZQG.mjs} +2 -2
- package/dist/{chunk-FRT3S72S.mjs → chunk-CQ7HKBEX.mjs} +1 -1
- package/dist/{chunk-E2BNCA6L.mjs → chunk-EHQL64B7.mjs} +1 -1
- package/dist/{chunk-2WCIORP7.mjs → chunk-EXI64H46.mjs} +1 -1
- package/dist/{chunk-BBXSNDS3.mjs → chunk-FQYFPHDO.mjs} +1 -1
- package/dist/{chunk-3VZ6CYY2.mjs → chunk-GAXNO4JB.mjs} +1 -1
- package/dist/{chunk-3WGFIFP6.mjs → chunk-I4P7RXAE.mjs} +1 -1
- package/dist/{chunk-TAFL4WDY.mjs → chunk-IODGRCQG.mjs} +17 -10
- package/dist/{chunk-GS47ZSSA.mjs → chunk-J7KQON2N.mjs} +20 -5
- package/dist/{chunk-IQGKOT7A.mjs → chunk-K35TFQUB.mjs} +1 -1
- package/dist/{chunk-4DO3WM7V.mjs → chunk-K4VWSDJJ.mjs} +1 -1
- package/dist/{chunk-KWD6GANL.mjs → chunk-MPA2HV5U.mjs} +1 -1
- package/dist/{chunk-5LZZYODG.mjs → chunk-QHAMVWDG.mjs} +19 -1
- package/dist/{chunk-XUCDPAVI.mjs → chunk-R6U246E4.mjs} +2 -2
- package/dist/{chunk-VCDGLN25.mjs → chunk-S6AYZJYO.mjs} +47 -21
- package/dist/{chunk-WL6WVV47.mjs → chunk-X6RC5UWB.mjs} +1 -1
- package/dist/{chunk-4BHDDLWK.mjs → chunk-XAS6KBIG.mjs} +2 -2
- package/dist/{chunk-VWZS32ZQ.mjs → chunk-XYWEGBAA.mjs} +1 -1
- package/dist/{chunk-54MTIKNC.mjs → chunk-YV7XF32X.mjs} +49 -24
- package/dist/{chunk-E5EDZQ5J.mjs → chunk-ZA44WICP.mjs} +1 -1
- package/dist/{chunk-54TRNCID.mjs → chunk-ZMTCMP2G.mjs} +8 -8
- package/dist/components/ui/advisor-card.js +144 -55
- package/dist/components/ui/advisor-card.mjs +5 -2
- package/dist/components/ui/agent-evaluation-toast.js +1 -1
- package/dist/components/ui/agent-evaluation-toast.mjs +2 -2
- package/dist/components/ui/ai-assistant-drawer.js +1 -1
- package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
- package/dist/components/ui/ai-builder.js +1 -1
- package/dist/components/ui/ai-builder.mjs +2 -2
- package/dist/components/ui/ai-conversations.js +1 -1
- package/dist/components/ui/ai-conversations.mjs +3 -3
- package/dist/components/ui/appointment-action-dialogs.js +1 -1
- package/dist/components/ui/appointment-action-dialogs.mjs +3 -3
- package/dist/components/ui/appointment-book-dialog.js +19 -4
- package/dist/components/ui/appointment-book-dialog.mjs +3 -3
- package/dist/components/ui/appointment-calendar-view.js +17 -10
- package/dist/components/ui/appointment-calendar-view.mjs +2 -2
- package/dist/components/ui/appointment-detail-sheet.js +1 -1
- package/dist/components/ui/appointment-detail-sheet.mjs +4 -4
- package/dist/components/ui/appointment-gmail-connect.js +1 -1
- package/dist/components/ui/appointment-gmail-connect.mjs +2 -2
- package/dist/components/ui/appointment-time-slot-picker.js +1 -1
- package/dist/components/ui/appointment-time-slot-picker.mjs +2 -2
- package/dist/components/ui/appointment-upcoming-card.js +1 -1
- package/dist/components/ui/appointment-upcoming-card.mjs +3 -3
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/badge.mjs +1 -1
- package/dist/components/ui/chat-widget-primitives.js +1 -1
- package/dist/components/ui/chat-widget-primitives.mjs +2 -2
- package/dist/components/ui/chat-widget.js +1 -1
- package/dist/components/ui/chat-widget.mjs +3 -3
- package/dist/components/ui/chip.js +1 -1
- package/dist/components/ui/chip.mjs +2 -2
- package/dist/components/ui/contact-alert-dialog/index.js +19 -1
- package/dist/components/ui/contact-alert-dialog/index.mjs +1 -1
- package/dist/components/ui/dashboard-transactions-table.js +1 -1
- package/dist/components/ui/dashboard-transactions-table.mjs +2 -2
- package/dist/components/ui/financial-cards.js +1 -1
- package/dist/components/ui/financial-cards.mjs +2 -2
- package/dist/components/ui/financial-sections.js +1 -1
- package/dist/components/ui/financial-sections.mjs +3 -3
- package/dist/components/ui/income-summary-component.js +1 -1
- package/dist/components/ui/income-summary-component.mjs +1 -1
- package/dist/components/ui/integration-card.js +1 -1
- package/dist/components/ui/integration-card.mjs +2 -2
- package/dist/components/ui/kanban-column.js +46 -23
- package/dist/components/ui/kanban-column.mjs +4 -4
- package/dist/components/ui/loan-applicant-information.js +1 -1
- package/dist/components/ui/loan-applicant-information.mjs +1 -1
- package/dist/components/ui/loan-application-badge.js +1 -1
- package/dist/components/ui/loan-application-badge.mjs +2 -2
- package/dist/components/ui/opportunity-card.js +46 -23
- package/dist/components/ui/opportunity-card.mjs +3 -3
- package/dist/components/ui/opportunity-summary-tab.js +1 -1
- package/dist/components/ui/opportunity-summary-tab.mjs +3 -3
- package/dist/components/ui/pipeline-board.js +46 -23
- package/dist/components/ui/pipeline-board.mjs +5 -5
- package/dist/components/ui/pipeline-primitives.js +1 -1
- package/dist/components/ui/pipeline-primitives.mjs +2 -2
- package/dist/components/ui/property-asset-card.js +1 -1
- package/dist/components/ui/property-asset-card.mjs +1 -1
- package/dist/components/ui/resource-center.js +1 -1
- package/dist/components/ui/resource-center.mjs +2 -2
- package/dist/components/ui/share-details-dialog.js +326 -30
- package/dist/components/ui/share-details-dialog.mjs +4 -1
- package/dist/components/ui/stage-timeline.js +1 -1
- package/dist/components/ui/stage-timeline.mjs +3 -3
- package/dist/index.js +473 -197
- package/dist/index.mjs +44 -42
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/index.tsx +4 -0
- package/src/components/ui/advisor-card.tsx +75 -25
- package/src/components/ui/appointment-book-dialog.tsx +26 -3
- package/src/components/ui/appointment-calendar-view.tsx +7 -6
- package/src/components/ui/appointment-time-slot-picker.tsx +1 -0
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/contact-alert-dialog/contact-alert-dialog.tsx +19 -1
- package/src/components/ui/opportunity-card.tsx +56 -20
- package/src/components/ui/share-details-dialog.tsx +251 -0
- package/src/styles/styles-css.ts +1 -1
- package/dist/chunk-OZ2R6ERP.mjs +0 -174
|
@@ -12,6 +12,8 @@ import { Input } from "@/components/ui/input";
|
|
|
12
12
|
import { Label } from "@/components/ui/label";
|
|
13
13
|
import { Spinner } from "@/components/ui/spinner";
|
|
14
14
|
import { Textarea } from "@/components/ui/textarea";
|
|
15
|
+
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
|
|
16
|
+
import { cn } from "@/lib/utils";
|
|
15
17
|
|
|
16
18
|
// ---------------------------------------------------------------------------
|
|
17
19
|
// Shared helper
|
|
@@ -236,3 +238,252 @@ export function EmailTemplateDialog({
|
|
|
236
238
|
</Dialog>
|
|
237
239
|
);
|
|
238
240
|
}
|
|
241
|
+
|
|
242
|
+
// ---------------------------------------------------------------------------
|
|
243
|
+
// ShareContactDialog
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
|
|
246
|
+
export interface InternalAdvisor {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
role: string;
|
|
250
|
+
practice: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface ShareContactDialogProps {
|
|
254
|
+
open: boolean;
|
|
255
|
+
onOpenChange: (open: boolean) => void;
|
|
256
|
+
contactName: string;
|
|
257
|
+
internalAdvisors: InternalAdvisor[];
|
|
258
|
+
onShareInternal: (advisorId: string, notes: string) => void;
|
|
259
|
+
onShareExternal: (payload: {
|
|
260
|
+
firstName: string;
|
|
261
|
+
lastName: string;
|
|
262
|
+
email: string;
|
|
263
|
+
notes: string;
|
|
264
|
+
}) => void;
|
|
265
|
+
isSending?: boolean;
|
|
266
|
+
className?: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function ShareContactDialog({
|
|
270
|
+
open,
|
|
271
|
+
onOpenChange,
|
|
272
|
+
contactName,
|
|
273
|
+
internalAdvisors,
|
|
274
|
+
onShareInternal,
|
|
275
|
+
onShareExternal,
|
|
276
|
+
isSending = false,
|
|
277
|
+
className,
|
|
278
|
+
}: ShareContactDialogProps) {
|
|
279
|
+
const [tab, setTab] = React.useState("internal");
|
|
280
|
+
const [search, setSearch] = React.useState("");
|
|
281
|
+
const [selectedId, setSelectedId] = React.useState<string | null>(null);
|
|
282
|
+
const [internalNotes, setInternalNotes] = React.useState("");
|
|
283
|
+
const [firstName, setFirstName] = React.useState("");
|
|
284
|
+
const [lastName, setLastName] = React.useState("");
|
|
285
|
+
const [email, setEmail] = React.useState("");
|
|
286
|
+
const [externalNotes, setExternalNotes] = React.useState("");
|
|
287
|
+
|
|
288
|
+
function reset() {
|
|
289
|
+
setTab("internal");
|
|
290
|
+
setSearch("");
|
|
291
|
+
setSelectedId(null);
|
|
292
|
+
setInternalNotes("");
|
|
293
|
+
setFirstName("");
|
|
294
|
+
setLastName("");
|
|
295
|
+
setEmail("");
|
|
296
|
+
setExternalNotes("");
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function handleOpenChange(v: boolean) {
|
|
300
|
+
if (!v) reset();
|
|
301
|
+
onOpenChange(v);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const filtered = internalAdvisors.filter((a) => {
|
|
305
|
+
const q = search.toLowerCase();
|
|
306
|
+
return a.name.toLowerCase().includes(q) || a.role.toLowerCase().includes(q);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
return (
|
|
310
|
+
<Dialog open={open} onOpenChange={isSending ? undefined : handleOpenChange}>
|
|
311
|
+
<DialogContent size="md" className={className}>
|
|
312
|
+
<DialogHeader>
|
|
313
|
+
<DialogTitle>Share Contact's Information</DialogTitle>
|
|
314
|
+
</DialogHeader>
|
|
315
|
+
|
|
316
|
+
<p className="text-sm text-muted-foreground">
|
|
317
|
+
Share{" "}
|
|
318
|
+
<span className="font-medium text-foreground">{contactName}</span>
|
|
319
|
+
's information with an advisor.
|
|
320
|
+
</p>
|
|
321
|
+
|
|
322
|
+
<Tabs value={tab} onValueChange={setTab}>
|
|
323
|
+
<TabsList className="w-full">
|
|
324
|
+
<TabsTrigger value="internal" className="flex-1">
|
|
325
|
+
Internal Advisor
|
|
326
|
+
</TabsTrigger>
|
|
327
|
+
<TabsTrigger value="external" className="flex-1">
|
|
328
|
+
External / Referral
|
|
329
|
+
</TabsTrigger>
|
|
330
|
+
</TabsList>
|
|
331
|
+
|
|
332
|
+
<TabsContent value="internal" className="mt-4 flex flex-col gap-4">
|
|
333
|
+
<Field label="Search Advisor">
|
|
334
|
+
<Input
|
|
335
|
+
placeholder="Search by name or role…"
|
|
336
|
+
value={search}
|
|
337
|
+
onChange={(e) => setSearch(e.target.value)}
|
|
338
|
+
/>
|
|
339
|
+
</Field>
|
|
340
|
+
|
|
341
|
+
<div className="max-h-[200px] overflow-y-auto border border-border divide-y divide-border">
|
|
342
|
+
{filtered.length === 0 ? (
|
|
343
|
+
<p className="px-3 py-4 text-center text-sm text-muted-foreground">
|
|
344
|
+
No advisors found.
|
|
345
|
+
</p>
|
|
346
|
+
) : (
|
|
347
|
+
filtered.map((a) => {
|
|
348
|
+
const isSelected = selectedId === a.id;
|
|
349
|
+
return (
|
|
350
|
+
<button
|
|
351
|
+
key={a.id}
|
|
352
|
+
type="button"
|
|
353
|
+
onClick={() => setSelectedId(a.id)}
|
|
354
|
+
className={cn(
|
|
355
|
+
"flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-muted/40",
|
|
356
|
+
isSelected && "bg-primary/5",
|
|
357
|
+
)}
|
|
358
|
+
>
|
|
359
|
+
<div
|
|
360
|
+
className={cn(
|
|
361
|
+
"flex size-4 shrink-0 items-center justify-center rounded-full border-2",
|
|
362
|
+
isSelected
|
|
363
|
+
? "border-primary"
|
|
364
|
+
: "border-border bg-background",
|
|
365
|
+
)}
|
|
366
|
+
>
|
|
367
|
+
{isSelected && (
|
|
368
|
+
<div className="size-2 rounded-full bg-primary" />
|
|
369
|
+
)}
|
|
370
|
+
</div>
|
|
371
|
+
<div>
|
|
372
|
+
<p className="text-sm font-medium">{a.name}</p>
|
|
373
|
+
<p className="text-xs text-muted-foreground">
|
|
374
|
+
{a.role} · {a.practice}
|
|
375
|
+
</p>
|
|
376
|
+
</div>
|
|
377
|
+
</button>
|
|
378
|
+
);
|
|
379
|
+
})
|
|
380
|
+
)}
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<Field id="sc-int-notes" label="Notes">
|
|
384
|
+
<Textarea
|
|
385
|
+
id="sc-int-notes"
|
|
386
|
+
placeholder="Optional message for the advisor…"
|
|
387
|
+
rows={3}
|
|
388
|
+
value={internalNotes}
|
|
389
|
+
onChange={(e) => setInternalNotes(e.target.value)}
|
|
390
|
+
disabled={isSending}
|
|
391
|
+
/>
|
|
392
|
+
</Field>
|
|
393
|
+
</TabsContent>
|
|
394
|
+
|
|
395
|
+
<TabsContent value="external" className="mt-4 flex flex-col gap-4">
|
|
396
|
+
<div className="grid grid-cols-2 gap-4">
|
|
397
|
+
<Field id="sc-first" label="First Name">
|
|
398
|
+
<Input
|
|
399
|
+
id="sc-first"
|
|
400
|
+
placeholder="First name"
|
|
401
|
+
value={firstName}
|
|
402
|
+
onChange={(e) => setFirstName(e.target.value)}
|
|
403
|
+
disabled={isSending}
|
|
404
|
+
/>
|
|
405
|
+
</Field>
|
|
406
|
+
<Field id="sc-last" label="Last Name">
|
|
407
|
+
<Input
|
|
408
|
+
id="sc-last"
|
|
409
|
+
placeholder="Last name"
|
|
410
|
+
value={lastName}
|
|
411
|
+
onChange={(e) => setLastName(e.target.value)}
|
|
412
|
+
disabled={isSending}
|
|
413
|
+
/>
|
|
414
|
+
</Field>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<Field id="sc-email" label="Email" required>
|
|
418
|
+
<Input
|
|
419
|
+
id="sc-email"
|
|
420
|
+
type="email"
|
|
421
|
+
placeholder="advisor@company.com.au"
|
|
422
|
+
value={email}
|
|
423
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
424
|
+
disabled={isSending}
|
|
425
|
+
/>
|
|
426
|
+
</Field>
|
|
427
|
+
|
|
428
|
+
<Field id="sc-ext-notes" label="Notes">
|
|
429
|
+
<Textarea
|
|
430
|
+
id="sc-ext-notes"
|
|
431
|
+
placeholder="Optional message…"
|
|
432
|
+
rows={3}
|
|
433
|
+
value={externalNotes}
|
|
434
|
+
onChange={(e) => setExternalNotes(e.target.value)}
|
|
435
|
+
disabled={isSending}
|
|
436
|
+
/>
|
|
437
|
+
</Field>
|
|
438
|
+
</TabsContent>
|
|
439
|
+
</Tabs>
|
|
440
|
+
|
|
441
|
+
<DialogFooter>
|
|
442
|
+
<Button
|
|
443
|
+
variant="outline"
|
|
444
|
+
onClick={() => handleOpenChange(false)}
|
|
445
|
+
disabled={isSending}
|
|
446
|
+
>
|
|
447
|
+
Cancel
|
|
448
|
+
</Button>
|
|
449
|
+
{tab === "internal" ? (
|
|
450
|
+
<Button
|
|
451
|
+
onClick={() => onShareInternal(selectedId!, internalNotes)}
|
|
452
|
+
disabled={!selectedId || isSending}
|
|
453
|
+
>
|
|
454
|
+
{isSending ? (
|
|
455
|
+
<>
|
|
456
|
+
<Spinner className="size-3.5" />
|
|
457
|
+
Sharing…
|
|
458
|
+
</>
|
|
459
|
+
) : (
|
|
460
|
+
"Share Contact"
|
|
461
|
+
)}
|
|
462
|
+
</Button>
|
|
463
|
+
) : (
|
|
464
|
+
<Button
|
|
465
|
+
onClick={() =>
|
|
466
|
+
onShareExternal({
|
|
467
|
+
firstName,
|
|
468
|
+
lastName,
|
|
469
|
+
email,
|
|
470
|
+
notes: externalNotes,
|
|
471
|
+
})
|
|
472
|
+
}
|
|
473
|
+
disabled={!email || isSending}
|
|
474
|
+
>
|
|
475
|
+
{isSending ? (
|
|
476
|
+
<>
|
|
477
|
+
<Spinner className="size-3.5" />
|
|
478
|
+
Sending…
|
|
479
|
+
</>
|
|
480
|
+
) : (
|
|
481
|
+
"Send Invite"
|
|
482
|
+
)}
|
|
483
|
+
</Button>
|
|
484
|
+
)}
|
|
485
|
+
</DialogFooter>
|
|
486
|
+
</DialogContent>
|
|
487
|
+
</Dialog>
|
|
488
|
+
);
|
|
489
|
+
}
|