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,94 +0,0 @@
1
- import * as React from "react"
2
- import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
3
- import { Badge } from "@/components/ui/badge"
4
- import { InfoField } from "@/components/ui/info-field"
5
- import { DataGrid } from "@/components/ui/data-grid"
6
- import { cn } from "@/lib/utils"
7
- import { Building, CreditCard, Globe } from "lucide-react"
8
-
9
- interface AccountCardProps {
10
- account: {
11
- id: string
12
- name: string
13
- number: string
14
- type: "checking" | "savings" | "credit" | "investment"
15
- status: "active" | "inactive" | "pending" | "suspended"
16
- balance?: string
17
- currency?: string
18
- institution?: string
19
- routingNumber?: string
20
- country?: string
21
- }
22
- showBalance?: boolean
23
- className?: string
24
- }
25
-
26
- const typeIcons = {
27
- checking: CreditCard,
28
- savings: Building,
29
- credit: CreditCard,
30
- investment: Globe
31
- }
32
-
33
- const typeLabels = {
34
- checking: "Checking",
35
- savings: "Savings",
36
- credit: "Credit",
37
- investment: "Investment"
38
- }
39
-
40
- export const AccountCard = React.forwardRef<HTMLDivElement, AccountCardProps>(
41
- ({ account, showBalance = true, className }, ref) => {
42
- const TypeIcon = typeIcons[account.type]
43
-
44
- const accountData = [
45
- { label: "Account Number", value: account.number },
46
- { label: "Type", value: typeLabels[account.type] },
47
- ...(account.routingNumber ? [{ label: "Routing Number", value: account.routingNumber }] : []),
48
- ...(account.institution ? [{ label: "Institution", value: account.institution }] : []),
49
- ...(account.country ? [{ label: "Country", value: account.country }] : [])
50
- ]
51
-
52
- return (
53
- <Card ref={ref} className={cn("", className)}>
54
- <CardHeader>
55
- <div className="flex items-center justify-between">
56
- <div className="flex items-center space-x-3">
57
- <div className="flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10">
58
- <TypeIcon className="w-5 h-5 text-primary" />
59
- </div>
60
- <div>
61
- <CardTitle className="text-lg">{account.name}</CardTitle>
62
- <div className="flex items-center space-x-2 mt-1">
63
- <Badge variant={account.status as any}>{account.status}</Badge>
64
- <span className="text-sm text-muted-foreground">
65
- {typeLabels[account.type]}
66
- </span>
67
- </div>
68
- </div>
69
- </div>
70
-
71
- {showBalance && account.balance && (
72
- <div className="text-right">
73
- <div className="text-2xl font-bold text-foreground">
74
- {account.balance}
75
- </div>
76
- {account.currency && (
77
- <div className="text-sm text-muted-foreground">
78
- {account.currency}
79
- </div>
80
- )}
81
- </div>
82
- )}
83
- </div>
84
- </CardHeader>
85
-
86
- <CardContent>
87
- <DataGrid data={accountData} columns={2} gap="sm" />
88
- </CardContent>
89
- </Card>
90
- )
91
- }
92
- )
93
-
94
- AccountCard.displayName = "AccountCard"
@@ -1,75 +0,0 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
- import { cn } from "@/lib/utils"
4
-
5
- const badgeVariants = cva(
6
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
7
- {
8
- variants: {
9
- variant: {
10
- default:
11
- "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
12
- secondary:
13
- "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
- destructive:
15
- "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
16
- outline: "text-foreground",
17
- success:
18
- "border-transparent bg-success text-success-foreground hover:bg-success/80",
19
- warning:
20
- "border-transparent bg-warning text-warning-foreground hover:bg-warning/80",
21
- // Business type specific variants
22
- business:
23
- "border-blue-200 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300",
24
- individual:
25
- "border-green-200 bg-green-50 text-green-700 hover:bg-green-100 dark:border-green-800 dark:bg-green-950 dark:text-green-300",
26
- government:
27
- "border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 dark:border-purple-800 dark:bg-purple-950 dark:text-purple-300",
28
- nonprofit:
29
- "border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-300",
30
- // Business entity type variants
31
- corporation:
32
- "border-slate-200 bg-slate-50 text-slate-700 hover:bg-slate-100 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300",
33
- llc:
34
- "border-teal-200 bg-teal-50 text-teal-700 hover:bg-teal-100 dark:border-teal-800 dark:bg-teal-950 dark:text-teal-300",
35
- partnership:
36
- "border-indigo-200 bg-indigo-50 text-indigo-700 hover:bg-indigo-100 dark:border-indigo-800 dark:bg-indigo-950 dark:text-indigo-300",
37
- sole_proprietorship:
38
- "border-amber-200 bg-amber-50 text-amber-700 hover:bg-amber-100 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300",
39
- // Status variants
40
- active:
41
- "border-green-200 bg-green-50 text-green-700 hover:bg-green-100 dark:border-green-800 dark:bg-green-950 dark:text-green-300",
42
- inactive:
43
- "border-red-200 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-800 dark:bg-red-950 dark:text-red-300",
44
- pending:
45
- "border-yellow-200 bg-yellow-50 text-yellow-700 hover:bg-yellow-100 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-300",
46
- suspended:
47
- "border-gray-200 bg-gray-50 text-gray-700 hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300",
48
- // Alert type subtle variants
49
- "alert-ofac":
50
- "border-red-200 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-800 dark:bg-red-950 dark:text-red-300 font-medium",
51
- "alert-dual":
52
- "border-emerald-200 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 dark:border-emerald-800 dark:bg-emerald-950 dark:text-emerald-300 font-medium",
53
- "alert-monitoring":
54
- "border-amber-200 bg-amber-50 text-amber-700 hover:bg-amber-100 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300 font-medium",
55
- "alert-error":
56
- "border-rose-200 bg-rose-50 text-rose-700 hover:bg-rose-100 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-300 font-medium",
57
- },
58
- },
59
- defaultVariants: {
60
- variant: "default",
61
- },
62
- }
63
- )
64
-
65
- export interface BadgeProps
66
- extends React.HTMLAttributes<HTMLDivElement>,
67
- VariantProps<typeof badgeVariants> {}
68
-
69
- function Badge({ className, variant, ...props }: BadgeProps) {
70
- return (
71
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
72
- )
73
- }
74
-
75
- export { Badge, badgeVariants }
@@ -1,78 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "@/lib/utils"
3
- import { ChevronRight, Home } from "lucide-react"
4
- import { NavLink } from "react-router-dom"
5
-
6
- export interface BreadcrumbItem {
7
- label: string
8
- href?: string
9
- icon?: React.ReactNode
10
- }
11
-
12
- interface BreadcrumbProps {
13
- items: BreadcrumbItem[]
14
- showHome?: boolean
15
- separator?: React.ReactNode
16
- className?: string
17
- }
18
-
19
- export const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(
20
- ({ items, showHome = true, separator, className }, ref) => {
21
- const defaultSeparator = <ChevronRight className="w-4 h-4 text-muted-foreground" />
22
- const separatorElement = separator || defaultSeparator
23
-
24
- return (
25
- <nav
26
- ref={ref}
27
- aria-label="Breadcrumb"
28
- className={cn("flex items-center space-x-1 text-sm", className)}
29
- >
30
- {showHome && (
31
- <>
32
- <NavLink
33
- to="/"
34
- className="flex items-center text-muted-foreground hover:text-foreground transition-colors"
35
- >
36
- <Home className="w-4 h-4" />
37
- </NavLink>
38
- {items.length > 0 && (
39
- <span className="text-muted-foreground">{separatorElement}</span>
40
- )}
41
- </>
42
- )}
43
-
44
- {items.map((item, index) => {
45
- const isLast = index === items.length - 1
46
-
47
- return (
48
- <React.Fragment key={index}>
49
- {item.href && !isLast ? (
50
- <NavLink
51
- to={item.href}
52
- className="flex items-center text-muted-foreground hover:text-foreground transition-colors"
53
- >
54
- {item.icon && <span className="mr-1">{item.icon}</span>}
55
- {item.label}
56
- </NavLink>
57
- ) : (
58
- <span className={cn(
59
- "flex items-center",
60
- isLast ? "text-foreground font-medium" : "text-muted-foreground"
61
- )}>
62
- {item.icon && <span className="mr-1">{item.icon}</span>}
63
- {item.label}
64
- </span>
65
- )}
66
-
67
- {!isLast && (
68
- <span className="text-muted-foreground">{separatorElement}</span>
69
- )}
70
- </React.Fragment>
71
- )
72
- })}
73
- </nav>
74
- )
75
- }
76
- )
77
-
78
- Breadcrumb.displayName = "Breadcrumb"
@@ -1,42 +0,0 @@
1
- import { Badge } from "@/components/ui/badge"
2
- import { Building, Briefcase, Users, User } from "lucide-react"
3
-
4
- interface BusinessTypeBadgeProps {
5
- type: "corporation" | "llc" | "partnership" | "sole_proprietorship"
6
- className?: string
7
- }
8
-
9
- const typeConfig = {
10
- corporation: {
11
- variant: "corporation" as const,
12
- label: "Corporation",
13
- icon: Building
14
- },
15
- llc: {
16
- variant: "llc" as const,
17
- label: "LLC",
18
- icon: Briefcase
19
- },
20
- partnership: {
21
- variant: "partnership" as const,
22
- label: "Partnership",
23
- icon: Users
24
- },
25
- sole_proprietorship: {
26
- variant: "sole_proprietorship" as const,
27
- label: "Sole Proprietorship",
28
- icon: User
29
- }
30
- }
31
-
32
- export const BusinessTypeBadge = ({ type, className }: BusinessTypeBadgeProps) => {
33
- const config = typeConfig[type]
34
- const Icon = config.icon
35
-
36
- return (
37
- <Badge variant={config.variant} className={className}>
38
- <Icon className="w-3 h-3 mr-1" />
39
- {config.label}
40
- </Badge>
41
- )
42
- }
@@ -1,56 +0,0 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
-
5
- import { cn } from "@/lib/utils"
6
-
7
- const buttonVariants = cva(
8
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
- destructive:
14
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15
- outline:
16
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17
- secondary:
18
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19
- ghost: "hover:bg-accent hover:text-accent-foreground",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- size: {
23
- default: "h-10 px-4 py-2",
24
- sm: "h-9 rounded-md px-3",
25
- lg: "h-11 rounded-md px-8",
26
- icon: "h-10 w-10",
27
- },
28
- },
29
- defaultVariants: {
30
- variant: "default",
31
- size: "default",
32
- },
33
- }
34
- )
35
-
36
- export interface ButtonProps
37
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38
- VariantProps<typeof buttonVariants> {
39
- asChild?: boolean
40
- }
41
-
42
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43
- ({ className, variant, size, asChild = false, ...props }, ref) => {
44
- const Comp = asChild ? Slot : "button"
45
- return (
46
- <Comp
47
- className={cn(buttonVariants({ variant, size, className }))}
48
- ref={ref}
49
- {...props}
50
- />
51
- )
52
- }
53
- )
54
- Button.displayName = "Button"
55
-
56
- export { Button, buttonVariants }
@@ -1,49 +0,0 @@
1
- import * as React from "react"
2
- import { DayPicker } from "react-day-picker"
3
-
4
- import { cn } from "@/lib/utils"
5
- import { buttonVariants } from "@/components/ui/button"
6
-
7
- export type CalendarProps = React.ComponentProps<typeof DayPicker>
8
-
9
- function Calendar({
10
- className,
11
- classNames,
12
- showOutsideDays = true,
13
- ...props
14
- }: CalendarProps) {
15
- return (
16
- <DayPicker
17
- showOutsideDays={showOutsideDays}
18
- className={cn("p-3 pointer-events-auto", className)}
19
- classNames={{
20
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
21
- month: "space-y-4",
22
- caption: "flex justify-center pt-1 relative items-center",
23
- caption_label: "text-sm font-medium",
24
- nav: "space-x-1 flex items-center",
25
- button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
26
- button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
27
- month_grid: "w-full border-collapse space-y-1",
28
- weekdays: "flex",
29
- weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
30
- week: "flex w-full mt-2",
31
- day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
32
- day_button: cn(
33
- buttonVariants({ variant: "ghost" }),
34
- "h-9 w-9 p-0 font-normal"
35
- ),
36
- selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
37
- today: "bg-accent text-accent-foreground",
38
- outside: "text-muted-foreground opacity-50",
39
- disabled: "text-muted-foreground opacity-50",
40
- hidden: "invisible",
41
- ...classNames,
42
- }}
43
- {...props}
44
- />
45
- )
46
- }
47
- Calendar.displayName = "Calendar"
48
-
49
- export { Calendar }
@@ -1,223 +0,0 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- const cardVariants = cva(
7
- "rounded-lg border bg-card text-card-foreground transition-all duration-200",
8
- {
9
- variants: {
10
- variant: {
11
- default: "shadow-sm",
12
- elevated: "shadow-md hover:shadow-lg",
13
- outlined: "border-2 shadow-none",
14
- ghost: "border-transparent shadow-none bg-transparent",
15
- subtle: "border-border/75 shadow-none"
16
- },
17
- size: {
18
- sm: "p-3",
19
- md: "p-4",
20
- lg: "p-6",
21
- none: "p-0"
22
- },
23
- fullHeight: {
24
- true: "h-full flex flex-col",
25
- false: ""
26
- },
27
- interactive: {
28
- true: "cursor-pointer hover:shadow-md hover:scale-[1.02]",
29
- false: ""
30
- }
31
- },
32
- defaultVariants: {
33
- variant: "default",
34
- size: "none",
35
- fullHeight: false,
36
- interactive: false
37
- }
38
- }
39
- )
40
-
41
- export interface CardProps
42
- extends React.HTMLAttributes<HTMLDivElement>,
43
- VariantProps<typeof cardVariants> {}
44
-
45
- const Card = React.forwardRef<HTMLDivElement, CardProps>(
46
- ({ className, variant, size, fullHeight, interactive, ...props }, ref) => (
47
- <div
48
- ref={ref}
49
- className={cn(cardVariants({ variant, size, fullHeight, interactive }), className)}
50
- {...props}
51
- />
52
- )
53
- )
54
- Card.displayName = "Card"
55
-
56
- const cardHeaderVariants = cva(
57
- "flex flex-col space-y-1.5",
58
- {
59
- variants: {
60
- size: {
61
- sm: "px-3 pt-3 pb-2",
62
- md: "px-4 pt-4 pb-3",
63
- lg: "px-6 pt-6 pb-4"
64
- },
65
- align: {
66
- start: "items-start",
67
- center: "items-center",
68
- end: "items-end"
69
- },
70
- direction: {
71
- row: "flex-row justify-between items-center space-y-0 space-x-4",
72
- column: "flex-col space-y-1.5"
73
- }
74
- },
75
- defaultVariants: {
76
- size: "lg",
77
- align: "start",
78
- direction: "column"
79
- }
80
- }
81
- )
82
-
83
- export interface CardHeaderProps
84
- extends React.HTMLAttributes<HTMLDivElement>,
85
- VariantProps<typeof cardHeaderVariants> {}
86
-
87
- const CardHeader = React.forwardRef<HTMLDivElement, CardHeaderProps>(
88
- ({ className, size, align, direction, ...props }, ref) => (
89
- <div
90
- ref={ref}
91
- className={cn(cardHeaderVariants({ size, align, direction }), className)}
92
- {...props}
93
- />
94
- )
95
- )
96
- CardHeader.displayName = "CardHeader"
97
-
98
- const cardTitleVariants = cva(
99
- "font-semibold leading-none tracking-tight",
100
- {
101
- variants: {
102
- size: {
103
- sm: "text-base",
104
- md: "text-lg",
105
- lg: "text-xl"
106
- }
107
- },
108
- defaultVariants: {
109
- size: "md"
110
- }
111
- }
112
- )
113
-
114
- export interface CardTitleProps
115
- extends React.HTMLAttributes<HTMLHeadingElement>,
116
- VariantProps<typeof cardTitleVariants> {}
117
-
118
- const CardTitle = React.forwardRef<HTMLParagraphElement, CardTitleProps>(
119
- ({ className, size, ...props }, ref) => (
120
- <h3
121
- ref={ref}
122
- className={cn(cardTitleVariants({ size }), className)}
123
- {...props}
124
- />
125
- )
126
- )
127
- CardTitle.displayName = "CardTitle"
128
-
129
- const CardDescription = React.forwardRef<
130
- HTMLParagraphElement,
131
- React.HTMLAttributes<HTMLParagraphElement>
132
- >(({ className, ...props }, ref) => (
133
- <p
134
- ref={ref}
135
- className={cn("text-sm text-muted-foreground", className)}
136
- {...props}
137
- />
138
- ))
139
- CardDescription.displayName = "CardDescription"
140
-
141
- const cardContentVariants = cva(
142
- "",
143
- {
144
- variants: {
145
- size: {
146
- sm: "px-3 pb-2",
147
- md: "px-4 pb-3",
148
- lg: "px-6 pb-4"
149
- },
150
- fullHeight: {
151
- true: "flex-1",
152
- false: ""
153
- }
154
- },
155
- defaultVariants: {
156
- size: "lg",
157
- fullHeight: false
158
- }
159
- }
160
- )
161
-
162
- export interface CardContentProps
163
- extends React.HTMLAttributes<HTMLDivElement>,
164
- VariantProps<typeof cardContentVariants> {}
165
-
166
- const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(
167
- ({ className, size, fullHeight, ...props }, ref) => (
168
- <div
169
- ref={ref}
170
- className={cn(cardContentVariants({ size, fullHeight }), className)}
171
- {...props}
172
- />
173
- )
174
- )
175
- CardContent.displayName = "CardContent"
176
-
177
- const cardFooterVariants = cva(
178
- "flex items-center pt-0",
179
- {
180
- variants: {
181
- size: {
182
- sm: "p-3 pt-0",
183
- md: "p-4 pt-0",
184
- lg: "p-6 pt-0"
185
- },
186
- justify: {
187
- start: "justify-start",
188
- center: "justify-center",
189
- end: "justify-end",
190
- between: "justify-between"
191
- }
192
- },
193
- defaultVariants: {
194
- size: "lg",
195
- justify: "start"
196
- }
197
- }
198
- )
199
-
200
- export interface CardFooterProps
201
- extends React.HTMLAttributes<HTMLDivElement>,
202
- VariantProps<typeof cardFooterVariants> {}
203
-
204
- const CardFooter = React.forwardRef<HTMLDivElement, CardFooterProps>(
205
- ({ className, size, justify, ...props }, ref) => (
206
- <div
207
- ref={ref}
208
- className={cn(cardFooterVariants({ size, justify }), className)}
209
- {...props}
210
- />
211
- )
212
- )
213
- CardFooter.displayName = "CardFooter"
214
-
215
- export {
216
- Card,
217
- CardHeader,
218
- CardFooter,
219
- CardTitle,
220
- CardDescription,
221
- CardContent,
222
- cardVariants
223
- }
@@ -1,45 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "@/lib/utils"
3
-
4
- interface ContainerProps {
5
- children: React.ReactNode
6
- size?: "sm" | "md" | "lg" | "xl" | "full"
7
- padding?: "none" | "sm" | "md" | "lg"
8
- center?: boolean
9
- className?: string
10
- }
11
-
12
- const sizeClasses = {
13
- sm: "max-w-2xl",
14
- md: "max-w-4xl",
15
- lg: "max-w-6xl",
16
- xl: "max-w-7xl",
17
- full: "max-w-full"
18
- }
19
-
20
- const paddingClasses = {
21
- none: "",
22
- sm: "px-4 py-4",
23
- md: "px-6 py-6",
24
- lg: "px-8 py-8"
25
- }
26
-
27
- export const Container = React.forwardRef<HTMLDivElement, ContainerProps>(
28
- ({ children, size = "lg", padding = "md", center = true, className }, ref) => {
29
- return (
30
- <div
31
- ref={ref}
32
- className={cn(
33
- sizeClasses[size],
34
- paddingClasses[padding],
35
- center && "mx-auto",
36
- className
37
- )}
38
- >
39
- {children}
40
- </div>
41
- )
42
- }
43
- )
44
-
45
- Container.displayName = "Container"