@wealthx/shadcn 1.5.32 → 1.5.34

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 (62) hide show
  1. package/.turbo/turbo-build.log +114 -114
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-SYJ6LVJ6.mjs → chunk-3ZU5BH6X.mjs} +1 -1
  4. package/dist/{chunk-FTQ2AKZ2.mjs → chunk-4QTHK7ML.mjs} +1 -1
  5. package/dist/{chunk-T5HU4S4X.mjs → chunk-C7ZTZTEW.mjs} +1 -1
  6. package/dist/{chunk-KI57CBJR.mjs → chunk-DQNNP6I4.mjs} +33 -24
  7. package/dist/{chunk-RSEVIQEO.mjs → chunk-E432NK23.mjs} +41 -36
  8. package/dist/{chunk-AE4JKISB.mjs → chunk-EEI4FLEE.mjs} +1 -1
  9. package/dist/{chunk-IEQX4UVP.mjs → chunk-EY36WDCF.mjs} +1 -1
  10. package/dist/{chunk-HB5BKRMH.mjs → chunk-F3CU6KEI.mjs} +11 -1
  11. package/dist/chunk-H65NB7KI.mjs +182 -0
  12. package/dist/{chunk-TRM3KIHT.mjs → chunk-ICCPK3J2.mjs} +1 -1
  13. package/dist/{chunk-KGVVK6OS.mjs → chunk-ORMC3TV3.mjs} +3 -1
  14. package/dist/{chunk-HSXMTFIM.mjs → chunk-UD5UF5OC.mjs} +1 -1
  15. package/dist/{chunk-IW33VLL5.mjs → chunk-X3VEDQPO.mjs} +7 -3
  16. package/dist/{chunk-AAZSLTER.mjs → chunk-XGRSPFFC.mjs} +16 -7
  17. package/dist/components/ui/about-you-form.js +9 -6
  18. package/dist/components/ui/about-you-form.mjs +2 -2
  19. package/dist/components/ui/ai-conversations/index.js +4 -1
  20. package/dist/components/ui/ai-conversations/index.mjs +2 -2
  21. package/dist/components/ui/appointment-availability-settings.js +24 -12
  22. package/dist/components/ui/appointment-availability-settings.mjs +3 -3
  23. package/dist/components/ui/appointment-book-dialog.js +33 -24
  24. package/dist/components/ui/appointment-book-dialog.mjs +1 -1
  25. package/dist/components/ui/appointment-detail-sheet.js +3 -1
  26. package/dist/components/ui/appointment-detail-sheet.mjs +1 -1
  27. package/dist/components/ui/appointment-gmail-connect.js +127 -70
  28. package/dist/components/ui/appointment-gmail-connect.mjs +1 -1
  29. package/dist/components/ui/backoffice-signup-steps.js +23 -16
  30. package/dist/components/ui/backoffice-signup-steps.mjs +3 -3
  31. package/dist/components/ui/bank-statement-generate-dialog.js +12 -9
  32. package/dist/components/ui/bank-statement-generate-dialog.mjs +3 -3
  33. package/dist/components/ui/color-picker.js +21 -14
  34. package/dist/components/ui/color-picker.mjs +2 -2
  35. package/dist/components/ui/date-picker.js +6 -3
  36. package/dist/components/ui/date-picker.mjs +2 -2
  37. package/dist/components/ui/opportunity-edit-modals.js +45 -42
  38. package/dist/components/ui/opportunity-edit-modals.mjs +3 -3
  39. package/dist/components/ui/opportunity-summary-tab.js +48 -45
  40. package/dist/components/ui/opportunity-summary-tab.mjs +4 -4
  41. package/dist/components/ui/pipeline-dialogs.js +12 -9
  42. package/dist/components/ui/pipeline-dialogs.mjs +3 -3
  43. package/dist/components/ui/popover.js +22 -1
  44. package/dist/components/ui/popover.mjs +3 -1
  45. package/dist/components/ui/savings-goal-modal.js +11 -8
  46. package/dist/components/ui/savings-goal-modal.mjs +2 -2
  47. package/dist/components/ui/sidebar-nav.js +39 -34
  48. package/dist/components/ui/sidebar-nav.mjs +1 -1
  49. package/dist/index.js +388 -291
  50. package/dist/index.mjs +16 -14
  51. package/dist/styles.css +1 -1
  52. package/package.json +1 -1
  53. package/src/components/index.tsx +4 -0
  54. package/src/components/ui/appointment-availability-settings.tsx +32 -19
  55. package/src/components/ui/appointment-book-dialog.tsx +52 -73
  56. package/src/components/ui/appointment-detail-sheet.tsx +3 -1
  57. package/src/components/ui/appointment-gmail-connect.tsx +89 -29
  58. package/src/components/ui/color-picker.tsx +12 -4
  59. package/src/components/ui/popover.tsx +33 -2
  60. package/src/components/ui/sidebar-nav.tsx +96 -75
  61. package/src/styles/styles-css.ts +1 -1
  62. package/dist/chunk-7TMPOZDE.mjs +0 -122
@@ -278,9 +278,10 @@ function Checkbox(_a) {
278
278
  }
279
279
 
280
280
  // src/components/ui/color-picker.tsx
281
- var React3 = __toESM(require("react"));
281
+ var React4 = __toESM(require("react"));
282
282
 
283
283
  // src/components/ui/popover.tsx
284
+ var React3 = __toESM(require("react"));
284
285
  var import_popover = require("@base-ui/react/popover");
285
286
 
286
287
  // src/lib/theme-provider.tsx
@@ -293,6 +294,7 @@ function useThemeVars() {
293
294
 
294
295
  // src/components/ui/popover.tsx
295
296
  var import_jsx_runtime4 = require("react/jsx-runtime");
297
+ var PopoverPortalContext = React3.createContext(void 0);
296
298
  function Popover(_a) {
297
299
  var props = __objRest(_a, []);
298
300
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
@@ -314,7 +316,8 @@ function PopoverContent(_a) {
314
316
  "style"
315
317
  ]);
316
318
  const themeVars = useThemeVars();
317
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
319
+ const portalContainer = React3.useContext(PopoverPortalContext);
320
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
318
321
  import_popover.Popover.Positioner,
319
322
  {
320
323
  className: "z-[200]",
@@ -432,15 +435,19 @@ function ColorPickerContent({
432
435
  onChange,
433
436
  presets = COLOR_PICKER_PRESETS
434
437
  }) {
435
- const [hexInput, setHexInput] = React3.useState(value);
436
- React3.useEffect(() => {
437
- setHexInput(value);
438
+ const [hexInput, setHexInput] = React4.useState(value);
439
+ const hexInputRef = React4.useRef(hexInput);
440
+ hexInputRef.current = hexInput;
441
+ React4.useEffect(() => {
442
+ if (value !== hexInputRef.current) {
443
+ setHexInput(value);
444
+ }
438
445
  }, [value]);
439
446
  function handleHexInputChange(e) {
440
447
  const raw = e.target.value;
441
448
  setHexInput(raw);
442
449
  const normalized = normalizeHex(raw);
443
- if (isValidHex(normalized)) {
450
+ if (/^#[0-9A-Fa-f]{6}$/.test(normalized)) {
444
451
  onChange(normalized);
445
452
  }
446
453
  }
@@ -520,10 +527,10 @@ function ColorPicker({
520
527
  className
521
528
  }) {
522
529
  const isControlled = controlledValue !== void 0;
523
- const [internalValue, setInternalValue] = React3.useState(defaultValue);
530
+ const [internalValue, setInternalValue] = React4.useState(defaultValue);
524
531
  const color = isControlled ? controlledValue : internalValue;
525
- const [open, setOpen] = React3.useState(false);
526
- React3.useEffect(() => {
532
+ const [open, setOpen] = React4.useState(false);
533
+ React4.useEffect(() => {
527
534
  if (disabled) setOpen(false);
528
535
  }, [disabled]);
529
536
  function handleChange(newColor) {
@@ -745,11 +752,11 @@ function FieldError(_a) {
745
752
  }
746
753
 
747
754
  // src/components/ui/select.tsx
748
- var React4 = __toESM(require("react"));
755
+ var React5 = __toESM(require("react"));
749
756
  var import_lucide_react3 = require("lucide-react");
750
757
  var import_select = require("@base-ui/react/select");
751
758
  var import_jsx_runtime10 = require("react/jsx-runtime");
752
- var SelectPortalContext = React4.createContext(
759
+ var SelectPortalContext = React5.createContext(
753
760
  void 0
754
761
  );
755
762
  function Select(_a) {
@@ -798,7 +805,7 @@ function SelectContent(_a) {
798
805
  "style"
799
806
  ]);
800
807
  const themeVars = useThemeVars();
801
- const portalContainer = React4.useContext(SelectPortalContext);
808
+ const portalContainer = React5.useContext(SelectPortalContext);
802
809
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_select.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
803
810
  import_select.Select.Positioner,
804
811
  {
@@ -1047,7 +1054,7 @@ var import_react5 = require("react");
1047
1054
  var import_lucide_react6 = require("lucide-react");
1048
1055
 
1049
1056
  // src/components/ui/password-strength-tooltip.tsx
1050
- var React5 = __toESM(require("react"));
1057
+ var React6 = __toESM(require("react"));
1051
1058
  var import_lucide_react5 = require("lucide-react");
1052
1059
  var import_popover3 = require("@base-ui/react/popover");
1053
1060
  var import_jsx_runtime13 = require("react/jsx-runtime");
@@ -1061,10 +1068,10 @@ var PASSWORD_STRENGTH_RULES = [
1061
1068
  test: (p) => /[^A-Za-z0-9]/.test(p)
1062
1069
  }
1063
1070
  ];
1064
- var PasswordStrengthTooltip = React5.forwardRef(function PasswordStrengthTooltip2({ open = false, password, children, side = "right" }, forwardedRef) {
1071
+ var PasswordStrengthTooltip = React6.forwardRef(function PasswordStrengthTooltip2({ open = false, password, children, side = "right" }, forwardedRef) {
1065
1072
  const themeVars = useThemeVars();
1066
- const anchorRef = React5.useRef(null);
1067
- const composedRef = React5.useCallback(
1073
+ const anchorRef = React6.useRef(null);
1074
+ const composedRef = React6.useCallback(
1068
1075
  (node) => {
1069
1076
  anchorRef.current = node;
1070
1077
  if (typeof forwardedRef === "function") {
@@ -6,17 +6,17 @@ import {
6
6
  PaymentView,
7
7
  PersonalDetailsStep,
8
8
  StripeView
9
- } from "../../chunk-IEQX4UVP.mjs";
9
+ } from "../../chunk-EY36WDCF.mjs";
10
10
  import "../../chunk-4UT3RZ2D.mjs";
11
11
  import "../../chunk-IKVF4XE2.mjs";
12
12
  import "../../chunk-I4KVSZCH.mjs";
13
- import "../../chunk-IW33VLL5.mjs";
13
+ import "../../chunk-X3VEDQPO.mjs";
14
14
  import "../../chunk-MS3GNXMB.mjs";
15
15
  import "../../chunk-3S6KVFF5.mjs";
16
16
  import "../../chunk-IKXYTCSB.mjs";
17
17
  import "../../chunk-K6VCC2MK.mjs";
18
18
  import "../../chunk-2GIYVERS.mjs";
19
- import "../../chunk-HB5BKRMH.mjs";
19
+ import "../../chunk-F3CU6KEI.mjs";
20
20
  import "../../chunk-LSRGA5BI.mjs";
21
21
  import "../../chunk-LBTHZSBT.mjs";
22
22
  import "../../chunk-XYSRRDBH.mjs";
@@ -272,7 +272,7 @@ function Checkbox(_a) {
272
272
  }
273
273
 
274
274
  // src/components/ui/date-picker.tsx
275
- var React4 = __toESM(require("react"));
275
+ var React5 = __toESM(require("react"));
276
276
  var import_date_fns2 = require("date-fns");
277
277
  var import_lucide_react4 = require("lucide-react");
278
278
 
@@ -512,6 +512,7 @@ function CalendarDayButton(_a) {
512
512
  }
513
513
 
514
514
  // src/components/ui/popover.tsx
515
+ var React4 = __toESM(require("react"));
515
516
  var import_popover = require("@base-ui/react/popover");
516
517
 
517
518
  // src/lib/theme-provider.tsx
@@ -524,6 +525,7 @@ function useThemeVars() {
524
525
 
525
526
  // src/components/ui/popover.tsx
526
527
  var import_jsx_runtime6 = require("react/jsx-runtime");
528
+ var PopoverPortalContext = React4.createContext(void 0);
527
529
  function Popover(_a) {
528
530
  var props = __objRest(_a, []);
529
531
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
@@ -545,7 +547,8 @@ function PopoverContent(_a) {
545
547
  "style"
546
548
  ]);
547
549
  const themeVars = useThemeVars();
548
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
550
+ const portalContainer = React4.useContext(PopoverPortalContext);
551
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
549
552
  import_popover.Popover.Positioner,
550
553
  {
551
554
  className: "z-[200]",
@@ -577,7 +580,7 @@ function DatePicker({
577
580
  className,
578
581
  calendarProps
579
582
  }) {
580
- const [open, setOpen] = React4.useState(false);
583
+ const [open, setOpen] = React5.useState(false);
581
584
  function handleDaySelect(day) {
582
585
  if (!day) {
583
586
  onChange == null ? void 0 : onChange(void 0);
@@ -930,11 +933,11 @@ function FieldLabel(_a) {
930
933
  var import_lucide_react7 = require("lucide-react");
931
934
 
932
935
  // src/components/ui/select.tsx
933
- var React5 = __toESM(require("react"));
936
+ var React6 = __toESM(require("react"));
934
937
  var import_lucide_react6 = require("lucide-react");
935
938
  var import_select = require("@base-ui/react/select");
936
939
  var import_jsx_runtime12 = require("react/jsx-runtime");
937
- var SelectPortalContext = React5.createContext(
940
+ var SelectPortalContext = React6.createContext(
938
941
  void 0
939
942
  );
940
943
  function Select(_a) {
@@ -983,7 +986,7 @@ function SelectContent(_a) {
983
986
  "style"
984
987
  ]);
985
988
  const themeVars = useThemeVars();
986
- const portalContainer = React5.useContext(SelectPortalContext);
989
+ const portalContainer = React6.useContext(SelectPortalContext);
987
990
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_select.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
988
991
  import_select.Select.Positioner,
989
992
  {
@@ -1250,7 +1253,7 @@ function TableCell(_a) {
1250
1253
  }
1251
1254
 
1252
1255
  // src/components/ui/toggle-group.tsx
1253
- var React6 = __toESM(require("react"));
1256
+ var React7 = __toESM(require("react"));
1254
1257
  var import_toggle_group = require("@base-ui/react/toggle-group");
1255
1258
  var import_toggle2 = require("@base-ui/react/toggle");
1256
1259
 
@@ -1281,7 +1284,7 @@ var toggleVariants = (0, import_class_variance_authority4.cva)(
1281
1284
 
1282
1285
  // src/components/ui/toggle-group.tsx
1283
1286
  var import_jsx_runtime17 = require("react/jsx-runtime");
1284
- var ToggleGroupContext = React6.createContext({
1287
+ var ToggleGroupContext = React7.createContext({
1285
1288
  size: "default",
1286
1289
  variant: "default",
1287
1290
  spacing: 0
@@ -1333,7 +1336,7 @@ function ToggleGroupItem(_a) {
1333
1336
  "variant",
1334
1337
  "size"
1335
1338
  ]);
1336
- const context = React6.useContext(ToggleGroupContext);
1339
+ const context = React7.useContext(ToggleGroupContext);
1337
1340
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1338
1341
  import_toggle2.Toggle,
1339
1342
  __spreadProps(__spreadValues({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BankStatementGenerateDialog
3
- } from "../../chunk-FTQ2AKZ2.mjs";
3
+ } from "../../chunk-4QTHK7ML.mjs";
4
4
  import "../../chunk-MS3GNXMB.mjs";
5
5
  import "../../chunk-6WRDXE7A.mjs";
6
6
  import "../../chunk-GT3RU6GA.mjs";
@@ -9,8 +9,8 @@ import "../../chunk-K6VCC2MK.mjs";
9
9
  import "../../chunk-T5FRVEJQ.mjs";
10
10
  import "../../chunk-2GIYVERS.mjs";
11
11
  import "../../chunk-JVMXMFBB.mjs";
12
- import "../../chunk-TRM3KIHT.mjs";
13
- import "../../chunk-HB5BKRMH.mjs";
12
+ import "../../chunk-ICCPK3J2.mjs";
13
+ import "../../chunk-F3CU6KEI.mjs";
14
14
  import "../../chunk-OWFQSXVD.mjs";
15
15
  import "../../chunk-6QAFGZC2.mjs";
16
16
  import "../../chunk-FBNEIYSE.mjs";
@@ -67,7 +67,7 @@ __export(color_picker_exports, {
67
67
  normalizeHex: () => normalizeHex
68
68
  });
69
69
  module.exports = __toCommonJS(color_picker_exports);
70
- var React3 = __toESM(require("react"));
70
+ var React4 = __toESM(require("react"));
71
71
 
72
72
  // src/lib/utils.ts
73
73
  var import_clsx = require("clsx");
@@ -109,6 +109,7 @@ function cn(...inputs) {
109
109
  }
110
110
 
111
111
  // src/components/ui/popover.tsx
112
+ var React2 = __toESM(require("react"));
112
113
  var import_popover = require("@base-ui/react/popover");
113
114
 
114
115
  // src/lib/theme-provider.tsx
@@ -121,6 +122,7 @@ function useThemeVars() {
121
122
 
122
123
  // src/components/ui/popover.tsx
123
124
  var import_jsx_runtime2 = require("react/jsx-runtime");
125
+ var PopoverPortalContext = React2.createContext(void 0);
124
126
  function Popover(_a) {
125
127
  var props = __objRest(_a, []);
126
128
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
@@ -142,7 +144,8 @@ function PopoverContent(_a) {
142
144
  "style"
143
145
  ]);
144
146
  const themeVars = useThemeVars();
145
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
147
+ const portalContainer = React2.useContext(PopoverPortalContext);
148
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
146
149
  import_popover.Popover.Positioner,
147
150
  {
148
151
  className: "z-[200]",
@@ -188,7 +191,7 @@ var import_class_variance_authority = require("class-variance-authority");
188
191
  var import_lucide_react = require("lucide-react");
189
192
 
190
193
  // src/lib/slot.tsx
191
- var React2 = __toESM(require("react"));
194
+ var React3 = __toESM(require("react"));
192
195
  function mergeRefs(...refs) {
193
196
  return (value) => {
194
197
  for (const ref of refs) {
@@ -198,11 +201,11 @@ function mergeRefs(...refs) {
198
201
  }
199
202
  };
200
203
  }
201
- var Slot = React2.forwardRef(
204
+ var Slot = React3.forwardRef(
202
205
  (_a, forwardedRef) => {
203
206
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
204
- const child = React2.Children.only(children);
205
- if (!React2.isValidElement(child)) return null;
207
+ const child = React3.Children.only(children);
208
+ if (!React3.isValidElement(child)) return null;
206
209
  const childProps = child.props;
207
210
  const merged = __spreadValues({}, props);
208
211
  for (const key of Object.keys(childProps)) {
@@ -226,7 +229,7 @@ var Slot = React2.forwardRef(
226
229
  }
227
230
  const childRef = child.ref;
228
231
  merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
229
- return React2.cloneElement(
232
+ return React3.cloneElement(
230
233
  child,
231
234
  merged
232
235
  );
@@ -386,15 +389,19 @@ function ColorPickerContent({
386
389
  onChange,
387
390
  presets = COLOR_PICKER_PRESETS
388
391
  }) {
389
- const [hexInput, setHexInput] = React3.useState(value);
390
- React3.useEffect(() => {
391
- setHexInput(value);
392
+ const [hexInput, setHexInput] = React4.useState(value);
393
+ const hexInputRef = React4.useRef(hexInput);
394
+ hexInputRef.current = hexInput;
395
+ React4.useEffect(() => {
396
+ if (value !== hexInputRef.current) {
397
+ setHexInput(value);
398
+ }
392
399
  }, [value]);
393
400
  function handleHexInputChange(e) {
394
401
  const raw = e.target.value;
395
402
  setHexInput(raw);
396
403
  const normalized = normalizeHex(raw);
397
- if (isValidHex(normalized)) {
404
+ if (/^#[0-9A-Fa-f]{6}$/.test(normalized)) {
398
405
  onChange(normalized);
399
406
  }
400
407
  }
@@ -474,10 +481,10 @@ function ColorPicker({
474
481
  className
475
482
  }) {
476
483
  const isControlled = controlledValue !== void 0;
477
- const [internalValue, setInternalValue] = React3.useState(defaultValue);
484
+ const [internalValue, setInternalValue] = React4.useState(defaultValue);
478
485
  const color = isControlled ? controlledValue : internalValue;
479
- const [open, setOpen] = React3.useState(false);
480
- React3.useEffect(() => {
486
+ const [open, setOpen] = React4.useState(false);
487
+ React4.useEffect(() => {
481
488
  if (disabled) setOpen(false);
482
489
  }, [disabled]);
483
490
  function handleChange(newColor) {
@@ -5,8 +5,8 @@ import {
5
5
  ColorSwatch,
6
6
  isValidHex,
7
7
  normalizeHex
8
- } from "../../chunk-IW33VLL5.mjs";
9
- import "../../chunk-HB5BKRMH.mjs";
8
+ } from "../../chunk-X3VEDQPO.mjs";
9
+ import "../../chunk-F3CU6KEI.mjs";
10
10
  import "../../chunk-LBTHZSBT.mjs";
11
11
  import "../../chunk-XYSRRDBH.mjs";
12
12
  import "../../chunk-FRCTOAKZ.mjs";
@@ -62,7 +62,7 @@ __export(date_picker_exports, {
62
62
  DatePicker: () => DatePicker
63
63
  });
64
64
  module.exports = __toCommonJS(date_picker_exports);
65
- var React4 = __toESM(require("react"));
65
+ var React5 = __toESM(require("react"));
66
66
  var import_date_fns2 = require("date-fns");
67
67
  var import_lucide_react3 = require("lucide-react");
68
68
 
@@ -467,6 +467,7 @@ function CalendarDayButton(_a) {
467
467
  }
468
468
 
469
469
  // src/components/ui/popover.tsx
470
+ var React4 = __toESM(require("react"));
470
471
  var import_popover = require("@base-ui/react/popover");
471
472
 
472
473
  // src/lib/theme-provider.tsx
@@ -479,6 +480,7 @@ function useThemeVars() {
479
480
 
480
481
  // src/components/ui/popover.tsx
481
482
  var import_jsx_runtime5 = require("react/jsx-runtime");
483
+ var PopoverPortalContext = React4.createContext(void 0);
482
484
  function Popover(_a) {
483
485
  var props = __objRest(_a, []);
484
486
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
@@ -500,7 +502,8 @@ function PopoverContent(_a) {
500
502
  "style"
501
503
  ]);
502
504
  const themeVars = useThemeVars();
503
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
505
+ const portalContainer = React4.useContext(PopoverPortalContext);
506
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
504
507
  import_popover.Popover.Positioner,
505
508
  {
506
509
  className: "z-[200]",
@@ -532,7 +535,7 @@ function DatePicker({
532
535
  className,
533
536
  calendarProps
534
537
  }) {
535
- const [open, setOpen] = React4.useState(false);
538
+ const [open, setOpen] = React5.useState(false);
536
539
  function handleDaySelect(day) {
537
540
  if (!day) {
538
541
  onChange == null ? void 0 : onChange(void 0);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DatePicker
3
- } from "../../chunk-TRM3KIHT.mjs";
4
- import "../../chunk-HB5BKRMH.mjs";
3
+ } from "../../chunk-ICCPK3J2.mjs";
4
+ import "../../chunk-F3CU6KEI.mjs";
5
5
  import "../../chunk-FBNEIYSE.mjs";
6
6
  import "../../chunk-LHWJQNLG.mjs";
7
7
  import "../../chunk-LBTHZSBT.mjs";
@@ -67,7 +67,7 @@ __export(opportunity_edit_modals_exports, {
67
67
  EditLoanScenarioModal: () => EditLoanScenarioModal
68
68
  });
69
69
  module.exports = __toCommonJS(opportunity_edit_modals_exports);
70
- var React9 = __toESM(require("react"));
70
+ var React10 = __toESM(require("react"));
71
71
  var import_lucide_react10 = require("lucide-react");
72
72
 
73
73
  // src/lib/utils.ts
@@ -718,7 +718,7 @@ function Checkbox(_a) {
718
718
  }
719
719
 
720
720
  // src/components/ui/date-picker.tsx
721
- var React5 = __toESM(require("react"));
721
+ var React6 = __toESM(require("react"));
722
722
  var import_date_fns2 = require("date-fns");
723
723
  var import_lucide_react7 = require("lucide-react");
724
724
 
@@ -939,8 +939,10 @@ function CalendarDayButton(_a) {
939
939
  }
940
940
 
941
941
  // src/components/ui/popover.tsx
942
+ var React5 = __toESM(require("react"));
942
943
  var import_popover = require("@base-ui/react/popover");
943
944
  var import_jsx_runtime11 = require("react/jsx-runtime");
945
+ var PopoverPortalContext = React5.createContext(void 0);
944
946
  function Popover(_a) {
945
947
  var props = __objRest(_a, []);
946
948
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
@@ -962,7 +964,8 @@ function PopoverContent(_a) {
962
964
  "style"
963
965
  ]);
964
966
  const themeVars = useThemeVars();
965
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
967
+ const portalContainer = React5.useContext(PopoverPortalContext);
968
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
966
969
  import_popover.Popover.Positioner,
967
970
  {
968
971
  className: "z-[200]",
@@ -994,7 +997,7 @@ function DatePicker({
994
997
  className,
995
998
  calendarProps
996
999
  }) {
997
- const [open, setOpen] = React5.useState(false);
1000
+ const [open, setOpen] = React6.useState(false);
998
1001
  function handleDaySelect(day) {
999
1002
  if (!day) {
1000
1003
  onChange == null ? void 0 : onChange(void 0);
@@ -1083,10 +1086,10 @@ function DatePicker({
1083
1086
  }
1084
1087
 
1085
1088
  // src/components/ui/slider.tsx
1086
- var React6 = __toESM(require("react"));
1089
+ var React7 = __toESM(require("react"));
1087
1090
  var import_slider = require("@base-ui/react/slider");
1088
1091
  var import_jsx_runtime13 = require("react/jsx-runtime");
1089
- var Slider = React6.forwardRef(
1092
+ var Slider = React7.forwardRef(
1090
1093
  ({
1091
1094
  className,
1092
1095
  value,
@@ -1209,11 +1212,11 @@ function RadioGroupItem(_a) {
1209
1212
  }
1210
1213
 
1211
1214
  // src/components/ui/form-primitives.tsx
1212
- var React8 = __toESM(require("react"));
1215
+ var React9 = __toESM(require("react"));
1213
1216
  var import_lucide_react9 = require("lucide-react");
1214
1217
 
1215
1218
  // src/components/ui/toggle-group.tsx
1216
- var React7 = __toESM(require("react"));
1219
+ var React8 = __toESM(require("react"));
1217
1220
  var import_toggle_group = require("@base-ui/react/toggle-group");
1218
1221
  var import_toggle2 = require("@base-ui/react/toggle");
1219
1222
 
@@ -1244,7 +1247,7 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
1244
1247
 
1245
1248
  // src/components/ui/toggle-group.tsx
1246
1249
  var import_jsx_runtime16 = require("react/jsx-runtime");
1247
- var ToggleGroupContext = React7.createContext({
1250
+ var ToggleGroupContext = React8.createContext({
1248
1251
  size: "default",
1249
1252
  variant: "default",
1250
1253
  spacing: 0
@@ -1296,7 +1299,7 @@ function ToggleGroupItem(_a) {
1296
1299
  "variant",
1297
1300
  "size"
1298
1301
  ]);
1299
- const context = React7.useContext(ToggleGroupContext);
1302
+ const context = React8.useContext(ToggleGroupContext);
1300
1303
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1301
1304
  import_toggle2.Toggle,
1302
1305
  __spreadProps(__spreadValues({
@@ -1340,13 +1343,13 @@ function CurrencyInputWithSlider({
1340
1343
  onValueChange,
1341
1344
  className
1342
1345
  }) {
1343
- const [internalValue, setInternalValue] = React8.useState(defaultValue);
1346
+ const [internalValue, setInternalValue] = React9.useState(defaultValue);
1344
1347
  const numericValue = controlledValue !== void 0 ? controlledValue : internalValue;
1345
- const [inputText, setInputText] = React8.useState(
1348
+ const [inputText, setInputText] = React9.useState(
1346
1349
  formatNumberToCurrency(numericValue)
1347
1350
  );
1348
- const [isFocused, setIsFocused] = React8.useState(false);
1349
- React8.useEffect(() => {
1351
+ const [isFocused, setIsFocused] = React9.useState(false);
1352
+ React9.useEffect(() => {
1350
1353
  if (!isFocused) {
1351
1354
  setInputText(formatNumberToCurrency(numericValue));
1352
1355
  }
@@ -1444,13 +1447,13 @@ function AddressAutocomplete({
1444
1447
  onSelect,
1445
1448
  className
1446
1449
  }) {
1447
- const [internalValue, setInternalValue] = React8.useState("");
1450
+ const [internalValue, setInternalValue] = React9.useState("");
1448
1451
  const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
1449
- const [open, setOpen] = React8.useState(false);
1450
- const [activeIndex, setActiveIndex] = React8.useState(-1);
1451
- const containerRef = React8.useRef(null);
1452
- const listRef = React8.useRef(null);
1453
- const filtered = React8.useMemo(() => {
1452
+ const [open, setOpen] = React9.useState(false);
1453
+ const [activeIndex, setActiveIndex] = React9.useState(-1);
1454
+ const containerRef = React9.useRef(null);
1455
+ const listRef = React9.useRef(null);
1456
+ const filtered = React9.useMemo(() => {
1454
1457
  if (!inputValue.trim()) return suggestions.slice(0, 5);
1455
1458
  const q = inputValue.toLowerCase();
1456
1459
  return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
@@ -1480,7 +1483,7 @@ function AddressAutocomplete({
1480
1483
  setOpen(false);
1481
1484
  }
1482
1485
  };
1483
- React8.useEffect(() => {
1486
+ React9.useEffect(() => {
1484
1487
  const handler = (e) => {
1485
1488
  if (containerRef.current && !containerRef.current.contains(e.target)) {
1486
1489
  setOpen(false);
@@ -1557,7 +1560,7 @@ function OwnershipSplit({
1557
1560
  onOwnersChange,
1558
1561
  className
1559
1562
  }) {
1560
- const [internalOwners, setInternalOwners] = React8.useState(DEFAULT_OWNERS);
1563
+ const [internalOwners, setInternalOwners] = React9.useState(DEFAULT_OWNERS);
1561
1564
  const owners = controlledOwners !== void 0 ? controlledOwners : internalOwners;
1562
1565
  const setOwners = (updated) => {
1563
1566
  if (controlledOwners === void 0) setInternalOwners(updated);
@@ -1962,9 +1965,9 @@ function EditLoanScenarioModal({
1962
1965
  container,
1963
1966
  className
1964
1967
  }) {
1965
- const [form, setForm] = React9.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
1966
- const initialSnapshot = React9.useRef("");
1967
- React9.useEffect(() => {
1968
+ const [form, setForm] = React10.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
1969
+ const initialSnapshot = React10.useRef("");
1970
+ React10.useEffect(() => {
1968
1971
  if (open) {
1969
1972
  const data = __spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData);
1970
1973
  setForm(data);
@@ -2224,11 +2227,11 @@ function EditAssetsModal({
2224
2227
  container,
2225
2228
  className
2226
2229
  }) {
2227
- const [items, setItems] = React9.useState(
2230
+ const [items, setItems] = React10.useState(
2228
2231
  initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()]
2229
2232
  );
2230
- const initialSnapshot = React9.useRef("");
2231
- React9.useEffect(() => {
2233
+ const initialSnapshot = React10.useRef("");
2234
+ React10.useEffect(() => {
2232
2235
  if (open) {
2233
2236
  const data = initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()];
2234
2237
  setItems(data);
@@ -2521,11 +2524,11 @@ function EditDebtsModal({
2521
2524
  container,
2522
2525
  className
2523
2526
  }) {
2524
- const [items, setItems] = React9.useState(
2527
+ const [items, setItems] = React10.useState(
2525
2528
  initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()]
2526
2529
  );
2527
- const initialSnapshot = React9.useRef("");
2528
- React9.useEffect(() => {
2530
+ const initialSnapshot = React10.useRef("");
2531
+ React10.useEffect(() => {
2529
2532
  if (open) {
2530
2533
  const data = initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()];
2531
2534
  setItems(data);
@@ -2847,9 +2850,9 @@ function EditAboutApplicantModal({
2847
2850
  container,
2848
2851
  className
2849
2852
  }) {
2850
- const [form, setForm] = React9.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
2851
- const initialSnapshot = React9.useRef("");
2852
- React9.useEffect(() => {
2853
+ const [form, setForm] = React10.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
2854
+ const initialSnapshot = React10.useRef("");
2855
+ React10.useEffect(() => {
2853
2856
  if (open) {
2854
2857
  const data = __spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData);
2855
2858
  setForm(data);
@@ -3121,7 +3124,7 @@ function EditIncomeModal({
3121
3124
  container,
3122
3125
  className
3123
3126
  }) {
3124
- const defaultItems = React9.useMemo(
3127
+ const defaultItems = React10.useMemo(
3125
3128
  () => {
3126
3129
  var _a;
3127
3130
  return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
@@ -3129,9 +3132,9 @@ function EditIncomeModal({
3129
3132
  []
3130
3133
  // eslint-disable-line react-hooks/exhaustive-deps
3131
3134
  );
3132
- const [items, setItems] = React9.useState(defaultItems);
3133
- const initialSnapshot = React9.useRef("");
3134
- React9.useEffect(() => {
3135
+ const [items, setItems] = React10.useState(defaultItems);
3136
+ const initialSnapshot = React10.useRef("");
3137
+ React10.useEffect(() => {
3135
3138
  var _a;
3136
3139
  if (open) {
3137
3140
  const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
@@ -3348,7 +3351,7 @@ function EditExpensesModal({
3348
3351
  container,
3349
3352
  className
3350
3353
  }) {
3351
- const defaultItems = React9.useMemo(
3354
+ const defaultItems = React10.useMemo(
3352
3355
  () => {
3353
3356
  var _a;
3354
3357
  return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
@@ -3356,9 +3359,9 @@ function EditExpensesModal({
3356
3359
  []
3357
3360
  // eslint-disable-line react-hooks/exhaustive-deps
3358
3361
  );
3359
- const [items, setItems] = React9.useState(defaultItems);
3360
- const initialSnapshot = React9.useRef("");
3361
- React9.useEffect(() => {
3362
+ const [items, setItems] = React10.useState(defaultItems);
3363
+ const initialSnapshot = React10.useRef("");
3364
+ React10.useEffect(() => {
3362
3365
  var _a;
3363
3366
  if (open) {
3364
3367
  const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];