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.
Files changed (176) hide show
  1. package/AGENTS.md +28 -9
  2. package/components.manifest.json +6469 -3569
  3. package/dist/auth-form-B1hgbXkI.d.ts +144 -0
  4. package/dist/hooks/use-ds-messages.d.ts +7 -0
  5. package/dist/lib/format.d.ts +57 -0
  6. package/dist/lib/format.js +177 -0
  7. package/dist/lib/i18n.d.ts +14 -2
  8. package/dist/lib/i18n.js +32 -2
  9. package/dist/lib/locales/de.d.ts +7 -0
  10. package/dist/lib/locales/de.js +535 -0
  11. package/dist/lib/locales/fr.d.ts +7 -0
  12. package/dist/lib/locales/fr.js +535 -0
  13. package/dist/lib/locales/he.d.ts +7 -0
  14. package/dist/lib/locales/he.js +535 -0
  15. package/dist/lib/locales/it.d.ts +7 -0
  16. package/dist/lib/locales/it.js +535 -0
  17. package/dist/styles.css +39 -1
  18. package/dist/ui/a2ui-renderer.d.ts +11 -0
  19. package/dist/ui/agent-events.d.ts +17 -0
  20. package/dist/ui/ai-tag.d.ts +16 -0
  21. package/dist/ui/alert-dialog.d.ts +37 -0
  22. package/dist/ui/alert.d.ts +1 -1
  23. package/dist/ui/animated-number.d.ts +11 -0
  24. package/dist/ui/app-bar.d.ts +22 -0
  25. package/dist/ui/attachment.d.ts +3 -3
  26. package/dist/ui/auth-backdrop.d.ts +17 -0
  27. package/dist/ui/auth-form.d.ts +3 -112
  28. package/dist/ui/auth-form.js +13 -6
  29. package/dist/ui/auth-layout.d.ts +38 -0
  30. package/dist/ui/avatar.d.ts +27 -0
  31. package/dist/ui/ayuda.d.ts +1 -1
  32. package/dist/ui/ayuda.js +4 -1
  33. package/dist/ui/banner.d.ts +1 -1
  34. package/dist/ui/bottom-nav.d.ts +22 -0
  35. package/dist/ui/breadcrumb.d.ts +22 -0
  36. package/dist/ui/breadcrumb.js +1 -1
  37. package/dist/ui/bubble.d.ts +1 -1
  38. package/dist/ui/button-group.d.ts +1 -1
  39. package/dist/ui/button.d.ts +2 -2
  40. package/dist/ui/calendar.d.ts +13 -0
  41. package/dist/ui/calendar.js +3 -0
  42. package/dist/ui/card-stack.d.ts +27 -0
  43. package/dist/ui/card.d.ts +33 -0
  44. package/dist/ui/carousel.d.ts +35 -0
  45. package/dist/ui/carousel.js +10 -5
  46. package/dist/ui/chain-of-thought.d.ts +15 -0
  47. package/dist/ui/chart-card.d.ts +19 -0
  48. package/dist/ui/chart.d.ts +19 -0
  49. package/dist/ui/chat-composer.d.ts +19 -0
  50. package/dist/ui/choice-card.d.ts +33 -0
  51. package/dist/ui/code-block.d.ts +15 -0
  52. package/dist/ui/combobox.d.ts +48 -0
  53. package/dist/ui/command-palette.d.ts +18 -0
  54. package/dist/ui/command.d.ts +34 -0
  55. package/dist/ui/confirm-action.d.ts +30 -0
  56. package/dist/ui/confirm-dialog.d.ts +23 -0
  57. package/dist/ui/content-card.d.ts +14 -0
  58. package/dist/ui/context-menu.d.ts +35 -0
  59. package/dist/ui/context-menu.js +1 -1
  60. package/dist/ui/conversation-list.d.ts +20 -0
  61. package/dist/ui/copy-button.d.ts +11 -0
  62. package/dist/ui/date-time.d.ts +40 -0
  63. package/dist/ui/date-time.js +55 -0
  64. package/dist/ui/description-list.d.ts +49 -0
  65. package/dist/ui/description-list.js +86 -0
  66. package/dist/ui/detail-panel.d.ts +22 -0
  67. package/dist/ui/dialog.d.ts +35 -0
  68. package/dist/ui/dock.d.ts +17 -0
  69. package/dist/ui/drawer.d.ts +41 -0
  70. package/dist/ui/dropdown-menu.d.ts +32 -0
  71. package/dist/ui/dropdown-menu.js +1 -1
  72. package/dist/ui/echart.d.ts +15 -0
  73. package/dist/ui/entity-list.d.ts +32 -0
  74. package/dist/ui/field.d.ts +1 -1
  75. package/dist/ui/form-layout.d.ts +24 -0
  76. package/dist/ui/gauge.d.ts +26 -0
  77. package/dist/ui/generated-image.d.ts +19 -0
  78. package/dist/ui/generated-table.d.ts +18 -0
  79. package/dist/ui/heatmap-grid.d.ts +20 -0
  80. package/dist/ui/hero.d.ts +58 -0
  81. package/dist/ui/hero.js +145 -0
  82. package/dist/ui/i18n-provider.d.ts +16 -0
  83. package/dist/ui/input-group.d.ts +1 -1
  84. package/dist/ui/input-otp.d.ts +23 -0
  85. package/dist/ui/input.d.ts +16 -0
  86. package/dist/ui/instruction-editor.d.ts +17 -0
  87. package/dist/ui/item.d.ts +3 -3
  88. package/dist/ui/label.d.ts +17 -0
  89. package/dist/ui/legend.d.ts +25 -0
  90. package/dist/ui/level-meter.d.ts +12 -0
  91. package/dist/ui/load-more.d.ts +17 -0
  92. package/dist/ui/loading-state.d.ts +12 -0
  93. package/dist/ui/markdown.d.ts +15 -0
  94. package/dist/ui/marker.d.ts +1 -1
  95. package/dist/ui/media-card.d.ts +16 -0
  96. package/dist/ui/menubar.d.ts +39 -0
  97. package/dist/ui/message-actions.d.ts +9 -0
  98. package/dist/ui/message-scroller.d.ts +30 -0
  99. package/dist/ui/message.d.ts +33 -0
  100. package/dist/ui/mfa-challenge.d.ts +3 -32
  101. package/dist/ui/mfa-challenge.js +1 -1
  102. package/dist/ui/mfa-setup.d.ts +1 -1
  103. package/dist/ui/mosaic.d.ts +23 -0
  104. package/dist/ui/motion-provider.d.ts +17 -0
  105. package/dist/ui/native-select.d.ts +22 -0
  106. package/dist/ui/next-step-card.d.ts +55 -0
  107. package/dist/ui/next-step-card.js +92 -0
  108. package/dist/ui/notice-review.d.ts +32 -0
  109. package/dist/ui/oauth-consent.d.ts +1 -1
  110. package/dist/ui/page-header.d.ts +46 -4
  111. package/dist/ui/page-header.js +20 -11
  112. package/dist/ui/page-loader.d.ts +17 -0
  113. package/dist/ui/page-shell.d.ts +17 -0
  114. package/dist/ui/pagination.d.ts +20 -0
  115. package/dist/ui/pagination.js +2 -2
  116. package/dist/ui/panel.d.ts +2 -2
  117. package/dist/ui/password-strength.d.ts +14 -0
  118. package/dist/ui/popover.d.ts +32 -0
  119. package/dist/ui/proportion-bar.d.ts +25 -0
  120. package/dist/ui/quantity.d.ts +25 -0
  121. package/dist/ui/quantity.js +27 -0
  122. package/dist/ui/questionnaire.d.ts +38 -0
  123. package/dist/ui/reasoning.d.ts +14 -0
  124. package/dist/ui/reveal.d.ts +17 -0
  125. package/dist/ui/sheet.d.ts +39 -2
  126. package/dist/ui/sheet.js +6 -2
  127. package/dist/ui/shield.d.ts +14 -0
  128. package/dist/ui/show-more.d.ts +14 -0
  129. package/dist/ui/sidebar.d.ts +5 -3
  130. package/dist/ui/sidebar.js +7 -3
  131. package/dist/ui/sparkline.d.ts +1 -1
  132. package/dist/ui/stat-group.d.ts +32 -0
  133. package/dist/ui/status-badge.d.ts +2 -2
  134. package/dist/ui/status-hero.d.ts +18 -0
  135. package/dist/ui/step-dots.d.ts +12 -0
  136. package/dist/ui/step-ring.d.ts +14 -0
  137. package/dist/ui/suggestions.d.ts +9 -0
  138. package/dist/ui/table.d.ts +26 -0
  139. package/dist/ui/tabs.d.ts +1 -1
  140. package/dist/ui/tag-input.d.ts +21 -0
  141. package/dist/ui/tag-input.js +169 -0
  142. package/dist/ui/task-loader.d.ts +15 -0
  143. package/dist/ui/task-progress.d.ts +14 -0
  144. package/dist/ui/textarea.d.ts +22 -1
  145. package/dist/ui/textarea.js +7 -1
  146. package/dist/ui/timeline.d.ts +26 -0
  147. package/dist/ui/toggle-group.d.ts +24 -0
  148. package/dist/ui/toggle.d.ts +1 -1
  149. package/dist/ui/tool-call.d.ts +12 -0
  150. package/dist/ui/usage-meter.d.ts +42 -0
  151. package/dist/ui/usage-meter.js +116 -0
  152. package/dist/ui/week-strip.d.ts +11 -0
  153. package/dist/ui/week-strip.js +2 -2
  154. package/dist/ui/workflow-run.d.ts +28 -0
  155. package/docs/adr/0001-rtl-clases-logicas.md +14 -1
  156. package/docs/designer/flujo.md +1 -1
  157. package/docs/designer/patrones.md +40 -1
  158. package/manifest/actions.json +364 -0
  159. package/manifest/agents.json +399 -0
  160. package/manifest/ai.json +128 -0
  161. package/manifest/auth.json +1547 -0
  162. package/manifest/chat.json +612 -0
  163. package/manifest/content.json +2298 -0
  164. package/manifest/data.json +2904 -0
  165. package/manifest/feedback.json +1005 -0
  166. package/manifest/forms.json +1954 -0
  167. package/manifest/motion.json +196 -0
  168. package/manifest/navigation.json +1792 -0
  169. package/manifest/overlays.json +931 -0
  170. package/package.json +242 -238
  171. package/scripts/cli.mjs +105 -8
  172. package/scripts/doctor.mjs +126 -1
  173. package/scripts/eslint-plugin.mjs +93 -0
  174. package/scripts/i18n.mjs +1 -1
  175. package/scripts/manifest.mjs +159 -7
  176. package/skill/SKILL.md +8 -3
package/dist/ui/card.d.ts CHANGED
@@ -1,6 +1,39 @@
1
1
  import * as React from 'react';
2
2
  import { AuthBackdropVariant } from './auth-backdrop.js';
3
3
 
4
+ /**
5
+ * @group content
6
+ * @summary Superficie de tarjeta con anatomía libre (cabecera, título, descripción, acción, contenido y pie) para componer un bloque propio de una vista.
7
+ * @see content-card — tarjeta lista por intención (feature, media, metric, status, cover) sin montar piezas
8
+ * @see item — fila de una lista de entidades (variant="card"), no una tarjeta de bloque
9
+ * @see panel — superficie simple con relleno, sin cabecera ni pie
10
+ * @example Montaje mínimo
11
+ * <Card>
12
+ * <CardHeader>
13
+ * <CardTitle>Plan actual</CardTitle>
14
+ * <CardDescription>Se renueva el 1 de junio</CardDescription>
15
+ * <CardAction>
16
+ * <Button variant="outline" size="sm">Cambiar</Button>
17
+ * </CardAction>
18
+ * </CardHeader>
19
+ * <CardContent>
20
+ * <p>5 de 10 licencias en uso.</p>
21
+ * </CardContent>
22
+ * <CardFooter>
23
+ * <Button>Gestionar plan</Button>
24
+ * </CardFooter>
25
+ * </Card>
26
+ * @example Compacta y que se eleva al señalar
27
+ * <Card size="sm" hoverable>
28
+ * <CardHeader>
29
+ * <CardTitle>Integraciones</CardTitle>
30
+ * </CardHeader>
31
+ * <CardContent>
32
+ * <p>3 conectadas</p>
33
+ * </CardContent>
34
+ * </Card>
35
+ */
36
+
4
37
  declare function Card({ className, size, hoverable, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, children, onPointerMove, ...props }: React.ComponentProps<"div"> & {
5
38
  size?: "default" | "sm";
6
39
  /** Al pasar el ratón la tarjeta se eleva y marca el borde (--ds-card-hover-lift / -border). */
@@ -5,6 +5,41 @@ import 'class-variance-authority/types';
5
5
  import '@base-ui/react/use-render';
6
6
  import 'class-variance-authority';
7
7
 
8
+ /**
9
+ * @group content
10
+ * @summary Carrusel deslizable (Embla) para recorrer piezas del mismo nivel de una en una o varias por vista, con flechas, teclado y gesto.
11
+ * @see card-stack — baraja de pocas tarjetas que se atienden una a una
12
+ * @see scroll-area — fila con scroll horizontal libre, sin paginar
13
+ * @see mosaic — mostrar todas las tarjetas a la vez en una rejilla
14
+ * @example Una por vista con flechas
15
+ * <Carousel>
16
+ * <CarouselContent>
17
+ * <CarouselItem>
18
+ * <ContentCard title="Novedad 1" />
19
+ * </CarouselItem>
20
+ * <CarouselItem>
21
+ * <ContentCard title="Novedad 2" />
22
+ * </CarouselItem>
23
+ * </CarouselContent>
24
+ * <CarouselPrevious />
25
+ * <CarouselNext />
26
+ * </Carousel>
27
+ * @example Varias por vista y en bucle
28
+ * <Carousel opts={{ align: "start", loop: true }}>
29
+ * <CarouselContent>
30
+ * {courses.map((c) => (
31
+ * <CarouselItem key={c.id} className="basis-1/2 lg:basis-1/3">
32
+ * <MediaCard src={c.image} title={c.title} />
33
+ * </CarouselItem>
34
+ * ))}
35
+ * </CarouselContent>
36
+ * <CarouselPrevious />
37
+ * <CarouselNext />
38
+ * </Carousel>
39
+ * @note CarouselPrevious y CarouselNext se colocan fuera de los bordes: deja margen lateral al contenedor. Lo imprescindible no va en un carrusel: muchas personas solo ven la primera pieza.
40
+ * @note Para saber la pieza activa, `setApi` y escucha `select` en el api de Embla.
41
+ */
42
+
8
43
  type CarouselApi = UseEmblaCarouselType[1];
9
44
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
10
45
  type CarouselOptions = UseCarouselParameters[0];
@@ -6,6 +6,7 @@ import useEmblaCarousel from "embla-carousel-react";
6
6
  import { Button } from "./button.js";
7
7
  import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
8
8
  import { useDsMessages } from "../hooks/use-ds-messages.js";
9
+ import { useDirection } from "@base-ui/react/direction-provider";
9
10
  const CarouselContext = React.createContext(null);
10
11
  function useCarousel() {
11
12
  const context = React.useContext(CarouselContext);
@@ -24,8 +25,10 @@ function Carousel({
24
25
  ...props
25
26
  }) {
26
27
  const t = useDsMessages();
28
+ const direction = useDirection();
27
29
  const [carouselRef, api] = useEmblaCarousel(
28
30
  {
31
+ direction,
29
32
  ...opts,
30
33
  axis: orientation === "horizontal" ? "x" : "y"
31
34
  },
@@ -46,15 +49,17 @@ function Carousel({
46
49
  }, [api]);
47
50
  const handleKeyDown = React.useCallback(
48
51
  (event) => {
49
- if (event.key === "ArrowLeft") {
52
+ const back = direction === "rtl" ? "ArrowRight" : "ArrowLeft";
53
+ const forward = direction === "rtl" ? "ArrowLeft" : "ArrowRight";
54
+ if (event.key === back) {
50
55
  event.preventDefault();
51
56
  scrollPrev();
52
- } else if (event.key === "ArrowRight") {
57
+ } else if (event.key === forward) {
53
58
  event.preventDefault();
54
59
  scrollNext();
55
60
  }
56
61
  },
57
- [scrollPrev, scrollNext]
62
+ [scrollPrev, scrollNext, direction]
58
63
  );
59
64
  React.useEffect(() => {
60
65
  if (!api || !setApi) return;
@@ -161,7 +166,7 @@ function CarouselPrevious({
161
166
  onClick: scrollPrev,
162
167
  ...props,
163
168
  children: [
164
- /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
169
+ /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "rtl:rotate-180" }),
165
170
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.carouselPrevious })
166
171
  ]
167
172
  }
@@ -190,7 +195,7 @@ function CarouselNext({
190
195
  onClick: scrollNext,
191
196
  ...props,
192
197
  children: [
193
- /* @__PURE__ */ jsx(ChevronRightIcon, {}),
198
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "rtl:rotate-180" }),
194
199
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.carouselNext })
195
200
  ]
196
201
  }
@@ -1,5 +1,20 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group agents
5
+ * @summary Resumen plegable de los pasos que dio un agente para responder («Completado en 3 pasos»), cada uno con su estado y resultados; vista compacta dentro del mensaje.
6
+ * @see reasoning — el texto libre del pensamiento del modelo, sin pasos
7
+ * @see agent-events — la traza completa con tiempos, datos y traspasos
8
+ * @see workflow-run — la ejecución de un workflow definido (nodos, ramas, cancelar y reintentar)
9
+ * @example Pasos con resultados
10
+ * <ChainOfThought
11
+ * steps={[
12
+ * { id: "1", title: "Busca «tarifas 2026»", results: ["docs.acme.com"], status: "done" },
13
+ * { id: "2", title: "Compara los planes", status: "running" },
14
+ * ]}
15
+ * />
16
+ */
17
+
3
18
  type ChainStepStatus = "running" | "done" | "error" | "pending";
4
19
  interface ChainStep {
5
20
  id: string;
@@ -2,6 +2,25 @@ import * as React from 'react';
2
2
  import { EChartProps, EChartHandle } from './echart.js';
3
3
  import { EChartsCoreOption } from 'echarts/core';
4
4
 
5
+ /**
6
+ * @group data
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
+ * @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
+ * @see stat — una cifra clave con su tendencia mínima (Sparkline), no un gráfico completo
11
+ * @example Preset standard con un option de echarts-presets (sin colores)
12
+ * <ChartCard
13
+ * preset="standard"
14
+ * title="Llamadas"
15
+ * description="Última semana"
16
+ * option={lineOption({ categories: ["L", "M", "X", "J", "V"], series: [{ name: "Llamadas", data: [12, 18, 15, 24, 30] }] })}
17
+ * />
18
+ * @example Gráfico principal (focus) con sus estados
19
+ * <ChartCard preset="focus" title="Volumen de llamadas" option={option} loading={isLoading} error={error} onRetry={refetch} />
20
+ * @example Sin datos
21
+ * <ChartCard preset="glance" title="Tendencia" option={option} empty />
22
+ */
23
+
5
24
  type ChartCardPreset = "glance" | "standard" | "focus" | "dense";
6
25
  declare const ChartCard: React.ForwardRefExoticComponent<{
7
26
  option: EChartsCoreOption;
@@ -2,6 +2,25 @@ import * as React from 'react';
2
2
  import * as RechartsPrimitive from 'recharts';
3
3
  import { TooltipValueType } from 'recharts';
4
4
 
5
+ /**
6
+ * @group data
7
+ * @summary Contenedor de Recharts con la paleta del tema, tooltip y leyenda. SOLO por compatibilidad (sin funciones nuevas): para cualquier gráfico nuevo usa ChartCard o EChart.
8
+ * @see chart-card — gráfico nuevo en un panel: tarjeta con estados y descarga (ECharts)
9
+ * @see echart — gráfico nuevo dentro de tu propia maqueta (ECharts, colores del tema)
10
+ * @see sparkline — tendencia mínima junto a una cifra, sin librería de gráficos
11
+ * @example Código heredado con Recharts (series con variables del tema)
12
+ * <ChartContainer config={{ nuevos: { label: "Nuevos clientes", color: "var(--chart-1)" } }}>
13
+ * <BarChart accessibilityLayer data={data}>
14
+ * <XAxis dataKey="mes" tickLine={false} axisLine={false} />
15
+ * <ChartTooltip content={<ChartTooltipContent />} />
16
+ * <ChartLegend content={<ChartLegendContent />} />
17
+ * <Bar dataKey="nuevos" fill="var(--color-nuevos)" />
18
+ * </BarChart>
19
+ * </ChartContainer>
20
+ * @note Solo compatibilidad con Recharts: no recibe funciones nuevas. En pantallas nuevas usa ChartCard (o EChart) con un option de orbital-ds/lib/echarts-presets.
21
+ * @note Los colores de cada serie salen de las variables del tema (var(--chart-1) … var(--chart-5)) en el config; nunca un color escrito.
22
+ */
23
+
5
24
  declare const THEMES: {
6
25
  readonly light: "";
7
26
  readonly dark: ".dark";
@@ -1,5 +1,24 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group chat
5
+ * @summary Campo de mensaje de un chat: Enter envía, adjuntos, voz y «Detener» mientras responde el asistente; no sube ni graba, eso lo hace la app.
6
+ * @see textarea — texto multilínea en un formulario normal
7
+ * @see suggestions — preguntas sugeridas para empezar la conversación
8
+ * @see attachment — chip de un adjunto suelto dentro de un mensaje
9
+ * @example Enviar y detener
10
+ * <ChatComposer onSend={send} onStop={abort} streaming={isStreaming} placeholder="Pregunta lo que quieras…" />
11
+ * @example Con adjuntos y límite
12
+ * <ChatComposer
13
+ * onSend={send}
14
+ * onAttach={pickFiles}
15
+ * onFilesDrop={addFiles}
16
+ * attachments={[{ id: "1", name: "informe.pdf", type: "application/pdf", status: "uploading" }]}
17
+ * onRemoveAttachment={removeFile}
18
+ * maxLength={4000}
19
+ * />
20
+ */
21
+
3
22
  type ChatAttachmentStatus = "ready" | "uploading" | "error";
4
23
  interface ChatAttachment {
5
24
  id: string;
@@ -2,6 +2,39 @@ import * as React from 'react';
2
2
  import { Radio } from '@base-ui/react/radio';
3
3
  import { RadioGroup } from '@base-ui/react/radio-group';
4
4
 
5
+ /**
6
+ * @group forms
7
+ * @summary Teselas seleccionables con icono y texto para elegir UNA opción de un grupo corto y visual (tipo de cuenta, plan, modo).
8
+ * @see radio-group — muchas opciones o texto largo, en formato de lista
9
+ * @see select — elegir de una lista larga sin ocupar espacio
10
+ * @see toggle-group — cambiar una vista o filtro de la pantalla, no un dato del formulario
11
+ * @example Tipo de cuenta
12
+ * <ChoiceCardGroup defaultValue="company" aria-label="Tipo de cuenta">
13
+ * <ChoiceCard value="company">
14
+ * <ChoiceCardMedia>
15
+ * <BuildingIcon />
16
+ * </ChoiceCardMedia>
17
+ * <ChoiceCardTitle>Empresa</ChoiceCardTitle>
18
+ * </ChoiceCard>
19
+ * <ChoiceCard value="user">
20
+ * <ChoiceCardMedia>
21
+ * <UserIcon />
22
+ * </ChoiceCardMedia>
23
+ * <ChoiceCardTitle>Particular</ChoiceCardTitle>
24
+ * </ChoiceCard>
25
+ * </ChoiceCardGroup>
26
+ * @example Con descripción e indicador
27
+ * <ChoiceCardGroup defaultValue="pro" aria-label="Plan">
28
+ * <ChoiceCard value="pro">
29
+ * <ChoiceCardContent>
30
+ * <ChoiceCardTitle>Pro</ChoiceCardTitle>
31
+ * <ChoiceCardDescription>Hasta 20 usuarios</ChoiceCardDescription>
32
+ * </ChoiceCardContent>
33
+ * <ChoiceCardIndicator />
34
+ * </ChoiceCard>
35
+ * </ChoiceCardGroup>
36
+ */
37
+
5
38
  declare function ChoiceCardGroup({ className, ...props }: RadioGroup.Props): React.JSX.Element;
6
39
  declare function ChoiceCard({ className, orientation, ...props }: Radio.Root.Props & {
7
40
  orientation?: "horizontal" | "vertical";
@@ -1,5 +1,20 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group content
5
+ * @summary Bloque de código de varias líneas con cabecera (fichero o lenguaje), botón de copiar y números de línea opcionales; Code para código dentro de una frase.
6
+ * @see copy-button — copiar un valor corto (clave, enlace) sin mostrar un bloque
7
+ * @see markdown — pintar texto Markdown que ya trae sus bloques de código
8
+ * @see kbd — teclas o atajos de teclado, no código
9
+ * @example Con fichero y números de línea
10
+ * <CodeBlock code={source} language="tsx" title="button.tsx" showLineNumbers />
11
+ * @example Código en línea
12
+ * <p>Ejecuta <Code>pnpm install</Code> antes de empezar.</p>
13
+ * @example HTML ya resaltado (Shiki, de confianza)
14
+ * <CodeBlock code={source} html={highlightedHtml} language="ts" />
15
+ * @note `html` se inserta tal cual: solo HTML de tu propio resaltador (Shiki en el build o en el servidor), nunca texto del usuario o de una API sin sanear. `code` lleva siempre el texto plano: es lo que se copia.
16
+ */
17
+
3
18
  declare function CodeBlock({ code, html, language, title, showLineNumbers, copyable, className, ...props }: Omit<React.ComponentProps<"div">, "title"> & {
4
19
  code: string;
5
20
  html?: string;
@@ -1,6 +1,54 @@
1
1
  import * as React from 'react';
2
2
  import { Combobox as Combobox$1 } from '@base-ui/react';
3
3
 
4
+ /**
5
+ * @group forms
6
+ * @summary Campo con búsqueda para elegir uno o varios valores de una lista conocida (país, responsable, etiquetas); filtra mientras se escribe.
7
+ * @see select — lista corta (menos de ~10) sin necesidad de buscar
8
+ * @see search-box — buscar en datos de la app con sugerencias del servidor y navegar al resultado
9
+ * @see native-select — el selector del sistema, sin estilo de tema
10
+ * @example Uno de una lista
11
+ * <Combobox items={PAISES}>
12
+ * <ComboboxInput placeholder="Elige un país" showClear />
13
+ * <ComboboxContent>
14
+ * <ComboboxEmpty>No hay ningún país con ese nombre.</ComboboxEmpty>
15
+ * <ComboboxList>
16
+ * {(item) => (
17
+ * <ComboboxItem key={item} value={item}>
18
+ * {item}
19
+ * </ComboboxItem>
20
+ * )}
21
+ * </ComboboxList>
22
+ * </ComboboxContent>
23
+ * </Combobox>
24
+ * @example Varios con chips
25
+ * <Combobox multiple items={ETIQUETAS} defaultValue={["Urgente"]}>
26
+ * <ComboboxChips ref={anchor}>
27
+ * <ComboboxValue>
28
+ * {(values) => (
29
+ * <>
30
+ * {values.map((v) => (
31
+ * <ComboboxChip key={v}>{v}</ComboboxChip>
32
+ * ))}
33
+ * <ComboboxChipsInput placeholder="Añade etiquetas" />
34
+ * </>
35
+ * )}
36
+ * </ComboboxValue>
37
+ * </ComboboxChips>
38
+ * <ComboboxContent anchor={anchor}>
39
+ * <ComboboxList>
40
+ * {(item) => (
41
+ * <ComboboxItem key={item} value={item}>
42
+ * {item}
43
+ * </ComboboxItem>
44
+ * )}
45
+ * </ComboboxList>
46
+ * </ComboboxContent>
47
+ * </Combobox>
48
+ * @note Pasa la lista en `items` del Combobox y pinta cada opción con la función hija de ComboboxList; con chips, ancla la lista con `useComboboxAnchor()`.
49
+ * @note Pon siempre ComboboxEmpty con un texto de la app para cuando el filtro no encuentra nada.
50
+ */
51
+
4
52
  declare const Combobox: typeof Combobox$1.Root;
5
53
  declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): React.JSX.Element;
6
54
  declare function ComboboxTrigger({ className, children, ...props }: Combobox$1.Trigger.Props): React.JSX.Element;
@@ -1,5 +1,23 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group navigation
5
+ * @summary Paleta de comandos ⌘K lista para usar (diálogo, atajo, filtro, vacío y textos): la app solo pasa los grupos de elementos. Una por app, en la raíz.
6
+ * @see command — piezas sueltas para una lista filtrable dentro de una página o un popover
7
+ * @see search-box — campo que filtra una lista de la propia vista
8
+ * @example Preset go (navegar)
9
+ * <CommandPalette
10
+ * groups={[{ heading: "Ir a", items: [{ id: "home", label: "Inicio", icon: <HomeIcon />, onSelect: () => navigate("/") }] }]}
11
+ * />
12
+ * @example Preset search contra el servidor
13
+ * <CommandPalette preset="search" groups={results} query={query} onQueryChange={setQuery} loading={isFetching} />
14
+ * @example Abrirla desde un botón de la cabecera
15
+ * <Button size="icon" variant="ghost" aria-label={t("search")} onClick={() => setOpen(true)}>
16
+ * <SearchIcon />
17
+ * </Button>
18
+ * <CommandPalette open={open} onOpenChange={setOpen} groups={groups} />
19
+ */
20
+
3
21
  type CommandPalettePreset = "go" | "actions" | "search";
4
22
  type CommandPaletteItem = {
5
23
  id: string;
@@ -3,6 +3,40 @@ import { Command as Command$1 } from 'cmdk';
3
3
  import { Dialog } from './dialog.js';
4
4
  import '@base-ui/react/dialog';
5
5
 
6
+ /**
7
+ * @group navigation
8
+ * @summary Piezas de una lista filtrable con teclado (campo, grupos, elementos, atajos) para montar una búsqueda en línea o en un popover. La paleta ⌘K ya hecha es CommandPalette.
9
+ * @see command-palette — paleta ⌘K completa (diálogo, atajo y textos) sin montar piezas
10
+ * @see combobox — elegir el valor de un campo de formulario en una lista filtrable
11
+ * @see dropdown-menu — menú corto de acciones sin campo de búsqueda
12
+ * @example Lista filtrable en línea
13
+ * <Command>
14
+ * <CommandInput placeholder={t("searchCommand")} />
15
+ * <CommandList>
16
+ * <CommandEmpty>Sin resultados.</CommandEmpty>
17
+ * <CommandGroup heading="Ajustes">
18
+ * <CommandItem onSelect={openProfile}>
19
+ * <UserIcon />
20
+ * Perfil
21
+ * <CommandShortcut>⌘P</CommandShortcut>
22
+ * </CommandItem>
23
+ * </CommandGroup>
24
+ * </CommandList>
25
+ * </Command>
26
+ * @example En un diálogo montado a mano
27
+ * <CommandDialog open={open} onOpenChange={setOpen}>
28
+ * <Command>
29
+ * <CommandInput placeholder={t("search")} />
30
+ * <CommandList>
31
+ * <CommandEmpty>Sin resultados.</CommandEmpty>
32
+ * <CommandItem onSelect={openReports}>Informes</CommandItem>
33
+ * </CommandList>
34
+ * </Command>
35
+ * </CommandDialog>
36
+ * @note Command no trae textos propios: el placeholder de CommandInput y el contenido de CommandEmpty los pone la app con su i18n.
37
+ * @note Para la paleta global ⌘K usa CommandPalette; CommandDialog solo si necesitas montar el contenido a mano.
38
+ */
39
+
6
40
  declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): React.JSX.Element;
7
41
  declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
8
42
  title?: string;
@@ -1,5 +1,35 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group overlays
5
+ * @summary Confirmación ya montada de una acción delicada (borrar, revocar, archivar) junto al botón que la lanza; el preset `typed` obliga a escribir el nombre si no se puede deshacer.
6
+ * @see confirm-dialog — la misma confirmación pedida desde un manejador (`await confirm(...)`), sin estado de apertura
7
+ * @see alert-dialog — diálogo de decisión con contenido propio que ConfirmAction no cubre
8
+ * @see toast — si la acción se puede deshacer, mejor confirmarla después con un toast con «Deshacer»
9
+ * @example Archivar (preset simple, tono neutro)
10
+ * <Button variant="outline" onClick={() => setOpen(true)}>Archivar</Button>
11
+ * <ConfirmAction
12
+ * open={open}
13
+ * onOpenChange={setOpen}
14
+ * tone="default"
15
+ * title="¿Archivar el proyecto?"
16
+ * description={t("projects.archiveHint")}
17
+ * confirmLabel="Archivar"
18
+ * onConfirm={archive}
19
+ * />
20
+ * @example Borrado irreversible (preset typed)
21
+ * <ConfirmAction
22
+ * open={open}
23
+ * onOpenChange={setOpen}
24
+ * preset="typed"
25
+ * expected={project.slug}
26
+ * title="¿Eliminar el proyecto?"
27
+ * description={t("projects.deleteHint")}
28
+ * confirmLabel="Eliminar proyecto"
29
+ * onConfirm={remove}
30
+ * />
31
+ */
32
+
3
33
  type ConfirmActionPreset = "simple" | "typed";
4
34
  declare function ConfirmAction({ open, onOpenChange, preset, tone, title, description, confirmLabel, cancelLabel, expected, onConfirm, }: {
5
35
  open?: boolean;
@@ -1,6 +1,29 @@
1
1
  import * as React from 'react';
2
2
  import { ConfirmActionPreset } from './confirm-action.js';
3
3
 
4
+ /**
5
+ * @group overlays
6
+ * @summary Confirmación imperativa: un provider en la raíz y `await confirm({...})` desde cualquier manejador, sin estado de apertura en cada pantalla; pinta un ConfirmAction.
7
+ * @see confirm-action — el diálogo vive junto a un botón concreto y controlas `open` tú
8
+ * @see alert-dialog — confirmación con contenido propio (icono, campos, varios botones)
9
+ * @example Provider en la raíz y confirmación desde un manejador
10
+ * <ConfirmDialogProvider>
11
+ * <App />
12
+ * </ConfirmDialogProvider>
13
+ *
14
+ * const confirm = useConfirm();
15
+ * const onDelete = async () => {
16
+ * if (await confirm({ title: "¿Eliminar el informe?", confirmLabel: "Eliminar" })) remove();
17
+ * };
18
+ * @example Borrado irreversible (preset typed)
19
+ * <ConfirmDialogProvider>
20
+ * <App />
21
+ * </ConfirmDialogProvider>
22
+ *
23
+ * const confirm = useConfirm();
24
+ * const ok = await confirm({ preset: "typed", expected: project.slug, title: "¿Eliminar el proyecto?", confirmLabel: "Eliminar" });
25
+ */
26
+
4
27
  interface ConfirmOptions {
5
28
  title: React.ReactNode;
6
29
  description?: React.ReactNode;
@@ -6,6 +6,20 @@ import './auth-backdrop.js';
6
6
  import 'class-variance-authority/types';
7
7
  import 'class-variance-authority';
8
8
 
9
+ /**
10
+ * @group content
11
+ * @summary Tarjeta lista por intención para rejillas (basic, feature, media, horizontal, metric, status, cover) sin montar piezas; con `href` u `onSelect` toda ella es pulsable.
12
+ * @see card — tarjeta con anatomía libre cuando ningún preset encaja
13
+ * @see item — fila de una lista de entidades (variant="card"), no una celda de rejilla
14
+ * @see media-card — tarjeta sencilla de vídeo, curso o producto con insignia y reproducir
15
+ * @example Capacidad que navega (preset feature)
16
+ * <ContentCard preset="feature" icon={<ZapIcon />} title="Automatizaciones" description="Reglas que actúan por ti" href="/automations" />
17
+ * @example Portada con acción en el pie
18
+ * <ContentCard preset="media" media={<img src="/curso.jpg" alt="" />} title="Curso de inicio" emphasis="outlined" footer={<Button size="sm">Empezar</Button>} />
19
+ * @example Un dato suelto (preset metric)
20
+ * <ContentCard preset="metric" title="Clientes activos" value="1.284" delta="+4,2 %" />
21
+ */
22
+
9
23
  type ContentCardPreset = "basic" | "feature" | "media" | "horizontal" | "metric" | "status" | "cover";
10
24
  type ContentCardEmphasis = "elevated" | "outlined" | "filled" | "ghost";
11
25
  declare function ContentCard({ preset, emphasis, tone, density, icon, media, value, delta, title, description, action, footer, href, onSelect, children, className, spotlight, glow, backdrop, backdropMedia, backdropGlass, animated, titleSize, plate, padding, }: {
@@ -1,6 +1,41 @@
1
1
  import * as React from 'react';
2
2
  import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
3
3
 
4
+ /**
5
+ * @group overlays
6
+ * @summary Menú de acciones que se abre con clic derecho (o pulsación larga) sobre un elemento; atajo para usuarios expertos, nunca el único camino a una acción.
7
+ * @see dropdown-menu — menú que se abre con un botón visible (⋯ de una fila, «Mi cuenta»)
8
+ * @see command-palette — buscar y lanzar acciones con el teclado (⌘K)
9
+ * @example Acciones de un elemento
10
+ * <ContextMenu>
11
+ * <ContextMenuTrigger>Informe trimestral Q3</ContextMenuTrigger>
12
+ * <ContextMenuContent>
13
+ * <ContextMenuItem onClick={rename}>
14
+ * <PencilIcon />
15
+ * Renombrar
16
+ * <ContextMenuShortcut>F2</ContextMenuShortcut>
17
+ * </ContextMenuItem>
18
+ * <ContextMenuItem onClick={duplicate}>Duplicar</ContextMenuItem>
19
+ * <ContextMenuSeparator />
20
+ * <ContextMenuItem variant="destructive" onClick={askDelete}>Eliminar</ContextMenuItem>
21
+ * </ContextMenuContent>
22
+ * </ContextMenu>
23
+ * @example Submenú y opción que se marca
24
+ * <ContextMenuContent>
25
+ * <ContextMenuSub>
26
+ * <ContextMenuSubTrigger>Compartir</ContextMenuSubTrigger>
27
+ * <ContextMenuSubContent>
28
+ * <ContextMenuItem>Copiar enlace</ContextMenuItem>
29
+ * </ContextMenuSubContent>
30
+ * </ContextMenuSub>
31
+ * <ContextMenuCheckboxItem checked={pinned} onCheckedChange={setPinned}>
32
+ * Fijar en el inicio
33
+ * </ContextMenuCheckboxItem>
34
+ * </ContextMenuContent>
35
+ * @note Toda acción del menú contextual existe también en un sitio visible (botón o DropdownMenu): el clic derecho no se descubre y en táctil apenas existe.
36
+ * @note Las destructivas van al final, tras ContextMenuSeparator, con `variant="destructive"`; ContextMenuLabel va dentro de un ContextMenuGroup.
37
+ */
38
+
4
39
  declare function ContextMenu({ ...props }: ContextMenu$1.Root.Props): React.JSX.Element;
5
40
  declare function ContextMenuPortal({ ...props }: ContextMenu$1.Portal.Props): React.JSX.Element;
6
41
  declare function ContextMenuTrigger({ className, ...props }: ContextMenu$1.Trigger.Props): React.JSX.Element;
@@ -111,7 +111,7 @@ function ContextMenuSubTrigger({
111
111
  ...props,
112
112
  children: [
113
113
  children,
114
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto" })
114
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
115
115
  ]
116
116
  }
117
117
  );
@@ -1,5 +1,25 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /**
4
+ * @group chat
5
+ * @summary Historial de conversaciones de un asistente: buscar, agrupar por fecha, fijar, renombrar y borrar; va en el lateral del chat.
6
+ * @see sidebar — navegación general de la app
7
+ * @see entity-list — lista de otras entidades (no conversaciones)
8
+ * @example En el lateral del chat
9
+ * <ConversationList
10
+ * items={[
11
+ * { id: "1", title: "Tarifas 2026", updatedAt: "2026-11-20", pinned: true },
12
+ * { id: "2", title: "Resumen de incidencias", updatedAt: "2026-11-21", busy: true },
13
+ * ]}
14
+ * activeId={chatId}
15
+ * onSelect={openChat}
16
+ * onNew={newChat}
17
+ * onPin={pin}
18
+ * onRename={rename}
19
+ * onDelete={removeChat}
20
+ * />
21
+ */
22
+
3
23
  interface Conversation {
4
24
  id: string;
5
25
  title: string;
@@ -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 };