create-bluecopa-react-app 1.0.40 → 1.0.42

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 (102) hide show
  1. package/README.md +16 -14
  2. package/package.json +1 -1
  3. package/templates/latest/.claude/settings.local.json +56 -0
  4. package/templates/latest/.env.example +8 -0
  5. package/templates/latest/Agent.md +598 -775
  6. package/templates/latest/CLAUDE.md +759 -0
  7. package/templates/latest/README.md +17 -8
  8. package/templates/latest/app/app.css +292 -85
  9. package/templates/latest/app/app.tsx +48 -39
  10. package/templates/latest/app/components/bluecopa-logo.tsx +20 -0
  11. package/templates/latest/app/components/charts/bar-chart.tsx +132 -0
  12. package/templates/latest/app/components/charts/base-chart.tsx +149 -0
  13. package/templates/latest/app/components/charts/chart-provider.tsx +71 -0
  14. package/templates/latest/app/components/charts/chart-theme.ts +262 -0
  15. package/templates/latest/app/components/charts/chart-utils.ts +142 -0
  16. package/templates/latest/app/components/charts/donut-chart.tsx +110 -0
  17. package/templates/latest/app/components/charts/index.ts +5 -0
  18. package/templates/latest/app/components/layouts/app-layout.tsx +22 -0
  19. package/templates/latest/app/components/layouts/app-sidebar.tsx +88 -0
  20. package/templates/latest/app/components/layouts/nav-main.tsx +50 -0
  21. package/templates/latest/app/components/layouts/nav-user.tsx +38 -0
  22. package/templates/latest/app/components/layouts/site-header.tsx +93 -0
  23. package/templates/latest/app/components/loading-screen.tsx +41 -0
  24. package/templates/latest/app/components/ui/ag-grid-table.tsx +79 -0
  25. package/templates/latest/app/components/ui/button.tsx +23 -23
  26. package/templates/latest/app/components/ui/card.tsx +20 -20
  27. package/templates/latest/app/components/ui/dropdown-menu.tsx +54 -49
  28. package/templates/latest/app/components/ui/input.tsx +8 -8
  29. package/templates/latest/app/components/ui/label.tsx +8 -8
  30. package/templates/latest/app/components/ui/separator.tsx +7 -7
  31. package/templates/latest/app/components/ui/sheet.tsx +43 -32
  32. package/templates/latest/app/components/ui/sidebar.tsx +240 -235
  33. package/templates/latest/app/components/ui/skeleton.tsx +4 -4
  34. package/templates/latest/app/components/ui/sonner.tsx +6 -9
  35. package/templates/latest/app/components/ui/tabs.tsx +15 -15
  36. package/templates/latest/app/components/ui/tooltip.tsx +18 -12
  37. package/templates/latest/app/constants/index.ts +31 -0
  38. package/templates/latest/app/contexts/app-context.tsx +201 -0
  39. package/templates/latest/app/hooks/use-mobile.ts +13 -12
  40. package/templates/latest/app/main.tsx +1 -1
  41. package/templates/latest/app/pages/dashboard.tsx +246 -0
  42. package/templates/latest/app/pages/payments.tsx +182 -0
  43. package/templates/latest/app/pages/settings.tsx +128 -0
  44. package/templates/latest/app/routes/index.tsx +19 -0
  45. package/templates/latest/app/single-spa.tsx +68 -86
  46. package/templates/latest/app/types/index.ts +37 -0
  47. package/templates/latest/app/utils/ag-grid-datasource.ts +63 -0
  48. package/templates/latest/app/utils/ag-grid-license.ts +12 -0
  49. package/templates/latest/app/utils/ag-grid-theme.ts +9 -0
  50. package/templates/latest/app/utils/component-style.ts +7 -0
  51. package/templates/latest/app/utils/style-drivers.ts +24 -0
  52. package/templates/latest/app/utils/utils.ts +10 -0
  53. package/templates/latest/components.json +3 -3
  54. package/templates/latest/index.html +30 -2
  55. package/templates/latest/package-lock.json +30 -416
  56. package/templates/latest/package.json +8 -18
  57. package/templates/latest/preview/index.html +125 -285
  58. package/templates/latest/public/favicon.svg +1 -0
  59. package/templates/latest/vite.config.ts +2 -8
  60. package/templates/latest/app/components/app-sidebar.tsx +0 -182
  61. package/templates/latest/app/components/chart-area-interactive.tsx +0 -290
  62. package/templates/latest/app/components/data-table.tsx +0 -807
  63. package/templates/latest/app/components/nav-documents.tsx +0 -92
  64. package/templates/latest/app/components/nav-main.tsx +0 -40
  65. package/templates/latest/app/components/nav-secondary.tsx +0 -42
  66. package/templates/latest/app/components/nav-user.tsx +0 -111
  67. package/templates/latest/app/components/section-cards.tsx +0 -102
  68. package/templates/latest/app/components/site-header.tsx +0 -28
  69. package/templates/latest/app/components/ui/avatar.tsx +0 -53
  70. package/templates/latest/app/components/ui/badge.tsx +0 -46
  71. package/templates/latest/app/components/ui/breadcrumb.tsx +0 -109
  72. package/templates/latest/app/components/ui/chart.tsx +0 -352
  73. package/templates/latest/app/components/ui/checkbox.tsx +0 -30
  74. package/templates/latest/app/components/ui/drawer.tsx +0 -139
  75. package/templates/latest/app/components/ui/select.tsx +0 -183
  76. package/templates/latest/app/components/ui/table.tsx +0 -117
  77. package/templates/latest/app/components/ui/toggle-group.tsx +0 -73
  78. package/templates/latest/app/components/ui/toggle.tsx +0 -47
  79. package/templates/latest/app/data/data.json +0 -614
  80. package/templates/latest/app/data/mock-payments.json +0 -122
  81. package/templates/latest/app/data/mock-transactions.json +0 -128
  82. package/templates/latest/app/hooks/use-bluecopa-user.ts +0 -37
  83. package/templates/latest/app/lib/utils.ts +0 -6
  84. package/templates/latest/app/routes/apitest.tsx +0 -2118
  85. package/templates/latest/app/routes/comments.tsx +0 -588
  86. package/templates/latest/app/routes/dashboard.tsx +0 -36
  87. package/templates/latest/app/routes/payments.tsx +0 -342
  88. package/templates/latest/app/routes/statements.tsx +0 -493
  89. package/templates/latest/app/routes/websocket.tsx +0 -450
  90. package/templates/latest/app/routes.tsx +0 -22
  91. package/templates/latest/dist/assets/__federation_expose_App-OFfdinOR.js +0 -97
  92. package/templates/latest/dist/assets/__federation_fn_import-CzfA7kmP.js +0 -438
  93. package/templates/latest/dist/assets/__federation_shared_react-Bp6HVBS4.js +0 -16
  94. package/templates/latest/dist/assets/__federation_shared_react-dom-BCcRGiYp.js +0 -17
  95. package/templates/latest/dist/assets/client-CkHcT_xc.js +0 -76035
  96. package/templates/latest/dist/assets/index-B3cD3sP_.js +0 -60
  97. package/templates/latest/dist/assets/index-BzNimew1.js +0 -69
  98. package/templates/latest/dist/assets/index-DMFtQdNS.js +0 -412
  99. package/templates/latest/dist/assets/remoteEntry.css +0 -3996
  100. package/templates/latest/dist/assets/remoteEntry.js +0 -88
  101. package/templates/latest/dist/favicon.ico +0 -0
  102. package/templates/latest/dist/index.html +0 -19
@@ -1,92 +0,0 @@
1
- "use client"
2
-
3
- import {
4
- IconDots,
5
- IconFolder,
6
- IconShare3,
7
- IconTrash,
8
- type Icon,
9
- } from "@tabler/icons-react"
10
-
11
- import {
12
- DropdownMenu,
13
- DropdownMenuContent,
14
- DropdownMenuItem,
15
- DropdownMenuSeparator,
16
- DropdownMenuTrigger,
17
- } from "~/components/ui/dropdown-menu"
18
- import {
19
- SidebarGroup,
20
- SidebarGroupLabel,
21
- SidebarMenu,
22
- SidebarMenuAction,
23
- SidebarMenuButton,
24
- SidebarMenuItem,
25
- useSidebar,
26
- } from "~/components/ui/sidebar"
27
-
28
- export function NavDocuments({
29
- items,
30
- }: {
31
- items: {
32
- name: string
33
- url: string
34
- icon: Icon
35
- }[]
36
- }) {
37
- const { isMobile } = useSidebar()
38
-
39
- return (
40
- <SidebarGroup className="group-data-[collapsible=icon]:hidden">
41
- <SidebarGroupLabel>Documents</SidebarGroupLabel>
42
- <SidebarMenu>
43
- {items.map((item) => (
44
- <SidebarMenuItem key={item.name}>
45
- <SidebarMenuButton asChild>
46
- <a href={item.url}>
47
- <item.icon />
48
- <span>{item.name}</span>
49
- </a>
50
- </SidebarMenuButton>
51
- <DropdownMenu>
52
- <DropdownMenuTrigger asChild>
53
- <SidebarMenuAction
54
- showOnHover
55
- className="data-[state=open]:bg-accent rounded-sm"
56
- >
57
- <IconDots />
58
- <span className="sr-only">More</span>
59
- </SidebarMenuAction>
60
- </DropdownMenuTrigger>
61
- <DropdownMenuContent
62
- className="w-24 rounded-lg"
63
- side={isMobile ? "bottom" : "right"}
64
- align={isMobile ? "end" : "start"}
65
- >
66
- <DropdownMenuItem>
67
- <IconFolder />
68
- <span>Open</span>
69
- </DropdownMenuItem>
70
- <DropdownMenuItem>
71
- <IconShare3 />
72
- <span>Share</span>
73
- </DropdownMenuItem>
74
- <DropdownMenuSeparator />
75
- <DropdownMenuItem variant="destructive">
76
- <IconTrash />
77
- <span>Delete</span>
78
- </DropdownMenuItem>
79
- </DropdownMenuContent>
80
- </DropdownMenu>
81
- </SidebarMenuItem>
82
- ))}
83
- <SidebarMenuItem>
84
- <SidebarMenuButton className="text-sidebar-foreground/70">
85
- <IconDots className="text-sidebar-foreground/70" />
86
- <span>More</span>
87
- </SidebarMenuButton>
88
- </SidebarMenuItem>
89
- </SidebarMenu>
90
- </SidebarGroup>
91
- )
92
- }
@@ -1,40 +0,0 @@
1
- import { IconCirclePlusFilled, IconMail, type Icon } from "@tabler/icons-react"
2
- import { Link } from "react-router-dom"
3
-
4
- import { Button } from "~/components/ui/button"
5
- import {
6
- SidebarGroup,
7
- SidebarGroupContent,
8
- SidebarMenu,
9
- SidebarMenuButton,
10
- SidebarMenuItem,
11
- } from "~/components/ui/sidebar"
12
-
13
- export function NavMain({
14
- items,
15
- }: {
16
- items: {
17
- title: string
18
- url: string
19
- icon?: Icon
20
- }[]
21
- }) {
22
- return (
23
- <SidebarGroup>
24
- <SidebarGroupContent className="flex flex-col gap-2">
25
- <SidebarMenu>
26
- {items.map((item) => (
27
- <SidebarMenuItem key={item.title}>
28
- <SidebarMenuButton tooltip={item.title} asChild>
29
- <Link to={item.url}>
30
- {item.icon && <item.icon />}
31
- <span>{item.title}</span>
32
- </Link>
33
- </SidebarMenuButton>
34
- </SidebarMenuItem>
35
- ))}
36
- </SidebarMenu>
37
- </SidebarGroupContent>
38
- </SidebarGroup>
39
- )
40
- }
@@ -1,42 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { type Icon } from "@tabler/icons-react"
5
-
6
- import {
7
- SidebarGroup,
8
- SidebarGroupContent,
9
- SidebarMenu,
10
- SidebarMenuButton,
11
- SidebarMenuItem,
12
- } from "~/components/ui/sidebar"
13
-
14
- export function NavSecondary({
15
- items,
16
- ...props
17
- }: {
18
- items: {
19
- title: string
20
- url: string
21
- icon: Icon
22
- }[]
23
- } & React.ComponentPropsWithoutRef<typeof SidebarGroup>) {
24
- return (
25
- <SidebarGroup {...props}>
26
- <SidebarGroupContent>
27
- <SidebarMenu>
28
- {items.map((item) => (
29
- <SidebarMenuItem key={item.title}>
30
- <SidebarMenuButton asChild>
31
- <a href={item.url}>
32
- <item.icon />
33
- <span>{item.title}</span>
34
- </a>
35
- </SidebarMenuButton>
36
- </SidebarMenuItem>
37
- ))}
38
- </SidebarMenu>
39
- </SidebarGroupContent>
40
- </SidebarGroup>
41
- )
42
- }
@@ -1,111 +0,0 @@
1
- import {
2
- IconCreditCard,
3
- IconDotsVertical,
4
- IconLogout,
5
- IconNotification,
6
- IconUserCircle,
7
- } from "@tabler/icons-react"
8
-
9
- import {
10
- Avatar,
11
- AvatarFallback,
12
- AvatarImage,
13
- } from "~/components/ui/avatar"
14
- import {
15
- DropdownMenu,
16
- DropdownMenuContent,
17
- DropdownMenuGroup,
18
- DropdownMenuItem,
19
- DropdownMenuLabel,
20
- DropdownMenuSeparator,
21
- DropdownMenuTrigger,
22
- } from "~/components/ui/dropdown-menu"
23
- import {
24
- SidebarMenu,
25
- SidebarMenuButton,
26
- SidebarMenuItem,
27
- useSidebar,
28
- } from "~/components/ui/sidebar"
29
- import { useBluecopaUser } from "~/hooks/use-bluecopa-user"
30
-
31
- export function NavUser() {
32
- const { isMobile } = useSidebar()
33
- const { user, isLoading } = useBluecopaUser()
34
- // Show loading state while fetching user data
35
- if (isLoading) {
36
- return (
37
- <SidebarMenu>
38
- <SidebarMenuItem>
39
- <SidebarMenuButton size="lg" className="animate-pulse">
40
- <div className="h-8 w-8 rounded-lg bg-muted" />
41
- <div className="grid flex-1 text-left text-sm leading-tight">
42
- <div className="h-4 w-20 bg-muted rounded" />
43
- <div className="h-3 w-32 bg-muted rounded" />
44
- </div>
45
- </SidebarMenuButton>
46
- </SidebarMenuItem>
47
- </SidebarMenu>
48
- )
49
- }
50
-
51
- return (
52
- <SidebarMenu>
53
- <SidebarMenuItem>
54
- <DropdownMenu>
55
- <DropdownMenuTrigger asChild>
56
- <SidebarMenuButton
57
- size="lg"
58
- className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
59
- >
60
- <div className="grid flex-1 text-left text-sm leading-tight">
61
- <span className="truncate font-medium">User ({user?.userId})</span>
62
- <span className="text-muted-foreground truncate text-xs">
63
- {user?.email}
64
- </span>
65
- </div>
66
- <IconDotsVertical className="ml-auto size-4" />
67
- </SidebarMenuButton>
68
- </DropdownMenuTrigger>
69
- <DropdownMenuContent
70
- className="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg"
71
- side={isMobile ? "bottom" : "right"}
72
- align="end"
73
- sideOffset={4}
74
- >
75
- <DropdownMenuLabel className="p-0 font-normal">
76
- <div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
77
-
78
- <div className="grid flex-1 text-left text-sm leading-tight">
79
- <span className="truncate font-medium">User ({user?.userId})</span>
80
- <span className="text-muted-foreground truncate text-xs">
81
- {user?.email}
82
- </span>
83
- </div>
84
- </div>
85
- </DropdownMenuLabel>
86
- <DropdownMenuSeparator />
87
- <DropdownMenuGroup>
88
- <DropdownMenuItem>
89
- <IconUserCircle />
90
- Account
91
- </DropdownMenuItem>
92
- <DropdownMenuItem>
93
- <IconCreditCard />
94
- Billing
95
- </DropdownMenuItem>
96
- <DropdownMenuItem>
97
- <IconNotification />
98
- Notifications
99
- </DropdownMenuItem>
100
- </DropdownMenuGroup>
101
- <DropdownMenuSeparator />
102
- <DropdownMenuItem>
103
- <IconLogout />
104
- Log out
105
- </DropdownMenuItem>
106
- </DropdownMenuContent>
107
- </DropdownMenu>
108
- </SidebarMenuItem>
109
- </SidebarMenu>
110
- )
111
- }
@@ -1,102 +0,0 @@
1
- import { IconTrendingDown, IconTrendingUp } from "@tabler/icons-react"
2
-
3
- import { Badge } from "~/components/ui/badge"
4
- import {
5
- Card,
6
- CardAction,
7
- CardDescription,
8
- CardFooter,
9
- CardHeader,
10
- CardTitle,
11
- } from "~/components/ui/card"
12
-
13
- export function SectionCards() {
14
- return (
15
- <div className="*:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card grid grid-cols-1 gap-4 px-4 *:data-[slot=card]:bg-gradient-to-t *:data-[slot=card]:shadow-xs lg:px-6 @xl/main:grid-cols-2 @5xl/main:grid-cols-4">
16
- <Card className="@container/card">
17
- <CardHeader>
18
- <CardDescription>Total Revenue</CardDescription>
19
- <CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
20
- $1,250.00
21
- </CardTitle>
22
- <CardAction>
23
- <Badge variant="outline">
24
- <IconTrendingUp />
25
- +12.5%
26
- </Badge>
27
- </CardAction>
28
- </CardHeader>
29
- <CardFooter className="flex-col items-start gap-1.5 text-sm">
30
- <div className="line-clamp-1 flex gap-2 font-medium">
31
- Trending up this month <IconTrendingUp className="size-4" />
32
- </div>
33
- <div className="text-muted-foreground">
34
- Visitors for the last 6 months
35
- </div>
36
- </CardFooter>
37
- </Card>
38
- <Card className="@container/card">
39
- <CardHeader>
40
- <CardDescription>New Customers</CardDescription>
41
- <CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
42
- 1,234
43
- </CardTitle>
44
- <CardAction>
45
- <Badge variant="outline">
46
- <IconTrendingDown />
47
- -20%
48
- </Badge>
49
- </CardAction>
50
- </CardHeader>
51
- <CardFooter className="flex-col items-start gap-1.5 text-sm">
52
- <div className="line-clamp-1 flex gap-2 font-medium">
53
- Down 20% this period <IconTrendingDown className="size-4" />
54
- </div>
55
- <div className="text-muted-foreground">
56
- Acquisition needs attention
57
- </div>
58
- </CardFooter>
59
- </Card>
60
- <Card className="@container/card">
61
- <CardHeader>
62
- <CardDescription>Active Accounts</CardDescription>
63
- <CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
64
- 45,678
65
- </CardTitle>
66
- <CardAction>
67
- <Badge variant="outline">
68
- <IconTrendingUp />
69
- +12.5%
70
- </Badge>
71
- </CardAction>
72
- </CardHeader>
73
- <CardFooter className="flex-col items-start gap-1.5 text-sm">
74
- <div className="line-clamp-1 flex gap-2 font-medium">
75
- Strong user retention <IconTrendingUp className="size-4" />
76
- </div>
77
- <div className="text-muted-foreground">Engagement exceed targets</div>
78
- </CardFooter>
79
- </Card>
80
- <Card className="@container/card">
81
- <CardHeader>
82
- <CardDescription>Growth Rate</CardDescription>
83
- <CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
84
- 4.5%
85
- </CardTitle>
86
- <CardAction>
87
- <Badge variant="outline">
88
- <IconTrendingUp />
89
- +4.5%
90
- </Badge>
91
- </CardAction>
92
- </CardHeader>
93
- <CardFooter className="flex-col items-start gap-1.5 text-sm">
94
- <div className="line-clamp-1 flex gap-2 font-medium">
95
- Steady performance increase <IconTrendingUp className="size-4" />
96
- </div>
97
- <div className="text-muted-foreground">Meets growth projections</div>
98
- </CardFooter>
99
- </Card>
100
- </div>
101
- )
102
- }
@@ -1,28 +0,0 @@
1
- import { navigateToUrl } from "single-spa";
2
- import { Button } from "~/components/ui/button";
3
- import { Separator } from "~/components/ui/separator";
4
- import { SidebarTrigger } from "~/components/ui/sidebar";
5
-
6
- export function SiteHeader() {
7
- return (
8
- <header className="flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)">
9
- <div className="flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6">
10
- <SidebarTrigger className="-ml-1" />
11
- <Separator
12
- orientation="vertical"
13
- className="mx-2 data-[orientation=vertical]:h-4"
14
- />
15
- <h1 className="text-base font-medium">Documents</h1>
16
- </div>
17
- <div className="flex w-full justify-end items-center gap-1 px-4 lg:gap-2 lg:px-6">
18
- <Button
19
- onClick={() => {
20
- navigateToUrl("/apps-studio/portals");
21
- }}
22
- >
23
- Go to portals
24
- </Button>
25
- </div>
26
- </header>
27
- );
28
- }
@@ -1,53 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as AvatarPrimitive from "@radix-ui/react-avatar"
5
-
6
- import { cn } from "~/lib/utils"
7
-
8
- function Avatar({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
12
- return (
13
- <AvatarPrimitive.Root
14
- data-slot="avatar"
15
- className={cn(
16
- "relative flex size-8 shrink-0 overflow-hidden rounded-full",
17
- className
18
- )}
19
- {...props}
20
- />
21
- )
22
- }
23
-
24
- function AvatarImage({
25
- className,
26
- ...props
27
- }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
28
- return (
29
- <AvatarPrimitive.Image
30
- data-slot="avatar-image"
31
- className={cn("aspect-square size-full", className)}
32
- {...props}
33
- />
34
- )
35
- }
36
-
37
- function AvatarFallback({
38
- className,
39
- ...props
40
- }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
41
- return (
42
- <AvatarPrimitive.Fallback
43
- data-slot="avatar-fallback"
44
- className={cn(
45
- "bg-muted flex size-full items-center justify-center rounded-full",
46
- className
47
- )}
48
- {...props}
49
- />
50
- )
51
- }
52
-
53
- export { Avatar, AvatarImage, AvatarFallback }
@@ -1,46 +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 badgeVariants = cva(
8
- "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
9
- {
10
- variants: {
11
- variant: {
12
- default:
13
- "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
14
- secondary:
15
- "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
16
- destructive:
17
- "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
18
- outline:
19
- "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
20
- },
21
- },
22
- defaultVariants: {
23
- variant: "default",
24
- },
25
- }
26
- )
27
-
28
- function Badge({
29
- className,
30
- variant,
31
- asChild = false,
32
- ...props
33
- }: React.ComponentProps<"span"> &
34
- VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
35
- const Comp = asChild ? Slot : "span"
36
-
37
- return (
38
- <Comp
39
- data-slot="badge"
40
- className={cn(badgeVariants({ variant }), className)}
41
- {...props}
42
- />
43
- )
44
- }
45
-
46
- export { Badge, badgeVariants }
@@ -1,109 +0,0 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { ChevronRight, MoreHorizontal } from "lucide-react"
4
-
5
- import { cn } from "~/lib/utils"
6
-
7
- function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
8
- return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
9
- }
10
-
11
- function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
12
- return (
13
- <ol
14
- data-slot="breadcrumb-list"
15
- className={cn(
16
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
17
- className
18
- )}
19
- {...props}
20
- />
21
- )
22
- }
23
-
24
- function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
25
- return (
26
- <li
27
- data-slot="breadcrumb-item"
28
- className={cn("inline-flex items-center gap-1.5", className)}
29
- {...props}
30
- />
31
- )
32
- }
33
-
34
- function BreadcrumbLink({
35
- asChild,
36
- className,
37
- ...props
38
- }: React.ComponentProps<"a"> & {
39
- asChild?: boolean
40
- }) {
41
- const Comp = asChild ? Slot : "a"
42
-
43
- return (
44
- <Comp
45
- data-slot="breadcrumb-link"
46
- className={cn("hover:text-foreground transition-colors", className)}
47
- {...props}
48
- />
49
- )
50
- }
51
-
52
- function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
53
- return (
54
- <span
55
- data-slot="breadcrumb-page"
56
- role="link"
57
- aria-disabled="true"
58
- aria-current="page"
59
- className={cn("text-foreground font-normal", className)}
60
- {...props}
61
- />
62
- )
63
- }
64
-
65
- function BreadcrumbSeparator({
66
- children,
67
- className,
68
- ...props
69
- }: React.ComponentProps<"li">) {
70
- return (
71
- <li
72
- data-slot="breadcrumb-separator"
73
- role="presentation"
74
- aria-hidden="true"
75
- className={cn("[&>svg]:size-3.5", className)}
76
- {...props}
77
- >
78
- {children ?? <ChevronRight />}
79
- </li>
80
- )
81
- }
82
-
83
- function BreadcrumbEllipsis({
84
- className,
85
- ...props
86
- }: React.ComponentProps<"span">) {
87
- return (
88
- <span
89
- data-slot="breadcrumb-ellipsis"
90
- role="presentation"
91
- aria-hidden="true"
92
- className={cn("flex size-9 items-center justify-center", className)}
93
- {...props}
94
- >
95
- <MoreHorizontal className="size-4" />
96
- <span className="sr-only">More</span>
97
- </span>
98
- )
99
- }
100
-
101
- export {
102
- Breadcrumb,
103
- BreadcrumbList,
104
- BreadcrumbItem,
105
- BreadcrumbLink,
106
- BreadcrumbPage,
107
- BreadcrumbSeparator,
108
- BreadcrumbEllipsis,
109
- }