@wealthx/shadcn 1.5.12 → 1.5.14

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 (40) hide show
  1. package/.turbo/turbo-build.log +79 -79
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-TC43SMIN.mjs → chunk-7N6O3VPJ.mjs} +6 -6
  4. package/dist/{chunk-CPM6P63C.mjs → chunk-GMF7INNS.mjs} +59 -30
  5. package/dist/chunk-KICT4VQL.mjs +508 -0
  6. package/dist/{chunk-BXL74CM2.mjs → chunk-UXWNUMQA.mjs} +4 -4
  7. package/dist/chunk-V23CBULF.mjs +432 -0
  8. package/dist/components/ui/appointment-calendar-view.js +177 -176
  9. package/dist/components/ui/appointment-calendar-view.mjs +1 -1
  10. package/dist/components/ui/bank-statement-document-table.js +6 -6
  11. package/dist/components/ui/bank-statement-document-table.mjs +1 -1
  12. package/dist/components/ui/bank-statement-generate-dialog.js +164 -77
  13. package/dist/components/ui/bank-statement-generate-dialog.mjs +2 -1
  14. package/dist/components/ui/bank-statement-pdf-viewer.js +4 -4
  15. package/dist/components/ui/bank-statement-pdf-viewer.mjs +1 -1
  16. package/dist/components/ui/resource-center/index.js +1030 -0
  17. package/dist/components/ui/resource-center/index.mjs +29 -0
  18. package/dist/index.js +556 -380
  19. package/dist/index.mjs +17 -15
  20. package/dist/styles.css +1 -1
  21. package/package.json +4 -4
  22. package/src/components/index.tsx +2 -0
  23. package/src/components/ui/appointment-calendar-view.tsx +211 -199
  24. package/src/components/ui/bank-statement-document-table.tsx +12 -6
  25. package/src/components/ui/bank-statement-generate-dialog.tsx +125 -97
  26. package/src/components/ui/bank-statement-pdf-viewer.tsx +4 -4
  27. package/src/components/ui/resource-center/index.tsx +35 -0
  28. package/src/components/ui/resource-center/resource-cards.tsx +218 -0
  29. package/src/components/ui/resource-center/resource-carousel.tsx +122 -0
  30. package/src/components/ui/resource-center/resource-center-header.tsx +95 -0
  31. package/src/components/ui/resource-center/resource-email-editor-dialog.tsx +131 -0
  32. package/src/components/ui/resource-center/resource-modal.tsx +76 -0
  33. package/src/components/ui/resource-center/types.ts +81 -0
  34. package/src/styles/styles-css.ts +1 -1
  35. package/tsup.config.ts +1 -1
  36. package/dist/chunk-IODGRCQG.mjs +0 -438
  37. package/dist/chunk-XYWEGBAA.mjs +0 -348
  38. package/dist/components/ui/resource-center.js +0 -748
  39. package/dist/components/ui/resource-center.mjs +0 -24
  40. package/src/components/ui/resource-center.tsx +0 -539
@@ -911,6 +911,9 @@ function FieldLabel(_a) {
911
911
  );
912
912
  }
913
913
 
914
+ // src/components/ui/pagination.tsx
915
+ var import_lucide_react7 = require("lucide-react");
916
+
914
917
  // src/components/ui/select.tsx
915
918
  var import_lucide_react6 = require("lucide-react");
916
919
  var import_select = require("@base-ui/react/select");
@@ -1058,10 +1061,68 @@ function SelectScrollDownButton(_a) {
1058
1061
  );
1059
1062
  }
1060
1063
 
1064
+ // src/components/ui/pagination.tsx
1065
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1066
+ function PaginationNavButtons({
1067
+ hasPrev,
1068
+ hasNext,
1069
+ onFirst,
1070
+ onPrev,
1071
+ onNext,
1072
+ onLast
1073
+ }) {
1074
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-1", children: [
1075
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1076
+ Button,
1077
+ {
1078
+ "aria-label": "Go to first page",
1079
+ disabled: !hasPrev,
1080
+ onClick: onFirst,
1081
+ size: "icon-sm",
1082
+ variant: "outline",
1083
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.ChevronsLeftIcon, { className: "size-4" })
1084
+ }
1085
+ ),
1086
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1087
+ Button,
1088
+ {
1089
+ "aria-label": "Go to previous page",
1090
+ disabled: !hasPrev,
1091
+ onClick: onPrev,
1092
+ size: "icon-sm",
1093
+ variant: "outline",
1094
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.ChevronLeftIcon, { className: "size-4" })
1095
+ }
1096
+ ),
1097
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1098
+ Button,
1099
+ {
1100
+ "aria-label": "Go to next page",
1101
+ disabled: !hasNext,
1102
+ onClick: onNext,
1103
+ size: "icon-sm",
1104
+ variant: "outline",
1105
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.ChevronRightIcon, { className: "size-4" })
1106
+ }
1107
+ ),
1108
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1109
+ Button,
1110
+ {
1111
+ "aria-label": "Go to last page",
1112
+ disabled: !hasNext,
1113
+ onClick: onLast,
1114
+ size: "icon-sm",
1115
+ variant: "outline",
1116
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.ChevronsRightIcon, { className: "size-4" })
1117
+ }
1118
+ )
1119
+ ] });
1120
+ }
1121
+
1061
1122
  // src/components/ui/spinner.tsx
1062
1123
  var import_class_variance_authority3 = require("class-variance-authority");
1063
- var import_lucide_react7 = require("lucide-react");
1064
- var import_jsx_runtime13 = require("react/jsx-runtime");
1124
+ var import_lucide_react8 = require("lucide-react");
1125
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1065
1126
  var spinnerVariants = (0, import_class_variance_authority3.cva)("animate-spin shrink-0", {
1066
1127
  variants: {
1067
1128
  size: {
@@ -1077,8 +1138,8 @@ var spinnerVariants = (0, import_class_variance_authority3.cva)("animate-spin sh
1077
1138
  });
1078
1139
  function Spinner(_a) {
1079
1140
  var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
1080
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1081
- import_lucide_react7.LoaderCircle,
1141
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1142
+ import_lucide_react8.LoaderCircle,
1082
1143
  __spreadValues({
1083
1144
  "aria-hidden": "true",
1084
1145
  className: cn(spinnerVariants({ size }), className),
@@ -1088,15 +1149,15 @@ function Spinner(_a) {
1088
1149
  }
1089
1150
 
1090
1151
  // src/components/ui/table.tsx
1091
- var import_jsx_runtime14 = require("react/jsx-runtime");
1152
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1092
1153
  function Table(_a) {
1093
1154
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1094
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1155
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1095
1156
  "div",
1096
1157
  {
1097
1158
  className: "relative w-full overflow-x-auto",
1098
1159
  "data-slot": "table-container",
1099
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1160
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1100
1161
  "table",
1101
1162
  __spreadValues({
1102
1163
  className: cn("w-full caption-bottom text-body-small", className),
@@ -1108,7 +1169,7 @@ function Table(_a) {
1108
1169
  }
1109
1170
  function TableHeader(_a) {
1110
1171
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1111
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1172
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1112
1173
  "thead",
1113
1174
  __spreadValues({
1114
1175
  className: cn("[&_tr]:border-b", className),
@@ -1118,7 +1179,7 @@ function TableHeader(_a) {
1118
1179
  }
1119
1180
  function TableBody(_a) {
1120
1181
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1121
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1182
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1122
1183
  "tbody",
1123
1184
  __spreadValues({
1124
1185
  className: cn("[&_tr:last-child]:border-0", className),
@@ -1128,7 +1189,7 @@ function TableBody(_a) {
1128
1189
  }
1129
1190
  function TableRow(_a) {
1130
1191
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1131
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1192
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1132
1193
  "tr",
1133
1194
  __spreadValues({
1134
1195
  className: cn(
@@ -1141,7 +1202,7 @@ function TableRow(_a) {
1141
1202
  }
1142
1203
  function TableHead(_a) {
1143
1204
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1144
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1205
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1145
1206
  "th",
1146
1207
  __spreadValues({
1147
1208
  className: cn(
@@ -1155,7 +1216,7 @@ function TableHead(_a) {
1155
1216
  }
1156
1217
  function TableCell(_a) {
1157
1218
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1158
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1219
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1159
1220
  "td",
1160
1221
  __spreadValues({
1161
1222
  className: cn(
@@ -1176,7 +1237,7 @@ var import_toggle2 = require("@base-ui/react/toggle");
1176
1237
  // src/components/ui/toggle.tsx
1177
1238
  var import_class_variance_authority4 = require("class-variance-authority");
1178
1239
  var import_toggle = require("@base-ui/react/toggle");
1179
- var import_jsx_runtime15 = require("react/jsx-runtime");
1240
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1180
1241
  var toggleVariants = (0, import_class_variance_authority4.cva)(
1181
1242
  "inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1182
1243
  {
@@ -1199,7 +1260,7 @@ var toggleVariants = (0, import_class_variance_authority4.cva)(
1199
1260
  );
1200
1261
 
1201
1262
  // src/components/ui/toggle-group.tsx
1202
- var import_jsx_runtime16 = require("react/jsx-runtime");
1263
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1203
1264
  var ToggleGroupContext = React5.createContext({
1204
1265
  size: "default",
1205
1266
  variant: "default",
@@ -1221,7 +1282,7 @@ function ToggleGroup(_a) {
1221
1282
  "type",
1222
1283
  "children"
1223
1284
  ]);
1224
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1285
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1225
1286
  import_toggle_group.ToggleGroup,
1226
1287
  __spreadProps(__spreadValues({
1227
1288
  className: cn(
@@ -1236,7 +1297,7 @@ function ToggleGroup(_a) {
1236
1297
  multiple: type === "multiple",
1237
1298
  style: { "--gap": spacing }
1238
1299
  }, props), {
1239
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
1300
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
1240
1301
  })
1241
1302
  );
1242
1303
  }
@@ -1253,7 +1314,7 @@ function ToggleGroupItem(_a) {
1253
1314
  "size"
1254
1315
  ]);
1255
1316
  const context = React5.useContext(ToggleGroupContext);
1256
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1317
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1257
1318
  import_toggle2.Toggle,
1258
1319
  __spreadProps(__spreadValues({
1259
1320
  className: cn(
@@ -1277,11 +1338,12 @@ function ToggleGroupItem(_a) {
1277
1338
  }
1278
1339
 
1279
1340
  // src/components/ui/bank-statement-generate-dialog.tsx
1280
- var import_jsx_runtime17 = require("react/jsx-runtime");
1341
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1281
1342
  var APPLICANT_TYPE_LABELS = {
1282
1343
  primary: "Main applicant",
1283
1344
  secondary: "Co-applicant"
1284
1345
  };
1346
+ var ACCOUNTS_PAGE_SIZE = 5;
1285
1347
  function toIsoDate(date) {
1286
1348
  return date.toISOString().slice(0, 10);
1287
1349
  }
@@ -1311,25 +1373,31 @@ function BankStatementGenerateDialog({
1311
1373
  const [toDate, setToDate] = (0, import_react5.useState)(() => presetToDateRange(90).to);
1312
1374
  const [applicantType, setApplicantType] = (0, import_react5.useState)("");
1313
1375
  const [selectedAccountIds, setSelectedAccountIds] = (0, import_react5.useState)([]);
1376
+ const [accountPage, setAccountPage] = (0, import_react5.useState)(1);
1314
1377
  (0, import_react5.useEffect)(() => {
1315
1378
  if (!open) return;
1316
1379
  const timer = setTimeout(() => {
1317
- setStatementName("Bank Statement 1");
1318
- setApplicantType("");
1319
- setSelectedAccountIds([]);
1320
1380
  const { from, to } = presetToDateRange(90);
1381
+ setStatementName("Bank Statement 1");
1321
1382
  setRangePreset(90);
1322
1383
  setFromDate(from);
1323
1384
  setToDate(to);
1385
+ setApplicantType("");
1386
+ setSelectedAccountIds([]);
1387
+ setAccountPage(1);
1324
1388
  }, 0);
1325
1389
  return () => clearTimeout(timer);
1326
1390
  }, [open]);
1327
1391
  const handleApplicantTypeChange = (type) => {
1328
1392
  setApplicantType(type);
1329
1393
  setSelectedAccountIds([]);
1394
+ setAccountPage(1);
1330
1395
  onApplicantTypeChange == null ? void 0 : onApplicantTypeChange(type);
1331
1396
  };
1332
- const applyPreset = (preset) => {
1397
+ const handlePresetChange = (val) => {
1398
+ if (val.length === 0) return;
1399
+ const raw = val[0];
1400
+ const preset = raw === "custom" ? "custom" : Number(raw);
1333
1401
  setRangePreset(preset);
1334
1402
  if (preset !== "custom") {
1335
1403
  const { from, to } = presetToDateRange(preset);
@@ -1337,11 +1405,6 @@ function BankStatementGenerateDialog({
1337
1405
  setToDate(to);
1338
1406
  }
1339
1407
  };
1340
- const handlePresetChange = (val) => {
1341
- if (val.length === 0) return;
1342
- const raw = val[0];
1343
- applyPreset(raw === "custom" ? "custom" : Number(raw));
1344
- };
1345
1408
  const areAllSelected = bankAccounts.length > 0 && selectedAccountIds.length === bankAccounts.length;
1346
1409
  const isSomeSelected = selectedAccountIds.length > 0 && !areAllSelected;
1347
1410
  const handleToggleAccount = (id) => {
@@ -1350,12 +1413,13 @@ function BankStatementGenerateDialog({
1350
1413
  );
1351
1414
  };
1352
1415
  const handleToggleAll = () => {
1353
- if (areAllSelected) {
1354
- setSelectedAccountIds([]);
1355
- } else {
1356
- setSelectedAccountIds(bankAccounts.map((a) => a.id));
1357
- }
1416
+ setSelectedAccountIds(areAllSelected ? [] : bankAccounts.map((a) => a.id));
1358
1417
  };
1418
+ const accountPageCount = Math.ceil(bankAccounts.length / ACCOUNTS_PAGE_SIZE);
1419
+ const pagedAccounts = bankAccounts.slice(
1420
+ (accountPage - 1) * ACCOUNTS_PAGE_SIZE,
1421
+ accountPage * ACCOUNTS_PAGE_SIZE
1422
+ );
1359
1423
  const periodLabel = (0, import_react5.useMemo)(() => {
1360
1424
  if (fromDate && toDate) {
1361
1425
  return `${(0, import_date_fns3.format)((0, import_date_fns3.parseISO)(fromDate), "dd MMM yyyy")} \u2013 ${(0, import_date_fns3.format)((0, import_date_fns3.parseISO)(toDate), "dd MMM yyyy")}`;
@@ -1374,18 +1438,18 @@ function BankStatementGenerateDialog({
1374
1438
  selectedAccountIds
1375
1439
  });
1376
1440
  };
1377
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1441
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1378
1442
  DialogContent,
1379
1443
  {
1380
1444
  size: "3xl",
1381
1445
  className,
1382
1446
  "data-slot": "bank-statement-generate-dialog",
1383
1447
  children: [
1384
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogTitle, { children: "Generate Bank Statement" }) }),
1385
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-4", children: [
1386
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Field, { children: [
1387
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FieldLabel, { children: "Name" }),
1388
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1448
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogTitle, { children: "Generate Bank Statement" }) }),
1449
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-4", children: [
1450
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Field, { children: [
1451
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FieldLabel, { children: "Name" }),
1452
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1389
1453
  Input,
1390
1454
  {
1391
1455
  value: statementName,
@@ -1394,9 +1458,9 @@ function BankStatementGenerateDialog({
1394
1458
  }
1395
1459
  )
1396
1460
  ] }),
1397
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2", children: [
1398
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-body-small text-muted-foreground", children: "Statement period" }),
1399
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1461
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-2", children: [
1462
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-body-small text-muted-foreground", children: "Statement period" }),
1463
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1400
1464
  ToggleGroup,
1401
1465
  {
1402
1466
  type: "single",
@@ -1405,16 +1469,16 @@ function BankStatementGenerateDialog({
1405
1469
  onValueChange: handlePresetChange,
1406
1470
  className: "w-full",
1407
1471
  children: [
1408
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: "90", className: "flex-1", children: "3 Months" }),
1409
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: "180", className: "flex-1", children: "6 Months" }),
1410
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: "365", className: "flex-1", children: "12 Months" }),
1411
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: "custom", className: "flex-1", children: "Custom" })
1472
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToggleGroupItem, { value: "90", className: "flex-1", children: "3 Months" }),
1473
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToggleGroupItem, { value: "180", className: "flex-1", children: "6 Months" }),
1474
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToggleGroupItem, { value: "365", className: "flex-1", children: "12 Months" }),
1475
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToggleGroupItem, { value: "custom", className: "flex-1", children: "Custom" })
1412
1476
  ]
1413
1477
  }
1414
1478
  )
1415
1479
  ] }),
1416
- rangePreset === "custom" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex gap-3", children: [
1417
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1480
+ rangePreset === "custom" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-3", children: [
1481
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1418
1482
  DatePicker,
1419
1483
  {
1420
1484
  value: fromDate ? (0, import_date_fns3.parseISO)(fromDate) : void 0,
@@ -1423,7 +1487,7 @@ function BankStatementGenerateDialog({
1423
1487
  className: "flex-1"
1424
1488
  }
1425
1489
  ),
1426
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1490
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1427
1491
  DatePicker,
1428
1492
  {
1429
1493
  value: toDate ? (0, import_date_fns3.parseISO)(toDate) : void 0,
@@ -1433,27 +1497,25 @@ function BankStatementGenerateDialog({
1433
1497
  }
1434
1498
  )
1435
1499
  ] }),
1436
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1500
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1437
1501
  Select,
1438
1502
  {
1439
1503
  value: applicantType,
1440
1504
  onValueChange: (v) => handleApplicantTypeChange(v),
1441
1505
  items: APPLICANT_TYPE_LABELS,
1442
1506
  children: [
1443
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder: "Applicant Type" }) }),
1444
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SelectContent, { children: [
1445
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: "primary", children: APPLICANT_TYPE_LABELS.primary }),
1446
- hasCoApplicant && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: "secondary", children: APPLICANT_TYPE_LABELS.secondary })
1507
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectValue, { placeholder: "Applicant Type" }) }),
1508
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(SelectContent, { children: [
1509
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "primary", children: APPLICANT_TYPE_LABELS.primary }),
1510
+ hasCoApplicant && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectItem, { value: "secondary", children: APPLICANT_TYPE_LABELS.secondary })
1447
1511
  ] })
1448
1512
  ]
1449
1513
  }
1450
1514
  ),
1451
- applicantType && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mt-1", children: [
1452
- isLoadingAccounts && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: "lg" }) }),
1453
- !isLoadingAccounts && bankAccounts.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "py-4 text-center text-body-medium text-muted-foreground", children: "No bank accounts found for the selected applicant" }),
1454
- !isLoadingAccounts && bankAccounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Table, { children: [
1455
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TableRow, { children: [
1456
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { className: "w-10", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1515
+ applicantType && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mt-1", children: isLoadingAccounts ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: "lg" }) }) : bankAccounts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "py-4 text-center text-body-medium text-muted-foreground", children: "No bank accounts found for the selected applicant" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1516
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Table, { className: "table-fixed", children: [
1517
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(TableRow, { children: [
1518
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHead, { className: "w-10", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1457
1519
  Checkbox,
1458
1520
  {
1459
1521
  checked: areAllSelected,
@@ -1462,22 +1524,22 @@ function BankStatementGenerateDialog({
1462
1524
  "aria-label": "Select all accounts"
1463
1525
  }
1464
1526
  ) }),
1465
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: "Account Name" }),
1466
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: "Account Number" }),
1467
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: "Period" }),
1468
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: "Last Updated" })
1527
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHead, { children: "Account Name" }),
1528
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHead, { className: "w-40", children: "Account Number" }),
1529
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHead, { className: "w-52", children: "Period" }),
1530
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableHead, { className: "w-28", children: "Last Updated" })
1469
1531
  ] }) }),
1470
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableBody, { children: bankAccounts.map((account) => {
1532
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableBody, { children: pagedAccounts.map((account) => {
1471
1533
  var _a, _b;
1472
1534
  const isSelected = selectedAccountIds.includes(
1473
1535
  account.id
1474
1536
  );
1475
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1537
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1476
1538
  TableRow,
1477
1539
  {
1478
1540
  "data-state": isSelected ? "selected" : void 0,
1479
1541
  children: [
1480
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1542
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1481
1543
  Checkbox,
1482
1544
  {
1483
1545
  checked: isSelected,
@@ -1485,20 +1547,20 @@ function BankStatementGenerateDialog({
1485
1547
  "aria-label": `Select ${account.name}`
1486
1548
  }
1487
1549
  ) }),
1488
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
1489
- account.institutionLogo && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1550
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
1551
+ account.institutionLogo && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1490
1552
  "img",
1491
1553
  {
1492
1554
  src: account.institutionLogo,
1493
1555
  alt: (_a = account.institutionName) != null ? _a : "",
1494
- className: "size-8 object-cover"
1556
+ className: "size-8 shrink-0 object-cover"
1495
1557
  }
1496
1558
  ),
1497
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-body-medium font-semibold", children: account.name || account.institutionName || "\u2014" })
1559
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "truncate text-body-medium font-semibold", children: account.name || account.institutionName || "\u2014" })
1498
1560
  ] }) }),
1499
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-body-medium", children: (_b = account.accountNo) != null ? _b : "\u2014" }) }),
1500
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-body-medium", children: periodLabel }) }),
1501
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-body-medium", children: account.lastUpdated ? (0, import_date_fns3.format)(
1561
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "truncate text-body-medium", children: (_b = account.accountNo) != null ? _b : "\u2014" }) }),
1562
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "truncate text-body-medium", children: periodLabel }) }),
1563
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "truncate text-body-medium", children: account.lastUpdated ? (0, import_date_fns3.format)(
1502
1564
  (0, import_date_fns3.parseISO)(account.lastUpdated),
1503
1565
  "dd MMM yyyy"
1504
1566
  ) : "\u2014" }) })
@@ -1507,12 +1569,37 @@ function BankStatementGenerateDialog({
1507
1569
  account.id
1508
1570
  );
1509
1571
  }) })
1572
+ ] }),
1573
+ accountPageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between pt-2", children: [
1574
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "text-body-small text-muted-foreground", children: [
1575
+ (accountPage - 1) * ACCOUNTS_PAGE_SIZE + 1,
1576
+ "\u2013",
1577
+ Math.min(
1578
+ accountPage * ACCOUNTS_PAGE_SIZE,
1579
+ bankAccounts.length
1580
+ ),
1581
+ " ",
1582
+ "of ",
1583
+ bankAccounts.length,
1584
+ " accounts"
1585
+ ] }),
1586
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1587
+ PaginationNavButtons,
1588
+ {
1589
+ hasPrev: accountPage > 1,
1590
+ hasNext: accountPage < accountPageCount,
1591
+ onFirst: () => setAccountPage(1),
1592
+ onPrev: () => setAccountPage((p) => p - 1),
1593
+ onNext: () => setAccountPage((p) => p + 1),
1594
+ onLast: () => setAccountPage(accountPageCount)
1595
+ }
1596
+ )
1510
1597
  ] })
1511
- ] })
1598
+ ] }) })
1512
1599
  ] }),
1513
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DialogFooter, { children: [
1514
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "ghost", onClick: onClose, children: "Cancel" }),
1515
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1600
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogFooter, { children: [
1601
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "ghost", onClick: onClose, children: "Cancel" }),
1602
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1516
1603
  Button,
1517
1604
  {
1518
1605
  onClick: handleSubmit,
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  BankStatementGenerateDialog
3
- } from "../../chunk-CPM6P63C.mjs";
3
+ } from "../../chunk-GMF7INNS.mjs";
4
4
  import "../../chunk-MUV4EGDW.mjs";
5
+ import "../../chunk-SSUK6C2K.mjs";
5
6
  import "../../chunk-GT3RU6GA.mjs";
6
7
  import "../../chunk-IKXYTCSB.mjs";
7
8
  import "../../chunk-USOVLDGS.mjs";
@@ -437,8 +437,8 @@ function BankStatementPDFViewer({
437
437
  ),
438
438
  "data-slot": "bank-statement-pdf-viewer",
439
439
  children: [
440
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex shrink-0 items-center justify-between border-b border-border px-3 py-2", children: [
441
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2", children: [
440
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-w-0 shrink-0 items-center justify-between border-b border-border px-3 py-2", children: [
441
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
442
442
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
443
443
  Button,
444
444
  {
@@ -450,7 +450,7 @@ function BankStatementPDFViewer({
450
450
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react4.ChevronLeft, { className: "size-4" })
451
451
  }
452
452
  ),
453
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-body-medium tabular-nums", children: [
453
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "shrink-0 text-body-medium tabular-nums", children: [
454
454
  "Account ",
455
455
  currentAccountIndex + 1,
456
456
  " of ",
@@ -467,7 +467,7 @@ function BankStatementPDFViewer({
467
467
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
468
468
  }
469
469
  ),
470
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "ml-2 text-body-medium text-muted-foreground", children: accountLabel })
470
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "ml-2 min-w-0 truncate text-body-medium text-muted-foreground", children: accountLabel })
471
471
  ] }),
472
472
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1", children: [
473
473
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BankStatementPDFViewer
3
- } from "../../chunk-BXL74CM2.mjs";
3
+ } from "../../chunk-UXWNUMQA.mjs";
4
4
  import "../../chunk-JVMXMFBB.mjs";
5
5
  import "../../chunk-LI2CTS5O.mjs";
6
6
  import "../../chunk-XYSRRDBH.mjs";