orbital-ds 0.41.0 → 0.44.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.
- package/AGENTS.md +28 -9
- package/components.manifest.json +6469 -3569
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +7 -0
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/format.js +177 -0
- package/dist/lib/i18n.d.ts +14 -2
- package/dist/lib/i18n.js +32 -2
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +535 -0
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +535 -0
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +535 -0
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +535 -0
- package/dist/styles.css +39 -1
- package/dist/ui/a2ui-renderer.d.ts +11 -0
- package/dist/ui/agent-events.d.ts +17 -0
- package/dist/ui/ai-tag.d.ts +16 -0
- package/dist/ui/alert-dialog.d.ts +37 -0
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/animated-number.d.ts +11 -0
- package/dist/ui/app-bar.d.ts +22 -0
- package/dist/ui/attachment.d.ts +3 -3
- package/dist/ui/auth-backdrop.d.ts +17 -0
- package/dist/ui/auth-form.d.ts +3 -112
- package/dist/ui/auth-form.js +13 -6
- package/dist/ui/auth-layout.d.ts +38 -0
- package/dist/ui/avatar.d.ts +27 -0
- package/dist/ui/ayuda.d.ts +1 -1
- package/dist/ui/ayuda.js +4 -1
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/bottom-nav.d.ts +22 -0
- package/dist/ui/breadcrumb.d.ts +22 -0
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/button-group.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +3 -0
- package/dist/ui/card-stack.d.ts +27 -0
- package/dist/ui/card.d.ts +33 -0
- package/dist/ui/carousel.d.ts +35 -0
- package/dist/ui/carousel.js +10 -5
- package/dist/ui/chain-of-thought.d.ts +15 -0
- package/dist/ui/chart-card.d.ts +19 -0
- package/dist/ui/chart.d.ts +19 -0
- package/dist/ui/chat-composer.d.ts +19 -0
- package/dist/ui/choice-card.d.ts +33 -0
- package/dist/ui/code-block.d.ts +15 -0
- package/dist/ui/combobox.d.ts +48 -0
- package/dist/ui/command-palette.d.ts +18 -0
- package/dist/ui/command.d.ts +34 -0
- package/dist/ui/confirm-action.d.ts +30 -0
- package/dist/ui/confirm-dialog.d.ts +23 -0
- package/dist/ui/content-card.d.ts +14 -0
- package/dist/ui/context-menu.d.ts +35 -0
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/conversation-list.d.ts +20 -0
- package/dist/ui/copy-button.d.ts +11 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/date-time.js +55 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/description-list.js +86 -0
- package/dist/ui/detail-panel.d.ts +22 -0
- package/dist/ui/dialog.d.ts +35 -0
- package/dist/ui/dock.d.ts +17 -0
- package/dist/ui/drawer.d.ts +41 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/echart.d.ts +15 -0
- package/dist/ui/entity-list.d.ts +32 -0
- package/dist/ui/field.d.ts +1 -1
- package/dist/ui/form-layout.d.ts +24 -0
- package/dist/ui/gauge.d.ts +26 -0
- package/dist/ui/generated-image.d.ts +19 -0
- package/dist/ui/generated-table.d.ts +18 -0
- package/dist/ui/heatmap-grid.d.ts +20 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hero.js +145 -0
- package/dist/ui/i18n-provider.d.ts +16 -0
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-otp.d.ts +23 -0
- package/dist/ui/input.d.ts +16 -0
- package/dist/ui/instruction-editor.d.ts +17 -0
- package/dist/ui/item.d.ts +3 -3
- package/dist/ui/label.d.ts +17 -0
- package/dist/ui/legend.d.ts +25 -0
- package/dist/ui/level-meter.d.ts +12 -0
- package/dist/ui/load-more.d.ts +17 -0
- package/dist/ui/loading-state.d.ts +12 -0
- package/dist/ui/markdown.d.ts +15 -0
- package/dist/ui/marker.d.ts +1 -1
- package/dist/ui/media-card.d.ts +16 -0
- package/dist/ui/menubar.d.ts +39 -0
- package/dist/ui/message-actions.d.ts +9 -0
- package/dist/ui/message-scroller.d.ts +30 -0
- package/dist/ui/message.d.ts +33 -0
- package/dist/ui/mfa-challenge.d.ts +3 -32
- package/dist/ui/mfa-challenge.js +1 -1
- package/dist/ui/mfa-setup.d.ts +1 -1
- package/dist/ui/mosaic.d.ts +23 -0
- package/dist/ui/motion-provider.d.ts +17 -0
- package/dist/ui/native-select.d.ts +22 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/next-step-card.js +92 -0
- package/dist/ui/notice-review.d.ts +32 -0
- package/dist/ui/oauth-consent.d.ts +1 -1
- package/dist/ui/page-header.d.ts +46 -4
- package/dist/ui/page-header.js +20 -11
- package/dist/ui/page-loader.d.ts +17 -0
- package/dist/ui/page-shell.d.ts +17 -0
- package/dist/ui/pagination.d.ts +20 -0
- package/dist/ui/pagination.js +2 -2
- package/dist/ui/panel.d.ts +2 -2
- package/dist/ui/password-strength.d.ts +14 -0
- package/dist/ui/popover.d.ts +32 -0
- package/dist/ui/proportion-bar.d.ts +25 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/quantity.js +27 -0
- package/dist/ui/questionnaire.d.ts +38 -0
- package/dist/ui/reasoning.d.ts +14 -0
- package/dist/ui/reveal.d.ts +17 -0
- package/dist/ui/sheet.d.ts +39 -2
- package/dist/ui/sheet.js +6 -2
- package/dist/ui/shield.d.ts +14 -0
- package/dist/ui/show-more.d.ts +14 -0
- package/dist/ui/sidebar.d.ts +5 -3
- package/dist/ui/sidebar.js +7 -3
- package/dist/ui/sparkline.d.ts +1 -1
- package/dist/ui/stat-group.d.ts +32 -0
- package/dist/ui/status-badge.d.ts +2 -2
- package/dist/ui/status-hero.d.ts +18 -0
- package/dist/ui/step-dots.d.ts +12 -0
- package/dist/ui/step-ring.d.ts +14 -0
- package/dist/ui/suggestions.d.ts +9 -0
- package/dist/ui/table.d.ts +26 -0
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/tag-input.js +169 -0
- package/dist/ui/task-loader.d.ts +15 -0
- package/dist/ui/task-progress.d.ts +14 -0
- package/dist/ui/textarea.d.ts +22 -1
- package/dist/ui/textarea.js +7 -1
- package/dist/ui/timeline.d.ts +26 -0
- package/dist/ui/toggle-group.d.ts +24 -0
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tool-call.d.ts +12 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/usage-meter.js +116 -0
- package/dist/ui/week-strip.d.ts +11 -0
- package/dist/ui/week-strip.js +2 -2
- package/dist/ui/workflow-run.d.ts +28 -0
- package/docs/adr/0001-rtl-clases-logicas.md +14 -1
- package/docs/designer/flujo.md +1 -1
- package/docs/designer/patrones.md +40 -1
- package/manifest/actions.json +364 -0
- package/manifest/agents.json +399 -0
- package/manifest/ai.json +128 -0
- package/manifest/auth.json +1547 -0
- package/manifest/chat.json +612 -0
- package/manifest/content.json +2298 -0
- package/manifest/data.json +2904 -0
- package/manifest/feedback.json +1005 -0
- package/manifest/forms.json +1954 -0
- package/manifest/motion.json +196 -0
- package/manifest/navigation.json +1792 -0
- package/manifest/overlays.json +931 -0
- package/package.json +242 -238
- package/scripts/cli.mjs +105 -8
- package/scripts/doctor.mjs +126 -1
- package/scripts/eslint-plugin.mjs +93 -0
- package/scripts/i18n.mjs +1 -1
- package/scripts/manifest.mjs +159 -7
- package/skill/SKILL.md +8 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useDsLocale, useDsMessages } from "../hooks/use-ds-messages.js";
|
|
5
|
+
import {
|
|
6
|
+
formatDate,
|
|
7
|
+
formatRelativeTime,
|
|
8
|
+
relativeTimeRefreshMs,
|
|
9
|
+
toDate
|
|
10
|
+
} from "../lib/format.js";
|
|
11
|
+
import { cn } from "../lib/utils.js";
|
|
12
|
+
function Empty({ slot, className, ...props }) {
|
|
13
|
+
const t = useDsMessages();
|
|
14
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": slot, "data-state": "empty", className: cn("tabular-nums", className), ...props, children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2014" }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t.statNoData })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
function DateTime({ value, style = "date", format, timeZone, className, ...props }) {
|
|
20
|
+
const locale = useDsLocale();
|
|
21
|
+
const d = toDate(value);
|
|
22
|
+
const text = formatDate(d, { locale, style, format, timeZone });
|
|
23
|
+
if (!d || text == null) return /* @__PURE__ */ jsx(Empty, { slot: "date-time", className });
|
|
24
|
+
return /* @__PURE__ */ jsx("time", { "data-slot": "date-time", dateTime: d.toISOString(), className: cn("tabular-nums", className), ...props, children: text });
|
|
25
|
+
}
|
|
26
|
+
function RelativeTime({ value, numeric, length, now, title, className, ...props }) {
|
|
27
|
+
const locale = useDsLocale();
|
|
28
|
+
const d = toDate(value);
|
|
29
|
+
const [tick, setTick] = React.useState(0);
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
if (!d || now !== void 0) return;
|
|
32
|
+
const ms = relativeTimeRefreshMs(d);
|
|
33
|
+
if (!ms) return;
|
|
34
|
+
const id = window.setTimeout(() => setTick((n) => n + 1), ms);
|
|
35
|
+
return () => window.clearTimeout(id);
|
|
36
|
+
}, [d?.getTime(), now, tick]);
|
|
37
|
+
const text = formatRelativeTime(d, { locale, now, numeric, style: length });
|
|
38
|
+
if (!d || text == null) return /* @__PURE__ */ jsx(Empty, { slot: "relative-time", className });
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"time",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "relative-time",
|
|
43
|
+
dateTime: d.toISOString(),
|
|
44
|
+
title: title ?? formatDate(d, { locale, style: "datetime" }) ?? void 0,
|
|
45
|
+
className: cn("tabular-nums", className),
|
|
46
|
+
suppressHydrationWarning: true,
|
|
47
|
+
...props,
|
|
48
|
+
children: text
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
DateTime,
|
|
54
|
+
RelativeTime
|
|
55
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Pares término–valor en un <dl> (límites de un plan, atributos de un equipo, datos de una cuenta). No es una tabla: para filas comparables por columnas usa Table o DataTable.
|
|
6
|
+
* @see table — varias filas con las mismas columnas que se comparan entre sí
|
|
7
|
+
* @see stat-group — pocas cifras clave destacadas en la cabecera de un panel
|
|
8
|
+
* @see usage-meter — uso frente a lo contratado, con barra y aviso
|
|
9
|
+
* @example Con items y valores con unidad
|
|
10
|
+
* <DescriptionList
|
|
11
|
+
* divided
|
|
12
|
+
* items={[
|
|
13
|
+
* { term: "Almacenamiento", value: <Quantity value={50} unit="GBy" /> },
|
|
14
|
+
* { term: "Dispositivos", value: <Quantity value={5} unit="{device}" />, description: "Ordenadores, móviles y tabletas" },
|
|
15
|
+
* { term: "Alta", value: <DateTime value={createdAt} /> },
|
|
16
|
+
* ]}
|
|
17
|
+
* />
|
|
18
|
+
* @example Montado con piezas, en rejilla
|
|
19
|
+
* <DescriptionList layout="grid">
|
|
20
|
+
* <DescriptionListItem>
|
|
21
|
+
* <DescriptionListTerm>Equipo</DescriptionListTerm>
|
|
22
|
+
* <DescriptionListDetails>Portátil de Ana</DescriptionListDetails>
|
|
23
|
+
* </DescriptionListItem>
|
|
24
|
+
* </DescriptionList>
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
type DescriptionListLayout = "inline" | "stacked" | "grid";
|
|
28
|
+
interface DescriptionListEntry {
|
|
29
|
+
term: React.ReactNode;
|
|
30
|
+
value: React.ReactNode;
|
|
31
|
+
/** Ayuda bajo el valor. */
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
/** Clave estable (por defecto, la posición). */
|
|
34
|
+
key?: React.Key;
|
|
35
|
+
}
|
|
36
|
+
type DescriptionListProps = React.ComponentProps<"dl"> & {
|
|
37
|
+
layout?: DescriptionListLayout;
|
|
38
|
+
divided?: boolean;
|
|
39
|
+
/** Atajo: la lista de pares. Los hijos se añaden después. */
|
|
40
|
+
items?: DescriptionListEntry[];
|
|
41
|
+
};
|
|
42
|
+
declare function DescriptionList({ layout, divided, items, className, children, ...props }: DescriptionListProps): React.JSX.Element;
|
|
43
|
+
declare function DescriptionListItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
44
|
+
declare function DescriptionListTerm({ className, ...props }: React.ComponentProps<"dt">): React.JSX.Element;
|
|
45
|
+
declare function DescriptionListDetails({ className, description, children, ...props }: React.ComponentProps<"dd"> & {
|
|
46
|
+
description?: React.ReactNode;
|
|
47
|
+
}): React.JSX.Element;
|
|
48
|
+
|
|
49
|
+
export { DescriptionList, DescriptionListDetails, type DescriptionListEntry, DescriptionListItem, type DescriptionListLayout, type DescriptionListProps, DescriptionListTerm };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const LayoutContext = React.createContext("inline");
|
|
7
|
+
const LAYOUT = {
|
|
8
|
+
inline: "flex flex-col",
|
|
9
|
+
stacked: "flex flex-col gap-3",
|
|
10
|
+
grid: "grid grid-cols-[repeat(auto-fill,minmax(var(--ds-dl-cell-min),1fr))] gap-x-6 gap-y-4"
|
|
11
|
+
};
|
|
12
|
+
function DescriptionList({ layout = "inline", divided = false, items, className, children, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(LayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsxs(
|
|
14
|
+
"dl",
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "description-list",
|
|
17
|
+
"data-layout": layout,
|
|
18
|
+
"data-divided": divided || void 0,
|
|
19
|
+
className: cn(
|
|
20
|
+
"group/description-list @container/description-list min-w-0 text-sm",
|
|
21
|
+
LAYOUT[layout],
|
|
22
|
+
divided && layout !== "grid" && "divide-y divide-border",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props,
|
|
26
|
+
children: [
|
|
27
|
+
items?.map((it, i) => /* @__PURE__ */ jsxs(DescriptionListItem, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(DescriptionListTerm, { children: it.term }),
|
|
29
|
+
/* @__PURE__ */ jsx(DescriptionListDetails, { description: it.description, children: it.value })
|
|
30
|
+
] }, it.key ?? i)),
|
|
31
|
+
children
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
function DescriptionListItem({ className, ...props }) {
|
|
37
|
+
const layout = React.useContext(LayoutContext);
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "description-list-item",
|
|
42
|
+
className: cn(
|
|
43
|
+
"min-w-0",
|
|
44
|
+
layout === "inline" && "flex flex-col gap-0.5 py-2 group-data-divided/description-list:py-2.5 @md/description-list:grid @md/description-list:grid-cols-[minmax(0,var(--ds-dl-term-w))_minmax(0,1fr)] @md/description-list:items-baseline @md/description-list:gap-4",
|
|
45
|
+
layout !== "inline" && "flex flex-col gap-0.5",
|
|
46
|
+
layout === "stacked" && "group-data-divided/description-list:pt-3 group-data-divided/description-list:first:pt-0",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function DescriptionListTerm({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx("dt", { "data-slot": "description-list-term", className: cn("min-w-0 text-muted-foreground", className), ...props });
|
|
55
|
+
}
|
|
56
|
+
function DescriptionListDetails({
|
|
57
|
+
className,
|
|
58
|
+
description,
|
|
59
|
+
children,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const t = useDsMessages();
|
|
63
|
+
const empty = children === null || children === void 0 || children === "";
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
"dd",
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "description-list-details",
|
|
68
|
+
"data-state": empty ? "empty" : void 0,
|
|
69
|
+
className: cn("min-w-0 font-(--ds-label-weight) break-words text-foreground tabular-nums", className),
|
|
70
|
+
...props,
|
|
71
|
+
children: [
|
|
72
|
+
empty ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2014" }),
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t.statNoData })
|
|
75
|
+
] }) : children,
|
|
76
|
+
description != null && /* @__PURE__ */ jsx("span", { "data-slot": "description-list-description", className: "mt-0.5 block text-xs font-(--ds-normal-weight) text-muted-foreground", children: description })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
DescriptionList,
|
|
83
|
+
DescriptionListDetails,
|
|
84
|
+
DescriptionListItem,
|
|
85
|
+
DescriptionListTerm
|
|
86
|
+
};
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group overlays
|
|
5
|
+
* @summary Ficha de una entidad que se abre sin salir de su lista (clic en una fila o tarjeta), ya montada sobre Sheet con título, cuerpo y pie; presets side · bottom · full.
|
|
6
|
+
* @see sheet — panel lateral a mano para lo que no es la ficha de una entidad
|
|
7
|
+
* @see drawer — hoja que se cierra arrastrando (móvil, filtros)
|
|
8
|
+
* @see confirm-action — decidir algo bloqueante (borrar, revocar), no consultar
|
|
9
|
+
* @example Ficha lateral desde una lista (preset side)
|
|
10
|
+
* <DetailPanel
|
|
11
|
+
* open={selected != null}
|
|
12
|
+
* onOpenChange={(o) => !o && setSelected(null)}
|
|
13
|
+
* title={agent.name}
|
|
14
|
+
* description={agent.role}
|
|
15
|
+
* footer={<Button onClick={edit}>Editar</Button>}
|
|
16
|
+
* >
|
|
17
|
+
* <DescriptionList items={details} />
|
|
18
|
+
* </DetailPanel>
|
|
19
|
+
* @example Hoja inferior en móvil (preset bottom)
|
|
20
|
+
* <DetailPanel open={open} onOpenChange={setOpen} preset="bottom" title={device.name}>
|
|
21
|
+
* <p>{device.summary}</p>
|
|
22
|
+
* </DetailPanel>
|
|
23
|
+
*/
|
|
24
|
+
|
|
3
25
|
type DetailPanelPreset = "side" | "bottom" | "full";
|
|
4
26
|
declare function DetailPanel({ open, onOpenChange, preset, side, title, description, footer, children, className, }: {
|
|
5
27
|
open?: boolean;
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group overlays
|
|
6
|
+
* @summary Ventana modal centrada para una tarea corta (formulario breve, detalle, novedades) que se puede cerrar sin decidir nada; para pedir una decisión, AlertDialog.
|
|
7
|
+
* @see alert-dialog — pedir una decisión que no se cierra con clic fuera (confirmar, publicar, borrar)
|
|
8
|
+
* @see sheet — panel lateral para formularios largos con la página aún de fondo
|
|
9
|
+
* @see drawer — hoja que se cierra arrastrando, pensada para móvil
|
|
10
|
+
* @example Formulario corto
|
|
11
|
+
* <Dialog>
|
|
12
|
+
* <DialogTrigger render={<Button />}>Invitar al equipo</DialogTrigger>
|
|
13
|
+
* <DialogContent>
|
|
14
|
+
* <DialogHeader>
|
|
15
|
+
* <DialogTitle>Invitar a un compañero</DialogTitle>
|
|
16
|
+
* <DialogDescription>Le enviaremos un correo con el enlace de acceso.</DialogDescription>
|
|
17
|
+
* </DialogHeader>
|
|
18
|
+
* <Field>
|
|
19
|
+
* <FieldLabel htmlFor="invite-email">Correo</FieldLabel>
|
|
20
|
+
* <Input id="invite-email" type="email" />
|
|
21
|
+
* </Field>
|
|
22
|
+
* <DialogFooter>
|
|
23
|
+
* <DialogClose render={<Button variant="outline" />}>Cancelar</DialogClose>
|
|
24
|
+
* <Button onClick={send}>Enviar invitación</Button>
|
|
25
|
+
* </DialogFooter>
|
|
26
|
+
* </DialogContent>
|
|
27
|
+
* </Dialog>
|
|
28
|
+
* @example Solo lectura, con «Cerrar» en el pie
|
|
29
|
+
* <DialogContent showCloseButton={false}>
|
|
30
|
+
* <DialogHeader>
|
|
31
|
+
* <DialogTitle>Novedades de la versión 4.2</DialogTitle>
|
|
32
|
+
* </DialogHeader>
|
|
33
|
+
* <DialogFooter showCloseButton />
|
|
34
|
+
* </DialogContent>
|
|
35
|
+
* @note Lleva siempre DialogTitle (es el nombre accesible) y se abre con DialogTrigger o con `open`/`onOpenChange` controlados.
|
|
36
|
+
* @note Contenido largo o que necesita ver la página detrás: Sheet o DetailPanel, no un Dialog con scroll.
|
|
37
|
+
*/
|
|
38
|
+
|
|
4
39
|
declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
|
|
5
40
|
declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
|
|
6
41
|
declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React.JSX.Element;
|
package/dist/ui/dock.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group navigation
|
|
6
|
+
* @summary Raíl compacto de accesos de solo icono con efecto lupa, para pocas secciones (≤ 8) de una app visual; sin textos ni grupos.
|
|
7
|
+
* @see sidebar — navegación principal con textos, grupos y muchos destinos
|
|
8
|
+
* @see bottom-nav — barra inferior de móvil con icono y texto
|
|
9
|
+
* @example Raíl vertical con el destino activo
|
|
10
|
+
* <Dock orientation="vertical">
|
|
11
|
+
* <DockItem label="Inicio" active><HomeIcon /></DockItem>
|
|
12
|
+
* <DockItem label="Mensajes" render={<a href="/inbox" />}><InboxIcon /></DockItem>
|
|
13
|
+
* </Dock>
|
|
14
|
+
* @example Horizontal con acciones
|
|
15
|
+
* <Dock orientation="horizontal">
|
|
16
|
+
* <DockItem label="Buscar" onClick={openSearch}><SearchIcon /></DockItem>
|
|
17
|
+
* <DockItem label="Ajustes" onClick={openSettings}><SettingsIcon /></DockItem>
|
|
18
|
+
* </Dock>
|
|
19
|
+
*/
|
|
20
|
+
|
|
4
21
|
declare function Dock({ orientation, className, onPointerMove, onPointerLeave, ...props }: React.ComponentProps<"nav"> & {
|
|
5
22
|
orientation?: "vertical" | "horizontal";
|
|
6
23
|
}): React.JSX.Element;
|
package/dist/ui/drawer.d.ts
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group overlays
|
|
6
|
+
* @summary Hoja que entra desde un borde y se cierra arrastrando (abajo por defecto, con anclajes opcionales); para móvil y para filtros o acciones rápidas al alcance del pulgar.
|
|
7
|
+
* @see sheet — panel lateral sin gesto de arrastre (escritorio, formularios largos)
|
|
8
|
+
* @see detail-panel — ficha de una entidad junto a su lista, con presets side · bottom · full
|
|
9
|
+
* @see dialog — tarea corta centrada en pantalla
|
|
10
|
+
* @example Filtros desde abajo, con asa
|
|
11
|
+
* <Drawer showSwipeHandle>
|
|
12
|
+
* <DrawerTrigger render={<Button variant="outline" />}>Filtrar</DrawerTrigger>
|
|
13
|
+
* <DrawerContent>
|
|
14
|
+
* <DrawerHeader>
|
|
15
|
+
* <DrawerTitle>Filtrar incidencias</DrawerTitle>
|
|
16
|
+
* <DrawerDescription>Elige los estados que quieres ver.</DrawerDescription>
|
|
17
|
+
* </DrawerHeader>
|
|
18
|
+
* <DrawerFooter>
|
|
19
|
+
* <Button onClick={apply}>Aplicar filtros</Button>
|
|
20
|
+
* <DrawerClose render={<Button variant="outline" />}>Cancelar</DrawerClose>
|
|
21
|
+
* </DrawerFooter>
|
|
22
|
+
* </DrawerContent>
|
|
23
|
+
* </Drawer>
|
|
24
|
+
* @example Con anclajes (40 % y pantalla entera)
|
|
25
|
+
* <Drawer snapPoints={[0.4, 1]} showSwipeHandle>
|
|
26
|
+
* <DrawerTrigger render={<Button variant="ghost" />}>Actividad reciente</DrawerTrigger>
|
|
27
|
+
* <DrawerContent>
|
|
28
|
+
* <DrawerHeader>
|
|
29
|
+
* <DrawerTitle>Actividad reciente</DrawerTitle>
|
|
30
|
+
* </DrawerHeader>
|
|
31
|
+
* </DrawerContent>
|
|
32
|
+
* </Drawer>
|
|
33
|
+
* @example Desde la derecha
|
|
34
|
+
* <Drawer swipeDirection="right">
|
|
35
|
+
* <DrawerTrigger render={<Button variant="outline" />}>Detalle del cliente</DrawerTrigger>
|
|
36
|
+
* <DrawerContent>
|
|
37
|
+
* <DrawerHeader>
|
|
38
|
+
* <DrawerTitle>Construcciones Ibéricas</DrawerTitle>
|
|
39
|
+
* </DrawerHeader>
|
|
40
|
+
* </DrawerContent>
|
|
41
|
+
* </Drawer>
|
|
42
|
+
* @note Lleva siempre DrawerTitle (nombre accesible) y un DrawerClose visible: el arrastre no es la única forma de cerrar.
|
|
43
|
+
*/
|
|
44
|
+
|
|
4
45
|
declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: Drawer$1.Root.Props & {
|
|
5
46
|
showSwipeHandle?: boolean;
|
|
6
47
|
}): React.JSX.Element;
|
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Menu } from '@base-ui/react/menu';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group overlays
|
|
6
|
+
* @summary Menú de acciones u opciones que se abre con un botón visible (⋯ de una fila, «Mi cuenta», columnas visibles); para lanzar acciones, no para elegir el valor de un campo.
|
|
7
|
+
* @see select — elegir el valor de un campo de formulario
|
|
8
|
+
* @see context-menu — las mismas acciones con clic derecho sobre el elemento
|
|
9
|
+
* @see menubar — barra de menús de aplicación (Archivo, Editar…)
|
|
10
|
+
* @example Acciones de una fila (botón de solo icono)
|
|
11
|
+
* <DropdownMenu>
|
|
12
|
+
* <DropdownMenuTrigger render={<Button size="icon" variant="ghost" aria-label={t("actions.more")} />}>
|
|
13
|
+
* <EllipsisIcon />
|
|
14
|
+
* </DropdownMenuTrigger>
|
|
15
|
+
* <DropdownMenuContent align="end">
|
|
16
|
+
* <DropdownMenuItem onClick={edit}>Editar</DropdownMenuItem>
|
|
17
|
+
* <DropdownMenuItem onClick={duplicate}>Duplicar</DropdownMenuItem>
|
|
18
|
+
* <DropdownMenuSeparator />
|
|
19
|
+
* <DropdownMenuItem variant="destructive" onClick={askDelete}>Eliminar</DropdownMenuItem>
|
|
20
|
+
* </DropdownMenuContent>
|
|
21
|
+
* </DropdownMenu>
|
|
22
|
+
* @example Grupo con etiqueta y opción única
|
|
23
|
+
* <DropdownMenuContent>
|
|
24
|
+
* <DropdownMenuGroup>
|
|
25
|
+
* <DropdownMenuLabel>Ordenar por</DropdownMenuLabel>
|
|
26
|
+
* <DropdownMenuRadioGroup value={order} onValueChange={setOrder}>
|
|
27
|
+
* <DropdownMenuRadioItem value="date">Fecha</DropdownMenuRadioItem>
|
|
28
|
+
* <DropdownMenuRadioItem value="amount">Importe</DropdownMenuRadioItem>
|
|
29
|
+
* </DropdownMenuRadioGroup>
|
|
30
|
+
* </DropdownMenuGroup>
|
|
31
|
+
* </DropdownMenuContent>
|
|
32
|
+
* @note DropdownMenuLabel va dentro de un DropdownMenuGroup (Base UI lo exige).
|
|
33
|
+
* @note La destructiva va al final, tras DropdownMenuSeparator, con `variant="destructive"`; si no se puede deshacer, abre ConfirmAction.
|
|
34
|
+
*/
|
|
35
|
+
|
|
4
36
|
declare function DropdownMenu({ ...props }: Menu.Root.Props): React.JSX.Element;
|
|
5
37
|
declare function DropdownMenuPortal({ ...props }: Menu.Portal.Props): React.JSX.Element;
|
|
6
38
|
declare function DropdownMenuTrigger({ ...props }: Menu.Trigger.Props): React.JSX.Element;
|
package/dist/ui/dropdown-menu.js
CHANGED
package/dist/ui/echart.d.ts
CHANGED
|
@@ -3,6 +3,21 @@ import * as echarts from 'echarts/core';
|
|
|
3
3
|
import { EChartsCoreOption } from 'echarts/core';
|
|
4
4
|
export { EChartsCoreOption as DsEChartOption } from 'echarts/core';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @group data
|
|
8
|
+
* @summary Lienzo de Apache ECharts que toma colores, fuentes y ritmo del tema activo y se repinta al cambiarlo. Para un gráfico dentro de tu propia maqueta; en un panel, mejor ChartCard.
|
|
9
|
+
* @see chart-card — gráfico en tarjeta con título, cargando, error, vacío y descarga
|
|
10
|
+
* @see sparkline — tendencia mínima en línea, sin ejes, junto a una cifra
|
|
11
|
+
* @see heatmap-grid — mapa de calor día × hora accesible como tabla navegable
|
|
12
|
+
* @example Línea con un constructor de echarts-presets (sin colores)
|
|
13
|
+
* <EChart
|
|
14
|
+
* option={lineOption({ categories: ["08:00", "09:00", "10:00"], series: [{ name: "Entrantes", data: [120, 310, 420] }] })}
|
|
15
|
+
* height={280}
|
|
16
|
+
* />
|
|
17
|
+
* @example Descargable en SVG/PNG
|
|
18
|
+
* <EChart option={option} height={280} exportable fileName="volumen-llamadas" />
|
|
19
|
+
*/
|
|
20
|
+
|
|
6
21
|
interface EChartHandle {
|
|
7
22
|
/** Instancia de ECharts (para eventos o acciones avanzadas). */
|
|
8
23
|
getInstance(): ReturnType<typeof echarts.init> | null;
|
package/dist/ui/entity-list.d.ts
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Lista de entidades (agentes, herramientas, dispositivos) con cargando, error y vacío resueltos; cada fila es un Item variant="card". Para comparar muchas filas por columnas, DataTable.
|
|
6
|
+
* @see data-table — muchas filas que se ordenan, filtran y comparan por columnas
|
|
7
|
+
* @see item — una sola fila o tarjeta de entidad, sin estados de lista
|
|
8
|
+
* @see load-more — pedir más elementos al final de una lista larga
|
|
9
|
+
* @example Preset list (por defecto)
|
|
10
|
+
* <EntityList
|
|
11
|
+
* items={agents}
|
|
12
|
+
* getKey={(a) => a.id}
|
|
13
|
+
* renderItem={(a) => (
|
|
14
|
+
* <Item variant="card">
|
|
15
|
+
* <ItemContent>
|
|
16
|
+
* <ItemTitle>{a.name}</ItemTitle>
|
|
17
|
+
* <ItemDescription>{a.description}</ItemDescription>
|
|
18
|
+
* </ItemContent>
|
|
19
|
+
* </Item>
|
|
20
|
+
* )}
|
|
21
|
+
* />
|
|
22
|
+
* @example Preset grid con estados y filtros
|
|
23
|
+
* <EntityList
|
|
24
|
+
* preset="grid"
|
|
25
|
+
* items={agents}
|
|
26
|
+
* getKey={(a) => a.id}
|
|
27
|
+
* renderItem={renderAgent}
|
|
28
|
+
* loading={isLoading}
|
|
29
|
+
* error={error}
|
|
30
|
+
* onRetry={refetch}
|
|
31
|
+
* filtered={hasFilters}
|
|
32
|
+
* />
|
|
33
|
+
*/
|
|
34
|
+
|
|
3
35
|
type EntityListPreset = "list" | "grid" | "compact";
|
|
4
36
|
declare function EntityList<T>({ items, getKey, renderItem, preset, toolbar, bulk, loading, error, onRetry, filtered, emptyAction, skeletonCount, className, }: {
|
|
5
37
|
items: readonly T[];
|
package/dist/ui/field.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare function FieldLegend({ className, variant, ...props }: React.ComponentPr
|
|
|
9
9
|
}): React$1.JSX.Element;
|
|
10
10
|
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
11
11
|
declare const fieldVariants: (props?: ({
|
|
12
|
-
orientation?: "
|
|
12
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
14
|
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): React$1.JSX.Element;
|
|
15
15
|
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
package/dist/ui/form-layout.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group forms
|
|
5
|
+
* @summary Maqueta de un formulario o pantalla de ajustes: secciones y barra Guardar/Descartar resueltas, en una columna o con títulos al lado.
|
|
6
|
+
* @see field — cada campo dentro de las secciones
|
|
7
|
+
* @see step-flow — un formulario largo repartido en pasos
|
|
8
|
+
* @see filter-bar — filtros de una lista, no un formulario que se guarda
|
|
9
|
+
* @example Preset inline (alta corta)
|
|
10
|
+
* <FormLayout preset="inline" onSave={crear}>
|
|
11
|
+
* <Field>
|
|
12
|
+
* <FieldLabel htmlFor="name">Nombre</FieldLabel>
|
|
13
|
+
* <Input id="name" />
|
|
14
|
+
* </Field>
|
|
15
|
+
* </FormLayout>
|
|
16
|
+
* @example Preset settings (barra solo con cambios)
|
|
17
|
+
* <FormLayout preset="settings" dirty={dirty} onSave={guardar} onDiscard={descartar}>
|
|
18
|
+
* <FormSection title="General" description="Datos básicos de la organización.">
|
|
19
|
+
* <Field>
|
|
20
|
+
* <FieldLabel htmlFor="org">Nombre</FieldLabel>
|
|
21
|
+
* <Input id="org" value={nombre} onChange={(e) => setNombre(e.target.value)} />
|
|
22
|
+
* </Field>
|
|
23
|
+
* </FormSection>
|
|
24
|
+
* </FormLayout>
|
|
25
|
+
*/
|
|
26
|
+
|
|
3
27
|
type FormLayoutPreset = "inline" | "sectioned" | "settings";
|
|
4
28
|
declare function FormLayout({ preset, dirty, saving, onSave, onDiscard, saveLabel, discardLabel, className, children, ...props }: Omit<React.ComponentProps<"form">, "onSubmit"> & {
|
|
5
29
|
preset?: FormLayoutPreset;
|
package/dist/ui/gauge.d.ts
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DsDataTone } from './legend.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group data
|
|
6
|
+
* @summary Un valor sobre un máximo en anillo o arco, con la cifra en el centro y etiqueta de estado (riesgo, puntuación, reparto en tramos). Para uso frente a lo contratado, UsageMeter.
|
|
7
|
+
* @see usage-meter — uso frente a un límite contratado (almacenamiento, puestos), con aviso al 80 %
|
|
8
|
+
* @see level-meter — un nivel en porcentaje con su categoría y rango, sin anillo
|
|
9
|
+
* @see proportion-bar — parte frente al total o reparto en una barra horizontal
|
|
10
|
+
* @example Anillo con cifra y etiqueta de estado
|
|
11
|
+
* <Gauge value={540} max={1000} tone="warning" label="Riesgo">
|
|
12
|
+
* <GaugeValue>
|
|
13
|
+
* 540<GaugeSuffix>/1.000</GaugeSuffix>
|
|
14
|
+
* </GaugeValue>
|
|
15
|
+
* <GaugeTag>Riesgo medio</GaugeTag>
|
|
16
|
+
* </Gauge>
|
|
17
|
+
* @example Arco con escala
|
|
18
|
+
* <Gauge shape="semi" value={82} tone="success" label="Puntuación">
|
|
19
|
+
* <GaugeValue>82</GaugeValue>
|
|
20
|
+
* <GaugeTag>Bajo</GaugeTag>
|
|
21
|
+
* </Gauge>
|
|
22
|
+
* <GaugeScale min="Alto" max="Bajo" />
|
|
23
|
+
* @example Tramos con leyenda
|
|
24
|
+
* <Gauge label="Dispositivos" max={10} segments={[{ value: 6, tone: "success", label: "Protegidos" }, { value: 4, tone: "danger", label: "En peligro" }]}>
|
|
25
|
+
* <GaugeValue>10</GaugeValue>
|
|
26
|
+
* <GaugeCaption>dispositivos</GaugeCaption>
|
|
27
|
+
* </Gauge>
|
|
28
|
+
*/
|
|
29
|
+
|
|
4
30
|
type GaugeShape = "ring" | "semi";
|
|
5
31
|
interface GaugeSegment {
|
|
6
32
|
value: number;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group ai
|
|
5
|
+
* @summary Imagen creada por IA dentro de un mensaje, con sus estados (generando, lista con descargar y regenerar, error) y la proporción fija para que la página no salte.
|
|
6
|
+
* @see media-card — imagen de contenido de la app, no generada
|
|
7
|
+
* @see aspect-ratio — cualquier imagen con proporción fija
|
|
8
|
+
* @example Imagen lista
|
|
9
|
+
* <GeneratedImage
|
|
10
|
+
* status="done"
|
|
11
|
+
* src={url}
|
|
12
|
+
* alt="Un faro al amanecer sobre el mar"
|
|
13
|
+
* prompt={prompt}
|
|
14
|
+
* ratio="16/9"
|
|
15
|
+
* downloadName="faro.png"
|
|
16
|
+
* onRetry={regenerate}
|
|
17
|
+
* />
|
|
18
|
+
* @example Generando
|
|
19
|
+
* <GeneratedImage status="loading" alt="Un faro al amanecer" ratio="1/1" />
|
|
20
|
+
*/
|
|
21
|
+
|
|
3
22
|
declare function GeneratedImage({ status, src, alt, prompt, ratio, downloadName, onRetry, className, style, ...props }: Omit<React.ComponentProps<"figure">, "children"> & {
|
|
4
23
|
status?: "loading" | "done" | "error";
|
|
5
24
|
src?: string;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group ai
|
|
5
|
+
* @summary Tabla de solo lectura que produce una herramienta del agente dentro de un mensaje, con descarga CSV opcional; para ordenar, filtrar o paginar, DataTable.
|
|
6
|
+
* @see data-table — tabla de la app con orden, filtros y paginación
|
|
7
|
+
* @see table — tabla estática que la app compone a mano
|
|
8
|
+
* @example Resultado descargable
|
|
9
|
+
* <GeneratedTable
|
|
10
|
+
* caption="Planes disponibles"
|
|
11
|
+
* columns={["Plan", "Precio"]}
|
|
12
|
+
* rows={[
|
|
13
|
+
* { Plan: "Básico", Precio: "0 €" },
|
|
14
|
+
* { Plan: "Pro", Precio: "9 €" },
|
|
15
|
+
* ]}
|
|
16
|
+
* downloadable
|
|
17
|
+
* downloadName="planes.csv"
|
|
18
|
+
* />
|
|
19
|
+
*/
|
|
20
|
+
|
|
3
21
|
declare function GeneratedTable({ columns, rows, caption, downloadable, downloadName, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
4
22
|
columns: string[];
|
|
5
23
|
rows: Record<string, React.ReactNode>[];
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DsDataTone } from './legend.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group data
|
|
6
|
+
* @summary Mapa de calor accesible como tabla (día × hora, fila × columna): celdas navegables con flechas, sin dato rayado y tarjeta flotante. Para un mapa de calor dentro de un gráfico, EChart.
|
|
7
|
+
* @see echart — mapa de calor como gráfico (heatmapOption de echarts-presets), sin navegación por celdas
|
|
8
|
+
* @see data-table — valores exactos por filas y columnas que se ordenan o filtran
|
|
9
|
+
* @see legend — explicar tonos o series fuera del gráfico
|
|
10
|
+
* @example Día × hora con unidad en el valor
|
|
11
|
+
* <HeatmapGrid
|
|
12
|
+
* caption="Llamadas por día y hora"
|
|
13
|
+
* rows={["Lunes", "Martes"]}
|
|
14
|
+
* columns={["09", "10", "11"]}
|
|
15
|
+
* values={[[12, 30, null], [8, 22, 41]]}
|
|
16
|
+
* formatValue={(v) => `${v} llamadas`}
|
|
17
|
+
* />
|
|
18
|
+
* @example Celda pulsable para filtrar, con otro tono
|
|
19
|
+
* <HeatmapGrid aria-label="Backlog por día y hora" rows={days} columns={hours} values={backlog} tone="warning" onCellClick={(c) => setCell(c)} />
|
|
20
|
+
* @note Un hueco es null (celda rayada, «sin dato»), nunca 0. Da siempre caption o aria-label y formatValue con la unidad: es lo que se lee en cada celda.
|
|
21
|
+
* @note tone es del vocabulario común (DsDataTone): un solo tono por mapa, de bajo a alto. Para elegir celdas, onCellClick (también con Intro).
|
|
22
|
+
*/
|
|
23
|
+
|
|
4
24
|
interface HeatmapCell {
|
|
5
25
|
row: number;
|
|
6
26
|
column: number;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AuthBackdropVariant } from './auth-backdrop.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group content
|
|
6
|
+
* @summary Portada de una web, un producto o un módulo: antetítulo, título grande, texto, acciones y, según el preset, imagen al lado, foto de fondo o tira de logos o cifras.
|
|
7
|
+
* @see page-header — cabecera de una vista de trabajo (título, migas, acciones), no una portada
|
|
8
|
+
* @see empty-state — un módulo que aún no tiene contenido e invita a crear lo primero
|
|
9
|
+
* @see content-card — tarjeta de presentación dentro de una rejilla, no la portada de la página
|
|
10
|
+
* @example Portada de producto
|
|
11
|
+
* <Hero
|
|
12
|
+
* preset="landing"
|
|
13
|
+
* eyebrow={<Badge variant="secondary">Nuevo · Informes automáticos</Badge>}
|
|
14
|
+
* title="Tus operaciones, en una sola vista"
|
|
15
|
+
* description="Conecta tus fuentes y recibe cada lunes el informe que antes hacías a mano."
|
|
16
|
+
* actions={<><Button size="lg">Empezar gratis</Button><Button size="lg" variant="outline">Ver demo</Button></>}
|
|
17
|
+
* backdrop="mesh"
|
|
18
|
+
* />
|
|
19
|
+
* @example Texto junto a una captura
|
|
20
|
+
* <Hero preset="split" title="Todo tu equipo, al día" description="Avisos, tareas y métricas en un panel." actions={<Button>Probar</Button>} media={<img src="/panel.png" alt="Panel de control con métricas" />} />
|
|
21
|
+
* @example Portada de un módulo dentro de la app
|
|
22
|
+
* <Hero preset="section" title="Integraciones" description="Conecta tus herramientas en dos clics." actions={<Button>Añadir integración</Button>} footer={<StatGroup preset="strip">…</StatGroup>} />
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
type HeroPreset = "landing" | "split" | "media" | "section";
|
|
26
|
+
type HeroAlign = "start" | "center";
|
|
27
|
+
type HeroProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
28
|
+
preset?: HeroPreset;
|
|
29
|
+
/** Título de la portada. No es el atributo HTML `title`. */
|
|
30
|
+
title: React.ReactNode;
|
|
31
|
+
/** Texto de apoyo bajo el título (una o dos frases). */
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
/** Sobre el título: una Badge de novedad, un enlace «Nuevo: …» o la categoría. */
|
|
34
|
+
eyebrow?: React.ReactNode;
|
|
35
|
+
/** Llamadas a la acción (una principal y, como mucho, una secundaria). */
|
|
36
|
+
actions?: React.ReactNode;
|
|
37
|
+
/** split: la imagen, el vídeo o la demo junto al texto (con su `alt`). */
|
|
38
|
+
media?: React.ReactNode;
|
|
39
|
+
/** Bajo todo: tira de logos de clientes, cifras (StatGroup preset="strip") o una nota. */
|
|
40
|
+
footer?: React.ReactNode;
|
|
41
|
+
/** Alineación del texto; por defecto, la del preset. */
|
|
42
|
+
align?: HeroAlign;
|
|
43
|
+
/** Fondo decorativo (ver AuthBackdrop). Por defecto ninguno; `media` usa `image`. */
|
|
44
|
+
backdrop?: AuthBackdropVariant;
|
|
45
|
+
/** backdrop="image": la foto o el vídeo de fondo (un <img>/<video> con alt=""). */
|
|
46
|
+
backdropMedia?: React.ReactNode;
|
|
47
|
+
/** Cristal esmerilado sobre el fondo. */
|
|
48
|
+
backdropGlass?: boolean;
|
|
49
|
+
/** Placa bajo el texto para garantizar el contraste sobre un fondo cargado; por defecto, solo con foto. */
|
|
50
|
+
plate?: boolean;
|
|
51
|
+
/** Entrada en cascada con el ritmo del tema (quieta con movimiento reducido). */
|
|
52
|
+
animated?: boolean;
|
|
53
|
+
/** Nivel del título: h1 si es la portada de la página; h2 si va dentro de otra vista. */
|
|
54
|
+
titleAs?: "h1" | "h2";
|
|
55
|
+
};
|
|
56
|
+
declare function Hero({ preset, title, description, eyebrow, actions, media, footer, align, backdrop, backdropMedia, backdropGlass, plate, animated, titleAs: Title, className, children, ...props }: HeroProps): React.JSX.Element;
|
|
57
|
+
|
|
58
|
+
export { Hero, type HeroAlign, type HeroPreset, type HeroProps };
|