@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,312 +0,0 @@
1
- "use client";
2
-
3
- import {
4
- Cell,
5
- PolarAngleAxis,
6
- PolarGrid,
7
- Radar,
8
- RadarChart as RechartsRadarChart,
9
- RadialBar,
10
- RadialBarChart as RechartsRadialBarChart,
11
- } from "recharts";
12
- import {
13
- ChartConfig,
14
- ChartContainer,
15
- ChartLegend,
16
- ChartLegendContent,
17
- ChartTooltip,
18
- ChartTooltipContent,
19
- } from "../ui/chart";
20
- import { cn } from "@/lib/utils";
21
-
22
- export interface RadialChartData {
23
- [key: string]: string | number;
24
- }
25
-
26
- export interface RadialBarChartProps {
27
- /**
28
- * Array of data objects to be displayed in the chart
29
- */
30
- data: RadialChartData[];
31
- /**
32
- * Configuration for chart styling and labels
33
- */
34
- config: ChartConfig;
35
- /**
36
- * Key from data objects to use for segment names
37
- */
38
- nameKey: string;
39
- /**
40
- * Key from data objects to use for values
41
- */
42
- dataKey: string;
43
- /**
44
- * Show legend
45
- * @default false
46
- */
47
- showLegend?: boolean;
48
- /**
49
- * Show tooltip on hover
50
- * @default true
51
- */
52
- showTooltip?: boolean;
53
- /**
54
- * Inner radius (0-100)
55
- * @default 30
56
- */
57
- innerRadius?: number;
58
- /**
59
- * Outer radius (0-100)
60
- * @default 100
61
- */
62
- outerRadius?: number;
63
- /**
64
- * Start angle in degrees
65
- * @default 90
66
- */
67
- startAngle?: number;
68
- /**
69
- * End angle in degrees
70
- * @default -270
71
- */
72
- endAngle?: number;
73
- /**
74
- * Custom className for the container
75
- */
76
- className?: string;
77
- /**
78
- * Chart height aspect ratio
79
- * @default "aspect-square"
80
- */
81
- aspectRatio?: string;
82
- /**
83
- * Show labels on bars
84
- * @default false
85
- */
86
- showLabels?: boolean;
87
- /**
88
- * Corner radius for bars
89
- * @default 2
90
- */
91
- cornerRadius?: number;
92
- /**
93
- * Enable gradient fill for bars (uses Recharts native gradient support via Cell component)
94
- * @default true
95
- */
96
- gradient?: boolean;
97
- /**
98
- * Make chart grow to fill parent container (ignores aspectRatio if true)
99
- * @default false
100
- */
101
- grow?: boolean;
102
- /**
103
- * Custom formatter function for tooltip values
104
- * @example (value, name, item, index, payload) => `$${value.toLocaleString()}`
105
- */
106
- tooltipFormatter?: (
107
- value: any,
108
- name: any,
109
- item: any,
110
- index: number,
111
- payload: any
112
- ) => React.ReactNode;
113
- }
114
-
115
- export function RadialBarChart({
116
- data,
117
- config,
118
- nameKey,
119
- dataKey,
120
- showLegend = false,
121
- showTooltip = true,
122
- innerRadius = 30,
123
- outerRadius = 100,
124
- startAngle = 90,
125
- endAngle = -270,
126
- className,
127
- aspectRatio = "aspect-square",
128
- showLabels = false,
129
- cornerRadius = 2,
130
- gradient = true,
131
- grow = false,
132
- tooltipFormatter,
133
- }: RadialBarChartProps) {
134
- return (
135
- <ChartContainer config={config} className={cn(grow ? "h-full w-full" : aspectRatio, className)}>
136
- <RechartsRadialBarChart
137
- data={data}
138
- startAngle={startAngle}
139
- endAngle={endAngle}
140
- innerRadius={`${innerRadius}%`}
141
- outerRadius={`${outerRadius}%`}
142
- >
143
- <PolarGrid gridType="circle" />
144
-
145
- {showTooltip && (
146
- <ChartTooltip
147
- cursor={false}
148
- content={
149
- <ChartTooltipContent hideLabel nameKey={nameKey} formatter={tooltipFormatter} />
150
- }
151
- />
152
- )}
153
-
154
- {showLegend && <ChartLegend content={<ChartLegendContent nameKey={nameKey} />} />}
155
-
156
- <defs>
157
- {gradient &&
158
- data.map((entry, index) => {
159
- const name = entry[nameKey] as string;
160
- return (
161
- <linearGradient
162
- key={name}
163
- id={`gradient-radial-${name}`}
164
- x1="1"
165
- y1="0"
166
- x2="0"
167
- y2="0"
168
- >
169
- <stop offset="0%" stopColor={`var(--color-${name})`} stopOpacity={0.1} />
170
- <stop offset="100%" stopColor={`var(--color-${name})`} stopOpacity={1} />
171
- </linearGradient>
172
- );
173
- })}
174
- </defs>
175
-
176
- <RadialBar
177
- dataKey={dataKey}
178
- cornerRadius={cornerRadius}
179
- label={showLabels ? { position: "insideStart", fill: "#fff" } : false}
180
- background={{ fill: "transparent" }}
181
- >
182
- {/* Using Recharts native Cell component for per-bar styling and gradients */}
183
- {data.map((entry, index) => {
184
- const name = entry[nameKey] as string;
185
- const fill = gradient ? `url(#gradient-radial-${name})` : `var(--color-${name})`;
186
- return <Cell key={`cell-${index}`} fill={fill} />;
187
- })}
188
- </RadialBar>
189
- </RechartsRadialBarChart>
190
- </ChartContainer>
191
- );
192
- }
193
-
194
- export interface RadarChartProps {
195
- /**
196
- * Array of data objects to be displayed in the chart
197
- */
198
- data: RadialChartData[];
199
- /**
200
- * Configuration for chart styling and labels
201
- */
202
- config: ChartConfig;
203
- /**
204
- * Key from data objects to use for categories
205
- */
206
- categoryKey: string;
207
- /**
208
- * Array of keys from data objects to display as radar areas
209
- */
210
- dataKeys: string[];
211
- /**
212
- * Show legend
213
- * @default false
214
- */
215
- showLegend?: boolean;
216
- /**
217
- * Show tooltip on hover
218
- * @default true
219
- */
220
- showTooltip?: boolean;
221
- /**
222
- * Show dots on data points
223
- * @default true
224
- */
225
- showDots?: boolean;
226
- /**
227
- * Fill opacity for radar areas
228
- * @default 0.6
229
- */
230
- fillOpacity?: number;
231
- /**
232
- * Stroke width for radar lines
233
- * @default 2
234
- */
235
- strokeWidth?: number;
236
- /**
237
- * Custom className for the container
238
- */
239
- className?: string;
240
- /**
241
- * Chart height aspect ratio
242
- * @default "aspect-square"
243
- */
244
- aspectRatio?: string;
245
- /**
246
- * Make chart grow to fill parent container (ignores aspectRatio if true)
247
- * @default false
248
- */
249
- grow?: boolean;
250
- /**
251
- * Custom formatter function for tooltip values
252
- * @example (value, name, item, index, payload) => `$${value.toLocaleString()}`
253
- */
254
- tooltipFormatter?: (
255
- value: any,
256
- name: any,
257
- item: any,
258
- index: number,
259
- payload: any
260
- ) => React.ReactNode;
261
- }
262
-
263
- export function RadarChart({
264
- data,
265
- config,
266
- categoryKey,
267
- dataKeys,
268
- showLegend = false,
269
- showTooltip = true,
270
- showDots = true,
271
- fillOpacity = 0.6,
272
- strokeWidth = 2,
273
- className,
274
- aspectRatio = "aspect-square",
275
- grow = false,
276
- tooltipFormatter,
277
- }: RadarChartProps) {
278
- return (
279
- <ChartContainer config={config} className={cn(grow ? "h-full w-full" : aspectRatio, className)}>
280
- <RechartsRadarChart data={data}>
281
- <PolarGrid />
282
- <PolarAngleAxis
283
- dataKey={categoryKey}
284
- tickFormatter={(value) =>
285
- config[value as keyof typeof config]?.label?.toString() || value
286
- }
287
- />
288
-
289
- {showTooltip && (
290
- <ChartTooltip
291
- cursor={false}
292
- content={<ChartTooltipContent indicator="line" formatter={tooltipFormatter} />}
293
- />
294
- )}
295
-
296
- {showLegend && <ChartLegend content={<ChartLegendContent />} />}
297
-
298
- {dataKeys.map((key) => (
299
- <Radar
300
- key={key}
301
- dataKey={key}
302
- fill={`var(--color-${key})`}
303
- stroke={`var(--color-${key})`}
304
- fillOpacity={fillOpacity}
305
- strokeWidth={strokeWidth}
306
- dot={showDots}
307
- />
308
- ))}
309
- </RechartsRadarChart>
310
- </ChartContainer>
311
- );
312
- }
@@ -1,23 +0,0 @@
1
- import { TurtleTooltip } from "@/index";
2
- import { Circle } from "lucide-react";
3
-
4
- type APIStatusProps =
5
- | { warning: true; tooltip: string }
6
- | { warning: false; tooltip?: undefined };
7
-
8
- export function APIStatus(props: APIStatusProps) {
9
- if (props.warning) {
10
- return (
11
- <TurtleTooltip
12
- trigger={
13
- <Circle className="size-3 rounded-full fill-orange-500 stroke-orange-500 stroke-2 p-0.5 ring-1 ring-orange-500/80 drop-shadow-sm drop-shadow-orange-500/50" />
14
- }
15
- content={props.tooltip}
16
- className="text-left"
17
- />
18
- );
19
- }
20
- return (
21
- <Circle className="fill-accent stroke-accent ring-accent/80 drop-shadow-accent/50 size-3 rounded-full stroke-2 p-0.5 ring-1 drop-shadow-sm" />
22
- );
23
- }