orbital-ds 0.40.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.
Files changed (197) hide show
  1. package/AGENTS.md +29 -10
  2. package/components.manifest.json +6469 -3349
  3. package/dist/auth-form-B1hgbXkI.d.ts +144 -0
  4. package/dist/hooks/use-ds-messages.d.ts +89 -0
  5. package/dist/lib/a2ui-catalog.d.ts +42 -0
  6. package/dist/lib/a2ui-catalog.js +558 -0
  7. package/dist/lib/a2ui.d.ts +289 -0
  8. package/dist/lib/a2ui.js +215 -0
  9. package/dist/lib/ai-events.d.ts +15 -0
  10. package/dist/lib/ai-events.js +202 -0
  11. package/dist/lib/auth-flow.d.ts +3 -1
  12. package/dist/lib/auth-flow.js +24 -3
  13. package/dist/lib/format.d.ts +57 -0
  14. package/dist/lib/format.js +177 -0
  15. package/dist/lib/i18n.d.ts +96 -2
  16. package/dist/lib/i18n.js +278 -2
  17. package/dist/lib/locales/de.d.ts +7 -0
  18. package/dist/lib/locales/de.js +535 -0
  19. package/dist/lib/locales/fr.d.ts +7 -0
  20. package/dist/lib/locales/fr.js +535 -0
  21. package/dist/lib/locales/he.d.ts +7 -0
  22. package/dist/lib/locales/he.js +535 -0
  23. package/dist/lib/locales/it.d.ts +7 -0
  24. package/dist/lib/locales/it.js +535 -0
  25. package/dist/styles.css +62 -2
  26. package/dist/ui/a2ui-renderer.d.ts +44 -0
  27. package/dist/ui/a2ui-renderer.js +793 -0
  28. package/dist/ui/agent-events.d.ts +49 -0
  29. package/dist/ui/agent-events.js +108 -0
  30. package/dist/ui/ai-tag.d.ts +16 -0
  31. package/dist/ui/alert-dialog.d.ts +37 -0
  32. package/dist/ui/alert.d.ts +1 -1
  33. package/dist/ui/animated-number.d.ts +11 -0
  34. package/dist/ui/app-bar.d.ts +22 -0
  35. package/dist/ui/attachment.d.ts +1 -1
  36. package/dist/ui/auth-backdrop.d.ts +17 -0
  37. package/dist/ui/auth-form.d.ts +3 -110
  38. package/dist/ui/auth-form.js +46 -11
  39. package/dist/ui/auth-layout.d.ts +38 -0
  40. package/dist/ui/avatar.d.ts +27 -0
  41. package/dist/ui/ayuda.d.ts +1 -1
  42. package/dist/ui/ayuda.js +4 -1
  43. package/dist/ui/badge.d.ts +1 -1
  44. package/dist/ui/banner.d.ts +1 -1
  45. package/dist/ui/bottom-nav.d.ts +22 -0
  46. package/dist/ui/breadcrumb.d.ts +22 -0
  47. package/dist/ui/breadcrumb.js +1 -1
  48. package/dist/ui/bubble.d.ts +1 -1
  49. package/dist/ui/button.d.ts +2 -2
  50. package/dist/ui/calendar.d.ts +13 -0
  51. package/dist/ui/calendar.js +3 -0
  52. package/dist/ui/card-stack.d.ts +27 -0
  53. package/dist/ui/card.d.ts +33 -0
  54. package/dist/ui/carousel.d.ts +35 -0
  55. package/dist/ui/carousel.js +10 -5
  56. package/dist/ui/chain-of-thought.d.ts +34 -0
  57. package/dist/ui/chain-of-thought.js +90 -0
  58. package/dist/ui/chart-card.d.ts +19 -0
  59. package/dist/ui/chart.d.ts +19 -0
  60. package/dist/ui/chat-composer.d.ts +58 -0
  61. package/dist/ui/chat-composer.js +192 -0
  62. package/dist/ui/choice-card.d.ts +33 -0
  63. package/dist/ui/code-block.d.ts +15 -0
  64. package/dist/ui/combobox.d.ts +48 -0
  65. package/dist/ui/command-palette.d.ts +18 -0
  66. package/dist/ui/command.d.ts +34 -0
  67. package/dist/ui/confirm-action.d.ts +30 -0
  68. package/dist/ui/confirm-dialog.d.ts +23 -0
  69. package/dist/ui/content-card.d.ts +14 -0
  70. package/dist/ui/context-menu.d.ts +35 -0
  71. package/dist/ui/context-menu.js +1 -1
  72. package/dist/ui/conversation-list.d.ts +44 -0
  73. package/dist/ui/conversation-list.js +141 -0
  74. package/dist/ui/copy-button.d.ts +11 -0
  75. package/dist/ui/date-time.d.ts +40 -0
  76. package/dist/ui/date-time.js +55 -0
  77. package/dist/ui/description-list.d.ts +49 -0
  78. package/dist/ui/description-list.js +86 -0
  79. package/dist/ui/detail-panel.d.ts +22 -0
  80. package/dist/ui/dialog.d.ts +35 -0
  81. package/dist/ui/dock.d.ts +17 -0
  82. package/dist/ui/drawer.d.ts +41 -0
  83. package/dist/ui/dropdown-menu.d.ts +32 -0
  84. package/dist/ui/dropdown-menu.js +1 -1
  85. package/dist/ui/echart.d.ts +15 -0
  86. package/dist/ui/empty.d.ts +1 -1
  87. package/dist/ui/entity-list.d.ts +32 -0
  88. package/dist/ui/form-layout.d.ts +24 -0
  89. package/dist/ui/gauge.d.ts +26 -0
  90. package/dist/ui/generated-image.d.ts +33 -0
  91. package/dist/ui/generated-image.js +65 -0
  92. package/dist/ui/generated-table.d.ts +29 -0
  93. package/dist/ui/generated-table.js +59 -0
  94. package/dist/ui/heatmap-grid.d.ts +20 -0
  95. package/dist/ui/hero.d.ts +58 -0
  96. package/dist/ui/hero.js +145 -0
  97. package/dist/ui/i18n-provider.d.ts +16 -0
  98. package/dist/ui/icon-tile.d.ts +2 -2
  99. package/dist/ui/input-group.d.ts +1 -1
  100. package/dist/ui/input-otp.d.ts +23 -0
  101. package/dist/ui/input.d.ts +16 -0
  102. package/dist/ui/instruction-editor.d.ts +17 -0
  103. package/dist/ui/item.d.ts +3 -3
  104. package/dist/ui/label.d.ts +17 -0
  105. package/dist/ui/legend.d.ts +25 -0
  106. package/dist/ui/level-meter.d.ts +12 -0
  107. package/dist/ui/load-more.d.ts +17 -0
  108. package/dist/ui/loading-state.d.ts +12 -0
  109. package/dist/ui/markdown.d.ts +29 -0
  110. package/dist/ui/markdown.js +123 -0
  111. package/dist/ui/media-card.d.ts +16 -0
  112. package/dist/ui/menubar.d.ts +39 -0
  113. package/dist/ui/message-actions.d.ts +21 -0
  114. package/dist/ui/message-actions.js +79 -0
  115. package/dist/ui/message-scroller.d.ts +30 -0
  116. package/dist/ui/message.d.ts +33 -0
  117. package/dist/ui/mfa-challenge.d.ts +3 -32
  118. package/dist/ui/mfa-challenge.js +1 -1
  119. package/dist/ui/mfa-setup.d.ts +1 -1
  120. package/dist/ui/mosaic.d.ts +23 -0
  121. package/dist/ui/motion-provider.d.ts +17 -0
  122. package/dist/ui/native-select.d.ts +22 -0
  123. package/dist/ui/next-step-card.d.ts +55 -0
  124. package/dist/ui/next-step-card.js +92 -0
  125. package/dist/ui/notice-review.d.ts +32 -0
  126. package/dist/ui/oauth-consent.d.ts +1 -1
  127. package/dist/ui/page-header.d.ts +46 -4
  128. package/dist/ui/page-header.js +20 -11
  129. package/dist/ui/page-loader.d.ts +17 -0
  130. package/dist/ui/page-shell.d.ts +17 -0
  131. package/dist/ui/pagination.d.ts +20 -0
  132. package/dist/ui/pagination.js +2 -2
  133. package/dist/ui/panel.d.ts +1 -1
  134. package/dist/ui/password-strength.d.ts +14 -0
  135. package/dist/ui/popover.d.ts +32 -0
  136. package/dist/ui/proportion-bar.d.ts +25 -0
  137. package/dist/ui/quantity.d.ts +25 -0
  138. package/dist/ui/quantity.js +27 -0
  139. package/dist/ui/questionnaire.d.ts +38 -0
  140. package/dist/ui/reasoning.d.ts +24 -0
  141. package/dist/ui/reasoning.js +62 -0
  142. package/dist/ui/reveal.d.ts +17 -0
  143. package/dist/ui/sheet.d.ts +39 -2
  144. package/dist/ui/sheet.js +6 -2
  145. package/dist/ui/shield.d.ts +14 -0
  146. package/dist/ui/show-more.d.ts +14 -0
  147. package/dist/ui/sidebar.d.ts +4 -2
  148. package/dist/ui/sidebar.js +7 -3
  149. package/dist/ui/sparkline.d.ts +1 -1
  150. package/dist/ui/stat-group.d.ts +32 -0
  151. package/dist/ui/stat.d.ts +1 -1
  152. package/dist/ui/status-badge.d.ts +3 -3
  153. package/dist/ui/status-hero.d.ts +18 -0
  154. package/dist/ui/step-dots.d.ts +12 -0
  155. package/dist/ui/step-ring.d.ts +14 -0
  156. package/dist/ui/suggestions.d.ts +17 -0
  157. package/dist/ui/suggestions.js +39 -0
  158. package/dist/ui/table.d.ts +26 -0
  159. package/dist/ui/tag-input.d.ts +21 -0
  160. package/dist/ui/tag-input.js +169 -0
  161. package/dist/ui/task-loader.d.ts +15 -0
  162. package/dist/ui/task-progress.d.ts +14 -0
  163. package/dist/ui/textarea.d.ts +22 -1
  164. package/dist/ui/textarea.js +7 -1
  165. package/dist/ui/timeline.d.ts +26 -0
  166. package/dist/ui/toggle-group.d.ts +24 -0
  167. package/dist/ui/tool-call.d.ts +27 -0
  168. package/dist/ui/tool-call.js +74 -0
  169. package/dist/ui/usage-meter.d.ts +42 -0
  170. package/dist/ui/usage-meter.js +116 -0
  171. package/dist/ui/week-strip.d.ts +11 -0
  172. package/dist/ui/week-strip.js +2 -2
  173. package/dist/ui/workflow-run.d.ts +51 -0
  174. package/dist/ui/workflow-run.js +185 -0
  175. package/docs/adr/0001-rtl-clases-logicas.md +14 -1
  176. package/docs/designer/criterio.md +87 -87
  177. package/docs/designer/flujo.md +1 -1
  178. package/docs/designer/patrones.md +43 -2
  179. package/manifest/actions.json +364 -0
  180. package/manifest/agents.json +399 -0
  181. package/manifest/ai.json +128 -0
  182. package/manifest/auth.json +1547 -0
  183. package/manifest/chat.json +612 -0
  184. package/manifest/content.json +2298 -0
  185. package/manifest/data.json +2904 -0
  186. package/manifest/feedback.json +1005 -0
  187. package/manifest/forms.json +1954 -0
  188. package/manifest/motion.json +196 -0
  189. package/manifest/navigation.json +1792 -0
  190. package/manifest/overlays.json +931 -0
  191. package/package.json +35 -21
  192. package/scripts/cli.mjs +105 -8
  193. package/scripts/doctor.mjs +126 -1
  194. package/scripts/eslint-plugin.mjs +93 -0
  195. package/scripts/i18n.mjs +1 -1
  196. package/scripts/manifest.mjs +159 -7
  197. package/skill/SKILL.md +8 -3
@@ -0,0 +1,141 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { MoreHorizontalIcon, PinIcon, PlusIcon, SearchIcon } from "lucide-react";
5
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
6
+ import { dsFormat } from "../lib/i18n.js";
7
+ import { cn } from "../lib/utils.js";
8
+ import { Button } from "./button.js";
9
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
10
+ import { Input } from "./input.js";
11
+ const day = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
12
+ function bucket(c, now) {
13
+ if (c.pinned) return "pinned";
14
+ const diff = Math.round((day(now) - day(new Date(c.updatedAt))) / 864e5);
15
+ if (diff <= 0) return "today";
16
+ if (diff === 1) return "yesterday";
17
+ if (diff <= 7) return "week";
18
+ return "older";
19
+ }
20
+ function ConversationList({
21
+ items,
22
+ activeId,
23
+ onSelect,
24
+ onNew,
25
+ onRename,
26
+ onDelete,
27
+ onPin,
28
+ now,
29
+ searchable = true,
30
+ className,
31
+ ...props
32
+ }) {
33
+ const t = useDsMessages();
34
+ const [query, setQuery] = React.useState("");
35
+ const ref = now ?? /* @__PURE__ */ new Date();
36
+ const q = query.trim().toLowerCase();
37
+ const shown = items.filter((c) => !q || c.title.toLowerCase().includes(q)).sort((a, b) => +new Date(b.updatedAt) - +new Date(a.updatedAt));
38
+ const order = ["pinned", "today", "yesterday", "week", "older"];
39
+ const names = {
40
+ pinned: t.conversationPinned,
41
+ today: t.conversationToday,
42
+ yesterday: t.conversationYesterday,
43
+ week: t.conversationWeek,
44
+ older: t.conversationOlder
45
+ };
46
+ const hasMenu = Boolean(onPin || onRename || onDelete);
47
+ return /* @__PURE__ */ jsxs(
48
+ "div",
49
+ {
50
+ "data-slot": "conversation-list",
51
+ className: cn("flex min-h-0 w-full flex-col gap-3", className),
52
+ ...props,
53
+ children: [
54
+ onNew ? /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onNew, children: [
55
+ /* @__PURE__ */ jsx(PlusIcon, { "data-icon": "inline-start" }),
56
+ t.conversationNew
57
+ ] }) : null,
58
+ searchable ? /* @__PURE__ */ jsxs("div", { className: "relative", children: [
59
+ /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true, className: "pointer-events-none absolute start-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
60
+ /* @__PURE__ */ jsx(
61
+ Input,
62
+ {
63
+ type: "search",
64
+ value: query,
65
+ onChange: (e) => setQuery(e.target.value),
66
+ placeholder: t.conversationSearch,
67
+ "aria-label": t.conversationSearch,
68
+ className: "ps-8"
69
+ }
70
+ )
71
+ ] }) : null,
72
+ /* @__PURE__ */ jsx("nav", { "aria-label": t.conversationListLabel, className: "min-h-0 flex-1 overflow-y-auto", children: shown.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: q ? dsFormat(t.searchNoResults, { query }) : t.conversationEmpty }) : order.map((b) => {
73
+ const group = shown.filter((c) => bucket(c, ref) === b);
74
+ if (!group.length) return null;
75
+ return /* @__PURE__ */ jsxs("section", { "aria-label": names[b], className: "mb-3 last:mb-0", children: [
76
+ /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-1 px-2 pb-1 text-xs font-(--ds-medium-weight) text-muted-foreground", children: [
77
+ b === "pinned" ? /* @__PURE__ */ jsx(PinIcon, { "aria-hidden": true, className: "size-3" }) : null,
78
+ names[b]
79
+ ] }),
80
+ /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-0.5", children: group.map((c) => {
81
+ const active = c.id === activeId;
82
+ return /* @__PURE__ */ jsxs(
83
+ "li",
84
+ {
85
+ "data-slot": "conversation-item",
86
+ "data-active": active || void 0,
87
+ "data-busy": c.busy || void 0,
88
+ className: cn(
89
+ "group/conv relative flex items-center rounded-control hover:bg-(--ds-hover-bg)",
90
+ active && "bg-(--ds-active-bg)"
91
+ ),
92
+ children: [
93
+ /* @__PURE__ */ jsxs(
94
+ "button",
95
+ {
96
+ type: "button",
97
+ "aria-current": active ? "page" : void 0,
98
+ onClick: () => onSelect?.(c.id),
99
+ className: "flex min-w-0 flex-1 items-center gap-2 rounded-control px-2 py-1.5 text-start text-sm outline-none focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
100
+ children: [
101
+ c.busy ? /* @__PURE__ */ jsx(
102
+ "span",
103
+ {
104
+ "aria-hidden": true,
105
+ className: "size-(--ds-status-dot) shrink-0 animate-ds-ring-inner rounded-full bg-info motion-reduce:animate-none"
106
+ }
107
+ ) : null,
108
+ /* @__PURE__ */ jsx("span", { className: cn("min-w-0 flex-1 truncate", active && "font-(--ds-medium-weight)"), children: c.title })
109
+ ]
110
+ }
111
+ ),
112
+ hasMenu ? /* @__PURE__ */ jsxs(DropdownMenu, { children: [
113
+ /* @__PURE__ */ jsx(
114
+ DropdownMenuTrigger,
115
+ {
116
+ render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs" }),
117
+ "aria-label": dsFormat(t.conversationActions, { name: c.title }),
118
+ className: "me-1 opacity-0 group-focus-within/conv:opacity-100 group-hover/conv:opacity-100 data-[popup-open]:opacity-100 max-md:opacity-100",
119
+ children: /* @__PURE__ */ jsx(MoreHorizontalIcon, {})
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
123
+ onPin ? /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => onPin(c.id, !c.pinned), children: c.pinned ? t.conversationUnpin : t.conversationPin }) : null,
124
+ onRename ? /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => onRename(c.id), children: t.conversationRename }) : null,
125
+ onDelete ? /* @__PURE__ */ jsx(DropdownMenuItem, { variant: "destructive", onClick: () => onDelete(c.id), children: t.conversationDelete }) : null
126
+ ] })
127
+ ] }) : null
128
+ ]
129
+ },
130
+ c.id
131
+ );
132
+ }) })
133
+ ] }, b);
134
+ }) })
135
+ ]
136
+ }
137
+ );
138
+ }
139
+ export {
140
+ ConversationList
141
+ };
@@ -4,6 +4,17 @@ import 'class-variance-authority/types';
4
4
  import '@base-ui/react/use-render';
5
5
  import 'class-variance-authority';
6
6
 
7
+ /**
8
+ * @group actions
9
+ * @summary Copia un valor al portapapeles y confirma «Copiado»: CopyButton (icono junto a un dato) o CopyField (el dato entero pulsable).
10
+ * @see code-block — mostrar código o comandos de varias líneas, con su propio copiar
11
+ * @see input-group — un campo editable con botones dentro
12
+ * @example Dato pulsable
13
+ * <CopyField value="168.245.96.234" />
14
+ * @example Solo el icono junto a un dato
15
+ * <CopyButton value={token} />
16
+ */
17
+
7
18
  declare function CopyButton({ value, className, onClick, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "value" | "children"> & {
8
19
  value: string;
9
20
  }): React.JSX.Element;
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ import { DsDateInput, DsDateStyle } from '../lib/format.js';
3
+
4
+ /**
5
+ * @group data
6
+ * @summary Fecha u hora en el idioma activo dentro de <time>; RelativeTime para lo reciente («hace 5 minutos»), que se refresca solo. Nunca formatees una fecha a mano.
7
+ * @see description-list — pares término–valor donde suelen ir las fechas de una cuenta o un plan
8
+ * @see timeline — historial de eventos, que ya trae su hora (TimelineTime)
9
+ * @see quantity — valores con unidad (duraciones como «30 días» de un plan, bytes, %)
10
+ * @example Fecha absoluta (alta, renovación)
11
+ * <DateTime value={account.createdAt} />
12
+ * <DateTime value={account.renewsAt} style="long" />
13
+ * @example Lo reciente, con la fecha exacta en el title
14
+ * <RelativeTime value={device.lastSeenAt} />
15
+ */
16
+
17
+ type BaseProps = Omit<React.ComponentProps<"time">, "children" | "dateTime"> & {
18
+ /** Date, ISO 8601 o milisegundos. */
19
+ value: DsDateInput;
20
+ };
21
+ type DateTimeProps = BaseProps & {
22
+ /** date (por defecto) · datetime · time · long · short. */
23
+ style?: DsDateStyle;
24
+ /** Formato concreto (gana a `style`). */
25
+ format?: Intl.DateTimeFormatOptions;
26
+ /** Zona horaria IANA; por defecto la del navegador. */
27
+ timeZone?: string;
28
+ };
29
+ declare function DateTime({ value, style, format, timeZone, className, ...props }: DateTimeProps): React.JSX.Element;
30
+ type RelativeTimeProps = BaseProps & {
31
+ /** "auto" (por defecto: «ayer») o "always" («hace 1 día»). */
32
+ numeric?: "auto" | "always";
33
+ /** Longitud: long (por defecto) · short · narrow. */
34
+ length?: "long" | "short" | "narrow";
35
+ /** Instante de referencia fijo (pruebas, SSR). Con él no se refresca. */
36
+ now?: DsDateInput;
37
+ };
38
+ declare function RelativeTime({ value, numeric, length, now, title, className, ...props }: RelativeTimeProps): React.JSX.Element;
39
+
40
+ export { DateTime, type DateTimeProps, RelativeTime, type RelativeTimeProps };
@@ -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;
@@ -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;
@@ -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;
@@ -222,7 +222,7 @@ function DropdownMenuSubTrigger({
222
222
  ...props,
223
223
  children: [
224
224
  children,
225
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto" })
225
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
226
226
  ]
227
227
  }
228
228
  );
@@ -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;
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
  declare function Empty({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
6
6
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
7
7
  declare const emptyMediaVariants: (props?: ({
8
- variant?: "default" | "icon" | null | undefined;
8
+ variant?: "icon" | "default" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): React$1.JSX.Element;
11
11
  declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
@@ -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[];