2d108c295a
Reescribe todos los componentes UI para usar Mantine v9 en lugar de shadcn/Tailwind. Elimina cn(), CVA, components.json, theme_provider custom y globals.css con Tailwind. Añade 25+ componentes nuevos (AppShell, AuthForm, DatePickerInput, Dropzone, etc.) y MantineProvider como wrapper estándar del sistema de temas. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { Paper } from '@mantine/core'
|
|
|
|
export const defaultColors = ['#3b82f6', '#22c55e', '#f59e0b', '#8b5cf6', '#ec4899']
|
|
|
|
export interface Series {
|
|
key: string
|
|
name: string
|
|
color?: string
|
|
}
|
|
|
|
export function getSeriesColor(index: number, color?: string): string {
|
|
return color || defaultColors[index % defaultColors.length]!
|
|
}
|
|
|
|
interface ChartContainerProps {
|
|
children: React.ReactNode
|
|
height?: number | string
|
|
}
|
|
|
|
export function ChartContainer({ children, height = 300 }: ChartContainerProps) {
|
|
return (
|
|
<Paper p="md" style={{ height, minWidth: 100, minHeight: typeof height === 'number' ? Math.min(height, 100) : 100 }}>
|
|
{children}
|
|
</Paper>
|
|
)
|
|
}
|
|
|
|
/** @deprecated Mantine charts handle tooltips internally. Kept for index.ts compat. */
|
|
export function ChartTooltipContent() { return null }
|
|
/** @deprecated Mantine charts handle tooltips internally. Kept for index.ts compat. */
|
|
export function ChartTooltip() { return null }
|
|
/** @deprecated Mantine charts handle legends internally. Kept for index.ts compat. */
|
|
export function ChartLegend() { return null }
|