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,29 +0,0 @@
1
- import { useTheme } from "next-themes"
2
- import { Toaster as Sonner, toast } from "sonner"
3
-
4
- type ToasterProps = React.ComponentProps<typeof Sonner>
5
-
6
- const Toaster = ({ ...props }: ToasterProps) => {
7
- const { theme = "system" } = useTheme()
8
-
9
- return (
10
- <Sonner
11
- theme={theme as ToasterProps["theme"]}
12
- className="toaster group"
13
- toastOptions={{
14
- classNames: {
15
- toast:
16
- "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
17
- description: "group-[.toast]:text-muted-foreground",
18
- actionButton:
19
- "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
20
- cancelButton:
21
- "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
22
- },
23
- }}
24
- {...props}
25
- />
26
- )
27
- }
28
-
29
- export { Toaster, toast }
@@ -1,77 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "@/lib/utils"
3
-
4
- interface StackProps {
5
- children: React.ReactNode
6
- direction?: "vertical" | "horizontal"
7
- spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl"
8
- align?: "start" | "center" | "end" | "stretch"
9
- justify?: "start" | "center" | "end" | "between" | "around"
10
- className?: string
11
- }
12
-
13
- const spacingClasses = {
14
- vertical: {
15
- none: "",
16
- xs: "space-y-1",
17
- sm: "space-y-2",
18
- md: "space-y-4",
19
- lg: "space-y-6",
20
- xl: "space-y-8"
21
- },
22
- horizontal: {
23
- none: "",
24
- xs: "space-x-1",
25
- sm: "space-x-2",
26
- md: "space-x-4",
27
- lg: "space-x-6",
28
- xl: "space-x-8"
29
- }
30
- }
31
-
32
- const alignClasses = {
33
- vertical: {
34
- start: "",
35
- center: "items-center",
36
- end: "items-end",
37
- stretch: "items-stretch"
38
- },
39
- horizontal: {
40
- start: "",
41
- center: "items-center",
42
- end: "items-end",
43
- stretch: "items-stretch"
44
- }
45
- }
46
-
47
- const justifyClasses = {
48
- start: "",
49
- center: "justify-center",
50
- end: "justify-end",
51
- between: "justify-between",
52
- around: "justify-around"
53
- }
54
-
55
- export const Stack = React.forwardRef<HTMLDivElement, StackProps>(
56
- ({ children, direction = "vertical", spacing = "md", align = "start", justify = "start", className }, ref) => {
57
- const isHorizontal = direction === "horizontal"
58
-
59
- return (
60
- <div
61
- ref={ref}
62
- className={cn(
63
- "flex",
64
- isHorizontal ? "flex-row" : "flex-col",
65
- spacingClasses[direction][spacing],
66
- alignClasses[direction][align],
67
- justifyClasses[justify],
68
- className
69
- )}
70
- >
71
- {children}
72
- </div>
73
- )
74
- }
75
- )
76
-
77
- Stack.displayName = "Stack"
@@ -1,68 +0,0 @@
1
- import { Badge } from "@/components/ui/badge"
2
- import { CheckCircle, XCircle, Clock, AlertTriangle } from "lucide-react"
3
-
4
- interface StatusBadgeProps {
5
- status: "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED" | "POSTED" | "FAILED" | "CANCELLED"
6
- className?: string
7
- }
8
-
9
- const statusConfig = {
10
- ACTIVE: {
11
- variant: "active" as const,
12
- label: "Active",
13
- icon: CheckCircle
14
- },
15
- INACTIVE: {
16
- variant: "inactive" as const,
17
- label: "Inactive",
18
- icon: XCircle
19
- },
20
- PENDING: {
21
- variant: "pending" as const,
22
- label: "Pending",
23
- icon: Clock
24
- },
25
- SUSPENDED: {
26
- variant: "suspended" as const,
27
- label: "Suspended",
28
- icon: AlertTriangle
29
- },
30
- POSTED: {
31
- variant: "active" as const,
32
- label: "Posted",
33
- icon: CheckCircle
34
- },
35
- FAILED: {
36
- variant: "inactive" as const,
37
- label: "Failed",
38
- icon: XCircle
39
- },
40
- CANCELLED: {
41
- variant: "secondary" as const,
42
- label: "Cancelled",
43
- icon: XCircle
44
- }
45
- }
46
-
47
- export const StatusBadge = ({ status, className }: StatusBadgeProps) => {
48
- const config = statusConfig[status]
49
-
50
- // Fallback if config is not found
51
- if (!config) {
52
- return (
53
- <Badge variant="secondary" className={className}>
54
- <AlertTriangle className="w-3 h-3 mr-1" />
55
- {status || "Unknown"}
56
- </Badge>
57
- )
58
- }
59
-
60
- const Icon = config.icon
61
-
62
- return (
63
- <Badge variant={config.variant} className={className}>
64
- <Icon className="w-3 h-3 mr-1" />
65
- {config.label}
66
- </Badge>
67
- )
68
- }
@@ -1,52 +0,0 @@
1
- import * as React from "react"
2
- import * as TabsPrimitive from "@radix-ui/react-tabs"
3
- import { cn } from "@/lib/utils"
4
-
5
- const Tabs = TabsPrimitive.Root
6
-
7
- const TabsList = React.forwardRef<
8
- React.ElementRef<typeof TabsPrimitive.List>,
9
- React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
10
- >(({ className, ...props }, ref) => (
11
- <TabsPrimitive.List
12
- ref={ref}
13
- className={cn(
14
- "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
15
- className
16
- )}
17
- {...props}
18
- />
19
- ))
20
- TabsList.displayName = TabsPrimitive.List.displayName
21
-
22
- const TabsTrigger = React.forwardRef<
23
- React.ElementRef<typeof TabsPrimitive.Trigger>,
24
- React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
25
- >(({ className, ...props }, ref) => (
26
- <TabsPrimitive.Trigger
27
- ref={ref}
28
- className={cn(
29
- "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
30
- className
31
- )}
32
- {...props}
33
- />
34
- ))
35
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
36
-
37
- const TabsContent = React.forwardRef<
38
- React.ElementRef<typeof TabsPrimitive.Content>,
39
- React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
40
- >(({ className, ...props }, ref) => (
41
- <TabsPrimitive.Content
42
- ref={ref}
43
- className={cn(
44
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
45
- className
46
- )}
47
- {...props}
48
- />
49
- ))
50
- TabsContent.displayName = TabsPrimitive.Content.displayName
51
-
52
- export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -1,127 +0,0 @@
1
- import * as React from "react"
2
- import * as ToastPrimitives from "@radix-ui/react-toast"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
- import { X } from "lucide-react"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- const ToastProvider = ToastPrimitives.Provider
9
-
10
- const ToastViewport = React.forwardRef<
11
- React.ElementRef<typeof ToastPrimitives.Viewport>,
12
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
13
- >(({ className, ...props }, ref) => (
14
- <ToastPrimitives.Viewport
15
- ref={ref}
16
- className={cn(
17
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
18
- className
19
- )}
20
- {...props}
21
- />
22
- ))
23
- ToastViewport.displayName = ToastPrimitives.Viewport.displayName
24
-
25
- const toastVariants = cva(
26
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
27
- {
28
- variants: {
29
- variant: {
30
- default: "border bg-background text-foreground",
31
- destructive:
32
- "destructive group border-destructive bg-destructive text-destructive-foreground",
33
- },
34
- },
35
- defaultVariants: {
36
- variant: "default",
37
- },
38
- }
39
- )
40
-
41
- const Toast = React.forwardRef<
42
- React.ElementRef<typeof ToastPrimitives.Root>,
43
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
44
- VariantProps<typeof toastVariants>
45
- >(({ className, variant, ...props }, ref) => {
46
- return (
47
- <ToastPrimitives.Root
48
- ref={ref}
49
- className={cn(toastVariants({ variant }), className)}
50
- {...props}
51
- />
52
- )
53
- })
54
- Toast.displayName = ToastPrimitives.Root.displayName
55
-
56
- const ToastAction = React.forwardRef<
57
- React.ElementRef<typeof ToastPrimitives.Action>,
58
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
59
- >(({ className, ...props }, ref) => (
60
- <ToastPrimitives.Action
61
- ref={ref}
62
- className={cn(
63
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
64
- className
65
- )}
66
- {...props}
67
- />
68
- ))
69
- ToastAction.displayName = ToastPrimitives.Action.displayName
70
-
71
- const ToastClose = React.forwardRef<
72
- React.ElementRef<typeof ToastPrimitives.Close>,
73
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
74
- >(({ className, ...props }, ref) => (
75
- <ToastPrimitives.Close
76
- ref={ref}
77
- className={cn(
78
- "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
79
- className
80
- )}
81
- toast-close=""
82
- {...props}
83
- >
84
- <X className="h-4 w-4" />
85
- </ToastPrimitives.Close>
86
- ))
87
- ToastClose.displayName = ToastPrimitives.Close.displayName
88
-
89
- const ToastTitle = React.forwardRef<
90
- React.ElementRef<typeof ToastPrimitives.Title>,
91
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
92
- >(({ className, ...props }, ref) => (
93
- <ToastPrimitives.Title
94
- ref={ref}
95
- className={cn("text-sm font-semibold", className)}
96
- {...props}
97
- />
98
- ))
99
- ToastTitle.displayName = ToastPrimitives.Title.displayName
100
-
101
- const ToastDescription = React.forwardRef<
102
- React.ElementRef<typeof ToastPrimitives.Description>,
103
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
104
- >(({ className, ...props }, ref) => (
105
- <ToastPrimitives.Description
106
- ref={ref}
107
- className={cn("text-sm opacity-90", className)}
108
- {...props}
109
- />
110
- ))
111
- ToastDescription.displayName = ToastPrimitives.Description.displayName
112
-
113
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>
114
-
115
- type ToastActionElement = React.ReactElement<typeof ToastAction>
116
-
117
- export {
118
- type ToastProps,
119
- type ToastActionElement,
120
- ToastProvider,
121
- ToastViewport,
122
- Toast,
123
- ToastTitle,
124
- ToastDescription,
125
- ToastClose,
126
- ToastAction,
127
- }
@@ -1,33 +0,0 @@
1
- import { useToast } from "@/hooks/use-toast"
2
- import {
3
- Toast,
4
- ToastClose,
5
- ToastDescription,
6
- ToastProvider,
7
- ToastTitle,
8
- ToastViewport,
9
- } from "@/components/ui/toast"
10
-
11
- export function Toaster() {
12
- const { toasts } = useToast()
13
-
14
- return (
15
- <ToastProvider>
16
- {toasts.map(function ({ id, title, description, action, ...props }) {
17
- return (
18
- <Toast key={id} {...props}>
19
- <div className="grid gap-1">
20
- {title && <ToastTitle>{title}</ToastTitle>}
21
- {description && (
22
- <ToastDescription>{description}</ToastDescription>
23
- )}
24
- </div>
25
- {action}
26
- <ToastClose />
27
- </Toast>
28
- )
29
- })}
30
- <ToastViewport />
31
- </ToastProvider>
32
- )
33
- }
@@ -1,28 +0,0 @@
1
- import * as React from "react"
2
- import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- const TooltipProvider = TooltipPrimitive.Provider
7
-
8
- const Tooltip = TooltipPrimitive.Root
9
-
10
- const TooltipTrigger = TooltipPrimitive.Trigger
11
-
12
- const TooltipContent = React.forwardRef<
13
- React.ElementRef<typeof TooltipPrimitive.Content>,
14
- React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
15
- >(({ className, sideOffset = 4, ...props }, ref) => (
16
- <TooltipPrimitive.Content
17
- ref={ref}
18
- sideOffset={sideOffset}
19
- className={cn(
20
- "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
21
- className
22
- )}
23
- {...props}
24
- />
25
- ))
26
- TooltipContent.displayName = TooltipPrimitive.Content.displayName
27
-
28
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
@@ -1,3 +0,0 @@
1
- import { useToast, toast } from "@/hooks/use-toast";
2
-
3
- export { useToast, toast };
@@ -1,156 +0,0 @@
1
- import * as React from "react"
2
- import { ListPage } from "@/components/layouts/list-page"
3
- import { MetricCard } from "@/components/ui/metric-card"
4
- import { DataTable, type DataTableColumn } from "@/components/ui/data-table"
5
- import { EntityCard } from "@/components/ui/entity-card"
6
- import { AccountCard } from "@/components/ui/account-card"
7
- import { ResponsiveGrid } from "@/components/ui/responsive-grid"
8
- import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
9
- import { Badge } from "@/components/ui/badge"
10
- import { mockMetrics, mockTableData, mockCounterparties, mockAccounts } from "@/lib/mock-data"
11
- import { Plus, Download, TrendingUp } from "lucide-react"
12
-
13
- const recentTransactions = [
14
- {
15
- id: "1",
16
- recipient: "Acme Corporation",
17
- amount: "$25,000",
18
- type: "Wire Transfer",
19
- status: "completed",
20
- date: "2024-01-20"
21
- },
22
- {
23
- id: "2",
24
- recipient: "Global Tech LLC",
25
- amount: "$12,500",
26
- type: "ACH Transfer",
27
- status: "pending",
28
- date: "2024-01-20"
29
- },
30
- {
31
- id: "3",
32
- recipient: "John Smith",
33
- amount: "$3,200",
34
- type: "Wire Transfer",
35
- status: "completed",
36
- date: "2024-01-19"
37
- }
38
- ]
39
-
40
- const transactionColumns: DataTableColumn[] = [
41
- { key: "recipient", title: "Recipient", sortable: true },
42
- { key: "amount", title: "Amount", sortable: true, align: "right" },
43
- { key: "type", title: "Type", sortable: true },
44
- {
45
- key: "status",
46
- title: "Status",
47
- sortable: true,
48
- render: (value) => <Badge variant={value === "completed" ? "success" : "warning"}>{value}</Badge>
49
- },
50
- { key: "date", title: "Date", sortable: true }
51
- ]
52
-
53
- export function DashboardDemo() {
54
- const [sortBy, setSortBy] = React.useState<string>()
55
- const [sortDirection, setSortDirection] = React.useState<"asc" | "desc">("asc")
56
-
57
- const handleSort = (key: string) => {
58
- if (sortBy === key) {
59
- setSortDirection(sortDirection === "asc" ? "desc" : "asc")
60
- } else {
61
- setSortBy(key)
62
- setSortDirection("asc")
63
- }
64
- }
65
-
66
- const breadcrumbs = [
67
- { label: "UI Kit", href: "/ui-kit" },
68
- { label: "Dashboard Demo" }
69
- ]
70
-
71
- const actions = [
72
- {
73
- label: "Export Report",
74
- onClick: () => console.log("Export"),
75
- variant: "outline" as const,
76
- icon: <Download className="w-4 h-4" />
77
- },
78
- {
79
- label: "New Transfer",
80
- onClick: () => console.log("New Transfer"),
81
- icon: <Plus className="w-4 h-4" />
82
- }
83
- ]
84
-
85
- return (
86
- <ListPage
87
- title="Financial Dashboard"
88
- description="Comprehensive overview of accounts, transfers, and business metrics"
89
- breadcrumbs={breadcrumbs}
90
- actions={actions}
91
- maxWidth="xl"
92
- >
93
- {/* Metrics Overview */}
94
- <ResponsiveGrid type="cards" gap="md">
95
- {mockMetrics.map((metric, index) => (
96
- <MetricCard key={index} {...metric} />
97
- ))}
98
- </ResponsiveGrid>
99
-
100
- {/* Account Cards */}
101
- <Card>
102
- <CardHeader>
103
- <div className="flex items-center justify-between">
104
- <CardTitle>Account Overview</CardTitle>
105
- <Badge variant="secondary" className="flex items-center gap-1">
106
- <TrendingUp className="w-3 h-3" />
107
- 3 Active Accounts
108
- </Badge>
109
- </div>
110
- </CardHeader>
111
- <CardContent>
112
- <ResponsiveGrid type="cards" gap="md">
113
- {mockAccounts.map((account) => (
114
- <AccountCard key={account.id} account={account} />
115
- ))}
116
- </ResponsiveGrid>
117
- </CardContent>
118
- </Card>
119
-
120
- {/* Recent Transactions */}
121
- <Card>
122
- <CardHeader>
123
- <CardTitle>Recent Transactions</CardTitle>
124
- </CardHeader>
125
- <CardContent>
126
- <DataTable
127
- columns={transactionColumns}
128
- data={recentTransactions}
129
- sortBy={sortBy}
130
- sortDirection={sortDirection}
131
- onSort={handleSort}
132
- />
133
- </CardContent>
134
- </Card>
135
-
136
- {/* Recent Counterparties */}
137
- <Card>
138
- <CardHeader>
139
- <CardTitle>Recent Counterparties</CardTitle>
140
- </CardHeader>
141
- <CardContent>
142
- <ResponsiveGrid type="cards" gap="md">
143
- {mockCounterparties.slice(0, 4).map((entity) => (
144
- <EntityCard
145
- key={entity.id}
146
- entity={entity}
147
- onView={(id) => console.log("View", id)}
148
- onEdit={(id) => console.log("Edit", id)}
149
- />
150
- ))}
151
- </ResponsiveGrid>
152
- </CardContent>
153
- </Card>
154
- </ListPage>
155
- )
156
- }