braid-ui 1.0.36 → 1.0.38
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/dist/index.cjs +138 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +138 -102
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5255,6 +5255,143 @@ var CreateBusinessView = ({
|
|
|
5255
5255
|
}
|
|
5256
5256
|
);
|
|
5257
5257
|
};
|
|
5258
|
+
var CounterpartyFiltersSheet = ({
|
|
5259
|
+
filters,
|
|
5260
|
+
onFilterChange,
|
|
5261
|
+
onResetFilters
|
|
5262
|
+
}) => {
|
|
5263
|
+
const [localFilters, setLocalFilters] = React15.useState(filters);
|
|
5264
|
+
const [open, setOpen] = React15.useState(false);
|
|
5265
|
+
React15.useEffect(() => {
|
|
5266
|
+
setLocalFilters(filters);
|
|
5267
|
+
}, [filters]);
|
|
5268
|
+
const handleLocalFilterChange = (field, value) => {
|
|
5269
|
+
setLocalFilters((prev) => ({ ...prev, [field]: value }));
|
|
5270
|
+
};
|
|
5271
|
+
const handleApplyFilters = () => {
|
|
5272
|
+
Object.entries(localFilters).forEach(([key, value]) => {
|
|
5273
|
+
onFilterChange(key, value);
|
|
5274
|
+
});
|
|
5275
|
+
setOpen(false);
|
|
5276
|
+
};
|
|
5277
|
+
const handleResetFilters = () => {
|
|
5278
|
+
const resetFilters = {
|
|
5279
|
+
name: "",
|
|
5280
|
+
type: "",
|
|
5281
|
+
status: "",
|
|
5282
|
+
createdDateStart: void 0,
|
|
5283
|
+
createdDateEnd: void 0
|
|
5284
|
+
};
|
|
5285
|
+
setLocalFilters(resetFilters);
|
|
5286
|
+
onResetFilters();
|
|
5287
|
+
setOpen(false);
|
|
5288
|
+
};
|
|
5289
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
5290
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
5291
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
5292
|
+
"Filters"
|
|
5293
|
+
] }) }),
|
|
5294
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
5295
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
5296
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
5297
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5298
|
+
EnhancedInput,
|
|
5299
|
+
{
|
|
5300
|
+
label: "Name",
|
|
5301
|
+
value: localFilters.name,
|
|
5302
|
+
onChange: (e) => handleLocalFilterChange("name", e.target.value),
|
|
5303
|
+
placeholder: "Enter counterparty name"
|
|
5304
|
+
}
|
|
5305
|
+
),
|
|
5306
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5307
|
+
EnhancedSelect,
|
|
5308
|
+
{
|
|
5309
|
+
label: "Type",
|
|
5310
|
+
value: localFilters.type,
|
|
5311
|
+
onValueChange: (value) => handleLocalFilterChange("type", value),
|
|
5312
|
+
placeholder: "Select type",
|
|
5313
|
+
options: [
|
|
5314
|
+
{ value: "BUSINESS", label: "Business" },
|
|
5315
|
+
{ value: "INDIVIDUAL", label: "Individual" }
|
|
5316
|
+
]
|
|
5317
|
+
}
|
|
5318
|
+
),
|
|
5319
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5320
|
+
EnhancedSelect,
|
|
5321
|
+
{
|
|
5322
|
+
label: "Status",
|
|
5323
|
+
value: localFilters.status,
|
|
5324
|
+
onValueChange: (value) => handleLocalFilterChange("status", value),
|
|
5325
|
+
placeholder: "Select status",
|
|
5326
|
+
options: [
|
|
5327
|
+
{ value: "ACTIVE", label: "Active" },
|
|
5328
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
5329
|
+
{ value: "PENDING", label: "Pending" },
|
|
5330
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
5331
|
+
]
|
|
5332
|
+
}
|
|
5333
|
+
),
|
|
5334
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5335
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5336
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
5337
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5338
|
+
DatePicker,
|
|
5339
|
+
{
|
|
5340
|
+
date: localFilters.createdDateStart,
|
|
5341
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateStart", date),
|
|
5342
|
+
placeholder: "MM/DD/YYYY",
|
|
5343
|
+
buttonClassName: "w-full",
|
|
5344
|
+
className: "bg-background z-50"
|
|
5345
|
+
}
|
|
5346
|
+
)
|
|
5347
|
+
] }),
|
|
5348
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5349
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
5350
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5351
|
+
DatePicker,
|
|
5352
|
+
{
|
|
5353
|
+
date: localFilters.createdDateEnd,
|
|
5354
|
+
onDateChange: (date) => handleLocalFilterChange("createdDateEnd", date),
|
|
5355
|
+
placeholder: "MM/DD/YYYY",
|
|
5356
|
+
buttonClassName: "w-full",
|
|
5357
|
+
className: "bg-background z-50"
|
|
5358
|
+
}
|
|
5359
|
+
)
|
|
5360
|
+
] })
|
|
5361
|
+
] })
|
|
5362
|
+
] }),
|
|
5363
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "flex gap-2", children: [
|
|
5364
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleResetFilters, className: "flex-1", children: "Reset Filters" }),
|
|
5365
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleApplyFilters, className: "flex-1", children: "Apply Filters" })
|
|
5366
|
+
] })
|
|
5367
|
+
] })
|
|
5368
|
+
] });
|
|
5369
|
+
};
|
|
5370
|
+
var CounterpartiesView = ({
|
|
5371
|
+
table,
|
|
5372
|
+
filters,
|
|
5373
|
+
onFilterChange,
|
|
5374
|
+
onResetFilters,
|
|
5375
|
+
onCreateCounterparty
|
|
5376
|
+
}) => {
|
|
5377
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
5378
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5379
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground", children: "Counterparties" }) }),
|
|
5380
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5381
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5382
|
+
CounterpartyFiltersSheet,
|
|
5383
|
+
{
|
|
5384
|
+
filters,
|
|
5385
|
+
onFilterChange,
|
|
5386
|
+
onResetFilters
|
|
5387
|
+
}
|
|
5388
|
+
),
|
|
5389
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onCreateCounterparty, children: "Create Counterparty" })
|
|
5390
|
+
] })
|
|
5391
|
+
] }) }) }),
|
|
5392
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: table }) }) })
|
|
5393
|
+
] });
|
|
5394
|
+
};
|
|
5258
5395
|
|
|
5259
5396
|
// src/lib/mock-data/banking-data.ts
|
|
5260
5397
|
var defaultACHBankDetails = {
|
|
@@ -10663,104 +10800,6 @@ var mockCounterpartiesList = [
|
|
|
10663
10800
|
modified: "2023-12-28"
|
|
10664
10801
|
}
|
|
10665
10802
|
];
|
|
10666
|
-
var CounterpartiesView = ({
|
|
10667
|
-
table,
|
|
10668
|
-
filters,
|
|
10669
|
-
onFilterChange,
|
|
10670
|
-
onResetFilters,
|
|
10671
|
-
onApplyFilters,
|
|
10672
|
-
onCreateCounterparty
|
|
10673
|
-
}) => {
|
|
10674
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
|
|
10675
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
10676
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Counterparties" }) }),
|
|
10677
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10678
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { children: [
|
|
10679
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", className: "gap-2", children: [
|
|
10680
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4" }),
|
|
10681
|
-
"Filters"
|
|
10682
|
-
] }) }),
|
|
10683
|
-
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
|
|
10684
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Counterparty Filters" }) }),
|
|
10685
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
10686
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10687
|
-
EnhancedInput,
|
|
10688
|
-
{
|
|
10689
|
-
label: "Name",
|
|
10690
|
-
value: filters.name,
|
|
10691
|
-
onChange: (e) => onFilterChange("name", e.target.value),
|
|
10692
|
-
placeholder: "Enter counterparty name"
|
|
10693
|
-
}
|
|
10694
|
-
),
|
|
10695
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10696
|
-
EnhancedSelect,
|
|
10697
|
-
{
|
|
10698
|
-
label: "Type",
|
|
10699
|
-
value: filters.type,
|
|
10700
|
-
onValueChange: (value) => onFilterChange("type", value),
|
|
10701
|
-
placeholder: "Select type",
|
|
10702
|
-
options: [
|
|
10703
|
-
{ value: "BUSINESS", label: "Business" },
|
|
10704
|
-
{ value: "INDIVIDUAL", label: "Individual" }
|
|
10705
|
-
]
|
|
10706
|
-
}
|
|
10707
|
-
),
|
|
10708
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10709
|
-
EnhancedSelect,
|
|
10710
|
-
{
|
|
10711
|
-
label: "Status",
|
|
10712
|
-
value: filters.status,
|
|
10713
|
-
onValueChange: (value) => onFilterChange("status", value),
|
|
10714
|
-
placeholder: "Select status",
|
|
10715
|
-
options: [
|
|
10716
|
-
{ value: "ACTIVE", label: "Active" },
|
|
10717
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
10718
|
-
{ value: "PENDING", label: "Pending" },
|
|
10719
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
10720
|
-
]
|
|
10721
|
-
}
|
|
10722
|
-
),
|
|
10723
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
10724
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
10725
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
10726
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10727
|
-
DatePicker,
|
|
10728
|
-
{
|
|
10729
|
-
date: filters.createdDateStart,
|
|
10730
|
-
onDateChange: (date) => onFilterChange("createdDateStart", date),
|
|
10731
|
-
placeholder: "MM/DD/YYYY",
|
|
10732
|
-
buttonClassName: "w-full",
|
|
10733
|
-
className: "bg-background z-50"
|
|
10734
|
-
}
|
|
10735
|
-
)
|
|
10736
|
-
] }),
|
|
10737
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
10738
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
10739
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10740
|
-
DatePicker,
|
|
10741
|
-
{
|
|
10742
|
-
date: filters.createdDateEnd,
|
|
10743
|
-
onDateChange: (date) => onFilterChange("createdDateEnd", date),
|
|
10744
|
-
placeholder: "MM/DD/YYYY",
|
|
10745
|
-
buttonClassName: "w-full",
|
|
10746
|
-
className: "bg-background z-50"
|
|
10747
|
-
}
|
|
10748
|
-
)
|
|
10749
|
-
] })
|
|
10750
|
-
] })
|
|
10751
|
-
] }),
|
|
10752
|
-
/* @__PURE__ */ jsxRuntime.jsxs(SheetFooter, { className: "gap-2", children: [
|
|
10753
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: onResetFilters, children: "Reset Filters" }),
|
|
10754
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onApplyFilters, children: "Apply Filters" })
|
|
10755
|
-
] })
|
|
10756
|
-
] })
|
|
10757
|
-
] }),
|
|
10758
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onCreateCounterparty, children: "Create Counterparty" })
|
|
10759
|
-
] })
|
|
10760
|
-
] }) }) }),
|
|
10761
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 mt-4 overflow-auto", children: table }) }) })
|
|
10762
|
-
] });
|
|
10763
|
-
};
|
|
10764
10803
|
var mockProducts3 = {
|
|
10765
10804
|
"prod-001": "Business Banking Pro",
|
|
10766
10805
|
"prod-002": "Premium Banking",
|
|
@@ -10867,8 +10906,6 @@ var Counterparties = () => {
|
|
|
10867
10906
|
createdDateEnd: void 0
|
|
10868
10907
|
});
|
|
10869
10908
|
}, []);
|
|
10870
|
-
const handleApplyFilters = React15.useCallback(() => {
|
|
10871
|
-
}, []);
|
|
10872
10909
|
const handleSort = React15.useCallback((key) => {
|
|
10873
10910
|
if (sortBy === key) {
|
|
10874
10911
|
setSortDirection((prev) => prev === "asc" ? "desc" : "asc");
|
|
@@ -10953,7 +10990,6 @@ var Counterparties = () => {
|
|
|
10953
10990
|
filters,
|
|
10954
10991
|
onFilterChange: handleFilterChange,
|
|
10955
10992
|
onResetFilters: handleResetFilters,
|
|
10956
|
-
onApplyFilters: handleApplyFilters,
|
|
10957
10993
|
onCreateCounterparty: handleCreateCounterparty
|
|
10958
10994
|
}
|
|
10959
10995
|
);
|
|
@@ -14056,6 +14092,7 @@ exports.ContactInfoCard = ContactInfoCard;
|
|
|
14056
14092
|
exports.Container = Container;
|
|
14057
14093
|
exports.ContextSection = ContextSection;
|
|
14058
14094
|
exports.Counterparties = Counterparties_default;
|
|
14095
|
+
exports.CounterpartiesView = CounterpartiesView;
|
|
14059
14096
|
exports.CounterpartyBasicInfo = CounterpartyBasicInfo;
|
|
14060
14097
|
exports.CounterpartyDetail = CounterpartyDetail_default;
|
|
14061
14098
|
exports.CounterpartyProfileCard = CounterpartyProfileCard;
|