@sfperusacdev/sf-ui 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sf-ui.css +1 -1
- package/dist/sf-ui.js +627 -507
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/cards/Badge.d.ts +6 -3
- package/dist/types/src/components/cards/Badge.test.d.ts +1 -0
- package/dist/types/src/components/cards/KPICard.d.ts +8 -2
- package/dist/types/src/components/cards/index.d.ts +2 -1
- package/dist/types/src/components/dashboard/AlertRowList.test.d.ts +1 -0
- package/dist/types/src/components/dashboard/EventLog.d.ts +7 -2
- package/dist/types/src/components/dashboard/index.d.ts +1 -1
- package/dist/types/src/components/dashboard/types.d.ts +13 -0
- package/dist/types/src/components/layout/FilterBar.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { BadgeShape, BadgeSize, BadgeVariant } from './types';
|
|
2
|
-
type BadgeProps = {
|
|
3
|
+
export type BadgeProps = {
|
|
3
4
|
label: string;
|
|
4
5
|
variant?: BadgeVariant;
|
|
5
6
|
dot?: boolean;
|
|
6
7
|
size?: BadgeSize;
|
|
7
8
|
shape?: BadgeShape;
|
|
8
9
|
className?: string;
|
|
10
|
+
/** Icono antes del label (`.sf-badge__icon`). Compatible con `dot`: si vienen ambos, primero el punto y
|
|
11
|
+
* luego el icono. Solo aplica a `shape="pill"` (el círculo es de un solo carácter). */
|
|
12
|
+
icon?: ReactNode;
|
|
9
13
|
};
|
|
10
|
-
export declare const Badge: ({ label, variant, dot, size, shape, className, }: BadgeProps) => import("react").JSX.Element;
|
|
11
|
-
export {};
|
|
14
|
+
export declare const Badge: ({ label, variant, dot, size, shape, className, icon, }: BadgeProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type KPICardAccentTone = "emerald" | "blue" | "amber" | "red" | "teal" | "slate";
|
|
3
3
|
export type KPICardLayout = "stacked" | "leading-icon";
|
|
4
|
+
/** Acabado del tile de icono en `layout="leading-icon"`: "solid" (por defecto) = fondo sólido del tono con
|
|
5
|
+
* glifo blanco; "soft" = fondo tenue del tono (color-mix 14 % sobre --sf-surface) y glifo del color del tono. */
|
|
6
|
+
export type KPICardIconStyle = "solid" | "soft";
|
|
4
7
|
export type KPICardProgress = {
|
|
5
8
|
value: number;
|
|
6
9
|
max: number;
|
|
7
10
|
label?: string;
|
|
8
11
|
};
|
|
9
|
-
type KPICardProps = {
|
|
12
|
+
export type KPICardProps = {
|
|
10
13
|
label: string;
|
|
11
14
|
value: string | number;
|
|
12
15
|
sublabel?: string;
|
|
@@ -22,10 +25,13 @@ type KPICardProps = {
|
|
|
22
25
|
/** Controla el borde superior de 3px (.sf-kpi-card). Por defecto true en "stacked" (como hoy) y false en
|
|
23
26
|
* "leading-icon" (el mockup no lo tiene). */
|
|
24
27
|
accentBar?: boolean;
|
|
28
|
+
/** Solo aplica a `layout="leading-icon"` (el tile `.sf-kpi-tile`). En "stacked" el icono va en
|
|
29
|
+
* `.sf-card-icon`, que no depende del tono, y esta prop se ignora. Por defecto "solid" = aspecto actual. */
|
|
30
|
+
iconStyle?: KPICardIconStyle;
|
|
25
31
|
className?: string;
|
|
26
32
|
onClick?: () => void;
|
|
27
33
|
};
|
|
28
|
-
export declare const KPICard: ({ label, value, sublabel, icon, iconClassName, trend, trendLabel, accentTone, progress, layout, accentBar, className, onClick, }: KPICardProps) => import("react").JSX.Element;
|
|
34
|
+
export declare const KPICard: ({ label, value, sublabel, icon, iconClassName, trend, trendLabel, accentTone, progress, layout, accentBar, iconStyle, className, onClick, }: KPICardProps) => import("react").JSX.Element;
|
|
29
35
|
type KPIGridProps = {
|
|
30
36
|
children: ReactNode;
|
|
31
37
|
cols?: 2 | 3 | 4 | 5;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { Badge } from './Badge';
|
|
2
|
+
export type { BadgeProps } from './Badge';
|
|
2
3
|
export { badgeClassName, badgeDotClassName } from './badgeClassName';
|
|
3
4
|
export { KPICard, KPIGrid } from './KPICard';
|
|
4
|
-
export type { KPICardAccentTone, KPICardProgress, KPICardLayout } from './KPICard';
|
|
5
|
+
export type { KPICardAccentTone, KPICardProgress, KPICardLayout, KPICardIconStyle, KPICardProps } from './KPICard';
|
|
5
6
|
export { QuickActionTile, QuickActionGrid } from './QuickActionTile';
|
|
6
7
|
export type { QuickActionTileProps, QuickActionGridProps } from './QuickActionTile';
|
|
7
8
|
export { MetricBarRow, MetricBarList } from './MetricBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AlertRowItem, EventItem, EventStatus } from './types';
|
|
2
|
+
import { AlertRowItem, AlertRowListHeaderLabels, EventItem, EventStatus } from './types';
|
|
3
3
|
type EventLogProps = {
|
|
4
4
|
events: EventItem[];
|
|
5
5
|
title?: string;
|
|
@@ -15,8 +15,13 @@ type AlertRowListProps = {
|
|
|
15
15
|
items: AlertRowItem[];
|
|
16
16
|
maxHeight?: number;
|
|
17
17
|
className?: string;
|
|
18
|
+
/** Modo columnas (Torre de control): cabecera "Hora · Vehículo · Descripción" y cada fila en grid
|
|
19
|
+
* `punto | hora | vehículo | descripción`. Por defecto `false` = render actual sin cambios. */
|
|
20
|
+
columns?: boolean;
|
|
21
|
+
/** Textos de la cabecera en modo `columns`. Por defecto en español. */
|
|
22
|
+
headerLabels?: AlertRowListHeaderLabels;
|
|
18
23
|
};
|
|
19
|
-
export declare const AlertRowList: ({ items, maxHeight, className }: AlertRowListProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const AlertRowList: ({ items, maxHeight, className, columns, headerLabels }: AlertRowListProps) => import("react").JSX.Element;
|
|
20
25
|
export type AlertLaneItem = {
|
|
21
26
|
id?: string;
|
|
22
27
|
title: ReactNode;
|
|
@@ -13,4 +13,4 @@ export { DashboardCard, DashboardGrid, DashboardSection, DashboardStatBar, Dashb
|
|
|
13
13
|
export type { DashboardCardProps } from './DashboardCard';
|
|
14
14
|
export { DetailSidePanel } from './DetailSidePanel';
|
|
15
15
|
export type { DetailSidePanelProps, DetailSidePanelRow, DetailSidePanelSecondaryItem } from './DetailSidePanel';
|
|
16
|
-
export type { StepStatus, StepItem, CalendarBadgeVariant, CalendarDayBadge, DonutGaugeSize, DashboardCardVariant, EventStatus, EventItem, AlertRowItem, StatBarItem, } from './types';
|
|
16
|
+
export type { StepStatus, StepItem, CalendarBadgeVariant, CalendarDayBadge, DonutGaugeSize, DashboardCardVariant, EventStatus, EventItem, AlertRowItem, AlertRowSeverity, AlertRowListHeaderLabels, StatBarItem, } from './types';
|
|
@@ -24,14 +24,27 @@ export type EventItem = {
|
|
|
24
24
|
actionLabel?: string;
|
|
25
25
|
onAction?: () => void;
|
|
26
26
|
};
|
|
27
|
+
/** Severidad de una alerta (solo se pinta con `AlertRowList columns`): crítico = círculo rojo con "×",
|
|
28
|
+
* warning = círculo ámbar con "!", info = sin icono. */
|
|
29
|
+
export type AlertRowSeverity = "critical" | "warning" | "info";
|
|
27
30
|
export type AlertRowItem = {
|
|
28
31
|
label: string;
|
|
29
32
|
status?: EventStatus;
|
|
30
33
|
meta?: string;
|
|
31
34
|
time?: string;
|
|
32
35
|
icon?: string;
|
|
36
|
+
/** Placa/unidad. Solo se muestra como columna propia con `AlertRowList columns`. */
|
|
37
|
+
vehicle?: string;
|
|
38
|
+
/** Icono de severidad antes de la placa. Solo se muestra con `AlertRowList columns`. */
|
|
39
|
+
severity?: AlertRowSeverity;
|
|
33
40
|
onClick?: () => void;
|
|
34
41
|
};
|
|
42
|
+
/** Textos de la cabecera de `AlertRowList columns` (por defecto "Hora", "Vehículo", "Descripción"). */
|
|
43
|
+
export type AlertRowListHeaderLabels = {
|
|
44
|
+
time?: string;
|
|
45
|
+
vehicle?: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
};
|
|
35
48
|
export type StatBarItem = {
|
|
36
49
|
label: string;
|
|
37
50
|
value: string | number;
|
|
@@ -50,5 +50,8 @@ export type FilterBarTextProps = {
|
|
|
50
50
|
className?: string;
|
|
51
51
|
id?: string;
|
|
52
52
|
"aria-label"?: string;
|
|
53
|
+
/** Icono a la izquierda del texto (p.ej. lupa). Sin esta prop el DOM sigue siendo el `<input>` pelado;
|
|
54
|
+
* con ella el input se envuelve en `.sf-filter-bar__text--with-icon` y recibe padding-left. */
|
|
55
|
+
leadingIcon?: ReactNode;
|
|
53
56
|
};
|
|
54
|
-
export declare const FilterBarText: ({ value, defaultValue, onChange, placeholder, disabled, className, id, "aria-label": ariaLabel, }: FilterBarTextProps) => import("react").JSX.Element;
|
|
57
|
+
export declare const FilterBarText: ({ value, defaultValue, onChange, placeholder, disabled, className, id, "aria-label": ariaLabel, leadingIcon, }: FilterBarTextProps) => import("react").JSX.Element;
|
package/package.json
CHANGED