@wealthx/shadcn 1.5.28 → 1.5.29

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.
@@ -1,479 +0,0 @@
1
- import {
2
- Card,
3
- CardContent
4
- } from "./chunk-3VDET466.mjs";
5
- import {
6
- Switch
7
- } from "./chunk-PNSYFE3K.mjs";
8
- import {
9
- Checkbox
10
- } from "./chunk-IKXYTCSB.mjs";
11
- import {
12
- Dialog,
13
- DialogContent,
14
- DialogDescription,
15
- DialogFooter,
16
- DialogHeader,
17
- DialogTitle
18
- } from "./chunk-T5FRVEJQ.mjs";
19
- import {
20
- Avatar,
21
- AvatarFallback,
22
- AvatarImage
23
- } from "./chunk-H6NQTIF4.mjs";
24
- import {
25
- Badge
26
- } from "./chunk-X6RC5UWB.mjs";
27
- import {
28
- Button
29
- } from "./chunk-NOOEKOWY.mjs";
30
- import {
31
- cn
32
- } from "./chunk-AFML43VJ.mjs";
33
- import {
34
- __async
35
- } from "./chunk-WNQUEZJF.mjs";
36
-
37
- // src/components/ui/ai-builder/agent-card.tsx
38
- import { MoreHorizontal } from "lucide-react";
39
- import { jsx, jsxs } from "react/jsx-runtime";
40
- var AGENT_FEATURES = [
41
- {
42
- title: "Lead Capture",
43
- description: "Automatically collect and qualify leads from website visitors."
44
- },
45
- {
46
- title: "Initial Engagement",
47
- description: "Instantly respond to inquiries with personalised mortgage guidance."
48
- },
49
- {
50
- title: "Smart Follow-Up",
51
- description: "Re-engage cold leads with timely, context-aware follow-up messages."
52
- },
53
- {
54
- title: "Appointment Scheduling",
55
- description: "Book qualified leads directly into advisor calendars without manual coordination."
56
- },
57
- {
58
- title: "Performance Tracking",
59
- description: "Monitor agent activity, response rates, and conversion metrics."
60
- }
61
- ];
62
- function AgentCard({
63
- agent,
64
- onToggle,
65
- onMenuClick,
66
- className
67
- }) {
68
- const { id, title, description, tags, isEnabled, infoBadge, isComingSoon } = agent;
69
- return /* @__PURE__ */ jsxs(
70
- Card,
71
- {
72
- className: cn(
73
- "flex flex-col gap-3 p-4 transition-opacity",
74
- isComingSoon && "opacity-60",
75
- className
76
- ),
77
- children: [
78
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
79
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-2 min-w-0", children: [
80
- /* @__PURE__ */ jsx(
81
- "span",
82
- {
83
- className: cn(
84
- "mt-0.5 size-2 shrink-0 rounded-full",
85
- isEnabled && !isComingSoon ? "bg-success" : "bg-muted-foreground/40"
86
- )
87
- }
88
- ),
89
- /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold leading-tight", children: title }),
90
- isComingSoon && /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "shrink-0 text-xs", children: "Coming Soon" })
91
- ] }),
92
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
93
- /* @__PURE__ */ jsx(
94
- Switch,
95
- {
96
- checked: isEnabled,
97
- disabled: isComingSoon,
98
- onCheckedChange: (checked) => onToggle(id, checked),
99
- "aria-label": `Toggle ${title}`
100
- }
101
- ),
102
- /* @__PURE__ */ jsx(
103
- Button,
104
- {
105
- variant: "ghost",
106
- size: "icon",
107
- className: "h-7 w-7",
108
- onClick: () => onMenuClick(id),
109
- "aria-label": `View details for ${title}`,
110
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" })
111
- }
112
- )
113
- ] })
114
- ] }),
115
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs leading-relaxed flex-1", children: description }),
116
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
117
- infoBadge && /* @__PURE__ */ jsx("p", { className: "bg-info/10 text-info px-2 py-1 text-xs", children: infoBadge }),
118
- tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: tags.map((tag) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: tag }, tag)) })
119
- ] })
120
- ]
121
- }
122
- );
123
- }
124
- function AgentMenuModal({
125
- open,
126
- onOpenChange,
127
- agentTitle,
128
- description = "AI-powered lead management that works around the clock to grow your mortgage business.",
129
- features = AGENT_FEATURES
130
- }) {
131
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-lg", children: [
132
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
133
- /* @__PURE__ */ jsx(DialogTitle, { children: agentTitle }),
134
- /* @__PURE__ */ jsx(DialogDescription, { children: description })
135
- ] }),
136
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 py-2", children: features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
137
- /* @__PURE__ */ jsx(
138
- Badge,
139
- {
140
- variant: "default",
141
- className: "h-6 w-6 shrink-0 p-0 text-xs font-bold",
142
- children: index + 1
143
- }
144
- ),
145
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
146
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: feature.title }),
147
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs leading-relaxed", children: feature.description })
148
- ] })
149
- ] }, feature.title)) })
150
- ] }) });
151
- }
152
-
153
- // src/components/ui/ai-builder/integration-card.tsx
154
- import { useState } from "react";
155
- import { Check, CheckCircle2, Copy, Settings, User } from "lucide-react";
156
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
157
- function IntegrationServiceCard({
158
- title,
159
- imageUrl,
160
- iconNode,
161
- description,
162
- isConnected,
163
- onCardClick,
164
- onSettingsClick,
165
- className
166
- }) {
167
- return /* @__PURE__ */ jsxs2(
168
- Card,
169
- {
170
- className: cn(
171
- "flex flex-col gap-3 p-4",
172
- !isConnected && "cursor-pointer transition-colors hover:bg-accent/50",
173
- className
174
- ),
175
- onClick: !isConnected ? onCardClick : void 0,
176
- children: [
177
- /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-3", children: [
178
- /* @__PURE__ */ jsxs2(Avatar, { className: "h-10 w-10 shrink-0", children: [
179
- imageUrl && /* @__PURE__ */ jsx2(AvatarImage, { src: imageUrl, alt: title }),
180
- /* @__PURE__ */ jsx2(AvatarFallback, { className: iconNode ? "bg-transparent p-0.5" : "", children: iconNode != null ? iconNode : /* @__PURE__ */ jsx2(User, { className: "h-5 w-5" }) })
181
- ] }),
182
- /* @__PURE__ */ jsx2("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
183
- /* @__PURE__ */ jsx2("span", { className: "text-base font-semibold", children: title }),
184
- isConnected && /* @__PURE__ */ jsxs2(Badge, { variant: "success", className: "gap-1 text-xs", children: [
185
- /* @__PURE__ */ jsx2(CheckCircle2, { className: "h-3 w-3" }),
186
- "Connected"
187
- ] })
188
- ] }) }),
189
- isConnected && /* @__PURE__ */ jsx2(
190
- Button,
191
- {
192
- variant: "ghost",
193
- size: "icon",
194
- className: "h-7 w-7 shrink-0",
195
- onClick: (e) => {
196
- e.stopPropagation();
197
- onSettingsClick();
198
- },
199
- "aria-label": `Settings for ${title}`,
200
- children: /* @__PURE__ */ jsx2(Settings, { className: "h-4 w-4" })
201
- }
202
- )
203
- ] }),
204
- /* @__PURE__ */ jsx2("p", { className: "text-sm leading-relaxed text-muted-foreground", children: description })
205
- ]
206
- }
207
- );
208
- }
209
- function IntegrationInstructionCard({
210
- title,
211
- codeBlock,
212
- onCopy,
213
- className
214
- }) {
215
- const [copied, setCopied] = useState(false);
216
- const handleCopy = () => __async(null, null, function* () {
217
- try {
218
- yield navigator.clipboard.writeText(codeBlock);
219
- setCopied(true);
220
- onCopy == null ? void 0 : onCopy();
221
- setTimeout(() => setCopied(false), 2e3);
222
- } catch (e) {
223
- }
224
- });
225
- return /* @__PURE__ */ jsxs2(Card, { className: cn("flex flex-col gap-3 p-4", className), children: [
226
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between gap-2", children: [
227
- /* @__PURE__ */ jsx2("h3", { className: "text-sm font-semibold", children: title }),
228
- /* @__PURE__ */ jsx2(
229
- Button,
230
- {
231
- variant: "outline",
232
- size: "sm",
233
- className: "h-7 gap-1.5 text-xs",
234
- onClick: handleCopy,
235
- children: copied ? /* @__PURE__ */ jsxs2(Fragment, { children: [
236
- /* @__PURE__ */ jsx2(Check, { className: "h-3 w-3" }),
237
- "Copied"
238
- ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
239
- /* @__PURE__ */ jsx2(Copy, { className: "h-3 w-3" }),
240
- "Copy"
241
- ] })
242
- }
243
- )
244
- ] }),
245
- /* @__PURE__ */ jsx2("pre", { className: "bg-muted overflow-x-auto p-3 text-xs leading-relaxed", children: /* @__PURE__ */ jsx2("code", { children: codeBlock }) })
246
- ] });
247
- }
248
-
249
- // src/components/ui/ai-builder/service-config-modal.tsx
250
- import { Check as Check2, CheckCircle2 as CheckCircle22, Clock, Mail, Shield, User as User2 } from "lucide-react";
251
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
252
- function ServiceConfigurationModal({
253
- open,
254
- onOpenChange,
255
- serviceTitle,
256
- isConnected,
257
- serviceData,
258
- iconNode,
259
- connectPermissions,
260
- connectDescription = "Link your account to enable automated workflows with WealthX.",
261
- onConnect,
262
- onDisconnect,
263
- onReconnect
264
- }) {
265
- return /* @__PURE__ */ jsx3(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx3(DialogContent, { className: "max-w-md", children: isConnected ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
266
- /* @__PURE__ */ jsxs3(DialogHeader, { children: [
267
- /* @__PURE__ */ jsx3(DialogTitle, { children: serviceTitle }),
268
- /* @__PURE__ */ jsx3(DialogDescription, { children: "Manage your integration settings." })
269
- ] }),
270
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-4 py-2", children: [
271
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 px-3 py-2 text-xs font-medium bg-success/10 text-success", children: [
272
- /* @__PURE__ */ jsx3(CheckCircle22, { className: "h-3.5 w-3.5 shrink-0" }),
273
- "Active \u2014 integration is running"
274
- ] }),
275
- serviceData && /* @__PURE__ */ jsxs3(Fragment2, { children: [
276
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
277
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Account Information" }),
278
- /* @__PURE__ */ jsx3(Card, { className: "py-0", children: /* @__PURE__ */ jsxs3(CardContent, { className: "flex flex-col gap-3 p-3", children: [
279
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-sm", children: [
280
- /* @__PURE__ */ jsx3(User2, { className: "text-muted-foreground h-4 w-4 shrink-0" }),
281
- /* @__PURE__ */ jsxs3("span", { className: "text-muted-foreground", children: [
282
- serviceData.accountIdentifierLabel,
283
- ":"
284
- ] }),
285
- /* @__PURE__ */ jsx3("span", { className: "font-medium", children: serviceData.accountIdentifier })
286
- ] }),
287
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-sm", children: [
288
- /* @__PURE__ */ jsx3(Clock, { className: "text-muted-foreground h-4 w-4 shrink-0" }),
289
- /* @__PURE__ */ jsx3("span", { className: "text-muted-foreground", children: "Connected on:" }),
290
- /* @__PURE__ */ jsx3("span", { className: "font-medium", children: serviceData.connectedOn })
291
- ] }),
292
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 text-sm", children: [
293
- /* @__PURE__ */ jsx3(Clock, { className: "text-muted-foreground h-4 w-4 shrink-0" }),
294
- /* @__PURE__ */ jsx3("span", { className: "text-muted-foreground", children: "Last synced:" }),
295
- /* @__PURE__ */ jsx3("span", { className: "font-medium", children: serviceData.lastSynced })
296
- ] })
297
- ] }) })
298
- ] }),
299
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
300
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Granted Permissions" }),
301
- /* @__PURE__ */ jsx3(Card, { className: "py-0", children: /* @__PURE__ */ jsx3(CardContent, { className: "flex flex-col gap-2 p-3", children: serviceData.permissions.map((permission) => /* @__PURE__ */ jsxs3(
302
- "div",
303
- {
304
- className: "flex items-center gap-2 text-sm",
305
- children: [
306
- /* @__PURE__ */ jsx3(Shield, { className: "text-success h-4 w-4 shrink-0" }),
307
- /* @__PURE__ */ jsx3("span", { children: permission })
308
- ]
309
- },
310
- permission
311
- )) }) })
312
- ] }),
313
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
314
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Sync Settings" }),
315
- /* @__PURE__ */ jsx3(Card, { className: "py-0", children: /* @__PURE__ */ jsxs3(CardContent, { className: "flex items-center justify-between gap-3 p-3", children: [
316
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0.5", children: [
317
- /* @__PURE__ */ jsx3("p", { className: "text-sm font-medium", children: serviceData.syncLabel }),
318
- /* @__PURE__ */ jsx3("p", { className: "text-muted-foreground text-sm", children: serviceData.syncDescription })
319
- ] }),
320
- /* @__PURE__ */ jsx3(
321
- Switch,
322
- {
323
- checked: serviceData.syncEnabled,
324
- onCheckedChange: serviceData.onSyncToggle,
325
- "aria-label": serviceData.syncLabel
326
- }
327
- )
328
- ] }) })
329
- ] }),
330
- serviceData.emailCategories && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
331
- /* @__PURE__ */ jsxs3("div", { children: [
332
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Email Filters" }),
333
- /* @__PURE__ */ jsx3("p", { className: "text-muted-foreground text-sm mt-0.5", children: "Choose which inbox categories to sync into WealthX." })
334
- ] }),
335
- /* @__PURE__ */ jsx3(Card, { className: "py-0", children: /* @__PURE__ */ jsx3(CardContent, { className: "flex flex-col gap-3 p-3 max-h-48 overflow-y-auto", children: serviceData.emailCategories.available.map(
336
- (category) => {
337
- const checked = serviceData.emailCategories.selected.indexOf(
338
- category
339
- ) !== -1;
340
- return /* @__PURE__ */ jsxs3(
341
- "div",
342
- {
343
- className: "flex items-center gap-2",
344
- children: [
345
- /* @__PURE__ */ jsx3(
346
- Checkbox,
347
- {
348
- id: `email-cat-${category}`,
349
- checked,
350
- onCheckedChange: (v) => {
351
- const next = v ? [
352
- ...serviceData.emailCategories.selected,
353
- category
354
- ] : serviceData.emailCategories.selected.filter(
355
- (c) => c !== category
356
- );
357
- serviceData.emailCategories.onChange(
358
- next
359
- );
360
- }
361
- }
362
- ),
363
- /* @__PURE__ */ jsx3(
364
- "label",
365
- {
366
- htmlFor: `email-cat-${category}`,
367
- className: "text-sm cursor-pointer select-none",
368
- children: category
369
- }
370
- )
371
- ]
372
- },
373
- category
374
- );
375
- }
376
- ) }) })
377
- ] }),
378
- serviceData.emailFilters && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
379
- /* @__PURE__ */ jsxs3("div", { children: [
380
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Email Filters" }),
381
- /* @__PURE__ */ jsx3("p", { className: "text-muted-foreground text-sm mt-0.5", children: serviceData.emailFilters.description })
382
- ] }),
383
- /* @__PURE__ */ jsx3(Card, { className: "py-0", children: /* @__PURE__ */ jsx3(CardContent, { className: "flex flex-col gap-3 p-3 max-h-48 overflow-y-auto", children: serviceData.emailFilters.categories.map(
384
- (category) => /* @__PURE__ */ jsxs3(
385
- "div",
386
- {
387
- className: "flex items-center gap-2",
388
- children: [
389
- /* @__PURE__ */ jsx3(
390
- Checkbox,
391
- {
392
- id: `email-cat-${category.id}`,
393
- checked: category.enabled,
394
- onCheckedChange: (v) => serviceData.emailFilters.onFilterChange(
395
- category.id,
396
- !!v
397
- )
398
- }
399
- ),
400
- /* @__PURE__ */ jsx3(
401
- "label",
402
- {
403
- htmlFor: `email-cat-${category.id}`,
404
- className: "text-sm cursor-pointer select-none",
405
- children: category.label
406
- }
407
- )
408
- ]
409
- },
410
- category.id
411
- )
412
- ) }) })
413
- ] })
414
- ] })
415
- ] }),
416
- /* @__PURE__ */ jsxs3(DialogFooter, { children: [
417
- /* @__PURE__ */ jsx3(
418
- Button,
419
- {
420
- variant: "destructive",
421
- size: "sm",
422
- onClick: onDisconnect,
423
- className: "mr-auto",
424
- children: "Disconnect"
425
- }
426
- ),
427
- /* @__PURE__ */ jsx3(
428
- Button,
429
- {
430
- variant: "outline-secondary",
431
- size: "sm",
432
- onClick: () => onOpenChange(false),
433
- children: "Cancel"
434
- }
435
- ),
436
- /* @__PURE__ */ jsx3(Button, { size: "sm", onClick: onReconnect, children: "Reconnect" })
437
- ] })
438
- ] }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
439
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-4 py-2", children: [
440
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
441
- /* @__PURE__ */ jsx3("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center bg-muted", children: iconNode != null ? iconNode : /* @__PURE__ */ jsx3(Mail, { className: "h-5 w-5 text-muted-foreground" }) }),
442
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0.5", children: [
443
- /* @__PURE__ */ jsxs3("p", { className: "text-sm font-semibold", children: [
444
- "Connect ",
445
- serviceTitle
446
- ] }),
447
- /* @__PURE__ */ jsx3("p", { className: "text-muted-foreground text-xs", children: connectDescription })
448
- ] })
449
- ] }),
450
- connectPermissions && connectPermissions.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 border border-border px-4 py-3", children: [
451
- /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Permissions requested" }),
452
- connectPermissions.map((perm) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
453
- /* @__PURE__ */ jsx3(Check2, { className: "h-3.5 w-3.5 shrink-0 text-success" }),
454
- /* @__PURE__ */ jsx3("span", { className: "text-sm text-muted-foreground", children: perm })
455
- ] }, perm))
456
- ] })
457
- ] }),
458
- /* @__PURE__ */ jsxs3(DialogFooter, { children: [
459
- /* @__PURE__ */ jsx3(
460
- Button,
461
- {
462
- variant: "outline-secondary",
463
- size: "sm",
464
- onClick: () => onOpenChange(false),
465
- children: "Cancel"
466
- }
467
- ),
468
- /* @__PURE__ */ jsx3(Button, { size: "sm", onClick: onConnect, children: "Connect" })
469
- ] })
470
- ] }) }) });
471
- }
472
-
473
- export {
474
- AgentCard,
475
- AgentMenuModal,
476
- IntegrationServiceCard,
477
- IntegrationInstructionCard,
478
- ServiceConfigurationModal
479
- };