@wealthx/shadcn 1.5.29 → 1.5.31
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 +98 -98
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-DWJHPNFL.mjs → chunk-4UT3RZ2D.mjs} +32 -16
- 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/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 +133 -68
- package/dist/index.mjs +10 -10
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- 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-WHIW6KOB.mjs +0 -57
|
@@ -367,7 +367,7 @@ function FieldError(_a) {
|
|
|
367
367
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
368
368
|
"div",
|
|
369
369
|
__spreadProps(__spreadValues({
|
|
370
|
-
className: cn("text-caption text-destructive", className),
|
|
370
|
+
className: cn("text-left text-caption text-destructive", className),
|
|
371
371
|
"data-slot": "field-error",
|
|
372
372
|
role: "alert"
|
|
373
373
|
}, props), {
|
|
@@ -483,6 +483,16 @@ var DEFAULT_APPS = [
|
|
|
483
483
|
{ name: "Google Authenticator" },
|
|
484
484
|
{ name: "Microsoft Authenticator" }
|
|
485
485
|
];
|
|
486
|
+
var STEP_META = {
|
|
487
|
+
1: {
|
|
488
|
+
subtitle: "We recommend Google Authenticator or Microsoft Authenticator",
|
|
489
|
+
defaultTitle: "2FA Setup"
|
|
490
|
+
},
|
|
491
|
+
2: {
|
|
492
|
+
title: "Open Auth App and Scan Code",
|
|
493
|
+
subtitle: "Open your authenticator app and scan the QR code"
|
|
494
|
+
}
|
|
495
|
+
};
|
|
486
496
|
function AppDownloadStep({
|
|
487
497
|
apps,
|
|
488
498
|
onNext,
|
|
@@ -490,18 +500,21 @@ function AppDownloadStep({
|
|
|
490
500
|
required
|
|
491
501
|
}) {
|
|
492
502
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
493
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-
|
|
494
|
-
var _a;
|
|
503
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col gap-3", children: apps.map((app) => {
|
|
504
|
+
var _a, _b;
|
|
495
505
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
496
506
|
"div",
|
|
497
507
|
{
|
|
498
|
-
className: "flex
|
|
508
|
+
className: "flex items-center gap-4 border border-border bg-muted/30 p-4",
|
|
499
509
|
children: [
|
|
500
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex shrink-0 items-center justify-center", children: (_a = app.qrNode) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime8.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" }) }),
|
|
511
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
513
|
+
(_b = app.icon) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Smartphone, { size: 16, className: "text-muted-foreground" }),
|
|
514
|
+
app.name
|
|
515
|
+
] }),
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-muted-foreground", children: "Scan to download" })
|
|
517
|
+
] })
|
|
505
518
|
]
|
|
506
519
|
},
|
|
507
520
|
app.name
|
|
@@ -533,15 +546,17 @@ function VerificationStep({
|
|
|
533
546
|
setIsLoading(true);
|
|
534
547
|
try {
|
|
535
548
|
yield onVerify(token);
|
|
536
|
-
} catch (
|
|
537
|
-
setError(
|
|
549
|
+
} catch (err) {
|
|
550
|
+
setError(
|
|
551
|
+
err instanceof Error ? err.message : "Invalid code. Please try again."
|
|
552
|
+
);
|
|
538
553
|
} finally {
|
|
539
554
|
setIsLoading(false);
|
|
540
555
|
}
|
|
541
556
|
});
|
|
542
557
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
543
558
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
544
|
-
qrCodeNode
|
|
559
|
+
qrCodeNode != null ? qrCodeNode : /* @__PURE__ */ (0, import_jsx_runtime8.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" }),
|
|
545
560
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-center text-sm text-muted-foreground", children: "The temporary code will show for authentication. Insert below." })
|
|
546
561
|
] }),
|
|
547
562
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Field, { children: [
|
|
@@ -583,7 +598,7 @@ function VerificationStep({
|
|
|
583
598
|
] });
|
|
584
599
|
}
|
|
585
600
|
function TwoFASetupForm({
|
|
586
|
-
title
|
|
601
|
+
title,
|
|
587
602
|
apps = DEFAULT_APPS,
|
|
588
603
|
qrCodeNode,
|
|
589
604
|
onVerify,
|
|
@@ -592,10 +607,10 @@ function TwoFASetupForm({
|
|
|
592
607
|
className
|
|
593
608
|
}) {
|
|
594
609
|
const [step, setStep] = (0, import_react3.useState)(1);
|
|
595
|
-
const stepTitle = step === 1 ? title
|
|
596
|
-
const stepSubtitle = step
|
|
610
|
+
const stepTitle = step === 1 ? title != null ? title : STEP_META[1].defaultTitle : STEP_META[2].title;
|
|
611
|
+
const stepSubtitle = STEP_META[step].subtitle;
|
|
597
612
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
598
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center gap-1 text-center", children: [
|
|
599
614
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-xl font-semibold text-foreground", children: stepTitle }),
|
|
600
615
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-muted-foreground", children: stepSubtitle })
|
|
601
616
|
] }),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TwoFASetupForm
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-H5ZD63NT.mjs";
|
|
4
4
|
import "../../chunk-7YI3HEBH.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-MS3GNXMB.mjs";
|
|
6
6
|
import "../../chunk-2GIYVERS.mjs";
|
|
7
7
|
import "../../chunk-BS75ICOO.mjs";
|
|
8
8
|
import "../../chunk-LSRGA5BI.mjs";
|
package/dist/index.js
CHANGED
|
@@ -7025,7 +7025,7 @@ function FieldError(_a) {
|
|
|
7025
7025
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7026
7026
|
"div",
|
|
7027
7027
|
__spreadProps(__spreadValues({
|
|
7028
|
-
className: cn("text-caption text-destructive", className),
|
|
7028
|
+
className: cn("text-left text-caption text-destructive", className),
|
|
7029
7029
|
"data-slot": "field-error",
|
|
7030
7030
|
role: "alert"
|
|
7031
7031
|
}, props), {
|
|
@@ -24802,9 +24802,11 @@ var import_react39 = require("react");
|
|
|
24802
24802
|
var import_lucide_react68 = require("lucide-react");
|
|
24803
24803
|
|
|
24804
24804
|
// src/components/ui/password-strength-tooltip.tsx
|
|
24805
|
+
var React56 = __toESM(require("react"));
|
|
24805
24806
|
var import_lucide_react67 = require("lucide-react");
|
|
24807
|
+
var import_popover5 = require("@base-ui/react/popover");
|
|
24806
24808
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
24807
|
-
var
|
|
24809
|
+
var PASSWORD_STRENGTH_RULES = [
|
|
24808
24810
|
{ label: "Minimum 8 characters", test: (p) => p.length >= 8 },
|
|
24809
24811
|
{ label: "At least one uppercase letter", test: (p) => /[A-Z]/.test(p) },
|
|
24810
24812
|
{ label: "At least one lowercase letter", test: (p) => /[a-z]/.test(p) },
|
|
@@ -24814,40 +24816,73 @@ var RULES = [
|
|
|
24814
24816
|
test: (p) => /[^A-Za-z0-9]/.test(p)
|
|
24815
24817
|
}
|
|
24816
24818
|
];
|
|
24817
|
-
|
|
24818
|
-
|
|
24819
|
-
|
|
24820
|
-
|
|
24821
|
-
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
{
|
|
24828
|
-
side,
|
|
24829
|
-
align: "start",
|
|
24830
|
-
sideOffset: 8,
|
|
24831
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
24832
|
-
className: "w-auto max-w-[280px] font-sans",
|
|
24833
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex flex-col gap-1.5", children: RULES.map((rule) => {
|
|
24834
|
-
const valid = password ? rule.test(password) : false;
|
|
24835
|
-
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
24836
|
-
"div",
|
|
24837
|
-
{
|
|
24838
|
-
className: `flex items-center gap-1.5 text-[13px] leading-[18px] ${valid ? "text-success" : "text-destructive"}`,
|
|
24839
|
-
children: [
|
|
24840
|
-
valid ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react67.Check, { size: 14, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react67.X, { size: 14, className: "shrink-0" }),
|
|
24841
|
-
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { children: rule.label })
|
|
24842
|
-
]
|
|
24843
|
-
},
|
|
24844
|
-
rule.label
|
|
24845
|
-
);
|
|
24846
|
-
}) })
|
|
24819
|
+
var PasswordStrengthTooltip = React56.forwardRef(function PasswordStrengthTooltip2({ open = false, password, children, side = "right" }, forwardedRef) {
|
|
24820
|
+
const themeVars = useThemeVars();
|
|
24821
|
+
const anchorRef = React56.useRef(null);
|
|
24822
|
+
const composedRef = React56.useCallback(
|
|
24823
|
+
(node) => {
|
|
24824
|
+
anchorRef.current = node;
|
|
24825
|
+
if (typeof forwardedRef === "function") {
|
|
24826
|
+
forwardedRef(node);
|
|
24827
|
+
} else if (forwardedRef) {
|
|
24828
|
+
forwardedRef.current = node;
|
|
24847
24829
|
}
|
|
24848
|
-
|
|
24849
|
-
|
|
24850
|
-
|
|
24830
|
+
},
|
|
24831
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24832
|
+
[forwardedRef]
|
|
24833
|
+
);
|
|
24834
|
+
return (
|
|
24835
|
+
// PopoverPrimitive.Root with no Trigger — popup is fully controlled via `open` prop.
|
|
24836
|
+
// The wrapper div has no trigger behaviors injected, so clicking the input inside
|
|
24837
|
+
// works on the first click without interference.
|
|
24838
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_popover5.Popover.Root, { open, children: [
|
|
24839
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { ref: composedRef, children }),
|
|
24840
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_popover5.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
24841
|
+
import_popover5.Popover.Positioner,
|
|
24842
|
+
{
|
|
24843
|
+
anchor: anchorRef,
|
|
24844
|
+
side,
|
|
24845
|
+
align: "start",
|
|
24846
|
+
sideOffset: 8,
|
|
24847
|
+
className: "z-[200]",
|
|
24848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
24849
|
+
import_popover5.Popover.Popup,
|
|
24850
|
+
{
|
|
24851
|
+
initialFocus: false,
|
|
24852
|
+
finalFocus: false,
|
|
24853
|
+
className: cn(
|
|
24854
|
+
"border border-border bg-popover shadow-md outline-hidden",
|
|
24855
|
+
"w-auto max-w-[280px] p-3 font-sans",
|
|
24856
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
24857
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
24858
|
+
"data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
|
|
24859
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95"
|
|
24860
|
+
),
|
|
24861
|
+
style: themeVars,
|
|
24862
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex flex-col gap-1.5", children: PASSWORD_STRENGTH_RULES.map((rule) => {
|
|
24863
|
+
const valid = password ? rule.test(password) : false;
|
|
24864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
24865
|
+
"div",
|
|
24866
|
+
{
|
|
24867
|
+
className: cn(
|
|
24868
|
+
"flex items-center gap-1.5 text-[13px] leading-[18px]",
|
|
24869
|
+
valid ? "text-success" : "text-destructive"
|
|
24870
|
+
),
|
|
24871
|
+
children: [
|
|
24872
|
+
valid ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react67.Check, { size: 14, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react67.X, { size: 14, className: "shrink-0" }),
|
|
24873
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { children: rule.label })
|
|
24874
|
+
]
|
|
24875
|
+
},
|
|
24876
|
+
rule.label
|
|
24877
|
+
);
|
|
24878
|
+
}) })
|
|
24879
|
+
}
|
|
24880
|
+
)
|
|
24881
|
+
}
|
|
24882
|
+
) })
|
|
24883
|
+
] })
|
|
24884
|
+
);
|
|
24885
|
+
});
|
|
24851
24886
|
|
|
24852
24887
|
// src/components/ui/signup-form-primitives.tsx
|
|
24853
24888
|
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
@@ -24863,13 +24898,6 @@ function FormField2({ label, required, children }) {
|
|
|
24863
24898
|
children
|
|
24864
24899
|
] });
|
|
24865
24900
|
}
|
|
24866
|
-
var STRENGTH_RULES = [
|
|
24867
|
-
{ test: (p) => p.length >= 8 },
|
|
24868
|
-
{ test: (p) => /[A-Z]/.test(p) },
|
|
24869
|
-
{ test: (p) => /[a-z]/.test(p) },
|
|
24870
|
-
{ test: (p) => /\d/.test(p) },
|
|
24871
|
-
{ test: (p) => /[^A-Za-z0-9]/.test(p) }
|
|
24872
|
-
];
|
|
24873
24901
|
function PasswordField({
|
|
24874
24902
|
label,
|
|
24875
24903
|
placeholder,
|
|
@@ -24881,13 +24909,26 @@ function PasswordField({
|
|
|
24881
24909
|
const [error, setError] = (0, import_react39.useState)("");
|
|
24882
24910
|
const [touched, setTouched] = (0, import_react39.useState)(false);
|
|
24883
24911
|
const [value, setValue] = (0, import_react39.useState)("");
|
|
24884
|
-
const [
|
|
24885
|
-
const
|
|
24886
|
-
const
|
|
24912
|
+
const [dismissed, setDismissed] = (0, import_react39.useState)(false);
|
|
24913
|
+
const wrapperRef = (0, import_react39.useRef)(null);
|
|
24914
|
+
const allRulesPass = PASSWORD_STRENGTH_RULES.every((r) => r.test(value));
|
|
24915
|
+
const isPopoverOpen = !!showStrengthPopover && !dismissed && value.length > 0 && !allRulesPass;
|
|
24887
24916
|
const validate = (v) => {
|
|
24888
|
-
if (v
|
|
24917
|
+
if (!v) return "";
|
|
24918
|
+
if (v.length < 8) return "Min. 8 characters required";
|
|
24919
|
+
if (!PASSWORD_STRENGTH_RULES.every((r) => r.test(v)))
|
|
24920
|
+
return "Password doesn't meet all requirements";
|
|
24889
24921
|
return "";
|
|
24890
24922
|
};
|
|
24923
|
+
(0, import_react39.useEffect)(() => {
|
|
24924
|
+
if (!isPopoverOpen) return;
|
|
24925
|
+
const onMouseDown = (e) => {
|
|
24926
|
+
var _a;
|
|
24927
|
+
if (!((_a = wrapperRef.current) == null ? void 0 : _a.contains(e.target))) setDismissed(true);
|
|
24928
|
+
};
|
|
24929
|
+
document.addEventListener("mousedown", onMouseDown, true);
|
|
24930
|
+
return () => document.removeEventListener("mousedown", onMouseDown, true);
|
|
24931
|
+
}, [isPopoverOpen]);
|
|
24891
24932
|
const inputEl = /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "relative", children: [
|
|
24892
24933
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
24893
24934
|
Input,
|
|
@@ -24900,8 +24941,16 @@ function PasswordField({
|
|
|
24900
24941
|
const v = e.target.value;
|
|
24901
24942
|
setValue(v);
|
|
24902
24943
|
onValueChange == null ? void 0 : onValueChange(v);
|
|
24903
|
-
if (!typingStarted && v.length > 0) setTypingStarted(true);
|
|
24904
24944
|
if (touched) setError(validate(v));
|
|
24945
|
+
setDismissed(false);
|
|
24946
|
+
},
|
|
24947
|
+
onFocus: () => setDismissed(false),
|
|
24948
|
+
onKeyDown: (e) => {
|
|
24949
|
+
if (e.key === "Tab") {
|
|
24950
|
+
setTouched(true);
|
|
24951
|
+
setError(validate(value));
|
|
24952
|
+
setDismissed(true);
|
|
24953
|
+
}
|
|
24905
24954
|
},
|
|
24906
24955
|
onBlur: () => {
|
|
24907
24956
|
setTouched(true);
|
|
@@ -24928,13 +24977,14 @@ function PasswordField({
|
|
|
24928
24977
|
showStrengthPopover ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
24929
24978
|
PasswordStrengthTooltip,
|
|
24930
24979
|
{
|
|
24980
|
+
ref: wrapperRef,
|
|
24931
24981
|
open: isPopoverOpen,
|
|
24932
24982
|
password: value,
|
|
24933
24983
|
side: "right",
|
|
24934
24984
|
children: inputEl
|
|
24935
24985
|
}
|
|
24936
24986
|
) : inputEl,
|
|
24937
|
-
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "min-h-5", children: touched && error && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(FieldError, { children: error }) })
|
|
24987
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "min-h-5", children: touched && error && !isPopoverOpen && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(FieldError, { children: error }) })
|
|
24938
24988
|
] });
|
|
24939
24989
|
}
|
|
24940
24990
|
var DEFAULT_ROLE_OPTIONS = ["Admin", "Broker", "Support"];
|
|
@@ -25859,6 +25909,16 @@ var DEFAULT_APPS = [
|
|
|
25859
25909
|
{ name: "Google Authenticator" },
|
|
25860
25910
|
{ name: "Microsoft Authenticator" }
|
|
25861
25911
|
];
|
|
25912
|
+
var STEP_META = {
|
|
25913
|
+
1: {
|
|
25914
|
+
subtitle: "We recommend Google Authenticator or Microsoft Authenticator",
|
|
25915
|
+
defaultTitle: "2FA Setup"
|
|
25916
|
+
},
|
|
25917
|
+
2: {
|
|
25918
|
+
title: "Open Auth App and Scan Code",
|
|
25919
|
+
subtitle: "Open your authenticator app and scan the QR code"
|
|
25920
|
+
}
|
|
25921
|
+
};
|
|
25862
25922
|
function AppDownloadStep({
|
|
25863
25923
|
apps,
|
|
25864
25924
|
onNext,
|
|
@@ -25866,18 +25926,21 @@ function AppDownloadStep({
|
|
|
25866
25926
|
required
|
|
25867
25927
|
}) {
|
|
25868
25928
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
25869
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex gap-
|
|
25870
|
-
var _a;
|
|
25929
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex flex-col gap-3", children: apps.map((app) => {
|
|
25930
|
+
var _a, _b;
|
|
25871
25931
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
25872
25932
|
"div",
|
|
25873
25933
|
{
|
|
25874
|
-
className: "flex
|
|
25934
|
+
className: "flex items-center gap-4 border border-border bg-muted/30 p-4",
|
|
25875
25935
|
children: [
|
|
25876
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.
|
|
25877
|
-
|
|
25878
|
-
|
|
25879
|
-
|
|
25880
|
-
|
|
25936
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex shrink-0 items-center justify-center", children: (_a = app.qrNode) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime127.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" }) }),
|
|
25937
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
25938
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
25939
|
+
(_b = app.icon) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react71.Smartphone, { size: 16, className: "text-muted-foreground" }),
|
|
25940
|
+
app.name
|
|
25941
|
+
] }),
|
|
25942
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-xs text-muted-foreground", children: "Scan to download" })
|
|
25943
|
+
] })
|
|
25881
25944
|
]
|
|
25882
25945
|
},
|
|
25883
25946
|
app.name
|
|
@@ -25909,15 +25972,17 @@ function VerificationStep({
|
|
|
25909
25972
|
setIsLoading(true);
|
|
25910
25973
|
try {
|
|
25911
25974
|
yield onVerify(token);
|
|
25912
|
-
} catch (
|
|
25913
|
-
setError(
|
|
25975
|
+
} catch (err) {
|
|
25976
|
+
setError(
|
|
25977
|
+
err instanceof Error ? err.message : "Invalid code. Please try again."
|
|
25978
|
+
);
|
|
25914
25979
|
} finally {
|
|
25915
25980
|
setIsLoading(false);
|
|
25916
25981
|
}
|
|
25917
25982
|
});
|
|
25918
25983
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
25919
25984
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
25920
|
-
qrCodeNode
|
|
25985
|
+
qrCodeNode != null ? qrCodeNode : /* @__PURE__ */ (0, import_jsx_runtime127.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" }),
|
|
25921
25986
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-center text-sm text-muted-foreground", children: "The temporary code will show for authentication. Insert below." })
|
|
25922
25987
|
] }),
|
|
25923
25988
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Field, { children: [
|
|
@@ -25959,7 +26024,7 @@ function VerificationStep({
|
|
|
25959
26024
|
] });
|
|
25960
26025
|
}
|
|
25961
26026
|
function TwoFASetupForm({
|
|
25962
|
-
title
|
|
26027
|
+
title,
|
|
25963
26028
|
apps = DEFAULT_APPS,
|
|
25964
26029
|
qrCodeNode,
|
|
25965
26030
|
onVerify,
|
|
@@ -25968,10 +26033,10 @@ function TwoFASetupForm({
|
|
|
25968
26033
|
className
|
|
25969
26034
|
}) {
|
|
25970
26035
|
const [step, setStep] = (0, import_react42.useState)(1);
|
|
25971
|
-
const stepTitle = step === 1 ? title
|
|
25972
|
-
const stepSubtitle = step
|
|
26036
|
+
const stepTitle = step === 1 ? title != null ? title : STEP_META[1].defaultTitle : STEP_META[2].title;
|
|
26037
|
+
const stepSubtitle = STEP_META[step].subtitle;
|
|
25973
26038
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
25974
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
26039
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-1 text-center", children: [
|
|
25975
26040
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("h2", { className: "text-xl font-semibold text-foreground", children: stepTitle }),
|
|
25976
26041
|
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-sm text-muted-foreground", children: stepSubtitle })
|
|
25977
26042
|
] }),
|
|
@@ -26464,7 +26529,7 @@ function ApplicationMobileLayout({
|
|
|
26464
26529
|
}
|
|
26465
26530
|
|
|
26466
26531
|
// src/components/ui/income-work-details.tsx
|
|
26467
|
-
var
|
|
26532
|
+
var React63 = __toESM(require("react"));
|
|
26468
26533
|
|
|
26469
26534
|
// src/components/ui/loan-option-group.tsx
|
|
26470
26535
|
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
@@ -26756,10 +26821,10 @@ function IncomeWorkDetails({
|
|
|
26756
26821
|
onConnectMore,
|
|
26757
26822
|
className
|
|
26758
26823
|
}) {
|
|
26759
|
-
const [openItems, setOpenItems] =
|
|
26824
|
+
const [openItems, setOpenItems] = React63.useState(
|
|
26760
26825
|
sources.length > 0 ? [sources[0].id] : []
|
|
26761
26826
|
);
|
|
26762
|
-
|
|
26827
|
+
React63.useEffect(() => {
|
|
26763
26828
|
setOpenItems((current) => {
|
|
26764
26829
|
const currentSet = new Set(current);
|
|
26765
26830
|
const newIds = sources.map((s) => s.id).filter((id) => !currentSet.has(id));
|
|
@@ -26930,7 +26995,7 @@ function LoanEntryShell({
|
|
|
26930
26995
|
}
|
|
26931
26996
|
|
|
26932
26997
|
// src/components/ui/loan-wizard-shell.tsx
|
|
26933
|
-
var
|
|
26998
|
+
var React64 = __toESM(require("react"));
|
|
26934
26999
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
26935
27000
|
function LoanWizardShell({
|
|
26936
27001
|
logo,
|
|
@@ -26970,7 +27035,7 @@ function LoanWizardShell({
|
|
|
26970
27035
|
] }),
|
|
26971
27036
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex shrink-0 items-center justify-between px-4 py-8 sm:px-8 sm:py-12 lg:px-[200px]", children: [
|
|
26972
27037
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
26973
|
-
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h1", { className: "text-2xl font-bold text-foreground lg:text-[38px] lg:leading-tight", children: heroTitle.split("\n").map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
27038
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h1", { className: "text-2xl font-bold text-foreground lg:text-[38px] lg:leading-tight", children: heroTitle.split("\n").map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(React64.Fragment, { children: [
|
|
26974
27039
|
line,
|
|
26975
27040
|
i < heroTitle.split("\n").length - 1 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("br", {})
|
|
26976
27041
|
] }, i)) }),
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
ContactAlertDialog,
|
|
17
17
|
ContactAlertQueryBuilder,
|
|
18
18
|
createAlertTree
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SCGCGVDN.mjs";
|
|
20
20
|
import {
|
|
21
21
|
ResourceCarousel,
|
|
22
22
|
ResourceCenterHeader,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./chunk-77L3UPBW.mjs";
|
|
38
38
|
import {
|
|
39
39
|
TwoFASetupForm
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-H5ZD63NT.mjs";
|
|
41
41
|
import {
|
|
42
42
|
VideoBackground
|
|
43
43
|
} from "./chunk-ZGQIVGIN.mjs";
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
} from "./chunk-JUMEIPII.mjs";
|
|
76
76
|
import {
|
|
77
77
|
PropertyReportDialog
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-OSSS56CB.mjs";
|
|
79
79
|
import {
|
|
80
80
|
ReviewAlertsDialog
|
|
81
81
|
} from "./chunk-HONTZFLO.mjs";
|
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
FrontendSuccessStep,
|
|
169
169
|
PhoneVerifyStep,
|
|
170
170
|
RetrieveBankDataStep
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-C6R42PCL.mjs";
|
|
172
172
|
import {
|
|
173
173
|
InputOTP,
|
|
174
174
|
InputOTPGroup,
|
|
@@ -264,7 +264,7 @@ import {
|
|
|
264
264
|
ChatWidgetTopicGrid,
|
|
265
265
|
ChatWidgetWindow,
|
|
266
266
|
DEFAULT_CHAT_WIDGET_TOPICS
|
|
267
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-X2NIDXFB.mjs";
|
|
268
268
|
import {
|
|
269
269
|
ChatWidgetHeader,
|
|
270
270
|
ChatWidgetInputBar,
|
|
@@ -299,16 +299,16 @@ import {
|
|
|
299
299
|
PaymentView,
|
|
300
300
|
PersonalDetailsStep,
|
|
301
301
|
StripeView
|
|
302
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-IEQX4UVP.mjs";
|
|
303
303
|
import {
|
|
304
304
|
FormField,
|
|
305
305
|
PasswordField,
|
|
306
306
|
SectionHeading,
|
|
307
307
|
StaffRowItem
|
|
308
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-4UT3RZ2D.mjs";
|
|
309
309
|
import {
|
|
310
310
|
PasswordStrengthTooltip
|
|
311
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-IKVF4XE2.mjs";
|
|
312
312
|
import {
|
|
313
313
|
UploadCard,
|
|
314
314
|
uploadCardVariants
|
|
@@ -326,7 +326,7 @@ import {
|
|
|
326
326
|
} from "./chunk-7N6O3VPJ.mjs";
|
|
327
327
|
import {
|
|
328
328
|
BankStatementGenerateDialog
|
|
329
|
-
} from "./chunk-
|
|
329
|
+
} from "./chunk-FTQ2AKZ2.mjs";
|
|
330
330
|
import {
|
|
331
331
|
Field,
|
|
332
332
|
FieldContent,
|
|
@@ -338,7 +338,7 @@ import {
|
|
|
338
338
|
FieldSeparator,
|
|
339
339
|
FieldSet,
|
|
340
340
|
FieldTitle
|
|
341
|
-
} from "./chunk-
|
|
341
|
+
} from "./chunk-MS3GNXMB.mjs";
|
|
342
342
|
import {
|
|
343
343
|
BankStatementPDFViewer
|
|
344
344
|
} from "./chunk-LBXIYS34.mjs";
|