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.
Files changed (145) hide show
  1. package/README.md +327 -44
  2. package/dist/css/braid-ui-variables.css +88 -0
  3. package/dist/css/braid-ui.css +4702 -0
  4. package/dist/css/braid-ui.min.css +1 -0
  5. package/dist/index.cjs +4 -0
  6. package/dist/index.cjs.map +1 -0
  7. package/dist/index.d.cts +2027 -0
  8. package/dist/index.d.ts +2027 -0
  9. package/dist/index.js +4 -0
  10. package/dist/index.js.map +1 -0
  11. package/package.json +115 -55
  12. package/src/styles-only.css +121 -0
  13. package/src/{index.css → styles.css} +4 -10
  14. package/components.json +0 -20
  15. package/eslint.config.js +0 -29
  16. package/index.html +0 -24
  17. package/postcss.config.js +0 -6
  18. package/public/favicon.ico +0 -0
  19. package/public/placeholder.svg +0 -1
  20. package/public/robots.txt +0 -14
  21. package/src/App.css +0 -42
  22. package/src/App.tsx +0 -94
  23. package/src/components/MainLayout.tsx +0 -15
  24. package/src/components/alerts/AlertDocuments.tsx +0 -320
  25. package/src/components/alerts/AlertNotes.tsx +0 -185
  26. package/src/components/alerts/AlertTimeline.tsx +0 -79
  27. package/src/components/alerts/ContextSection.tsx +0 -155
  28. package/src/components/app-sidebar.tsx +0 -341
  29. package/src/components/form-sections/ACHBankCard.tsx +0 -78
  30. package/src/components/form-sections/ACHBasicInfoCard.tsx +0 -100
  31. package/src/components/form-sections/ACHTransferSection.tsx +0 -64
  32. package/src/components/form-sections/AddressForm.tsx +0 -94
  33. package/src/components/form-sections/BankAddressCard.tsx +0 -95
  34. package/src/components/form-sections/BankingDetailsCard.tsx +0 -46
  35. package/src/components/form-sections/BasicInfoCard.tsx +0 -103
  36. package/src/components/form-sections/BasicInfoSection.tsx +0 -34
  37. package/src/components/form-sections/BeneficiaryAddress.tsx +0 -19
  38. package/src/components/form-sections/BeneficiaryCard.tsx +0 -41
  39. package/src/components/form-sections/BeneficiaryDomesticWire.tsx +0 -23
  40. package/src/components/form-sections/BusinessProfileCard.tsx +0 -131
  41. package/src/components/form-sections/BusinessStatusCard.tsx +0 -53
  42. package/src/components/form-sections/ContactInfoCard.tsx +0 -63
  43. package/src/components/form-sections/CounterpartyBasicInfo.tsx +0 -101
  44. package/src/components/form-sections/CounterpartyProfileCard.tsx +0 -104
  45. package/src/components/form-sections/CounterpartyRecordsCard.tsx +0 -41
  46. package/src/components/form-sections/IntermediaryCard.tsx +0 -77
  47. package/src/components/form-sections/IntermediaryFI.tsx +0 -41
  48. package/src/components/form-sections/IntermediaryFIAddress.tsx +0 -14
  49. package/src/components/form-sections/OriginatorCard.tsx +0 -49
  50. package/src/components/form-sections/OriginatorFI.tsx +0 -42
  51. package/src/components/form-sections/OriginatorFIAddress.tsx +0 -14
  52. package/src/components/form-sections/PaymentInformationSection.tsx +0 -163
  53. package/src/components/form-sections/ReceiverCard.tsx +0 -94
  54. package/src/components/form-sections/WireTransferSection.tsx +0 -75
  55. package/src/components/layouts/list-page.tsx +0 -103
  56. package/src/components/transaction/ACHDetailsSection.tsx +0 -95
  57. package/src/components/transaction/WireDetailsSection.tsx +0 -112
  58. package/src/components/ui/account-card.tsx +0 -94
  59. package/src/components/ui/badge.tsx +0 -75
  60. package/src/components/ui/breadcrumb.tsx +0 -78
  61. package/src/components/ui/business-type-badge.tsx +0 -42
  62. package/src/components/ui/button.tsx +0 -56
  63. package/src/components/ui/calendar.tsx +0 -49
  64. package/src/components/ui/card.tsx +0 -223
  65. package/src/components/ui/container.tsx +0 -45
  66. package/src/components/ui/counterparty-type-badge.tsx +0 -53
  67. package/src/components/ui/data-grid.tsx +0 -99
  68. package/src/components/ui/data-table.tsx +0 -152
  69. package/src/components/ui/detail-page-layout.tsx +0 -83
  70. package/src/components/ui/dialog.tsx +0 -120
  71. package/src/components/ui/dropdown-menu.tsx +0 -82
  72. package/src/components/ui/editable-form-card.tsx +0 -106
  73. package/src/components/ui/editable-info-field.tsx +0 -67
  74. package/src/components/ui/enhanced-input.tsx +0 -78
  75. package/src/components/ui/enhanced-select.tsx +0 -101
  76. package/src/components/ui/enhanced-textarea.tsx +0 -64
  77. package/src/components/ui/entity-card.tsx +0 -140
  78. package/src/components/ui/form-card.tsx +0 -40
  79. package/src/components/ui/form-field.tsx +0 -50
  80. package/src/components/ui/form-input.tsx +0 -29
  81. package/src/components/ui/form-provider.tsx +0 -18
  82. package/src/components/ui/form-section.tsx +0 -66
  83. package/src/components/ui/form-select.tsx +0 -35
  84. package/src/components/ui/info-field.tsx +0 -36
  85. package/src/components/ui/json-viewer.tsx +0 -146
  86. package/src/components/ui/label.tsx +0 -24
  87. package/src/components/ui/metric-card.tsx +0 -80
  88. package/src/components/ui/page-layout.tsx +0 -183
  89. package/src/components/ui/popover.tsx +0 -29
  90. package/src/components/ui/responsive-grid.tsx +0 -46
  91. package/src/components/ui/separator.tsx +0 -31
  92. package/src/components/ui/sheet.tsx +0 -140
  93. package/src/components/ui/sidebar.tsx +0 -775
  94. package/src/components/ui/sonner.tsx +0 -29
  95. package/src/components/ui/stack.tsx +0 -77
  96. package/src/components/ui/status-badge.tsx +0 -68
  97. package/src/components/ui/tabs.tsx +0 -52
  98. package/src/components/ui/toast.tsx +0 -127
  99. package/src/components/ui/toaster.tsx +0 -33
  100. package/src/components/ui/tooltip.tsx +0 -28
  101. package/src/components/ui/use-toast.ts +0 -3
  102. package/src/components/ui-kit/dashboard-demo.tsx +0 -156
  103. package/src/components/ui-kit/pattern-library.tsx +0 -248
  104. package/src/components/ui-kit/showcase.tsx +0 -211
  105. package/src/hooks/use-mobile.tsx +0 -19
  106. package/src/hooks/use-toast.ts +0 -191
  107. package/src/hooks/useEditState.ts +0 -70
  108. package/src/hooks/useFormWithEditState.ts +0 -115
  109. package/src/lib/constants.ts +0 -25
  110. package/src/lib/mock-data/alert-data.ts +0 -275
  111. package/src/lib/mock-data/banking-data.ts +0 -72
  112. package/src/lib/mock-data/business-data.ts +0 -71
  113. package/src/lib/mock-data/counterparty-data.ts +0 -70
  114. package/src/lib/mock-data/index.ts +0 -5
  115. package/src/lib/mock-data/transaction-data.ts +0 -283
  116. package/src/lib/mock-data/wire-data.ts +0 -103
  117. package/src/lib/mock-data.tsx +0 -180
  118. package/src/lib/schemas/banking-schemas.ts +0 -30
  119. package/src/lib/schemas/business-schemas.ts +0 -36
  120. package/src/lib/schemas/counterparty-schemas.ts +0 -43
  121. package/src/lib/schemas/index.ts +0 -5
  122. package/src/lib/schemas/wire-schemas.ts +0 -44
  123. package/src/lib/utils.ts +0 -6
  124. package/src/main.tsx +0 -10
  125. package/src/pages/Cases.tsx +0 -16
  126. package/src/pages/Dashboard.tsx +0 -16
  127. package/src/pages/NotFound.tsx +0 -27
  128. package/src/pages/TransactionHistory.tsx +0 -532
  129. package/src/pages/UIKit.tsx +0 -51
  130. package/src/pages/alerts/AlertDetail.tsx +0 -193
  131. package/src/pages/alerts/Alerts.tsx +0 -373
  132. package/src/pages/business/Business.tsx +0 -48
  133. package/src/pages/business/Create.tsx +0 -173
  134. package/src/pages/counterparty/Create.tsx +0 -48
  135. package/src/pages/counterparty/DomesticWire.tsx +0 -78
  136. package/src/pages/counterparty/Manage.tsx +0 -79
  137. package/src/pages/transactions/NewTransaction.tsx +0 -527
  138. package/src/pages/transactions/TransactionDetail.tsx +0 -192
  139. package/src/vite-env.d.ts +0 -1
  140. package/tailwind.config.ts +0 -124
  141. package/tsconfig.app.json +0 -30
  142. package/tsconfig.json +0 -19
  143. package/tsconfig.node.json +0 -22
  144. package/vite.config.ts +0 -22
  145. /package/{src/assets/braid-logo.png → dist/braid-logo-343BOQZ2.png} +0 -0
@@ -1,53 +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 { StatusBadge } from "@/components/ui/status-badge"
5
- import { Edit } from "lucide-react"
6
-
7
- interface BusinessStatusCardProps {
8
- isEditing?: boolean
9
- onToggleEdit?: () => void
10
- className?: string
11
- }
12
-
13
- export const BusinessStatusCard = ({ isEditing, onToggleEdit, className }: BusinessStatusCardProps) => {
14
- return (
15
- <FormCard
16
- title="Business Status & Records"
17
- className={className}
18
- headerActions={
19
- <div className="flex items-center gap-2">
20
- {isEditing ? (
21
- <>
22
- <Button variant="outline" size="sm" onClick={onToggleEdit}>
23
- Cancel
24
- </Button>
25
- <Button size="sm" onClick={onToggleEdit}>
26
- Save
27
- </Button>
28
- </>
29
- ) : (
30
- <Button variant="ghost" size="icon" onClick={onToggleEdit} className="text-primary hover:text-primary/80 hover:bg-primary/10">
31
- <Edit className="h-4 w-4" />
32
- </Button>
33
- )}
34
- </div>
35
- }
36
- >
37
- <div className="space-y-4">
38
- <div className="grid grid-cols-2 gap-4">
39
- <InfoField label="Status" value={<StatusBadge status="ACTIVE" />} layout="horizontal" />
40
- <InfoField label="CIP Status" value="NOT_START" layout="horizontal" />
41
- </div>
42
- <div className="grid grid-cols-2 gap-4">
43
- <InfoField label="Created Date" value="2025-08-03" layout="horizontal" />
44
- <InfoField label="Updated Date" value="2025-09-05" layout="horizontal" />
45
- </div>
46
- <div className="grid grid-cols-2 gap-4">
47
- <InfoField label="Last OFAC Date" value="2025-09-05" layout="horizontal" />
48
- <InfoField label="Last OFAC Status" value="View Status" layout="horizontal" className="text-primary cursor-pointer" />
49
- </div>
50
- </div>
51
- </FormCard>
52
- )
53
- }
@@ -1,63 +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 { Edit } from "lucide-react"
5
-
6
- interface ContactInfoCardProps {
7
- isEditing?: boolean
8
- onToggleEdit?: () => void
9
- className?: string
10
- }
11
-
12
- export const ContactInfoCard = ({ isEditing, onToggleEdit, className }: ContactInfoCardProps) => {
13
- return (
14
- <FormCard
15
- title="Contact Information"
16
- className={className}
17
- headerActions={
18
- <div className="flex items-center gap-2">
19
- {isEditing ? (
20
- <>
21
- <Button variant="outline" size="sm" onClick={onToggleEdit}>
22
- Cancel
23
- </Button>
24
- <Button size="sm" onClick={onToggleEdit}>
25
- Save
26
- </Button>
27
- </>
28
- ) : (
29
- <Button variant="ghost" size="icon" onClick={onToggleEdit} className="text-primary hover:text-primary/80 hover:bg-primary/10">
30
- <Edit className="h-4 w-4" />
31
- </Button>
32
- )}
33
- </div>
34
- }
35
- >
36
- <div className="space-y-4">
37
- <h4 className="text-sm font-medium text-muted-foreground">Contact Person</h4>
38
- <div className="grid grid-cols-2 gap-4">
39
- <InfoField label="First Name" value="" layout="horizontal" />
40
- <InfoField label="Last Name" value="" layout="horizontal" />
41
- </div>
42
- <div className="grid grid-cols-2 gap-4">
43
- <InfoField label="Email" value="" layout="horizontal" />
44
- <InfoField label="Phone Number" value="" layout="horizontal" />
45
- </div>
46
-
47
- <h4 className="text-sm font-medium text-muted-foreground mt-6">Mailing Address</h4>
48
- <div className="grid grid-cols-1 gap-3">
49
- <InfoField label="Street Address" value="" layout="horizontal" />
50
- <InfoField label="Apartment, suite, or floor" value="" layout="horizontal" />
51
- </div>
52
- <div className="grid grid-cols-2 gap-4">
53
- <InfoField label="City" value="" layout="horizontal" />
54
- <InfoField label="State" value="Alabama" layout="horizontal" />
55
- </div>
56
- <div className="grid grid-cols-2 gap-4">
57
- <InfoField label="Postal Code" value="" layout="horizontal" />
58
- <InfoField label="Country Code" value="US" layout="horizontal" />
59
- </div>
60
- </div>
61
- </FormCard>
62
- )
63
- }
@@ -1,101 +0,0 @@
1
- import { EnhancedInput } from "@/components/ui/enhanced-input"
2
- import { Label } from "@/components/ui/label"
3
- import { useState } from "react"
4
-
5
- interface CounterpartyBasicInfoProps {
6
- onDataChange?: (data: any) => void
7
- }
8
-
9
- export const CounterpartyBasicInfo = ({ onDataChange }: CounterpartyBasicInfoProps) => {
10
- const [formData, setFormData] = useState({
11
- name: "",
12
- type: "business",
13
- email: "",
14
- phone: "",
15
- productId: "167990"
16
- })
17
-
18
- const handleInputChange = (field: string, value: string) => {
19
- const updatedData = { ...formData, [field]: value }
20
- setFormData(updatedData)
21
- onDataChange?.(updatedData)
22
- }
23
-
24
- const handleTypeChange = (type: string) => {
25
- handleInputChange("type", type)
26
- }
27
-
28
- return (
29
- <div className="space-y-6">
30
- <div className="border-b border-border pb-4">
31
- <h2 className="text-lg font-semibold text-foreground">Basic Information</h2>
32
- <p className="text-sm text-muted-foreground">Enter the basic details for the counterparty</p>
33
- </div>
34
-
35
- <div className="space-y-6">
36
- <EnhancedInput
37
- label="Counterparty Name"
38
- value={formData.name}
39
- onChange={(e) => handleInputChange("name", e.target.value)}
40
- placeholder="Enter counterparty name"
41
- required
42
- />
43
-
44
- <div className="space-y-3">
45
- <Label className="text-sm font-medium">Counterparty Type</Label>
46
- <div className="flex gap-6">
47
- <label className="flex items-center space-x-2 cursor-pointer">
48
- <input
49
- type="radio"
50
- name="counterpartyType"
51
- value="business"
52
- checked={formData.type === "business"}
53
- onChange={() => handleTypeChange("business")}
54
- className="w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
55
- />
56
- <span className="text-sm text-foreground">Business</span>
57
- </label>
58
- <label className="flex items-center space-x-2 cursor-pointer">
59
- <input
60
- type="radio"
61
- name="counterpartyType"
62
- value="individual"
63
- checked={formData.type === "individual"}
64
- onChange={() => handleTypeChange("individual")}
65
- className="w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
66
- />
67
- <span className="text-sm text-foreground">Individual</span>
68
- </label>
69
- </div>
70
- </div>
71
-
72
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
73
- <EnhancedInput
74
- label="Email"
75
- type="email"
76
- value={formData.email}
77
- onChange={(e) => handleInputChange("email", e.target.value)}
78
- placeholder="Enter email address"
79
- required
80
- />
81
-
82
- <EnhancedInput
83
- label="Phone Number"
84
- type="tel"
85
- value={formData.phone}
86
- onChange={(e) => handleInputChange("phone", e.target.value)}
87
- placeholder="Enter phone number"
88
- required
89
- />
90
- </div>
91
-
92
- <EnhancedInput
93
- label="Product ID"
94
- value={formData.productId}
95
- readOnly
96
- className="bg-muted"
97
- />
98
- </div>
99
- </div>
100
- )
101
- }
@@ -1,104 +0,0 @@
1
- import { EditableFormCard } from "@/components/ui/editable-form-card"
2
- import { InfoField } from "@/components/ui/info-field"
3
- import { FormProvider } from "@/components/ui/form-provider"
4
- import { FormInput } from "@/components/ui/form-input"
5
- import { FormSelect } from "@/components/ui/form-select"
6
- import { CounterpartyTypeBadge } from "@/components/ui/counterparty-type-badge"
7
- import { StatusBadge } from "@/components/ui/status-badge"
8
- import { useFormWithEditState } from "@/hooks/useFormWithEditState"
9
- import { counterpartyBasicInfoSchema, type CounterpartyBasicInfo } from "@/lib/schemas"
10
- import { defaultCounterpartyBasicInfo } from "@/lib/mock-data/counterparty-data"
11
-
12
- interface CounterpartyProfileCardProps {
13
- data?: Partial<CounterpartyBasicInfo>
14
- onDataChange?: (data: CounterpartyBasicInfo) => void
15
- isEditing?: boolean
16
- onToggleEdit?: () => void
17
- hideActions?: boolean
18
- className?: string
19
- }
20
-
21
- export const CounterpartyProfileCard = ({
22
- data,
23
- onDataChange,
24
- isEditing = false,
25
- onToggleEdit,
26
- hideActions = false,
27
- className
28
- }: CounterpartyProfileCardProps) => {
29
- const form = useFormWithEditState<CounterpartyBasicInfo>({
30
- schema: counterpartyBasicInfoSchema,
31
- defaultValues: { ...defaultCounterpartyBasicInfo, ...data },
32
- initialEditing: isEditing,
33
- onToggleEdit,
34
- onSave: onDataChange,
35
- })
36
-
37
- const editContent = (
38
- <FormProvider form={form}>
39
- <div className="space-y-6">
40
- <FormInput
41
- name="name"
42
- label="Name"
43
- placeholder="Enter counterparty name"
44
- required
45
- />
46
-
47
- <FormSelect
48
- name="type"
49
- label="Counterparty Type"
50
- placeholder="Select counterparty type"
51
- options={[
52
- { value: "BUSINESS", label: "Business" },
53
- { value: "INDIVIDUAL", label: "Individual" },
54
- { value: "GOVERNMENT", label: "Government" },
55
- { value: "NONPROFIT", label: "Non-Profit" }
56
- ]}
57
- />
58
-
59
- <FormSelect
60
- name="status"
61
- label="Status"
62
- placeholder="Select status"
63
- options={[
64
- { value: "ACTIVE", label: "Active" },
65
- { value: "INACTIVE", label: "Inactive" },
66
- { value: "PENDING", label: "Pending" },
67
- { value: "SUSPENDED", label: "Suspended" }
68
- ]}
69
- />
70
-
71
- <FormInput
72
- name="description"
73
- label="Description"
74
- placeholder="Enter description"
75
- />
76
- </div>
77
- </FormProvider>
78
- )
79
-
80
- const formValues = form.watch()
81
- const viewContent = (
82
- <div className="space-y-3">
83
- <InfoField label="Name" value={formValues?.name} layout="horizontal" />
84
- <InfoField label="Counterparty Type" value={<CounterpartyTypeBadge type={formValues?.type as "BUSINESS" | "INDIVIDUAL" | "GOVERNMENT" | "NONPROFIT"} />} layout="horizontal" />
85
- <InfoField label="Status" value={<StatusBadge status={formValues?.status as "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED"} />} layout="horizontal" />
86
- <InfoField label="Description" value={formValues?.description} layout="horizontal" />
87
- </div>
88
- )
89
-
90
- return (
91
- <EditableFormCard
92
- title="Profile Information"
93
- variant="subtle"
94
- className={className}
95
- isEditing={form.isEditing}
96
- onToggleEdit={form.handleToggleEdit}
97
- onSave={form.handleSave}
98
- onCancel={form.handleCancel}
99
- hideActions={hideActions}
100
- editContent={editContent}
101
- viewContent={viewContent}
102
- />
103
- )
104
- }
@@ -1,41 +0,0 @@
1
- import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
2
- import { InfoField } from "@/components/ui/info-field"
3
-
4
- interface CounterpartyRecordsCardProps {
5
- isEditing?: boolean
6
- hideActions?: boolean
7
- className?: string
8
- }
9
-
10
- export const CounterpartyRecordsCard = ({
11
- isEditing = false,
12
- hideActions = false,
13
- className
14
- }: CounterpartyRecordsCardProps) => {
15
- return (
16
- <Card variant="subtle" className={className}>
17
- <CardHeader size="lg">
18
- <CardTitle size="lg">System Records</CardTitle>
19
- </CardHeader>
20
- <CardContent size="lg">
21
- <div className="space-y-4">
22
- <div className="space-y-3">
23
- <InfoField label="ID" value="5000541" layout="horizontal" />
24
- <InfoField label="Created By" value="admin" layout="horizontal" />
25
- <InfoField label="Created At" value="2025-07-14" layout="horizontal" />
26
- <InfoField label="Updated By" value="admin" layout="horizontal" />
27
- <InfoField label="Updated At" value="2025-07-14" layout="horizontal" />
28
- </div>
29
-
30
- <div className="pt-3 border-t border-border">
31
- <h4 className="text-sm font-medium text-foreground mb-2">OFAC Details</h4>
32
- <div className="space-y-3">
33
- <InfoField label="Last OFAC date" value="2025-07-14" layout="horizontal" />
34
- <InfoField label="Last OFAC status" value="Verified" layout="horizontal" />
35
- </div>
36
- </div>
37
- </div>
38
- </CardContent>
39
- </Card>
40
- )
41
- }
@@ -1,77 +0,0 @@
1
- import { EditableFormCard } from "@/components/ui/editable-form-card"
2
- import { InfoField } from "@/components/ui/info-field"
3
- import { FormProvider } from "@/components/ui/form-provider"
4
- import { FormSection } from "@/components/ui/form-section"
5
- import { IntermediaryFI } from "@/components/form-sections/IntermediaryFI"
6
- import { IntermediaryFIAddress } from "@/components/form-sections/IntermediaryFIAddress"
7
- import { useFormWithEditState } from "@/hooks/useFormWithEditState"
8
- import { intermediaryFISchema, type IntermediaryFI as IntermediaryFIType } from "@/lib/schemas"
9
- import { defaultIntermediaryFIInfo } from "@/lib/mock-data/wire-data"
10
-
11
- interface IntermediaryCardProps {
12
- data?: Partial<IntermediaryFIType>
13
- onDataChange?: (data: IntermediaryFIType) => void
14
- isEditing?: boolean
15
- onToggleEdit?: () => void
16
- className?: string
17
- hideActions?: boolean
18
- }
19
-
20
- export const IntermediaryCard = ({
21
- data,
22
- onDataChange,
23
- isEditing,
24
- onToggleEdit,
25
- className,
26
- hideActions
27
- }: IntermediaryCardProps) => {
28
- const form = useFormWithEditState<IntermediaryFIType>({
29
- schema: intermediaryFISchema,
30
- defaultValues: { ...defaultIntermediaryFIInfo, ...data },
31
- initialEditing: isEditing,
32
- onToggleEdit,
33
- onSave: onDataChange,
34
- })
35
-
36
- const editContent = (
37
- <FormProvider form={form}>
38
- <FormSection spacing="lg">
39
- <IntermediaryFI />
40
- <IntermediaryFIAddress />
41
- </FormSection>
42
- </FormProvider>
43
- )
44
-
45
- const formValues = form.watch()
46
- const viewContent = (
47
- <div className="space-y-3">
48
- <div>
49
- <h4 className="text-sm font-medium text-foreground mb-2">Financial Institution</h4>
50
- <div className="space-y-1.5">
51
- <InfoField label="Institution" value={`${formValues?.name} (${formValues?.accountNumber})`} layout="horizontal" />
52
- <InfoField label="Identifier" value={`${formValues?.idType?.toUpperCase()} - ${formValues?.idNumber}`} layout="horizontal" />
53
- </div>
54
- </div>
55
-
56
- <div className="pt-3 border-t border-border">
57
- <h4 className="text-sm font-medium text-foreground mb-2">FI Address</h4>
58
- <InfoField value={formValues?.address ? `${formValues.address.streetAddress}, ${formValues.address.city}, ${formValues.address.postalCode}, ${formValues.address.country}` : ""} />
59
- </div>
60
- </div>
61
- )
62
-
63
- return (
64
- <EditableFormCard
65
- title="Intermediary"
66
- variant="subtle"
67
- className={className}
68
- isEditing={form.isEditing}
69
- onToggleEdit={form.handleToggleEdit}
70
- onSave={form.handleSave}
71
- onCancel={form.handleCancel}
72
- hideActions={hideActions}
73
- editContent={editContent}
74
- viewContent={viewContent}
75
- />
76
- )
77
- }
@@ -1,41 +0,0 @@
1
- import { EnhancedInput } from "@/components/ui/enhanced-input"
2
- import { EnhancedSelect } from "@/components/ui/enhanced-select"
3
- import { FI_ID_TYPE_OPTIONS } from "@/lib/constants"
4
-
5
- export const IntermediaryFI = () => {
6
- return (
7
- <div className="space-y-6">
8
- <div className="border-b border-border pb-4">
9
- <h2 className="text-lg font-semibold text-foreground">Intermediary FI Details</h2>
10
- <p className="text-sm text-muted-foreground">Financial institution details for the intermediary</p>
11
- </div>
12
-
13
- <div className="space-y-6">
14
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
15
- <EnhancedInput
16
- label="Intermediary FI Account Number"
17
- placeholder="Enter account number"
18
- />
19
-
20
- <EnhancedInput
21
- label="Intermediary FI Name"
22
- placeholder="Enter FI name"
23
- hint="Full name of the intermediary financial institution"
24
- />
25
-
26
- <EnhancedSelect
27
- label="Intermediary FI ID Type"
28
- placeholder="Select ID type"
29
- options={FI_ID_TYPE_OPTIONS}
30
- />
31
-
32
- <EnhancedInput
33
- label="Intermediary FI ID Number"
34
- placeholder="Enter ID number"
35
- hint="Financial institution identification number"
36
- />
37
- </div>
38
- </div>
39
- </div>
40
- )
41
- }
@@ -1,14 +0,0 @@
1
- import { AddressForm } from "./AddressForm"
2
-
3
- export const IntermediaryFIAddress = () => {
4
- return (
5
- <AddressForm
6
- title="Intermediary FI Address"
7
- description="Address of the intermediary financial institution"
8
- fieldPrefix="Intermediary FI"
9
- fieldOverrides={{
10
- streetAddress: { hint: "Intermediary financial institution street address" }
11
- }}
12
- />
13
- )
14
- }
@@ -1,49 +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 { OriginatorFI } from "@/components/form-sections/OriginatorFI"
5
- import { OriginatorFIAddress } from "@/components/form-sections/OriginatorFIAddress"
6
-
7
- interface OriginatorCardProps {
8
- isEditing?: boolean
9
- onToggleEdit?: () => void
10
- className?: string
11
- hideActions?: boolean
12
- }
13
-
14
- export const OriginatorCard = ({ isEditing, onToggleEdit, className, hideActions }: OriginatorCardProps) => {
15
- const viewData = [
16
- {
17
- title: "Financial Institution",
18
- items: [
19
- { label: "Institution", value: "JPMorgan Chase Bank (1234567890)" },
20
- { label: "Identifier", value: "ABA - 021000021" }
21
- ]
22
- },
23
- {
24
- title: "FI Address",
25
- items: [
26
- { value: "270 Park Avenue, New York, NY, 10017, United States" }
27
- ],
28
- className: "pt-3 border-t border-border"
29
- }
30
- ]
31
-
32
- return (
33
- <EditableFormCard
34
- title="Originator"
35
- variant="subtle"
36
- className={className}
37
- isEditing={isEditing}
38
- onToggleEdit={onToggleEdit}
39
- hideActions={hideActions}
40
- editContent={
41
- <FormSection spacing="lg">
42
- <OriginatorFI />
43
- <OriginatorFIAddress />
44
- </FormSection>
45
- }
46
- viewContent={<DataGrid data={viewData} columns={1} />}
47
- />
48
- )
49
- }
@@ -1,42 +0,0 @@
1
- import { EnhancedInput } from "@/components/ui/enhanced-input"
2
- import { EnhancedSelect } from "@/components/ui/enhanced-select"
3
- import { FI_ID_TYPE_OPTIONS } from "@/lib/constants"
4
-
5
- export const OriginatorFI = () => {
6
- return (
7
- <div className="space-y-6">
8
- <div className="border-b border-border pb-4">
9
- <h2 className="text-lg font-semibold text-foreground">Originator FI Details</h2>
10
- <p className="text-sm text-muted-foreground">Financial institution details for the originator</p>
11
- </div>
12
-
13
- <div className="space-y-6">
14
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
15
- <EnhancedInput
16
- label="Originator FI Account Number"
17
- placeholder="Enter account number"
18
- required
19
- />
20
-
21
- <EnhancedInput
22
- label="Originator FI Name"
23
- placeholder="Enter FI name"
24
- hint="Full name of the originating financial institution"
25
- />
26
-
27
- <EnhancedSelect
28
- label="Originator FI ID Type"
29
- placeholder="Select ID type"
30
- options={FI_ID_TYPE_OPTIONS}
31
- />
32
-
33
- <EnhancedInput
34
- label="Originator FI ID Number"
35
- placeholder="Enter ID number"
36
- hint="Financial institution identification number"
37
- />
38
- </div>
39
- </div>
40
- </div>
41
- )
42
- }
@@ -1,14 +0,0 @@
1
- import { AddressForm } from "./AddressForm"
2
-
3
- export const OriginatorFIAddress = () => {
4
- return (
5
- <AddressForm
6
- title="Originator FI Address"
7
- description="Address of the originating financial institution"
8
- fieldPrefix="Originator FI"
9
- fieldOverrides={{
10
- streetAddress: { hint: "Originating financial institution street address" }
11
- }}
12
- />
13
- )
14
- }