braid-ui 1.0.99 → 1.0.100
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/README.md +327 -44
- package/dist/css/braid-ui-variables.css +88 -0
- package/dist/css/braid-ui.css +4702 -0
- package/dist/css/braid-ui.min.css +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2027 -0
- package/dist/index.d.ts +2027 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/package.json +115 -55
- package/src/styles-only.css +121 -0
- package/src/{index.css → styles.css} +4 -10
- package/components.json +0 -20
- package/eslint.config.js +0 -29
- package/index.html +0 -24
- package/postcss.config.js +0 -6
- package/public/favicon.ico +0 -0
- package/public/placeholder.svg +0 -1
- package/public/robots.txt +0 -14
- package/src/App.css +0 -42
- package/src/App.tsx +0 -94
- package/src/components/MainLayout.tsx +0 -15
- package/src/components/alerts/AlertDocuments.tsx +0 -320
- package/src/components/alerts/AlertNotes.tsx +0 -185
- package/src/components/alerts/AlertTimeline.tsx +0 -79
- package/src/components/alerts/ContextSection.tsx +0 -155
- package/src/components/app-sidebar.tsx +0 -341
- package/src/components/form-sections/ACHBankCard.tsx +0 -78
- package/src/components/form-sections/ACHBasicInfoCard.tsx +0 -100
- package/src/components/form-sections/ACHTransferSection.tsx +0 -64
- package/src/components/form-sections/AddressForm.tsx +0 -94
- package/src/components/form-sections/BankAddressCard.tsx +0 -95
- package/src/components/form-sections/BankingDetailsCard.tsx +0 -46
- package/src/components/form-sections/BasicInfoCard.tsx +0 -103
- package/src/components/form-sections/BasicInfoSection.tsx +0 -34
- package/src/components/form-sections/BeneficiaryAddress.tsx +0 -19
- package/src/components/form-sections/BeneficiaryCard.tsx +0 -41
- package/src/components/form-sections/BeneficiaryDomesticWire.tsx +0 -23
- package/src/components/form-sections/BusinessProfileCard.tsx +0 -131
- package/src/components/form-sections/BusinessStatusCard.tsx +0 -53
- package/src/components/form-sections/ContactInfoCard.tsx +0 -63
- package/src/components/form-sections/CounterpartyBasicInfo.tsx +0 -101
- package/src/components/form-sections/CounterpartyProfileCard.tsx +0 -104
- package/src/components/form-sections/CounterpartyRecordsCard.tsx +0 -41
- package/src/components/form-sections/IntermediaryCard.tsx +0 -77
- package/src/components/form-sections/IntermediaryFI.tsx +0 -41
- package/src/components/form-sections/IntermediaryFIAddress.tsx +0 -14
- package/src/components/form-sections/OriginatorCard.tsx +0 -49
- package/src/components/form-sections/OriginatorFI.tsx +0 -42
- package/src/components/form-sections/OriginatorFIAddress.tsx +0 -14
- package/src/components/form-sections/PaymentInformationSection.tsx +0 -163
- package/src/components/form-sections/ReceiverCard.tsx +0 -94
- package/src/components/form-sections/WireTransferSection.tsx +0 -75
- package/src/components/layouts/list-page.tsx +0 -103
- package/src/components/transaction/ACHDetailsSection.tsx +0 -95
- package/src/components/transaction/WireDetailsSection.tsx +0 -112
- package/src/components/ui/account-card.tsx +0 -94
- package/src/components/ui/badge.tsx +0 -75
- package/src/components/ui/breadcrumb.tsx +0 -78
- package/src/components/ui/business-type-badge.tsx +0 -42
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/calendar.tsx +0 -49
- package/src/components/ui/card.tsx +0 -223
- package/src/components/ui/container.tsx +0 -45
- package/src/components/ui/counterparty-type-badge.tsx +0 -53
- package/src/components/ui/data-grid.tsx +0 -99
- package/src/components/ui/data-table.tsx +0 -152
- package/src/components/ui/detail-page-layout.tsx +0 -83
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/dropdown-menu.tsx +0 -82
- package/src/components/ui/editable-form-card.tsx +0 -106
- package/src/components/ui/editable-info-field.tsx +0 -67
- package/src/components/ui/enhanced-input.tsx +0 -78
- package/src/components/ui/enhanced-select.tsx +0 -101
- package/src/components/ui/enhanced-textarea.tsx +0 -64
- package/src/components/ui/entity-card.tsx +0 -140
- package/src/components/ui/form-card.tsx +0 -40
- package/src/components/ui/form-field.tsx +0 -50
- package/src/components/ui/form-input.tsx +0 -29
- package/src/components/ui/form-provider.tsx +0 -18
- package/src/components/ui/form-section.tsx +0 -66
- package/src/components/ui/form-select.tsx +0 -35
- package/src/components/ui/info-field.tsx +0 -36
- package/src/components/ui/json-viewer.tsx +0 -146
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/metric-card.tsx +0 -80
- package/src/components/ui/page-layout.tsx +0 -183
- package/src/components/ui/popover.tsx +0 -29
- package/src/components/ui/responsive-grid.tsx +0 -46
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/sheet.tsx +0 -140
- package/src/components/ui/sidebar.tsx +0 -775
- package/src/components/ui/sonner.tsx +0 -29
- package/src/components/ui/stack.tsx +0 -77
- package/src/components/ui/status-badge.tsx +0 -68
- package/src/components/ui/tabs.tsx +0 -52
- package/src/components/ui/toast.tsx +0 -127
- package/src/components/ui/toaster.tsx +0 -33
- package/src/components/ui/tooltip.tsx +0 -28
- package/src/components/ui/use-toast.ts +0 -3
- package/src/components/ui-kit/dashboard-demo.tsx +0 -156
- package/src/components/ui-kit/pattern-library.tsx +0 -248
- package/src/components/ui-kit/showcase.tsx +0 -211
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-toast.ts +0 -191
- package/src/hooks/useEditState.ts +0 -70
- package/src/hooks/useFormWithEditState.ts +0 -115
- package/src/lib/constants.ts +0 -25
- package/src/lib/mock-data/alert-data.ts +0 -275
- package/src/lib/mock-data/banking-data.ts +0 -72
- package/src/lib/mock-data/business-data.ts +0 -71
- package/src/lib/mock-data/counterparty-data.ts +0 -70
- package/src/lib/mock-data/index.ts +0 -5
- package/src/lib/mock-data/transaction-data.ts +0 -283
- package/src/lib/mock-data/wire-data.ts +0 -103
- package/src/lib/mock-data.tsx +0 -180
- package/src/lib/schemas/banking-schemas.ts +0 -30
- package/src/lib/schemas/business-schemas.ts +0 -36
- package/src/lib/schemas/counterparty-schemas.ts +0 -43
- package/src/lib/schemas/index.ts +0 -5
- package/src/lib/schemas/wire-schemas.ts +0 -44
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -10
- package/src/pages/Cases.tsx +0 -16
- package/src/pages/Dashboard.tsx +0 -16
- package/src/pages/NotFound.tsx +0 -27
- package/src/pages/TransactionHistory.tsx +0 -532
- package/src/pages/UIKit.tsx +0 -51
- package/src/pages/alerts/AlertDetail.tsx +0 -193
- package/src/pages/alerts/Alerts.tsx +0 -373
- package/src/pages/business/Business.tsx +0 -48
- package/src/pages/business/Create.tsx +0 -173
- package/src/pages/counterparty/Create.tsx +0 -48
- package/src/pages/counterparty/DomesticWire.tsx +0 -78
- package/src/pages/counterparty/Manage.tsx +0 -79
- package/src/pages/transactions/NewTransaction.tsx +0 -527
- package/src/pages/transactions/TransactionDetail.tsx +0 -192
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.ts +0 -124
- package/tsconfig.app.json +0 -30
- package/tsconfig.json +0 -19
- package/tsconfig.node.json +0 -22
- package/vite.config.ts +0 -22
- /package/{src/assets/braid-logo.png → dist/braid-logo-343BOQZ2.png} +0 -0
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { useState } from "react"
|
|
2
|
-
import { Button } from "@/components/ui/button"
|
|
3
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
4
|
-
import { Plus, Trash2, ChevronDown, ChevronUp } from "lucide-react"
|
|
5
|
-
import { ACHBasicInfoCard } from "./ACHBasicInfoCard"
|
|
6
|
-
import { ACHBankCard } from "./ACHBankCard"
|
|
7
|
-
import { BankAddressCard } from "./BankAddressCard"
|
|
8
|
-
import { ReceiverCard } from "./ReceiverCard"
|
|
9
|
-
import { BeneficiaryCard } from "./BeneficiaryCard"
|
|
10
|
-
import { OriginatorCard } from "./OriginatorCard"
|
|
11
|
-
import { IntermediaryCard } from "./IntermediaryCard"
|
|
12
|
-
import { defaultACHTransfer } from "@/lib/mock-data/banking-data"
|
|
13
|
-
import { type ACHTransfer } from "@/lib/schemas/banking-schemas"
|
|
14
|
-
|
|
15
|
-
interface PaymentMethod {
|
|
16
|
-
id: string
|
|
17
|
-
type: "ach" | "wire"
|
|
18
|
-
name: string
|
|
19
|
-
collapsed: boolean
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const PaymentInformationSection = () => {
|
|
23
|
-
const [paymentMethods, setPaymentMethods] = useState<PaymentMethod[]>([])
|
|
24
|
-
const [showAddMenu, setShowAddMenu] = useState(false)
|
|
25
|
-
const [achData, setAchData] = useState<ACHTransfer>(defaultACHTransfer)
|
|
26
|
-
|
|
27
|
-
const addPaymentMethod = (type: "ach" | "wire") => {
|
|
28
|
-
const newMethod: PaymentMethod = {
|
|
29
|
-
id: `${type}-${Date.now()}`,
|
|
30
|
-
type,
|
|
31
|
-
name: type === "ach" ? "ACH Payment" : "Wire Transfer",
|
|
32
|
-
collapsed: false
|
|
33
|
-
}
|
|
34
|
-
setPaymentMethods([...paymentMethods, newMethod])
|
|
35
|
-
setShowAddMenu(false)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const removePaymentMethod = (id: string) => {
|
|
39
|
-
setPaymentMethods(paymentMethods.filter(method => method.id !== id))
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const toggleCollapse = (id: string) => {
|
|
43
|
-
setPaymentMethods(paymentMethods.map(method =>
|
|
44
|
-
method.id === id ? { ...method, collapsed: !method.collapsed } : method
|
|
45
|
-
))
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const handleACHDataChange = (newData: ACHTransfer) => {
|
|
49
|
-
setAchData(newData)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const renderPaymentMethodContent = (method: PaymentMethod) => {
|
|
53
|
-
if (method.type === "ach") {
|
|
54
|
-
return (
|
|
55
|
-
<div className="space-y-4">
|
|
56
|
-
<ACHBasicInfoCard
|
|
57
|
-
data={achData}
|
|
58
|
-
onDataChange={handleACHDataChange}
|
|
59
|
-
isEditing={true}
|
|
60
|
-
hideActions={true}
|
|
61
|
-
/>
|
|
62
|
-
<ACHBankCard
|
|
63
|
-
data={achData}
|
|
64
|
-
onDataChange={handleACHDataChange}
|
|
65
|
-
isEditing={true}
|
|
66
|
-
hideActions={true}
|
|
67
|
-
/>
|
|
68
|
-
<BankAddressCard isEditing={true} hideActions={true} />
|
|
69
|
-
</div>
|
|
70
|
-
)
|
|
71
|
-
} else {
|
|
72
|
-
return (
|
|
73
|
-
<div className="space-y-4">
|
|
74
|
-
<ReceiverCard isEditing={true} hideActions={true} />
|
|
75
|
-
<BeneficiaryCard isEditing={true} hideActions={true} />
|
|
76
|
-
<OriginatorCard isEditing={true} hideActions={true} />
|
|
77
|
-
<IntermediaryCard isEditing={true} hideActions={true} />
|
|
78
|
-
</div>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<div className="space-y-6">
|
|
85
|
-
<div className="border-b border-border pb-4">
|
|
86
|
-
<h2 className="text-lg font-semibold text-foreground">Payment Information</h2>
|
|
87
|
-
<p className="text-sm text-muted-foreground">Add payment methods for this counterparty</p>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
{paymentMethods.map((method) => (
|
|
91
|
-
<Card key={method.id} className="relative">
|
|
92
|
-
<CardHeader className="pb-3">
|
|
93
|
-
<div className="flex items-center justify-between">
|
|
94
|
-
<div className="flex items-center gap-3">
|
|
95
|
-
<Button
|
|
96
|
-
variant="ghost"
|
|
97
|
-
size="icon"
|
|
98
|
-
onClick={() => toggleCollapse(method.id)}
|
|
99
|
-
className="h-6 w-6"
|
|
100
|
-
>
|
|
101
|
-
{method.collapsed ? (
|
|
102
|
-
<ChevronDown className="h-4 w-4" />
|
|
103
|
-
) : (
|
|
104
|
-
<ChevronUp className="h-4 w-4" />
|
|
105
|
-
)}
|
|
106
|
-
</Button>
|
|
107
|
-
<CardTitle className="text-base">{method.name}</CardTitle>
|
|
108
|
-
<span className="text-xs bg-muted px-2 py-1 rounded-md uppercase font-medium">
|
|
109
|
-
{method.type}
|
|
110
|
-
</span>
|
|
111
|
-
</div>
|
|
112
|
-
<Button
|
|
113
|
-
variant="ghost"
|
|
114
|
-
size="icon"
|
|
115
|
-
onClick={() => removePaymentMethod(method.id)}
|
|
116
|
-
className="h-6 w-6 text-destructive hover:text-destructive/80 hover:bg-destructive/10"
|
|
117
|
-
>
|
|
118
|
-
<Trash2 className="h-4 w-4" />
|
|
119
|
-
</Button>
|
|
120
|
-
</div>
|
|
121
|
-
</CardHeader>
|
|
122
|
-
{!method.collapsed && (
|
|
123
|
-
<CardContent>
|
|
124
|
-
{renderPaymentMethodContent(method)}
|
|
125
|
-
</CardContent>
|
|
126
|
-
)}
|
|
127
|
-
</Card>
|
|
128
|
-
))}
|
|
129
|
-
|
|
130
|
-
<div className="relative">
|
|
131
|
-
<Button
|
|
132
|
-
variant="outline"
|
|
133
|
-
onClick={() => setShowAddMenu(!showAddMenu)}
|
|
134
|
-
className="w-full border-dashed"
|
|
135
|
-
>
|
|
136
|
-
<Plus className="h-4 w-4 mr-2" />
|
|
137
|
-
Add Payment Information
|
|
138
|
-
</Button>
|
|
139
|
-
|
|
140
|
-
{showAddMenu && (
|
|
141
|
-
<div className="absolute top-full left-0 right-0 mt-2 bg-background border border-border rounded-md shadow-lg z-10">
|
|
142
|
-
<div className="p-2 space-y-1">
|
|
143
|
-
<Button
|
|
144
|
-
variant="ghost"
|
|
145
|
-
onClick={() => addPaymentMethod("ach")}
|
|
146
|
-
className="w-full justify-start"
|
|
147
|
-
>
|
|
148
|
-
Add ACH Payment
|
|
149
|
-
</Button>
|
|
150
|
-
<Button
|
|
151
|
-
variant="ghost"
|
|
152
|
-
onClick={() => addPaymentMethod("wire")}
|
|
153
|
-
className="w-full justify-start"
|
|
154
|
-
>
|
|
155
|
-
Add Wire Transfer
|
|
156
|
-
</Button>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
)}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
)
|
|
163
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { EditableFormCard } from "@/components/ui/editable-form-card"
|
|
2
|
-
import { DataGrid } from "@/components/ui/data-grid"
|
|
3
|
-
import { FormSection } from "@/components/ui/form-section"
|
|
4
|
-
import { FormProvider } from "@/components/ui/form-provider"
|
|
5
|
-
import { FormInput } from "@/components/ui/form-input"
|
|
6
|
-
import { useFormWithEditState } from "@/hooks/useFormWithEditState"
|
|
7
|
-
import { z } from "zod"
|
|
8
|
-
import { defaultReceiverInfo } from "@/lib/mock-data/wire-data"
|
|
9
|
-
|
|
10
|
-
const receiverSchema = z.object({
|
|
11
|
-
routingNumber: z.string().min(9, "Routing number must be 9 digits").max(9, "Routing number must be 9 digits"),
|
|
12
|
-
bankShortName: z.string().min(1, "Bank short name is required"),
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
type ReceiverInfo = z.infer<typeof receiverSchema>
|
|
16
|
-
|
|
17
|
-
interface ReceiverCardProps {
|
|
18
|
-
data?: Partial<ReceiverInfo>
|
|
19
|
-
onDataChange?: (data: ReceiverInfo) => void
|
|
20
|
-
isEditing?: boolean
|
|
21
|
-
onToggleEdit?: () => void
|
|
22
|
-
className?: string
|
|
23
|
-
hideActions?: boolean
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const ReceiverCard = ({
|
|
27
|
-
data,
|
|
28
|
-
onDataChange,
|
|
29
|
-
isEditing,
|
|
30
|
-
onToggleEdit,
|
|
31
|
-
className,
|
|
32
|
-
hideActions
|
|
33
|
-
}: ReceiverCardProps) => {
|
|
34
|
-
const form = useFormWithEditState<ReceiverInfo>({
|
|
35
|
-
schema: receiverSchema,
|
|
36
|
-
defaultValues: { ...defaultReceiverInfo, ...data },
|
|
37
|
-
initialEditing: isEditing,
|
|
38
|
-
onToggleEdit,
|
|
39
|
-
onSave: onDataChange,
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const editContent = (
|
|
43
|
-
<FormProvider form={form}>
|
|
44
|
-
<FormSection>
|
|
45
|
-
<div className="space-y-6">
|
|
46
|
-
<div className="border-b border-border pb-4">
|
|
47
|
-
<h2 className="text-lg font-semibold text-foreground">Receiver Details</h2>
|
|
48
|
-
<p className="text-sm text-muted-foreground">Receiving bank information</p>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<div className="grid grid-cols-1 gap-6">
|
|
52
|
-
<FormInput
|
|
53
|
-
name="routingNumber"
|
|
54
|
-
label="Receiver Routing Number"
|
|
55
|
-
placeholder="Enter routing number"
|
|
56
|
-
hint="9-digit routing number"
|
|
57
|
-
pattern="[0-9]{9}"
|
|
58
|
-
maxLength={9}
|
|
59
|
-
required
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<FormInput
|
|
63
|
-
name="bankShortName"
|
|
64
|
-
label="Receiver Bank Short Name"
|
|
65
|
-
placeholder="Enter bank short name"
|
|
66
|
-
required
|
|
67
|
-
/>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</FormSection>
|
|
71
|
-
</FormProvider>
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
const formValues = form.watch()
|
|
75
|
-
const viewData = [
|
|
76
|
-
{ label: "Routing Number", value: formValues?.routingNumber },
|
|
77
|
-
{ label: "Bank Short Name", value: formValues?.bankShortName }
|
|
78
|
-
]
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<EditableFormCard
|
|
82
|
-
title="FedWire Receiver"
|
|
83
|
-
variant="subtle"
|
|
84
|
-
className={className}
|
|
85
|
-
isEditing={form.isEditing}
|
|
86
|
-
onToggleEdit={form.handleToggleEdit}
|
|
87
|
-
onSave={form.handleSave}
|
|
88
|
-
onCancel={form.handleCancel}
|
|
89
|
-
hideActions={hideActions}
|
|
90
|
-
editContent={editContent}
|
|
91
|
-
viewContent={<DataGrid data={viewData} columns={2} />}
|
|
92
|
-
/>
|
|
93
|
-
)
|
|
94
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { useState } from "react"
|
|
2
|
-
import { EditableFormCard } from "@/components/ui/editable-form-card"
|
|
3
|
-
import { ResponsiveGrid } from "@/components/ui/responsive-grid"
|
|
4
|
-
import { EnhancedSelect } from "@/components/ui/enhanced-select"
|
|
5
|
-
import { ReceiverCard } from "./ReceiverCard"
|
|
6
|
-
import { BeneficiaryCard } from "./BeneficiaryCard"
|
|
7
|
-
import { OriginatorCard } from "./OriginatorCard"
|
|
8
|
-
import { IntermediaryCard } from "./IntermediaryCard"
|
|
9
|
-
|
|
10
|
-
interface WireTransferSectionProps {
|
|
11
|
-
isEditing?: boolean
|
|
12
|
-
onToggleEdit?: () => void
|
|
13
|
-
className?: string
|
|
14
|
-
hideActions?: boolean
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions }: WireTransferSectionProps) => {
|
|
18
|
-
const [wireTransferType, setWireTransferType] = useState("INTERNATIONAL")
|
|
19
|
-
|
|
20
|
-
const editContent = (
|
|
21
|
-
<div className="space-y-6">
|
|
22
|
-
<div className="flex items-center gap-4">
|
|
23
|
-
<EnhancedSelect
|
|
24
|
-
label="Transfer Type"
|
|
25
|
-
value={wireTransferType}
|
|
26
|
-
onValueChange={setWireTransferType}
|
|
27
|
-
options={[
|
|
28
|
-
{ value: "DOMESTIC", label: "Domestic" },
|
|
29
|
-
{ value: "INTERNATIONAL", label: "International" }
|
|
30
|
-
]}
|
|
31
|
-
placeholder="Select transfer type"
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<ResponsiveGrid type="forms" gap="md" editMode={isEditing}>
|
|
36
|
-
<ReceiverCard isEditing={isEditing} hideActions={true} />
|
|
37
|
-
<BeneficiaryCard isEditing={isEditing} hideActions={true} />
|
|
38
|
-
<OriginatorCard isEditing={isEditing} hideActions={true} />
|
|
39
|
-
<IntermediaryCard isEditing={isEditing} hideActions={true} />
|
|
40
|
-
</ResponsiveGrid>
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
const viewContent = (
|
|
45
|
-
<div className="space-y-6">
|
|
46
|
-
<div className="flex items-center gap-2">
|
|
47
|
-
<span className="text-sm font-medium text-muted-foreground">Transfer Type:</span>
|
|
48
|
-
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-secondary text-secondary-foreground">
|
|
49
|
-
{wireTransferType}
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<ResponsiveGrid type="forms" gap="md">
|
|
54
|
-
<ReceiverCard isEditing={false} hideActions={true} />
|
|
55
|
-
<BeneficiaryCard isEditing={false} hideActions={true} />
|
|
56
|
-
<OriginatorCard isEditing={false} hideActions={true} />
|
|
57
|
-
<IntermediaryCard isEditing={false} hideActions={true} />
|
|
58
|
-
</ResponsiveGrid>
|
|
59
|
-
</div>
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<EditableFormCard
|
|
64
|
-
title="Wire Transfer Configuration"
|
|
65
|
-
description="Configure wire transfer settings and participants"
|
|
66
|
-
variant="subtle"
|
|
67
|
-
className={className}
|
|
68
|
-
isEditing={isEditing}
|
|
69
|
-
onToggleEdit={onToggleEdit}
|
|
70
|
-
hideActions={hideActions}
|
|
71
|
-
editContent={editContent}
|
|
72
|
-
viewContent={viewContent}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Container } from "@/components/ui/container"
|
|
3
|
-
import { Stack } from "@/components/ui/stack"
|
|
4
|
-
import { Button } from "@/components/ui/button"
|
|
5
|
-
import { Breadcrumb, type BreadcrumbItem } from "@/components/ui/breadcrumb"
|
|
6
|
-
import { ResponsiveGrid } from "@/components/ui/responsive-grid"
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
interface PageAction {
|
|
10
|
-
label: string
|
|
11
|
-
onClick: () => void
|
|
12
|
-
variant?: "default" | "outline" | "secondary"
|
|
13
|
-
icon?: React.ReactNode
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface ListPageProps {
|
|
17
|
-
title: string
|
|
18
|
-
description?: string
|
|
19
|
-
breadcrumbs?: BreadcrumbItem[]
|
|
20
|
-
actions?: PageAction[]
|
|
21
|
-
children: React.ReactNode
|
|
22
|
-
maxWidth?: "sm" | "md" | "lg" | "xl" | "full"
|
|
23
|
-
loading?: boolean
|
|
24
|
-
emptyState?: React.ReactNode
|
|
25
|
-
className?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const ListPage = React.forwardRef<HTMLDivElement, ListPageProps>(
|
|
29
|
-
({
|
|
30
|
-
title,
|
|
31
|
-
description,
|
|
32
|
-
breadcrumbs,
|
|
33
|
-
actions,
|
|
34
|
-
children,
|
|
35
|
-
maxWidth = "xl",
|
|
36
|
-
loading = false,
|
|
37
|
-
emptyState,
|
|
38
|
-
className
|
|
39
|
-
}, ref) => {
|
|
40
|
-
const hasData = React.Children.count(children) > 0
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<div ref={ref} className={cn("min-h-screen bg-gradient-subtle", className)}>
|
|
44
|
-
<Container size={maxWidth}>
|
|
45
|
-
<Stack spacing="lg">
|
|
46
|
-
{/* Breadcrumbs */}
|
|
47
|
-
{breadcrumbs && breadcrumbs.length > 0 && (
|
|
48
|
-
<Breadcrumb items={breadcrumbs} />
|
|
49
|
-
)}
|
|
50
|
-
|
|
51
|
-
{/* Page Header */}
|
|
52
|
-
<div className="flex items-start justify-between">
|
|
53
|
-
<Stack spacing="sm">
|
|
54
|
-
<h1 className="text-3xl font-bold text-foreground">{title}</h1>
|
|
55
|
-
{description && (
|
|
56
|
-
<p className="text-muted-foreground max-w-2xl">{description}</p>
|
|
57
|
-
)}
|
|
58
|
-
</Stack>
|
|
59
|
-
|
|
60
|
-
{actions && actions.length > 0 && (
|
|
61
|
-
<Stack direction="horizontal" spacing="sm">
|
|
62
|
-
{actions.map((action, index) => (
|
|
63
|
-
<Button
|
|
64
|
-
key={index}
|
|
65
|
-
variant={action.variant || "default"}
|
|
66
|
-
onClick={action.onClick}
|
|
67
|
-
>
|
|
68
|
-
{action.icon}
|
|
69
|
-
{action.label}
|
|
70
|
-
</Button>
|
|
71
|
-
))}
|
|
72
|
-
</Stack>
|
|
73
|
-
)}
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
{/* Content */}
|
|
77
|
-
{loading ? (
|
|
78
|
-
<div className="flex items-center justify-center py-12">
|
|
79
|
-
<div className="animate-pulse text-muted-foreground">Loading...</div>
|
|
80
|
-
</div>
|
|
81
|
-
) : hasData ? (
|
|
82
|
-
<ResponsiveGrid type="cards" gap="lg">
|
|
83
|
-
{children}
|
|
84
|
-
</ResponsiveGrid>
|
|
85
|
-
) : emptyState ? (
|
|
86
|
-
<div className="flex items-center justify-center py-12">
|
|
87
|
-
{emptyState}
|
|
88
|
-
</div>
|
|
89
|
-
) : (
|
|
90
|
-
<div className="flex items-center justify-center py-12">
|
|
91
|
-
<div className="text-center">
|
|
92
|
-
<p className="text-muted-foreground">No items found</p>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
)}
|
|
96
|
-
</Stack>
|
|
97
|
-
</Container>
|
|
98
|
-
</div>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
ListPage.displayName = "ListPage"
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { FormCard } from "@/components/ui/form-card"
|
|
2
|
-
import { InfoField } from "@/components/ui/info-field"
|
|
3
|
-
import { Button } from "@/components/ui/button"
|
|
4
|
-
import { JsonViewer } from "@/components/ui/json-viewer"
|
|
5
|
-
|
|
6
|
-
interface ACHDetails {
|
|
7
|
-
type: string
|
|
8
|
-
originatorName: string
|
|
9
|
-
originatorAccountNumber: string
|
|
10
|
-
receiverName: string
|
|
11
|
-
receiverAccountNumber: string
|
|
12
|
-
receiverRoutingNumber: string
|
|
13
|
-
amount: number
|
|
14
|
-
secCode: string
|
|
15
|
-
companyEntryDescription: string
|
|
16
|
-
companyDiscretionaryData?: string
|
|
17
|
-
individualIdNumber?: string
|
|
18
|
-
individualName?: string
|
|
19
|
-
traceNumber: string
|
|
20
|
-
raw?: any
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface ACHDetailsSectionProps {
|
|
24
|
-
data: ACHDetails
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const ACHDetailsSection = ({ data }: ACHDetailsSectionProps) => {
|
|
28
|
-
const formatCurrency = (value: number) => {
|
|
29
|
-
return new Intl.NumberFormat('en-US', {
|
|
30
|
-
style: 'currency',
|
|
31
|
-
currency: 'USD',
|
|
32
|
-
minimumFractionDigits: 2
|
|
33
|
-
}).format(value)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<FormCard title="ACH Transfer Details">
|
|
38
|
-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4">
|
|
39
|
-
<InfoField label="Type" value={data.type} layout="horizontal" />
|
|
40
|
-
<InfoField label="Originator Name" value={data.originatorName} layout="horizontal" />
|
|
41
|
-
<InfoField
|
|
42
|
-
label="Originator Account Number"
|
|
43
|
-
value={
|
|
44
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
45
|
-
{data.originatorAccountNumber}
|
|
46
|
-
</Button>
|
|
47
|
-
}
|
|
48
|
-
layout="horizontal"
|
|
49
|
-
/>
|
|
50
|
-
<InfoField label="Receiver Name" value={data.receiverName} layout="horizontal" />
|
|
51
|
-
<InfoField
|
|
52
|
-
label="Receiver Account Number"
|
|
53
|
-
value={
|
|
54
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
55
|
-
{data.receiverAccountNumber}
|
|
56
|
-
</Button>
|
|
57
|
-
}
|
|
58
|
-
layout="horizontal"
|
|
59
|
-
/>
|
|
60
|
-
<InfoField
|
|
61
|
-
label="Receiver Routing Number"
|
|
62
|
-
value={
|
|
63
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
64
|
-
{data.receiverRoutingNumber}
|
|
65
|
-
</Button>
|
|
66
|
-
}
|
|
67
|
-
layout="horizontal"
|
|
68
|
-
/>
|
|
69
|
-
<InfoField label="Amount" value={formatCurrency(data.amount)} layout="horizontal" />
|
|
70
|
-
<InfoField label="SEC Code" value={data.secCode} layout="horizontal" />
|
|
71
|
-
<InfoField label="Company Entry Description" value={data.companyEntryDescription} layout="horizontal" />
|
|
72
|
-
{data.companyDiscretionaryData && (
|
|
73
|
-
<InfoField label="Company Discretionary Data" value={data.companyDiscretionaryData} layout="horizontal" />
|
|
74
|
-
)}
|
|
75
|
-
{data.individualIdNumber && (
|
|
76
|
-
<InfoField label="Individual ID Number" value={data.individualIdNumber} layout="horizontal" />
|
|
77
|
-
)}
|
|
78
|
-
{data.individualName && (
|
|
79
|
-
<InfoField label="Individual Name" value={data.individualName} layout="horizontal" />
|
|
80
|
-
)}
|
|
81
|
-
<InfoField label="Trace Number" value={data.traceNumber} layout="horizontal" />
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
{/* Raw JSON - Full Width */}
|
|
85
|
-
{data.raw && (
|
|
86
|
-
<div className="mt-6 pt-6 border-t border-border">
|
|
87
|
-
<InfoField
|
|
88
|
-
label="Raw"
|
|
89
|
-
value={<JsonViewer data={data.raw} className="mt-2" compact={true} />}
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
)}
|
|
93
|
-
</FormCard>
|
|
94
|
-
)
|
|
95
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { FormCard } from "@/components/ui/form-card"
|
|
2
|
-
import { InfoField } from "@/components/ui/info-field"
|
|
3
|
-
import { Button } from "@/components/ui/button"
|
|
4
|
-
import { JsonViewer } from "@/components/ui/json-viewer"
|
|
5
|
-
|
|
6
|
-
interface WireDetails {
|
|
7
|
-
type: string
|
|
8
|
-
originatorName: string
|
|
9
|
-
originatorAccountNumber: string
|
|
10
|
-
originatorAddress: string
|
|
11
|
-
beneficiaryName: string
|
|
12
|
-
beneficiaryAccountNumber: string
|
|
13
|
-
beneficiaryAddress: string
|
|
14
|
-
beneficiaryFIName: string
|
|
15
|
-
beneficiaryFIRoutingNumber: string
|
|
16
|
-
beneficiaryFIAddress: string
|
|
17
|
-
originatorFIName: string
|
|
18
|
-
originatorFIRoutingNumber: string
|
|
19
|
-
originatorFIAddress: string
|
|
20
|
-
intermediaryFIName?: string
|
|
21
|
-
intermediaryFIRoutingNumber?: string
|
|
22
|
-
intermediaryFIAddress?: string
|
|
23
|
-
raw?: any
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface WireDetailsSectionProps {
|
|
27
|
-
data: WireDetails
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const WireDetailsSection = ({ data }: WireDetailsSectionProps) => {
|
|
31
|
-
return (
|
|
32
|
-
<FormCard title="Wire Transfer Details">
|
|
33
|
-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4">
|
|
34
|
-
<InfoField label="Type" value={data.type} layout="horizontal" />
|
|
35
|
-
<InfoField label="Originator Name" value={data.originatorName} layout="horizontal" />
|
|
36
|
-
<InfoField
|
|
37
|
-
label="Originator Account Number"
|
|
38
|
-
value={
|
|
39
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
40
|
-
{data.originatorAccountNumber}
|
|
41
|
-
</Button>
|
|
42
|
-
}
|
|
43
|
-
layout="horizontal"
|
|
44
|
-
/>
|
|
45
|
-
<InfoField label="Originator Address" value={data.originatorAddress} layout="horizontal" />
|
|
46
|
-
<InfoField label="Beneficiary Name" value={data.beneficiaryName} layout="horizontal" />
|
|
47
|
-
<InfoField
|
|
48
|
-
label="Beneficiary Account Number"
|
|
49
|
-
value={
|
|
50
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
51
|
-
{data.beneficiaryAccountNumber}
|
|
52
|
-
</Button>
|
|
53
|
-
}
|
|
54
|
-
layout="horizontal"
|
|
55
|
-
/>
|
|
56
|
-
<InfoField label="Beneficiary Address" value={data.beneficiaryAddress} layout="horizontal" />
|
|
57
|
-
<InfoField label="Beneficiary FI Name" value={data.beneficiaryFIName} layout="horizontal" />
|
|
58
|
-
<InfoField
|
|
59
|
-
label="Beneficiary FI Routing Number"
|
|
60
|
-
value={
|
|
61
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
62
|
-
{data.beneficiaryFIRoutingNumber}
|
|
63
|
-
</Button>
|
|
64
|
-
}
|
|
65
|
-
layout="horizontal"
|
|
66
|
-
/>
|
|
67
|
-
<InfoField label="Beneficiary FI Address" value={data.beneficiaryFIAddress} layout="horizontal" />
|
|
68
|
-
<InfoField label="Originator FI Name" value={data.originatorFIName} layout="horizontal" />
|
|
69
|
-
<InfoField
|
|
70
|
-
label="Originator FI Routing Number"
|
|
71
|
-
value={
|
|
72
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
73
|
-
{data.originatorFIRoutingNumber}
|
|
74
|
-
</Button>
|
|
75
|
-
}
|
|
76
|
-
layout="horizontal"
|
|
77
|
-
/>
|
|
78
|
-
<InfoField label="Originator FI Address" value={data.originatorFIAddress} layout="horizontal" />
|
|
79
|
-
|
|
80
|
-
{data.intermediaryFIName && (
|
|
81
|
-
<>
|
|
82
|
-
<InfoField label="Intermediary FI Name" value={data.intermediaryFIName} layout="horizontal" />
|
|
83
|
-
{data.intermediaryFIRoutingNumber && (
|
|
84
|
-
<InfoField
|
|
85
|
-
label="Intermediary FI Routing Number"
|
|
86
|
-
value={
|
|
87
|
-
<Button variant="link" className="h-auto p-0 text-sm">
|
|
88
|
-
{data.intermediaryFIRoutingNumber}
|
|
89
|
-
</Button>
|
|
90
|
-
}
|
|
91
|
-
layout="horizontal"
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
{data.intermediaryFIAddress && (
|
|
95
|
-
<InfoField label="Intermediary FI Address" value={data.intermediaryFIAddress} layout="horizontal" />
|
|
96
|
-
)}
|
|
97
|
-
</>
|
|
98
|
-
)}
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
{/* Raw JSON - Full Width */}
|
|
102
|
-
{data.raw && (
|
|
103
|
-
<div className="mt-6 pt-6 border-t border-border">
|
|
104
|
-
<InfoField
|
|
105
|
-
label="Raw"
|
|
106
|
-
value={<JsonViewer data={data.raw} className="mt-2" compact={true} />}
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
)}
|
|
110
|
-
</FormCard>
|
|
111
|
-
)
|
|
112
|
-
}
|