@turtleclub/ui 0.7.0-beta.33 → 0.7.0-beta.35

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 (135) hide show
  1. package/dist/index.cjs +10331 -110
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +7227 -48026
  4. package/dist/index.js.map +1 -1
  5. package/package.json +17 -11
  6. package/.prettierrc.json +0 -4
  7. package/.turbo/turbo-build.log +0 -182
  8. package/CHANGELOG.md +0 -801
  9. package/components.json +0 -21
  10. package/src/components/charts/QUICK_REFERENCE.md +0 -323
  11. package/src/components/charts/README.md +0 -658
  12. package/src/components/charts/RECHARTS_FEATURES.md +0 -458
  13. package/src/components/charts/area-chart.tsx +0 -248
  14. package/src/components/charts/bar-chart.tsx +0 -362
  15. package/src/components/charts/index.ts +0 -4
  16. package/src/components/charts/pie-chart.tsx +0 -277
  17. package/src/components/charts/radial-chart.tsx +0 -312
  18. package/src/components/features/api-status/index.tsx +0 -23
  19. package/src/components/features/data-table/data-table.tsx +0 -538
  20. package/src/components/features/data-table/expand-toggle.tsx +0 -17
  21. package/src/components/features/data-table/fuzzy-filter.tsx +0 -34
  22. package/src/components/features/data-table/index.ts +0 -3
  23. package/src/components/features/data-table/item-info.tsx +0 -19
  24. package/src/components/features/data-table/skeleton.tsx +0 -23
  25. package/src/components/features/data-table/sort-dropdown.tsx +0 -118
  26. package/src/components/features/data-table/sortable-header.tsx +0 -37
  27. package/src/components/features/index.ts +0 -6
  28. package/src/components/features/page-heading.tsx +0 -27
  29. package/src/components/features/search-bar.tsx +0 -55
  30. package/src/components/features/segmented-navigation.tsx +0 -18
  31. package/src/components/features/sidebar-layout.tsx +0 -279
  32. package/src/components/features/turtle-tooltip.tsx +0 -67
  33. package/src/components/icons/arrow.tsx +0 -23
  34. package/src/components/icons/beta.tsx +0 -95
  35. package/src/components/icons/dot.tsx +0 -102
  36. package/src/components/icons/index.ts +0 -7
  37. package/src/components/icons/issue.tsx +0 -106
  38. package/src/components/icons/turtle.tsx +0 -156
  39. package/src/components/icons/update.tsx +0 -113
  40. package/src/components/icons/warning.tsx +0 -95
  41. package/src/components/molecules/index.ts +0 -9
  42. package/src/components/molecules/opportunity/index.ts +0 -10
  43. package/src/components/molecules/opportunity/opportunity-apr.tsx +0 -129
  44. package/src/components/molecules/opportunity/opportunity-disclaimer.tsx +0 -46
  45. package/src/components/molecules/opportunity/opportunity-rate-estimator.tsx +0 -62
  46. package/src/components/molecules/opportunity/opportunity-section.tsx +0 -113
  47. package/src/components/molecules/opportunity/opportunity-selector.tsx +0 -30
  48. package/src/components/molecules/opportunity/opportunity-type.tsx +0 -16
  49. package/src/components/molecules/route-details.tsx +0 -112
  50. package/src/components/molecules/slippage-selector.tsx +0 -200
  51. package/src/components/molecules/swap-details.tsx +0 -55
  52. package/src/components/molecules/swap-input.tsx +0 -186
  53. package/src/components/molecules/tabs.tsx +0 -79
  54. package/src/components/molecules/token-selector.tsx +0 -180
  55. package/src/components/molecules/tx-status.tsx +0 -312
  56. package/src/components/molecules/widget/asset-list/asset-filters.tsx +0 -113
  57. package/src/components/molecules/widget/asset-list/asset-list.tsx +0 -178
  58. package/src/components/molecules/widget/asset-list/asset-row.tsx +0 -45
  59. package/src/components/molecules/widget/asset-list/hooks/index.ts +0 -2
  60. package/src/components/molecules/widget/asset-list/hooks/use-asset-filtering.ts +0 -44
  61. package/src/components/molecules/widget/asset-list/hooks/use-asset-grouping.ts +0 -87
  62. package/src/components/molecules/widget/asset-list/index.ts +0 -3
  63. package/src/components/molecules/widget/base-selector.tsx +0 -121
  64. package/src/components/molecules/widget/campaign-item.tsx +0 -82
  65. package/src/components/molecules/widget/deal-item.tsx +0 -92
  66. package/src/components/molecules/widget/index.ts +0 -36
  67. package/src/components/molecules/widget/opportunity-item.tsx +0 -105
  68. package/src/components/molecules/widget/widget-item-stats.tsx +0 -50
  69. package/src/components/molecules/widget/widget-item.tsx +0 -139
  70. package/src/components/molecules/widget/widget-list-items.tsx +0 -86
  71. package/src/components/ui/alert-dialog.tsx +0 -163
  72. package/src/components/ui/animated-background/animated-background.tsx +0 -182
  73. package/src/components/ui/animated-background/index.ts +0 -1
  74. package/src/components/ui/avatar.tsx +0 -73
  75. package/src/components/ui/badge.tsx +0 -59
  76. package/src/components/ui/banner.tsx +0 -84
  77. package/src/components/ui/button.tsx +0 -100
  78. package/src/components/ui/card.tsx +0 -119
  79. package/src/components/ui/chart.tsx +0 -346
  80. package/src/components/ui/checkbox.tsx +0 -32
  81. package/src/components/ui/chip.tsx +0 -52
  82. package/src/components/ui/collapsible.tsx +0 -34
  83. package/src/components/ui/combobox.tsx +0 -730
  84. package/src/components/ui/command.tsx +0 -184
  85. package/src/components/ui/dialog.tsx +0 -129
  86. package/src/components/ui/dropdown.tsx +0 -316
  87. package/src/components/ui/field.tsx +0 -244
  88. package/src/components/ui/heading.tsx +0 -74
  89. package/src/components/ui/hover-card.tsx +0 -139
  90. package/src/components/ui/icon-animation.tsx +0 -82
  91. package/src/components/ui/icon-list.tsx +0 -168
  92. package/src/components/ui/index.ts +0 -48
  93. package/src/components/ui/info-card.tsx +0 -110
  94. package/src/components/ui/input-group.tsx +0 -170
  95. package/src/components/ui/input.tsx +0 -72
  96. package/src/components/ui/label-with-icon.tsx +0 -122
  97. package/src/components/ui/label.tsx +0 -24
  98. package/src/components/ui/multi-select.tsx +0 -1090
  99. package/src/components/ui/navigation-bar.tsx +0 -153
  100. package/src/components/ui/navigation-menu.tsx +0 -188
  101. package/src/components/ui/opportunity-details-v1.tsx +0 -104
  102. package/src/components/ui/pagination.tsx +0 -127
  103. package/src/components/ui/popover.tsx +0 -48
  104. package/src/components/ui/scroll-area.tsx +0 -64
  105. package/src/components/ui/segment-control.tsx +0 -146
  106. package/src/components/ui/select.tsx +0 -199
  107. package/src/components/ui/separator.tsx +0 -26
  108. package/src/components/ui/sheet.tsx +0 -139
  109. package/src/components/ui/sidebar.tsx +0 -728
  110. package/src/components/ui/skeleton.tsx +0 -14
  111. package/src/components/ui/slider.tsx +0 -58
  112. package/src/components/ui/sonner.tsx +0 -24
  113. package/src/components/ui/switch.tsx +0 -29
  114. package/src/components/ui/table-shadcn.tsx +0 -110
  115. package/src/components/ui/table.tsx +0 -117
  116. package/src/components/ui/textarea.tsx +0 -22
  117. package/src/components/ui/toggle-group.tsx +0 -71
  118. package/src/components/ui/toggle.tsx +0 -47
  119. package/src/components/ui/tooltip.tsx +0 -66
  120. package/src/hooks/index.ts +0 -1
  121. package/src/hooks/useIsMobile.ts +0 -77
  122. package/src/index.ts +0 -16
  123. package/src/lib/utils.ts +0 -6
  124. package/src/styles/globals.css +0 -181
  125. package/src/styles/themes/index.css +0 -9
  126. package/src/styles/themes/semantic.css +0 -117
  127. package/src/styles/tokens/colors.css +0 -124
  128. package/src/styles/tokens/index.css +0 -15
  129. package/src/styles/tokens/radius.css +0 -18
  130. package/src/styles/tokens/spacing.css +0 -58
  131. package/src/styles/tokens/typography.css +0 -87
  132. package/src/tokens/index.ts +0 -108
  133. package/tsconfig.json +0 -20
  134. package/vite.config.js +0 -49
  135. /package/{src/images/enso.png → dist/enso-22FJ4GNK.png} +0 -0
@@ -1,153 +0,0 @@
1
- "use client";
2
- import * as React from "react";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const navigationBarVariants = cva("flex w-full", {
8
- variants: {
9
- variant: {
10
- default: "border-border bg-background justify-between border shadow-sm",
11
- transparent:
12
- "border-border justify-between border bg-transparent shadow-sm",
13
- menuBar:
14
- "border-border bg-background relative h-9 gap-2 rounded-full border font-medium shadow-sm",
15
- },
16
- },
17
- defaultVariants: {
18
- variant: "default",
19
- },
20
- });
21
-
22
- const navigationItemVariants = cva(
23
- "flex cursor-pointer items-center justify-center font-medium whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50",
24
- {
25
- variants: {
26
- variant: {
27
- default: "text-muted-foreground hover:text-foreground text-sm",
28
- active: "text-primary bg-muted text-sm",
29
- menuBarDefault:
30
- "text-foreground hover:text-primary relative z-[1] w-full rounded-full px-3 py-1.5 text-sm",
31
- menuBarActive:
32
- "text-primary relative z-[1] w-full rounded-full px-3 py-1.5 text-sm",
33
- },
34
- },
35
- defaultVariants: {
36
- variant: "default",
37
- },
38
- },
39
- );
40
-
41
- export interface NavigationBarProps
42
- extends React.ComponentProps<"nav">,
43
- VariantProps<typeof navigationBarVariants> {
44
- activeValue?: string;
45
- }
46
-
47
- export interface NavigationItemProps
48
- extends React.ComponentProps<"button">,
49
- VariantProps<typeof navigationItemVariants> {
50
- active?: boolean;
51
- value?: string;
52
- }
53
-
54
- const NavigationBar = React.forwardRef<HTMLElement, NavigationBarProps>(
55
- ({ className, variant, activeValue, children, ...props }, ref) => {
56
- const containerRef = React.useRef<HTMLElement>(null);
57
- const indicatorRef = React.useRef<HTMLDivElement>(null);
58
-
59
- // Function to update the indicator position and size based on the active button
60
- const updateIndicatorPosition = React.useCallback(() => {
61
- if (
62
- variant !== "menuBar" ||
63
- !containerRef.current ||
64
- !indicatorRef.current
65
- )
66
- return;
67
-
68
- const activeButton = containerRef.current.querySelector(
69
- `[data-active="true"]`,
70
- ) as HTMLElement;
71
- if (activeButton) {
72
- indicatorRef.current.style.width = `${activeButton.offsetWidth}px`;
73
- indicatorRef.current.style.left = `${activeButton.offsetLeft}px`;
74
- }
75
- }, [variant]);
76
-
77
- // Create ResizeObserver to handle indicator container size changes
78
- React.useEffect(() => {
79
- if (variant !== "menuBar") return;
80
-
81
- updateIndicatorPosition();
82
-
83
- const resizeObserver = new ResizeObserver(updateIndicatorPosition);
84
-
85
- if (containerRef.current) {
86
- resizeObserver.observe(containerRef.current);
87
- }
88
-
89
- return () => {
90
- resizeObserver.disconnect();
91
- };
92
- }, [activeValue, updateIndicatorPosition, variant]);
93
-
94
- return (
95
- <nav
96
- ref={ref || containerRef}
97
- className={cn(navigationBarVariants({ variant, className }))}
98
- {...props}
99
- >
100
- {variant === "menuBar" && (
101
- <div
102
- ref={indicatorRef}
103
- className="bg-secondary absolute bottom-0 h-full origin-left rounded-full transition-all duration-300"
104
- />
105
- )}
106
- {children}
107
- </nav>
108
- );
109
- },
110
- );
111
-
112
- NavigationBar.displayName = "NavigationBar";
113
-
114
- const NavigationItem = React.forwardRef<HTMLButtonElement, NavigationItemProps>(
115
- ({ className, variant, active, value, ...props }, ref) => {
116
- // Determine the correct variant based on parent and state
117
- const getItemVariant = () => {
118
- if (variant === "menuBarDefault" || variant === "menuBarActive") {
119
- return active ? "menuBarActive" : "menuBarDefault";
120
- }
121
- return active ? "active" : variant || "default";
122
- };
123
-
124
- const appliedVariant = getItemVariant();
125
- const isMenuBar =
126
- appliedVariant === "menuBarDefault" || appliedVariant === "menuBarActive";
127
-
128
- return (
129
- <button
130
- ref={ref}
131
- data-active={active}
132
- data-value={value}
133
- className={cn(
134
- navigationItemVariants({
135
- variant: appliedVariant,
136
- className,
137
- }),
138
- !isMenuBar && "rounded-md px-4 py-2",
139
- )}
140
- {...props}
141
- />
142
- );
143
- },
144
- );
145
-
146
- NavigationItem.displayName = "NavigationItem";
147
-
148
- export {
149
- NavigationBar,
150
- NavigationItem,
151
- navigationBarVariants,
152
- navigationItemVariants,
153
- };
@@ -1,188 +0,0 @@
1
- import * as React from "react";
2
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
3
- import { cva } from "class-variance-authority";
4
- import { ChevronDownIcon } from "lucide-react";
5
-
6
- import { cn } from "@/lib/utils";
7
- import { buttonVariants } from "./button";
8
- import { DotIcon } from "../icons";
9
-
10
- function NavigationMenu({
11
- className,
12
- children,
13
- viewport = true,
14
- ...props
15
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
16
- viewport?: boolean;
17
- }) {
18
- return (
19
- <NavigationMenuPrimitive.Root
20
- data-slot="navigation-menu"
21
- data-viewport={viewport}
22
- className={cn(
23
- "group/navigation-menu relative flex w-full flex-1 items-center justify-between",
24
- "border-border bg-background h-[70px] gap-2.5 rounded-full border px-5",
25
- className,
26
- )}
27
- {...props}
28
- >
29
- {children}
30
- {viewport && <NavigationMenuViewport />}
31
- </NavigationMenuPrimitive.Root>
32
- );
33
- }
34
-
35
- function NavigationMenuList({
36
- className,
37
- ...props
38
- }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
39
- return (
40
- <NavigationMenuPrimitive.List
41
- data-slot="navigation-menu-list"
42
- className={cn(
43
- "group flex flex-1 list-none items-center justify-center gap-1",
44
- className,
45
- )}
46
- {...props}
47
- />
48
- );
49
- }
50
-
51
- function NavigationMenuItem({
52
- className,
53
- ...props
54
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
55
- return (
56
- <NavigationMenuPrimitive.Item
57
- data-slot="navigation-menu-item"
58
- className={cn("relative", className)}
59
- {...props}
60
- />
61
- );
62
- }
63
-
64
- const navigationMenuTriggerStyle = cva(
65
- "group bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground 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 inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50",
66
- );
67
-
68
- function NavigationMenuTrigger({
69
- className,
70
- children,
71
- ...props
72
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
73
- return (
74
- <NavigationMenuPrimitive.Trigger
75
- data-slot="navigation-menu-trigger"
76
- className={cn(navigationMenuTriggerStyle(), "group", className)}
77
- {...props}
78
- >
79
- {children}{" "}
80
- <ChevronDownIcon
81
- className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
82
- aria-hidden="true"
83
- />
84
- </NavigationMenuPrimitive.Trigger>
85
- );
86
- }
87
-
88
- function NavigationMenuContent({
89
- className,
90
- ...props
91
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
92
- return (
93
- <NavigationMenuPrimitive.Content
94
- data-slot="navigation-menu-content"
95
- className={cn(
96
- "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",
97
- "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",
98
- className,
99
- )}
100
- {...props}
101
- />
102
- );
103
- }
104
-
105
- function NavigationMenuViewport({
106
- className,
107
- ...props
108
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
109
- return (
110
- <div
111
- className={cn(
112
- "absolute top-full left-0 isolate z-50 flex justify-center",
113
- )}
114
- >
115
- <NavigationMenuPrimitive.Viewport
116
- data-slot="navigation-menu-viewport"
117
- className={cn(
118
- "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)]",
119
- className,
120
- )}
121
- {...props}
122
- />
123
- </div>
124
- );
125
- }
126
-
127
- function NavigationMenuLink({
128
- children,
129
- className,
130
- ...props
131
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
132
- return (
133
- <NavigationMenuPrimitive.Link
134
- data-slot="navigation-menu-link"
135
- className={cn(
136
- "group",
137
- "data-[active=true]:from-primary data-[active=true]:via-primary/20 data-[active=true]:to-primary/30 data-[active=true]:bg-gradient-to-b",
138
- "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 rounded-full transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1",
139
- )}
140
- >
141
- <div
142
- className={cn(
143
- buttonVariants({
144
- variant: "menu",
145
- size: "default",
146
- className: cn("w-full", className),
147
- }),
148
- )}
149
- >
150
- {children}
151
-
152
- <div className="relative hidden size-[18px] shrink-0 group-data-[active=true]:block">
153
- <DotIcon className="text-primary absolute top-[-15px] left-[-15px] size-12" />
154
- </div>
155
- </div>
156
- </NavigationMenuPrimitive.Link>
157
- );
158
- }
159
-
160
- function NavigationMenuIndicator({
161
- className,
162
- ...props
163
- }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
164
- return (
165
- <NavigationMenuPrimitive.Indicator
166
- data-slot="navigation-menu-indicator"
167
- className={cn(
168
- "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",
169
- className,
170
- )}
171
- {...props}
172
- >
173
- <div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
174
- </NavigationMenuPrimitive.Indicator>
175
- );
176
- }
177
-
178
- export {
179
- NavigationMenu,
180
- NavigationMenuList,
181
- NavigationMenuItem,
182
- NavigationMenuContent,
183
- NavigationMenuTrigger,
184
- NavigationMenuLink,
185
- NavigationMenuIndicator,
186
- NavigationMenuViewport,
187
- navigationMenuTriggerStyle,
188
- };
@@ -1,104 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "@/lib/utils";
3
- import { Card } from "./card";
4
- import { InfoCard } from "./info-card";
5
- import { LabelWithIcon } from "./label-with-icon";
6
- import { Button } from "./button";
7
- import { ChevronDownIcon, ExternalLinkIcon } from "lucide-react";
8
-
9
- interface InfoCardData {
10
- title: string;
11
- value: string;
12
- color?: "primary" | "secondary" | "accent" | "success" | "warning" | "error";
13
- iconUrl?: string;
14
- }
15
-
16
- interface OpportunityDetailsV1Props {
17
- value: {
18
- title?: string;
19
- titleIcon?: React.ReactNode;
20
- url?: string;
21
- topCards: readonly InfoCardData[]; // Flexible array for top row
22
- bottomCards: readonly InfoCardData[]; // Flexible array for bottom
23
- onTitleClick?: () => void;
24
- };
25
- className?: string;
26
- }
27
-
28
- function OpportunityDetailsV1({ value, className }: OpportunityDetailsV1Props) {
29
- const { title, titleIcon, url, topCards, bottomCards, onTitleClick } = value;
30
- const defaultTitleIcon = (
31
- <div className="bg-primary/20 flex h-8 w-8 items-center justify-center rounded-full">
32
- <svg className="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
33
- <path d="M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z" />
34
- </svg>
35
- </div>
36
- );
37
- return (
38
- <Card variant="border" className={cn("space-y-4", className)}>
39
- {/* TODO: Add scroll area */}
40
- <div className="h-full overflow-y-auto">
41
- <div className="space-y-4">
42
- {/* Header with LabelWithIcon */}
43
- {(title || titleIcon) && (
44
- <div className="flex items-center">
45
- <div
46
- className="border-border bg-card hover:bg-secondary flex cursor-pointer items-center justify-between gap-3 rounded-full border py-0 pr-3 pl-0"
47
- onClick={onTitleClick}
48
- >
49
- <LabelWithIcon
50
- icon={titleIcon || defaultTitleIcon}
51
- textSize="sm"
52
- iconSize="sm"
53
- >
54
- {title}
55
- </LabelWithIcon>
56
- <ChevronDownIcon className="h-4 w-4" />
57
- </div>
58
- {url && (
59
- <Button size="icon" className="ml-auto">
60
- <a href={url} target="_blank" rel="noopener noreferrer">
61
- <ExternalLinkIcon />
62
- </a>
63
- </Button>
64
- )}
65
- </div>
66
- )}
67
-
68
- {/* Top row: Dynamic InfoCards with responsive grid */}
69
- {/* Improve: Create a better grid definition */}
70
- <div className="grid grid-cols-3 gap-3">
71
- {topCards.map((card, index) => (
72
- <InfoCard
73
- key={index}
74
- title={card.title}
75
- value={card.value}
76
- color={card.color || "primary"}
77
- iconUrl={card.iconUrl}
78
- titleSize="sm"
79
- align="left"
80
- />
81
- ))}
82
- </div>
83
-
84
- {/* Bottom section: InfoCards full width, one below another */}
85
- <div className="space-y-2">
86
- {bottomCards.map((card, index) => (
87
- <InfoCard
88
- key={index}
89
- iconUrl={card.iconUrl}
90
- title={card.title}
91
- value={card.value}
92
- titleSize="sm"
93
- align="left"
94
- className="w-full"
95
- />
96
- ))}
97
- </div>
98
- </div>
99
- </div>
100
- </Card>
101
- );
102
- }
103
-
104
- export { OpportunityDetailsV1, type InfoCardData };
@@ -1,127 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- ChevronLeftIcon,
4
- ChevronRightIcon,
5
- MoreHorizontalIcon,
6
- } from "lucide-react";
7
-
8
- import { cn } from "@/lib/utils";
9
- import { Button, buttonVariants } from "@/components/ui/button";
10
-
11
- function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
- return (
13
- <nav
14
- role="navigation"
15
- aria-label="pagination"
16
- data-slot="pagination"
17
- className={cn("mx-auto flex w-full justify-center", className)}
18
- {...props}
19
- />
20
- );
21
- }
22
-
23
- function PaginationContent({
24
- className,
25
- ...props
26
- }: React.ComponentProps<"ul">) {
27
- return (
28
- <ul
29
- data-slot="pagination-content"
30
- className={cn("flex flex-row items-center gap-1", className)}
31
- {...props}
32
- />
33
- );
34
- }
35
-
36
- function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37
- return <li data-slot="pagination-item" {...props} />;
38
- }
39
-
40
- type PaginationLinkProps = {
41
- isActive?: boolean;
42
- } & Pick<React.ComponentProps<typeof Button>, "size"> &
43
- React.ComponentProps<"a">;
44
-
45
- function PaginationLink({
46
- className,
47
- isActive,
48
- size = "icon",
49
- ...props
50
- }: PaginationLinkProps) {
51
- return (
52
- <a
53
- aria-current={isActive ? "page" : undefined}
54
- data-slot="pagination-link"
55
- data-active={isActive}
56
- className={cn(
57
- buttonVariants({
58
- variant: isActive ? "default" : "ghost",
59
- size,
60
- }),
61
- className,
62
- )}
63
- {...props}
64
- />
65
- );
66
- }
67
-
68
- function PaginationPrevious({
69
- className,
70
- ...props
71
- }: React.ComponentProps<typeof PaginationLink>) {
72
- return (
73
- <PaginationLink
74
- aria-label="Go to previous page"
75
- size="default"
76
- className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
77
- {...props}
78
- >
79
- <ChevronLeftIcon />
80
- <span className="hidden sm:block">Previous</span>
81
- </PaginationLink>
82
- );
83
- }
84
-
85
- function PaginationNext({
86
- className,
87
- ...props
88
- }: React.ComponentProps<typeof PaginationLink>) {
89
- return (
90
- <PaginationLink
91
- aria-label="Go to next page"
92
- size="default"
93
- className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
94
- {...props}
95
- >
96
- <span className="hidden sm:block">Next</span>
97
- <ChevronRightIcon />
98
- </PaginationLink>
99
- );
100
- }
101
-
102
- function PaginationEllipsis({
103
- className,
104
- ...props
105
- }: React.ComponentProps<"span">) {
106
- return (
107
- <span
108
- aria-hidden
109
- data-slot="pagination-ellipsis"
110
- className={cn("flex size-9 items-center justify-center", className)}
111
- {...props}
112
- >
113
- <MoreHorizontalIcon className="size-4" />
114
- <span className="sr-only">More pages</span>
115
- </span>
116
- );
117
- }
118
-
119
- export {
120
- Pagination,
121
- PaginationContent,
122
- PaginationLink,
123
- PaginationItem,
124
- PaginationPrevious,
125
- PaginationNext,
126
- PaginationEllipsis,
127
- };
@@ -1,48 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Popover({
9
- ...props
10
- }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
12
- }
13
-
14
- function PopoverTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
17
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
18
- }
19
-
20
- function PopoverContent({
21
- className,
22
- align = "center",
23
- sideOffset = 4,
24
- ...props
25
- }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
26
- return (
27
- <PopoverPrimitive.Portal>
28
- <PopoverPrimitive.Content
29
- data-slot="popover-content"
30
- align={align}
31
- sideOffset={sideOffset}
32
- className={cn(
33
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 border-border z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
34
- className,
35
- )}
36
- {...props}
37
- />
38
- </PopoverPrimitive.Portal>
39
- );
40
- }
41
-
42
- function PopoverAnchor({
43
- ...props
44
- }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
45
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
46
- }
47
-
48
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,64 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function ScrollArea({
9
- className,
10
- children,
11
- ...props
12
- }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13
- return (
14
- <ScrollAreaPrimitive.Root
15
- data-slot="scroll-area"
16
- className={cn("relative", className)}
17
- {...props}
18
- >
19
- <ScrollAreaPrimitive.Viewport
20
- data-slot="scroll-area-viewport"
21
- className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
22
- >
23
- {children}
24
- </ScrollAreaPrimitive.Viewport>
25
- <ScrollBar />
26
- <ScrollBar orientation="horizontal" />
27
- <ScrollAreaPrimitive.Corner />
28
- </ScrollAreaPrimitive.Root>
29
- );
30
- }
31
-
32
- function ScrollBar({
33
- className,
34
- orientation = "vertical",
35
- ...props
36
- }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
37
- return (
38
- <ScrollAreaPrimitive.ScrollAreaScrollbar
39
- data-slot="scroll-area-scrollbar"
40
- orientation={orientation}
41
- className={cn(
42
- "flex touch-none p-px transition-colors select-none",
43
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
44
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
45
- className
46
- )}
47
- style={{
48
- ...(orientation === "vertical" ? { width: "6px" } : { height: "6px" }),
49
- }}
50
- {...props}
51
- >
52
- <ScrollAreaPrimitive.ScrollAreaThumb
53
- data-slot="scroll-area-thumb"
54
- className="relative flex-1"
55
- style={{
56
- backgroundColor: "rgba(255, 255, 255, 0.3)",
57
- borderRadius: "20px",
58
- }}
59
- />
60
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
61
- );
62
- }
63
-
64
- export { ScrollArea, ScrollBar };