@misael703/ui 1.58.0 → 1.59.1

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.
@@ -39,7 +39,8 @@ interface BaseChartProps<D = any> {
39
39
  className?: string;
40
40
  ariaLabel?: string;
41
41
  }
42
- interface LineChartProps<D = any> extends BaseChartProps<D> {
42
+ type AxisInterval = number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart' | 'equidistantPreserveEnd';
43
+ interface CartesianChartProps<D = any> extends BaseChartProps<D> {
43
44
  categoryKey: keyof D & string;
44
45
  series: Array<{
45
46
  key: keyof D & string;
@@ -48,26 +49,31 @@ interface LineChartProps<D = any> extends BaseChartProps<D> {
48
49
  }>;
49
50
  showGrid?: boolean;
50
51
  showLegend?: boolean;
52
+ /** Format each category-axis tick label, e.g. shorten `2026-05-23`. → XAxis.tickFormatter */
53
+ xTickFormatter?: (value: string) => string;
54
+ /** Thin out category ticks on collision. → XAxis.interval. Default `preserveStartEnd`. */
55
+ xTickInterval?: AxisInterval;
56
+ /** Rotate category-axis labels N degrees (anchors end + reserves height so they don't clip). */
57
+ xTickAngle?: number;
58
+ /** Format numeric values (value-axis ticks + tooltip). */
59
+ valueFormatter?: (value: number) => string;
60
+ }
61
+ interface LineChartProps<D = any> extends CartesianChartProps<D> {
51
62
  smooth?: boolean;
63
+ /** Interpolation. `monotone` smooths (default, back-compat); `linear` draws honest
64
+ * straight segments — recommended for counts/stepped series (no phantom humps over zeros). */
65
+ curve?: 'linear' | 'monotone';
52
66
  }
53
- declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
67
+ declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
54
68
  interface AreaChartProps<D = any> extends LineChartProps<D> {
55
69
  stacked?: boolean;
56
70
  }
57
- declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, stacked, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
58
- interface BarChartProps<D = any> extends BaseChartProps<D> {
59
- categoryKey: keyof D & string;
60
- series: Array<{
61
- key: keyof D & string;
62
- label?: string;
63
- color?: string;
64
- }>;
71
+ declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, stacked, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
72
+ interface BarChartProps<D = any> extends CartesianChartProps<D> {
65
73
  layout?: 'vertical' | 'horizontal';
66
74
  stacked?: boolean;
67
- showGrid?: boolean;
68
- showLegend?: boolean;
69
75
  }
70
- declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
76
+ declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
71
77
  interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
72
78
  data: Array<{
73
79
  name: string;
@@ -78,8 +84,12 @@ interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
78
84
  showLegend?: boolean;
79
85
  innerRadius?: number;
80
86
  outerRadius?: number;
87
+ /** Format slice names in tooltip + legend, e.g. `V_REGION` → `V Región` (no need to pre-map the data). */
88
+ nameFormatter?: (name: string) => string;
89
+ /** Format slice values in the tooltip. */
90
+ valueFormatter?: (value: number) => string;
81
91
  }
82
- declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, }: DonutChartProps): react_jsx_runtime.JSX.Element;
92
+ declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, nameFormatter, valueFormatter, }: DonutChartProps): react_jsx_runtime.JSX.Element;
83
93
  interface SparklineProps<D = any> {
84
94
  recharts: RechartsLike;
85
95
  data: D[];
@@ -93,4 +103,4 @@ interface SparklineProps<D = any> {
93
103
  }
94
104
  declare function Sparkline<D = any>({ recharts: R, data, dataKey, width, height, color, fill, className, ariaLabel, }: SparklineProps<D>): react_jsx_runtime.JSX.Element;
95
105
 
96
- export { AreaChart, type AreaChartProps, BarChart, type BarChartProps, type BaseChartProps, DonutChart, type DonutChartProps, LineChart, type LineChartProps, type RechartsLike, Sparkline, type SparklineProps };
106
+ export { AreaChart, type AreaChartProps, type AxisInterval, BarChart, type BarChartProps, type BaseChartProps, type CartesianChartProps, DonutChart, type DonutChartProps, LineChart, type LineChartProps, type RechartsLike, Sparkline, type SparklineProps };
@@ -1,30 +1,30 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunkCPMQ2DFS_js = require('../chunk-CPMQ2DFS.js');
4
+ var chunk2ET7IM4U_js = require('../chunk-2ET7IM4U.js');
5
5
  require('../chunk-PASF6T4H.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "AreaChart", {
10
10
  enumerable: true,
11
- get: function () { return chunkCPMQ2DFS_js.AreaChart; }
11
+ get: function () { return chunk2ET7IM4U_js.AreaChart; }
12
12
  });
13
13
  Object.defineProperty(exports, "BarChart", {
14
14
  enumerable: true,
15
- get: function () { return chunkCPMQ2DFS_js.BarChart; }
15
+ get: function () { return chunk2ET7IM4U_js.BarChart; }
16
16
  });
17
17
  Object.defineProperty(exports, "DonutChart", {
18
18
  enumerable: true,
19
- get: function () { return chunkCPMQ2DFS_js.DonutChart; }
19
+ get: function () { return chunk2ET7IM4U_js.DonutChart; }
20
20
  });
21
21
  Object.defineProperty(exports, "LineChart", {
22
22
  enumerable: true,
23
- get: function () { return chunkCPMQ2DFS_js.LineChart; }
23
+ get: function () { return chunk2ET7IM4U_js.LineChart; }
24
24
  });
25
25
  Object.defineProperty(exports, "Sparkline", {
26
26
  enumerable: true,
27
- get: function () { return chunkCPMQ2DFS_js.Sparkline; }
27
+ get: function () { return chunk2ET7IM4U_js.Sparkline; }
28
28
  });
29
29
  //# sourceMappingURL=Charts.js.map
30
30
  //# sourceMappingURL=Charts.js.map
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from '../chunk-O6FCBNWN.mjs';
2
+ export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from '../chunk-EJY4QWHT.mjs';
3
3
  import '../chunk-IEPCH3JB.mjs';
4
4
  //# sourceMappingURL=Charts.mjs.map
5
5
  //# sourceMappingURL=Charts.mjs.map
package/dist/index.d.mts CHANGED
@@ -17,7 +17,7 @@ export { CheckboxGroup, CheckboxGroupProps, MoneyInput, MoneyInputProps, OptionI
17
17
  export { Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, Menu, MenuItemProps, MenuProps, Stat, StatProps } from './components/Display2.mjs';
18
18
  export { CommandItem, CommandPalette, CommandPaletteProps, DateRange, DateRangePicker, DateRangePickerProps, MultiCombobox, MultiComboboxOption, MultiComboboxProps, UseCommandPaletteOptions, useCommandPalette } from './components/AdvancedPickers.mjs';
19
19
  export { AppShell, AppShellHeader, AppShellHeaderApi, AppShellHeaderSlot, AppShellProps, AppShellTheme, NavItem, NavSection, PageHeader, PageHeaderProps } from './components/AppShell.mjs';
20
- export { AreaChart, AreaChartProps, BarChart, BarChartProps, BaseChartProps, DonutChart, DonutChartProps, LineChart, LineChartProps, RechartsLike, Sparkline, SparklineProps } from './components/Charts.mjs';
20
+ export { AreaChart, AreaChartProps, AxisInterval, BarChart, BarChartProps, BaseChartProps, CartesianChartProps, DonutChart, DonutChartProps, LineChart, LineChartProps, RechartsLike, Sparkline, SparklineProps } from './components/Charts.mjs';
21
21
  export { BulletChart, BulletChartProps, BulletTone, CalendarHeatmap, CalendarHeatmapProps, DeltaBadge, DeltaBadgeProps, DeltaTone, HeatmapCell, Meter, MeterOptimum, MeterProps, ProportionBar, ProportionBarProps, ProportionSegment, Sparkbar, SparkbarProps, StatCard, StatCardProps } from './components/Metrics.mjs';
22
22
  export { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Bell, Bold, Building, CalendarDays, CalendarIcon, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Columns3, Copy, CreditCard, Download, Edit, ExternalLink, Eye, EyeOff, FileText, Filter, Folder, Globe, Heart, History, Home, IconProps, Info, Italic, LayoutGrid, Link, List, Loader, Lock, LogOut, Mail, Map, MapPin, MenuIcon, Minus, Moon, MoreHorizontal, MoreVertical, Package, Phone, Plus, RefreshCw, Rows3, Search, Settings, ShoppingCart, Star, Sun, Tag, Tool, Trash, Truck, Underline, Unlock, Upload, User, Users, Wallet, Wrench, X } from './components/Icons.mjs';
23
23
  export { Logo, LogoBg, LogoFormat, LogoProps, LogoVariant } from './components/Logo.mjs';
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { CheckboxGroup, CheckboxGroupProps, MoneyInput, MoneyInputProps, OptionI
17
17
  export { Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, Menu, MenuItemProps, MenuProps, Stat, StatProps } from './components/Display2.js';
18
18
  export { CommandItem, CommandPalette, CommandPaletteProps, DateRange, DateRangePicker, DateRangePickerProps, MultiCombobox, MultiComboboxOption, MultiComboboxProps, UseCommandPaletteOptions, useCommandPalette } from './components/AdvancedPickers.js';
19
19
  export { AppShell, AppShellHeader, AppShellHeaderApi, AppShellHeaderSlot, AppShellProps, AppShellTheme, NavItem, NavSection, PageHeader, PageHeaderProps } from './components/AppShell.js';
20
- export { AreaChart, AreaChartProps, BarChart, BarChartProps, BaseChartProps, DonutChart, DonutChartProps, LineChart, LineChartProps, RechartsLike, Sparkline, SparklineProps } from './components/Charts.js';
20
+ export { AreaChart, AreaChartProps, AxisInterval, BarChart, BarChartProps, BaseChartProps, CartesianChartProps, DonutChart, DonutChartProps, LineChart, LineChartProps, RechartsLike, Sparkline, SparklineProps } from './components/Charts.js';
21
21
  export { BulletChart, BulletChartProps, BulletTone, CalendarHeatmap, CalendarHeatmapProps, DeltaBadge, DeltaBadgeProps, DeltaTone, HeatmapCell, Meter, MeterOptimum, MeterProps, ProportionBar, ProportionBarProps, ProportionSegment, Sparkbar, SparkbarProps, StatCard, StatCardProps } from './components/Metrics.js';
22
22
  export { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Bell, Bold, Building, CalendarDays, CalendarIcon, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Columns3, Copy, CreditCard, Download, Edit, ExternalLink, Eye, EyeOff, FileText, Filter, Folder, Globe, Heart, History, Home, IconProps, Info, Italic, LayoutGrid, Link, List, Loader, Lock, LogOut, Mail, Map, MapPin, MenuIcon, Minus, Moon, MoreHorizontal, MoreVertical, Package, Phone, Plus, RefreshCw, Rows3, Search, Settings, ShoppingCart, Star, Sun, Tag, Tool, Trash, Truck, Underline, Unlock, Upload, User, Users, Wallet, Wrench, X } from './components/Icons.js';
23
23
  export { Logo, LogoBg, LogoFormat, LogoProps, LogoVariant } from './components/Logo.js';
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ var chunkAJ22SXI2_js = require('./chunk-AJ22SXI2.js');
56
56
  var chunkEUB4PHPI_js = require('./chunk-EUB4PHPI.js');
57
57
  var chunkGGILBESE_js = require('./chunk-GGILBESE.js');
58
58
  var chunkC4AKMVDZ_js = require('./chunk-C4AKMVDZ.js');
59
- var chunkCPMQ2DFS_js = require('./chunk-CPMQ2DFS.js');
59
+ var chunk2ET7IM4U_js = require('./chunk-2ET7IM4U.js');
60
60
  var chunkPASF6T4H_js = require('./chunk-PASF6T4H.js');
61
61
 
62
62
 
@@ -1103,23 +1103,23 @@ Object.defineProperty(exports, "X", {
1103
1103
  });
1104
1104
  Object.defineProperty(exports, "AreaChart", {
1105
1105
  enumerable: true,
1106
- get: function () { return chunkCPMQ2DFS_js.AreaChart; }
1106
+ get: function () { return chunk2ET7IM4U_js.AreaChart; }
1107
1107
  });
1108
1108
  Object.defineProperty(exports, "BarChart", {
1109
1109
  enumerable: true,
1110
- get: function () { return chunkCPMQ2DFS_js.BarChart; }
1110
+ get: function () { return chunk2ET7IM4U_js.BarChart; }
1111
1111
  });
1112
1112
  Object.defineProperty(exports, "DonutChart", {
1113
1113
  enumerable: true,
1114
- get: function () { return chunkCPMQ2DFS_js.DonutChart; }
1114
+ get: function () { return chunk2ET7IM4U_js.DonutChart; }
1115
1115
  });
1116
1116
  Object.defineProperty(exports, "LineChart", {
1117
1117
  enumerable: true,
1118
- get: function () { return chunkCPMQ2DFS_js.LineChart; }
1118
+ get: function () { return chunk2ET7IM4U_js.LineChart; }
1119
1119
  });
1120
1120
  Object.defineProperty(exports, "Sparkline", {
1121
1121
  enumerable: true,
1122
- get: function () { return chunkCPMQ2DFS_js.Sparkline; }
1122
+ get: function () { return chunk2ET7IM4U_js.Sparkline; }
1123
1123
  });
1124
1124
  Object.defineProperty(exports, "cx", {
1125
1125
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ export { Button, ButtonGroup } from './chunk-NAL457NQ.mjs';
54
54
  export { AspectRatio, ScrollArea, Separator, Slot, Slottable } from './chunk-IEPKSPBX.mjs';
55
55
  export { Carousel } from './chunk-VXJTDBSM.mjs';
56
56
  export { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Bell, Bold, Building, CalendarDays, CalendarIcon, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Columns3, Copy, CreditCard, Download, Edit, ExternalLink, Eye, EyeOff, FileText, Filter, Folder, Globe, Heart, History, Home, Info, Italic, LayoutGrid, Link, List, Loader, Lock, LogOut, Mail, Map, MapPin, MenuIcon, Minus, Moon, MoreHorizontal, MoreVertical, Package, Phone, Plus, RefreshCw, Rows3, Search, Settings, ShoppingCart, Star, Sun, Tag, Tool, Trash, Truck, Underline, Unlock, Upload, User, Users, Wallet, Wrench, X } from './chunk-BJGMROKL.mjs';
57
- export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from './chunk-O6FCBNWN.mjs';
57
+ export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from './chunk-EJY4QWHT.mjs';
58
58
  export { cx } from './chunk-IEPCH3JB.mjs';
59
59
  //# sourceMappingURL=index.mjs.map
60
60
  //# sourceMappingURL=index.mjs.map