@wealthx/shadcn 1.5.25 → 1.5.27

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 (120) hide show
  1. package/.turbo/turbo-build.log +165 -165
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-7JVKSZ4O.mjs → chunk-2CHH5QOA.mjs} +1 -1
  4. package/dist/{chunk-5ST6BK7R.mjs → chunk-36IN7YRM.mjs} +1 -1
  5. package/dist/{chunk-RGHKARAK.mjs → chunk-7PTRHNUV.mjs} +1 -1
  6. package/dist/{chunk-QM7LU2BR.mjs → chunk-AAZSLTER.mjs} +7 -7
  7. package/dist/{chunk-OFQFD2E2.mjs → chunk-C35JMOII.mjs} +1 -1
  8. package/dist/{chunk-4FJC64FV.mjs → chunk-CE2WONIY.mjs} +15 -14
  9. package/dist/{chunk-YV7XF32X.mjs → chunk-DSVKEVX6.mjs} +1 -1
  10. package/dist/{chunk-EY5YPFKX.mjs → chunk-EVUY67CY.mjs} +4 -4
  11. package/dist/{chunk-5G2M45CA.mjs → chunk-FYZBGWYR.mjs} +1 -1
  12. package/dist/{chunk-RVDBYV2B.mjs → chunk-HONTZFLO.mjs} +1 -1
  13. package/dist/chunk-HSL23TOM.mjs +443 -0
  14. package/dist/{chunk-VNB5E7SI.mjs → chunk-HSXMTFIM.mjs} +4 -4
  15. package/dist/{chunk-ABVCQWDY.mjs → chunk-KGVVK6OS.mjs} +5 -5
  16. package/dist/{chunk-IG7DEIWU.mjs → chunk-KI57CBJR.mjs} +7 -7
  17. package/dist/{chunk-IT3QJF3D.mjs → chunk-LBXIYS34.mjs} +4 -4
  18. package/dist/{chunk-K35TFQUB.mjs → chunk-LSSIWLYU.mjs} +1 -1
  19. package/dist/{chunk-UMR3HVZF.mjs → chunk-M32QNCD3.mjs} +7 -7
  20. package/dist/{chunk-ECC2LLZM.mjs → chunk-MD66TGX7.mjs} +7 -7
  21. package/dist/{chunk-ZSMQZ3VN.mjs → chunk-NGKTJRFN.mjs} +7 -7
  22. package/dist/{chunk-2PWTXE66.mjs → chunk-OG2VM34K.mjs} +1 -1
  23. package/dist/{chunk-SQ54W3JH.mjs → chunk-OKIWXOJL.mjs} +4 -4
  24. package/dist/{chunk-WIDZVCH3.mjs → chunk-S7SBLNX4.mjs} +7 -7
  25. package/dist/{chunk-PX2B3Q3A.mjs → chunk-SYJ6LVJ6.mjs} +1 -1
  26. package/dist/{chunk-OIETBBXQ.mjs → chunk-T5FRVEJQ.mjs} +1 -1
  27. package/dist/{chunk-Z5QI7CW2.mjs → chunk-T5HU4S4X.mjs} +1 -1
  28. package/dist/{chunk-KENLXFJ7.mjs → chunk-ULQ53FRJ.mjs} +4 -4
  29. package/dist/{chunk-NTIFG5A7.mjs → chunk-USIRKDYQ.mjs} +4 -4
  30. package/dist/{chunk-QJ3RSZF4.mjs → chunk-VVURVETY.mjs} +4 -4
  31. package/dist/components/ui/add-column-modal.js +1 -1
  32. package/dist/components/ui/add-column-modal.mjs +2 -2
  33. package/dist/components/ui/add-lead-modal.js +1 -1
  34. package/dist/components/ui/add-lead-modal.mjs +2 -2
  35. package/dist/components/ui/advisor-card.mjs +2 -2
  36. package/dist/components/ui/{ai-builder.js → ai-builder/index.js} +288 -187
  37. package/dist/components/ui/ai-builder/index.mjs +26 -0
  38. package/dist/components/ui/ai-conversations/index.js +4 -3
  39. package/dist/components/ui/ai-conversations/index.mjs +3 -3
  40. package/dist/components/ui/appointment-action-dialogs.js +1 -1
  41. package/dist/components/ui/appointment-action-dialogs.mjs +2 -2
  42. package/dist/components/ui/appointment-availability-settings.js +1 -1
  43. package/dist/components/ui/appointment-availability-settings.mjs +3 -3
  44. package/dist/components/ui/appointment-book-dialog.js +1 -1
  45. package/dist/components/ui/appointment-book-dialog.mjs +3 -3
  46. package/dist/components/ui/appointment-calendar-view.mjs +2 -2
  47. package/dist/components/ui/appointment-detail-sheet.js +1 -1
  48. package/dist/components/ui/appointment-detail-sheet.mjs +4 -4
  49. package/dist/components/ui/appointment-upcoming-card.js +1 -1
  50. package/dist/components/ui/appointment-upcoming-card.mjs +3 -3
  51. package/dist/components/ui/bank-statement-generate-dialog.js +1 -1
  52. package/dist/components/ui/bank-statement-generate-dialog.mjs +2 -2
  53. package/dist/components/ui/bank-statement-pdf-viewer.mjs +2 -2
  54. package/dist/components/ui/cash-balance-line-chart.mjs +2 -2
  55. package/dist/components/ui/category-edit-dialog.js +1 -1
  56. package/dist/components/ui/category-edit-dialog.mjs +2 -2
  57. package/dist/components/ui/chat-widget.mjs +1 -1
  58. package/dist/components/ui/contact-alert-dialog/index.js +1 -1
  59. package/dist/components/ui/contact-alert-dialog/index.mjs +2 -2
  60. package/dist/components/ui/create-contact-modal.js +1 -1
  61. package/dist/components/ui/create-contact-modal.mjs +2 -2
  62. package/dist/components/ui/csv-import-modal.js +1 -1
  63. package/dist/components/ui/csv-import-modal.mjs +2 -2
  64. package/dist/components/ui/dashboard-expense-categories.mjs +3 -3
  65. package/dist/components/ui/dashboard-transactions-table.js +1 -1
  66. package/dist/components/ui/dashboard-transactions-table.mjs +5 -5
  67. package/dist/components/ui/dialog.js +1 -1
  68. package/dist/components/ui/dialog.mjs +1 -1
  69. package/dist/components/ui/document-checklist-template.mjs +2 -2
  70. package/dist/components/ui/expense-detail-item.mjs +2 -2
  71. package/dist/components/ui/expense-work-details.mjs +8 -8
  72. package/dist/components/ui/file-preview-dialog.js +1 -1
  73. package/dist/components/ui/file-preview-dialog.mjs +2 -2
  74. package/dist/components/ui/income-sources-card.mjs +3 -3
  75. package/dist/components/ui/income-work-details.mjs +2 -2
  76. package/dist/components/ui/kanban-column.mjs +4 -4
  77. package/dist/components/ui/opportunity-card.mjs +3 -3
  78. package/dist/components/ui/opportunity-edit-modals.js +1 -1
  79. package/dist/components/ui/opportunity-edit-modals.mjs +2 -2
  80. package/dist/components/ui/opportunity-summary-tab.js +1 -1
  81. package/dist/components/ui/opportunity-summary-tab.mjs +4 -4
  82. package/dist/components/ui/pipeline-board.mjs +5 -5
  83. package/dist/components/ui/pipeline-dialogs.js +1 -1
  84. package/dist/components/ui/pipeline-dialogs.mjs +2 -2
  85. package/dist/components/ui/pipeline-primitives.mjs +2 -2
  86. package/dist/components/ui/property-report-dialog.js +1 -1
  87. package/dist/components/ui/property-report-dialog.mjs +2 -2
  88. package/dist/components/ui/resource-center/index.js +1 -1
  89. package/dist/components/ui/resource-center/index.mjs +2 -2
  90. package/dist/components/ui/review-alerts-dialog.js +1 -1
  91. package/dist/components/ui/review-alerts-dialog.mjs +2 -2
  92. package/dist/components/ui/savings-goal-modal.js +1 -1
  93. package/dist/components/ui/savings-goal-modal.mjs +1 -1
  94. package/dist/components/ui/share-details-dialog.js +1 -1
  95. package/dist/components/ui/share-details-dialog.mjs +2 -2
  96. package/dist/components/ui/stage-timeline.mjs +3 -3
  97. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +2 -2
  98. package/dist/index.js +4302 -4241
  99. package/dist/index.mjs +114 -114
  100. package/package.json +4 -4
  101. package/src/components/index.tsx +1 -0
  102. package/src/components/ui/ai-builder/agent-card.tsx +181 -0
  103. package/src/components/ui/ai-builder/index.tsx +21 -0
  104. package/src/components/ui/ai-builder/integration-card.tsx +144 -0
  105. package/src/components/ui/ai-builder/service-config-modal.tsx +283 -0
  106. package/src/components/ui/ai-builder/types.ts +34 -0
  107. package/src/components/ui/ai-conversations/thread.tsx +14 -9
  108. package/src/components/ui/dialog.tsx +1 -1
  109. package/tsup.config.ts +1 -1
  110. package/dist/chunk-INGYBZGU.mjs +0 -394
  111. package/dist/components/ui/ai-builder.mjs +0 -25
  112. package/src/components/ui/ai-builder.tsx +0 -558
  113. package/dist/{chunk-G2W754UJ.mjs → chunk-6UKOJLXO.mjs} +3 -3
  114. package/dist/{chunk-S6AYZJYO.mjs → chunk-CZ6IEOM5.mjs} +3 -3
  115. package/dist/{chunk-K2KX3NX7.mjs → chunk-I433SC7S.mjs} +3 -3
  116. package/dist/{chunk-57QES5LX.mjs → chunk-JHS2T6JZ.mjs} +3 -3
  117. package/dist/{chunk-EXI64H46.mjs → chunk-L6LE4OIM.mjs} +3 -3
  118. package/dist/{chunk-DCKT635J.mjs → chunk-LHQACMZY.mjs} +3 -3
  119. package/dist/{chunk-V23CBULF.mjs → chunk-SZLAPJKD.mjs} +3 -3
  120. package/dist/{chunk-KGBLORCQ.mjs → chunk-ZA37ZWZW.mjs} +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @wealthx/shadcn
2
2
 
3
+ ## 1.5.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 52e985b: update ai conversation
8
+
9
+ ## 1.5.26
10
+
11
+ ### Patch Changes
12
+
13
+ - efdd76c: ai integration update
14
+
3
15
  ## 1.5.25
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  KanbanColumn
3
- } from "./chunk-2PWTXE66.mjs";
3
+ } from "./chunk-OG2VM34K.mjs";
4
4
  import {
5
5
  ToggleGroup,
6
6
  ToggleGroupItem
@@ -24,7 +24,7 @@ import {
24
24
  DialogFooter,
25
25
  DialogHeader,
26
26
  DialogTitle
27
- } from "./chunk-OIETBBXQ.mjs";
27
+ } from "./chunk-T5FRVEJQ.mjs";
28
28
  import {
29
29
  ToggleGroup,
30
30
  ToggleGroupItem
@@ -7,7 +7,7 @@ import {
7
7
  DialogFooter,
8
8
  DialogHeader,
9
9
  DialogTitle
10
- } from "./chunk-OIETBBXQ.mjs";
10
+ } from "./chunk-T5FRVEJQ.mjs";
11
11
  import {
12
12
  Button
13
13
  } from "./chunk-NOOEKOWY.mjs";
@@ -1,3 +1,6 @@
1
+ import {
2
+ Switch
3
+ } from "./chunk-PNSYFE3K.mjs";
1
4
  import {
2
5
  Tabs,
3
6
  TabsContent,
@@ -11,12 +14,6 @@ import {
11
14
  SelectTrigger,
12
15
  SelectValue
13
16
  } from "./chunk-K6VCC2MK.mjs";
14
- import {
15
- Separator
16
- } from "./chunk-2GIYVERS.mjs";
17
- import {
18
- Switch
19
- } from "./chunk-PNSYFE3K.mjs";
20
17
  import {
21
18
  Dialog,
22
19
  DialogContent,
@@ -24,7 +21,10 @@ import {
24
21
  DialogFooter,
25
22
  DialogHeader,
26
23
  DialogTitle
27
- } from "./chunk-OIETBBXQ.mjs";
24
+ } from "./chunk-T5FRVEJQ.mjs";
25
+ import {
26
+ Separator
27
+ } from "./chunk-2GIYVERS.mjs";
28
28
  import {
29
29
  DatePicker
30
30
  } from "./chunk-TRM3KIHT.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  DialogContent,
7
7
  DialogHeader,
8
8
  DialogTitle
9
- } from "./chunk-OIETBBXQ.mjs";
9
+ } from "./chunk-T5FRVEJQ.mjs";
10
10
  import {
11
11
  Input
12
12
  } from "./chunk-LBTHZSBT.mjs";
@@ -9,6 +9,14 @@ import {
9
9
  TabsList,
10
10
  TabsTrigger
11
11
  } from "./chunk-WE4YKBDE.mjs";
12
+ import {
13
+ Dialog,
14
+ DialogContent,
15
+ DialogDescription,
16
+ DialogFooter,
17
+ DialogHeader,
18
+ DialogTitle
19
+ } from "./chunk-T5FRVEJQ.mjs";
12
20
  import {
13
21
  DropdownMenu,
14
22
  DropdownMenuContent,
@@ -16,24 +24,16 @@ import {
16
24
  DropdownMenuSeparator,
17
25
  DropdownMenuTrigger
18
26
  } from "./chunk-H5DTKPJ2.mjs";
27
+ import {
28
+ Avatar,
29
+ AvatarFallback
30
+ } from "./chunk-H6NQTIF4.mjs";
19
31
  import {
20
32
  Separator
21
33
  } from "./chunk-2GIYVERS.mjs";
22
34
  import {
23
35
  Textarea
24
36
  } from "./chunk-BS75ICOO.mjs";
25
- import {
26
- Dialog,
27
- DialogContent,
28
- DialogDescription,
29
- DialogFooter,
30
- DialogHeader,
31
- DialogTitle
32
- } from "./chunk-OIETBBXQ.mjs";
33
- import {
34
- Avatar,
35
- AvatarFallback
36
- } from "./chunk-H6NQTIF4.mjs";
37
37
  import {
38
38
  Badge
39
39
  } from "./chunk-X6RC5UWB.mjs";
@@ -665,7 +665,7 @@ function ChatComposer({
665
665
  className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
666
666
  }
667
667
  ) }),
668
- /* @__PURE__ */ jsx3(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ jsx3(
668
+ emailMode !== "reply" && /* @__PURE__ */ jsx3(ComposerEmailFieldRow, { label: "Subject", children: /* @__PURE__ */ jsx3(
669
669
  "input",
670
670
  {
671
671
  type: "text",
@@ -747,7 +747,8 @@ function ChatComposer({
747
747
  content: html,
748
748
  to: emailTo,
749
749
  cc: emailCc,
750
- subject: emailSubject
750
+ subject: emailSubject,
751
+ isReply: emailMode === "reply"
751
752
  });
752
753
  editor == null ? void 0 : editor.commands.clearContent();
753
754
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TaskCheckItem
3
- } from "./chunk-EXI64H46.mjs";
3
+ } from "./chunk-L6LE4OIM.mjs";
4
4
  import {
5
5
  Progress
6
6
  } from "./chunk-JPGL36WQ.mjs";
@@ -23,16 +23,16 @@ import {
23
23
  SelectTrigger,
24
24
  SelectValue
25
25
  } from "./chunk-K6VCC2MK.mjs";
26
- import {
27
- Spinner
28
- } from "./chunk-JVMXMFBB.mjs";
29
26
  import {
30
27
  Dialog,
31
28
  DialogContent,
32
29
  DialogFooter,
33
30
  DialogHeader,
34
31
  DialogTitle
35
- } from "./chunk-OIETBBXQ.mjs";
32
+ } from "./chunk-T5FRVEJQ.mjs";
33
+ import {
34
+ Spinner
35
+ } from "./chunk-JVMXMFBB.mjs";
36
36
  import {
37
37
  DatePicker
38
38
  } from "./chunk-TRM3KIHT.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  DialogContent,
4
4
  DialogHeader,
5
5
  DialogTitle
6
- } from "./chunk-OIETBBXQ.mjs";
6
+ } from "./chunk-T5FRVEJQ.mjs";
7
7
  import {
8
8
  Badge
9
9
  } from "./chunk-X6RC5UWB.mjs";
@@ -7,7 +7,7 @@ import {
7
7
  DialogFooter,
8
8
  DialogHeader,
9
9
  DialogTitle
10
- } from "./chunk-OIETBBXQ.mjs";
10
+ } from "./chunk-T5FRVEJQ.mjs";
11
11
  import {
12
12
  Label
13
13
  } from "./chunk-LSRGA5BI.mjs";
@@ -0,0 +1,443 @@
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", children: serviceData.emailCategories.available.map(
336
+ (category) => {
337
+ const checked = serviceData.emailCategories.selected.includes(
338
+ category
339
+ );
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
+ ] })
379
+ ] }),
380
+ /* @__PURE__ */ jsxs3(DialogFooter, { children: [
381
+ /* @__PURE__ */ jsx3(
382
+ Button,
383
+ {
384
+ variant: "destructive",
385
+ size: "sm",
386
+ onClick: onDisconnect,
387
+ className: "mr-auto",
388
+ children: "Disconnect"
389
+ }
390
+ ),
391
+ /* @__PURE__ */ jsx3(
392
+ Button,
393
+ {
394
+ variant: "outline-secondary",
395
+ size: "sm",
396
+ onClick: () => onOpenChange(false),
397
+ children: "Cancel"
398
+ }
399
+ ),
400
+ /* @__PURE__ */ jsx3(Button, { size: "sm", onClick: onReconnect, children: "Reconnect" })
401
+ ] })
402
+ ] }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
403
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-4 py-2", children: [
404
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
405
+ /* @__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" }) }),
406
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0.5", children: [
407
+ /* @__PURE__ */ jsxs3("p", { className: "text-sm font-semibold", children: [
408
+ "Connect ",
409
+ serviceTitle
410
+ ] }),
411
+ /* @__PURE__ */ jsx3("p", { className: "text-muted-foreground text-xs", children: connectDescription })
412
+ ] })
413
+ ] }),
414
+ connectPermissions && connectPermissions.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 border border-border px-4 py-3", children: [
415
+ /* @__PURE__ */ jsx3("p", { className: "text-overline text-muted-foreground", children: "Permissions requested" }),
416
+ connectPermissions.map((perm) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
417
+ /* @__PURE__ */ jsx3(Check2, { className: "h-3.5 w-3.5 shrink-0 text-success" }),
418
+ /* @__PURE__ */ jsx3("span", { className: "text-sm text-muted-foreground", children: perm })
419
+ ] }, perm))
420
+ ] })
421
+ ] }),
422
+ /* @__PURE__ */ jsxs3(DialogFooter, { children: [
423
+ /* @__PURE__ */ jsx3(
424
+ Button,
425
+ {
426
+ variant: "outline-secondary",
427
+ size: "sm",
428
+ onClick: () => onOpenChange(false),
429
+ children: "Cancel"
430
+ }
431
+ ),
432
+ /* @__PURE__ */ jsx3(Button, { size: "sm", onClick: onConnect, children: "Connect" })
433
+ ] })
434
+ ] }) }) });
435
+ }
436
+
437
+ export {
438
+ AgentCard,
439
+ AgentMenuModal,
440
+ IntegrationServiceCard,
441
+ IntegrationInstructionCard,
442
+ ServiceConfigurationModal
443
+ };
@@ -20,16 +20,16 @@ import {
20
20
  SelectTrigger,
21
21
  SelectValue
22
22
  } from "./chunk-K6VCC2MK.mjs";
23
- import {
24
- Textarea
25
- } from "./chunk-BS75ICOO.mjs";
26
23
  import {
27
24
  Dialog,
28
25
  DialogContent,
29
26
  DialogFooter,
30
27
  DialogHeader,
31
28
  DialogTitle
32
- } from "./chunk-OIETBBXQ.mjs";
29
+ } from "./chunk-T5FRVEJQ.mjs";
30
+ import {
31
+ Textarea
32
+ } from "./chunk-BS75ICOO.mjs";
33
33
  import {
34
34
  DatePicker
35
35
  } from "./chunk-TRM3KIHT.mjs";