@wealthx/shadcn 1.5.10 → 1.5.12

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 (116) hide show
  1. package/.turbo/turbo-build.log +114 -114
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-AANINK2B.mjs → chunk-2KNQZG5S.mjs} +1 -1
  4. package/dist/chunk-3KLJ4XRE.mjs +375 -0
  5. package/dist/{chunk-6U4NQGVM.mjs → chunk-4X4MGYHE.mjs} +2 -2
  6. package/dist/{chunk-CEEVYRQA.mjs → chunk-67DGIPQ4.mjs} +1 -1
  7. package/dist/{chunk-7UIL5UN3.mjs → chunk-7II6QRCZ.mjs} +1 -1
  8. package/dist/{chunk-W5QJ57PU.mjs → chunk-7LN5OGC2.mjs} +1 -1
  9. package/dist/{chunk-ZXEUBBHJ.mjs → chunk-7TMPOZDE.mjs} +1 -1
  10. package/dist/{chunk-AHSCWXYJ.mjs → chunk-AJUAJC5O.mjs} +1 -1
  11. package/dist/{chunk-3CGM3QXQ.mjs → chunk-AKWN5ZQG.mjs} +2 -2
  12. package/dist/{chunk-O5CP6VP6.mjs → chunk-CPM6P63C.mjs} +56 -44
  13. package/dist/{chunk-FRT3S72S.mjs → chunk-CQ7HKBEX.mjs} +1 -1
  14. package/dist/{chunk-54TRNCID.mjs → chunk-EB626HVW.mjs} +78 -11
  15. package/dist/{chunk-E2BNCA6L.mjs → chunk-EHQL64B7.mjs} +1 -1
  16. package/dist/{chunk-2WCIORP7.mjs → chunk-EXI64H46.mjs} +1 -1
  17. package/dist/{chunk-BBXSNDS3.mjs → chunk-FQYFPHDO.mjs} +1 -1
  18. package/dist/{chunk-3VZ6CYY2.mjs → chunk-GAXNO4JB.mjs} +1 -1
  19. package/dist/{chunk-3WGFIFP6.mjs → chunk-I4P7RXAE.mjs} +1 -1
  20. package/dist/{chunk-Z2BW5T7P.mjs → chunk-IODGRCQG.mjs} +1 -1
  21. package/dist/{chunk-GS47ZSSA.mjs → chunk-J7KQON2N.mjs} +20 -5
  22. package/dist/{chunk-IQGKOT7A.mjs → chunk-K35TFQUB.mjs} +1 -1
  23. package/dist/{chunk-4DO3WM7V.mjs → chunk-K4VWSDJJ.mjs} +1 -1
  24. package/dist/{chunk-KWD6GANL.mjs → chunk-MPA2HV5U.mjs} +1 -1
  25. package/dist/{chunk-5LZZYODG.mjs → chunk-QHAMVWDG.mjs} +19 -1
  26. package/dist/{chunk-XUCDPAVI.mjs → chunk-R6U246E4.mjs} +2 -2
  27. package/dist/{chunk-VCDGLN25.mjs → chunk-S6AYZJYO.mjs} +47 -21
  28. package/dist/{chunk-WL6WVV47.mjs → chunk-X6RC5UWB.mjs} +1 -1
  29. package/dist/{chunk-4BHDDLWK.mjs → chunk-XAS6KBIG.mjs} +2 -2
  30. package/dist/{chunk-VWZS32ZQ.mjs → chunk-XYWEGBAA.mjs} +1 -1
  31. package/dist/{chunk-54MTIKNC.mjs → chunk-YV7XF32X.mjs} +49 -24
  32. package/dist/{chunk-E5EDZQ5J.mjs → chunk-ZA44WICP.mjs} +1 -1
  33. package/dist/components/ui/advisor-card.js +144 -55
  34. package/dist/components/ui/advisor-card.mjs +5 -2
  35. package/dist/components/ui/agent-evaluation-toast.js +1 -1
  36. package/dist/components/ui/agent-evaluation-toast.mjs +2 -2
  37. package/dist/components/ui/ai-assistant-drawer.js +1 -1
  38. package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
  39. package/dist/components/ui/ai-builder.js +1 -1
  40. package/dist/components/ui/ai-builder.mjs +2 -2
  41. package/dist/components/ui/ai-conversations.js +71 -4
  42. package/dist/components/ui/ai-conversations.mjs +3 -3
  43. package/dist/components/ui/appointment-action-dialogs.js +1 -1
  44. package/dist/components/ui/appointment-action-dialogs.mjs +3 -3
  45. package/dist/components/ui/appointment-book-dialog.js +19 -4
  46. package/dist/components/ui/appointment-book-dialog.mjs +3 -3
  47. package/dist/components/ui/appointment-calendar-view.js +1 -1
  48. package/dist/components/ui/appointment-calendar-view.mjs +2 -2
  49. package/dist/components/ui/appointment-detail-sheet.js +1 -1
  50. package/dist/components/ui/appointment-detail-sheet.mjs +4 -4
  51. package/dist/components/ui/appointment-gmail-connect.js +1 -1
  52. package/dist/components/ui/appointment-gmail-connect.mjs +2 -2
  53. package/dist/components/ui/appointment-time-slot-picker.js +1 -1
  54. package/dist/components/ui/appointment-time-slot-picker.mjs +2 -2
  55. package/dist/components/ui/appointment-upcoming-card.js +1 -1
  56. package/dist/components/ui/appointment-upcoming-card.mjs +3 -3
  57. package/dist/components/ui/badge.js +1 -1
  58. package/dist/components/ui/badge.mjs +1 -1
  59. package/dist/components/ui/bank-statement-generate-dialog.js +61 -46
  60. package/dist/components/ui/bank-statement-generate-dialog.mjs +1 -1
  61. package/dist/components/ui/chat-widget-primitives.js +1 -1
  62. package/dist/components/ui/chat-widget-primitives.mjs +2 -2
  63. package/dist/components/ui/chat-widget.js +1 -1
  64. package/dist/components/ui/chat-widget.mjs +3 -3
  65. package/dist/components/ui/chip.js +1 -1
  66. package/dist/components/ui/chip.mjs +2 -2
  67. package/dist/components/ui/contact-alert-dialog/index.js +19 -1
  68. package/dist/components/ui/contact-alert-dialog/index.mjs +1 -1
  69. package/dist/components/ui/dashboard-transactions-table.js +1 -1
  70. package/dist/components/ui/dashboard-transactions-table.mjs +2 -2
  71. package/dist/components/ui/financial-cards.js +1 -1
  72. package/dist/components/ui/financial-cards.mjs +2 -2
  73. package/dist/components/ui/financial-sections.js +1 -1
  74. package/dist/components/ui/financial-sections.mjs +3 -3
  75. package/dist/components/ui/income-summary-component.js +1 -1
  76. package/dist/components/ui/income-summary-component.mjs +1 -1
  77. package/dist/components/ui/integration-card.js +1 -1
  78. package/dist/components/ui/integration-card.mjs +2 -2
  79. package/dist/components/ui/kanban-column.js +46 -23
  80. package/dist/components/ui/kanban-column.mjs +4 -4
  81. package/dist/components/ui/loan-applicant-information.js +1 -1
  82. package/dist/components/ui/loan-applicant-information.mjs +1 -1
  83. package/dist/components/ui/loan-application-badge.js +1 -1
  84. package/dist/components/ui/loan-application-badge.mjs +2 -2
  85. package/dist/components/ui/opportunity-card.js +46 -23
  86. package/dist/components/ui/opportunity-card.mjs +3 -3
  87. package/dist/components/ui/opportunity-summary-tab.js +1 -1
  88. package/dist/components/ui/opportunity-summary-tab.mjs +3 -3
  89. package/dist/components/ui/pipeline-board.js +46 -23
  90. package/dist/components/ui/pipeline-board.mjs +5 -5
  91. package/dist/components/ui/pipeline-primitives.js +1 -1
  92. package/dist/components/ui/pipeline-primitives.mjs +2 -2
  93. package/dist/components/ui/property-asset-card.js +1 -1
  94. package/dist/components/ui/property-asset-card.mjs +1 -1
  95. package/dist/components/ui/resource-center.js +1 -1
  96. package/dist/components/ui/resource-center.mjs +2 -2
  97. package/dist/components/ui/share-details-dialog.js +326 -30
  98. package/dist/components/ui/share-details-dialog.mjs +4 -1
  99. package/dist/components/ui/stage-timeline.js +1 -1
  100. package/dist/components/ui/stage-timeline.mjs +3 -3
  101. package/dist/index.js +583 -232
  102. package/dist/index.mjs +45 -43
  103. package/dist/styles.css +1 -1
  104. package/package.json +1 -1
  105. package/src/components/index.tsx +4 -0
  106. package/src/components/ui/advisor-card.tsx +75 -25
  107. package/src/components/ui/ai-conversations.tsx +157 -23
  108. package/src/components/ui/appointment-book-dialog.tsx +26 -3
  109. package/src/components/ui/appointment-time-slot-picker.tsx +1 -0
  110. package/src/components/ui/badge.tsx +1 -1
  111. package/src/components/ui/bank-statement-generate-dialog.tsx +84 -61
  112. package/src/components/ui/contact-alert-dialog/contact-alert-dialog.tsx +19 -1
  113. package/src/components/ui/opportunity-card.tsx +56 -20
  114. package/src/components/ui/share-details-dialog.tsx +251 -0
  115. package/src/styles/styles-css.ts +1 -1
  116. package/dist/chunk-OZ2R6ERP.mjs +0 -174
@@ -0,0 +1,375 @@
1
+ import {
2
+ Spinner
3
+ } from "./chunk-JVMXMFBB.mjs";
4
+ import {
5
+ Tabs,
6
+ TabsContent,
7
+ TabsList,
8
+ TabsTrigger
9
+ } from "./chunk-WE4YKBDE.mjs";
10
+ import {
11
+ Textarea
12
+ } from "./chunk-BS75ICOO.mjs";
13
+ import {
14
+ Dialog,
15
+ DialogContent,
16
+ DialogFooter,
17
+ DialogHeader,
18
+ DialogTitle
19
+ } from "./chunk-LI2CTS5O.mjs";
20
+ import {
21
+ Label
22
+ } from "./chunk-P7CEBZM6.mjs";
23
+ import {
24
+ Input
25
+ } from "./chunk-LBTHZSBT.mjs";
26
+ import {
27
+ Button
28
+ } from "./chunk-NOOEKOWY.mjs";
29
+ import {
30
+ cn
31
+ } from "./chunk-AFML43VJ.mjs";
32
+
33
+ // src/components/ui/share-details-dialog.tsx
34
+ import * as React from "react";
35
+ import { CheckIcon, CopyIcon } from "lucide-react";
36
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
37
+ function Field({
38
+ id,
39
+ label,
40
+ required,
41
+ children
42
+ }) {
43
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
44
+ /* @__PURE__ */ jsxs(Label, { htmlFor: id, children: [
45
+ label,
46
+ required && /* @__PURE__ */ jsx("span", { className: "ml-0.5 text-destructive", children: "*" })
47
+ ] }),
48
+ children
49
+ ] });
50
+ }
51
+ function ShareDetailsDialog({
52
+ open,
53
+ onOpenChange,
54
+ contactName,
55
+ shareUrl,
56
+ onEmailLink,
57
+ isSendingEmail = false,
58
+ className
59
+ }) {
60
+ const [copied, setCopied] = React.useState(false);
61
+ function handleCopy() {
62
+ navigator.clipboard.writeText(shareUrl).catch(() => {
63
+ });
64
+ setCopied(true);
65
+ setTimeout(() => setCopied(false), 2e3);
66
+ }
67
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { size: "md", className, children: [
68
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Share Contact Details" }) }),
69
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
70
+ "Share a secure link to",
71
+ " ",
72
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: contactName }),
73
+ "'s financial summary report."
74
+ ] }),
75
+ /* @__PURE__ */ jsxs(Field, { label: "Shareable link", children: [
76
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
77
+ /* @__PURE__ */ jsx(
78
+ Input,
79
+ {
80
+ readOnly: true,
81
+ value: shareUrl,
82
+ className: "flex-1 font-mono text-xs text-muted-foreground",
83
+ onClick: (e) => e.target.select()
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx(
87
+ Button,
88
+ {
89
+ variant: "outline",
90
+ size: "icon",
91
+ onClick: handleCopy,
92
+ "aria-label": copied ? "Copied" : "Copy link",
93
+ className: "shrink-0",
94
+ children: copied ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-4 text-success" }) : /* @__PURE__ */ jsx(CopyIcon, { className: "size-4" })
95
+ }
96
+ )
97
+ ] }),
98
+ copied && /* @__PURE__ */ jsx("p", { className: "text-xs text-success", children: "Link copied to clipboard!" })
99
+ ] }),
100
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
101
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Close" }),
102
+ onEmailLink && /* @__PURE__ */ jsx(Button, { onClick: onEmailLink, disabled: isSendingEmail, children: isSendingEmail ? /* @__PURE__ */ jsxs(Fragment, { children: [
103
+ /* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }),
104
+ "Sending\u2026"
105
+ ] }) : "Email link" })
106
+ ] })
107
+ ] }) });
108
+ }
109
+ function EmailTemplateDialog({
110
+ open,
111
+ onOpenChange,
112
+ contactName,
113
+ contactEmail,
114
+ defaultSubject = "",
115
+ defaultBody = "",
116
+ onSend,
117
+ isSending = false,
118
+ className
119
+ }) {
120
+ const [subject, setSubject] = React.useState(defaultSubject);
121
+ const [body, setBody] = React.useState(defaultBody);
122
+ React.useEffect(() => {
123
+ if (open) {
124
+ setSubject(defaultSubject);
125
+ setBody(defaultBody);
126
+ }
127
+ }, [open, defaultSubject, defaultBody]);
128
+ const canSend = subject.trim() !== "" && body.trim() !== "" && !isSending;
129
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: isSending ? void 0 : onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { size: "lg", className, children: [
130
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Send Email" }) }),
131
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
132
+ /* @__PURE__ */ jsx(Field, { label: "To", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border border-border bg-muted/40 px-3 py-2 text-sm", children: [
133
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: contactName }),
134
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
135
+ "<",
136
+ contactEmail,
137
+ ">"
138
+ ] })
139
+ ] }) }),
140
+ /* @__PURE__ */ jsx(Field, { id: "etd-subject", label: "Subject", required: true, children: /* @__PURE__ */ jsx(
141
+ Input,
142
+ {
143
+ id: "etd-subject",
144
+ placeholder: "Email subject",
145
+ value: subject,
146
+ onChange: (e) => setSubject(e.target.value),
147
+ disabled: isSending
148
+ }
149
+ ) }),
150
+ /* @__PURE__ */ jsx(Field, { id: "etd-body", label: "Message", required: true, children: /* @__PURE__ */ jsx(
151
+ Textarea,
152
+ {
153
+ id: "etd-body",
154
+ rows: 8,
155
+ placeholder: "Write your message here\u2026",
156
+ value: body,
157
+ onChange: (e) => setBody(e.target.value),
158
+ disabled: isSending
159
+ }
160
+ ) })
161
+ ] }),
162
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
163
+ /* @__PURE__ */ jsx(
164
+ Button,
165
+ {
166
+ variant: "outline",
167
+ onClick: () => onOpenChange(false),
168
+ disabled: isSending,
169
+ children: "Cancel"
170
+ }
171
+ ),
172
+ /* @__PURE__ */ jsx(Button, { onClick: () => onSend({ subject, body }), disabled: !canSend, children: isSending ? /* @__PURE__ */ jsxs(Fragment, { children: [
173
+ /* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }),
174
+ "Sending\u2026"
175
+ ] }) : "Send Email" })
176
+ ] })
177
+ ] }) });
178
+ }
179
+ function ShareContactDialog({
180
+ open,
181
+ onOpenChange,
182
+ contactName,
183
+ internalAdvisors,
184
+ onShareInternal,
185
+ onShareExternal,
186
+ isSending = false,
187
+ className
188
+ }) {
189
+ const [tab, setTab] = React.useState("internal");
190
+ const [search, setSearch] = React.useState("");
191
+ const [selectedId, setSelectedId] = React.useState(null);
192
+ const [internalNotes, setInternalNotes] = React.useState("");
193
+ const [firstName, setFirstName] = React.useState("");
194
+ const [lastName, setLastName] = React.useState("");
195
+ const [email, setEmail] = React.useState("");
196
+ const [externalNotes, setExternalNotes] = React.useState("");
197
+ function reset() {
198
+ setTab("internal");
199
+ setSearch("");
200
+ setSelectedId(null);
201
+ setInternalNotes("");
202
+ setFirstName("");
203
+ setLastName("");
204
+ setEmail("");
205
+ setExternalNotes("");
206
+ }
207
+ function handleOpenChange(v) {
208
+ if (!v) reset();
209
+ onOpenChange(v);
210
+ }
211
+ const filtered = internalAdvisors.filter((a) => {
212
+ const q = search.toLowerCase();
213
+ return a.name.toLowerCase().includes(q) || a.role.toLowerCase().includes(q);
214
+ });
215
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: isSending ? void 0 : handleOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { size: "md", className, children: [
216
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Share Contact's Information" }) }),
217
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
218
+ "Share",
219
+ " ",
220
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: contactName }),
221
+ "'s information with an advisor."
222
+ ] }),
223
+ /* @__PURE__ */ jsxs(Tabs, { value: tab, onValueChange: setTab, children: [
224
+ /* @__PURE__ */ jsxs(TabsList, { className: "w-full", children: [
225
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "internal", className: "flex-1", children: "Internal Advisor" }),
226
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "external", className: "flex-1", children: "External / Referral" })
227
+ ] }),
228
+ /* @__PURE__ */ jsxs(TabsContent, { value: "internal", className: "mt-4 flex flex-col gap-4", children: [
229
+ /* @__PURE__ */ jsx(Field, { label: "Search Advisor", children: /* @__PURE__ */ jsx(
230
+ Input,
231
+ {
232
+ placeholder: "Search by name or role\u2026",
233
+ value: search,
234
+ onChange: (e) => setSearch(e.target.value)
235
+ }
236
+ ) }),
237
+ /* @__PURE__ */ jsx("div", { className: "max-h-[200px] overflow-y-auto border border-border divide-y divide-border", children: filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((a) => {
238
+ const isSelected = selectedId === a.id;
239
+ return /* @__PURE__ */ jsxs(
240
+ "button",
241
+ {
242
+ type: "button",
243
+ onClick: () => setSelectedId(a.id),
244
+ className: cn(
245
+ "flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-muted/40",
246
+ isSelected && "bg-primary/5"
247
+ ),
248
+ children: [
249
+ /* @__PURE__ */ jsx(
250
+ "div",
251
+ {
252
+ className: cn(
253
+ "flex size-4 shrink-0 items-center justify-center rounded-full border-2",
254
+ isSelected ? "border-primary" : "border-border bg-background"
255
+ ),
256
+ children: isSelected && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-primary" })
257
+ }
258
+ ),
259
+ /* @__PURE__ */ jsxs("div", { children: [
260
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: a.name }),
261
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
262
+ a.role,
263
+ " \xB7 ",
264
+ a.practice
265
+ ] })
266
+ ] })
267
+ ]
268
+ },
269
+ a.id
270
+ );
271
+ }) }),
272
+ /* @__PURE__ */ jsx(Field, { id: "sc-int-notes", label: "Notes", children: /* @__PURE__ */ jsx(
273
+ Textarea,
274
+ {
275
+ id: "sc-int-notes",
276
+ placeholder: "Optional message for the advisor\u2026",
277
+ rows: 3,
278
+ value: internalNotes,
279
+ onChange: (e) => setInternalNotes(e.target.value),
280
+ disabled: isSending
281
+ }
282
+ ) })
283
+ ] }),
284
+ /* @__PURE__ */ jsxs(TabsContent, { value: "external", className: "mt-4 flex flex-col gap-4", children: [
285
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
286
+ /* @__PURE__ */ jsx(Field, { id: "sc-first", label: "First Name", children: /* @__PURE__ */ jsx(
287
+ Input,
288
+ {
289
+ id: "sc-first",
290
+ placeholder: "First name",
291
+ value: firstName,
292
+ onChange: (e) => setFirstName(e.target.value),
293
+ disabled: isSending
294
+ }
295
+ ) }),
296
+ /* @__PURE__ */ jsx(Field, { id: "sc-last", label: "Last Name", children: /* @__PURE__ */ jsx(
297
+ Input,
298
+ {
299
+ id: "sc-last",
300
+ placeholder: "Last name",
301
+ value: lastName,
302
+ onChange: (e) => setLastName(e.target.value),
303
+ disabled: isSending
304
+ }
305
+ ) })
306
+ ] }),
307
+ /* @__PURE__ */ jsx(Field, { id: "sc-email", label: "Email", required: true, children: /* @__PURE__ */ jsx(
308
+ Input,
309
+ {
310
+ id: "sc-email",
311
+ type: "email",
312
+ placeholder: "advisor@company.com.au",
313
+ value: email,
314
+ onChange: (e) => setEmail(e.target.value),
315
+ disabled: isSending
316
+ }
317
+ ) }),
318
+ /* @__PURE__ */ jsx(Field, { id: "sc-ext-notes", label: "Notes", children: /* @__PURE__ */ jsx(
319
+ Textarea,
320
+ {
321
+ id: "sc-ext-notes",
322
+ placeholder: "Optional message\u2026",
323
+ rows: 3,
324
+ value: externalNotes,
325
+ onChange: (e) => setExternalNotes(e.target.value),
326
+ disabled: isSending
327
+ }
328
+ ) })
329
+ ] })
330
+ ] }),
331
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
332
+ /* @__PURE__ */ jsx(
333
+ Button,
334
+ {
335
+ variant: "outline",
336
+ onClick: () => handleOpenChange(false),
337
+ disabled: isSending,
338
+ children: "Cancel"
339
+ }
340
+ ),
341
+ tab === "internal" ? /* @__PURE__ */ jsx(
342
+ Button,
343
+ {
344
+ onClick: () => onShareInternal(selectedId, internalNotes),
345
+ disabled: !selectedId || isSending,
346
+ children: isSending ? /* @__PURE__ */ jsxs(Fragment, { children: [
347
+ /* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }),
348
+ "Sharing\u2026"
349
+ ] }) : "Share Contact"
350
+ }
351
+ ) : /* @__PURE__ */ jsx(
352
+ Button,
353
+ {
354
+ onClick: () => onShareExternal({
355
+ firstName,
356
+ lastName,
357
+ email,
358
+ notes: externalNotes
359
+ }),
360
+ disabled: !email || isSending,
361
+ children: isSending ? /* @__PURE__ */ jsxs(Fragment, { children: [
362
+ /* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }),
363
+ "Sending\u2026"
364
+ ] }) : "Send Invite"
365
+ }
366
+ )
367
+ ] })
368
+ ] }) });
369
+ }
370
+
371
+ export {
372
+ ShareDetailsDialog,
373
+ EmailTemplateDialog,
374
+ ShareContactDialog
375
+ };
@@ -13,7 +13,7 @@ import {
13
13
  ExpensesCard,
14
14
  IncomeCard,
15
15
  PropertyCard
16
- } from "./chunk-W5QJ57PU.mjs";
16
+ } from "./chunk-7LN5OGC2.mjs";
17
17
  import {
18
18
  FinancialDetailField,
19
19
  FinancialLineItem,
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-WE4YKBDE.mjs";
39
39
  import {
40
40
  Badge
41
- } from "./chunk-WL6WVV47.mjs";
41
+ } from "./chunk-X6RC5UWB.mjs";
42
42
  import {
43
43
  formatCurrency
44
44
  } from "./chunk-MN5NYQCL.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Badge
3
- } from "./chunk-WL6WVV47.mjs";
3
+ } from "./chunk-X6RC5UWB.mjs";
4
4
  import {
5
5
  Button
6
6
  } from "./chunk-NOOEKOWY.mjs";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-BS75ICOO.mjs";
11
11
  import {
12
12
  Badge
13
- } from "./chunk-WL6WVV47.mjs";
13
+ } from "./chunk-X6RC5UWB.mjs";
14
14
  import {
15
15
  Button
16
16
  } from "./chunk-NOOEKOWY.mjs";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-JTK6VJXY.mjs";
12
12
  import {
13
13
  Badge
14
- } from "./chunk-WL6WVV47.mjs";
14
+ } from "./chunk-X6RC5UWB.mjs";
15
15
  import {
16
16
  formatDateShort
17
17
  } from "./chunk-LHWJQNLG.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2GIYVERS.mjs";
4
4
  import {
5
5
  Badge
6
- } from "./chunk-WL6WVV47.mjs";
6
+ } from "./chunk-X6RC5UWB.mjs";
7
7
  import {
8
8
  Input
9
9
  } from "./chunk-LBTHZSBT.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Badge
3
- } from "./chunk-WL6WVV47.mjs";
3
+ } from "./chunk-X6RC5UWB.mjs";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-AFML43VJ.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  LeadCard,
3
3
  OpportunityCard
4
- } from "./chunk-54MTIKNC.mjs";
4
+ } from "./chunk-YV7XF32X.mjs";
5
5
  import {
6
6
  Spinner
7
7
  } from "./chunk-JVMXMFBB.mjs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-H5DTKPJ2.mjs";
15
15
  import {
16
16
  Badge
17
- } from "./chunk-WL6WVV47.mjs";
17
+ } from "./chunk-X6RC5UWB.mjs";
18
18
  import {
19
19
  useThemeVars
20
20
  } from "./chunk-XYSRRDBH.mjs";
@@ -43,14 +43,15 @@ import {
43
43
  import {
44
44
  Button
45
45
  } from "./chunk-NOOEKOWY.mjs";
46
- import {
47
- cn
48
- } from "./chunk-AFML43VJ.mjs";
49
46
 
50
47
  // src/components/ui/bank-statement-generate-dialog.tsx
51
48
  import { useEffect, useMemo, useState } from "react";
52
49
  import { format, parseISO, subDays } from "date-fns";
53
50
  import { jsx, jsxs } from "react/jsx-runtime";
51
+ var APPLICANT_TYPE_LABELS = {
52
+ primary: "Main applicant",
53
+ secondary: "Co-applicant"
54
+ };
54
55
  function toIsoDate(date) {
55
56
  return date.toISOString().slice(0, 10);
56
57
  }
@@ -74,8 +75,10 @@ function BankStatementGenerateDialog({
74
75
  }) {
75
76
  const [statementName, setStatementName] = useState("Bank Statement 1");
76
77
  const [rangePreset, setRangePreset] = useState(90);
77
- const [fromDate, setFromDate] = useState("");
78
- const [toDate, setToDate] = useState("");
78
+ const [fromDate, setFromDate] = useState(
79
+ () => presetToDateRange(90).from
80
+ );
81
+ const [toDate, setToDate] = useState(() => presetToDateRange(90).to);
79
82
  const [applicantType, setApplicantType] = useState("");
80
83
  const [selectedAccountIds, setSelectedAccountIds] = useState([]);
81
84
  useEffect(() => {
@@ -104,6 +107,11 @@ function BankStatementGenerateDialog({
104
107
  setToDate(to);
105
108
  }
106
109
  };
110
+ const handlePresetChange = (val) => {
111
+ if (val.length === 0) return;
112
+ const raw = val[0];
113
+ applyPreset(raw === "custom" ? "custom" : Number(raw));
114
+ };
107
115
  const areAllSelected = bankAccounts.length > 0 && selectedAccountIds.length === bankAccounts.length;
108
116
  const isSomeSelected = selectedAccountIds.length > 0 && !areAllSelected;
109
117
  const handleToggleAccount = (id) => {
@@ -139,7 +147,8 @@ function BankStatementGenerateDialog({
139
147
  return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ jsxs(
140
148
  DialogContent,
141
149
  {
142
- className: cn("max-w-[700px]", className),
150
+ size: "3xl",
151
+ className,
143
152
  "data-slot": "bank-statement-generate-dialog",
144
153
  children: [
145
154
  /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Generate Bank Statement" }) }),
@@ -163,15 +172,7 @@ function BankStatementGenerateDialog({
163
172
  type: "single",
164
173
  variant: "outline",
165
174
  value: [String(rangePreset)],
166
- onValueChange: (val) => {
167
- if (val.length === 0) return;
168
- const raw = val[0];
169
- if (raw === "custom") {
170
- applyPreset("custom");
171
- } else {
172
- applyPreset(Number(raw));
173
- }
174
- },
175
+ onValueChange: handlePresetChange,
175
176
  className: "w-full",
176
177
  children: [
177
178
  /* @__PURE__ */ jsx(ToggleGroupItem, { value: "90", className: "flex-1", children: "3 Months" }),
@@ -207,11 +208,12 @@ function BankStatementGenerateDialog({
207
208
  {
208
209
  value: applicantType,
209
210
  onValueChange: (v) => handleApplicantTypeChange(v),
211
+ items: APPLICANT_TYPE_LABELS,
210
212
  children: [
211
213
  /* @__PURE__ */ jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Applicant Type" }) }),
212
214
  /* @__PURE__ */ jsxs(SelectContent, { children: [
213
- /* @__PURE__ */ jsx(SelectItem, { value: "primary", children: "Main applicant" }),
214
- hasCoApplicant && /* @__PURE__ */ jsx(SelectItem, { value: "secondary", children: "Co-applicant" })
215
+ /* @__PURE__ */ jsx(SelectItem, { value: "primary", children: APPLICANT_TYPE_LABELS.primary }),
216
+ hasCoApplicant && /* @__PURE__ */ jsx(SelectItem, { value: "secondary", children: APPLICANT_TYPE_LABELS.secondary })
215
217
  ] })
216
218
  ]
217
219
  }
@@ -237,33 +239,43 @@ function BankStatementGenerateDialog({
237
239
  ] }) }),
238
240
  /* @__PURE__ */ jsx(TableBody, { children: bankAccounts.map((account) => {
239
241
  var _a, _b;
240
- return /* @__PURE__ */ jsxs(TableRow, { children: [
241
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
242
- Checkbox,
243
- {
244
- checked: selectedAccountIds.includes(account.id),
245
- onCheckedChange: () => handleToggleAccount(account.id),
246
- "aria-label": `Select ${account.name}`
247
- }
248
- ) }),
249
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
250
- account.institutionLogo && /* @__PURE__ */ jsx(
251
- "img",
252
- {
253
- src: account.institutionLogo,
254
- alt: (_a = account.institutionName) != null ? _a : "",
255
- className: "size-8 rounded object-cover"
256
- }
257
- ),
258
- /* @__PURE__ */ jsx("span", { className: "text-body-medium font-semibold", children: account.name || account.institutionName || "\u2014" })
259
- ] }) }),
260
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: (_b = account.accountNo) != null ? _b : "\u2014" }) }),
261
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: periodLabel }) }),
262
- /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: account.lastUpdated ? format(
263
- parseISO(account.lastUpdated),
264
- "dd MMM yyyy"
265
- ) : "\u2014" }) })
266
- ] }, account.id);
242
+ const isSelected = selectedAccountIds.includes(
243
+ account.id
244
+ );
245
+ return /* @__PURE__ */ jsxs(
246
+ TableRow,
247
+ {
248
+ "data-state": isSelected ? "selected" : void 0,
249
+ children: [
250
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
251
+ Checkbox,
252
+ {
253
+ checked: isSelected,
254
+ onCheckedChange: () => handleToggleAccount(account.id),
255
+ "aria-label": `Select ${account.name}`
256
+ }
257
+ ) }),
258
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
259
+ account.institutionLogo && /* @__PURE__ */ jsx(
260
+ "img",
261
+ {
262
+ src: account.institutionLogo,
263
+ alt: (_a = account.institutionName) != null ? _a : "",
264
+ className: "size-8 object-cover"
265
+ }
266
+ ),
267
+ /* @__PURE__ */ jsx("span", { className: "text-body-medium font-semibold", children: account.name || account.institutionName || "\u2014" })
268
+ ] }) }),
269
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: (_b = account.accountNo) != null ? _b : "\u2014" }) }),
270
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: periodLabel }) }),
271
+ /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("span", { className: "text-body-medium", children: account.lastUpdated ? format(
272
+ parseISO(account.lastUpdated),
273
+ "dd MMM yyyy"
274
+ ) : "\u2014" }) })
275
+ ]
276
+ },
277
+ account.id
278
+ );
267
279
  }) })
268
280
  ] })
269
281
  ] })
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Badge
3
- } from "./chunk-WL6WVV47.mjs";
3
+ } from "./chunk-X6RC5UWB.mjs";
4
4
  import {
5
5
  Toggle
6
6
  } from "./chunk-6QAFGZC2.mjs";