@catalystsoftware/ui 1.0.5 → 1.0.6

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 (155) hide show
  1. package/dist/data/data.tsx +29 -29
  2. package/dist/data/tailwind.config.js +3821 -261
  3. package/dist/data.tsx +29 -29
  4. package/package.json +4 -3
  5. package/components/catalyst-ui/buttons/burger.tsx +0 -207
  6. package/components/catalyst-ui/core/data-display/timeline.tsx +0 -210
  7. package/components/catalyst-ui/core/feedback/alert.tsx +0 -491
  8. package/components/catalyst-ui/core/feedback/spinner-1.tsx +0 -65
  9. package/components/catalyst-ui/core/feedback/toast.tsx +0 -1857
  10. package/components/catalyst-ui/core/navigation/menu.tsx +0 -164
  11. package/components/catalyst-ui/forms/toggle-class.tsx +0 -176
  12. package/components/catalyst-ui/hooks/use-copy-to-clipboard.tsx +0 -419
  13. package/components/catalyst-ui/hooks/use-counter.tsx +0 -13
  14. package/components/catalyst-ui/hooks/use-event-listener.tsx +0 -23
  15. package/components/catalyst-ui/hooks/use-export-markdown.tsx +0 -47
  16. package/components/catalyst-ui/hooks/use-focus.tsx +0 -17
  17. package/components/catalyst-ui/hooks/use-interval.tsx +0 -23
  18. package/components/catalyst-ui/hooks/use-is-client.tsx +0 -16
  19. package/components/catalyst-ui/hooks/use-media-query.tsx +0 -19
  20. package/components/catalyst-ui/hooks/use-mobile.tsx +0 -19
  21. package/components/catalyst-ui/hooks/use-resize-observer.tsx +0 -81
  22. package/components/catalyst-ui/hooks/use-timeout.tsx +0 -21
  23. package/components/catalyst-ui/hooks/use-timer.tsx +0 -209
  24. package/components/catalyst-ui/hooks/use-toggle.tsx +0 -12
  25. package/components/catalyst-ui/media/image.tsx +0 -13
  26. package/components/catalyst-ui/overlays/dual-sidebar.tsx +0 -4142
  27. package/components/catalyst-ui/overlays/sidebar-original.tsx +0 -726
  28. package/components/catalyst-ui/primitives/accordion.tsx +0 -250
  29. package/components/catalyst-ui/primitives/alert-dialog.tsx +0 -126
  30. package/components/catalyst-ui/primitives/aspect-ratio.tsx +0 -9
  31. package/components/catalyst-ui/primitives/avatar.tsx +0 -296
  32. package/components/catalyst-ui/primitives/badge.tsx +0 -57
  33. package/components/catalyst-ui/primitives/breadcrumb.tsx +0 -101
  34. package/components/catalyst-ui/primitives/button.tsx +0 -265
  35. package/components/catalyst-ui/primitives/calendar-v4.tsx +0 -208
  36. package/components/catalyst-ui/primitives/calendar.tsx +0 -295
  37. package/components/catalyst-ui/primitives/card.tsx +0 -618
  38. package/components/catalyst-ui/primitives/carousel.tsx +0 -238
  39. package/components/catalyst-ui/primitives/chart.tsx +0 -347
  40. package/components/catalyst-ui/primitives/checkbox.tsx +0 -225
  41. package/components/catalyst-ui/primitives/collapsible.tsx +0 -212
  42. package/components/catalyst-ui/primitives/command.tsx +0 -393
  43. package/components/catalyst-ui/primitives/context-menu.tsx +0 -236
  44. package/components/catalyst-ui/primitives/dialog.tsx +0 -471
  45. package/components/catalyst-ui/primitives/drawer.tsx +0 -761
  46. package/components/catalyst-ui/primitives/dropdown-menu.tsx +0 -290
  47. package/components/catalyst-ui/primitives/empty.tsx +0 -104
  48. package/components/catalyst-ui/primitives/field.tsx +0 -244
  49. package/components/catalyst-ui/primitives/hover-card.tsx +0 -124
  50. package/components/catalyst-ui/primitives/input-otp.tsx +0 -76
  51. package/components/catalyst-ui/primitives/input.tsx +0 -64
  52. package/components/catalyst-ui/primitives/item.tsx +0 -196
  53. package/components/catalyst-ui/primitives/kbd.tsx +0 -75
  54. package/components/catalyst-ui/primitives/label.tsx +0 -24
  55. package/components/catalyst-ui/primitives/navigation-menu.tsx +0 -150
  56. package/components/catalyst-ui/primitives/pagination.tsx +0 -198
  57. package/components/catalyst-ui/primitives/popover.tsx +0 -232
  58. package/components/catalyst-ui/primitives/progress.tsx +0 -34
  59. package/components/catalyst-ui/primitives/radio-group.tsx +0 -43
  60. package/components/catalyst-ui/primitives/resizable.tsx +0 -56
  61. package/components/catalyst-ui/primitives/select.tsx +0 -155
  62. package/components/catalyst-ui/primitives/separator.tsx +0 -74
  63. package/components/catalyst-ui/primitives/sheet.tsx +0 -126
  64. package/components/catalyst-ui/primitives/skeleton.tsx +0 -15
  65. package/components/catalyst-ui/primitives/slider.tsx +0 -27
  66. package/components/catalyst-ui/primitives/switch.tsx +0 -187
  67. package/components/catalyst-ui/primitives/tabs.tsx +0 -335
  68. package/components/catalyst-ui/primitives/textarea.tsx +0 -24
  69. package/components/catalyst-ui/primitives/toggle-group.tsx +0 -55
  70. package/components/catalyst-ui/primitives/toggle.tsx +0 -42
  71. package/components/catalyst-ui/primitives/tooltip.tsx +0 -116
  72. package/components/catalyst-ui/utils/basic-auth.tsx +0 -40
  73. package/components/catalyst-ui/utils/context-storage.tsx +0 -19
  74. package/components/catalyst-ui/utils/cors-middleware.tsx +0 -71
  75. package/components/catalyst-ui/utils/deferred-content.tsx +0 -595
  76. package/components/catalyst-ui/utils/honeypot-middleware.tsx +0 -38
  77. package/components/catalyst-ui/utils/incId.tsx +0 -75
  78. package/components/catalyst-ui/utils/jwk-auth.tsx +0 -36
  79. package/components/catalyst-ui/utils/request-id.tsx +0 -14
  80. package/components/catalyst-ui/utils/secure-headers.tsx +0 -37
  81. package/components/catalyst-ui/utils/server-timing.tsx +0 -23
  82. package/components/catalyst-ui/utils/utils.ts +0 -43
  83. package/components/catalyst-ui/utils/with-cookie.tsx +0 -43
  84. package/components/catalyst-ui/x/accordian-x.tsx +0 -428
  85. package/components/catalyst-ui/x/alert-x.tsx +0 -413
  86. package/components/catalyst-ui/x/animated-text-x.tsx +0 -2242
  87. package/components/catalyst-ui/x/avatar-x.tsx +0 -515
  88. package/components/catalyst-ui/x/badge-x.tsx +0 -670
  89. package/components/catalyst-ui/x/button-X.tsx +0 -2857
  90. package/components/catalyst-ui/x/button-group-x.tsx +0 -847
  91. package/components/catalyst-ui/x/calendar-x.tsx +0 -1910
  92. package/components/catalyst-ui/x/card-x.tsx +0 -2597
  93. package/components/catalyst-ui/x/checkbox-x.tsx +0 -656
  94. package/components/catalyst-ui/x/collapsible-x.tsx +0 -1360
  95. package/components/catalyst-ui/x/combobox-x.tsx +0 -911
  96. package/components/catalyst-ui/x/data-table-x.tsx +0 -1753
  97. package/components/catalyst-ui/x/date-picker-x.tsx +0 -648
  98. package/components/catalyst-ui/x/dialog-x.tsx +0 -659
  99. package/components/catalyst-ui/x/dropdown-menu-x.tsx +0 -612
  100. package/components/catalyst-ui/x/hover-card-x.tsx +0 -375
  101. package/components/catalyst-ui/x/icon-x.tsx +0 -840
  102. package/components/catalyst-ui/x/input-mask-x.tsx +0 -981
  103. package/components/catalyst-ui/x/input-otp-x.tsx +0 -659
  104. package/components/catalyst-ui/x/loader-x.tsx +0 -1757
  105. package/components/catalyst-ui/x/pagination-x.tsx +0 -622
  106. package/components/catalyst-ui/x/popover-x.tsx +0 -744
  107. package/components/catalyst-ui/x/radio-group-x.tsx +0 -499
  108. package/components/catalyst-ui/x/select-x.tsx +0 -1127
  109. package/components/catalyst-ui/x/sheet-x.tsx +0 -668
  110. package/components/catalyst-ui/x/switch-x.tsx +0 -681
  111. package/components/catalyst-ui/x/table-x.tsx +0 -574
  112. package/components/catalyst-ui/x/tabs-x.tsx +0 -839
  113. package/components/catalyst-ui/x/textarea-x.tsx +0 -1263
  114. package/components/catalyst-ui/x/tooltip-x.tsx +0 -396
  115. package/components/catalyst-ui/x/tracker-x.tsx +0 -560
  116. package/data/bg-data.tsx +0 -901
  117. package/data/buttons-data.tsx +0 -2327
  118. package/data/charts-data.tsx +0 -102
  119. package/data/chat-data.tsx +0 -83
  120. package/data/code-data.tsx +0 -1040
  121. package/data/comboboxes-data.tsx +0 -1843
  122. package/data/command-data.tsx +0 -1381
  123. package/data/core-data.tsx +0 -15953
  124. package/data/crm-data.tsx +0 -47
  125. package/data/data.tsx +0 -159
  126. package/data/date-and-time-data.tsx +0 -554
  127. package/data/dependencies.tsx +0 -7
  128. package/data/ecommerce-data.tsx +0 -1387
  129. package/data/forms-data.tsx +0 -7890
  130. package/data/hooks-data.tsx +0 -5487
  131. package/data/index.ts +0 -34
  132. package/data/inputs-data.tsx +0 -557
  133. package/data/interactive-data.tsx +0 -5394
  134. package/data/lofi-data.tsx +0 -18295
  135. package/data/marketing-data.tsx +0 -2546
  136. package/data/media-data.tsx +0 -1510
  137. package/data/motion-data.tsx +0 -5801
  138. package/data/overlay-data.tsx +0 -4136
  139. package/data/pdf-data.tsx +0 -124
  140. package/data/pos-data.tsx +0 -213
  141. package/data/postcss.config.js +0 -6
  142. package/data/primitive-data.tsx +0 -5170
  143. package/data/prompt-data.tsx +0 -1226
  144. package/data/requiredLibs.ts +0 -4
  145. package/data/sandbox-data.tsx +0 -1
  146. package/data/sidebars-data.tsx +0 -5421
  147. package/data/stacks-data.tsx +0 -32
  148. package/data/table-data.tsx +0 -706
  149. package/data/tailwind.config.js +0 -270
  150. package/data/tailwind.config.ngin.js +0 -3830
  151. package/data/tailwind.css +0 -431
  152. package/data/tools-data.tsx +0 -6910
  153. package/data/typography-data.tsx +0 -2050
  154. package/data/utils-data.tsx +0 -6500
  155. package/data/x-data.tsx +0 -1171
@@ -1,150 +0,0 @@
1
- import { cn } from "~/components/catalyst-ui";
2
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
3
- import React from "react";
4
- import { cva } from "class-variance-authority";
5
- import { ChevronDownIcon } from "lucide-react"
6
-
7
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:1407
8
-
9
- function NavigationMenu({
10
- className,
11
- children,
12
- viewport = true,
13
- ...props
14
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
15
- viewport?: boolean
16
- }) {
17
- return (
18
- <NavigationMenuPrimitive.Root
19
- data-slot="navigation-menu"
20
- data-viewport={viewport}
21
- className={cn(
22
- "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
23
- className
24
- )}
25
- {...props}
26
- >
27
- {children}
28
- {viewport && <NavigationMenuViewport />}
29
- </NavigationMenuPrimitive.Root>
30
- )
31
- }
32
- function NavigationMenuList({
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
36
- return (
37
- <NavigationMenuPrimitive.List
38
- data-slot="navigation-menu-list"
39
- className={cn(
40
- "group flex flex-1 list-none items-center justify-center gap-1",
41
- className
42
- )}
43
- {...props}
44
- />
45
- )
46
- }
47
- function NavigationMenuItem({
48
- className,
49
- ...props
50
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
51
- return (
52
- <NavigationMenuPrimitive.Item
53
- data-slot="navigation-menu-item"
54
- className={cn("relative", className)}
55
- {...props}
56
- />
57
- )
58
- }
59
- const navigationMenuTriggerStyle = cva(
60
- "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
61
- )
62
- function NavigationMenuTrigger({
63
- className,
64
- children,
65
- ...props
66
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
67
- return (
68
- <NavigationMenuPrimitive.Trigger
69
- data-slot="navigation-menu-trigger"
70
- className={cn(navigationMenuTriggerStyle(), "group", className)}
71
- {...props}
72
- >
73
- {children}{" "}
74
- <ChevronDownIcon
75
- className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
76
- aria-hidden="true"
77
- />
78
- </NavigationMenuPrimitive.Trigger>
79
- )
80
- }
81
- function NavigationMenuContent({
82
- className,
83
- ...props
84
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
85
- return (
86
- <NavigationMenuPrimitive.Content
87
- data-slot="navigation-menu-content"
88
- className={cn(
89
- "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
90
- "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
91
- className
92
- )}
93
- {...props}
94
- />
95
- )
96
- }
97
- function NavigationMenuViewport({
98
- className,
99
- ...props
100
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
101
- return (
102
- <div
103
- className={cn(
104
- "absolute top-full left-0 isolate z-50 flex justify-center"
105
- )}
106
- >
107
- <NavigationMenuPrimitive.Viewport
108
- data-slot="navigation-menu-viewport"
109
- className={cn(
110
- "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
111
- className
112
- )}
113
- {...props}
114
- />
115
- </div>
116
- )
117
- }
118
- function NavigationMenuLink({
119
- className,
120
- ...props
121
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
122
- return (
123
- <NavigationMenuPrimitive.Link
124
- data-slot="navigation-menu-link"
125
- className={cn(
126
- "data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
127
- className
128
- )}
129
- {...props}
130
- />
131
- )
132
- }
133
- function NavigationMenuIndicator({
134
- className,
135
- ...props
136
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
137
- return (
138
- <NavigationMenuPrimitive.Indicator
139
- data-slot="navigation-menu-indicator"
140
- className={cn(
141
- "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
142
- className
143
- )}
144
- {...props}
145
- >
146
- <div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
147
- </NavigationMenuPrimitive.Indicator>
148
- )
149
- }
150
- export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle,}
@@ -1,198 +0,0 @@
1
- import * as React from "react"
2
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
3
- import { Button, ButtonProps } from "~/components/catalyst-ui"
4
- import { cn } from "~/components/catalyst-ui"
5
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:325
6
-
7
- interface PaginationProps extends React.ComponentProps<"nav"> {}
8
-
9
- const Pagination = ({ className, ...props }: PaginationProps) => (
10
- <nav
11
- role="navigation"
12
- aria-label="pagination"
13
- className={cn("mx-auto flex w-full justify-center", className)}
14
- {...props}
15
- />
16
- )
17
- Pagination.displayName = "Pagination"
18
-
19
- const PaginationContent = React.forwardRef<
20
- HTMLUListElement,
21
- React.ComponentProps<"ul">
22
- >(({ className, ...props }, ref) => (
23
- <ul
24
- ref={ref}
25
- className={cn("flex flex-row items-center gap-1", className)}
26
- {...props}
27
- />
28
- ))
29
- PaginationContent.displayName = "PaginationContent"
30
-
31
- const PaginationItem = React.forwardRef<
32
- HTMLLIElement,
33
- React.ComponentProps<"li">
34
- >(({ className, ...props }, ref) => (
35
- <li ref={ref} className={cn("", className)} {...props} />
36
- ))
37
- PaginationItem.displayName = "PaginationItem"
38
-
39
- interface PaginationLinkProps extends ButtonProps {
40
- href?: string
41
- isActive?: boolean
42
- }
43
-
44
- const PaginationLink = ({
45
- className,
46
- isActive,
47
- href,
48
- size = "icon",
49
- variant = isActive ? "default" : "ghost",
50
- ...props
51
- }: PaginationLinkProps) => (
52
- <Button
53
- as={href ? "a" : "button"}
54
- href={href}
55
- variant={variant}
56
- size={size}
57
- className={cn("h-9 w-9 p-0", className)}
58
- {...props}
59
- />
60
- )
61
- PaginationLink.displayName = "PaginationLink"
62
-
63
- interface PaginationPreviousProps extends React.ComponentProps<typeof PaginationLink> {}
64
-
65
- const PaginationPrevious = ({
66
- className,
67
- ...props
68
- }: PaginationPreviousProps) => (
69
- <PaginationLink
70
- aria-label="Go to previous page"
71
- size="default"
72
- className={cn("gap-1 pl-2.5", className)}
73
- {...props}
74
- >
75
- <ChevronLeft className="h-4 w-4" />
76
- <span>Previous</span>
77
- </PaginationLink>
78
- )
79
- PaginationPrevious.displayName = "PaginationPrevious"
80
-
81
- interface PaginationNextProps extends React.ComponentProps<typeof PaginationLink> {}
82
-
83
- const PaginationNext = ({
84
- className,
85
- ...props
86
- }: PaginationNextProps) => (
87
- <PaginationLink
88
- aria-label="Go to next page"
89
- size="default"
90
- className={cn("gap-1 pr-2.5", className)}
91
- {...props}
92
- >
93
- <span>Next</span>
94
- <ChevronRight className="h-4 w-4" />
95
- </PaginationLink>
96
- )
97
- PaginationNext.displayName = "PaginationNext"
98
-
99
- const PaginationEllipsis = ({
100
- className,
101
- ...props
102
- }: React.ComponentProps<"span">) => (
103
- <span
104
- aria-hidden
105
- className={cn("flex h-9 w-9 items-center justify-center", className)}
106
- {...props}
107
- >
108
- <MoreHorizontal className="h-4 w-4" />
109
- <span className="sr-only">More pages</span>
110
- </span>
111
- )
112
- PaginationEllipsis.displayName = "PaginationEllipsis"
113
-
114
- // Helper component for generating pagination with hrefs
115
- interface PaginationWithHrefsProps {
116
- currentPage: number
117
- totalPages: number
118
- getHref: (page: number) => string
119
- className?: string
120
- }
121
-
122
- const PaginationWithHrefs: React.FC<PaginationWithHrefsProps> = ({
123
- currentPage,
124
- totalPages,
125
- getHref,
126
- className,
127
- }) => {
128
- const pages = React.useMemo(() => {
129
- if (totalPages <= 7) {
130
- return Array.from({ length: totalPages }, (_, i) => i + 1)
131
- }
132
-
133
- const delta = 2
134
- const range = []
135
- const rangeWithDots = []
136
-
137
- for (
138
- let i = Math.max(2, currentPage - delta);
139
- i <= Math.min(totalPages - 1, currentPage + delta);
140
- i++
141
- ) {
142
- range.push(i)
143
- }
144
-
145
- if (currentPage - delta > 2) {
146
- rangeWithDots.push(1, "...")
147
- } else {
148
- rangeWithDots.push(1)
149
- }
150
-
151
- rangeWithDots.push(...range)
152
-
153
- if (currentPage + delta < totalPages - 1) {
154
- rangeWithDots.push("...", totalPages)
155
- } else {
156
- rangeWithDots.push(totalPages)
157
- }
158
-
159
- return rangeWithDots
160
- }, [currentPage, totalPages])
161
-
162
- return (
163
- <Pagination className={className}>
164
- <PaginationContent>
165
- <PaginationItem>
166
- <PaginationPrevious
167
- href={currentPage > 1 ? getHref(currentPage - 1) : undefined}
168
- disabled={currentPage <= 1}
169
- />
170
- </PaginationItem>
171
-
172
- {pages.map((page, index) => (
173
- <PaginationItem key={index}>
174
- {page === "..." ? (
175
- <PaginationEllipsis />
176
- ) : (
177
- <PaginationLink
178
- href={getHref(page as number)}
179
- isActive={currentPage === page}
180
- >
181
- {page}
182
- </PaginationLink>
183
- )}
184
- </PaginationItem>
185
- ))}
186
-
187
- <PaginationItem>
188
- <PaginationNext
189
- href={currentPage < totalPages ? getHref(currentPage + 1) : undefined}
190
- disabled={currentPage >= totalPages}
191
- />
192
- </PaginationItem>
193
- </PaginationContent>
194
- </Pagination>
195
- )
196
- }
197
-
198
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationWithHrefs, type PaginationProps, type PaginationLinkProps }
@@ -1,232 +0,0 @@
1
- import * as React from "react"
2
- import * as PopoverPrimitive from "@radix-ui/react-popover"
3
- import { X } from "lucide-react"
4
- import { cn } from "~/components/catalyst-ui"
5
-
6
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:4449
7
- export function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
8
- return <PopoverPrimitive.Root data-slot="popover" {...props} />
9
- }
10
- export function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
11
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
12
- }
13
- export function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
14
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
15
- }
16
-
17
- export function PopoverClose({ className, ...props }: React.ComponentProps<typeof PopoverPrimitive.Close>) {
18
- return (
19
- <PopoverPrimitive.Close
20
- className={cn(
21
- "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
22
- className
23
- )}
24
- {...props}
25
- >
26
- <X className="h-4 w-4" />
27
- <span className="sr-only">Close</span>
28
- </PopoverPrimitive.Close>
29
- )
30
- }
31
-
32
- export function PopoverContent({ className, align = "center", sideOffset = 4, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
33
- return (
34
- <PopoverPrimitive.Portal>
35
- <PopoverPrimitive.Content
36
- data-slot="popover-content"
37
- align={align}
38
- sideOffset={sideOffset}
39
- className={cn(
40
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
41
- // Animation states
42
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
43
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
44
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
45
- // Slide animations based on side
46
- "data-[side=bottom]:slide-in-from-top-2",
47
- "data-[side=left]:slide-in-from-right-2",
48
- "data-[side=right]:slide-in-from-left-2",
49
- "data-[side=top]:slide-in-from-bottom-2",
50
- className
51
- )}
52
- style={{
53
- transformOrigin: 'var(--radix-popover-content-transform-origin)'
54
- }}
55
- {...props}
56
- />
57
- </PopoverPrimitive.Portal>
58
- )
59
- }
60
-
61
- export function PopoverHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
62
- return (
63
- <div
64
- className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)}
65
- {...props}
66
- />
67
- )
68
- }
69
-
70
- export function PopoverFooter({
71
- className,
72
- ...props
73
- }: React.HTMLAttributes<HTMLDivElement>) {
74
- return (
75
- <div
76
- className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
77
- {...props}
78
- />
79
- )
80
- }
81
-
82
- export function PopoverTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) {
83
- return (
84
- <h3
85
- className={cn("text-lg font-semibold leading-none tracking-tight", className)}
86
- {...props}
87
- />
88
- )
89
- }
90
-
91
- export function PopoverDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) {
92
- return (
93
- <p
94
- className={cn("text-sm text-muted-foreground", className)}
95
- {...props}
96
- />
97
- )
98
- }
99
-
100
- // Demo component showing usage
101
- function PopoverDemo() {
102
- return (
103
- <Popover>
104
- <PopoverTrigger asChild>
105
- <button className="rounded-md bg-primary px-4 py-2 text-primary-foreground">
106
- Open Popover
107
- </button>
108
- </PopoverTrigger>
109
- <PopoverContent className="w-80">
110
- <PopoverClose />
111
- <PopoverHeader>
112
- <PopoverTitle>Edit Profile</PopoverTitle>
113
- <PopoverDescription>
114
- Make changes to your profile here. Click save when you're done.
115
- </PopoverDescription>
116
- </PopoverHeader>
117
- <div className="grid gap-4 py-4">
118
- <div className="grid grid-cols-4 items-center gap-4">
119
- <label htmlFor="name" className="text-right text-sm">
120
- Name
121
- </label>
122
- <input
123
- id="name"
124
- defaultValue="Pedro Duarte"
125
- className="col-span-3 rounded-md border border-input bg-background px-3 py-2 text-sm"
126
- />
127
- </div>
128
- <div className="grid grid-cols-4 items-center gap-4">
129
- <label htmlFor="username" className="text-right text-sm">
130
- Username
131
- </label>
132
- <input
133
- id="username"
134
- defaultValue="@peduarte"
135
- className="col-span-3 rounded-md border border-input bg-background px-3 py-2 text-sm"
136
- />
137
- </div>
138
- </div>
139
- <PopoverFooter>
140
- <button className="inline-flex h-10 items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
141
- Save changes
142
- </button>
143
- </PopoverFooter>
144
- </PopoverContent>
145
- </Popover>
146
- )
147
- }
148
-
149
- export function BasicPopoverExample() {
150
- return (
151
- <Popover>
152
- <PopoverTrigger asChild>
153
- <button className="rounded-md border px-4 py-2">Open</button>
154
- </PopoverTrigger>
155
- <PopoverContent>
156
- <PopoverClose />
157
- <div className="p-4">
158
- <h4 className="font-semibold">Popover Content</h4>
159
- <p className="text-sm text-muted-foreground">
160
- This is a basic popover example with some content.
161
- </p>
162
- </div>
163
- </PopoverContent>
164
- </Popover>
165
- )
166
- }
167
-
168
- export function FormPopoverExample() {
169
- return (
170
- <Popover>
171
- <PopoverTrigger asChild>
172
- <button className="rounded-md bg-blue-600 px-4 py-2 text-white">
173
- Contact Us
174
- </button>
175
- </PopoverTrigger>
176
- <PopoverContent className="w-96">
177
- <PopoverHeader>
178
- <PopoverTitle>Contact Form</PopoverTitle>
179
- <PopoverDescription>
180
- Fill out the form below and we'll get back to you soon.
181
- </PopoverDescription>
182
- </PopoverHeader>
183
- <div className="space-y-4 py-4">
184
- <input
185
- placeholder="Your email"
186
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
187
- />
188
- <textarea
189
- placeholder="Your message"
190
- rows={3}
191
- className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
192
- />
193
- </div>
194
- <PopoverFooter>
195
- <button className="rounded-md bg-primary px-4 py-2 text-primary-foreground">
196
- Send Message
197
- </button>
198
- </PopoverFooter>
199
- </PopoverContent>
200
- </Popover>
201
- )
202
- }
203
-
204
- export function NotificationPopoverExample() {
205
- return (
206
- <Popover>
207
- <PopoverTrigger asChild>
208
- <button className="relative rounded-md border px-4 py-2">
209
- Notifications
210
- <span className="absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-xs text-white">
211
- 3
212
- </span>
213
- </button>
214
- </PopoverTrigger>
215
- <PopoverContent className="w-80 p-0">
216
- <PopoverHeader className="border-b p-4">
217
- <PopoverTitle>Notifications</PopoverTitle>
218
- </PopoverHeader>
219
- <div className="p-2">
220
- <div className="rounded-md bg-muted p-3 text-sm">
221
- <p className="font-medium">New message received</p>
222
- <p className="text-muted-foreground">2 minutes ago</p>
223
- </div>
224
- <div className="mt-2 rounded-md p-3 text-sm">
225
- <p className="font-medium">Payment processed</p>
226
- <p className="text-muted-foreground">1 hour ago</p>
227
- </div>
228
- </div>
229
- </PopoverContent>
230
- </Popover>
231
- )
232
- }
@@ -1,34 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as ProgressPrimitive from "@radix-ui/react-progress"
5
-
6
- import { cn } from "~/components/catalyst-ui"
7
-
8
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:248
9
-
10
-
11
- function Progress({
12
- className,
13
- value,
14
- ...props
15
- }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
16
- return (
17
- <ProgressPrimitive.Root
18
- data-slot="progress"
19
- className={cn(
20
- "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
21
- className
22
- )}
23
- {...props}
24
- >
25
- <ProgressPrimitive.Indicator
26
- data-slot="progress-indicator"
27
- className="bg-primary h-full w-full flex-1 transition-all"
28
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
29
- />
30
- </ProgressPrimitive.Root>
31
- )
32
- }
33
-
34
- export { Progress }
@@ -1,43 +0,0 @@
1
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
2
- import { Circle } from "lucide-react";
3
- import React from "react";
4
- import { cn } from "~/components/catalyst-ui";
5
-
6
- // @dev app/components/catalyst-ui/data/primitive-data.tsx:2878
7
- const RadioGroup = React.forwardRef<
8
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
10
- >(({ className, ...props }, ref) => {
11
- return (
12
- <RadioGroupPrimitive.Root
13
- className={cn("grid gap-2", className)}
14
- {...props}
15
- ref={ref}
16
- />
17
- );
18
- });
19
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
20
-
21
- const RadioGroupItem = React.forwardRef<
22
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
23
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
24
- >(({ className, ...props }, ref) => {
25
- return (
26
- <RadioGroupPrimitive.Item
27
- ref={ref}
28
- className={cn(
29
- "aspect-square h-5 w-5 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
30
- className
31
- )}
32
- {...props}
33
- >
34
- <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
35
- <Circle className="h-3 w-3 fill-current text-current" />
36
- </RadioGroupPrimitive.Indicator>
37
- </RadioGroupPrimitive.Item>
38
- );
39
- });
40
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
41
-
42
- export { RadioGroup, RadioGroupItem , };
43
- // RadioCardItem