braid-ui 1.0.99 → 1.0.101

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,64 +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 { ACHBasicInfoCard } from "./ACHBasicInfoCard"
5
- import { ACHBankCard } from "./ACHBankCard"
6
- import { BankAddressCard } from "./BankAddressCard"
7
- import { defaultACHTransfer } from "@/lib/mock-data/banking-data"
8
- import { type ACHTransfer } from "@/lib/schemas/banking-schemas"
9
-
10
- interface ACHTransferSectionProps {
11
- isEditing?: boolean
12
- onToggleEdit?: () => void
13
- className?: string
14
- hideActions?: boolean
15
- }
16
-
17
- export const ACHTransferSection = ({ isEditing, onToggleEdit, className, hideActions }: ACHTransferSectionProps) => {
18
- const [achData, setAchData] = useState<ACHTransfer>(defaultACHTransfer)
19
-
20
- const handleDataChange = (newData: ACHTransfer) => {
21
- setAchData(newData)
22
- }
23
-
24
- const content = (
25
- <div className="space-y-6">
26
- <div className="flex items-center gap-2">
27
- <span className="text-sm font-medium text-muted-foreground">Transfer Type:</span>
28
- <span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-secondary text-secondary-foreground">
29
- ACH
30
- </span>
31
- </div>
32
-
33
- <ResponsiveGrid type="forms" gap="md" editMode={isEditing}>
34
- <ACHBasicInfoCard
35
- data={achData}
36
- onDataChange={handleDataChange}
37
- isEditing={isEditing}
38
- hideActions={true}
39
- />
40
- <ACHBankCard
41
- data={achData}
42
- onDataChange={handleDataChange}
43
- isEditing={isEditing}
44
- hideActions={true}
45
- />
46
- <BankAddressCard isEditing={isEditing} hideActions={true} />
47
- </ResponsiveGrid>
48
- </div>
49
- )
50
-
51
- return (
52
- <EditableFormCard
53
- title="ACH Transfer Configuration"
54
- description="Configure ACH transfer settings and bank details"
55
- variant="subtle"
56
- className={className}
57
- isEditing={isEditing}
58
- onToggleEdit={onToggleEdit}
59
- hideActions={hideActions}
60
- editContent={content}
61
- viewContent={content}
62
- />
63
- )
64
- }
@@ -1,94 +0,0 @@
1
- import { EnhancedInput } from "@/components/ui/enhanced-input"
2
- import { EnhancedSelect } from "@/components/ui/enhanced-select"
3
- import { COUNTRY_OPTIONS, ADDRESS_TYPE_OPTIONS } from "@/lib/constants"
4
-
5
- interface AddressFormProps {
6
- title: string
7
- description: string
8
- fieldPrefix?: string
9
- showAddressType?: boolean
10
- addressTypeOptions?: Array<{ value: string; label: string }>
11
- fieldOverrides?: {
12
- state?: Partial<React.ComponentProps<typeof EnhancedInput>>
13
- city?: Partial<React.ComponentProps<typeof EnhancedInput>>
14
- streetAddress?: Partial<React.ComponentProps<typeof EnhancedInput>>
15
- postalCode?: Partial<React.ComponentProps<typeof EnhancedInput>>
16
- apartment?: Partial<React.ComponentProps<typeof EnhancedInput>>
17
- }
18
- showApartment?: boolean
19
- }
20
-
21
- export const AddressForm = ({
22
- title,
23
- description,
24
- fieldPrefix = "",
25
- showAddressType = true,
26
- addressTypeOptions = ADDRESS_TYPE_OPTIONS.FI,
27
- fieldOverrides = {},
28
- showApartment = false
29
- }: AddressFormProps) => {
30
- const addressTypeLabel = fieldPrefix ? `${fieldPrefix} Address Type` : "Address Type"
31
-
32
- return (
33
- <div className="space-y-6">
34
- <div className="border-b border-border pb-4">
35
- <h2 className="text-lg font-semibold text-foreground">{title}</h2>
36
- <p className="text-sm text-muted-foreground">{description}</p>
37
- </div>
38
-
39
- <div className="space-y-6">
40
- <div className="grid grid-cols-1 gap-6">
41
- <EnhancedInput
42
- label="State"
43
- placeholder="Enter state"
44
- hint="State or province"
45
- {...fieldOverrides.state}
46
- />
47
-
48
- <EnhancedInput
49
- label="City"
50
- placeholder="Enter city"
51
- required
52
- {...fieldOverrides.city}
53
- />
54
-
55
- <EnhancedInput
56
- label="Street Address"
57
- placeholder="Enter street address"
58
- hint={fieldPrefix ? `${fieldPrefix} street address` : "Primary street address"}
59
- {...fieldOverrides.streetAddress}
60
- />
61
-
62
- {showApartment && (
63
- <EnhancedInput
64
- label="Apt, Building etc"
65
- placeholder="Additional address information"
66
- hint="Additional address information"
67
- {...fieldOverrides.apartment}
68
- />
69
- )}
70
-
71
- <EnhancedInput
72
- label="Postal Code"
73
- placeholder="12345"
74
- {...fieldOverrides.postalCode}
75
- />
76
-
77
- <EnhancedSelect
78
- label="Country Code"
79
- placeholder="Select country"
80
- options={COUNTRY_OPTIONS}
81
- />
82
-
83
- {showAddressType && (
84
- <EnhancedSelect
85
- label={addressTypeLabel}
86
- placeholder="Select type"
87
- options={addressTypeOptions}
88
- />
89
- )}
90
- </div>
91
- </div>
92
- </div>
93
- )
94
- }
@@ -1,95 +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 { useFormWithEditState } from "@/hooks/useFormWithEditState"
6
- import { addressSchema, type Address } from "@/lib/schemas"
7
- import { defaultBankAddress } from "@/lib/mock-data/banking-data"
8
-
9
- interface BankAddressCardProps {
10
- data?: Partial<Address>
11
- onDataChange?: (data: Address) => void
12
- isEditing?: boolean
13
- onToggleEdit?: () => void
14
- className?: string
15
- hideActions?: boolean
16
- }
17
-
18
- export const BankAddressCard = ({
19
- data,
20
- onDataChange,
21
- isEditing,
22
- onToggleEdit,
23
- className,
24
- hideActions
25
- }: BankAddressCardProps) => {
26
- const form = useFormWithEditState<Address>({
27
- schema: addressSchema,
28
- defaultValues: { ...defaultBankAddress, ...data },
29
- initialEditing: isEditing,
30
- onToggleEdit,
31
- onSave: onDataChange,
32
- })
33
-
34
- const editContent = (
35
- <FormProvider form={form}>
36
- <div className="space-y-6">
37
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
38
- <FormInput
39
- name="streetAddress"
40
- label="Street Address"
41
- placeholder="Enter street address"
42
- required
43
- />
44
-
45
- <FormInput
46
- name="city"
47
- label="City"
48
- placeholder="Enter city"
49
- required
50
- />
51
-
52
- <FormInput
53
- name="state"
54
- label="State"
55
- placeholder="Enter state"
56
- required
57
- />
58
-
59
- <FormInput
60
- name="postalCode"
61
- label="Postal Code"
62
- placeholder="Enter postal code"
63
- required
64
- />
65
- </div>
66
- </div>
67
- </FormProvider>
68
- )
69
-
70
- const formValues = form.watch()
71
- const viewContent = (
72
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
73
- <InfoField label="Street Address" value={formValues?.streetAddress} layout="horizontal" />
74
- <InfoField label="City" value={formValues?.city} layout="horizontal" />
75
- <InfoField label="State" value={formValues?.state} layout="horizontal" />
76
- <InfoField label="Postal Code" value={formValues?.postalCode} layout="horizontal" />
77
- </div>
78
- )
79
-
80
- return (
81
- <EditableFormCard
82
- title="Bank Address"
83
- description="Physical address of the banking institution"
84
- variant="subtle"
85
- className={className}
86
- isEditing={form.isEditing}
87
- onToggleEdit={form.handleToggleEdit}
88
- onSave={form.handleSave}
89
- onCancel={form.handleCancel}
90
- hideActions={hideActions}
91
- editContent={editContent}
92
- viewContent={viewContent}
93
- />
94
- )
95
- }
@@ -1,46 +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 BankingDetailsCardProps {
7
- isEditing?: boolean
8
- onToggleEdit?: () => void
9
- className?: string
10
- }
11
-
12
- export const BankingDetailsCard = ({ isEditing, onToggleEdit, className }: BankingDetailsCardProps) => {
13
- return (
14
- <FormCard
15
- title="Banking Details"
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-3">
37
- <div className="grid grid-cols-1 gap-2">
38
- <InfoField label="Primary Bank" value="JPMorgan Chase" layout="horizontal" />
39
- <InfoField label="Account Number" value="****-****-****-1234" layout="horizontal" />
40
- <InfoField label="Routing Number" value="021000021" layout="horizontal" />
41
- <InfoField label="Account Type" value="Business Checking" layout="horizontal" />
42
- </div>
43
- </div>
44
- </FormCard>
45
- )
46
- }
@@ -1,103 +0,0 @@
1
- import { EditableFormCard } from "@/components/ui/editable-form-card"
2
- import { InfoField } from "@/components/ui/info-field"
3
- import { EnhancedInput } from "@/components/ui/enhanced-input"
4
- import { EnhancedSelect } from "@/components/ui/enhanced-select"
5
- import { CounterpartyTypeBadge } from "@/components/ui/counterparty-type-badge"
6
- import { StatusBadge } from "@/components/ui/status-badge"
7
- import { useState } from "react"
8
-
9
- interface BasicInfoCardProps {
10
- isEditing?: boolean
11
- onToggleEdit?: () => void
12
- className?: string
13
- hideActions?: boolean
14
- }
15
-
16
- export const BasicInfoCard = ({ isEditing, onToggleEdit, className, hideActions }: BasicInfoCardProps) => {
17
- const [name, setName] = useState("John wire hot")
18
- const [status, setStatus] = useState("ACTIVE")
19
-
20
- const editContent = (
21
- <div className="space-y-6">
22
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
23
- <EnhancedInput
24
- label="Name"
25
- value={name}
26
- onChange={(e) => setName(e.target.value)}
27
- placeholder="Enter counterparty name"
28
- />
29
-
30
- <EnhancedSelect
31
- label="Status"
32
- value={status}
33
- onValueChange={setStatus}
34
- placeholder="Select status"
35
- options={[
36
- { value: "ACTIVE", label: "Active" },
37
- { value: "INACTIVE", label: "Inactive" },
38
- { value: "PENDING", label: "Pending" },
39
- { value: "SUSPENDED", label: "Suspended" }
40
- ]}
41
- />
42
- </div>
43
-
44
- <div className="grid grid-cols-2 gap-4 pt-4 border-t border-border">
45
- <InfoField label="ID" value="5000541" layout="horizontal" />
46
- <InfoField label="Counterparty Type" value={<CounterpartyTypeBadge type="BUSINESS" />} layout="horizontal" />
47
- <InfoField label="ID Number" value="•••••••" layout="horizontal" />
48
- <InfoField label="ID Type" value="SSN" layout="horizontal" />
49
- <InfoField label="Date of Birth" value="1985-8-20" layout="horizontal" />
50
- <InfoField label="Created By" value="admin" layout="horizontal" />
51
- <InfoField label="Created At" value="2025-07-14" layout="horizontal" />
52
- <InfoField label="Updated By" value="admin" layout="horizontal" />
53
- <InfoField label="Updated At" value="2025-07-14" layout="horizontal" />
54
- </div>
55
-
56
- <div className="pt-3 border-t border-border">
57
- <h4 className="text-sm font-medium text-foreground mb-2">OFAC Details</h4>
58
- <div className="grid grid-cols-2 gap-4">
59
- <InfoField label="Last OFAC date" value="2025-07-14" layout="horizontal" />
60
- <InfoField label="Last OFAC status" value="Verified" layout="horizontal" />
61
- </div>
62
- </div>
63
- </div>
64
- )
65
-
66
- const viewContent = (
67
- <div className="space-y-4">
68
- <div className="grid grid-cols-2 gap-4">
69
- <InfoField label="ID" value="5000541" layout="horizontal" />
70
- <InfoField label="Name" value={name} layout="horizontal" />
71
- <InfoField label="Counterparty Type" value={<CounterpartyTypeBadge type="BUSINESS" />} layout="horizontal" />
72
- <InfoField label="Status" value={<StatusBadge status={status as "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED"} />} layout="horizontal" />
73
- <InfoField label="ID Number" value="•••••••" layout="horizontal" />
74
- <InfoField label="ID Type" value="SSN" layout="horizontal" />
75
- <InfoField label="Date of Birth" value="1985-8-20" layout="horizontal" />
76
- <InfoField label="Created By" value="admin" layout="horizontal" />
77
- <InfoField label="Created At" value="2025-07-14" layout="horizontal" />
78
- <InfoField label="Updated By" value="admin" layout="horizontal" />
79
- <InfoField label="Updated At" value="2025-07-14" layout="horizontal" />
80
- </div>
81
-
82
- <div className="pt-3 border-t border-border">
83
- <h4 className="text-sm font-medium text-foreground mb-2">OFAC Details</h4>
84
- <div className="grid grid-cols-2 gap-4">
85
- <InfoField label="Last OFAC date" value="2025-07-14" layout="horizontal" />
86
- <InfoField label="Last OFAC status" value="Verified" layout="horizontal" />
87
- </div>
88
- </div>
89
- </div>
90
- )
91
-
92
- return (
93
- <EditableFormCard
94
- title="Basic Info"
95
- className={className}
96
- isEditing={isEditing}
97
- onToggleEdit={onToggleEdit}
98
- hideActions={hideActions}
99
- editContent={editContent}
100
- viewContent={viewContent}
101
- />
102
- )
103
- }
@@ -1,34 +0,0 @@
1
- import { EditableFormCard } from "@/components/ui/editable-form-card"
2
- import { ResponsiveGrid } from "@/components/ui/responsive-grid"
3
- import { CounterpartyProfileCard } from "./CounterpartyProfileCard"
4
- import { CounterpartyRecordsCard } from "./CounterpartyRecordsCard"
5
-
6
- interface BasicInfoSectionProps {
7
- isEditing?: boolean
8
- onToggleEdit?: () => void
9
- className?: string
10
- hideActions?: boolean
11
- }
12
-
13
- export const BasicInfoSection = ({ isEditing, onToggleEdit, className, hideActions }: BasicInfoSectionProps) => {
14
- const content = (
15
- <ResponsiveGrid type="forms" gap="md" editMode={isEditing}>
16
- <CounterpartyProfileCard isEditing={isEditing} hideActions={true} />
17
- <CounterpartyRecordsCard isEditing={isEditing} hideActions={true} />
18
- </ResponsiveGrid>
19
- )
20
-
21
- return (
22
- <EditableFormCard
23
- title="Basic Information"
24
- description="Core counterparty details and records"
25
- variant="subtle"
26
- className={className}
27
- isEditing={isEditing}
28
- onToggleEdit={onToggleEdit}
29
- hideActions={hideActions}
30
- editContent={content}
31
- viewContent={content}
32
- />
33
- )
34
- }
@@ -1,19 +0,0 @@
1
- import { AddressForm } from "./AddressForm"
2
-
3
- export const BeneficiaryAddress = () => {
4
- return (
5
- <AddressForm
6
- title="Beneficiary Address Details"
7
- description="Address information for the beneficiary"
8
- showAddressType={false}
9
- showApartment={true}
10
- fieldOverrides={{
11
- apartment: {
12
- placeholder: "this is a very long address that will be truncated",
13
- value: "this is a very long address that will be truncated"
14
- },
15
- postalCode: { error: "Invalid postal code format" }
16
- }}
17
- />
18
- )
19
- }
@@ -1,41 +0,0 @@
1
- import { EditableFormCard } from "@/components/ui/editable-form-card"
2
- import { DataGrid } from "@/components/ui/data-grid"
3
- import { BeneficiaryDomesticWire } from "@/components/form-sections/BeneficiaryDomesticWire"
4
-
5
- interface BeneficiaryCardProps {
6
- isEditing?: boolean
7
- onToggleEdit?: () => void
8
- className?: string
9
- hideActions?: boolean
10
- }
11
-
12
- export const BeneficiaryCard = ({ isEditing, onToggleEdit, className, hideActions }: BeneficiaryCardProps) => {
13
- const viewData = [
14
- {
15
- title: "Account Information",
16
- items: [
17
- { label: "Account Number", value: "123456789012" }
18
- ]
19
- },
20
- {
21
- title: "Beneficiary Address",
22
- items: [
23
- { value: "123 Main Street, Apartment 4B, New York, NY 10001, United States" }
24
- ],
25
- className: "pt-3 border-t border-border"
26
- }
27
- ]
28
-
29
- return (
30
- <EditableFormCard
31
- title="Beneficiary"
32
- variant="subtle"
33
- className={className}
34
- isEditing={isEditing}
35
- onToggleEdit={onToggleEdit}
36
- hideActions={hideActions}
37
- editContent={<BeneficiaryDomesticWire />}
38
- viewContent={<DataGrid data={viewData} columns={1} />}
39
- />
40
- )
41
- }
@@ -1,23 +0,0 @@
1
- import { EnhancedInput } from "@/components/ui/enhanced-input"
2
- import { BeneficiaryAddress } from "./BeneficiaryAddress"
3
-
4
- export const BeneficiaryDomesticWire = () => {
5
- return (
6
- <div className="space-y-6">
7
- <div className="border-b border-border pb-4">
8
- <h3 className="text-lg font-semibold text-foreground">Beneficiary Information</h3>
9
- <p className="text-sm text-muted-foreground">Account and address details for the beneficiary</p>
10
- </div>
11
-
12
- <div className="space-y-6">
13
- <EnhancedInput
14
- label="Beneficiary Account Number"
15
- placeholder="Enter beneficiary account number"
16
- hint="Account number for the beneficiary"
17
- />
18
-
19
- <BeneficiaryAddress />
20
- </div>
21
- </div>
22
- )
23
- }
@@ -1,131 +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 { useFormWithEditState } from "@/hooks/useFormWithEditState"
7
- import { businessProfileSchema, type BusinessProfile } from "@/lib/schemas"
8
- import { defaultBusinessProfile } from "@/lib/mock-data/business-data"
9
-
10
- interface BusinessProfileCardProps {
11
- data?: Partial<BusinessProfile>
12
- onDataChange?: (data: BusinessProfile) => void
13
- isEditing?: boolean
14
- onToggleEdit?: () => void
15
- className?: string
16
- hideActions?: boolean
17
- }
18
-
19
- export const BusinessProfileCard = ({
20
- data,
21
- onDataChange,
22
- isEditing,
23
- onToggleEdit,
24
- className,
25
- hideActions
26
- }: BusinessProfileCardProps) => {
27
- const form = useFormWithEditState<BusinessProfile>({
28
- schema: businessProfileSchema,
29
- defaultValues: { ...defaultBusinessProfile, ...data },
30
- initialEditing: isEditing,
31
- onToggleEdit,
32
- onSave: onDataChange,
33
- })
34
-
35
- const editContent = (
36
- <FormProvider form={form}>
37
- <div className="space-y-6">
38
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
39
- <FormInput
40
- name="legalName"
41
- label="Legal Name"
42
- placeholder="Enter legal business name"
43
- required
44
- />
45
-
46
- <FormInput
47
- name="dbaName"
48
- label="DBA Name"
49
- placeholder="Enter doing business as name"
50
- />
51
-
52
- <FormSelect
53
- name="businessType"
54
- label="Business Type"
55
- placeholder="Select business type"
56
- options={[
57
- { value: "corporation", label: "Corporation" },
58
- { value: "llc", label: "LLC" },
59
- { value: "partnership", label: "Partnership" },
60
- { value: "sole_proprietorship", label: "Sole Proprietorship" }
61
- ]}
62
- />
63
-
64
- <FormInput
65
- name="taxId"
66
- label="Tax ID"
67
- placeholder="Enter tax identification number"
68
- required
69
- />
70
-
71
- <FormInput
72
- name="businessPhone"
73
- label="Business Phone"
74
- placeholder="Enter business phone number"
75
- required
76
- />
77
-
78
- <FormInput
79
- name="businessEmail"
80
- label="Business Email"
81
- type="email"
82
- placeholder="Enter business email"
83
- required
84
- />
85
-
86
- <FormInput
87
- name="website"
88
- label="Website"
89
- placeholder="Enter website URL"
90
- />
91
- </div>
92
- </div>
93
- </FormProvider>
94
- )
95
-
96
- const formValues = form.watch()
97
- const viewContent = (
98
- <div className="space-y-4">
99
- <div className="grid grid-cols-2 gap-4">
100
- <InfoField label="Legal Name" value={formValues?.legalName} layout="horizontal" />
101
- <InfoField label="DBA Name" value={formValues?.dbaName} layout="horizontal" />
102
- </div>
103
- <div className="grid grid-cols-2 gap-4">
104
- <InfoField label="Business Type" value={formValues?.businessType} layout="horizontal" />
105
- <InfoField label="Tax ID" value={formValues?.taxId} layout="horizontal" />
106
- </div>
107
- <div className="grid grid-cols-2 gap-4">
108
- <InfoField label="Business Phone" value={formValues?.businessPhone} layout="horizontal" />
109
- <InfoField label="Business Email" value={formValues?.businessEmail} layout="horizontal" />
110
- </div>
111
- <div className="grid grid-cols-2 gap-4">
112
- <InfoField label="Website" value={formValues?.website} layout="horizontal" />
113
- </div>
114
- </div>
115
- )
116
-
117
- return (
118
- <EditableFormCard
119
- title="Business Profile"
120
- variant="subtle"
121
- className={className}
122
- isEditing={form.isEditing}
123
- onToggleEdit={form.handleToggleEdit}
124
- onSave={form.handleSave}
125
- onCancel={form.handleCancel}
126
- hideActions={hideActions}
127
- editContent={editContent}
128
- viewContent={viewContent}
129
- />
130
- )
131
- }