@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.
- package/dist/index.cjs +10331 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7652 -47844
- package/dist/index.js.map +1 -1
- package/dist/types/components/features/sidebar-layout.d.ts +2 -0
- package/dist/types/components/features/sidebar-layout.d.ts.map +1 -1
- package/dist/types/components/ui/chart.d.ts +1 -1
- package/dist/types/components/ui/chart.d.ts.map +1 -1
- package/package.json +26 -22
- package/.prettierrc.json +0 -4
- package/.turbo/turbo-build.log +0 -182
- package/CHANGELOG.md +0 -795
- package/components.json +0 -21
- package/src/components/charts/QUICK_REFERENCE.md +0 -323
- package/src/components/charts/README.md +0 -658
- package/src/components/charts/RECHARTS_FEATURES.md +0 -458
- package/src/components/charts/area-chart.tsx +0 -248
- package/src/components/charts/bar-chart.tsx +0 -362
- package/src/components/charts/index.ts +0 -4
- package/src/components/charts/pie-chart.tsx +0 -277
- package/src/components/charts/radial-chart.tsx +0 -312
- package/src/components/features/api-status/index.tsx +0 -23
- package/src/components/features/data-table/data-table.tsx +0 -538
- package/src/components/features/data-table/expand-toggle.tsx +0 -17
- package/src/components/features/data-table/fuzzy-filter.tsx +0 -34
- package/src/components/features/data-table/index.ts +0 -3
- package/src/components/features/data-table/item-info.tsx +0 -19
- package/src/components/features/data-table/skeleton.tsx +0 -23
- package/src/components/features/data-table/sort-dropdown.tsx +0 -118
- package/src/components/features/data-table/sortable-header.tsx +0 -37
- package/src/components/features/index.ts +0 -6
- package/src/components/features/page-heading.tsx +0 -27
- package/src/components/features/search-bar.tsx +0 -55
- package/src/components/features/segmented-navigation.tsx +0 -18
- package/src/components/features/sidebar-layout.tsx +0 -193
- package/src/components/features/turtle-tooltip.tsx +0 -67
- package/src/components/icons/arrow.tsx +0 -23
- package/src/components/icons/beta.tsx +0 -95
- package/src/components/icons/dot.tsx +0 -102
- package/src/components/icons/index.ts +0 -7
- package/src/components/icons/issue.tsx +0 -106
- package/src/components/icons/turtle.tsx +0 -156
- package/src/components/icons/update.tsx +0 -113
- package/src/components/icons/warning.tsx +0 -95
- package/src/components/molecules/index.ts +0 -9
- package/src/components/molecules/opportunity/index.ts +0 -10
- package/src/components/molecules/opportunity/opportunity-apr.tsx +0 -129
- package/src/components/molecules/opportunity/opportunity-disclaimer.tsx +0 -46
- package/src/components/molecules/opportunity/opportunity-rate-estimator.tsx +0 -62
- package/src/components/molecules/opportunity/opportunity-section.tsx +0 -113
- package/src/components/molecules/opportunity/opportunity-selector.tsx +0 -30
- package/src/components/molecules/opportunity/opportunity-type.tsx +0 -16
- package/src/components/molecules/route-details.tsx +0 -112
- package/src/components/molecules/slippage-selector.tsx +0 -200
- package/src/components/molecules/swap-details.tsx +0 -55
- package/src/components/molecules/swap-input.tsx +0 -186
- package/src/components/molecules/tabs.tsx +0 -79
- package/src/components/molecules/token-selector.tsx +0 -180
- package/src/components/molecules/tx-status.tsx +0 -312
- package/src/components/molecules/widget/asset-list/asset-filters.tsx +0 -113
- package/src/components/molecules/widget/asset-list/asset-list.tsx +0 -178
- package/src/components/molecules/widget/asset-list/asset-row.tsx +0 -45
- package/src/components/molecules/widget/asset-list/hooks/index.ts +0 -2
- package/src/components/molecules/widget/asset-list/hooks/use-asset-filtering.ts +0 -44
- package/src/components/molecules/widget/asset-list/hooks/use-asset-grouping.ts +0 -87
- package/src/components/molecules/widget/asset-list/index.ts +0 -3
- package/src/components/molecules/widget/base-selector.tsx +0 -121
- package/src/components/molecules/widget/campaign-item.tsx +0 -82
- package/src/components/molecules/widget/deal-item.tsx +0 -92
- package/src/components/molecules/widget/index.ts +0 -36
- package/src/components/molecules/widget/opportunity-item.tsx +0 -105
- package/src/components/molecules/widget/widget-item-stats.tsx +0 -50
- package/src/components/molecules/widget/widget-item.tsx +0 -139
- package/src/components/molecules/widget/widget-list-items.tsx +0 -86
- package/src/components/ui/alert-dialog.tsx +0 -163
- package/src/components/ui/animated-background/animated-background.tsx +0 -182
- package/src/components/ui/animated-background/index.ts +0 -1
- package/src/components/ui/avatar.tsx +0 -73
- package/src/components/ui/badge.tsx +0 -59
- package/src/components/ui/banner.tsx +0 -84
- package/src/components/ui/button.tsx +0 -100
- package/src/components/ui/card.tsx +0 -119
- package/src/components/ui/chart.tsx +0 -346
- package/src/components/ui/checkbox.tsx +0 -32
- package/src/components/ui/chip.tsx +0 -52
- package/src/components/ui/collapsible.tsx +0 -34
- package/src/components/ui/combobox.tsx +0 -730
- package/src/components/ui/command.tsx +0 -184
- package/src/components/ui/dialog.tsx +0 -129
- package/src/components/ui/dropdown.tsx +0 -316
- package/src/components/ui/field.tsx +0 -244
- package/src/components/ui/heading.tsx +0 -74
- package/src/components/ui/hover-card.tsx +0 -139
- package/src/components/ui/icon-animation.tsx +0 -82
- package/src/components/ui/icon-list.tsx +0 -168
- package/src/components/ui/index.ts +0 -48
- package/src/components/ui/info-card.tsx +0 -110
- package/src/components/ui/input-group.tsx +0 -170
- package/src/components/ui/input.tsx +0 -72
- package/src/components/ui/label-with-icon.tsx +0 -122
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/multi-select.tsx +0 -1090
- package/src/components/ui/navigation-bar.tsx +0 -153
- package/src/components/ui/navigation-menu.tsx +0 -188
- package/src/components/ui/opportunity-details-v1.tsx +0 -104
- package/src/components/ui/pagination.tsx +0 -127
- package/src/components/ui/popover.tsx +0 -48
- package/src/components/ui/scroll-area.tsx +0 -64
- package/src/components/ui/segment-control.tsx +0 -146
- package/src/components/ui/select.tsx +0 -199
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/sidebar.tsx +0 -728
- package/src/components/ui/skeleton.tsx +0 -14
- package/src/components/ui/slider.tsx +0 -58
- package/src/components/ui/sonner.tsx +0 -24
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table-shadcn.tsx +0 -110
- package/src/components/ui/table.tsx +0 -117
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toggle-group.tsx +0 -71
- package/src/components/ui/toggle.tsx +0 -47
- package/src/components/ui/tooltip.tsx +0 -66
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useIsMobile.ts +0 -77
- package/src/index.ts +0 -16
- package/src/lib/utils.ts +0 -6
- package/src/styles/globals.css +0 -181
- package/src/styles/themes/index.css +0 -9
- package/src/styles/themes/semantic.css +0 -117
- package/src/styles/tokens/colors.css +0 -124
- package/src/styles/tokens/index.css +0 -15
- package/src/styles/tokens/radius.css +0 -18
- package/src/styles/tokens/spacing.css +0 -58
- package/src/styles/tokens/typography.css +0 -87
- package/src/tokens/index.ts +0 -108
- package/tsconfig.json +0 -20
- package/vite.config.js +0 -49
- /package/{src/images/enso.png → dist/enso-22FJ4GNK.png} +0 -0
package/components.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "",
|
|
8
|
-
"css": "src/styles/globals.css",
|
|
9
|
-
"baseColor": "gray",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"aliases": {
|
|
14
|
-
"components": "@/components",
|
|
15
|
-
"utils": "@/lib/utils",
|
|
16
|
-
"ui": "@/components/ui",
|
|
17
|
-
"lib": "@/lib",
|
|
18
|
-
"hooks": "@/hooks"
|
|
19
|
-
},
|
|
20
|
-
"iconLibrary": "lucide"
|
|
21
|
-
}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
# Chart Components - Quick Reference
|
|
2
|
-
|
|
3
|
-
## Import
|
|
4
|
-
|
|
5
|
-
```tsx
|
|
6
|
-
import {
|
|
7
|
-
BarChart,
|
|
8
|
-
AreaChart,
|
|
9
|
-
PieChart,
|
|
10
|
-
RadialBarChart,
|
|
11
|
-
RadarChart,
|
|
12
|
-
type ChartConfig,
|
|
13
|
-
} from "@turtleclub/ui";
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Bar Chart
|
|
17
|
-
|
|
18
|
-
```tsx
|
|
19
|
-
<BarChart
|
|
20
|
-
data={data} // Array of objects
|
|
21
|
-
config={config} // ChartConfig object
|
|
22
|
-
categoryKey="month" // X-axis key
|
|
23
|
-
dataKeys={["sales"]} // Data series keys
|
|
24
|
-
layout="horizontal" // "horizontal" | "vertical"
|
|
25
|
-
showGrid={true} // Show grid lines
|
|
26
|
-
showLegend={false} // Show legend
|
|
27
|
-
stacked={false} // Stack bars
|
|
28
|
-
/>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Area Chart
|
|
32
|
-
|
|
33
|
-
```tsx
|
|
34
|
-
<AreaChart
|
|
35
|
-
data={data}
|
|
36
|
-
config={config}
|
|
37
|
-
categoryKey="month"
|
|
38
|
-
dataKeys={["revenue"]}
|
|
39
|
-
curveType="monotone" // "linear" | "monotone" | "step" | etc.
|
|
40
|
-
fillOpacity={0.2} // 0-1
|
|
41
|
-
strokeWidth={2} // Line width
|
|
42
|
-
showDots={false} // Show data points
|
|
43
|
-
stacked={false}
|
|
44
|
-
/>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Pie Chart
|
|
48
|
-
|
|
49
|
-
```tsx
|
|
50
|
-
<PieChart
|
|
51
|
-
data={data}
|
|
52
|
-
config={config}
|
|
53
|
-
nameKey="category" // Segment name key
|
|
54
|
-
dataKey="value" // Value key
|
|
55
|
-
innerRadius={0} // 0 = pie, >0 = donut
|
|
56
|
-
outerRadius={80} // Radius percentage
|
|
57
|
-
paddingAngle={0} // Gap between segments
|
|
58
|
-
showLabels={false}
|
|
59
|
-
labelFormatter={(val) => `${val}%`}
|
|
60
|
-
/>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Radial Bar Chart
|
|
64
|
-
|
|
65
|
-
```tsx
|
|
66
|
-
<RadialBarChart
|
|
67
|
-
data={data}
|
|
68
|
-
config={config}
|
|
69
|
-
nameKey="metric"
|
|
70
|
-
dataKey="value"
|
|
71
|
-
innerRadius={30}
|
|
72
|
-
outerRadius={100}
|
|
73
|
-
startAngle={90}
|
|
74
|
-
endAngle={-270}
|
|
75
|
-
showLabels={false}
|
|
76
|
-
cornerRadius={10}
|
|
77
|
-
/>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Radar Chart
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
<RadarChart
|
|
84
|
-
data={data}
|
|
85
|
-
config={config}
|
|
86
|
-
categoryKey="skill"
|
|
87
|
-
dataKeys={["current", "target"]}
|
|
88
|
-
fillOpacity={0.6}
|
|
89
|
-
strokeWidth={2}
|
|
90
|
-
showDots={true}
|
|
91
|
-
/>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## ChartConfig Pattern
|
|
95
|
-
|
|
96
|
-
```tsx
|
|
97
|
-
const config = {
|
|
98
|
-
// Data series
|
|
99
|
-
sales: {
|
|
100
|
-
label: "Sales",
|
|
101
|
-
color: "var(--chart-1)",
|
|
102
|
-
},
|
|
103
|
-
revenue: {
|
|
104
|
-
label: "Revenue",
|
|
105
|
-
color: "var(--chart-2)",
|
|
106
|
-
},
|
|
107
|
-
// Categories (optional)
|
|
108
|
-
jan: {
|
|
109
|
-
label: "January",
|
|
110
|
-
},
|
|
111
|
-
} satisfies ChartConfig;
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Theme Colors
|
|
115
|
-
|
|
116
|
-
Use these in your config:
|
|
117
|
-
|
|
118
|
-
- `var(--chart-1)` - Primary
|
|
119
|
-
- `var(--chart-2)` - Secondary
|
|
120
|
-
- `var(--chart-3)` - Tertiary
|
|
121
|
-
- `var(--chart-4)` - Quaternary
|
|
122
|
-
- `var(--chart-5)` - Quinary
|
|
123
|
-
|
|
124
|
-
## Data Format
|
|
125
|
-
|
|
126
|
-
```tsx
|
|
127
|
-
// Bar/Area/Radar
|
|
128
|
-
const data = [
|
|
129
|
-
{ month: "Jan", sales: 100, revenue: 200 },
|
|
130
|
-
{ month: "Feb", sales: 150, revenue: 250 },
|
|
131
|
-
];
|
|
132
|
-
|
|
133
|
-
// Pie/RadialBar
|
|
134
|
-
const data = [
|
|
135
|
-
{ category: "A", value: 30 },
|
|
136
|
-
{ category: "B", value: 45 },
|
|
137
|
-
];
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Common Props (All Charts)
|
|
141
|
-
|
|
142
|
-
| Prop | Type | Default |
|
|
143
|
-
| ------------- | --------------- | ---------------- |
|
|
144
|
-
| `data` | `Array<object>` | Required |
|
|
145
|
-
| `config` | `ChartConfig` | Required |
|
|
146
|
-
| `showLegend` | `boolean` | `false` |
|
|
147
|
-
| `showTooltip` | `boolean` | `true` |
|
|
148
|
-
| `className` | `string` | `undefined` |
|
|
149
|
-
| `aspectRatio` | `string` | `"aspect-video"` |
|
|
150
|
-
|
|
151
|
-
## With Card Wrapper
|
|
152
|
-
|
|
153
|
-
```tsx
|
|
154
|
-
<Card>
|
|
155
|
-
<CardHeader>
|
|
156
|
-
<CardTitle>Sales Chart</CardTitle>
|
|
157
|
-
<CardDescription>Monthly data</CardDescription>
|
|
158
|
-
</CardHeader>
|
|
159
|
-
<CardContent>
|
|
160
|
-
<BarChart {...props} />
|
|
161
|
-
</CardContent>
|
|
162
|
-
</Card>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Multi-Series Example
|
|
166
|
-
|
|
167
|
-
```tsx
|
|
168
|
-
const data = [
|
|
169
|
-
{ month: "Jan", desktop: 100, mobile: 50 },
|
|
170
|
-
{ month: "Feb", desktop: 150, mobile: 75 },
|
|
171
|
-
];
|
|
172
|
-
|
|
173
|
-
const config = {
|
|
174
|
-
desktop: { label: "Desktop", color: "var(--chart-1)" },
|
|
175
|
-
mobile: { label: "Mobile", color: "var(--chart-2)" },
|
|
176
|
-
} satisfies ChartConfig;
|
|
177
|
-
|
|
178
|
-
<BarChart
|
|
179
|
-
data={data}
|
|
180
|
-
config={config}
|
|
181
|
-
categoryKey="month"
|
|
182
|
-
dataKeys={["desktop", "mobile"]}
|
|
183
|
-
showLegend={true}
|
|
184
|
-
/>;
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Stacked Chart Example
|
|
188
|
-
|
|
189
|
-
```tsx
|
|
190
|
-
<AreaChart
|
|
191
|
-
data={data}
|
|
192
|
-
config={config}
|
|
193
|
-
categoryKey="month"
|
|
194
|
-
dataKeys={["revenue", "expenses"]}
|
|
195
|
-
stacked={true}
|
|
196
|
-
showLegend={true}
|
|
197
|
-
/>
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## Donut Chart Example
|
|
201
|
-
|
|
202
|
-
```tsx
|
|
203
|
-
<PieChart
|
|
204
|
-
data={data}
|
|
205
|
-
config={config}
|
|
206
|
-
nameKey="category"
|
|
207
|
-
dataKey="value"
|
|
208
|
-
innerRadius={60} // Creates donut hole
|
|
209
|
-
showLegend={true}
|
|
210
|
-
/>
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
## Recharts Native Features
|
|
214
|
-
|
|
215
|
-
### Conditional Bar Coloring
|
|
216
|
-
|
|
217
|
-
```tsx
|
|
218
|
-
<BarChart
|
|
219
|
-
data={data}
|
|
220
|
-
config={config}
|
|
221
|
-
categoryKey="month"
|
|
222
|
-
dataKeys={["sales"]}
|
|
223
|
-
getBarColor={(entry, index, dataKey) => {
|
|
224
|
-
return entry.sales > 200 ? "hsl(var(--destructive))" : undefined;
|
|
225
|
-
}}
|
|
226
|
-
/>
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Gradient Fill
|
|
230
|
-
|
|
231
|
-
```tsx
|
|
232
|
-
<BarChart
|
|
233
|
-
data={data}
|
|
234
|
-
config={config}
|
|
235
|
-
categoryKey="month"
|
|
236
|
-
dataKeys={["sales"]}
|
|
237
|
-
gradient={true} // Uses native Recharts linearGradient
|
|
238
|
-
/>
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### Active Dots on Hover
|
|
242
|
-
|
|
243
|
-
```tsx
|
|
244
|
-
<AreaChart
|
|
245
|
-
data={data}
|
|
246
|
-
config={config}
|
|
247
|
-
categoryKey="month"
|
|
248
|
-
dataKeys={["revenue"]}
|
|
249
|
-
showDots={true}
|
|
250
|
-
activeDot={{ r: 6, strokeWidth: 2 }} // Native Recharts activeDot
|
|
251
|
-
/>
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Radial Grid Lines
|
|
255
|
-
|
|
256
|
-
```tsx
|
|
257
|
-
<PieChart
|
|
258
|
-
data={data}
|
|
259
|
-
config={config}
|
|
260
|
-
nameKey="category"
|
|
261
|
-
dataKey="value"
|
|
262
|
-
showRadialGrid={true}
|
|
263
|
-
radialGridLines={12} // Uses native PolarGrid component
|
|
264
|
-
/>
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
## Tips
|
|
268
|
-
|
|
269
|
-
✅ Always use `satisfies ChartConfig` on config objects
|
|
270
|
-
✅ Match `dataKeys` to actual keys in your data
|
|
271
|
-
✅ Use theme colors for consistency
|
|
272
|
-
✅ Enable legend for multi-series charts
|
|
273
|
-
✅ Wrap in Card components for better presentation
|
|
274
|
-
✅ Leverage native Recharts features (Cell, gradients, activeDot, etc.)
|
|
275
|
-
|
|
276
|
-
❌ Don't hardcode colors - use theme variables
|
|
277
|
-
❌ Don't forget to configure all data keys in config
|
|
278
|
-
❌ Don't use too many series (max 5 recommended)
|
|
279
|
-
|
|
280
|
-
## Full Example
|
|
281
|
-
|
|
282
|
-
```tsx
|
|
283
|
-
import { BarChart, Card, CardContent, CardHeader, CardTitle } from "@turtleclub/ui";
|
|
284
|
-
import type { ChartConfig } from "@turtleclub/ui";
|
|
285
|
-
|
|
286
|
-
const data = [
|
|
287
|
-
{ month: "Jan", sales: 186 },
|
|
288
|
-
{ month: "Feb", sales: 305 },
|
|
289
|
-
{ month: "Mar", sales: 237 },
|
|
290
|
-
];
|
|
291
|
-
|
|
292
|
-
const config = {
|
|
293
|
-
sales: {
|
|
294
|
-
label: "Sales",
|
|
295
|
-
color: "var(--chart-1)",
|
|
296
|
-
},
|
|
297
|
-
} satisfies ChartConfig;
|
|
298
|
-
|
|
299
|
-
export function SalesChart() {
|
|
300
|
-
return (
|
|
301
|
-
<Card>
|
|
302
|
-
<CardHeader>
|
|
303
|
-
<CardTitle>Monthly Sales</CardTitle>
|
|
304
|
-
</CardHeader>
|
|
305
|
-
<CardContent>
|
|
306
|
-
<BarChart
|
|
307
|
-
data={data}
|
|
308
|
-
config={config}
|
|
309
|
-
categoryKey="month"
|
|
310
|
-
dataKeys={["sales"]}
|
|
311
|
-
showGrid={true}
|
|
312
|
-
/>
|
|
313
|
-
</CardContent>
|
|
314
|
-
</Card>
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## See Also
|
|
320
|
-
|
|
321
|
-
- Full documentation: `README.md`
|
|
322
|
-
- Live examples: `/components/charts` in showcase app
|
|
323
|
-
- Implementation details: `IMPLEMENTATION_SUMMARY.md`
|