@fluityy/designsystem 0.2.11 → 0.2.12

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.
@@ -0,0 +1,26 @@
1
+ export type SparklineVariant = "area" | "line" | "bar";
2
+ export interface SparklineProps {
3
+ /** Pontos do sparkline. Aceita array de numeros ou objetos `{value}`. */
4
+ data: ReadonlyArray<number> | ReadonlyArray<{
5
+ value: number;
6
+ }>;
7
+ variant?: SparklineVariant;
8
+ /** Cor base — aceita CSS var ou cor literal. Default: chart-1. */
9
+ color?: string;
10
+ /** Altura em pixels. Default: 40. */
11
+ height?: number;
12
+ /** Suaviza a curva (monotone). Default: true. */
13
+ smooth?: boolean;
14
+ /** Espessura do traço. Default: 1.75. */
15
+ strokeWidth?: number;
16
+ /** Preenche a area sob a curva. Default: true. So aplica em `area`. */
17
+ filled?: boolean;
18
+ /** Habilita tooltip em hover. Default: true. */
19
+ interactive?: boolean;
20
+ /** Formata o valor exibido no tooltip. */
21
+ formatValue?: (value: number) => string;
22
+ /** Rotulo exibido antes do valor no tooltip. */
23
+ tooltipLabel?: string;
24
+ className?: string;
25
+ }
26
+ export declare function Sparkline({ data, variant, color, height, smooth, strokeWidth, filled, interactive, formatValue, tooltipLabel, className, }: SparklineProps): import("react").JSX.Element;
@@ -2,6 +2,7 @@ export { LineChart, type LineChartProps } from './LineChart';
2
2
  export { AreaChart, type AreaChartProps } from './AreaChart';
3
3
  export { BarChart, type BarChartProps } from './BarChart';
4
4
  export { DonutChart, type DonutChartProps, type DonutDatum } from './DonutChart';
5
+ export { Sparkline, type SparklineProps, type SparklineVariant } from './Sparkline';
5
6
  export { ChartTooltip, type ChartTooltipProps } from './ChartTooltip';
6
7
  export { ChartLegend, type ChartLegendProps, type ChartLegendItem } from './ChartLegend';
7
8
  export { CHART_PALETTE, CHART_GRID, CHART_AXIS, paletteColor, type ChartSeries, } from './chartTheme';
@@ -0,0 +1,30 @@
1
+ import { SparklineVariant } from '../Chart/Sparkline';
2
+ export type MetricTone = "primary" | "accent" | "success" | "warning" | "danger" | "neutral";
3
+ export type MetricCardSize = "sm" | "md" | "lg";
4
+ export interface MetricCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
5
+ /** Rotulo da metrica (ex: "CPU Time"). */
6
+ label: React.ReactNode;
7
+ /** Valor principal exibido em destaque. */
8
+ value: React.ReactNode;
9
+ /** Unidade opcional ao lado do valor (ex: "ms", "%"). */
10
+ unit?: React.ReactNode;
11
+ /** Variacao % vs periodo anterior. */
12
+ delta?: number;
13
+ /** Formata o numero do delta. Default: `↗ N.NN%`. */
14
+ formatDelta?: (n: number) => string;
15
+ /** Forca o tom do delta. `"auto"` usa sinal (+ primary / − neutral). */
16
+ deltaTone?: "auto" | MetricTone;
17
+ /** Pontos do sparkline. Se vazio/ausente, sparkline e omitido. */
18
+ data?: ReadonlyArray<number> | ReadonlyArray<{
19
+ value: number;
20
+ }>;
21
+ /** Tipo do sparkline. Default: "area". */
22
+ sparklineVariant?: SparklineVariant;
23
+ /** Tom geral (sparkline e indicador). Default: "primary". */
24
+ tone?: MetricTone;
25
+ /** Barra inferior colorida. Aceita boolean (usa `tone`) ou um tom especifico. */
26
+ indicator?: boolean | MetricTone;
27
+ /** Tamanho do card. Default: "md". */
28
+ size?: MetricCardSize;
29
+ }
30
+ export declare const MetricCard: import('react').ForwardRefExoticComponent<MetricCardProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
2
+ value?: string;
3
+ defaultValue?: string;
4
+ onValueChange?: (value: string) => void;
5
+ size?: "sm" | "md";
6
+ /** Distribui os segmentos com largura igual. */
7
+ fullWidth?: boolean;
8
+ }
9
+ export declare function SegmentedControl({ value, defaultValue, onValueChange, size, fullWidth, className, children, ...props }: SegmentedControlProps): import("react").JSX.Element;
10
+ export interface SegmentedControlItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
11
+ value: string;
12
+ }
13
+ export declare function SegmentedControlItem({ value, className, children, disabled, ...props }: SegmentedControlItemProps): import("react").JSX.Element;
@@ -13,8 +13,10 @@ export * from './Progress/Progress';
13
13
  export * from './Divider/Divider';
14
14
  export * from './Breadcrumb/Breadcrumb';
15
15
  export * from './StatCard/StatCard';
16
+ export * from './MetricCard/MetricCard';
16
17
  export * from './Alert/Alert';
17
18
  export * from './Tabs/Tabs';
19
+ export * from './SegmentedControl/SegmentedControl';
18
20
  export * from './Accordion/Accordion';
19
21
  export * from './Tooltip/Tooltip';
20
22
  export * from './Popover/Popover';