@wealthx/shadcn 1.5.28 → 1.5.30
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 +134 -134
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-DWJHPNFL.mjs → chunk-4UT3RZ2D.mjs} +32 -16
- package/dist/{chunk-CE2WONIY.mjs → chunk-AE4JKISB.mjs} +27 -31
- package/dist/chunk-BZWQU52U.mjs +1025 -0
- package/dist/{chunk-RNLIZRAK.mjs → chunk-C6R42PCL.mjs} +1 -1
- package/dist/{chunk-EVUY67CY.mjs → chunk-FTQ2AKZ2.mjs} +1 -1
- package/dist/{chunk-7T4TYUO3.mjs → chunk-H5ZD63NT.mjs} +31 -16
- package/dist/{chunk-SO4RB3XB.mjs → chunk-IEQX4UVP.mjs} +2 -2
- package/dist/chunk-IKVF4XE2.mjs +94 -0
- package/dist/{chunk-KPGARKFC.mjs → chunk-MS3GNXMB.mjs} +1 -1
- package/dist/{chunk-M32QNCD3.mjs → chunk-OSSS56CB.mjs} +1 -1
- package/dist/{chunk-36IN7YRM.mjs → chunk-SCGCGVDN.mjs} +1 -1
- package/dist/{chunk-KJQ3BVTB.mjs → chunk-X2NIDXFB.mjs} +1 -1
- package/dist/components/ui/ai-builder/index.js +993 -12
- package/dist/components/ui/ai-builder/index.mjs +27 -3
- package/dist/components/ui/ai-conversations/index.js +27 -31
- package/dist/components/ui/ai-conversations/index.mjs +1 -1
- package/dist/components/ui/backoffice-signup-steps.js +98 -48
- package/dist/components/ui/backoffice-signup-steps.mjs +4 -4
- package/dist/components/ui/bank-statement-generate-dialog.mjs +2 -2
- package/dist/components/ui/chat-widget.js +1 -1
- package/dist/components/ui/chat-widget.mjs +2 -2
- package/dist/components/ui/contact-alert-dialog/index.mjs +2 -2
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/field.mjs +1 -1
- package/dist/components/ui/frontend-signup-steps.js +166 -90
- package/dist/components/ui/frontend-signup-steps.mjs +4 -5
- package/dist/components/ui/password-strength-tooltip.js +81 -107
- package/dist/components/ui/password-strength-tooltip.mjs +3 -2
- package/dist/components/ui/property-report-dialog.mjs +2 -2
- package/dist/components/ui/signup-form-primitives.js +117 -114
- package/dist/components/ui/signup-form-primitives.mjs +3 -4
- package/dist/components/ui/two-fa-setup-form.js +31 -16
- package/dist/components/ui/two-fa-setup-form.mjs +2 -2
- package/dist/index.js +5061 -4992
- package/dist/index.mjs +12 -12
- package/dist/styles.css +1 -1
- package/package.json +4 -1
- package/src/components/index.tsx +0 -2
- package/src/components/ui/ai-builder/agent-card.tsx +7 -5
- package/src/components/ui/ai-builder/agent-settings.tsx +709 -0
- package/src/components/ui/ai-builder/index.tsx +27 -2
- package/src/components/ui/ai-builder/service-config-modal.tsx +11 -11
- package/src/components/ui/ai-builder/types.ts +27 -15
- package/src/components/ui/ai-conversations/thread.tsx +9 -11
- package/src/components/ui/field.tsx +12 -12
- package/src/components/ui/password-strength-tooltip.tsx +89 -47
- package/src/components/ui/signup-form-primitives.tsx +34 -16
- package/src/components/ui/two-fa-setup-form.tsx +41 -31
- package/src/styles/styles-css.ts +1 -1
- package/dist/chunk-T5PGVLMR.mjs +0 -479
- package/dist/chunk-WHIW6KOB.mjs +0 -57
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { useState } from "react";
|
|
3
2
|
import { Smartphone } from "lucide-react";
|
|
4
3
|
import { Button } from "@/components/ui/button";
|
|
@@ -6,19 +5,20 @@ import { Field, FieldError } from "@/components/ui/field";
|
|
|
6
5
|
import { InputGroup, InputGroupInput } from "@/components/ui/input-group";
|
|
7
6
|
import { Label } from "@/components/ui/label";
|
|
8
7
|
import { cn } from "@/lib/utils";
|
|
8
|
+
import type { ReactNode } from "react";
|
|
9
9
|
|
|
10
10
|
// ─── Types ────────────────────────────────────────────────────────────────────
|
|
11
11
|
|
|
12
12
|
export type TwoFAApp = {
|
|
13
13
|
name: string;
|
|
14
|
-
icon?:
|
|
15
|
-
qrNode?:
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
qrNode?: ReactNode;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type TwoFASetupFormProps = {
|
|
19
19
|
title?: string;
|
|
20
20
|
apps?: TwoFAApp[];
|
|
21
|
-
qrCodeNode?:
|
|
21
|
+
qrCodeNode?: ReactNode;
|
|
22
22
|
onVerify: (token: string) => Promise<void>;
|
|
23
23
|
onSetupLater?: () => void;
|
|
24
24
|
required?: boolean;
|
|
@@ -30,6 +30,17 @@ const DEFAULT_APPS: TwoFAApp[] = [
|
|
|
30
30
|
{ name: "Microsoft Authenticator" },
|
|
31
31
|
];
|
|
32
32
|
|
|
33
|
+
const STEP_META = {
|
|
34
|
+
1: {
|
|
35
|
+
subtitle: "We recommend Google Authenticator or Microsoft Authenticator",
|
|
36
|
+
defaultTitle: "2FA Setup",
|
|
37
|
+
},
|
|
38
|
+
2: {
|
|
39
|
+
title: "Open Auth App and Scan Code",
|
|
40
|
+
subtitle: "Open your authenticator app and scan the QR code",
|
|
41
|
+
},
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
33
44
|
// ─── AppDownloadStep ─────────────────────────────────────────────────────────
|
|
34
45
|
|
|
35
46
|
function AppDownloadStep({
|
|
@@ -45,27 +56,28 @@ function AppDownloadStep({
|
|
|
45
56
|
}) {
|
|
46
57
|
return (
|
|
47
58
|
<div className="flex flex-col gap-6">
|
|
48
|
-
<div className="flex gap-
|
|
59
|
+
<div className="flex flex-col gap-3">
|
|
49
60
|
{apps.map((app) => (
|
|
50
61
|
<div
|
|
51
62
|
key={app.name}
|
|
52
|
-
className="flex
|
|
63
|
+
className="flex items-center gap-4 border border-border bg-muted/30 p-4"
|
|
53
64
|
>
|
|
54
|
-
<div className="flex items-center
|
|
55
|
-
{app.
|
|
56
|
-
<
|
|
65
|
+
<div className="flex shrink-0 items-center justify-center">
|
|
66
|
+
{app.qrNode ?? (
|
|
67
|
+
<div className="flex h-[80px] w-[80px] items-center justify-center border border-dashed border-border bg-muted/50 text-[11px] text-muted-foreground">
|
|
68
|
+
Scan
|
|
69
|
+
</div>
|
|
57
70
|
)}
|
|
58
|
-
{app.name}
|
|
59
71
|
</div>
|
|
60
|
-
|
|
61
|
-
<div className="flex items-center
|
|
62
|
-
{app.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Scan to download
|
|
72
|
+
<div className="flex flex-col gap-1">
|
|
73
|
+
<div className="flex items-center gap-2 text-sm font-medium text-foreground">
|
|
74
|
+
{app.icon ?? (
|
|
75
|
+
<Smartphone size={16} className="text-muted-foreground" />
|
|
76
|
+
)}
|
|
77
|
+
{app.name}
|
|
67
78
|
</div>
|
|
68
|
-
|
|
79
|
+
<p className="text-xs text-muted-foreground">Scan to download</p>
|
|
80
|
+
</div>
|
|
69
81
|
</div>
|
|
70
82
|
))}
|
|
71
83
|
</div>
|
|
@@ -97,7 +109,7 @@ function VerificationStep({
|
|
|
97
109
|
onSetupLater,
|
|
98
110
|
required,
|
|
99
111
|
}: {
|
|
100
|
-
qrCodeNode?:
|
|
112
|
+
qrCodeNode?: ReactNode;
|
|
101
113
|
onVerify: (token: string) => Promise<void>;
|
|
102
114
|
onBack: () => void;
|
|
103
115
|
onSetupLater?: () => void;
|
|
@@ -116,8 +128,10 @@ function VerificationStep({
|
|
|
116
128
|
setIsLoading(true);
|
|
117
129
|
try {
|
|
118
130
|
await onVerify(token);
|
|
119
|
-
} catch {
|
|
120
|
-
setError(
|
|
131
|
+
} catch (err) {
|
|
132
|
+
setError(
|
|
133
|
+
err instanceof Error ? err.message : "Invalid code. Please try again."
|
|
134
|
+
);
|
|
121
135
|
} finally {
|
|
122
136
|
setIsLoading(false);
|
|
123
137
|
}
|
|
@@ -126,9 +140,7 @@ function VerificationStep({
|
|
|
126
140
|
return (
|
|
127
141
|
<div className="flex flex-col gap-6">
|
|
128
142
|
<div className="flex flex-col items-center gap-3">
|
|
129
|
-
{qrCodeNode
|
|
130
|
-
<div className="flex items-center justify-center">{qrCodeNode}</div>
|
|
131
|
-
) : (
|
|
143
|
+
{qrCodeNode ?? (
|
|
132
144
|
<div className="flex h-[140px] w-[140px] items-center justify-center border border-dashed border-border bg-muted/50 text-xs text-muted-foreground">
|
|
133
145
|
QR Code
|
|
134
146
|
</div>
|
|
@@ -185,7 +197,7 @@ function VerificationStep({
|
|
|
185
197
|
// ─── TwoFASetupForm ───────────────────────────────────────────────────────────
|
|
186
198
|
|
|
187
199
|
export function TwoFASetupForm({
|
|
188
|
-
title
|
|
200
|
+
title,
|
|
189
201
|
apps = DEFAULT_APPS,
|
|
190
202
|
qrCodeNode,
|
|
191
203
|
onVerify,
|
|
@@ -195,15 +207,13 @@ export function TwoFASetupForm({
|
|
|
195
207
|
}: TwoFASetupFormProps) {
|
|
196
208
|
const [step, setStep] = useState<1 | 2>(1);
|
|
197
209
|
|
|
198
|
-
const stepTitle =
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
? "We recommend Google Authenticator or Microsoft Authenticator"
|
|
202
|
-
: "Open your authenticator app and scan the QR code";
|
|
210
|
+
const stepTitle =
|
|
211
|
+
step === 1 ? title ?? STEP_META[1].defaultTitle : STEP_META[2].title;
|
|
212
|
+
const stepSubtitle = STEP_META[step].subtitle;
|
|
203
213
|
|
|
204
214
|
return (
|
|
205
215
|
<div className={cn("flex flex-col gap-6", className)}>
|
|
206
|
-
<div className="flex flex-col gap-1">
|
|
216
|
+
<div className="flex flex-col items-center gap-1 text-center">
|
|
207
217
|
<h2 className="text-xl font-semibold text-foreground">{stepTitle}</h2>
|
|
208
218
|
<p className="text-sm text-muted-foreground">{stepSubtitle}</p>
|
|
209
219
|
</div>
|