@mdxui/tremor 6.0.0
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/README.md +255 -0
- package/dist/dashboard/components/index.d.ts +355 -0
- package/dist/dashboard/components/index.js +549 -0
- package/dist/dashboard/components/index.js.map +1 -0
- package/dist/dashboard/index.d.ts +275 -0
- package/dist/dashboard/index.js +1062 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/database/index.d.ts +334 -0
- package/dist/database/index.js +474 -0
- package/dist/database/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1089 -0
- package/dist/index.js.map +1 -0
- package/dist/insights/components/index.d.ts +362 -0
- package/dist/insights/components/index.js +1397 -0
- package/dist/insights/components/index.js.map +1 -0
- package/dist/insights/index.d.ts +360 -0
- package/dist/insights/index.js +1815 -0
- package/dist/insights/index.js.map +1 -0
- package/dist/overview/components/index.d.ts +86 -0
- package/dist/overview/components/index.js +775 -0
- package/dist/overview/components/index.js.map +1 -0
- package/dist/overview/index.d.ts +301 -0
- package/dist/overview/index.js +1077 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/shared/index.d.ts +296 -0
- package/dist/shared/index.js +395 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solar/components/index.d.ts +341 -0
- package/dist/solar/components/index.js +831 -0
- package/dist/solar/components/index.js.map +1 -0
- package/dist/solar/index.d.ts +301 -0
- package/dist/solar/index.js +1130 -0
- package/dist/solar/index.js.map +1 -0
- package/package.json +135 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/insights/components/charts/area-chart.tsx","../../src/insights/components/charts/bar-chart.tsx","../../src/insights/components/charts/bar-chart-variant.tsx","../../src/insights/components/charts/donut-chart.tsx","../../src/insights/components/charts/transaction-chart.tsx","../../src/insights/components/kpi/kpi-card.tsx","../../src/insights/components/tables/transactions-table.tsx","../../src/insights/layouts/insights-app.tsx","../../src/insights/layouts/insights-dashboard.tsx","../../src/insights/layouts/insights-header.tsx","../../src/insights/layouts/insights-settings.tsx","../../src/insights/layouts/insights-shell.tsx","../../src/insights/layouts/insights-sidebar.tsx","../../src/insights/index.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tArea,\n\tCartesianGrid,\n\tAreaChart as RechartsAreaChart,\n\tLegend as RechartsLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tXAxis,\n\tYAxis,\n} from \"recharts\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * AreaChart Props - Compatible with mdxui TremorAreaChartProps\n * All properties with defaults are optional for consumers\n */\nexport interface AreaChartProps {\n\t/** Chart data array */\n\tdata: Record<string, unknown>[];\n\t/** Data key for x-axis (index) */\n\tindex: string;\n\t/** Data keys for y-axis values */\n\tcategories: string[];\n\t/** Color for each category */\n\tcolors?: string[];\n\t/** Function to format numeric values for display */\n\tvalueFormatter?: (value: number) => string;\n\t/** Show only first/last x-axis labels */\n\tstartEndOnly?: boolean;\n\t/** Display chart legend */\n\tshowLegend?: boolean;\n\t/** Display grid lines */\n\tshowGridLines?: boolean;\n\t/** Enable animation */\n\tshowAnimation?: boolean;\n\t/** Stack areas */\n\tstack?: boolean;\n\t/** Curve type for the area line */\n\tcurveType?: \"linear\" | \"monotone\" | \"step\";\n\t/** Connect data points across null values */\n\tconnectNulls?: boolean;\n\t/** Y-axis label width */\n\tyAxisWidth?: number;\n\t/** Y-axis minimum */\n\tminValue?: number;\n\t/** Y-axis maximum */\n\tmaxValue?: number;\n\t/** Custom className */\n\tclassName?: string;\n}\n\n/**\n * Color palette for charts - maps semantic names to Tailwind classes\n */\nconst chartColors: Record<string, string> = {\n\tblue: \"#3b82f6\",\n\tgreen: \"#22c55e\",\n\tred: \"#ef4444\",\n\tyellow: \"#eab308\",\n\tpurple: \"#a855f7\",\n\tcyan: \"#06b6d4\",\n\torange: \"#f97316\",\n\tpink: \"#ec4899\",\n\tindigo: \"#6366f1\",\n\tteal: \"#14b8a6\",\n\temerald: \"#10b981\",\n\tgray: \"#6b7280\",\n};\n\nfunction getColor(color: string, index: number): string {\n\tif (chartColors[color]) return chartColors[color];\n\t// Default color palette for unspecified colors\n\tconst defaultColors = Object.values(chartColors);\n\treturn defaultColors[index % defaultColors.length];\n}\n\n/**\n * AreaChart - Tremor-style area chart adapter implementing mdxui TremorAreaChartProps\n *\n * Wraps Recharts AreaChart with mdxui-compliant props interface.\n *\n * @example\n * ```tsx\n * <AreaChart\n * data={[\n * { date: '2024-01', revenue: 100 },\n * { date: '2024-02', revenue: 150 },\n * ]}\n * index=\"date\"\n * categories={['revenue']}\n * />\n * ```\n */\nexport const AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>(\n\t(\n\t\t{\n\t\t\tdata,\n\t\t\tindex,\n\t\t\tcategories,\n\t\t\tcolors,\n\t\t\tvalueFormatter,\n\t\t\tstartEndOnly = false,\n\t\t\tshowLegend = true,\n\t\t\tshowGridLines = true,\n\t\t\tshowAnimation = true,\n\t\t\tstack = false,\n\t\t\tcurveType = \"monotone\",\n\t\t\tconnectNulls = false,\n\t\t\tyAxisWidth = 56,\n\t\t\tminValue,\n\t\t\tmaxValue,\n\t\t\tclassName,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst formatValue = valueFormatter || ((value: number) => value.toString());\n\n\t\treturn (\n\t\t\t<div ref={ref} className={twMerge(\"h-80 w-full\", className)}>\n\t\t\t\t<ResponsiveContainer width=\"100%\" height=\"100%\">\n\t\t\t\t\t<RechartsAreaChart\n\t\t\t\t\t\tdata={data as Record<string, unknown>[]}\n\t\t\t\t\t\tmargin={{ top: 10, right: 30, left: 0, bottom: 0 }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{showGridLines && (\n\t\t\t\t\t\t\t<CartesianGrid\n\t\t\t\t\t\t\t\tstrokeDasharray=\"3 3\"\n\t\t\t\t\t\t\t\tclassName=\"stroke-gray-200 dark:stroke-gray-800\"\n\t\t\t\t\t\t\t\thorizontal={true}\n\t\t\t\t\t\t\t\tvertical={false}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\tdataKey={index}\n\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\ttickFormatter={startEndOnly ? undefined : undefined}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\twidth={yAxisWidth}\n\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\ttickFormatter={formatValue}\n\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\tdomain={[minValue ?? \"auto\", maxValue ?? \"auto\"]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tformatter={(value, name) => {\n\t\t\t\t\t\t\t\tconst numValue = typeof value === \"number\" ? value : 0;\n\t\t\t\t\t\t\t\treturn [formatValue(numValue), String(name)];\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tcontentStyle={{\n\t\t\t\t\t\t\t\tbackgroundColor: \"white\",\n\t\t\t\t\t\t\t\tborder: \"1px solid #e5e7eb\",\n\t\t\t\t\t\t\t\tborderRadius: \"6px\",\n\t\t\t\t\t\t\t\tboxShadow: \"0 4px 6px -1px rgb(0 0 0 / 0.1)\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{showLegend && <RechartsLegend verticalAlign=\"top\" height={36} />}\n\t\t\t\t\t\t{categories.map((category, idx) => {\n\t\t\t\t\t\t\tconst color = colors?.[idx] || category;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\t\t\tkey={category}\n\t\t\t\t\t\t\t\t\ttype={curveType}\n\t\t\t\t\t\t\t\t\tdataKey={category}\n\t\t\t\t\t\t\t\t\tstroke={getColor(color, idx)}\n\t\t\t\t\t\t\t\t\tfill={getColor(color, idx)}\n\t\t\t\t\t\t\t\t\tfillOpacity={0.3}\n\t\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t\t\tstackId={stack ? \"stack\" : undefined}\n\t\t\t\t\t\t\t\t\tisAnimationActive={showAnimation}\n\t\t\t\t\t\t\t\t\tconnectNulls={connectNulls}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</RechartsAreaChart>\n\t\t\t\t</ResponsiveContainer>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nAreaChart.displayName = \"AreaChart\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tBar,\n\tCartesianGrid,\n\tBarChart as RechartsBarChart,\n\tLegend as RechartsLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tXAxis,\n\tYAxis,\n} from \"recharts\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * BarChart Props - Compatible with mdxui TremorBarChartProps\n * All properties with defaults are optional for consumers\n */\nexport interface BarChartProps {\n\t/** Chart data array */\n\tdata: Record<string, unknown>[];\n\t/** Data key for x-axis (index) */\n\tindex: string;\n\t/** Data keys for bar values */\n\tcategories: string[];\n\t/** Colors for each category */\n\tcolors?: string[];\n\t/** Function to format numeric values for display */\n\tvalueFormatter?: (value: number) => string;\n\t/** Bar chart layout direction */\n\tlayout?: \"vertical\" | \"horizontal\";\n\t/** Stack bars */\n\tstack?: boolean;\n\t/** Show as 100% stacked */\n\trelative?: boolean;\n\t/** Display chart legend */\n\tshowLegend?: boolean;\n\t/** Display grid lines */\n\tshowGridLines?: boolean;\n\t/** Enable animation */\n\tshowAnimation?: boolean;\n\t/** Y-axis label width */\n\tyAxisWidth?: number;\n\t/** Gap between bar groups */\n\tbarCategoryGap?: string | number;\n\t/** Custom className */\n\tclassName?: string;\n}\n\n/**\n * Color palette for charts - maps semantic names to Tailwind classes\n */\nconst chartColors: Record<string, string> = {\n\tblue: \"#3b82f6\",\n\tgreen: \"#22c55e\",\n\tred: \"#ef4444\",\n\tyellow: \"#eab308\",\n\tpurple: \"#a855f7\",\n\tcyan: \"#06b6d4\",\n\torange: \"#f97316\",\n\tpink: \"#ec4899\",\n\tindigo: \"#6366f1\",\n\tteal: \"#14b8a6\",\n\temerald: \"#10b981\",\n\tgray: \"#6b7280\",\n};\n\nfunction getColor(color: string, index: number): string {\n\tif (chartColors[color]) return chartColors[color];\n\t// Default color palette for unspecified colors\n\tconst defaultColors = Object.values(chartColors);\n\treturn defaultColors[index % defaultColors.length];\n}\n\n/**\n * BarChart - Tremor-style bar chart adapter implementing mdxui TremorBarChartProps\n *\n * Wraps Recharts BarChart with mdxui-compliant props interface.\n *\n * @example\n * ```tsx\n * <BarChart\n * data={[\n * { category: 'A', value: 100 },\n * { category: 'B', value: 150 },\n * ]}\n * index=\"category\"\n * categories={['value']}\n * />\n * ```\n */\nexport const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>(\n\t(\n\t\t{\n\t\t\tdata,\n\t\t\tindex,\n\t\t\tcategories,\n\t\t\tcolors,\n\t\t\tvalueFormatter,\n\t\t\tlayout = \"vertical\",\n\t\t\tstack = false,\n\t\t\trelative = false,\n\t\t\tshowLegend = true,\n\t\t\tshowGridLines = true,\n\t\t\tshowAnimation = true,\n\t\t\tyAxisWidth = 56,\n\t\t\tbarCategoryGap,\n\t\t\tclassName,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst formatValue = valueFormatter || ((value: number) => value.toString());\n\n\t\t// Recharts uses 'horizontal' layout for what Tremor calls 'vertical' bars\n\t\t// and 'vertical' layout for horizontal bars\n\t\tconst rechartsLayout = layout === \"horizontal\" ? \"vertical\" : \"horizontal\";\n\n\t\treturn (\n\t\t\t<div ref={ref} className={twMerge(\"h-80 w-full\", className)}>\n\t\t\t\t<ResponsiveContainer width=\"100%\" height=\"100%\">\n\t\t\t\t\t<RechartsBarChart\n\t\t\t\t\t\tdata={data as Record<string, unknown>[]}\n\t\t\t\t\t\tlayout={rechartsLayout}\n\t\t\t\t\t\tmargin={{ top: 10, right: 30, left: 0, bottom: 0 }}\n\t\t\t\t\t\tbarCategoryGap={barCategoryGap}\n\t\t\t\t\t\tstackOffset={relative ? \"expand\" : undefined}\n\t\t\t\t\t>\n\t\t\t\t\t\t{showGridLines && (\n\t\t\t\t\t\t\t<CartesianGrid\n\t\t\t\t\t\t\t\tstrokeDasharray=\"3 3\"\n\t\t\t\t\t\t\t\tclassName=\"stroke-gray-200 dark:stroke-gray-800\"\n\t\t\t\t\t\t\t\thorizontal={rechartsLayout !== \"vertical\"}\n\t\t\t\t\t\t\t\tvertical={rechartsLayout === \"vertical\"}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{rechartsLayout === \"horizontal\" ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\t\t\tdataKey={index}\n\t\t\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\t\t\twidth={yAxisWidth}\n\t\t\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\t\t\ttickFormatter={\n\t\t\t\t\t\t\t\t\t\trelative\n\t\t\t\t\t\t\t\t\t\t\t? (value) => `${(value * 100).toFixed(0)}%`\n\t\t\t\t\t\t\t\t\t\t\t: formatValue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<XAxis\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\t\t\ttickFormatter={\n\t\t\t\t\t\t\t\t\t\trelative\n\t\t\t\t\t\t\t\t\t\t\t? (value) => `${(value * 100).toFixed(0)}%`\n\t\t\t\t\t\t\t\t\t\t\t: formatValue\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<YAxis\n\t\t\t\t\t\t\t\t\ttype=\"category\"\n\t\t\t\t\t\t\t\t\tdataKey={index}\n\t\t\t\t\t\t\t\t\twidth={yAxisWidth}\n\t\t\t\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\t\t\t\tclassName=\"fill-gray-500 text-xs\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tformatter={(value, name) => {\n\t\t\t\t\t\t\t\tconst numValue = typeof value === \"number\" ? value : 0;\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\trelative\n\t\t\t\t\t\t\t\t\t\t? `${(numValue * 100).toFixed(1)}%`\n\t\t\t\t\t\t\t\t\t\t: formatValue(numValue),\n\t\t\t\t\t\t\t\t\tString(name),\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tcontentStyle={{\n\t\t\t\t\t\t\t\tbackgroundColor: \"white\",\n\t\t\t\t\t\t\t\tborder: \"1px solid #e5e7eb\",\n\t\t\t\t\t\t\t\tborderRadius: \"6px\",\n\t\t\t\t\t\t\t\tboxShadow: \"0 4px 6px -1px rgb(0 0 0 / 0.1)\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{showLegend && <RechartsLegend verticalAlign=\"top\" height={36} />}\n\t\t\t\t\t\t{categories.map((category, idx) => {\n\t\t\t\t\t\t\tconst color = colors?.[idx] || category;\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Bar\n\t\t\t\t\t\t\t\t\tkey={category}\n\t\t\t\t\t\t\t\t\tdataKey={category}\n\t\t\t\t\t\t\t\t\tfill={getColor(color, idx)}\n\t\t\t\t\t\t\t\t\tstackId={stack || relative ? \"stack\" : undefined}\n\t\t\t\t\t\t\t\t\tisAnimationActive={showAnimation}\n\t\t\t\t\t\t\t\t\tradius={[4, 4, 0, 0]}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</RechartsBarChart>\n\t\t\t\t</ResponsiveContainer>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nBarChart.displayName = \"BarChart\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tBar,\n\tCartesianGrid,\n\tLabel,\n\tBarChart as RechartsBarChart,\n\tLegend as RechartsLegend,\n\tResponsiveContainer,\n\tTooltip,\n\tXAxis,\n\tYAxis,\n} from \"recharts\";\nimport { twMerge } from \"tailwind-merge\";\n\n// Define a simpler domain type to avoid recharts type conflicts\ntype SimpleDomain = [number | \"auto\", number | \"auto\"];\n\n/**\n * Color palette for charts\n */\nconst chartColors: Record<string, { fill: string; stroke: string }> = {\n\tblue: { fill: \"#3b82f6\", stroke: \"#2563eb\" },\n\temerald: { fill: \"#10b981\", stroke: \"#059669\" },\n\tviolet: { fill: \"#8b5cf6\", stroke: \"#7c3aed\" },\n\tamber: { fill: \"#f59e0b\", stroke: \"#d97706\" },\n\tgray: { fill: \"#6b7280\", stroke: \"#4b5563\" },\n\tcyan: { fill: \"#06b6d4\", stroke: \"#0891b2\" },\n\tpink: { fill: \"#ec4899\", stroke: \"#db2777\" },\n\tlime: { fill: \"#84cc16\", stroke: \"#65a30d\" },\n\tfuchsia: { fill: \"#d946ef\", stroke: \"#c026d3\" },\n\torange: { fill: \"#f97316\", stroke: \"#ea580c\" },\n};\n\nfunction getColor(\n\tcolor: string,\n\tindex: number,\n): { fill: string; stroke: string } {\n\tif (chartColors[color]) return chartColors[color];\n\tconst defaultColors = Object.values(chartColors);\n\treturn defaultColors[index % defaultColors.length];\n}\n\n/**\n * Custom bar shape with colored top line\n */\nconst renderShape = (\n\tprops: Record<string, unknown>,\n\tactiveBar: Record<string, unknown> | undefined,\n\tactiveLegend: string | undefined,\n\tstrokeColor: string,\n\tlayout: string,\n) => {\n\tconst { name, payload, value } = props as {\n\t\tname: string;\n\t\tpayload: Record<string, unknown>;\n\t\tvalue: number;\n\t};\n\tlet { x, width, y, height } = props as {\n\t\tx: number;\n\t\twidth: number;\n\t\ty: number;\n\t\theight: number;\n\t};\n\tlet lineX1: number, lineY1: number, lineX2: number, lineY2: number;\n\n\tif (layout === \"horizontal\" && height < 0) {\n\t\ty += height;\n\t\theight = Math.abs(height);\n\t} else if (layout === \"vertical\" && width < 0) {\n\t\tx += width;\n\t\twidth = Math.abs(width);\n\t}\n\n\tif (layout === \"horizontal\") {\n\t\tlineX1 = x;\n\t\tlineY1 = y;\n\t\tlineX2 = x + width;\n\t\tlineY2 = y;\n\t} else {\n\t\tlineX1 = x + width;\n\t\tlineY1 = y;\n\t\tlineX2 = x + width;\n\t\tlineY2 = y + height;\n\t}\n\n\tconst isActive =\n\t\tactiveBar &&\n\t\tactiveBar.value === value &&\n\t\tJSON.stringify(activeBar.payload) === JSON.stringify(payload);\n\n\tconst opacity =\n\t\tactiveBar || (activeLegend && activeLegend !== name)\n\t\t\t? isActive\n\t\t\t\t? 0.2\n\t\t\t\t: 0.1\n\t\t\t: 0.2;\n\n\tconst lineOpacity =\n\t\tactiveBar || (activeLegend && activeLegend !== name)\n\t\t\t? isActive\n\t\t\t\t? 1\n\t\t\t\t: 0.5\n\t\t\t: 1;\n\n\treturn (\n\t\t<g>\n\t\t\t<rect\n\t\t\t\tx={x}\n\t\t\t\ty={y}\n\t\t\t\twidth={width}\n\t\t\t\theight={height}\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\topacity={opacity}\n\t\t\t/>\n\t\t\t<line\n\t\t\t\tx1={lineX1}\n\t\t\t\ty1={lineY1}\n\t\t\t\tx2={lineX2}\n\t\t\t\ty2={lineY2}\n\t\t\t\tstroke={strokeColor}\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\topacity={lineOpacity}\n\t\t\t/>\n\t\t</g>\n\t);\n};\n\nexport interface BarChartVariantProps\n\textends React.HTMLAttributes<HTMLDivElement> {\n\t/** Chart data */\n\tdata: Record<string, unknown>[];\n\t/** X-axis data key */\n\tindex: string;\n\t/** Categories (series) */\n\tcategories: string[];\n\t/** Colors for each category */\n\tcolors?: string[];\n\t/** Value formatter */\n\tvalueFormatter?: (value: number) => string;\n\t/** X-axis value formatter */\n\txValueFormatter?: (value: string) => string;\n\t/** Show X axis */\n\tshowXAxis?: boolean;\n\t/** Show Y axis */\n\tshowYAxis?: boolean;\n\t/** Show grid lines */\n\tshowGridLines?: boolean;\n\t/** Y axis width */\n\tyAxisWidth?: number;\n\t/** Show tooltip */\n\tshowTooltip?: boolean;\n\t/** Show legend */\n\tshowLegend?: boolean;\n\t/** Auto min value */\n\tautoMinValue?: boolean;\n\t/** Min value */\n\tminValue?: number;\n\t/** Max value */\n\tmaxValue?: number;\n\t/** Allow decimals */\n\tallowDecimals?: boolean;\n\t/** Bar category gap */\n\tbarCategoryGap?: string | number;\n\t/** X axis label */\n\txAxisLabel?: string;\n\t/** Y axis label */\n\tyAxisLabel?: string;\n\t/** Chart type */\n\ttype?: \"default\" | \"stacked\" | \"percent\";\n\t/** Legend position */\n\tlegendPosition?: \"left\" | \"center\" | \"right\";\n\t/** Layout direction */\n\tlayout?: \"vertical\" | \"horizontal\";\n\t/** Value change handler */\n\tonValueChange?: (value: Record<string, unknown> | null) => void;\n\t/** Sync ID for multiple charts */\n\tsyncId?: string;\n}\n\nexport const BarChartVariant = React.forwardRef<\n\tHTMLDivElement,\n\tBarChartVariantProps\n>((props, forwardedRef) => {\n\tconst {\n\t\tdata = [],\n\t\tcategories = [],\n\t\tindex,\n\t\tcolors = [\"blue\", \"emerald\", \"violet\", \"amber\"],\n\t\tvalueFormatter = (value: number) => value.toString(),\n\t\txValueFormatter = (value: string) => value.toString(),\n\t\tshowXAxis = true,\n\t\tshowYAxis = true,\n\t\tshowGridLines = true,\n\t\tyAxisWidth = 56,\n\t\tshowTooltip = true,\n\t\tshowLegend = true,\n\t\tautoMinValue = false,\n\t\tminValue,\n\t\tmaxValue,\n\t\tallowDecimals = true,\n\t\tbarCategoryGap = \"2%\",\n\t\txAxisLabel,\n\t\tyAxisLabel,\n\t\ttype = \"default\",\n\t\tlegendPosition = \"right\",\n\t\tlayout = \"horizontal\",\n\t\tclassName,\n\t\tonValueChange,\n\t\tsyncId,\n\t\t...other\n\t} = props;\n\n\tconst [legendHeight] = React.useState(60);\n\tconst [activeLegend, setActiveLegend] = React.useState<string | undefined>(\n\t\tundefined,\n\t);\n\tconst [activeBar, setActiveBar] = React.useState<\n\t\tRecord<string, unknown> | undefined\n\t>(undefined);\n\n\tconst stacked = type === \"stacked\" || type === \"percent\";\n\n\tconst getYAxisDomain = (): SimpleDomain => {\n\t\tconst min: number | \"auto\" = autoMinValue ? \"auto\" : (minValue ?? 0);\n\t\tconst max: number | \"auto\" = maxValue ?? \"auto\";\n\t\treturn [min, max];\n\t};\n\n\tconst yAxisDomain = getYAxisDomain();\n\n\tfunction valueToPercent(value: number) {\n\t\treturn `${(value * 100).toFixed(0)}%`;\n\t}\n\n\tfunction onBarClick(barData: Record<string, unknown>) {\n\t\tif (!onValueChange) return;\n\t\tif (activeBar && JSON.stringify(activeBar) === JSON.stringify(barData)) {\n\t\t\tsetActiveLegend(undefined);\n\t\t\tsetActiveBar(undefined);\n\t\t\tonValueChange(null);\n\t\t} else {\n\t\t\tsetActiveBar(barData);\n\t\t\tonValueChange(barData);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={forwardedRef}\n\t\t\tclassName={twMerge(\"h-80 w-full\", className)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<ResponsiveContainer>\n\t\t\t\t<RechartsBarChart\n\t\t\t\t\tdata={data}\n\t\t\t\t\tmargin={{\n\t\t\t\t\t\tbottom: xAxisLabel ? 30 : undefined,\n\t\t\t\t\t\tleft: yAxisLabel ? 20 : undefined,\n\t\t\t\t\t\tright: yAxisLabel ? 5 : undefined,\n\t\t\t\t\t\ttop: 10,\n\t\t\t\t\t}}\n\t\t\t\t\tstackOffset={type === \"percent\" ? \"expand\" : undefined}\n\t\t\t\t\tlayout={layout}\n\t\t\t\t\tbarCategoryGap={barCategoryGap}\n\t\t\t\t\tsyncId={syncId}\n\t\t\t\t>\n\t\t\t\t\t{showGridLines && (\n\t\t\t\t\t\t<CartesianGrid\n\t\t\t\t\t\t\tclassName=\"stroke-gray-100 stroke-1 dark:stroke-gray-900\"\n\t\t\t\t\t\t\thorizontal={layout !== \"vertical\"}\n\t\t\t\t\t\t\tvertical={layout === \"vertical\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<XAxis\n\t\t\t\t\t\thide={!showXAxis}\n\t\t\t\t\t\ttick={{\n\t\t\t\t\t\t\ttransform: layout !== \"vertical\" ? \"translate(0, 6)\" : undefined,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfill=\"\"\n\t\t\t\t\t\tstroke=\"\"\n\t\t\t\t\t\tclassName=\"text-xs fill-gray-500 dark:fill-gray-500\"\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\tminTickGap={5}\n\t\t\t\t\t\ttickFormatter={xValueFormatter}\n\t\t\t\t\t\t{...(layout !== \"vertical\"\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tdataKey: index,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\ttype: \"number\" as const,\n\t\t\t\t\t\t\t\t\tdomain: yAxisDomain as unknown as [\n\t\t\t\t\t\t\t\t\t\tnumber | string,\n\t\t\t\t\t\t\t\t\t\tnumber | string,\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\ttickFormatter:\n\t\t\t\t\t\t\t\t\t\ttype === \"percent\" ? valueToPercent : valueFormatter,\n\t\t\t\t\t\t\t\t\tallowDecimals: allowDecimals,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{xAxisLabel && (\n\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\tposition=\"insideBottom\"\n\t\t\t\t\t\t\t\toffset={-20}\n\t\t\t\t\t\t\t\tclassName=\"fill-gray-800 text-sm font-medium dark:fill-gray-200\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{xAxisLabel}\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</XAxis>\n\t\t\t\t\t<YAxis\n\t\t\t\t\t\twidth={yAxisWidth}\n\t\t\t\t\t\thide={!showYAxis}\n\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\ttickLine={layout === \"horizontal\"}\n\t\t\t\t\t\ttickSize={6}\n\t\t\t\t\t\tfill=\"\"\n\t\t\t\t\t\tstroke=\"\"\n\t\t\t\t\t\tclassName=\"text-xs fill-gray-500 stroke-gray-800 dark:fill-gray-500 dark:stroke-gray-300\"\n\t\t\t\t\t\ttick={{\n\t\t\t\t\t\t\ttransform:\n\t\t\t\t\t\t\t\tlayout !== \"vertical\" ? \"translate(-3, 0)\" : \"translate(0, 0)\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t{...(layout !== \"vertical\"\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttype: \"number\" as const,\n\t\t\t\t\t\t\t\t\tdomain: yAxisDomain as unknown as [\n\t\t\t\t\t\t\t\t\t\tnumber | string,\n\t\t\t\t\t\t\t\t\t\tnumber | string,\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\ttickFormatter:\n\t\t\t\t\t\t\t\t\t\ttype === \"percent\" ? valueToPercent : valueFormatter,\n\t\t\t\t\t\t\t\t\tallowDecimals: allowDecimals,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\tdataKey: index,\n\t\t\t\t\t\t\t\t\ttype: \"category\" as const,\n\t\t\t\t\t\t\t\t\tinterval: \"equidistantPreserveStart\" as const,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{yAxisLabel && (\n\t\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\t\tposition=\"insideLeft\"\n\t\t\t\t\t\t\t\tstyle={{ textAnchor: \"middle\" }}\n\t\t\t\t\t\t\t\tangle={-90}\n\t\t\t\t\t\t\t\toffset={-15}\n\t\t\t\t\t\t\t\tclassName=\"fill-gray-800 text-sm font-medium dark:fill-gray-200\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{yAxisLabel}\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</YAxis>\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\twrapperStyle={{ outline: \"none\" }}\n\t\t\t\t\t\tisAnimationActive={true}\n\t\t\t\t\t\tanimationDuration={100}\n\t\t\t\t\t\tcursor={{ fill: \"#d1d5db\", opacity: \"0.15\" }}\n\t\t\t\t\t\toffset={20}\n\t\t\t\t\t\tposition={{\n\t\t\t\t\t\t\ty: layout === \"horizontal\" ? 0 : undefined,\n\t\t\t\t\t\t\tx: layout === \"horizontal\" ? undefined : yAxisWidth + 20,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\t? ({ active, payload, label }) => {\n\t\t\t\t\t\t\t\t\t\tif (active && payload && payload.length) {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"w-44 rounded-md border border-gray-200 bg-white text-sm shadow-md dark:border-gray-800 dark:bg-gray-950\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"border-b border-inherit p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"font-medium text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{xValueFormatter\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? xValueFormatter(label as string)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"space-y-1 p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{payload.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem: { value: number; dataKey: string },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidx: number,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={idx.toString()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between space-x-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-2.5 shrink-0 rounded-sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: getColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolors[idx] || \"gray\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).fill,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"whitespace-nowrap text-right text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{item.dataKey}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"whitespace-nowrap text-right font-medium tabular-nums text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{valueFormatter(item.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: () => null\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{showLegend && (\n\t\t\t\t\t\t<RechartsLegend verticalAlign=\"top\" height={legendHeight} />\n\t\t\t\t\t)}\n\t\t\t\t\t{categories.map((category, idx) => {\n\t\t\t\t\t\tconst colorConfig = getColor(colors[idx] || \"gray\", idx);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Bar\n\t\t\t\t\t\t\t\tkey={category}\n\t\t\t\t\t\t\t\tname={category}\n\t\t\t\t\t\t\t\tdataKey={category}\n\t\t\t\t\t\t\t\tstackId={stacked ? \"stack\" : undefined}\n\t\t\t\t\t\t\t\tisAnimationActive={false}\n\t\t\t\t\t\t\t\tfill={colorConfig.fill}\n\t\t\t\t\t\t\t\tclassName={onValueChange ? \"cursor-pointer\" : \"\"}\n\t\t\t\t\t\t\t\tshape={(shapeProps: unknown) =>\n\t\t\t\t\t\t\t\t\trenderShape(\n\t\t\t\t\t\t\t\t\t\tshapeProps as Record<string, unknown>,\n\t\t\t\t\t\t\t\t\t\tactiveBar,\n\t\t\t\t\t\t\t\t\t\tactiveLegend,\n\t\t\t\t\t\t\t\t\t\tcolorConfig.stroke,\n\t\t\t\t\t\t\t\t\t\tlayout,\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={(barData) =>\n\t\t\t\t\t\t\t\t\tonBarClick(barData as unknown as Record<string, unknown>)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n});\n\nBarChartVariant.displayName = \"BarChartVariant\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n\tCell,\n\tPie,\n\tLegend as RechartsLegend,\n\tPieChart as RechartsPieChart,\n\tResponsiveContainer,\n\tTooltip,\n} from \"recharts\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * DonutChart data segment\n */\nexport interface DonutChartDataItem {\n\t/** Category name */\n\tname: string;\n\t/** Numeric value */\n\tvalue: number;\n\t/** Segment color */\n\tcolor?: string;\n\t/** Index signature for Recharts compatibility */\n\t[key: string]: string | number | undefined;\n}\n\n/**\n * DonutChart Props - Compatible with mdxui DonutChartProps\n * All properties with defaults are optional for consumers\n */\nexport interface DonutChartProps {\n\t/** Donut chart data segments */\n\tdata: DonutChartDataItem[];\n\t/** Data key for category names */\n\tcategory: string;\n\t/** Data key for numeric values */\n\tvalue: string;\n\t/** Color palette for segments */\n\tcolors?: string[];\n\t/** Chart display variant */\n\tvariant?: \"donut\" | \"pie\";\n\t/** Center label text */\n\tlabel?: string;\n\t/** Display chart legend */\n\tshowLegend?: boolean;\n\t/** Enable hover tooltips */\n\tshowTooltip?: boolean;\n\t/** Animation duration in ms */\n\tanimationDuration?: number;\n\t/** Function to format numeric values for display */\n\tvalueFormatter?: (value: number) => string;\n\t/** Custom className */\n\tclassName?: string;\n}\n\n/**\n * Color palette for charts - maps semantic names to Tailwind classes\n */\nconst chartColors: Record<string, string> = {\n\tblue: \"#3b82f6\",\n\tgreen: \"#22c55e\",\n\tred: \"#ef4444\",\n\tyellow: \"#eab308\",\n\tpurple: \"#a855f7\",\n\tcyan: \"#06b6d4\",\n\torange: \"#f97316\",\n\tpink: \"#ec4899\",\n\tindigo: \"#6366f1\",\n\tteal: \"#14b8a6\",\n\temerald: \"#10b981\",\n\tgray: \"#6b7280\",\n};\n\nfunction getColor(color: string | undefined, index: number): string {\n\tif (color && chartColors[color]) return chartColors[color];\n\tif (color && color.startsWith(\"#\")) return color;\n\t// Default color palette for unspecified colors\n\tconst defaultColors = Object.values(chartColors);\n\treturn defaultColors[index % defaultColors.length];\n}\n\n/**\n * DonutChart - Tremor-style donut/pie chart adapter implementing mdxui DonutChartProps\n *\n * Wraps Recharts PieChart with mdxui-compliant props interface.\n *\n * @example\n * ```tsx\n * <DonutChart\n * data={[\n * { name: 'Category A', value: 40 },\n * { name: 'Category B', value: 60 },\n * ]}\n * category=\"name\"\n * value=\"value\"\n * />\n * ```\n */\nexport const DonutChart = React.forwardRef<HTMLDivElement, DonutChartProps>(\n\t(\n\t\t{\n\t\t\tdata,\n\t\t\tcategory,\n\t\t\tvalue,\n\t\t\tcolors,\n\t\t\tvariant = \"donut\",\n\t\t\tlabel,\n\t\t\tshowLegend = true,\n\t\t\tshowTooltip = true,\n\t\t\tanimationDuration = 500,\n\t\t\tvalueFormatter,\n\t\t\tclassName,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst formatValue = valueFormatter || ((val: number) => val.toString());\n\n\t\t// Inner radius determines if it's a donut (has hole) or pie (no hole)\n\t\tconst innerRadius = variant === \"donut\" ? \"60%\" : 0;\n\n\t\treturn (\n\t\t\t<div ref={ref} className={twMerge(\"h-80 w-full\", className)}>\n\t\t\t\t<ResponsiveContainer width=\"100%\" height=\"100%\">\n\t\t\t\t\t<RechartsPieChart>\n\t\t\t\t\t\t<Pie\n\t\t\t\t\t\t\tdata={data}\n\t\t\t\t\t\t\tdataKey={value}\n\t\t\t\t\t\t\tnameKey={category}\n\t\t\t\t\t\t\tcx=\"50%\"\n\t\t\t\t\t\t\tcy=\"50%\"\n\t\t\t\t\t\t\tinnerRadius={innerRadius}\n\t\t\t\t\t\t\touterRadius=\"80%\"\n\t\t\t\t\t\t\tpaddingAngle={2}\n\t\t\t\t\t\t\tisAnimationActive={animationDuration > 0}\n\t\t\t\t\t\t\tanimationDuration={animationDuration}\n\t\t\t\t\t\t\tlabel={label ? false : undefined}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{data.map((entry, index) => {\n\t\t\t\t\t\t\t\tconst entryColor = entry.color || colors?.[index];\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t\t\t\tkey={`cell-${index.toString()}`}\n\t\t\t\t\t\t\t\t\t\tfill={getColor(entryColor, index)}\n\t\t\t\t\t\t\t\t\t\tstrokeWidth={0}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Pie>\n\t\t\t\t\t\t{showTooltip && (\n\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\tformatter={(val, name) => {\n\t\t\t\t\t\t\t\t\tconst numValue = typeof val === \"number\" ? val : 0;\n\t\t\t\t\t\t\t\t\treturn [formatValue(numValue), String(name)];\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcontentStyle={{\n\t\t\t\t\t\t\t\t\tbackgroundColor: \"white\",\n\t\t\t\t\t\t\t\t\tborder: \"1px solid #e5e7eb\",\n\t\t\t\t\t\t\t\t\tborderRadius: \"6px\",\n\t\t\t\t\t\t\t\t\tboxShadow: \"0 4px 6px -1px rgb(0 0 0 / 0.1)\",\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{showLegend && (\n\t\t\t\t\t\t\t<RechartsLegend verticalAlign=\"bottom\" height={36} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{/* Center label for donut variant */}\n\t\t\t\t\t\t{label && variant === \"donut\" && (\n\t\t\t\t\t\t\t<text\n\t\t\t\t\t\t\t\tx=\"50%\"\n\t\t\t\t\t\t\t\ty=\"50%\"\n\t\t\t\t\t\t\t\ttextAnchor=\"middle\"\n\t\t\t\t\t\t\t\tdominantBaseline=\"middle\"\n\t\t\t\t\t\t\t\tclassName=\"fill-gray-900 text-lg font-semibold dark:fill-gray-50\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</RechartsPieChart>\n\t\t\t\t</ResponsiveContainer>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nDonutChart.displayName = \"DonutChart\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { BarChartVariant } from \"./bar-chart-variant\";\n\n// Inline Info icon to avoid lucide-react dependency\nconst InfoIcon = ({ className }: { className?: string }) => (\n\t<svg\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tfill=\"none\"\n\t\tviewBox=\"0 0 24 24\"\n\t\tstrokeWidth={1.5}\n\t\tstroke=\"currentColor\"\n\t\tclassName={className}\n\t\taria-hidden=\"true\"\n\t>\n\t\t<path\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t\td=\"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z\"\n\t\t/>\n\t</svg>\n);\n\n/**\n * Chart types supported by the TransactionChart\n */\nexport type ChartType = \"amount\" | \"count\" | \"category\" | \"merchant\";\n\nexport interface ChartDataItem {\n\tkey: string;\n\tvalue: number;\n}\n\nexport interface ChartConfig {\n\ttitle: string;\n\ttooltipContent: string;\n\tvalueFormatter: (value: number) => string;\n\tlayout?: \"horizontal\" | \"vertical\";\n\tcolor: string;\n\txValueFormatter?: (value: string) => string;\n}\n\n/**\n * Currency formatter\n */\nfunction formatCurrency(value: number, maxFractionDigits = 0): string {\n\treturn new Intl.NumberFormat(\"en-US\", {\n\t\tstyle: \"currency\",\n\t\tcurrency: \"USD\",\n\t\tmaximumFractionDigits: maxFractionDigits,\n\t}).format(value);\n}\n\n/**\n * Number formatter\n */\nfunction formatNumber(value: number): string {\n\treturn new Intl.NumberFormat(\"en-US\").format(value);\n}\n\n/**\n * Chart configurations by type\n */\nconst chartConfigs: Record<ChartType, ChartConfig> = {\n\tamount: {\n\t\ttitle: \"Total Transaction Amount\",\n\t\ttooltipContent:\n\t\t\t\"Total amount of transactions for the selected period and amount range.\",\n\t\tcolor: \"blue\",\n\t\tvalueFormatter: (number: number) => formatCurrency(number),\n\t\txValueFormatter: (dateString: string) => {\n\t\t\tconst date = new Date(dateString);\n\t\t\treturn date.toLocaleDateString(\"en-GB\", {\n\t\t\t\tday: \"2-digit\",\n\t\t\t\tmonth: \"2-digit\",\n\t\t\t\tyear: \"2-digit\",\n\t\t\t});\n\t\t},\n\t},\n\tcount: {\n\t\ttitle: \"Transaction Count\",\n\t\ttooltipContent:\n\t\t\t\"Total number of transactions for the selected period and amount range.\",\n\t\tcolor: \"blue\",\n\t\tvalueFormatter: (number: number) => formatNumber(number),\n\t\txValueFormatter: (dateString: string) => {\n\t\t\tconst date = new Date(dateString);\n\t\t\treturn date.toLocaleDateString(\"en-GB\", {\n\t\t\t\tday: \"2-digit\",\n\t\t\t\tmonth: \"2-digit\",\n\t\t\t\tyear: \"2-digit\",\n\t\t\t});\n\t\t},\n\t},\n\tcategory: {\n\t\ttitle: \"Top 5 Categories by Transaction Amount\",\n\t\ttooltipContent:\n\t\t\t\"Total amount of transactions for the top 5 categories in the selected period and amount range.\",\n\t\tvalueFormatter: (number: number) => formatCurrency(number),\n\t\tlayout: \"vertical\",\n\t\tcolor: \"emerald\",\n\t},\n\tmerchant: {\n\t\ttitle: \"Top 5 Merchants by Transaction Amount\",\n\t\ttooltipContent:\n\t\t\t\"Total amount of transactions for the top 5 merchants in the selected period and amount range.\",\n\t\tvalueFormatter: (number: number) => formatCurrency(number),\n\t\tlayout: \"vertical\",\n\t\tcolor: \"orange\",\n\t},\n};\n\nexport interface TransactionChartProps\n\textends React.HTMLAttributes<HTMLDivElement> {\n\t/** Chart type */\n\ttype: ChartType;\n\t/** Chart data */\n\tdata: ChartDataItem[];\n\t/** Y axis width */\n\tyAxisWidth?: number;\n\t/** Show Y axis */\n\tshowYAxis?: boolean;\n\t/** Title override */\n\ttitle?: string;\n\t/** Tooltip content override */\n\ttooltipContent?: string;\n}\n\n/**\n * TransactionChart - Insights template transaction chart component\n *\n * Displays transaction data in various chart formats with consistent styling.\n *\n * @example\n * ```tsx\n * <TransactionChart\n * type=\"amount\"\n * data={[\n * { key: '2024-01-01', value: 1000 },\n * { key: '2024-01-02', value: 1500 },\n * ]}\n * />\n * ```\n */\nexport const TransactionChart = React.forwardRef<\n\tHTMLDivElement,\n\tTransactionChartProps\n>(\n\t(\n\t\t{\n\t\t\ttype,\n\t\t\tdata,\n\t\t\tyAxisWidth,\n\t\t\tshowYAxis = true,\n\t\t\ttitle,\n\t\t\ttooltipContent,\n\t\t\tclassName,\n\t\t\t...other\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst config = chartConfigs[type];\n\t\tconst chartTitle = title || config.title;\n\t\tconst chartTooltip = tooltipContent || config.tooltipContent;\n\n\t\tconst totalValue = React.useMemo(\n\t\t\t() => Math.round(data.reduce((sum, item) => sum + item.value, 0)),\n\t\t\t[data],\n\t\t);\n\n\t\treturn (\n\t\t\t<div ref={ref} className={twMerge(\"w-full\", className)} {...other}>\n\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\tid={`${type}-chart-title`}\n\t\t\t\t\t\t\tclassName=\"text-sm text-gray-600 dark:text-gray-400\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{chartTitle}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclassName=\"inline-flex items-center\"\n\t\t\t\t\t\t\ttitle={chartTooltip}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<InfoIcon className=\"size-4 text-gray-600 dark:text-gray-400\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<p\n\t\t\t\t\tclassName=\"mt-2 text-2xl font-semibold text-gray-900 dark:text-gray-50\"\n\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t>\n\t\t\t\t\t{config.valueFormatter(totalValue)}\n\t\t\t\t</p>\n\t\t\t\t<BarChartVariant\n\t\t\t\t\tdata={data as unknown as Record<string, unknown>[]}\n\t\t\t\t\tindex=\"key\"\n\t\t\t\t\tcategories={[\"value\"]}\n\t\t\t\t\tshowLegend={false}\n\t\t\t\t\tcolors={[config.color]}\n\t\t\t\t\tyAxisWidth={yAxisWidth}\n\t\t\t\t\tvalueFormatter={config.valueFormatter}\n\t\t\t\t\txValueFormatter={config.xValueFormatter}\n\t\t\t\t\tshowYAxis={showYAxis}\n\t\t\t\t\tclassName=\"mt-6 h-48\"\n\t\t\t\t\tlayout={config.layout}\n\t\t\t\t\tbarCategoryGap=\"6%\"\n\t\t\t\t\taria-labelledby={`${type}-chart-title`}\n\t\t\t\t\trole=\"figure\"\n\t\t\t\t\taria-roledescription=\"chart\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nTransactionChart.displayName = \"TransactionChart\";\n","\"use client\";\n\nimport type { Trend, WidgetSize } from \"mdxui\";\nimport type * as React from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * KPICard Props - with proper optional defaults\n *\n * Note: We define this locally because Zod's z.infer makes fields with .default()\n * required in the TypeScript type, but we want them optional with runtime defaults.\n */\nexport interface KPICardProps {\n\t/** Widget title */\n\ttitle?: string;\n\t/** Widget description/subtitle */\n\tdescription?: string;\n\t/** Responsive sizing configuration */\n\tsize?: WidgetSize;\n\t/** Widget theme variant */\n\tvariant?: \"default\" | \"outlined\" | \"elevated\" | \"ghost\";\n\t/** Show loading state */\n\tloading?: boolean;\n\t/** Error message */\n\terror?: string;\n\t/** Metric label */\n\tlabel: string;\n\t/** Current value */\n\tvalue: string | number;\n\t/** Previous value for comparison */\n\tpreviousValue?: string | number;\n\t/** Change percentage */\n\tchange?: number;\n\t/** Trend direction */\n\ttrend?: Trend;\n\t/** Value prefix (e.g., \"$\", \"EUR\") */\n\tprefix?: string;\n\t/** Value suffix (e.g., \"%\", \"ms\") */\n\tsuffix?: string;\n\t/** Target value or goal */\n\ttarget?: number;\n\t/** Format type for value display */\n\tformat?: \"number\" | \"currency\" | \"percent\" | \"duration\" | \"bytes\";\n\t/** Icon name */\n\ticon?: string;\n\t/** Custom className */\n\tclassName?: string;\n}\n\n/**\n * Tremor-based icons for common metrics\n */\nconst icons: Record<string, React.FC<{ className?: string }>> = {\n\tusers: ({ className }) => (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth={1.5}\n\t\t>\n\t\t\t<path\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\td=\"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z\"\n\t\t\t/>\n\t\t</svg>\n\t),\n\trevenue: ({ className }) => (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth={1.5}\n\t\t>\n\t\t\t<path\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\td=\"M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n\t\t\t/>\n\t\t</svg>\n\t),\n\tchart: ({ className }) => (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth={1.5}\n\t\t>\n\t\t\t<path\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\td=\"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z\"\n\t\t\t/>\n\t\t</svg>\n\t),\n};\n\n/**\n * Get the trend color class based on direction\n */\nfunction getTrendColorClass(trend: Trend | undefined): string {\n\tswitch (trend) {\n\t\tcase \"up\":\n\t\t\treturn \"text-emerald-500\";\n\t\tcase \"down\":\n\t\t\treturn \"text-red-500\";\n\t\tcase \"neutral\":\n\t\tdefault:\n\t\t\treturn \"text-gray-500\";\n\t}\n}\n\n/**\n * Format the change value for display\n */\nfunction formatChange(change: number | undefined): string {\n\tif (change === undefined) return \"\";\n\tconst sign = change > 0 ? \"+\" : \"\";\n\treturn `${sign}${change}%`;\n}\n\n/**\n * Get variant classes for the card\n */\nfunction getVariantClasses(variant: string | undefined): string {\n\tswitch (variant) {\n\t\tcase \"outlined\":\n\t\t\treturn \"border border-gray-200 dark:border-gray-800\";\n\t\tcase \"elevated\":\n\t\t\treturn \"shadow-lg\";\n\t\tcase \"ghost\":\n\t\t\treturn \"bg-transparent\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t}\n}\n\n/**\n * KPICard - A Tremor-style KPI display card\n *\n * Renders a key performance indicator with label, value, optional trend,\n * prefix/suffix formatting, and loading states.\n */\nexport function KPICard({\n\tlabel,\n\tvalue,\n\tpreviousValue,\n\tchange,\n\ttrend,\n\tprefix = \"\",\n\tsuffix = \"\",\n\ttarget,\n\tformat: _format = \"number\",\n\ticon,\n\ttitle: _title,\n\tdescription: _description,\n\tsize: _size,\n\tvariant = \"default\",\n\tloading = false,\n\terror,\n\tclassName,\n}: KPICardProps) {\n\t// Format the display value\n\tconst displayValue = typeof value === \"number\" ? String(value) : value;\n\tconst formattedValue = `${prefix}${displayValue}${suffix}`;\n\n\t// Get icon component if provided\n\tconst IconComponent = icon ? icons[icon] : null;\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-testid=\"kpi-skeleton\"\n\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\"relative w-full rounded-lg border p-6 text-left\",\n\t\t\t\t\t\"bg-white dark:bg-gray-950\",\n\t\t\t\t\t\"border-gray-200 dark:border-gray-900\",\n\t\t\t\t\tgetVariantClasses(variant),\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\taria-busy=\"true\"\n\t\t\t\taria-label={`Loading ${label}`}\n\t\t\t>\n\t\t\t\t<div className=\"animate-pulse\">\n\t\t\t\t\t<div className=\"h-4 w-24 bg-gray-200 dark:bg-gray-800 rounded mb-3\"></div>\n\t\t\t\t\t<div className=\"h-8 w-32 bg-gray-200 dark:bg-gray-800 rounded mb-2\"></div>\n\t\t\t\t\t<div className=\"h-4 w-16 bg-gray-200 dark:bg-gray-800 rounded\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tdata-testid=\"kpi-card\"\n\t\t\tclassName={twMerge(\n\t\t\t\t\"relative w-full rounded-lg border p-6 text-left shadow-sm\",\n\t\t\t\t\"bg-white dark:bg-gray-950\",\n\t\t\t\t\"border-gray-200 dark:border-gray-900\",\n\t\t\t\tgetVariantClasses(variant),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\taria-label={`${label}: ${formattedValue}`}\n\t\t>\n\t\t\t{/* Header with icon and label */}\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t{IconComponent && (\n\t\t\t\t\t<div data-testid=\"kpi-icon\" className=\"flex-shrink-0\">\n\t\t\t\t\t\t<IconComponent className=\"h-5 w-5 text-gray-500 dark:text-gray-400\" />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<h3 className=\"text-sm font-medium text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t{label}\n\t\t\t\t</h3>\n\t\t\t</div>\n\n\t\t\t{/* Value */}\n\t\t\t<p className=\"mt-2 text-3xl font-semibold tracking-tight text-gray-900 dark:text-gray-50\">\n\t\t\t\t{formattedValue}\n\t\t\t</p>\n\n\t\t\t{/* Trend indicator */}\n\t\t\t{(trend || change !== undefined) && (\n\t\t\t\t<div className=\"mt-2 flex items-center gap-2\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tdata-testid=\"trend-indicator\"\n\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\"inline-flex items-center text-sm font-medium\",\n\t\t\t\t\t\t\tgetTrendColorClass(trend),\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{trend === \"up\" && (\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 mr-0.5\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M7 11l5-5m0 0l5 5m-5-5v12\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{trend === \"down\" && (\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"h-4 w-4 mr-0.5\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M17 13l-5 5m0 0l-5-5m5 5V6\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{formatChange(change)}\n\t\t\t\t\t</span>\n\t\t\t\t\t{previousValue !== undefined && (\n\t\t\t\t\t\t<span className=\"text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\tfrom {previousValue}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Target */}\n\t\t\t{target !== undefined && (\n\t\t\t\t<div className=\"mt-2\">\n\t\t\t\t\t<span className=\"text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\ttarget: {target}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Error state */}\n\t\t\t{error && (\n\t\t\t\t<div className=\"mt-2\">\n\t\t\t\t\t<span className=\"text-sm text-red-500\">{error}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport default KPICard;\n","\"use client\";\n\nimport {\n\ttype ColumnDef,\n\tflexRender,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tgetSortedRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport type { TransactionItem } from \"mdxui\";\nimport * as React from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * TransactionsTableProps - Input props for TransactionsTable component\n *\n * This is the consumer-facing type where defaulted fields are optional.\n */\nexport interface TransactionsTableProps {\n\t/** Transaction data - required */\n\ttransactions: TransactionItem[];\n\t/** Title */\n\ttitle?: string;\n\t/** Currency */\n\tcurrency?: string;\n\t/** Value formatter */\n\tvalueFormatter?: (value: number) => string;\n\t/** Show category filter */\n\tshowCategoryFilter?: boolean;\n\t/** Show date filter */\n\tshowDateFilter?: boolean;\n\t/** Show export button */\n\tshowExport?: boolean;\n\t/** Page size */\n\tpageSize?: number;\n\t/** Empty state message */\n\temptyMessage?: string;\n\t/** Loading state */\n\tloading?: boolean;\n\t/** Custom className */\n\tclassName?: string;\n}\n\n// Status badge variants\nconst statusVariants: Record<TransactionItem[\"status\"], string> = {\n\tcompleted:\n\t\t\"bg-emerald-50 text-emerald-900 ring-emerald-600/30 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-emerald-400/20\",\n\tpending:\n\t\t\"bg-gray-50 text-gray-900 ring-gray-500/30 dark:bg-gray-400/10 dark:text-gray-400 dark:ring-gray-400/20\",\n\tfailed:\n\t\t\"bg-rose-50 text-rose-900 ring-rose-600/20 dark:bg-rose-400/10 dark:text-rose-500 dark:ring-rose-400/20\",\n\trefunded:\n\t\t\"bg-orange-50 text-orange-900 ring-orange-600/30 dark:bg-orange-400/10 dark:text-orange-500 dark:ring-orange-400/20\",\n};\n\nfunction StatusBadge({ status }: { status: TransactionItem[\"status\"] }) {\n\treturn (\n\t\t<span\n\t\t\tclassName={twMerge(\n\t\t\t\t\"inline-flex items-center gap-x-1 whitespace-nowrap rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset\",\n\t\t\t\tstatusVariants[status],\n\t\t\t)}\n\t\t>\n\t\t\t{status}\n\t\t</span>\n\t);\n}\n\nfunction formatCurrency(amount: number, currency: string = \"USD\"): string {\n\tconst absAmount = Math.abs(amount);\n\tconst formatted = new Intl.NumberFormat(\"en-US\", {\n\t\tstyle: \"currency\",\n\t\tcurrency,\n\t\tminimumFractionDigits: 2,\n\t\tmaximumFractionDigits: 2,\n\t}).format(absAmount);\n\n\treturn amount < 0 ? `-${formatted}` : formatted;\n}\n\nfunction formatDate(dateString: string): string {\n\tconst date = new Date(dateString);\n\treturn date.toLocaleDateString(\"en-US\", {\n\t\tmonth: \"short\",\n\t\tday: \"numeric\",\n\t\tyear: \"numeric\",\n\t});\n}\n\nfunction createColumns(currency: string = \"USD\"): ColumnDef<TransactionItem>[] {\n\treturn [\n\t\t{\n\t\t\taccessorKey: \"date\",\n\t\t\theader: \"Date\",\n\t\t\tcell: ({ getValue }) => {\n\t\t\t\tconst date = getValue() as string;\n\t\t\t\treturn (\n\t\t\t\t\t<span className=\"tabular-nums text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t{formatDate(date)}\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taccessorKey: \"description\",\n\t\t\theader: \"Description\",\n\t\t\tcell: ({ getValue }) => (\n\t\t\t\t<span className=\"text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t{getValue() as string}\n\t\t\t\t</span>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\taccessorKey: \"amount\",\n\t\t\theader: \"Amount\",\n\t\t\tcell: ({ getValue, row }) => {\n\t\t\t\tconst amount = getValue() as number;\n\t\t\t\tconst isNegative = row.original.type === \"debit\" || amount < 0;\n\t\t\t\tconst displayAmount = isNegative && amount > 0 ? -amount : amount;\n\t\t\t\treturn (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\"tabular-nums font-medium\",\n\t\t\t\t\t\t\tisNegative\n\t\t\t\t\t\t\t\t? \"text-rose-600 dark:text-rose-400\"\n\t\t\t\t\t\t\t\t: \"text-gray-900 dark:text-gray-50\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{formatCurrency(displayAmount, currency)}\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t},\n\t\t\tmeta: {\n\t\t\t\tclassName: \"text-right\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taccessorKey: \"status\",\n\t\t\theader: \"Status\",\n\t\t\tcell: ({ getValue }) => (\n\t\t\t\t<StatusBadge status={getValue() as TransactionItem[\"status\"]} />\n\t\t\t),\n\t\t},\n\t];\n}\n\nfunction LoadingSkeleton() {\n\treturn (\n\t\t<div data-testid=\"transactions-table-loading\" className=\"space-y-3\">\n\t\t\t{[1, 2, 3].map((i) => (\n\t\t\t\t<div key={i} className=\"animate-pulse flex space-x-4\">\n\t\t\t\t\t<div className=\"h-4 bg-gray-200 dark:bg-gray-700 rounded w-24\" />\n\t\t\t\t\t<div className=\"h-4 bg-gray-200 dark:bg-gray-700 rounded flex-1\" />\n\t\t\t\t\t<div className=\"h-4 bg-gray-200 dark:bg-gray-700 rounded w-20\" />\n\t\t\t\t\t<div className=\"h-4 bg-gray-200 dark:bg-gray-700 rounded w-16\" />\n\t\t\t\t</div>\n\t\t\t))}\n\t\t</div>\n\t);\n}\n\n/**\n * TransactionsTable - A paginated table displaying financial transactions\n *\n * Implements the mdxui TransactionsListProps interface with TanStack Table\n * for sorting and pagination.\n */\nexport function TransactionsTable(props: TransactionsTableProps) {\n\tconst {\n\t\ttransactions,\n\t\ttitle,\n\t\tcurrency = \"USD\",\n\t\tpageSize = 10,\n\t\temptyMessage = \"No transactions\",\n\t\tloading = false,\n\t\tclassName,\n\t} = props;\n\n\tconst columns = React.useMemo(() => createColumns(currency), [currency]);\n\n\tconst table = useReactTable({\n\t\tdata: transactions,\n\t\tcolumns,\n\t\tinitialState: {\n\t\t\tpagination: {\n\t\t\t\tpageIndex: 0,\n\t\t\t\tpageSize,\n\t\t\t},\n\t\t},\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(),\n\t\tgetSortedRowModel: getSortedRowModel(),\n\t});\n\n\tconst totalRows = transactions.length;\n\tconst currentPage = table.getState().pagination.pageIndex;\n\tconst firstRowIndex = currentPage * pageSize + 1;\n\tconst lastRowIndex = Math.min(totalRows, firstRowIndex + pageSize - 1);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className={twMerge(\"space-y-4\", className)}>\n\t\t\t\t{title && (\n\t\t\t\t\t<h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</h3>\n\t\t\t\t)}\n\t\t\t\t<LoadingSkeleton />\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className={twMerge(\"space-y-4\", className)}>\n\t\t\t{title && (\n\t\t\t\t<h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t{title}\n\t\t\t\t</h3>\n\t\t\t)}\n\t\t\t<div className=\"relative overflow-hidden overflow-x-auto\">\n\t\t\t\t<table className=\"w-full caption-bottom border-b border-gray-200 dark:border-gray-800\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t{table.getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t\t\t<tr\n\t\t\t\t\t\t\t\tkey={headerGroup.id}\n\t\t\t\t\t\t\t\tclassName=\"border-y border-gray-200 dark:border-gray-800\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\t\t\t\t\"border-b px-4 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-50 border-gray-200 dark:border-gray-800\",\n\t\t\t\t\t\t\t\t\t\t\t(header.column.columnDef.meta as any)?.className,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody className=\"divide-y divide-gray-200 dark:divide-gray-800\">\n\t\t\t\t\t\t{table.getRowModel().rows.length > 0 ? (\n\t\t\t\t\t\t\ttable.getRowModel().rows.map((row) => (\n\t\t\t\t\t\t\t\t<tr\n\t\t\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:bg-gray-50 hover:dark:bg-gray-900\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\t\t\t\t\t\"p-4 text-sm text-gray-600 dark:text-gray-400\",\n\t\t\t\t\t\t\t\t\t\t\t\t(cell.column.columnDef.meta as any)?.className,\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\tcolSpan={columns.length}\n\t\t\t\t\t\t\t\t\tclassName=\"h-24 text-center text-sm text-gray-500 dark:text-gray-400\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{emptyMessage}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t{totalRows > pageSize && (\n\t\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t\t<div className=\"text-sm tabular-nums text-gray-500\">\n\t\t\t\t\t\tShowing {firstRowIndex}-{lastRowIndex} of {totalRows}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-x-1.5\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={() => table.setPageIndex(0)}\n\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\tclassName=\"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed\"\n\t\t\t\t\t\t\taria-label=\"First page\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"size-4\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M18.75 19.5l-7.5-7.5 7.5-7.5M11.25 19.5l-7.5-7.5 7.5-7.5\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={() => table.previousPage()}\n\t\t\t\t\t\t\tdisabled={!table.getCanPreviousPage()}\n\t\t\t\t\t\t\tclassName=\"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed\"\n\t\t\t\t\t\t\taria-label=\"Previous page\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"size-4\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M15.75 19.5L8.25 12l7.5-7.5\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={() => table.nextPage()}\n\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\tclassName=\"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed\"\n\t\t\t\t\t\t\taria-label=\"Next page\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"size-4\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M8.25 4.5l7.5 7.5-7.5 7.5\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={() => table.setPageIndex(table.getPageCount() - 1)}\n\t\t\t\t\t\t\tdisabled={!table.getCanNextPage()}\n\t\t\t\t\t\t\tclassName=\"p-1.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed\"\n\t\t\t\t\t\t\taria-label=\"Last page\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"size-4\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\td=\"M5.25 4.5l7.5 7.5-7.5 7.5M12.75 4.5l7.5 7.5-7.5 7.5\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from \"react\";\n\nexport interface InsightsAppProps {\n\t/** App display name */\n\tname?: string;\n\t/** Child content */\n\tchildren: ReactNode;\n}\n\n/**\n * InsightsApp - Root wrapper component for the Insights template\n *\n * Provides the root application wrapper with providers and theme setup.\n * In the Insights template, this wraps the entire application.\n *\n * @example\n * ```tsx\n * <InsightsApp name=\"Analytics Dashboard\">\n * <InsightsShell>\n * <Dashboard />\n * </InsightsShell>\n * </InsightsApp>\n * ```\n */\nexport function InsightsApp({ name, children }: InsightsAppProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-app-name={name}\n\t\t\tclassName=\"min-h-screen bg-white dark:bg-gray-950\"\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface InsightsDashboardProps {\n\t/** Dashboard title */\n\ttitle?: string;\n\t/** Optional description text */\n\tdescription?: string;\n\t/** Metrics to display (optional) */\n\tmetrics?: Array<{\n\t\tlabel: string;\n\t\tvalue: string | number;\n\t\tchange?: number;\n\t\ttrend?: \"up\" | \"down\" | \"neutral\";\n\t}>;\n\t/** Action buttons or controls to render on the right */\n\tactions?: ReactNode;\n\t/** Main content area */\n\tchildren: ReactNode;\n\t/** Additional className for the container */\n\tclassName?: string;\n}\n\n/**\n * InsightsDashboard - Dashboard page layout for the Insights template\n *\n * Provides a consistent layout structure for analytics dashboard pages:\n * - Title and description header\n * - Optional metrics summary\n * - Optional action buttons area\n * - Divider\n * - Main content area\n *\n * @example\n * ```tsx\n * <InsightsDashboard\n * title=\"Analytics Overview\"\n * description=\"Real-time analytics and reporting\"\n * metrics={[\n * { label: 'Total Revenue', value: '$45,231', change: 12.5, trend: 'up' },\n * { label: 'Active Users', value: '2,543', change: 8.2, trend: 'up' },\n * ]}\n * actions={<Button>Export</Button>}\n * >\n * <ChartGrid />\n * <TransactionsTable />\n * </InsightsDashboard>\n * ```\n */\nexport function InsightsDashboard({\n\ttitle = \"Dashboard\",\n\tdescription,\n\tmetrics,\n\tactions,\n\tchildren,\n\tclassName,\n}: InsightsDashboardProps) {\n\treturn (\n\t\t<main className={twMerge(\"\", className)}>\n\t\t\t{/* Header section */}\n\t\t\t<div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n\t\t\t\t<div>\n\t\t\t\t\t<h1 className=\"text-2xl font-semibold text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</h1>\n\t\t\t\t\t{description && (\n\t\t\t\t\t\t<p className=\"text-gray-500 sm:text-sm/6 dark:text-gray-500\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n\t\t\t</div>\n\n\t\t\t{/* Metrics summary (optional) */}\n\t\t\t{metrics && metrics.length > 0 && (\n\t\t\t\t<div className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n\t\t\t\t\t{metrics.map((metric) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={metric.label}\n\t\t\t\t\t\t\tclassName=\"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p className=\"text-sm font-medium text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\t{metric.label}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p className=\"mt-1 text-2xl font-semibold text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t\t\t{metric.value}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{metric.change !== undefined && (\n\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\t\t\t\"mt-1 text-sm font-medium\",\n\t\t\t\t\t\t\t\t\t\tmetric.trend === \"up\"\n\t\t\t\t\t\t\t\t\t\t\t? \"text-green-600 dark:text-green-400\"\n\t\t\t\t\t\t\t\t\t\t\t: metric.trend === \"down\"\n\t\t\t\t\t\t\t\t\t\t\t\t? \"text-red-600 dark:text-red-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"text-gray-500 dark:text-gray-400\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{metric.trend === \"up\" && \"+\"}\n\t\t\t\t\t\t\t\t\t{metric.change}%\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Divider */}\n\t\t\t<div className=\"my-6 border-t border-gray-200 dark:border-gray-800\" />\n\n\t\t\t{/* Main content */}\n\t\t\t{children}\n\t\t</main>\n\t);\n}\n","import type { ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface Breadcrumb {\n\tlabel: string;\n\thref?: string;\n}\n\nexport interface InsightsHeaderProps {\n\t/** Current user */\n\tuser?: {\n\t\tname: string;\n\t\temail: string;\n\t\tavatar?: string;\n\t};\n\t/** Show search */\n\tshowSearch?: boolean;\n\t/** Show notifications */\n\tshowNotifications?: boolean;\n\t/** Breadcrumbs */\n\tbreadcrumbs?: Breadcrumb[];\n\t/** Logo component */\n\tlogo?: ReactNode;\n\t/** Notifications component */\n\tnotifications?: ReactNode;\n\t/** User profile component */\n\tuserProfile?: ReactNode;\n\t/** Additional className */\n\tclassName?: string;\n}\n\n/**\n * InsightsHeader - Top header bar for the Insights template\n *\n * Provides a header bar with logo, user profile, and notifications.\n * This is typically used inside InsightsShell but can be used standalone.\n *\n * @example\n * ```tsx\n * <InsightsHeader\n * user={{ name: 'John Doe', email: 'john@example.com.ai' }}\n * showSearch={true}\n * showNotifications={true}\n * />\n * ```\n */\nexport function InsightsHeader({\n\tuser,\n\tshowSearch = true,\n\tshowNotifications = true,\n\tbreadcrumbs,\n\tlogo,\n\tnotifications,\n\tuserProfile,\n\tclassName,\n}: InsightsHeaderProps) {\n\treturn (\n\t\t<header\n\t\t\tclassName={twMerge(\n\t\t\t\t\"flex h-16 items-center justify-between border-b border-gray-200 bg-white px-4 dark:border-gray-800 dark:bg-gray-950 sm:px-6\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* Left side - Logo and breadcrumbs */}\n\t\t\t<div className=\"flex items-center gap-4\">\n\t\t\t\t{logo ?? (\n\t\t\t\t\t<div className=\"h-6 w-20 rounded bg-gray-200 dark:bg-gray-800\" />\n\t\t\t\t)}\n\n\t\t\t\t{breadcrumbs && breadcrumbs.length > 0 && (\n\t\t\t\t\t<nav aria-label=\"Breadcrumb\" className=\"hidden sm:block\">\n\t\t\t\t\t\t<ol className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{breadcrumbs.map((crumb, index) => (\n\t\t\t\t\t\t\t\t<li key={crumb.label} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t{index > 0 && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-gray-400 dark:text-gray-600\">/</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{crumb.href ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={crumb.href}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{crumb.label}\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-gray-900 dark:text-gray-100\">\n\t\t\t\t\t\t\t\t\t\t\t{crumb.label}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ol>\n\t\t\t\t\t</nav>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t{/* Right side - Search, notifications, user */}\n\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t{showSearch && (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName=\"rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300\"\n\t\t\t\t\t\taria-label=\"Search\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclassName=\"h-5 w-5\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t\td=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</button>\n\t\t\t\t)}\n\n\t\t\t\t{showNotifications &&\n\t\t\t\t\t(notifications ?? (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclassName=\"rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300\"\n\t\t\t\t\t\t\taria-label=\"Notifications\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclassName=\"h-5 w-5\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\t\t\t\td=\"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t))}\n\n\t\t\t\t{userProfile ??\n\t\t\t\t\t(user && (\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{user.avatar ? (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={user.avatar}\n\t\t\t\t\t\t\t\t\talt={user.name}\n\t\t\t\t\t\t\t\t\tclassName=\"h-8 w-8 rounded-full\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"flex h-8 w-8 items-center justify-center rounded-full bg-gray-200 text-sm font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\t\t\t\t{user.name.charAt(0)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t</header>\n\t);\n}\n","import type { ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport type SettingsSection =\n\t| \"profile\"\n\t| \"security\"\n\t| \"notifications\"\n\t| \"billing\"\n\t| \"team\"\n\t| \"api\"\n\t| \"integrations\";\n\nexport interface InsightsSettingsProps {\n\t/** Settings sections to show */\n\tsections?: SettingsSection[];\n\t/** Currently active section */\n\tactiveSection?: SettingsSection;\n\t/** Child content */\n\tchildren?: ReactNode;\n\t/** Additional className */\n\tclassName?: string;\n}\n\nconst sectionLabels: Record<SettingsSection, string> = {\n\tprofile: \"Profile\",\n\tsecurity: \"Security\",\n\tnotifications: \"Notifications\",\n\tbilling: \"Billing\",\n\tteam: \"Team\",\n\tapi: \"API\",\n\tintegrations: \"Integrations\",\n};\n\n/**\n * InsightsSettings - Settings page layout for the Insights template\n *\n * Provides a settings page structure with sidebar navigation\n * and main content area for settings forms.\n *\n * @example\n * ```tsx\n * <InsightsSettings\n * sections={['profile', 'security', 'notifications']}\n * activeSection=\"profile\"\n * >\n * <ProfileSettingsForm />\n * </InsightsSettings>\n * ```\n */\nexport function InsightsSettings({\n\tsections = [\"profile\", \"security\", \"notifications\"],\n\tactiveSection = \"profile\",\n\tchildren,\n\tclassName,\n}: InsightsSettingsProps) {\n\treturn (\n\t\t<div className={twMerge(\"flex gap-8\", className)}>\n\t\t\t{/* Settings navigation */}\n\t\t\t<nav className=\"w-48 flex-shrink-0\">\n\t\t\t\t<ul className=\"space-y-1\">\n\t\t\t\t\t{sections.map((section) => (\n\t\t\t\t\t\t<li key={section}>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={`/settings/${section}`}\n\t\t\t\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\t\t\t\"block rounded-lg px-3 py-2 text-sm font-medium transition-colors\",\n\t\t\t\t\t\t\t\t\tsection === activeSection\n\t\t\t\t\t\t\t\t\t\t? \"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100\"\n\t\t\t\t\t\t\t\t\t\t: \"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:text-gray-300\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{sectionLabels[section]}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t</nav>\n\n\t\t\t{/* Settings content */}\n\t\t\t<div className=\"flex-1\">\n\t\t\t\t{children ?? (\n\t\t\t\t\t<div className=\"rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-800 dark:bg-gray-900\">\n\t\t\t\t\t\t<h2 className=\"text-lg font-semibold text-gray-900 dark:text-gray-100\">\n\t\t\t\t\t\t\t{sectionLabels[activeSection]}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p className=\"mt-2 text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\tConfigure your {sectionLabels[activeSection].toLowerCase()}{\" \"}\n\t\t\t\t\t\t\tsettings.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface InsightsShellProps {\n\t/** Main content area */\n\tchildren: ReactNode;\n\t/** Sidebar component (optional) */\n\tsidebar?: ReactNode;\n\t/** Header component (optional) */\n\theader?: ReactNode;\n\t/** Whether the sidebar is collapsed */\n\tcollapsed?: boolean;\n\t/** Additional className for the shell */\n\tclassName?: string;\n}\n\n/**\n * InsightsShell - Analytics dashboard shell layout\n *\n * A layout component that provides the shell structure for analytics dashboards:\n * - Optional collapsible sidebar on the left\n * - Optional header at the top\n * - Main content area with proper spacing\n *\n * Based on the Tremor insights template layout.\n *\n * @example\n * ```tsx\n * import { InsightsShell, InsightsSidebar } from '@mdxui/tremor/insights'\n *\n * <InsightsShell\n * sidebar={<InsightsSidebar items={navItems} />}\n * header={<header>Analytics Dashboard</header>}\n * >\n * <Dashboard />\n * </InsightsShell>\n * ```\n */\nexport function InsightsShell({\n\tchildren,\n\tsidebar,\n\theader,\n\tcollapsed = false,\n\tclassName,\n}: InsightsShellProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-insights-shell\n\t\t\tdata-collapsed={collapsed ? \"true\" : \"false\"}\n\t\t\tclassName={twMerge(\"mx-auto max-w-screen-2xl\", className)}\n\t\t>\n\t\t\t{/* Sidebar */}\n\t\t\t{sidebar}\n\n\t\t\t{/* Main area */}\n\t\t\t<main\n\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\"ease transform-gpu transition-all duration-100 will-change-transform\",\n\t\t\t\t\t\"lg:bg-gray-50 lg:py-3 lg:pr-3 lg:dark:bg-gray-950\",\n\t\t\t\t\tcollapsed ? \"lg:pl-[60px]\" : \"lg:pl-64\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{/* Header */}\n\t\t\t\t{header}\n\n\t\t\t\t{/* Content */}\n\t\t\t\t<div className=\"bg-white p-4 sm:p-6 lg:rounded-lg lg:border lg:border-gray-200 dark:bg-gray-925 lg:dark:border-gray-900\">\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</main>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from 'react'\nimport { twMerge } from 'tailwind-merge'\n\nexport interface InsightsSidebarItem {\n /** Unique identifier */\n id: string\n /** Display label */\n label: string\n /** Link href (optional - if not provided, item is non-clickable) */\n href?: string\n /** Icon component or element (optional) */\n icon?: ReactNode\n /** Is currently active */\n active?: boolean\n /** Is disabled */\n disabled?: boolean\n /** Click handler (if not using href) */\n onClick?: () => void\n}\n\nexport interface InsightsSidebarLogo {\n /** Logo image URL */\n src: string\n /** Alt text */\n alt: string\n /** Link href (default: '/') */\n href?: string\n /** Collapsed/icon version of logo */\n collapsedSrc?: string\n}\n\nexport interface InsightsSidebarProps {\n /** Navigation items */\n items: InsightsSidebarItem[]\n /** Footer navigation items */\n footerItems?: InsightsSidebarItem[]\n /** Logo configuration */\n logo?: InsightsSidebarLogo\n /** Whether sidebar is collapsed */\n collapsed?: boolean\n /** Collapse toggle handler */\n onCollapse?: () => void\n /** Header slot content */\n header?: ReactNode\n /** Footer slot content */\n footer?: ReactNode\n /** Additional className */\n className?: string\n}\n\n/**\n * InsightsSidebar - Navigation sidebar for analytics dashboards\n *\n * A vertical navigation bar with collapsible sections,\n * branding, and navigation items. Designed for the insights template.\n *\n * @example\n * ```tsx\n * import { InsightsSidebar } from '@mdxui/tremor/insights'\n *\n * const navItems = [\n * { id: 'reports', label: 'Reports', href: '/reports', icon: <ChartIcon /> },\n * { id: 'transactions', label: 'Transactions', href: '/transactions', icon: <TableIcon /> },\n * ]\n *\n * <InsightsSidebar\n * items={navItems}\n * logo={{ src: '/logo.png', alt: 'Company' }}\n * />\n * ```\n */\nexport function InsightsSidebar({\n items,\n footerItems,\n logo,\n collapsed = false,\n onCollapse,\n header,\n footer,\n className,\n}: InsightsSidebarProps) {\n return (\n <nav\n data-collapsed={collapsed ? 'true' : 'false'}\n className={twMerge(\n 'hidden overflow-x-hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col',\n 'ease transform-gpu transition-all duration-100 will-change-transform',\n collapsed ? 'lg:w-[60px]' : 'lg:w-64',\n className,\n )}>\n <aside className='flex grow flex-col gap-y-4 overflow-y-auto whitespace-nowrap px-3 py-4'>\n {/* Header / Logo area */}\n {header ?\n header\n : logo ?\n <div className='flex items-center gap-x-1.5'>\n {onCollapse && (\n <button\n type='button'\n className='group inline-flex rounded-md p-2 hover:bg-gray-200/50 hover:dark:bg-gray-900'\n onClick={onCollapse}\n aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}>\n <span className='size-5 shrink-0 text-gray-500 group-hover:text-gray-700 dark:text-gray-500 group-hover:dark:text-gray-300'>\n {collapsed ? '>' : '<'}\n </span>\n </button>\n )}\n <a\n href={logo.href ?? '/'}\n className={twMerge(\n 'text-sm font-semibold text-gray-900 transition-opacity dark:text-gray-50',\n collapsed ? 'opacity-0' : 'opacity-100',\n )}\n aria-label='Home'>\n <img src={collapsed && logo.collapsedSrc ? logo.collapsedSrc : logo.src} alt={logo.alt} className='h-8' />\n </a>\n </div>\n : null}\n\n {/* Navigation items */}\n <div className='flex flex-1 flex-col space-y-10'>\n <ul className='mt-1 space-y-2'>\n {items.map((item) => (\n <li key={item.id}>\n {item.href ?\n <a\n href={item.href}\n aria-current={item.active ? 'page' : undefined}\n aria-disabled={item.disabled}\n className={twMerge(\n 'flex items-center gap-x-2.5 rounded-md p-2 text-sm font-medium transition-opacity',\n 'hover:bg-gray-200/50 hover:dark:bg-gray-900',\n 'focus:outline-none focus:ring-2 focus:ring-blue-500',\n item.active ? 'text-blue-600 dark:text-blue-500' : 'text-gray-700 dark:text-gray-300',\n item.disabled && 'pointer-events-none opacity-50',\n )}\n onClick={item.disabled ? undefined : item.onClick}>\n {item.icon && (\n <span className='size-5 shrink-0' aria-hidden='true'>\n {item.icon}\n </span>\n )}\n {!collapsed && item.label}\n </a>\n : <button\n type='button'\n onClick={item.onClick}\n disabled={item.disabled}\n className={twMerge(\n 'flex w-full items-center gap-x-2.5 rounded-md p-2 text-sm font-medium transition-opacity',\n 'hover:bg-gray-200/50 hover:dark:bg-gray-900',\n 'focus:outline-none focus:ring-2 focus:ring-blue-500',\n item.active ? 'text-blue-600 dark:text-blue-500' : 'text-gray-700 dark:text-gray-300',\n item.disabled && 'pointer-events-none opacity-50',\n )}>\n {item.icon && (\n <span className='size-5 shrink-0' aria-hidden='true'>\n {item.icon}\n </span>\n )}\n {!collapsed && item.label}\n </button>\n }\n </li>\n ))}\n </ul>\n\n {/* Footer items */}\n {footerItems && footerItems.length > 0 && (\n <ul className='mt-auto space-y-2'>\n {footerItems.map((item) => (\n <li key={item.id}>\n {item.href ?\n <a\n href={item.href}\n aria-current={item.active ? 'page' : undefined}\n aria-disabled={item.disabled}\n className={twMerge(\n 'flex items-center gap-x-2.5 rounded-md p-2 text-sm font-medium transition-opacity',\n 'hover:bg-gray-200/50 hover:dark:bg-gray-900',\n 'focus:outline-none focus:ring-2 focus:ring-blue-500',\n item.active ? 'text-blue-600 dark:text-blue-500' : 'text-gray-700 dark:text-gray-300',\n item.disabled && 'pointer-events-none opacity-50',\n )}\n onClick={item.disabled ? undefined : item.onClick}>\n {item.icon && (\n <span className='size-5 shrink-0' aria-hidden='true'>\n {item.icon}\n </span>\n )}\n {!collapsed && item.label}\n </a>\n : <button\n type='button'\n onClick={item.onClick}\n disabled={item.disabled}\n className={twMerge(\n 'flex w-full items-center gap-x-2.5 rounded-md p-2 text-sm font-medium transition-opacity',\n 'hover:bg-gray-200/50 hover:dark:bg-gray-900',\n 'focus:outline-none focus:ring-2 focus:ring-blue-500',\n item.active ? 'text-blue-600 dark:text-blue-500' : 'text-gray-700 dark:text-gray-300',\n item.disabled && 'pointer-events-none opacity-50',\n )}>\n {item.icon && (\n <span className='size-5 shrink-0' aria-hidden='true'>\n {item.icon}\n </span>\n )}\n {!collapsed && item.label}\n </button>\n }\n </li>\n ))}\n </ul>\n )}\n </div>\n\n {/* Footer slot */}\n {footer && <div className='mt-auto border-t border-gray-200 pt-3 dark:border-gray-800'>{footer}</div>}\n </aside>\n </nav>\n )\n}\n","/**\n * Insights Template - Analytics Dashboard\n *\n * Implements Dashboard app components for analytics and reporting dashboards.\n *\n * @example\n * ```tsx\n * import { components, InsightsShell, InsightsSidebar } from '@mdxui/tremor/insights'\n *\n * const navItems = [\n * { id: 'reports', label: 'Reports', href: '/reports' },\n * { id: 'transactions', label: 'Transactions', href: '/transactions' },\n * ]\n *\n * <InsightsShell\n * sidebar={<InsightsSidebar items={navItems} />}\n * header={<Header />}\n * >\n * <Dashboard />\n * </InsightsShell>\n * ```\n */\n\n\n// Component exports\nexport * from \"./components\";\nexport * from \"./layouts\";\n\nimport { AreaChart } from \"./components/charts/area-chart\";\nimport { BarChart } from \"./components/charts/bar-chart\";\nimport { BarChartVariant } from \"./components/charts/bar-chart-variant\";\nimport { DonutChart } from \"./components/charts/donut-chart\";\nimport { TransactionChart } from \"./components/charts/transaction-chart\";\nimport { KPICard } from \"./components/kpi/kpi-card\";\nimport { TransactionsTable } from \"./components/tables/transactions-table\";\nimport { InsightsApp } from \"./layouts/insights-app\";\nimport { InsightsDashboard } from \"./layouts/insights-dashboard\";\nimport { InsightsHeader } from \"./layouts/insights-header\";\nimport { InsightsSettings } from \"./layouts/insights-settings\";\n// Import components for the interface\nimport { InsightsShell } from \"./layouts/insights-shell\";\nimport { InsightsSidebar } from \"./layouts/insights-sidebar\";\n\n/**\n * InsightsComponents - Type-safe component interface for Insights template\n *\n * This interface defines all the components available in the insights template\n * and can be used for MDX component mapping.\n */\nexport interface InsightsComponents {\n\t// Layout components\n\tShell: typeof InsightsShell;\n\tSidebar: typeof InsightsSidebar;\n\n\t// KPI/Metrics\n\tKPICard: typeof KPICard;\n\n\t// Charts\n\tAreaChart: typeof AreaChart;\n\tBarChart: typeof BarChart;\n\tDonutChart: typeof DonutChart;\n\tBarChartVariant: typeof BarChartVariant;\n\tTransactionChart: typeof TransactionChart;\n\n\t// Tables\n\tTransactionsTable: typeof TransactionsTable;\n}\n\n/**\n * components - Pre-built component mapping for MDX usage\n *\n * Use this object to provide components to MDX content or to\n * access all insights components as a single import.\n *\n * @example\n * ```tsx\n * import { components } from '@mdxui/tremor/insights'\n *\n * // Use in MDX provider\n * <MDXProvider components={components}>\n * <Content />\n * </MDXProvider>\n *\n * // Or destructure\n * const { Shell, Sidebar, KPICard } = components\n * ```\n */\nexport const components: InsightsComponents = {\n\t// Layout\n\tShell: InsightsShell,\n\tSidebar: InsightsSidebar,\n\n\t// KPI/Metrics\n\tKPICard,\n\n\t// Charts\n\tAreaChart,\n\tBarChart,\n\tDonutChart,\n\tBarChartVariant,\n\tTransactionChart,\n\n\t// Tables\n\tTransactionsTable,\n};\n\n// Named variant exports for convenience\nexport { InsightsShell as Shell, InsightsSidebar as Sidebar };\n\n/**\n * AppComponents implementation for the Insights template.\n *\n * This object provides all required components for the mdxui AppComponents interface.\n * Use this when you need a complete set of components for an Insights-style application.\n *\n * The Insights template provides:\n * - Analytics-focused shell layouts with sidebar navigation\n * - Navigation sidebar with clean, minimal design\n * - Header bar with breadcrumbs and user profile\n * - Dashboard page layout with metrics and content areas\n * - Settings page with section navigation\n * - Rich chart components (area, bar, donut, transaction charts)\n * - KPI cards and data tables\n *\n * @example\n * ```tsx\n * import { AppComponents } from '@mdxui/tremor/insights'\n *\n * // Use with mdxui\n * <MDXProvider components={AppComponents}>\n * <App>\n * <Shell>\n * <Dashboard title=\"Analytics\">\n * <KPICard />\n * <AreaChart />\n * </Dashboard>\n * </Shell>\n * </App>\n * </MDXProvider>\n * ```\n */\nexport const AppComponents = {\n\t/** Root application wrapper */\n\tApp: InsightsApp,\n\t/** Flexible shell layout for analytics */\n\tShell: InsightsShell,\n\t/** Navigation sidebar */\n\tSidebar: InsightsSidebar,\n\t/** Header bar component */\n\tHeader: InsightsHeader,\n\t/** Dashboard page layout */\n\tDashboard: InsightsDashboard,\n\t/** Settings page layout */\n\tSettings: InsightsSettings,\n} as const;\n"],"mappings":";AAEA,YAAY,WAAW;AACvB;AAAA,EACC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,eAAe;AA8GnB,SAKE,KALF;AAlEL,IAAM,cAAsC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACP;AAEA,SAAS,SAAS,OAAe,OAAuB;AACvD,MAAI,YAAY,KAAK,EAAG,QAAO,YAAY,KAAK;AAEhD,QAAM,gBAAgB,OAAO,OAAO,WAAW;AAC/C,SAAO,cAAc,QAAQ,cAAc,MAAM;AAClD;AAmBO,IAAM,YAAkB;AAAA,EA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ACnD,KAAK,YAAY;AAAA,cACnB;AAAA,cACA,SAAS,KAAK,WAAW,SAAY,KAAK;AAAA,cACzC;AAAA,qBAAK,QACJ,gBAAAC,MAAC,UAAK,WAAU,mBAAkB,eAAY,QAC3C,eAAK,MACR;AAAA,gBAED,CAAC,aAAa,KAAK;AAAA;AAAA;AAAA,UACtB,IACA,gBAAAC;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS,KAAK;AAAA,cACd,UAAU,KAAK;AAAA,cACf,WAAWF;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,KAAK,SAAS,qCAAqC;AAAA,gBACnD,KAAK,YAAY;AAAA,cACnB;AAAA,cACC;AAAA,qBAAK,QACJ,gBAAAC,MAAC,UAAK,WAAU,mBAAkB,eAAY,QAC3C,eAAK,MACR;AAAA,gBAED,CAAC,aAAa,KAAK;AAAA;AAAA;AAAA,UACtB,KAtCK,KAAK,EAwCd,CACD,GACH;AAAA,WAEJ;AAAA,QAGC,UAAU,gBAAAA,MAAC,SAAI,WAAU,8DAA8D,kBAAO;AAAA,SACjG;AAAA;AAAA,EACF;AAEJ;;;ACvIO,IAAM,aAAiC;AAAA;AAAA,EAE7C,OAAO;AAAA,EACP,SAAS;AAAA;AAAA,EAGT;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AACD;AAqCO,IAAM,gBAAgB;AAAA;AAAA,EAE5B,KAAK;AAAA;AAAA,EAEL,OAAO;AAAA;AAAA,EAEP,SAAS;AAAA;AAAA,EAET,QAAQ;AAAA;AAAA,EAER,WAAW;AAAA;AAAA,EAEX,UAAU;AACX;","names":["React","CartesianGrid","RechartsLegend","ResponsiveContainer","Tooltip","XAxis","YAxis","twMerge","jsx","jsxs","chartColors","getColor","React","Bar","CartesianGrid","RechartsBarChart","RechartsLegend","ResponsiveContainer","Tooltip","XAxis","YAxis","twMerge","jsx","jsxs","chartColors","getColor","React","RechartsLegend","ResponsiveContainer","Tooltip","twMerge","jsx","jsxs","chartColors","getColor","React","twMerge","jsx","jsxs","twMerge","twMerge","jsx","jsxs","React","twMerge","jsx","jsxs","formatCurrency","jsx","twMerge","jsx","jsxs","twMerge","jsx","jsxs","twMerge","jsx","jsxs","twMerge","jsx","jsxs","twMerge","jsx","jsxs"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { AgentsDashboardProps, RetentionDashboardProps, SupportDashboardProps, WorkflowDashboardProps } from 'mdxui';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Agent data type for the agents table
|
|
6
|
+
*/
|
|
7
|
+
interface Agent {
|
|
8
|
+
agent_id: string;
|
|
9
|
+
full_name: string;
|
|
10
|
+
account: string;
|
|
11
|
+
start_date: string;
|
|
12
|
+
end_date: string | null;
|
|
13
|
+
number: string;
|
|
14
|
+
email: string;
|
|
15
|
+
registered: boolean;
|
|
16
|
+
minutes_called: number;
|
|
17
|
+
minutes_booked: number;
|
|
18
|
+
ticket_generation: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Extended props for AgentsSection component (Tremor overview variant)
|
|
22
|
+
*/
|
|
23
|
+
interface AgentsSectionTremorProps {
|
|
24
|
+
/** Agent data array (Tremor variant) */
|
|
25
|
+
agents?: Agent[];
|
|
26
|
+
/** Section title */
|
|
27
|
+
title?: string;
|
|
28
|
+
/** Section description */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Custom class name */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Combined props type for AgentsSection supporting both interfaces
|
|
35
|
+
*/
|
|
36
|
+
type AgentsSectionProps = AgentsSectionTremorProps | Partial<AgentsDashboardProps>;
|
|
37
|
+
/**
|
|
38
|
+
* AgentsSection - Agents data table dashboard section
|
|
39
|
+
*
|
|
40
|
+
* Supports both mdxui AgentsDashboardProps interface and Tremor's data table variant.
|
|
41
|
+
*
|
|
42
|
+
* @example mdxui interface
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <AgentsSection
|
|
45
|
+
* totalAgents={10}
|
|
46
|
+
* activeAgents={5}
|
|
47
|
+
* runsToday={100}
|
|
48
|
+
* successRate={95}
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example Tremor data table variant
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <AgentsSection
|
|
55
|
+
* agents={agentData}
|
|
56
|
+
* title="Agents"
|
|
57
|
+
* />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
declare function AgentsSection(props: AgentsSectionProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* RetentionSection - User retention analytics section
|
|
64
|
+
*
|
|
65
|
+
* Displays cohort retention data with current retention rate and trend indicator.
|
|
66
|
+
* Shows a cohort table with retention percentages by period.
|
|
67
|
+
*/
|
|
68
|
+
declare function RetentionSection({ cohorts, periods, currentRetention, trend, loading, className, }: RetentionDashboardProps): react_jsx_runtime.JSX.Element;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* SupportSection - Support metrics overview section
|
|
72
|
+
*
|
|
73
|
+
* Displays support metrics including open tickets, response time,
|
|
74
|
+
* resolution rate, and CSAT score. Optionally shows ticket breakdowns.
|
|
75
|
+
*/
|
|
76
|
+
declare function SupportSection({ openTickets, avgResponseTime, resolutionRate, csat, ticketsByStatus, ticketsByPriority, volumeTrend: _volumeTrend, loading, className, }: SupportDashboardProps): react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* WorkflowSection - Workflow automation metrics section
|
|
80
|
+
*
|
|
81
|
+
* Displays workflow metrics including total/active workflows, runs today,
|
|
82
|
+
* success rate, and time saved. Optionally shows workflow breakdowns.
|
|
83
|
+
*/
|
|
84
|
+
declare function WorkflowSection({ totalWorkflows, activeWorkflows, runsToday, successRate, timeSaved, runsByWorkflow, runHistory: _runHistory, loading, className, }: WorkflowDashboardProps): react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
export { AgentsSection, RetentionSection, SupportSection, WorkflowSection };
|