@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
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Field,
|
|
7
7
|
FieldError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MS3GNXMB.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Label
|
|
11
11
|
} from "./chunk-LSRGA5BI.mjs";
|
|
@@ -27,6 +27,16 @@ var DEFAULT_APPS = [
|
|
|
27
27
|
{ name: "Google Authenticator" },
|
|
28
28
|
{ name: "Microsoft Authenticator" }
|
|
29
29
|
];
|
|
30
|
+
var STEP_META = {
|
|
31
|
+
1: {
|
|
32
|
+
subtitle: "We recommend Google Authenticator or Microsoft Authenticator",
|
|
33
|
+
defaultTitle: "2FA Setup"
|
|
34
|
+
},
|
|
35
|
+
2: {
|
|
36
|
+
title: "Open Auth App and Scan Code",
|
|
37
|
+
subtitle: "Open your authenticator app and scan the QR code"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
30
40
|
function AppDownloadStep({
|
|
31
41
|
apps,
|
|
32
42
|
onNext,
|
|
@@ -34,18 +44,21 @@ function AppDownloadStep({
|
|
|
34
44
|
required
|
|
35
45
|
}) {
|
|
36
46
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
37
|
-
/* @__PURE__ */ jsx("div", { className: "flex gap-
|
|
38
|
-
var _a;
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: apps.map((app) => {
|
|
48
|
+
var _a, _b;
|
|
39
49
|
return /* @__PURE__ */ jsxs(
|
|
40
50
|
"div",
|
|
41
51
|
{
|
|
42
|
-
className: "flex
|
|
52
|
+
className: "flex items-center gap-4 border border-border bg-muted/30 p-4",
|
|
43
53
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center justify-center", children: (_a = app.qrNode) != null ? _a : /* @__PURE__ */ jsx("div", { className: "flex h-[80px] w-[80px] items-center justify-center border border-dashed border-border bg-muted/50 text-[11px] text-muted-foreground", children: "Scan" }) }),
|
|
55
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
57
|
+
(_b = app.icon) != null ? _b : /* @__PURE__ */ jsx(Smartphone, { size: 16, className: "text-muted-foreground" }),
|
|
58
|
+
app.name
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Scan to download" })
|
|
61
|
+
] })
|
|
49
62
|
]
|
|
50
63
|
},
|
|
51
64
|
app.name
|
|
@@ -77,15 +90,17 @@ function VerificationStep({
|
|
|
77
90
|
setIsLoading(true);
|
|
78
91
|
try {
|
|
79
92
|
yield onVerify(token);
|
|
80
|
-
} catch (
|
|
81
|
-
setError(
|
|
93
|
+
} catch (err) {
|
|
94
|
+
setError(
|
|
95
|
+
err instanceof Error ? err.message : "Invalid code. Please try again."
|
|
96
|
+
);
|
|
82
97
|
} finally {
|
|
83
98
|
setIsLoading(false);
|
|
84
99
|
}
|
|
85
100
|
});
|
|
86
101
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
87
102
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
|
|
88
|
-
qrCodeNode
|
|
103
|
+
qrCodeNode != null ? qrCodeNode : /* @__PURE__ */ jsx("div", { className: "flex h-[140px] w-[140px] items-center justify-center border border-dashed border-border bg-muted/50 text-xs text-muted-foreground", children: "QR Code" }),
|
|
89
104
|
/* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "The temporary code will show for authentication. Insert below." })
|
|
90
105
|
] }),
|
|
91
106
|
/* @__PURE__ */ jsxs(Field, { children: [
|
|
@@ -127,7 +142,7 @@ function VerificationStep({
|
|
|
127
142
|
] });
|
|
128
143
|
}
|
|
129
144
|
function TwoFASetupForm({
|
|
130
|
-
title
|
|
145
|
+
title,
|
|
131
146
|
apps = DEFAULT_APPS,
|
|
132
147
|
qrCodeNode,
|
|
133
148
|
onVerify,
|
|
@@ -136,10 +151,10 @@ function TwoFASetupForm({
|
|
|
136
151
|
className
|
|
137
152
|
}) {
|
|
138
153
|
const [step, setStep] = useState(1);
|
|
139
|
-
const stepTitle = step === 1 ? title
|
|
140
|
-
const stepSubtitle = step
|
|
154
|
+
const stepTitle = step === 1 ? title != null ? title : STEP_META[1].defaultTitle : STEP_META[2].title;
|
|
155
|
+
const stepSubtitle = STEP_META[step].subtitle;
|
|
141
156
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
142
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
157
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1 text-center", children: [
|
|
143
158
|
/* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-foreground", children: stepTitle }),
|
|
144
159
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: stepSubtitle })
|
|
145
160
|
] }),
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PasswordField,
|
|
4
4
|
SectionHeading,
|
|
5
5
|
StaffRowItem
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4UT3RZ2D.mjs";
|
|
7
7
|
import {
|
|
8
8
|
UploadCard
|
|
9
9
|
} from "./chunk-I4KVSZCH.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Field,
|
|
15
15
|
FieldError,
|
|
16
16
|
FieldLabel
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MS3GNXMB.mjs";
|
|
18
18
|
import {
|
|
19
19
|
Tooltip,
|
|
20
20
|
TooltipContent,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useThemeVars
|
|
3
|
+
} from "./chunk-XYSRRDBH.mjs";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-AFML43VJ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/ui/password-strength-tooltip.tsx
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Check, X } from "lucide-react";
|
|
11
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var PASSWORD_STRENGTH_RULES = [
|
|
14
|
+
{ label: "Minimum 8 characters", test: (p) => p.length >= 8 },
|
|
15
|
+
{ label: "At least one uppercase letter", test: (p) => /[A-Z]/.test(p) },
|
|
16
|
+
{ label: "At least one lowercase letter", test: (p) => /[a-z]/.test(p) },
|
|
17
|
+
{ label: "At least one number", test: (p) => /\d/.test(p) },
|
|
18
|
+
{
|
|
19
|
+
label: "At least one special character",
|
|
20
|
+
test: (p) => /[^A-Za-z0-9]/.test(p)
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
var PasswordStrengthTooltip = React.forwardRef(function PasswordStrengthTooltip2({ open = false, password, children, side = "right" }, forwardedRef) {
|
|
24
|
+
const themeVars = useThemeVars();
|
|
25
|
+
const anchorRef = React.useRef(null);
|
|
26
|
+
const composedRef = React.useCallback(
|
|
27
|
+
(node) => {
|
|
28
|
+
anchorRef.current = node;
|
|
29
|
+
if (typeof forwardedRef === "function") {
|
|
30
|
+
forwardedRef(node);
|
|
31
|
+
} else if (forwardedRef) {
|
|
32
|
+
forwardedRef.current = node;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
[forwardedRef]
|
|
37
|
+
);
|
|
38
|
+
return (
|
|
39
|
+
// PopoverPrimitive.Root with no Trigger — popup is fully controlled via `open` prop.
|
|
40
|
+
// The wrapper div has no trigger behaviors injected, so clicking the input inside
|
|
41
|
+
// works on the first click without interference.
|
|
42
|
+
/* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open, children: [
|
|
43
|
+
/* @__PURE__ */ jsx("div", { ref: composedRef, children }),
|
|
44
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
45
|
+
PopoverPrimitive.Positioner,
|
|
46
|
+
{
|
|
47
|
+
anchor: anchorRef,
|
|
48
|
+
side,
|
|
49
|
+
align: "start",
|
|
50
|
+
sideOffset: 8,
|
|
51
|
+
className: "z-[200]",
|
|
52
|
+
children: /* @__PURE__ */ jsx(
|
|
53
|
+
PopoverPrimitive.Popup,
|
|
54
|
+
{
|
|
55
|
+
initialFocus: false,
|
|
56
|
+
finalFocus: false,
|
|
57
|
+
className: cn(
|
|
58
|
+
"border border-border bg-popover shadow-md outline-hidden",
|
|
59
|
+
"w-auto max-w-[280px] p-3 font-sans",
|
|
60
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
61
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
62
|
+
"data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
|
|
63
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95"
|
|
64
|
+
),
|
|
65
|
+
style: themeVars,
|
|
66
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1.5", children: PASSWORD_STRENGTH_RULES.map((rule) => {
|
|
67
|
+
const valid = password ? rule.test(password) : false;
|
|
68
|
+
return /* @__PURE__ */ jsxs(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: cn(
|
|
72
|
+
"flex items-center gap-1.5 text-[13px] leading-[18px]",
|
|
73
|
+
valid ? "text-success" : "text-destructive"
|
|
74
|
+
),
|
|
75
|
+
children: [
|
|
76
|
+
valid ? /* @__PURE__ */ jsx(Check, { size: 14, className: "shrink-0" }) : /* @__PURE__ */ jsx(X, { size: 14, className: "shrink-0" }),
|
|
77
|
+
/* @__PURE__ */ jsx("span", { children: rule.label })
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
rule.label
|
|
81
|
+
);
|
|
82
|
+
}) })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
) })
|
|
87
|
+
] })
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
PASSWORD_STRENGTH_RULES,
|
|
93
|
+
PasswordStrengthTooltip
|
|
94
|
+
};
|
|
@@ -237,7 +237,7 @@ function FieldError(_a) {
|
|
|
237
237
|
return /* @__PURE__ */ jsx(
|
|
238
238
|
"div",
|
|
239
239
|
__spreadProps(__spreadValues({
|
|
240
|
-
className: cn("text-caption text-destructive", className),
|
|
240
|
+
className: cn("text-left text-caption text-destructive", className),
|
|
241
241
|
"data-slot": "field-error",
|
|
242
242
|
role: "alert"
|
|
243
243
|
}, props), {
|