orbital-ds 0.44.1 → 0.50.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.
Files changed (102) hide show
  1. package/AGENTS.md +42 -10
  2. package/CHANGELOG.md +489 -0
  3. package/README.md +2 -2
  4. package/components.manifest.json +590 -83
  5. package/dist/hooks/use-ds-messages.d.ts +54 -0
  6. package/dist/hooks/use-esc-close-stack.d.ts +3 -0
  7. package/dist/hooks/use-esc-close-stack.js +38 -0
  8. package/dist/hooks/use-simulated-progress.d.ts +11 -0
  9. package/dist/hooks/use-simulated-progress.js +30 -0
  10. package/dist/lib/brand-allowlist.d.ts +3 -0
  11. package/dist/lib/brand-allowlist.js +719 -0
  12. package/dist/lib/brand-runtime.d.ts +52 -0
  13. package/dist/lib/brand-runtime.js +85 -0
  14. package/dist/lib/echarts-presets.d.ts +81 -1
  15. package/dist/lib/echarts-presets.js +152 -1
  16. package/dist/lib/echarts-setup.js +2 -0
  17. package/dist/lib/i18n.d.ts +54 -0
  18. package/dist/lib/i18n.js +165 -3
  19. package/dist/lib/locales/de.js +55 -1
  20. package/dist/lib/locales/fr.js +55 -1
  21. package/dist/lib/locales/he.js +55 -1
  22. package/dist/lib/locales/it.js +55 -1
  23. package/dist/styles.css +44 -0
  24. package/dist/themes/tactile.css +1 -6
  25. package/dist/themes/tactile.scoped.css +1 -6
  26. package/dist/ui/alert.d.ts +1 -1
  27. package/dist/ui/api-key-list.d.ts +40 -0
  28. package/dist/ui/api-key-list.js +89 -0
  29. package/dist/ui/attachment.d.ts +3 -3
  30. package/dist/ui/audit-log.d.ts +53 -0
  31. package/dist/ui/audit-log.js +102 -0
  32. package/dist/ui/banner.d.ts +1 -1
  33. package/dist/ui/bubble.d.ts +1 -1
  34. package/dist/ui/button-group.d.ts +1 -1
  35. package/dist/ui/button.d.ts +2 -2
  36. package/dist/ui/chart-card.d.ts +0 -1
  37. package/dist/ui/context-menu.js +2 -2
  38. package/dist/ui/cta-banner.d.ts +30 -0
  39. package/dist/ui/cta-banner.js +63 -0
  40. package/dist/ui/detail-panel.d.ts +3 -1
  41. package/dist/ui/detail-panel.js +2 -2
  42. package/dist/ui/faq.d.ts +34 -0
  43. package/dist/ui/faq.js +25 -0
  44. package/dist/ui/feature-grid.d.ts +40 -0
  45. package/dist/ui/feature-grid.js +40 -0
  46. package/dist/ui/field.d.ts +1 -1
  47. package/dist/ui/input-group.d.ts +1 -1
  48. package/dist/ui/item.d.ts +3 -3
  49. package/dist/ui/landing-section.d.ts +34 -0
  50. package/dist/ui/landing-section.js +59 -0
  51. package/dist/ui/marker.d.ts +1 -1
  52. package/dist/ui/member-list.d.ts +43 -0
  53. package/dist/ui/member-list.js +107 -0
  54. package/dist/ui/onboarding-checklist.d.ts +38 -0
  55. package/dist/ui/onboarding-checklist.js +132 -0
  56. package/dist/ui/panel.d.ts +2 -2
  57. package/dist/ui/permission-matrix.d.ts +35 -0
  58. package/dist/ui/permission-matrix.js +89 -0
  59. package/dist/ui/plan-summary.d.ts +59 -0
  60. package/dist/ui/plan-summary.js +92 -0
  61. package/dist/ui/popover.d.ts +1 -1
  62. package/dist/ui/pricing-table.d.ts +29 -0
  63. package/dist/ui/pricing-table.js +86 -0
  64. package/dist/ui/sheet.d.ts +2 -2
  65. package/dist/ui/sheet.js +1 -1
  66. package/dist/ui/sidebar.d.ts +1 -1
  67. package/dist/ui/sparkline.d.ts +1 -1
  68. package/dist/ui/status-badge.d.ts +2 -2
  69. package/dist/ui/tabs.d.ts +1 -1
  70. package/dist/ui/testimonial.d.ts +37 -0
  71. package/dist/ui/testimonial.js +61 -0
  72. package/dist/ui/toggle.d.ts +1 -1
  73. package/dist/ui/upgrade-prompt.d.ts +24 -0
  74. package/dist/ui/upgrade-prompt.js +85 -0
  75. package/dist/ui/workspace-switcher.d.ts +28 -0
  76. package/dist/ui/workspace-switcher.js +92 -0
  77. package/docs/GRAFICOS.md +1 -1
  78. package/docs/designer/patrones.md +36 -3
  79. package/manifest/actions.json +1 -1
  80. package/manifest/agents.json +1 -1
  81. package/manifest/ai.json +1 -1
  82. package/manifest/auth.json +1 -1
  83. package/manifest/chat.json +1 -1
  84. package/manifest/content.json +496 -1
  85. package/manifest/data.json +498 -103
  86. package/manifest/feedback.json +234 -47
  87. package/manifest/forms.json +1 -1
  88. package/manifest/motion.json +3 -3
  89. package/manifest/navigation.json +104 -3
  90. package/manifest/overlays.json +15 -12
  91. package/package.json +6 -18
  92. package/scripts/cli.mjs +82 -5
  93. package/scripts/doctor.mjs +32 -4
  94. package/scripts/eslint-plugin.mjs +32 -0
  95. package/scripts/manifest.mjs +20 -0
  96. package/scripts/skill.mjs +85 -0
  97. package/scripts/upgrade.mjs +126 -0
  98. package/skill/SKILL.md +5 -2
  99. package/dist/ui/chart.d.ts +0 -65
  100. package/dist/ui/chart.js +0 -254
  101. package/dist/ui/sonner.d.ts +0 -6
  102. package/dist/ui/sonner.js +0 -60
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { KeyRoundIcon, MoreHorizontalIcon, TicketIcon, WebhookIcon } from "lucide-react";
4
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
5
+ import { dsFormat } from "../lib/i18n.js";
6
+ import { cn } from "../lib/utils.js";
7
+ import { Alert, AlertDescription, AlertTitle } from "./alert.js";
8
+ import { Badge } from "./badge.js";
9
+ import { Button } from "./button.js";
10
+ import { CopyField } from "./copy-button.js";
11
+ import { RelativeTime } from "./date-time.js";
12
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
13
+ import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle } from "./item.js";
14
+ import { StatusBadge } from "./status-badge.js";
15
+ const PRESETS = {
16
+ keys: { icon: /* @__PURE__ */ jsx(KeyRoundIcon, {}), showScopes: false, showExpiry: false, showUsage: true, showHealth: false },
17
+ tokens: { icon: /* @__PURE__ */ jsx(TicketIcon, {}), showScopes: true, showExpiry: true, showUsage: true, showHealth: false },
18
+ webhooks: { icon: /* @__PURE__ */ jsx(WebhookIcon, {}), showScopes: true, showExpiry: false, showUsage: false, showHealth: true }
19
+ };
20
+ function isPast(value) {
21
+ const ms = new Date(value).getTime();
22
+ return Number.isFinite(ms) && ms < Date.now();
23
+ }
24
+ function ApiKeyList({ preset = "keys", items, revealed, showScopes, showExpiry, showUsage, onRevoke, onRoll, renderActions, className, ...props }) {
25
+ const t = useDsMessages();
26
+ const p = PRESETS[preset];
27
+ const scopes = showScopes ?? p.showScopes;
28
+ const expiry = showExpiry ?? p.showExpiry;
29
+ const usage = showUsage ?? p.showUsage;
30
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "api-key-list", "data-preset": preset, className: cn("flex min-w-0 flex-col gap-2", className), ...props, children: [
31
+ revealed ? /* @__PURE__ */ jsxs(Alert, { "data-slot": "api-key-list-reveal", variant: "warning", children: [
32
+ /* @__PURE__ */ jsx(AlertTitle, { children: t.apiKeyRevealTitle }),
33
+ /* @__PURE__ */ jsxs(AlertDescription, { className: "flex flex-col gap-2", children: [
34
+ /* @__PURE__ */ jsx("span", { children: t.apiKeyRevealHint }),
35
+ /* @__PURE__ */ jsx(CopyField, { value: revealed.secret, className: "max-w-full font-mono" })
36
+ ] })
37
+ ] }) : null,
38
+ /* @__PURE__ */ jsx(ItemGroup, { className: "gap-2", children: items.map((k) => {
39
+ const text = k.label ?? (typeof k.name === "string" ? k.name : k.id);
40
+ const status = k.status ?? (k.expiresAt != null && isPast(k.expiresAt) ? "expired" : "active");
41
+ const live = status === "active" || status === "paused";
42
+ const meta = [];
43
+ if (k.createdAt != null && preset !== "webhooks") meta.push(/* @__PURE__ */ jsxs("span", { children: [
44
+ t.apiKeyCreated,
45
+ " ",
46
+ /* @__PURE__ */ jsx(RelativeTime, { value: k.createdAt })
47
+ ] }, "c"));
48
+ if (usage) meta.push(k.lastUsed != null ? /* @__PURE__ */ jsxs("span", { children: [
49
+ t.apiKeyLastUsed,
50
+ " ",
51
+ /* @__PURE__ */ jsx(RelativeTime, { value: k.lastUsed })
52
+ ] }, "u") : /* @__PURE__ */ jsx("span", { children: t.apiKeyNeverUsed }, "u"));
53
+ if (expiry && live) meta.push(k.expiresAt != null ? /* @__PURE__ */ jsxs("span", { children: [
54
+ t.apiKeyExpires,
55
+ " ",
56
+ /* @__PURE__ */ jsx(RelativeTime, { value: k.expiresAt })
57
+ ] }, "e") : /* @__PURE__ */ jsx("span", { children: t.apiKeyNoExpiry }, "e"));
58
+ const menu = live && (onRevoke || onRoll || renderActions);
59
+ return /* @__PURE__ */ jsxs(Item, { variant: "card", size: "sm", "data-slot": "api-key-list-item", "data-status": status, "data-revealed": revealed?.id === k.id || void 0, className: cn(!live && "opacity-(--ds-disabled-opacity)"), children: [
60
+ /* @__PURE__ */ jsx(ItemMedia, { variant: "icon", children: p.icon }),
61
+ /* @__PURE__ */ jsxs(ItemContent, { className: "min-w-0", children: [
62
+ /* @__PURE__ */ jsxs(ItemTitle, { className: "min-w-0 flex-wrap", children: [
63
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: k.name }),
64
+ status === "expired" ? /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t.apiKeyExpired }) : null,
65
+ status === "revoked" ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: t.apiKeyRevoked }) : null,
66
+ status === "paused" ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: t.apiKeyPaused }) : null,
67
+ p.showHealth && live && k.health ? /* @__PURE__ */ jsx(StatusBadge, { variant: "dot", level: k.health === "ok" ? "ok" : "critical", children: k.health === "ok" ? t.apiKeyHealthy : t.apiKeyFailing }) : null
68
+ ] }),
69
+ /* @__PURE__ */ jsxs(ItemDescription, { className: "flex min-w-0 flex-col gap-1", children: [
70
+ /* @__PURE__ */ jsx("code", { "data-slot": "api-key-list-value", className: "truncate font-mono text-xs text-foreground", children: k.value }),
71
+ scopes && k.scopes?.length ? /* @__PURE__ */ jsx("span", { "data-slot": "api-key-list-scopes", className: "flex flex-wrap gap-1", children: k.scopes.map((s) => /* @__PURE__ */ jsx(Badge, { variant: "outline", size: "sm", className: "font-mono", children: s }, s)) }) : null,
72
+ meta.length ? /* @__PURE__ */ jsx("span", { "data-slot": "api-key-list-meta", className: "flex flex-wrap gap-x-3 gap-y-0.5 text-xs", children: meta }) : null
73
+ ] })
74
+ ] }),
75
+ menu ? /* @__PURE__ */ jsx(ItemActions, { children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
76
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { render: /* @__PURE__ */ jsx(Button, { type: "button", size: "icon-sm", variant: "ghost", "aria-label": dsFormat(t.conversationActions, { name: text }) }), children: /* @__PURE__ */ jsx(MoreHorizontalIcon, {}) }),
77
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
78
+ onRoll ? /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => void onRoll(k.id), children: t.apiKeyRoll }) : null,
79
+ renderActions?.(k),
80
+ onRevoke ? /* @__PURE__ */ jsx(DropdownMenuItem, { variant: "destructive", onClick: () => void onRevoke(k.id), children: t.apiKeyRevoke }) : null
81
+ ] })
82
+ ] }) }) : null
83
+ ] }, k.id);
84
+ }) })
85
+ ] });
86
+ }
87
+ export {
88
+ ApiKeyList
89
+ };
@@ -5,14 +5,14 @@ import { VariantProps } from 'class-variance-authority';
5
5
  import { Button } from './button.js';
6
6
 
7
7
  declare const attachmentVariants: (props?: ({
8
- size?: "default" | "sm" | "xs" | null | undefined;
9
- orientation?: "horizontal" | "vertical" | null | undefined;
8
+ size?: "default" | "xs" | "sm" | null | undefined;
9
+ orientation?: "vertical" | "horizontal" | null | undefined;
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  declare function Attachment({ className, state, size, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & {
12
12
  state?: "idle" | "uploading" | "processing" | "error" | "done";
13
13
  }): React.JSX.Element;
14
14
  declare const attachmentMediaVariants: (props?: ({
15
- variant?: "image" | "icon" | null | undefined;
15
+ variant?: "icon" | "image" | null | undefined;
16
16
  } & class_variance_authority_types.ClassProp) | undefined) => string;
17
17
  declare function AttachmentMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): React.JSX.Element;
18
18
  declare function AttachmentContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * @group data
5
+ * @summary Registro de actividad (quién hizo qué, sobre qué y cuándo), agrupado por día, para auditoría y seguridad de una cuenta o de una entidad; presets full · compact · entity.
6
+ * @see timeline — hitos de un proceso, no eventos de auditoría con autor
7
+ * @see data-table — miles de eventos con filtros, orden y exportación
8
+ * @see session-list — sesiones abiertas, no acciones hechas
9
+ * @example Registro de la cuenta (preset full)
10
+ * <AuditLog
11
+ * preset="full"
12
+ * events={[
13
+ * { id: "1", actor: { name: "Ana Ruiz" }, action: "cambió el rol de", target: "Leo Díaz", at: "2026-11-21T09:12:00Z", ip: "81.44.12.9" },
14
+ * { id: "2", action: "renovó el certificado", target: "api.acme.com", at: "2026-11-20T23:00:00Z" },
15
+ * ]}
16
+ * />
17
+ * @example Historial de una entidad en su detalle (preset entity)
18
+ * <AuditLog preset="entity" events={events} />
19
+ */
20
+
21
+ type AuditLogPreset = "full" | "compact" | "entity";
22
+ type AuditTone = "neutral" | "info" | "success" | "warning" | "danger";
23
+ type AuditActor = {
24
+ name: string;
25
+ avatar?: string;
26
+ };
27
+ type AuditEvent = {
28
+ id: string;
29
+ /** Autor; sin autor = el sistema. */
30
+ actor?: AuditActor | string | null;
31
+ /** Verbo y complemento, en el idioma de la app («cambió el rol de»). */
32
+ action: React.ReactNode;
33
+ /** Sobre qué se hizo. */
34
+ target?: React.ReactNode;
35
+ at: string | number | Date;
36
+ ip?: string;
37
+ tone?: AuditTone;
38
+ /** Detalle adicional (un diff, un motivo). */
39
+ detail?: React.ReactNode;
40
+ };
41
+ type AuditLogProps = Omit<React.ComponentProps<"div">, "children"> & {
42
+ preset?: AuditLogPreset;
43
+ events: AuditEvent[];
44
+ /** Agrupa por día («Hoy», «Ayer», fecha). */
45
+ group?: boolean;
46
+ showTarget?: boolean;
47
+ showIp?: boolean;
48
+ /** Contenido si no hay eventos (por ejemplo, un EmptyState). */
49
+ empty?: React.ReactNode;
50
+ };
51
+ declare function AuditLog({ preset, events, group, showTarget, showIp, empty, className, ...props }: AuditLogProps): React.JSX.Element;
52
+
53
+ export { type AuditActor, type AuditEvent, AuditLog, type AuditLogPreset, type AuditLogProps, type AuditTone };
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useDsLocale, useDsMessages } from "../hooks/use-ds-messages.js";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
6
+ import { DateTime, RelativeTime } from "./date-time.js";
7
+ const PRESETS = {
8
+ full: { group: true, showTarget: true, showIp: true, showAvatar: true, absolute: true, timeline: false },
9
+ compact: { group: false, showTarget: true, showIp: false, showAvatar: false, absolute: false, timeline: false },
10
+ entity: { group: true, showTarget: false, showIp: false, showAvatar: false, absolute: false, timeline: true }
11
+ };
12
+ const DOT_TONE = {
13
+ neutral: "bg-(--ds-field-border)",
14
+ info: "bg-info",
15
+ success: "bg-success",
16
+ warning: "bg-warning",
17
+ danger: "bg-danger"
18
+ };
19
+ function dayKey(d) {
20
+ return `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
21
+ }
22
+ function initials(text) {
23
+ return text.split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("");
24
+ }
25
+ function AuditLog({ preset = "full", events, group, showTarget, showIp, empty, className, ...props }) {
26
+ const t = useDsMessages();
27
+ const locale = useDsLocale();
28
+ const p = PRESETS[preset];
29
+ const grouped = group ?? p.group;
30
+ const target = showTarget ?? p.showTarget;
31
+ const ip = showIp ?? p.showIp;
32
+ const sorted = [...events].sort((a, b) => new Date(b.at).getTime() - new Date(a.at).getTime());
33
+ const now = /* @__PURE__ */ new Date();
34
+ const yesterday = new Date(now);
35
+ yesterday.setDate(now.getDate() - 1);
36
+ const dayLabel = (d) => {
37
+ const k = dayKey(d);
38
+ if (k === dayKey(now)) return t.auditToday;
39
+ if (k === dayKey(yesterday)) return t.auditYesterday;
40
+ return new Intl.DateTimeFormat(locale, { weekday: "long", day: "numeric", month: "long", year: d.getFullYear() === now.getFullYear() ? void 0 : "numeric" }).format(d);
41
+ };
42
+ const groups = [];
43
+ for (const e of sorted) {
44
+ const d = new Date(e.at);
45
+ const key = grouped ? dayKey(d) : "all";
46
+ let g = groups[groups.length - 1];
47
+ if (!g || g.key !== key) {
48
+ g = { key, label: grouped ? dayLabel(d) : null, items: [] };
49
+ groups.push(g);
50
+ }
51
+ g.items.push(e);
52
+ }
53
+ const event = (e) => {
54
+ const actor = e.actor == null ? null : typeof e.actor === "string" ? { name: e.actor } : e.actor;
55
+ const tone = e.tone ?? "neutral";
56
+ const sentence = /* @__PURE__ */ jsxs("p", { className: cn("min-w-0 text-sm text-pretty text-muted-foreground", preset === "compact" && "truncate"), children: [
57
+ /* @__PURE__ */ jsx("span", { className: "font-(--ds-medium-weight) text-foreground", children: actor?.name ?? t.auditSystem }),
58
+ " ",
59
+ e.action,
60
+ target && e.target != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
61
+ " ",
62
+ /* @__PURE__ */ jsx("span", { className: "font-(--ds-medium-weight) text-foreground", children: e.target })
63
+ ] }) : null
64
+ ] });
65
+ const time = p.absolute ? /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap gap-x-2 text-xs text-muted-foreground", children: [
66
+ /* @__PURE__ */ jsx(DateTime, { value: e.at, style: "time" }),
67
+ /* @__PURE__ */ jsx(RelativeTime, { value: e.at }),
68
+ ip && e.ip ? /* @__PURE__ */ jsx("span", { className: "font-mono", children: e.ip }) : null
69
+ ] }) : /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: /* @__PURE__ */ jsx(RelativeTime, { value: e.at }) });
70
+ if (p.timeline) {
71
+ return /* @__PURE__ */ jsxs("li", { "data-slot": "audit-log-event", "data-tone": tone, className: "relative flex gap-3 pb-4 last:pb-0", children: [
72
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "relative flex w-(--ds-audit-dot) shrink-0 justify-center", children: [
73
+ /* @__PURE__ */ jsx("span", { className: cn("mt-1.5 size-(--ds-audit-dot) rounded-full", DOT_TONE[tone]) }),
74
+ /* @__PURE__ */ jsx("span", { className: "absolute top-(--ds-audit-dot) bottom-0 mt-2.5 w-px bg-border in-[li:last-child]:hidden" })
75
+ ] }),
76
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
77
+ sentence,
78
+ e.detail != null ? /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: e.detail }) : null,
79
+ time
80
+ ] })
81
+ ] }, e.id);
82
+ }
83
+ return /* @__PURE__ */ jsxs("li", { "data-slot": "audit-log-event", "data-tone": tone, className: cn("flex min-w-0 gap-3", preset === "compact" ? "items-center py-1.5" : "items-start py-2.5"), children: [
84
+ p.showAvatar ? /* @__PURE__ */ jsxs(Avatar, { size: "sm", className: "size-(--ds-audit-actor)", children: [
85
+ actor?.avatar ? /* @__PURE__ */ jsx(AvatarImage, { src: actor.avatar, alt: "" }) : null,
86
+ /* @__PURE__ */ jsx(AvatarFallback, { children: initials(actor?.name ?? t.auditSystem) })
87
+ ] }) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("size-(--ds-audit-dot) shrink-0 rounded-full", DOT_TONE[tone]) }),
88
+ /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-1", preset === "compact" ? "items-center gap-3" : "flex-col gap-0.5"), children: [
89
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: sentence }),
90
+ e.detail != null && preset !== "compact" ? /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: e.detail }) : null,
91
+ time
92
+ ] })
93
+ ] }, e.id);
94
+ };
95
+ return /* @__PURE__ */ jsx("div", { "data-slot": "audit-log", "data-preset": preset, className: cn("flex min-w-0 flex-col gap-4", className), ...props, children: sorted.length === 0 ? empty : groups.map((g) => /* @__PURE__ */ jsxs("section", { "data-slot": "audit-log-day", className: "flex min-w-0 flex-col gap-1", children: [
96
+ g.label != null ? /* @__PURE__ */ jsx("h3", { className: "text-xs font-(--ds-medium-weight) text-muted-foreground first-letter:uppercase", children: g.label }) : null,
97
+ /* @__PURE__ */ jsx("ol", { className: cn("flex flex-col", preset !== "entity" && "divide-y divide-border"), children: g.items.map(event) })
98
+ ] }, g.key)) });
99
+ }
100
+ export {
101
+ AuditLog
102
+ };
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const bannerVariants: (props?: ({
6
- variant?: "info" | "success" | "warning" | "danger" | "default" | "brand" | null | undefined;
6
+ variant?: "info" | "warning" | "success" | "danger" | "default" | "brand" | null | undefined;
7
7
  } & class_variance_authority_types.ClassProp) | undefined) => string;
8
8
  declare function Banner({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bannerVariants>): React.JSX.Element;
9
9
  declare function BannerContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
7
  declare const bubbleVariants: (props?: ({
8
- variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "muted" | "tinted" | null | undefined;
8
+ variant?: "outline" | "default" | "ghost" | "secondary" | "destructive" | "muted" | "tinted" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
11
  align?: "start" | "end";
@@ -6,7 +6,7 @@ import { Separator } from './separator.js';
6
6
  import '@base-ui/react/separator';
7
7
 
8
8
  declare const buttonGroupVariants: (props?: ({
9
- orientation?: "horizontal" | "vertical" | null | undefined;
9
+ orientation?: "vertical" | "horizontal" | null | undefined;
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): React$1.JSX.Element;
12
12
  declare function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
@@ -4,8 +4,8 @@ import { useRender } from '@base-ui/react/use-render';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | "cta" | null | undefined;
8
- size?: "icon" | "default" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
7
+ variant?: "outline" | "default" | "ghost" | "secondary" | "link" | "destructive" | "cta" | null | undefined;
8
+ size?: "icon" | "default" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Button({ className, variant, size, render, nativeButton: _nativeButton, ...props }: useRender.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
11
11
  nativeButton?: boolean;
@@ -6,7 +6,6 @@ import { EChartsCoreOption } from 'echarts/core';
6
6
  * @group data
7
7
  * @summary Gráfico de ECharts dentro de una tarjeta con título, cargando, error, vacío y descarga resueltos: la forma por defecto de poner un gráfico en un panel o en un mosaico.
8
8
  * @see echart — solo el lienzo del gráfico, sin tarjeta ni estados, dentro de tu propia maqueta
9
- * @see chart — gráficos Recharts heredados: solo compatibilidad, nunca para pantallas nuevas
10
9
  * @see stat — una cifra clave con su tendencia mínima (Sparkline), no un gráfico completo
11
10
  * @example Preset standard con un option de echarts-presets (sin colores)
12
11
  * <ChartCard
@@ -26,7 +26,7 @@ function ContextMenuContent({
26
26
  className,
27
27
  align = "start",
28
28
  alignOffset = 4,
29
- side = "right",
29
+ side = "inline-end",
30
30
  sideOffset = 0,
31
31
  ...props
32
32
  }) {
@@ -124,7 +124,7 @@ function ContextMenuSubContent({
124
124
  {
125
125
  "data-slot": "context-menu-sub-content",
126
126
  className: "shadow-popover",
127
- side: "right",
127
+ side: "inline-end",
128
128
  ...props
129
129
  }
130
130
  );
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { AuthBackdropVariant } from './auth-backdrop.js';
3
+
4
+ /**
5
+ * @group content
6
+ * @summary Llamada final a la acción de una web pública: bloque con superficie propia, título, una frase y uno o dos botones, al pie de la portada.
7
+ * @see hero — la portada de arriba del todo
8
+ * @see banner — aviso de sistema que afecta a toda la página, no una invitación
9
+ * @see next-step-card — siguiente paso de un servicio DENTRO de la app
10
+ * @example Al pie de la portada
11
+ * <CtaBanner title="Empieza hoy, gratis" description="Sin tarjeta y en cinco minutos." actions={<Button size="lg">Crear cuenta</Button>} />
12
+ * @example En línea, con fondo
13
+ * <CtaBanner layout="inline" backdrop="mesh" title="¿Hablamos?" description="Te enseñamos una demo con tus datos." actions={<Button>Pedir demo</Button>} />
14
+ */
15
+
16
+ type CtaBannerProps = Omit<React.ComponentProps<"section">, "title"> & {
17
+ title: React.ReactNode;
18
+ description?: React.ReactNode;
19
+ /** Una acción principal y, como mucho, una secundaria. */
20
+ actions?: React.ReactNode;
21
+ layout?: "centered" | "inline";
22
+ backdrop?: AuthBackdropVariant;
23
+ /** backdrop="image": la foto o el vídeo de fondo (con alt=""). */
24
+ backdropMedia?: React.ReactNode;
25
+ backdropGlass?: boolean;
26
+ titleAs?: "h2" | "h3";
27
+ };
28
+ declare function CtaBanner({ title, description, actions, layout, backdrop, backdropMedia, backdropGlass, titleAs: Title, className, children, ...props }: CtaBannerProps): React.JSX.Element;
29
+
30
+ export { CtaBanner, type CtaBannerProps };
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { AuthBackdrop } from "./auth-backdrop.js";
5
+ function CtaBanner({
6
+ title,
7
+ description,
8
+ actions,
9
+ layout = "centered",
10
+ backdrop = "none",
11
+ backdropMedia,
12
+ backdropGlass = false,
13
+ titleAs: Title = "h2",
14
+ className,
15
+ children,
16
+ ...props
17
+ }) {
18
+ const withFx = backdrop !== "none" || backdropGlass;
19
+ const inline = layout === "inline";
20
+ return /* @__PURE__ */ jsxs(
21
+ "section",
22
+ {
23
+ "data-slot": "cta-banner",
24
+ "data-layout": layout,
25
+ "data-backdrop": withFx ? backdrop : void 0,
26
+ className: cn(
27
+ "@container/cta relative isolate w-full overflow-hidden rounded-(--ds-cta-radius) bg-(--ds-cta-bg) p-(--ds-cta-p) text-(--ds-cta-fg) @3xl/cta:p-(--ds-cta-p-wide)",
28
+ className
29
+ ),
30
+ ...props,
31
+ children: [
32
+ withFx ? /* @__PURE__ */ jsx(AuthBackdrop, { variant: backdrop, media: backdropMedia, glass: backdropGlass, className: "-z-10" }) : null,
33
+ /* @__PURE__ */ jsxs(
34
+ "div",
35
+ {
36
+ className: cn(
37
+ "relative flex flex-col gap-(--ds-hero-content-gap)",
38
+ inline ? "items-start text-start @3xl/cta:flex-row @3xl/cta:items-center @3xl/cta:justify-between" : "items-center text-center"
39
+ ),
40
+ children: [
41
+ /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-col gap-(--ds-landing-header-gap)", !inline && "max-w-(--ds-landing-measure) items-center"), children: [
42
+ /* @__PURE__ */ jsx(
43
+ Title,
44
+ {
45
+ "data-slot": "cta-banner-title",
46
+ className: "text-(length:--ds-landing-title-size) leading-(--ds-hero-title-leading) font-(--ds-heading-weight) tracking-(--ds-heading-tracking) text-balance",
47
+ children: title
48
+ }
49
+ ),
50
+ description != null ? /* @__PURE__ */ jsx("p", { "data-slot": "cta-banner-description", className: "text-(length:--ds-hero-description-size) text-pretty text-(--ds-cta-description-fg)", children: description }) : null
51
+ ] }),
52
+ actions != null ? /* @__PURE__ */ jsx("div", { "data-slot": "cta-banner-actions", className: cn("flex shrink-0 flex-wrap items-center gap-3", !inline && "justify-center"), children: actions }) : null
53
+ ]
54
+ }
55
+ ),
56
+ children
57
+ ]
58
+ }
59
+ );
60
+ }
61
+ export {
62
+ CtaBanner
63
+ };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { DsInlineSide } from '../lib/i18n.js';
2
3
 
3
4
  /**
4
5
  * @group overlays
@@ -27,7 +28,8 @@ declare function DetailPanel({ open, onOpenChange, preset, side, title, descript
27
28
  open?: boolean;
28
29
  onOpenChange?: (open: boolean) => void;
29
30
  preset?: DetailPanelPreset;
30
- side?: "top" | "right" | "bottom" | "left";
31
+ /** Borde: `start`/`end` siguen la lectura (por defecto `end`, que en RTL es la izquierda); `left`/`right` son físicos. */
32
+ side?: "top" | "bottom" | DsInlineSide;
31
33
  title: React.ReactNode;
32
34
  description?: React.ReactNode;
33
35
  footer?: React.ReactNode;
@@ -9,9 +9,9 @@ import {
9
9
  SheetTitle
10
10
  } from "./sheet.js";
11
11
  const SIDE = {
12
- side: "right",
12
+ side: "end",
13
13
  bottom: "bottom",
14
- full: "right"
14
+ full: "end"
15
15
  };
16
16
  const SIZE = {
17
17
  side: "",
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import { Accordion } from './accordion.js';
3
+ import '@base-ui/react/accordion';
4
+
5
+ /**
6
+ * @group content
7
+ * @summary Preguntas frecuentes de una web pública o de una ayuda: lista desplegable de pregunta y respuesta, con datos estructurados opcionales para buscadores.
8
+ * @see accordion — paneles desplegables de cualquier contenido (ajustes, detalles)
9
+ * @see landing-section — la sección con título que la envuelve en una portada
10
+ * @example Preguntas de una portada
11
+ * <Faq
12
+ * items={[
13
+ * { question: "¿Puedo cancelar cuando quiera?", answer: "Sí, desde Ajustes y sin permanencia." },
14
+ * { question: "¿Hay periodo de prueba?", answer: "14 días con todas las funciones." },
15
+ * ]}
16
+ * />
17
+ * @example Varias abiertas y con datos estructurados
18
+ * <Faq multiple structuredData defaultValue={["prueba"]} items={[{ value: "prueba", question: "¿Hay periodo de prueba?", answer: "14 días." }]} />
19
+ */
20
+
21
+ type FaqItem = {
22
+ question: React.ReactNode;
23
+ answer: React.ReactNode;
24
+ /** Identificador para abrirla con `defaultValue`/`value`; por defecto, su índice. */
25
+ value?: string;
26
+ };
27
+ type FaqProps = Omit<React.ComponentProps<typeof Accordion>, "children"> & {
28
+ items: FaqItem[];
29
+ /** JSON-LD FAQPage (schema.org) para que los buscadores muestren las preguntas. */
30
+ structuredData?: boolean;
31
+ };
32
+ declare function Faq({ items, structuredData, className, ...props }: FaqProps): React.JSX.Element;
33
+
34
+ export { Faq, type FaqItem, type FaqProps };
package/dist/ui/faq.js ADDED
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
5
+ function Faq({ items, structuredData = false, className, ...props }) {
6
+ const ld = structuredData ? items.filter((it) => typeof it.question === "string" && typeof it.answer === "string").map((it) => ({ "@type": "Question", name: it.question, acceptedAnswer: { "@type": "Answer", text: it.answer } })) : [];
7
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8
+ /* @__PURE__ */ jsx(Accordion, { "data-slot": "faq", className: cn("bg-card text-card-foreground", className), ...props, children: items.map((it, i) => /* @__PURE__ */ jsxs(AccordionItem, { value: it.value ?? String(i), children: [
9
+ /* @__PURE__ */ jsx(AccordionTrigger, { className: "text-base", children: it.question }),
10
+ /* @__PURE__ */ jsx(AccordionContent, { className: "text-pretty text-muted-foreground", children: it.answer })
11
+ ] }, it.value ?? i)) }),
12
+ ld.length > 0 ? /* @__PURE__ */ jsx(
13
+ "script",
14
+ {
15
+ type: "application/ld+json",
16
+ dangerouslySetInnerHTML: {
17
+ __html: JSON.stringify({ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: ld }).replace(/</g, "\\u003c")
18
+ }
19
+ }
20
+ ) : null
21
+ ] });
22
+ }
23
+ export {
24
+ Faq
25
+ };
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ import { IconTile } from './icon-tile.js';
3
+ import 'class-variance-authority/types';
4
+ import 'class-variance-authority';
5
+
6
+ /**
7
+ * @group content
8
+ * @summary Rejilla de características o ventajas de un producto (icono, título y una frase), para la sección «qué hace» de una web pública.
9
+ * @see content-card — tarjetas con imagen o enlace a otra página
10
+ * @see mosaic — rejilla bento de bloques de distinto tamaño
11
+ * @example Tres ventajas
12
+ * <FeatureGrid>
13
+ * <Feature icon={<ZapIcon />} title="Rápido" description="Respuestas en milisegundos." />
14
+ * <Feature icon={<ShieldIcon />} title="Seguro" description="Cifrado de extremo a extremo." />
15
+ * <Feature icon={<PlugIcon />} title="Conectado" description="Más de 50 integraciones." />
16
+ * </FeatureGrid>
17
+ * @example En tarjetas, a cuatro columnas
18
+ * <FeatureGrid columns={4} variant="card">
19
+ * <Feature icon={<ZapIcon />} title="Rápido" description="Respuestas en milisegundos." />
20
+ * </FeatureGrid>
21
+ */
22
+
23
+ type FeatureGridProps = React.ComponentProps<"ul"> & {
24
+ /** Columnas en un contenedor ancho. */
25
+ columns?: 2 | 3 | 4;
26
+ variant?: "plain" | "card";
27
+ align?: "start" | "center";
28
+ };
29
+ declare function FeatureGrid({ columns, variant, align, className, ...props }: FeatureGridProps): React.JSX.Element;
30
+ type FeatureProps = Omit<React.ComponentProps<"li">, "title"> & {
31
+ /** Icono (svg) en una baldosa. */
32
+ icon?: React.ReactNode;
33
+ iconTone?: React.ComponentProps<typeof IconTile>["tone"];
34
+ /** Nombre de la característica. No es el atributo HTML `title`. */
35
+ title: React.ReactNode;
36
+ description?: React.ReactNode;
37
+ };
38
+ declare function Feature({ icon, iconTone, title, description, className, children, ...props }: FeatureProps): React.JSX.Element;
39
+
40
+ export { Feature, FeatureGrid, type FeatureGridProps, type FeatureProps };
@@ -0,0 +1,40 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ import { IconTile } from "./icon-tile.js";
4
+ const COLS = { 2: "@4xl/features:grid-cols-2", 3: "@4xl/features:grid-cols-3", 4: "@4xl/features:grid-cols-4" };
5
+ function FeatureGrid({ columns = 3, variant = "plain", align = "start", className, ...props }) {
6
+ return /* @__PURE__ */ jsx("div", { className: "@container/features w-full", children: /* @__PURE__ */ jsx(
7
+ "ul",
8
+ {
9
+ "data-slot": "feature-grid",
10
+ "data-variant": variant,
11
+ "data-align": align,
12
+ className: cn("group/features grid grid-cols-1 gap-(--ds-landing-grid-gap) @xl/features:grid-cols-2", COLS[columns], className),
13
+ ...props
14
+ }
15
+ ) });
16
+ }
17
+ function Feature({ icon, iconTone = "primary", title, description, className, children, ...props }) {
18
+ return /* @__PURE__ */ jsxs(
19
+ "li",
20
+ {
21
+ "data-slot": "feature",
22
+ className: cn(
23
+ "flex min-w-0 flex-col gap-(--ds-feature-gap) group-data-[align=center]/features:items-center group-data-[align=center]/features:text-center",
24
+ "group-data-[variant=card]/features:rounded-card group-data-[variant=card]/features:border group-data-[variant=card]/features:bg-card group-data-[variant=card]/features:p-(--ds-card-spacing) group-data-[variant=card]/features:text-card-foreground group-data-[variant=card]/features:shadow-card",
25
+ className
26
+ ),
27
+ ...props,
28
+ children: [
29
+ icon != null ? /* @__PURE__ */ jsx(IconTile, { "data-slot": "feature-icon", tone: iconTone, children: icon }) : null,
30
+ /* @__PURE__ */ jsx("h3", { "data-slot": "feature-title", className: "font-(--ds-heading-weight) text-base", children: title }),
31
+ description != null ? /* @__PURE__ */ jsx("p", { "data-slot": "feature-description", className: "text-sm text-pretty text-muted-foreground", children: description }) : null,
32
+ children
33
+ ]
34
+ }
35
+ );
36
+ }
37
+ export {
38
+ Feature,
39
+ FeatureGrid
40
+ };
@@ -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?: "horizontal" | "vertical" | "responsive" | null | undefined;
12
+ orientation?: "vertical" | "horizontal" | "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;
@@ -10,7 +10,7 @@ declare const inputGroupAddonVariants: (props?: ({
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
12
12
  declare const inputGroupButtonVariants: (props?: ({
13
- size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
13
+ size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
16
16
  type?: "button" | "submit" | "reset";