@turtleclub/ui 0.7.0-beta.32 → 0.7.0-beta.34

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 (139) hide show
  1. package/dist/index.cjs +10331 -110
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +7652 -47844
  4. package/dist/index.js.map +1 -1
  5. package/dist/types/components/features/sidebar-layout.d.ts +2 -0
  6. package/dist/types/components/features/sidebar-layout.d.ts.map +1 -1
  7. package/dist/types/components/ui/chart.d.ts +1 -1
  8. package/dist/types/components/ui/chart.d.ts.map +1 -1
  9. package/package.json +26 -22
  10. package/.prettierrc.json +0 -4
  11. package/.turbo/turbo-build.log +0 -182
  12. package/CHANGELOG.md +0 -795
  13. package/components.json +0 -21
  14. package/src/components/charts/QUICK_REFERENCE.md +0 -323
  15. package/src/components/charts/README.md +0 -658
  16. package/src/components/charts/RECHARTS_FEATURES.md +0 -458
  17. package/src/components/charts/area-chart.tsx +0 -248
  18. package/src/components/charts/bar-chart.tsx +0 -362
  19. package/src/components/charts/index.ts +0 -4
  20. package/src/components/charts/pie-chart.tsx +0 -277
  21. package/src/components/charts/radial-chart.tsx +0 -312
  22. package/src/components/features/api-status/index.tsx +0 -23
  23. package/src/components/features/data-table/data-table.tsx +0 -538
  24. package/src/components/features/data-table/expand-toggle.tsx +0 -17
  25. package/src/components/features/data-table/fuzzy-filter.tsx +0 -34
  26. package/src/components/features/data-table/index.ts +0 -3
  27. package/src/components/features/data-table/item-info.tsx +0 -19
  28. package/src/components/features/data-table/skeleton.tsx +0 -23
  29. package/src/components/features/data-table/sort-dropdown.tsx +0 -118
  30. package/src/components/features/data-table/sortable-header.tsx +0 -37
  31. package/src/components/features/index.ts +0 -6
  32. package/src/components/features/page-heading.tsx +0 -27
  33. package/src/components/features/search-bar.tsx +0 -55
  34. package/src/components/features/segmented-navigation.tsx +0 -18
  35. package/src/components/features/sidebar-layout.tsx +0 -193
  36. package/src/components/features/turtle-tooltip.tsx +0 -67
  37. package/src/components/icons/arrow.tsx +0 -23
  38. package/src/components/icons/beta.tsx +0 -95
  39. package/src/components/icons/dot.tsx +0 -102
  40. package/src/components/icons/index.ts +0 -7
  41. package/src/components/icons/issue.tsx +0 -106
  42. package/src/components/icons/turtle.tsx +0 -156
  43. package/src/components/icons/update.tsx +0 -113
  44. package/src/components/icons/warning.tsx +0 -95
  45. package/src/components/molecules/index.ts +0 -9
  46. package/src/components/molecules/opportunity/index.ts +0 -10
  47. package/src/components/molecules/opportunity/opportunity-apr.tsx +0 -129
  48. package/src/components/molecules/opportunity/opportunity-disclaimer.tsx +0 -46
  49. package/src/components/molecules/opportunity/opportunity-rate-estimator.tsx +0 -62
  50. package/src/components/molecules/opportunity/opportunity-section.tsx +0 -113
  51. package/src/components/molecules/opportunity/opportunity-selector.tsx +0 -30
  52. package/src/components/molecules/opportunity/opportunity-type.tsx +0 -16
  53. package/src/components/molecules/route-details.tsx +0 -112
  54. package/src/components/molecules/slippage-selector.tsx +0 -200
  55. package/src/components/molecules/swap-details.tsx +0 -55
  56. package/src/components/molecules/swap-input.tsx +0 -186
  57. package/src/components/molecules/tabs.tsx +0 -79
  58. package/src/components/molecules/token-selector.tsx +0 -180
  59. package/src/components/molecules/tx-status.tsx +0 -312
  60. package/src/components/molecules/widget/asset-list/asset-filters.tsx +0 -113
  61. package/src/components/molecules/widget/asset-list/asset-list.tsx +0 -178
  62. package/src/components/molecules/widget/asset-list/asset-row.tsx +0 -45
  63. package/src/components/molecules/widget/asset-list/hooks/index.ts +0 -2
  64. package/src/components/molecules/widget/asset-list/hooks/use-asset-filtering.ts +0 -44
  65. package/src/components/molecules/widget/asset-list/hooks/use-asset-grouping.ts +0 -87
  66. package/src/components/molecules/widget/asset-list/index.ts +0 -3
  67. package/src/components/molecules/widget/base-selector.tsx +0 -121
  68. package/src/components/molecules/widget/campaign-item.tsx +0 -82
  69. package/src/components/molecules/widget/deal-item.tsx +0 -92
  70. package/src/components/molecules/widget/index.ts +0 -36
  71. package/src/components/molecules/widget/opportunity-item.tsx +0 -105
  72. package/src/components/molecules/widget/widget-item-stats.tsx +0 -50
  73. package/src/components/molecules/widget/widget-item.tsx +0 -139
  74. package/src/components/molecules/widget/widget-list-items.tsx +0 -86
  75. package/src/components/ui/alert-dialog.tsx +0 -163
  76. package/src/components/ui/animated-background/animated-background.tsx +0 -182
  77. package/src/components/ui/animated-background/index.ts +0 -1
  78. package/src/components/ui/avatar.tsx +0 -73
  79. package/src/components/ui/badge.tsx +0 -59
  80. package/src/components/ui/banner.tsx +0 -84
  81. package/src/components/ui/button.tsx +0 -100
  82. package/src/components/ui/card.tsx +0 -119
  83. package/src/components/ui/chart.tsx +0 -346
  84. package/src/components/ui/checkbox.tsx +0 -32
  85. package/src/components/ui/chip.tsx +0 -52
  86. package/src/components/ui/collapsible.tsx +0 -34
  87. package/src/components/ui/combobox.tsx +0 -730
  88. package/src/components/ui/command.tsx +0 -184
  89. package/src/components/ui/dialog.tsx +0 -129
  90. package/src/components/ui/dropdown.tsx +0 -316
  91. package/src/components/ui/field.tsx +0 -244
  92. package/src/components/ui/heading.tsx +0 -74
  93. package/src/components/ui/hover-card.tsx +0 -139
  94. package/src/components/ui/icon-animation.tsx +0 -82
  95. package/src/components/ui/icon-list.tsx +0 -168
  96. package/src/components/ui/index.ts +0 -48
  97. package/src/components/ui/info-card.tsx +0 -110
  98. package/src/components/ui/input-group.tsx +0 -170
  99. package/src/components/ui/input.tsx +0 -72
  100. package/src/components/ui/label-with-icon.tsx +0 -122
  101. package/src/components/ui/label.tsx +0 -24
  102. package/src/components/ui/multi-select.tsx +0 -1090
  103. package/src/components/ui/navigation-bar.tsx +0 -153
  104. package/src/components/ui/navigation-menu.tsx +0 -188
  105. package/src/components/ui/opportunity-details-v1.tsx +0 -104
  106. package/src/components/ui/pagination.tsx +0 -127
  107. package/src/components/ui/popover.tsx +0 -48
  108. package/src/components/ui/scroll-area.tsx +0 -64
  109. package/src/components/ui/segment-control.tsx +0 -146
  110. package/src/components/ui/select.tsx +0 -199
  111. package/src/components/ui/separator.tsx +0 -26
  112. package/src/components/ui/sheet.tsx +0 -139
  113. package/src/components/ui/sidebar.tsx +0 -728
  114. package/src/components/ui/skeleton.tsx +0 -14
  115. package/src/components/ui/slider.tsx +0 -58
  116. package/src/components/ui/sonner.tsx +0 -24
  117. package/src/components/ui/switch.tsx +0 -29
  118. package/src/components/ui/table-shadcn.tsx +0 -110
  119. package/src/components/ui/table.tsx +0 -117
  120. package/src/components/ui/textarea.tsx +0 -22
  121. package/src/components/ui/toggle-group.tsx +0 -71
  122. package/src/components/ui/toggle.tsx +0 -47
  123. package/src/components/ui/tooltip.tsx +0 -66
  124. package/src/hooks/index.ts +0 -1
  125. package/src/hooks/useIsMobile.ts +0 -77
  126. package/src/index.ts +0 -16
  127. package/src/lib/utils.ts +0 -6
  128. package/src/styles/globals.css +0 -181
  129. package/src/styles/themes/index.css +0 -9
  130. package/src/styles/themes/semantic.css +0 -117
  131. package/src/styles/tokens/colors.css +0 -124
  132. package/src/styles/tokens/index.css +0 -15
  133. package/src/styles/tokens/radius.css +0 -18
  134. package/src/styles/tokens/spacing.css +0 -58
  135. package/src/styles/tokens/typography.css +0 -87
  136. package/src/tokens/index.ts +0 -108
  137. package/tsconfig.json +0 -20
  138. package/vite.config.js +0 -49
  139. /package/{src/images/enso.png → dist/enso-22FJ4GNK.png} +0 -0
@@ -1,118 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { ArrowDown, ArrowUp, ArrowUpDown, X } from "lucide-react";
5
- import { flexRender, Header } from "@tanstack/react-table";
6
- import {
7
- DropdownMenu,
8
- DropdownMenuContent,
9
- DropdownMenuItem,
10
- DropdownMenuLabel,
11
- DropdownMenuSeparator,
12
- DropdownMenuTrigger,
13
- } from "../../ui/dropdown";
14
-
15
- interface SortDropdownProps<TData> {
16
- headers: Header<TData, unknown>[];
17
- currentSort?: { id: string; desc: boolean } | null;
18
- onSortChange: (columnId: string, desc: boolean) => void;
19
- onClearSort?: () => void;
20
- }
21
-
22
- export function SortDropdown<TData>({
23
- headers,
24
- currentSort,
25
- onSortChange,
26
- onClearSort,
27
- }: SortDropdownProps<TData>) {
28
- // Filter only sortable columns
29
- const sortableHeaders = headers.filter(
30
- (header) => header.column.getCanSort() && !header.isPlaceholder
31
- );
32
-
33
- const getCurrentSortLabel = () => {
34
- if (!currentSort) return "Sort";
35
-
36
- const header = sortableHeaders.find((h) => h.column.id === currentSort.id);
37
- if (!header) return "Sort";
38
-
39
- return (
40
- <span className="flex items-center gap-2">
41
- {currentSort.desc ? (
42
- <ArrowDown className="text-primary size-3" />
43
- ) : (
44
- <ArrowUp className="text-primary size-3" />
45
- )}
46
- <span className="truncate">
47
- {flexRender(header.column.columnDef.header, header.getContext())}
48
- </span>
49
- </span>
50
- );
51
- };
52
-
53
- const handleColumnClick = (columnId: string) => {
54
- // If this column is already sorted, toggle the direction
55
- if (currentSort?.id === columnId) {
56
- // If descending, switch to ascending; if ascending, switch to descending
57
- onSortChange(columnId, !currentSort.desc);
58
- } else {
59
- // New column, start with ascending
60
- onSortChange(columnId, false);
61
- }
62
- };
63
-
64
- if (sortableHeaders.length === 0) return null;
65
-
66
- return (
67
- <DropdownMenu>
68
- <DropdownMenuTrigger size="sm" className="bg-neutral-alpha-2">
69
- {currentSort ? (
70
- getCurrentSortLabel()
71
- ) : (
72
- <div className="text-muted-foreground flex items-center gap-2">
73
- <ArrowUpDown className="size-3" />
74
- <span>Sort by</span>
75
- </div>
76
- )}
77
- </DropdownMenuTrigger>
78
- <DropdownMenuContent align="end" className="w-[200px] space-y-1">
79
- <DropdownMenuLabel>Sort by</DropdownMenuLabel>
80
- <DropdownMenuSeparator />
81
- {sortableHeaders.map((header) => {
82
- const isCurrentAsc = currentSort?.id === header.column.id && !currentSort.desc;
83
- const isCurrentDesc = currentSort?.id === header.column.id && currentSort.desc;
84
- const isActive = currentSort?.id === header.column.id;
85
-
86
- return (
87
- <DropdownMenuItem
88
- key={header.column.id}
89
- onClick={() => handleColumnClick(header.column.id)}
90
- className={
91
- isActive ? "bg-secondary flex items-center gap-2" : "flex items-center gap-2"
92
- }
93
- >
94
- <span className="w-fit truncate">
95
- {flexRender(header.column.columnDef.header, header.getContext())}
96
- </span>
97
- {isActive &&
98
- (isCurrentDesc ? (
99
- <ArrowDown className="text-primary size-4" />
100
- ) : (
101
- <ArrowUp className="text-primary size-4" />
102
- ))}
103
- </DropdownMenuItem>
104
- );
105
- })}
106
- {currentSort && onClearSort && (
107
- <>
108
- <DropdownMenuSeparator />
109
- <DropdownMenuItem onClick={onClearSort}>
110
- <X className="size-4" />
111
- Clear sorting
112
- </DropdownMenuItem>
113
- </>
114
- )}
115
- </DropdownMenuContent>
116
- </DropdownMenu>
117
- );
118
- }
@@ -1,37 +0,0 @@
1
- "use client";
2
-
3
- import { flexRender, type Header } from "@tanstack/react-table";
4
- import { ArrowDown, ArrowUp, ArrowUpDown } from "lucide-react";
5
- import { useMemo } from "react";
6
-
7
- export default function SortableHeader({
8
- header,
9
- }: {
10
- header: Header<any, unknown>;
11
- }) {
12
- const getSortIcon = useMemo(() => {
13
- if (header.column.getIsSorted() === "asc")
14
- return <ArrowUp className="text-primary size-3.5" />;
15
- if (header.column.getIsSorted() === "desc")
16
- return <ArrowDown className="text-primary size-3.5" />;
17
- return (
18
- header.column.getCanSort() && (
19
- <ArrowUpDown className="text-secondary group-hover:text-muted-foreground size-3" />
20
- )
21
- );
22
- }, [header.column.getIsSorted(), header.column.getCanSort()]);
23
-
24
- return header.isPlaceholder ? null : (
25
- <div
26
- className={
27
- header.column.getCanSort()
28
- ? "group flex cursor-pointer items-center gap-1 select-none"
29
- : ""
30
- }
31
- onClick={header.column.getToggleSortingHandler()}
32
- >
33
- {flexRender(header.column.columnDef.header, header.getContext())}
34
- {getSortIcon}
35
- </div>
36
- );
37
- }
@@ -1,6 +0,0 @@
1
- export * from "./data-table";
2
- export * from "./search-bar";
3
- export * from "./sidebar-layout";
4
- export * from "./page-heading";
5
- export * from "./turtle-tooltip";
6
- export * from "./api-status";
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { HeadingH3, HeadingH6 } from "../ui";
3
-
4
- type PageHeadingProps = {
5
- icon?: React.ReactNode;
6
- title: string;
7
- description: string;
8
- action?: React.ReactNode;
9
- };
10
-
11
- export function PageHeading({
12
- icon,
13
- title,
14
- description,
15
- action,
16
- }: PageHeadingProps) {
17
- return (
18
- <div className="flex items-center gap-3">
19
- <div>{icon}</div>
20
- <div className="grow">
21
- <HeadingH3>{title}</HeadingH3>
22
- <HeadingH6>{description}</HeadingH6>
23
- </div>
24
- {action}
25
- </div>
26
- );
27
- }
@@ -1,55 +0,0 @@
1
- import * as React from "react";
2
- import { Input, InputProps } from "../ui";
3
- import { Search } from "lucide-react";
4
- import { cn } from "@/lib/utils";
5
-
6
- type Props = {
7
- value: string;
8
- onChange: (value: string) => void;
9
- debounce?: number;
10
- size?: "default" | "sm";
11
- } & Omit<InputProps, "onChange">;
12
-
13
- export const SearchBar: React.FC<Props> = ({
14
- value: initialValue,
15
- onChange,
16
- debounce = 300,
17
- size = "default",
18
- ...props
19
- }) => {
20
- const [value, setValue] = React.useState<string>(initialValue);
21
-
22
- const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) =>
23
- setValue(event.target.value);
24
-
25
- React.useEffect(() => {
26
- setValue(initialValue);
27
- }, [initialValue]);
28
-
29
- React.useEffect(() => {
30
- const timeout = setTimeout(() => {
31
- onChange(value);
32
- }, debounce);
33
-
34
- return () => clearTimeout(timeout);
35
- }, [value]);
36
-
37
- const inputClasses = size === "sm" ? "text-sm" : "";
38
-
39
- return (
40
- <div className="border-border relative w-full max-w-md rounded-full border">
41
- <Input
42
- value={value}
43
- onChange={handleInputChange}
44
- className={cn("-my-px h-9", inputClasses)}
45
- {...props}
46
- />
47
- <button
48
- type="button"
49
- className="bg-border border-border absolute inset-y-0 right-0 flex aspect-square h-full items-center justify-center rounded rounded-full"
50
- >
51
- <Search className="text-primary size-3" />
52
- </button>
53
- </div>
54
- );
55
- };
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import { SegmentControl, SegmentControlProps } from "../ui";
3
-
4
- type SegmentedNavigationProps<T extends string> = SegmentControlProps<T> & {
5
- shouldMobileSelect: boolean;
6
- };
7
-
8
- export function SegmentedNavigation<T extends string>({
9
- value,
10
- onChange,
11
- items,
12
- }: SegmentedNavigationProps<T>) {
13
- return (
14
- <div className="">
15
- <SegmentControl value={value} onChange={onChange} items={items} />
16
- </div>
17
- );
18
- }
@@ -1,193 +0,0 @@
1
- import React from "react";
2
- import { ChevronRight } from "lucide-react";
3
- import {
4
- Sidebar,
5
- SidebarProvider,
6
- SidebarHeader,
7
- SidebarContent,
8
- SidebarGroup,
9
- SidebarGroupContent,
10
- SidebarMenu,
11
- SidebarMenuItem,
12
- SidebarMenuButton,
13
- SidebarMenuSub,
14
- SidebarMenuSubItem,
15
- SidebarMenuSubButton,
16
- Collapsible,
17
- CollapsibleTrigger,
18
- CollapsibleContent,
19
- SidebarFooter,
20
- useSidebar,
21
- SidebarTrigger,
22
- } from "../ui";
23
- import { cn } from "@/lib/utils";
24
- import { DotIcon, TurtleIcon } from "../icons";
25
-
26
- type SidebarItemBase = {
27
- title: string;
28
- icon?: any;
29
- };
30
-
31
- // Item with a URL (no children)
32
- type SidebarLink = SidebarItemBase & {
33
- url: string;
34
- isActive: boolean;
35
- children?: never;
36
- };
37
-
38
- // Item with children (no URL)
39
- type SidebarGroupBase = SidebarItemBase & {
40
- children: SidebarItem[];
41
- url?: never;
42
- isActive?: never;
43
- };
44
-
45
- export type SidebarItem = SidebarLink | SidebarGroupBase;
46
-
47
- export function TurtleSidebarLayout({
48
- children,
49
- sidebarSlot,
50
- sidebarFooter,
51
- topSlot,
52
- items,
53
- linkComponent,
54
- }: {
55
- children: React.ReactNode;
56
- sidebarSlot?: React.ReactNode;
57
- sidebarFooter?: React.ReactNode;
58
- topSlot?: React.ReactNode;
59
- items: SidebarItem[];
60
- linkComponent: any;
61
- }) {
62
- return (
63
- <SidebarProvider>
64
- <TurtleSidebar
65
- items={items}
66
- sidebarFooter={sidebarFooter}
67
- sidebarSlot={sidebarSlot}
68
- linkComponent={linkComponent}
69
- />
70
- <TurtleContainer topSlot={topSlot} children={children} />
71
- </SidebarProvider>
72
- );
73
- }
74
-
75
- export function TurtleSidebar({
76
- items,
77
- sidebarSlot,
78
- sidebarFooter,
79
- linkComponent: Comp = "a",
80
- }: {
81
- items: SidebarItem[];
82
- sidebarSlot?: React.ReactNode;
83
- sidebarFooter?: React.ReactNode;
84
- linkComponent: any;
85
- }) {
86
- return (
87
- <Sidebar>
88
- <SidebarHeader>
89
- <div className="border-gradient-white border-opacity-20 relative h-[72px] w-full rounded-full shadow">
90
- <TurtleIcon className="absolute -top-2 -left-2 aspect-square h-[86px]" />
91
-
92
- <div className="text-primary mt-2 -space-y-1.5 pl-20">
93
- <div className="text-3xl leading-tight font-bold">Turtle</div>
94
- <div className="pl-1 text-sm font-medium">Partner Portal</div>
95
- </div>
96
- </div>
97
- </SidebarHeader>
98
- <SidebarContent>
99
- <SidebarGroup>
100
- <SidebarGroupContent>
101
- <SidebarMenu>
102
- {items.map((item) => {
103
- if (item?.children?.length) {
104
- return (
105
- <Collapsible className="group/collapsible">
106
- <SidebarMenuItem>
107
- <CollapsibleTrigger asChild>
108
- <SidebarMenuButton>
109
- {item.icon && <item.icon />}
110
- <span className="grow">{item.title}</span>
111
- <ChevronRight className="transition-all group-data-[state=open]/collapsible:rotate-90" />
112
- </SidebarMenuButton>
113
- </CollapsibleTrigger>
114
- <CollapsibleContent>
115
- <SidebarMenuSub>
116
- {item.children.map((child) => (
117
- <SidebarMenuSubItem key={child.title}>
118
- <SidebarMenuSubButton
119
- asChild
120
- isActive={child.isActive}
121
- >
122
- <Comp href={child.url}>
123
- {child.icon && <child.icon />}
124
- <span className="grow">{child.title}</span>
125
-
126
- <div className="relative size-[18px] shrink-0 group-data-[active=false]/menu-sub-button:hidden">
127
- <DotIcon className="text-primary absolute top-[-15px] left-[-15px] size-12" />
128
- </div>
129
- </Comp>
130
- </SidebarMenuSubButton>
131
- </SidebarMenuSubItem>
132
- ))}
133
- </SidebarMenuSub>
134
- </CollapsibleContent>
135
- </SidebarMenuItem>
136
- </Collapsible>
137
- );
138
- }
139
- return (
140
- <SidebarMenuItem key={item.title}>
141
- <SidebarMenuButton asChild isActive={item.isActive}>
142
- <Comp href={item.url}>
143
- {item.icon && <item.icon />}
144
- <span className="grow">{item.title}</span>
145
- <div className="relative size-[18px] shrink-0 group-data-[active=false]/menu-button:hidden">
146
- <DotIcon className="text-primary absolute top-[-15px] left-[-15px] size-12" />
147
- </div>
148
- </Comp>
149
- </SidebarMenuButton>
150
- </SidebarMenuItem>
151
- );
152
- })}
153
- </SidebarMenu>
154
- </SidebarGroupContent>
155
- </SidebarGroup>
156
- <span className="grow" />
157
- <SidebarGroup>{sidebarSlot}</SidebarGroup>
158
- </SidebarContent>
159
- <SidebarFooter>{sidebarFooter}</SidebarFooter>
160
- </Sidebar>
161
- );
162
- }
163
-
164
- export function TurtleContainer({
165
- children,
166
- topSlot,
167
- }: {
168
- children: React.ReactNode;
169
- topSlot?: React.ReactNode;
170
- }) {
171
- const { state, isMobile } = useSidebar();
172
- return (
173
- <div
174
- className={cn(
175
- "fixed inset-0 flex h-svh flex-col items-stretch gap-1 py-2 pr-2",
176
- state === "collapsed" || isMobile ? "pl-2" : "left-64",
177
- )}
178
- >
179
- <div className="flex gap-1">
180
- <SidebarTrigger />
181
- {topSlot}
182
- </div>
183
-
184
- <main
185
- className={cn(
186
- "bg-background border-border max-h-[94svh] grow overflow-y-auto rounded-lg border p-6",
187
- )}
188
- >
189
- {children}
190
- </main>
191
- </div>
192
- );
193
- }
@@ -1,67 +0,0 @@
1
- import type { MouseEvent, ReactNode } from "react";
2
- import { useIsMobile } from "@/hooks/useIsMobile";
3
- import {
4
- Tooltip,
5
- TooltipContent,
6
- TooltipTrigger,
7
- } from "@/components/ui/tooltip";
8
- import {
9
- Popover,
10
- PopoverContent,
11
- PopoverTrigger,
12
- } from "@/components/ui/popover";
13
- import { TooltipPortal } from "@radix-ui/react-tooltip";
14
-
15
- interface TooltipProps {
16
- trigger: ReactNode;
17
- content: ReactNode;
18
- className?: string;
19
- contentClassName?: string;
20
- maxWidth?: string;
21
- href?: string;
22
- side?: "top" | "bottom" | "left" | "right";
23
- asChild?: boolean;
24
- }
25
-
26
- export function TurtleTooltip({
27
- trigger,
28
- content,
29
- className,
30
- side,
31
- asChild,
32
- }: TooltipProps) {
33
- const { isMobile } = useIsMobile();
34
-
35
- const handleClick = (e: MouseEvent<HTMLDivElement>) => {
36
- e.stopPropagation();
37
- e.preventDefault();
38
- };
39
-
40
- return (
41
- <div className={className} onClick={handleClick}>
42
- {isMobile ? (
43
- <Popover>
44
- <PopoverTrigger
45
- className="flex items-center justify-center"
46
- asChild={asChild}
47
- >
48
- {trigger}
49
- </PopoverTrigger>
50
- <PopoverContent side={side}>{content}</PopoverContent>
51
- </Popover>
52
- ) : (
53
- <Tooltip>
54
- <TooltipTrigger
55
- className="flex items-center justify-center"
56
- asChild={asChild}
57
- >
58
- {trigger}
59
- </TooltipTrigger>
60
- <TooltipPortal>
61
- <TooltipContent side={side}>{content}</TooltipContent>
62
- </TooltipPortal>
63
- </Tooltip>
64
- )}
65
- </div>
66
- );
67
- }
@@ -1,23 +0,0 @@
1
- export const ArrowIcon = ({ className }: { className?: string }) => (
2
- <svg
3
- xmlns="http://www.w3.org/2000/svg"
4
- width="13"
5
- height="14"
6
- viewBox="0 0 13 14"
7
- fill="none"
8
- className={className}
9
- >
10
- <path
11
- d="M3.65174 10.4506L3.05176 9.85059L9.05161 3.85073L9.6516 4.45072L3.65174 10.4506Z"
12
- fill="currentColor"
13
- />
14
- <path
15
- d="M9.68168 4.66626L3.31787 4.66626V3.81775L9.68168 3.81775V4.66626Z"
16
- fill="currentColor"
17
- />
18
- <path
19
- d="M9.68249 10.1821H8.83398L8.83398 3.81832H9.68249L9.68249 10.1821Z"
20
- fill="currentColor"
21
- />
22
- </svg>
23
- );
@@ -1,95 +0,0 @@
1
- export const BetaIcon = ({ className }: { className?: string }) => (
2
- <svg
3
- xmlns="http://www.w3.org/2000/svg"
4
- width="25"
5
- height="24"
6
- viewBox="0 0 25 24"
7
- fill="none"
8
- className={className}
9
- >
10
- <g filter="url(#filter0_i_11400_35580)">
11
- <rect
12
- x="0.135742"
13
- width="24"
14
- height="24"
15
- rx="12"
16
- fill="url(#paint0_linear_11400_35580)"
17
- fill-opacity="0.6"
18
- />
19
- <rect
20
- x="0.424196"
21
- y="0.288454"
22
- width="23.4231"
23
- height="23.4231"
24
- rx="11.7115"
25
- stroke="url(#paint1_linear_11400_35580)"
26
- stroke-width="0.576907"
27
- />
28
- <path
29
- d="M19.0287 14.9918C18.8952 14.9752 17.1068 14.709 16.5278 12.4321C16.4566 12.15 16.1725 11.9799 15.8933 12.0518C15.701 12.1016 15.5607 12.2537 15.5155 12.4355C14.9132 14.7941 13.0125 14.9918 13.007 14.9925C12.7203 15.0264 12.5149 15.2898 12.5485 15.5795C12.5779 15.8305 12.7764 16.0193 13.0146 16.0435C13.148 16.0601 14.9371 16.3263 15.5162 18.6032C15.5873 18.8853 15.8714 19.0554 16.1506 18.9835C16.343 18.9337 16.4833 18.7816 16.5284 18.5998C17.13 16.2406 19.0314 16.0435 19.0369 16.0428C19.3236 16.0089 19.529 15.7455 19.4954 15.4558C19.466 15.2048 19.2675 15.016 19.0287 14.9918ZM16.022 13.9775C16.4456 14.7297 16.9945 15.211 17.5003 15.518C16.9945 15.8243 16.4456 16.3056 16.022 17.0585C15.5983 16.3056 15.0494 15.8243 14.5436 15.518C15.0494 15.2117 15.5983 14.7304 16.022 13.9775ZM14.2904 8.61183C14.1247 8.59178 11.0989 8.18106 10.1359 4.39678C10.0647 4.11467 9.78065 3.94457 9.5014 4.01648C9.3084 4.06626 9.16877 4.21838 9.1236 4.40023C8.1346 8.2827 4.97185 8.61183 4.96295 8.61252C4.67618 8.64571 4.47016 8.90777 4.50233 9.19749C4.53108 9.44986 4.73025 9.63932 4.97048 9.66352C5.13612 9.68357 8.16197 10.0943 9.12497 13.8786C9.19615 14.1607 9.48019 14.3308 9.75943 14.2589C9.95176 14.2091 10.0921 14.057 10.1372 13.8744C11.1262 9.99196 14.289 9.66283 14.2979 9.66214C14.5847 9.62895 14.7907 9.36689 14.7585 9.07717C14.7298 8.82549 14.5306 8.63603 14.2904 8.61183ZM9.63076 6.0922C10.4076 7.7655 11.5862 8.66162 12.5485 9.13802C11.5855 9.61374 10.4076 10.5105 9.63076 12.1838C8.85393 10.5105 7.67603 9.61374 6.71304 9.13802C7.67603 8.66162 8.85393 7.7655 9.63076 6.0922Z"
30
- fill="#AAF1D5"
31
- />
32
- </g>
33
- <defs>
34
- <filter
35
- id="filter0_i_11400_35580"
36
- x="0.135742"
37
- y="0"
38
- width="24"
39
- height="24"
40
- filterUnits="userSpaceOnUse"
41
- color-interpolation-filters="sRGB"
42
- >
43
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
44
- <feBlend
45
- mode="normal"
46
- in="SourceGraphic"
47
- in2="BackgroundImageFix"
48
- result="shape"
49
- />
50
- <feColorMatrix
51
- in="SourceAlpha"
52
- type="matrix"
53
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
54
- result="hardAlpha"
55
- />
56
- <feOffset />
57
- <feGaussianBlur stdDeviation="1.24267" />
58
- <feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
59
- <feColorMatrix
60
- type="matrix"
61
- values="0 0 0 0 0.666667 0 0 0 0 0.945098 0 0 0 0 0.835294 0 0 0 1 0"
62
- />
63
- <feBlend
64
- mode="normal"
65
- in2="shape"
66
- result="effect1_innerShadow_11400_35580"
67
- />
68
- </filter>
69
- <linearGradient
70
- id="paint0_linear_11400_35580"
71
- x1="0.135742"
72
- y1="12"
73
- x2="24.1357"
74
- y2="12"
75
- gradientUnits="userSpaceOnUse"
76
- >
77
- <stop stop-color="#121312" />
78
- <stop offset="1" stop-color="#AAF1D5" stop-opacity="0" />
79
- </linearGradient>
80
- <linearGradient
81
- id="paint1_linear_11400_35580"
82
- x1="1.81706"
83
- y1="-5.32127e-06"
84
- x2="13.2516"
85
- y2="26.324"
86
- gradientUnits="userSpaceOnUse"
87
- >
88
- <stop stop-color="white" stop-opacity="0.4" />
89
- <stop offset="0.405687" stop-color="white" stop-opacity="0.01" />
90
- <stop offset="0.574372" stop-color="white" stop-opacity="0.01" />
91
- <stop offset="1" stop-color="white" stop-opacity="0.1" />
92
- </linearGradient>
93
- </defs>
94
- </svg>
95
- );