orbital-ds 0.48.0 → 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.
- package/AGENTS.md +13 -4
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/components.manifest.json +383 -37
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +598 -0
- package/dist/hooks/use-ds-motion.d.ts +17 -0
- package/dist/hooks/use-esc-close-stack.d.ts +3 -0
- package/dist/hooks/use-in-view.d.ts +9 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-simulated-progress.d.ts +11 -0
- package/dist/lib/a2ui-catalog.d.ts +42 -0
- package/dist/lib/a2ui.d.ts +289 -0
- package/dist/lib/ai-events.d.ts +15 -0
- package/dist/lib/auth-better-auth.d.ts +29 -0
- package/dist/lib/auth-flow.d.ts +85 -0
- package/dist/lib/auth-providers.d.ts +194 -0
- package/dist/lib/auth.d.ts +68 -0
- package/dist/lib/brand-allowlist.d.ts +3 -0
- package/dist/lib/brand-allowlist.js +16 -0
- package/dist/lib/brand-runtime.d.ts +52 -0
- package/dist/lib/echarts-presets.d.ts +307 -0
- package/dist/lib/echarts-server.d.ts +15 -0
- package/dist/lib/echarts-setup.d.ts +8 -0
- package/dist/lib/echarts-theme.d.ts +36 -0
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/header-control.d.ts +4 -0
- package/dist/lib/i18n.d.ts +611 -0
- package/dist/lib/i18n.js +162 -3
- package/dist/lib/image-upload.d.ts +41 -0
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +54 -1
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +54 -1
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +54 -1
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +54 -1
- package/dist/lib/motion.d.ts +74 -0
- package/dist/lib/presets.d.ts +8 -0
- package/dist/lib/template-syntax.d.ts +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/motion.css +146 -0
- package/dist/styles.css +1819 -0
- package/dist/themes/chocolate.css +259 -0
- package/dist/themes/chocolate.fonts.css +2 -0
- package/dist/themes/chocolate.guide.md +30 -0
- package/dist/themes/chocolate.meta.json +61 -0
- package/dist/themes/chocolate.scoped.css +259 -0
- package/dist/themes/chocolate.tokens.json +49 -0
- package/dist/themes/fractalia.css +556 -0
- package/dist/themes/fractalia.fonts.css +3 -0
- package/dist/themes/fractalia.guide.md +86 -0
- package/dist/themes/fractalia.meta.json +112 -0
- package/dist/themes/fractalia.scoped.css +556 -0
- package/dist/themes/fractalia.tokens.json +39 -0
- package/dist/themes/friendly.css +375 -0
- package/dist/themes/friendly.fonts.css +2 -0
- package/dist/themes/friendly.guide.md +38 -0
- package/dist/themes/friendly.meta.json +82 -0
- package/dist/themes/friendly.scoped.css +375 -0
- package/dist/themes/friendly.tokens.json +45 -0
- package/dist/themes/lagoon.css +362 -0
- package/dist/themes/lagoon.fonts.css +2 -0
- package/dist/themes/lagoon.guide.md +47 -0
- package/dist/themes/lagoon.meta.json +85 -0
- package/dist/themes/lagoon.scoped.css +362 -0
- package/dist/themes/lagoon.tokens.json +49 -0
- package/dist/themes/liquid.css +510 -0
- package/dist/themes/liquid.fonts.css +7 -0
- package/dist/themes/liquid.guide.md +82 -0
- package/dist/themes/liquid.meta.json +134 -0
- package/dist/themes/liquid.scoped.css +510 -0
- package/dist/themes/liquid.tokens.json +47 -0
- package/dist/themes/matcha.css +259 -0
- package/dist/themes/matcha.fonts.css +2 -0
- package/dist/themes/matcha.guide.md +30 -0
- package/dist/themes/matcha.meta.json +61 -0
- package/dist/themes/matcha.scoped.css +259 -0
- package/dist/themes/matcha.tokens.json +49 -0
- package/dist/themes/qratia.css +264 -0
- package/dist/themes/qratia.fonts.css +2 -0
- package/dist/themes/qratia.guide.md +34 -0
- package/dist/themes/qratia.meta.json +49 -0
- package/dist/themes/qratia.scoped.css +264 -0
- package/dist/themes/qratia.tokens.json +49 -0
- package/dist/themes/stone.css +263 -0
- package/dist/themes/stone.fonts.css +2 -0
- package/dist/themes/stone.guide.md +30 -0
- package/dist/themes/stone.meta.json +47 -0
- package/dist/themes/stone.scoped.css +263 -0
- package/dist/themes/stone.tokens.json +49 -0
- package/dist/themes/tactile.css +591 -0
- package/dist/themes/tactile.fonts.css +3 -0
- package/dist/themes/tactile.guide.md +82 -0
- package/dist/themes/tactile.meta.json +182 -0
- package/dist/themes/tactile.scoped.css +591 -0
- package/dist/themes/tactile.tokens.json +42 -0
- package/dist/themes/twitter.css +364 -0
- package/dist/themes/twitter.fonts.css +6 -0
- package/dist/themes/twitter.guide.md +35 -0
- package/dist/themes/twitter.meta.json +90 -0
- package/dist/themes/twitter.scoped.css +364 -0
- package/dist/themes/twitter.tokens.json +45 -0
- package/dist/themes/y2k.css +259 -0
- package/dist/themes/y2k.fonts.css +2 -0
- package/dist/themes/y2k.guide.md +30 -0
- package/dist/themes/y2k.meta.json +59 -0
- package/dist/themes/y2k.scoped.css +259 -0
- package/dist/themes/y2k.tokens.json +49 -0
- package/dist/themes/zyro.css +442 -0
- package/dist/themes/zyro.fonts.css +2 -0
- package/dist/themes/zyro.guide.md +33 -0
- package/dist/themes/zyro.meta.json +74 -0
- package/dist/themes/zyro.scoped.css +442 -0
- package/dist/themes/zyro.tokens.json +46 -0
- package/dist/ui/a2ui-renderer.d.ts +44 -0
- package/dist/ui/accordion.d.ts +9 -0
- package/dist/ui/agent-events.d.ts +49 -0
- package/dist/ui/ai-tag.d.ts +24 -0
- package/dist/ui/alert-dialog.d.ts +60 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/animated-number.d.ts +20 -0
- package/dist/ui/api-key-list.d.ts +40 -0
- package/dist/ui/api-key-list.js +89 -0
- package/dist/ui/app-bar.d.ts +32 -0
- package/dist/ui/aspect-ratio.d.ts +7 -0
- package/dist/ui/attachment.d.ts +26 -0
- package/dist/ui/audit-log.d.ts +53 -0
- package/dist/ui/audit-log.js +102 -0
- package/dist/ui/auth-backdrop.d.ts +37 -0
- package/dist/ui/auth-form.d.ts +4 -0
- package/dist/ui/auth-layout.d.ts +110 -0
- package/dist/ui/auth-parts.d.ts +43 -0
- package/dist/ui/auth-status.d.ts +23 -0
- package/dist/ui/avatar.d.ts +43 -0
- package/dist/ui/ayuda.d.ts +22 -0
- package/dist/ui/badge.d.ts +15 -0
- package/dist/ui/banner.d.ts +14 -0
- package/dist/ui/bottom-nav.d.ts +37 -0
- package/dist/ui/breadcrumb.d.ts +34 -0
- package/dist/ui/bubble.d.ts +19 -0
- package/dist/ui/button-group.d.ts +15 -0
- package/dist/ui/button.d.ts +14 -0
- package/dist/ui/calendar.d.ts +28 -0
- package/dist/ui/card-stack.d.ts +36 -0
- package/dist/ui/card.d.ts +61 -0
- package/dist/ui/carousel.d.ts +68 -0
- package/dist/ui/chain-of-thought.d.ts +34 -0
- package/dist/ui/chart-card.d.ts +46 -0
- package/dist/ui/chat-composer.d.ts +58 -0
- package/dist/ui/checkbox.d.ts +6 -0
- package/dist/ui/choice-card.d.ts +49 -0
- package/dist/ui/code-block.d.ts +29 -0
- package/dist/ui/collapsible.d.ts +8 -0
- package/dist/ui/combobox.d.ts +74 -0
- package/dist/ui/command-palette.d.ts +54 -0
- package/dist/ui/command.d.ts +56 -0
- package/dist/ui/confirm-action.d.ts +48 -0
- package/dist/ui/confirm-dialog.d.ts +44 -0
- package/dist/ui/connected-accounts.d.ts +25 -0
- package/dist/ui/content-card.d.ts +66 -0
- package/dist/ui/context-menu.d.ts +66 -0
- package/dist/ui/conversation-list.d.ts +44 -0
- package/dist/ui/copy-button.d.ts +25 -0
- package/dist/ui/cta-banner.d.ts +30 -0
- package/dist/ui/data-table.d.ts +198 -0
- package/dist/ui/date-picker.d.ts +65 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/detail-panel.d.ts +40 -0
- package/dist/ui/dialog.d.ts +54 -0
- package/dist/ui/direction.d.ts +1 -0
- package/dist/ui/dock.d.ts +30 -0
- package/dist/ui/drawer.d.ts +59 -0
- package/dist/ui/dropdown-menu.d.ts +63 -0
- package/dist/ui/dropzone.d.ts +44 -0
- package/dist/ui/echart.d.ts +46 -0
- package/dist/ui/empty-state.d.ts +26 -0
- package/dist/ui/empty.d.ts +15 -0
- package/dist/ui/entity-list.d.ts +57 -0
- package/dist/ui/error-page.d.ts +28 -0
- package/dist/ui/error-state.d.ts +16 -0
- package/dist/ui/eyebrow.d.ts +7 -0
- package/dist/ui/faq.d.ts +34 -0
- package/dist/ui/feature-grid.d.ts +40 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/file-upload.d.ts +42 -0
- package/dist/ui/filter-bar.d.ts +38 -0
- package/dist/ui/form-layout.d.ts +43 -0
- package/dist/ui/gauge.d.ts +66 -0
- package/dist/ui/generated-image.d.ts +33 -0
- package/dist/ui/generated-table.d.ts +29 -0
- package/dist/ui/heatmap-grid.d.ts +59 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hover-card.d.ts +8 -0
- package/dist/ui/i18n-provider.d.ts +27 -0
- package/dist/ui/icon-tile.d.ts +11 -0
- package/dist/ui/input-group.d.ts +22 -0
- package/dist/ui/input-otp.d.ts +36 -0
- package/dist/ui/input.d.ts +21 -0
- package/dist/ui/instruction-editor.d.ts +81 -0
- package/dist/ui/item.d.ts +26 -0
- package/dist/ui/kbd.d.ts +6 -0
- package/dist/ui/label.d.ts +22 -0
- package/dist/ui/landing-section.d.ts +34 -0
- package/dist/ui/legend.d.ts +57 -0
- package/dist/ui/level-meter.d.ts +28 -0
- package/dist/ui/load-more.d.ts +36 -0
- package/dist/ui/loading-state.d.ts +26 -0
- package/dist/ui/locale-switcher.d.ts +19 -0
- package/dist/ui/markdown.d.ts +29 -0
- package/dist/ui/marker.d.ts +13 -0
- package/dist/ui/media-card.d.ts +29 -0
- package/dist/ui/member-list.d.ts +43 -0
- package/dist/ui/member-list.js +107 -0
- package/dist/ui/menubar.d.ts +70 -0
- package/dist/ui/message-actions.d.ts +21 -0
- package/dist/ui/message-scroller.d.ts +46 -0
- package/dist/ui/message.d.ts +45 -0
- package/dist/ui/mfa-challenge.d.ts +4 -0
- package/dist/ui/mfa-setup.d.ts +29 -0
- package/dist/ui/mosaic.d.ts +38 -0
- package/dist/ui/motion-provider.d.ts +28 -0
- package/dist/ui/native-select.d.ts +32 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/notice-review.d.ts +64 -0
- package/dist/ui/notifications.d.ts +81 -0
- package/dist/ui/oauth-consent.d.ts +54 -0
- package/dist/ui/onboarding-checklist.d.ts +38 -0
- package/dist/ui/onboarding-checklist.js +132 -0
- package/dist/ui/page-header.d.ts +64 -0
- package/dist/ui/page-loader.d.ts +40 -0
- package/dist/ui/page-shell.d.ts +25 -0
- package/dist/ui/pagination.d.ts +42 -0
- package/dist/ui/panel.d.ts +12 -0
- package/dist/ui/passkey-list.d.ts +17 -0
- package/dist/ui/password-input.d.ts +5 -0
- package/dist/ui/password-strength.d.ts +28 -0
- package/dist/ui/permission-matrix.d.ts +35 -0
- package/dist/ui/permission-matrix.js +89 -0
- package/dist/ui/plan-summary.d.ts +59 -0
- package/dist/ui/plan-summary.js +92 -0
- package/dist/ui/popover.d.ts +44 -0
- package/dist/ui/pricing-table.d.ts +29 -0
- package/dist/ui/progress.d.ts +9 -0
- package/dist/ui/proportion-bar.d.ts +52 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/questionnaire.d.ts +62 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/reasoning.d.ts +24 -0
- package/dist/ui/resizable.d.ts +10 -0
- package/dist/ui/reveal.d.ts +28 -0
- package/dist/ui/scroll-area.d.ts +7 -0
- package/dist/ui/search-box.d.ts +32 -0
- package/dist/ui/select.d.ts +19 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/session-list.d.ts +19 -0
- package/dist/ui/session-timeout.d.ts +13 -0
- package/dist/ui/sheet.d.ts +53 -0
- package/dist/ui/shield.d.ts +35 -0
- package/dist/ui/show-more.d.ts +26 -0
- package/dist/ui/sidebar.d.ts +92 -0
- package/dist/ui/sign-out-dialog.d.ts +17 -0
- package/dist/ui/skeleton.d.ts +10 -0
- package/dist/ui/slider.d.ts +23 -0
- package/dist/ui/sparkline.d.ts +26 -0
- package/dist/ui/spinner.d.ts +5 -0
- package/dist/ui/stat-group.d.ts +40 -0
- package/dist/ui/stat.d.ts +90 -0
- package/dist/ui/status-badge.d.ts +39 -0
- package/dist/ui/status-hero.d.ts +30 -0
- package/dist/ui/step-dots.d.ts +22 -0
- package/dist/ui/step-flow.d.ts +48 -0
- package/dist/ui/step-ring.d.ts +26 -0
- package/dist/ui/stepper.d.ts +20 -0
- package/dist/ui/suggestions.d.ts +17 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/table.d.ts +38 -0
- package/dist/ui/tabs.d.ts +14 -0
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/task-loader.d.ts +29 -0
- package/dist/ui/task-progress.d.ts +32 -0
- package/dist/ui/testimonial.d.ts +37 -0
- package/dist/ui/textarea.d.ts +32 -0
- package/dist/ui/theme-toggle.d.ts +14 -0
- package/dist/ui/timeline.d.ts +55 -0
- package/dist/ui/toast.d.ts +19 -0
- package/dist/ui/toggle-group.d.ts +38 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/tool-call.d.ts +27 -0
- package/dist/ui/tooltip.d.ts +9 -0
- package/dist/ui/upgrade-prompt.d.ts +24 -0
- package/dist/ui/upgrade-prompt.js +85 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/week-strip.d.ts +23 -0
- package/dist/ui/workflow-run.d.ts +51 -0
- package/dist/ui/workspace-switcher.d.ts +28 -0
- package/dist/ui/workspace-switcher.js +92 -0
- package/docs/GRAFICOS.md +1 -1
- package/docs/designer/patrones.md +29 -1
- package/manifest/actions.json +1 -1
- package/manifest/agents.json +1 -1
- package/manifest/ai.json +1 -1
- package/manifest/auth.json +1 -1
- package/manifest/chat.json +1 -1
- package/manifest/content.json +1 -1
- package/manifest/data.json +498 -1
- package/manifest/feedback.json +230 -43
- package/manifest/forms.json +1 -1
- package/manifest/motion.json +1 -1
- package/manifest/navigation.json +102 -1
- package/manifest/overlays.json +2 -2
- package/package.json +1 -11
- package/scripts/cli.mjs +63 -5
- package/scripts/doctor.mjs +5 -3
- package/scripts/skill.mjs +85 -0
- package/skill/SKILL.md +5 -2
- package/dist/ui/sonner.js +0 -60
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AuthBackdropVariant } from './auth-backdrop.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group content
|
|
6
|
+
* @summary Portada de una web, un producto o un módulo: antetítulo, título grande, texto, acciones y, según el preset, imagen al lado, foto de fondo o tira de logos o cifras.
|
|
7
|
+
* @see page-header — cabecera de una vista de trabajo (título, migas, acciones), no una portada
|
|
8
|
+
* @see empty-state — un módulo que aún no tiene contenido e invita a crear lo primero
|
|
9
|
+
* @see content-card — tarjeta de presentación dentro de una rejilla, no la portada de la página
|
|
10
|
+
* @example Portada de producto
|
|
11
|
+
* <Hero
|
|
12
|
+
* preset="landing"
|
|
13
|
+
* eyebrow={<Badge variant="secondary">Nuevo · Informes automáticos</Badge>}
|
|
14
|
+
* title="Tus operaciones, en una sola vista"
|
|
15
|
+
* description="Conecta tus fuentes y recibe cada lunes el informe que antes hacías a mano."
|
|
16
|
+
* actions={<><Button size="lg">Empezar gratis</Button><Button size="lg" variant="outline">Ver demo</Button></>}
|
|
17
|
+
* backdrop="mesh"
|
|
18
|
+
* />
|
|
19
|
+
* @example Texto junto a una captura
|
|
20
|
+
* <Hero preset="split" title="Todo tu equipo, al día" description="Avisos, tareas y métricas en un panel." actions={<Button>Probar</Button>} media={<img src="/panel.png" alt="Panel de control con métricas" />} />
|
|
21
|
+
* @example Portada de un módulo dentro de la app
|
|
22
|
+
* <Hero preset="section" title="Integraciones" description="Conecta tus herramientas en dos clics." actions={<Button>Añadir integración</Button>} footer={<StatGroup preset="strip">…</StatGroup>} />
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
type HeroPreset = "landing" | "split" | "media" | "section";
|
|
26
|
+
type HeroAlign = "start" | "center";
|
|
27
|
+
type HeroProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
28
|
+
preset?: HeroPreset;
|
|
29
|
+
/** Título de la portada. No es el atributo HTML `title`. */
|
|
30
|
+
title: React.ReactNode;
|
|
31
|
+
/** Texto de apoyo bajo el título (una o dos frases). */
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
/** Sobre el título: una Badge de novedad, un enlace «Nuevo: …» o la categoría. */
|
|
34
|
+
eyebrow?: React.ReactNode;
|
|
35
|
+
/** Llamadas a la acción (una principal y, como mucho, una secundaria). */
|
|
36
|
+
actions?: React.ReactNode;
|
|
37
|
+
/** split: la imagen, el vídeo o la demo junto al texto (con su `alt`). */
|
|
38
|
+
media?: React.ReactNode;
|
|
39
|
+
/** Bajo todo: tira de logos de clientes, cifras (StatGroup preset="strip") o una nota. */
|
|
40
|
+
footer?: React.ReactNode;
|
|
41
|
+
/** Alineación del texto; por defecto, la del preset. */
|
|
42
|
+
align?: HeroAlign;
|
|
43
|
+
/** Fondo decorativo (ver AuthBackdrop). Por defecto ninguno; `media` usa `image`. */
|
|
44
|
+
backdrop?: AuthBackdropVariant;
|
|
45
|
+
/** backdrop="image": la foto o el vídeo de fondo (un <img>/<video> con alt=""). */
|
|
46
|
+
backdropMedia?: React.ReactNode;
|
|
47
|
+
/** Cristal esmerilado sobre el fondo. */
|
|
48
|
+
backdropGlass?: boolean;
|
|
49
|
+
/** Placa bajo el texto para garantizar el contraste sobre un fondo cargado; por defecto, solo con foto. */
|
|
50
|
+
plate?: boolean;
|
|
51
|
+
/** Entrada en cascada con el ritmo del tema (quieta con movimiento reducido). */
|
|
52
|
+
animated?: boolean;
|
|
53
|
+
/** Nivel del título: h1 si es la portada de la página; h2 si va dentro de otra vista. */
|
|
54
|
+
titleAs?: "h1" | "h2";
|
|
55
|
+
};
|
|
56
|
+
declare function Hero({ preset, title, description, eyebrow, actions, media, footer, align, backdrop, backdropMedia, backdropGlass, plate, animated, titleAs: Title, className, children, ...props }: HeroProps): React.JSX.Element;
|
|
57
|
+
|
|
58
|
+
export { Hero, type HeroAlign, type HeroPreset, type HeroProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PreviewCard } from '@base-ui/react/preview-card';
|
|
3
|
+
|
|
4
|
+
declare function HoverCard({ ...props }: PreviewCard.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function HoverCardTrigger({ ...props }: PreviewCard.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCard.Popup.Props & Pick<PreviewCard.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DsMessages } from '../lib/i18n.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group content
|
|
6
|
+
* @summary Proveedor raíz que fija idioma, textos propios y dirección (ltr / rtl) de los componentes de orbital-ds; se monta una vez con el idioma activo de la app.
|
|
7
|
+
* @see direction — solo la dirección de Base UI (ya incluida aquí)
|
|
8
|
+
* @see motion-provider — proveedor raíz de Motion para animar con los presets del tema
|
|
9
|
+
* @example Con i18next (espacio «orbital»)
|
|
10
|
+
* <DsI18nProvider locale={i18n.language} messages={i18n.getResourceBundle(i18n.language, "orbital")}>
|
|
11
|
+
* <App />
|
|
12
|
+
* </DsI18nProvider>
|
|
13
|
+
* @example Con los catálogos incluidos (en, es, pt-BR)
|
|
14
|
+
* <DsI18nProvider locale="es">
|
|
15
|
+
* <App />
|
|
16
|
+
* </DsI18nProvider>
|
|
17
|
+
* @note Sin provider, los textos de los componentes salen en inglés. Pon además `dir={dsDirection(idioma)}` en `<html>`; la prop `dir` de aquí solo fuerza la dirección.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare function DsI18nProvider({ locale, messages, dir, children, }: {
|
|
21
|
+
locale?: string | null;
|
|
22
|
+
messages?: Partial<DsMessages>;
|
|
23
|
+
dir?: "ltr" | "rtl";
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { DsI18nProvider };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare const iconTileVariants: (props?: ({
|
|
6
|
+
tone?: "neutral" | "primary" | "info" | "success" | "warning" | "danger" | "accent" | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare function IconTile({ className, tone, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof iconTileVariants>): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { IconTile, iconTileVariants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Button } from './button.js';
|
|
5
|
+
import '@base-ui/react/use-render';
|
|
6
|
+
|
|
7
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
9
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
12
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
13
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
16
|
+
type?: "button" | "submit" | "reset";
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
19
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
20
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OTPInput } from 'input-otp';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group forms
|
|
6
|
+
* @summary Código de un solo uso en casillas (verificación por SMS o correo, MFA): pega y avanza solo entre dígitos.
|
|
7
|
+
* @see mfa-challenge — la pantalla completa del segundo factor
|
|
8
|
+
* @see input — un código o dato de longitud libre
|
|
9
|
+
* @example Código de 6 dígitos en dos grupos
|
|
10
|
+
* <InputOTP maxLength={6} value={codigo} onChange={setCodigo}>
|
|
11
|
+
* <InputOTPGroup>
|
|
12
|
+
* <InputOTPSlot index={0} />
|
|
13
|
+
* <InputOTPSlot index={1} />
|
|
14
|
+
* <InputOTPSlot index={2} />
|
|
15
|
+
* </InputOTPGroup>
|
|
16
|
+
* <InputOTPSeparator />
|
|
17
|
+
* <InputOTPGroup>
|
|
18
|
+
* <InputOTPSlot index={3} />
|
|
19
|
+
* <InputOTPSlot index={4} />
|
|
20
|
+
* <InputOTPSlot index={5} />
|
|
21
|
+
* </InputOTPGroup>
|
|
22
|
+
* </InputOTP>
|
|
23
|
+
* @note Un InputOTPSlot por posición, con `index` de 0 a `maxLength - 1`; el error se marca con `aria-invalid` en cada casilla.
|
|
24
|
+
* @note input-otp es dependencia opcional de la app.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
28
|
+
containerClassName?: string;
|
|
29
|
+
}): React.JSX.Element;
|
|
30
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
31
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
32
|
+
index: number;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group forms
|
|
5
|
+
* @summary Campo de texto de una línea (nombre, correo, importe); va dentro de Field con su etiqueta.
|
|
6
|
+
* @see input-group — el campo necesita icono, prefijo, sufijo o botón dentro
|
|
7
|
+
* @see textarea — texto de varias líneas
|
|
8
|
+
* @see password-input — contraseñas, con mostrar/ocultar y autocompletado correcto
|
|
9
|
+
* @example Con etiqueta
|
|
10
|
+
* <Field>
|
|
11
|
+
* <FieldLabel htmlFor="email">Correo</FieldLabel>
|
|
12
|
+
* <Input id="email" type="email" autoComplete="email" />
|
|
13
|
+
* </Field>
|
|
14
|
+
* @example Con error
|
|
15
|
+
* <Input id="vat" aria-invalid="true" defaultValue="B1234" />
|
|
16
|
+
* @note El placeholder no es etiqueta: pon siempre FieldLabel (o `aria-label` si no hay sitio).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { Input };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ImageUploader } from '../lib/image-upload.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group forms
|
|
6
|
+
* @summary Editor de instrucciones, prompts o documentos que siempre entrega Markdown, con vistas visual, Markdown, HTML y previa, y variables.
|
|
7
|
+
* @see textarea — texto libre corto sin formato
|
|
8
|
+
* @see chat-composer — escribir un mensaje en un chat
|
|
9
|
+
* @example Preset prompt con variables
|
|
10
|
+
* <InstructionEditor
|
|
11
|
+
* preset="prompt"
|
|
12
|
+
* value={md}
|
|
13
|
+
* onChange={setMd}
|
|
14
|
+
* variables={["company", "user_name"]}
|
|
15
|
+
* aria-label="Instrucciones del agente"
|
|
16
|
+
* />
|
|
17
|
+
* @example Preset compact (nota corta)
|
|
18
|
+
* <InstructionEditor preset="compact" defaultValue="" placeholder="Añade una nota…" aria-label="Nota" />
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
type InstructionEditorPreset = "prompt" | "document" | "compact";
|
|
22
|
+
/** Lo que devuelve `renderPreview`: el texto final y, si la app los calcula, datos de tamaño (p. ej. tokens TOON frente a JSON). */
|
|
23
|
+
interface InstructionPreview {
|
|
24
|
+
text: string;
|
|
25
|
+
stats?: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string | number;
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
type InstructionEditorMode = "visual" | "markdown" | "html" | "preview";
|
|
31
|
+
type Tool = "history" | "heading" | "marks" | "lists" | "blocks" | "table";
|
|
32
|
+
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
|
+
interface InstructionEditorProps extends Omit<React.ComponentProps<"div">, "onChange" | "defaultValue"> {
|
|
34
|
+
/** Intención: `prompt`, `document` o `compact`. Solo fija valores por defecto. */
|
|
35
|
+
preset?: InstructionEditorPreset;
|
|
36
|
+
/** Markdown (controlado). */
|
|
37
|
+
value?: string;
|
|
38
|
+
/** Markdown inicial (no controlado). */
|
|
39
|
+
defaultValue?: string;
|
|
40
|
+
/** Recibe el documento como Markdown en cada cambio. */
|
|
41
|
+
onChange?: (markdown: string) => void;
|
|
42
|
+
/** Vistas disponibles, en orden. */
|
|
43
|
+
modes?: InstructionEditorMode[];
|
|
44
|
+
mode?: InstructionEditorMode;
|
|
45
|
+
defaultMode?: InstructionEditorMode;
|
|
46
|
+
onModeChange?: (mode: InstructionEditorMode) => void;
|
|
47
|
+
/** Variables que se insertan como {{nombre}} desde la barra. */
|
|
48
|
+
variables?: readonly string[];
|
|
49
|
+
/**
|
|
50
|
+
* Sintaxis de plantilla: `template` activa los fragmentos de lógica (`[[IF]]`, valor por defecto…)
|
|
51
|
+
* y los avisos de condiciones mal escritas. Por defecto, `plain` (solo `{{variable}}`).
|
|
52
|
+
*/
|
|
53
|
+
syntax?: "plain" | "template";
|
|
54
|
+
/**
|
|
55
|
+
* La app renderiza la plantilla con su motor (y variables de ejemplo) para la vista previa.
|
|
56
|
+
* Devuelve el texto que verá el modelo, o `{ text, stats }` con datos de tamaño.
|
|
57
|
+
*/
|
|
58
|
+
renderPreview?: (markdown: string) => string | InstructionPreview;
|
|
59
|
+
placeholder?: string;
|
|
60
|
+
readOnly?: boolean;
|
|
61
|
+
/** Herramientas de la barra (por defecto, las del preset). */
|
|
62
|
+
tools?: Tool[];
|
|
63
|
+
/** Niveles de título que ofrece la barra (por defecto, H1 a H3). */
|
|
64
|
+
headingLevels?: HeadingLevel[];
|
|
65
|
+
/**
|
|
66
|
+
* Sube una imagen y devuelve su URL (S3, R2, un Worker…: ver `createPresignedUploader` y `createEndpointUploader`
|
|
67
|
+
* en `orbital-ds/lib/image-upload`). Si se da, aparece el botón de imagen y se admiten pegar y arrastrar imágenes.
|
|
68
|
+
*/
|
|
69
|
+
onUploadImage?: ImageUploader;
|
|
70
|
+
/** Tipos de imagen admitidos (por defecto, `image/*`). */
|
|
71
|
+
imageAccept?: string;
|
|
72
|
+
/** Tamaño máximo en bytes; mayor se rechaza antes de subir. */
|
|
73
|
+
imageMaxBytes?: number;
|
|
74
|
+
/** Muestra el contador de caracteres (por defecto, el del preset). */
|
|
75
|
+
showCount?: boolean;
|
|
76
|
+
/** Nombre accesible del editor. */
|
|
77
|
+
"aria-label"?: string;
|
|
78
|
+
}
|
|
79
|
+
declare function InstructionEditor({ preset, value, defaultValue, onChange, modes, mode: modeProp, defaultMode, onModeChange, variables, syntax, renderPreview, placeholder, readOnly, tools, onUploadImage, imageAccept, imageMaxBytes, headingLevels, showCount, className, "aria-label": ariaLabel, ...props }: InstructionEditorProps): React.JSX.Element;
|
|
80
|
+
|
|
81
|
+
export { InstructionEditor, type InstructionEditorMode, type InstructionEditorPreset, type InstructionEditorProps, type InstructionPreview };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Separator } from './separator.js';
|
|
6
|
+
import '@base-ui/react/separator';
|
|
7
|
+
|
|
8
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
10
|
+
declare const itemVariants: (props?: ({
|
|
11
|
+
variant?: "outline" | "default" | "muted" | "card" | null | undefined;
|
|
12
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React.JSX.Element;
|
|
15
|
+
declare const itemMediaVariants: (props?: ({
|
|
16
|
+
variant?: "icon" | "default" | "image" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
19
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
21
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
22
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
23
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
24
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
package/dist/ui/kbd.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group forms
|
|
5
|
+
* @summary Etiqueta accesible (label nativa) para un control suelto fuera de la estructura de formulario.
|
|
6
|
+
* @see field — en formularios: FieldLabel junto con ayuda y error
|
|
7
|
+
* @example Etiqueta asociada
|
|
8
|
+
* <Label htmlFor="ie-preset">Preset</Label>
|
|
9
|
+
* <NativeSelect id="ie-preset">
|
|
10
|
+
* <NativeSelectOption value="prompt">Prompt</NativeSelectOption>
|
|
11
|
+
* </NativeSelect>
|
|
12
|
+
* @example Envolviendo el control
|
|
13
|
+
* <Label>
|
|
14
|
+
* <Switch />
|
|
15
|
+
* Avisos por correo
|
|
16
|
+
* </Label>
|
|
17
|
+
* @note Asocia con `htmlFor` o envolviendo el control; en un formulario usa FieldLabel dentro de Field.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { Label };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group content
|
|
5
|
+
* @summary Sección de una web pública bajo el Hero: antetítulo, título, texto y el bloque que la ocupa (características, precios, testimonios, preguntas frecuentes).
|
|
6
|
+
* @see hero — la portada de arriba del todo, una por página
|
|
7
|
+
* @see page-header — cabecera de una vista de trabajo dentro de la app
|
|
8
|
+
* @example Sección de características
|
|
9
|
+
* <LandingSection eyebrow="Cómo funciona" title="Todo lo que necesitas para empezar" description="Sin instalar nada y en cinco minutos.">
|
|
10
|
+
* <FeatureGrid>
|
|
11
|
+
* <Feature icon={<ZapIcon />} title="Rápido" description="Respuestas en milisegundos." />
|
|
12
|
+
* </FeatureGrid>
|
|
13
|
+
* </LandingSection>
|
|
14
|
+
* @example Alineada al inicio, con una acción
|
|
15
|
+
* <LandingSection align="start" title="Preguntas frecuentes" actions={<Button variant="outline">Contactar</Button>}>
|
|
16
|
+
* <Faq items={faqs} />
|
|
17
|
+
* </LandingSection>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
type LandingSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
21
|
+
/** Título de la sección. No es el atributo HTML `title`. */
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
description?: React.ReactNode;
|
|
24
|
+
/** Sobre el título: la categoría o una Badge. */
|
|
25
|
+
eyebrow?: React.ReactNode;
|
|
26
|
+
/** Una acción de la sección (ver todo, contactar). */
|
|
27
|
+
actions?: React.ReactNode;
|
|
28
|
+
align?: "start" | "center";
|
|
29
|
+
/** h2 por defecto; h3 si la sección va dentro de otra. */
|
|
30
|
+
titleAs?: "h2" | "h3";
|
|
31
|
+
};
|
|
32
|
+
declare function LandingSection({ title, description, eyebrow, actions, align, titleAs: Title, className, children, ...props }: LandingSectionProps): React.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { LandingSection, type LandingSectionProps };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Leyenda de series o de tonos (muestra + etiqueta + valor opcional), horizontal o vertical; con onToggle sirve para mostrar u ocultar series de un gráfico.
|
|
6
|
+
* @see proportion-bar — barra con segmentos (se acompaña de Legend con los mismos tonos)
|
|
7
|
+
* @see status-badge — el estado de una cosa con su texto, no la clave de un gráfico
|
|
8
|
+
* @see echart — los gráficos ECharts ya traen su leyenda dentro del option
|
|
9
|
+
* @example Tonos de estado
|
|
10
|
+
* <Legend>
|
|
11
|
+
* <LegendItem tone="success">Dentro de SLA</LegendItem>
|
|
12
|
+
* <LegendItem tone="danger">Fuera de SLA</LegendItem>
|
|
13
|
+
* <LegendItem tone="neutral" shape="line">Objetivo</LegendItem>
|
|
14
|
+
* </Legend>
|
|
15
|
+
* @example Vertical con valores
|
|
16
|
+
* <Legend orientation="vertical">
|
|
17
|
+
* <LegendItem tone="chart-1" value={<Quantity value={3840} />}>Entrantes</LegendItem>
|
|
18
|
+
* <LegendItem tone="chart-2" value={<Quantity value={3512} />}>Atendidas</LegendItem>
|
|
19
|
+
* </Legend>
|
|
20
|
+
* @example Interactiva: muestra u oculta series
|
|
21
|
+
* <Legend aria-label="Series del gráfico">
|
|
22
|
+
* <LegendItem tone="chart-1" active={visible.calls} onToggle={(on) => setVisible({ ...visible, calls: on })}>Llamadas</LegendItem>
|
|
23
|
+
* </Legend>
|
|
24
|
+
* @note Usa tone (series chart-1…5 o tonos de estado del vocabulario común), no color: un color escrito se sale del tema.
|
|
25
|
+
* @note onToggle solo si de verdad muestra u oculta la serie; la etiqueta va siempre en texto (el color no basta).
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** Tonos de color comunes a las piezas de datos (series del gráfico y estados). */
|
|
29
|
+
type DsDataTone = "primary" | "info" | "success" | "warning" | "danger" | "neutral" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5";
|
|
30
|
+
/** Relleno de fondo de cada tono (clases estáticas para que Tailwind las genere). */
|
|
31
|
+
declare const dataToneBg: Record<DsDataTone, string>;
|
|
32
|
+
/** Variable CSS del color de cada tono (para mezclas con color-mix). */
|
|
33
|
+
declare const dataToneVar: Record<DsDataTone, string>;
|
|
34
|
+
/** Fondo SUAVE de cada tono (etiquetas, pistas teñidas): el «-soft» del tema o una mezcla. */
|
|
35
|
+
declare const dataToneSoftVar: Record<DsDataTone, string>;
|
|
36
|
+
declare function Legend({ className, orientation, ...props }: React.ComponentProps<"ul"> & {
|
|
37
|
+
orientation?: "horizontal" | "vertical";
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
declare function LegendSwatch({ className, tone, color, shape, style, ...props }: React.ComponentProps<"span"> & {
|
|
40
|
+
tone?: DsDataTone;
|
|
41
|
+
/** Color propio (cualquier valor CSS, mejor una variable). Gana a `tone`. */
|
|
42
|
+
color?: string;
|
|
43
|
+
shape?: "square" | "circle" | "line";
|
|
44
|
+
}): React.JSX.Element;
|
|
45
|
+
declare function LegendItem({ className, tone, color, shape, value, active, onToggle, children, ...props }: Omit<React.ComponentProps<"li">, "onToggle" | "color"> & {
|
|
46
|
+
tone?: DsDataTone;
|
|
47
|
+
color?: string;
|
|
48
|
+
shape?: "square" | "circle" | "line";
|
|
49
|
+
/** Valor opcional, tras la etiqueta (ya formateado por la app). */
|
|
50
|
+
value?: React.ReactNode;
|
|
51
|
+
/** Serie visible (en una leyenda interactiva). */
|
|
52
|
+
active?: boolean;
|
|
53
|
+
/** Hace el elemento interactivo: recibe el nuevo estado. */
|
|
54
|
+
onToggle?: (active: boolean) => void;
|
|
55
|
+
}): React.JSX.Element;
|
|
56
|
+
|
|
57
|
+
export { type DsDataTone, Legend, LegendItem, LegendSwatch, dataToneBg, dataToneSoftVar, dataToneVar };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DsDataTone } from './legend.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @group data
|
|
6
|
+
* @summary Medición de un nivel en porcentaje con su categoría (bajo, medio, alto) y su rango; la app decide el tono. Para una puntuación en anillo, Gauge; para uso frente a límite, UsageMeter.
|
|
7
|
+
* @see gauge — valor en anillo o arco con la cifra en el centro
|
|
8
|
+
* @see usage-meter — uso frente a lo contratado, con aviso al 80 % y crítico al 100 %
|
|
9
|
+
* @see proportion-bar — parte frente al total o reparto en segmentos
|
|
10
|
+
* @example Nivel con su categoría y rango
|
|
11
|
+
* <LevelMeter label="Exposición" value={47.5} tone="warning" level="Medio" range="25–60 %" />
|
|
12
|
+
* @note value es un porcentaje 0–100 (se recorta); el tono lo traduce la app desde su dominio (bajo → success, medio → warning, alto → danger).
|
|
13
|
+
* @note Pasa siempre level con la categoría en texto: el tono refuerza, no es el único portador.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare function LevelMeter({ value, tone, level, range, label, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
17
|
+
/** Porcentaje 0–100. */
|
|
18
|
+
value: number;
|
|
19
|
+
tone?: DsDataTone;
|
|
20
|
+
/** Nombre del nivel («Bajo», «Medio», «Alto»). */
|
|
21
|
+
level?: React.ReactNode;
|
|
22
|
+
/** Rango del nivel («0–25 %»). */
|
|
23
|
+
range?: React.ReactNode;
|
|
24
|
+
/** Nombre accesible de la medición. */
|
|
25
|
+
label?: string;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { LevelMeter };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Botón «Cargar más» al final de una lista que se pide por tramos, con restantes, anuncio para lectores y reintento; `auto` añade carga al llegar al final. Para saltar a una página, Pagination.
|
|
6
|
+
* @see pagination — saltar a una página concreta o datos de trabajo (tablas)
|
|
7
|
+
* @see show-more — desplegar contenido que ya está cargado, sin pedir más
|
|
8
|
+
* @see entity-list — la lista de entidades con sus estados, a la que suele acompañar
|
|
9
|
+
* @example Al final de una lista
|
|
10
|
+
* <LoadMore
|
|
11
|
+
* hasMore={items.length < total}
|
|
12
|
+
* loading={isFetching}
|
|
13
|
+
* error={isError}
|
|
14
|
+
* onLoadMore={fetchNextPage}
|
|
15
|
+
* remaining={total - items.length}
|
|
16
|
+
* loadedCount={lastPageSize}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare function LoadMore({ hasMore, loading, error, onLoadMore, remaining, loadedCount, auto, autoLimit, rootMargin, label, endLabel, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
21
|
+
hasMore: boolean;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
error?: boolean;
|
|
24
|
+
onLoadMore: () => void | Promise<void>;
|
|
25
|
+
/** Elementos que faltan: se pinta «Cargar más (24)». */
|
|
26
|
+
remaining?: number;
|
|
27
|
+
/** Cuántos acaba de traer la última carga: se anuncia a los lectores. */
|
|
28
|
+
loadedCount?: number;
|
|
29
|
+
auto?: boolean;
|
|
30
|
+
autoLimit?: number;
|
|
31
|
+
rootMargin?: string;
|
|
32
|
+
label?: React.ReactNode;
|
|
33
|
+
endLabel?: React.ReactNode;
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { LoadMore };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Esqueleto con la forma de lo que se carga (lista, tarjeta, tabla o ficha) para una sección mientras llegan los datos. Para una página o ruta entera, PageLoader.
|
|
6
|
+
* @see page-loader — carga de toda la app, una ruta o una sección con superposición
|
|
7
|
+
* @see skeleton — una pieza suelta de esqueleto para componer tu propia forma
|
|
8
|
+
* @see spinner — espera breve dentro de un botón o un control
|
|
9
|
+
* @example Preset list
|
|
10
|
+
* <LoadingState preset="list" rows={3} />
|
|
11
|
+
* @example Tarjeta con texto visible y brillo
|
|
12
|
+
* <LoadingState preset="card" rows={3} shimmer label="Cargando vista de proceso…" />
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
type LoadingStatePreset = "list" | "card" | "table" | "detail";
|
|
16
|
+
declare function LoadingState({ preset, rows, label, shimmer, className, }: {
|
|
17
|
+
preset?: LoadingStatePreset;
|
|
18
|
+
rows?: number;
|
|
19
|
+
/** Texto visible bajo la forma («Cargando vista de proceso…»); también es el nombre accesible si es texto. */
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
/** Brillo en vez de latido en los bloques. */
|
|
22
|
+
shimmer?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { LoadingState, type LoadingStatePreset };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HeaderControlTone } from '../lib/header-control.js';
|
|
3
|
+
|
|
4
|
+
type LocaleOption = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
short?: string;
|
|
8
|
+
};
|
|
9
|
+
type LocaleSwitcherPreset = "compact" | "menu";
|
|
10
|
+
declare function LocaleSwitcher({ locales, value, onValueChange, preset, tone, className, }: {
|
|
11
|
+
locales: LocaleOption[];
|
|
12
|
+
value: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
preset?: LocaleSwitcherPreset;
|
|
15
|
+
tone?: HeaderControlTone;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { type LocaleOption, LocaleSwitcher, type LocaleSwitcherPreset };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group chat
|
|
5
|
+
* @summary Pinta texto Markdown (GFM) con el aspecto del tema: la respuesta del asistente, sin HTML crudo y cerrando lo que quede abierto mientras llega en streaming.
|
|
6
|
+
* @see code-block — solo un bloque de código
|
|
7
|
+
* @see bubble — burbuja de chat con texto corto sin formato
|
|
8
|
+
* @example Respuesta en streaming
|
|
9
|
+
* <Markdown streaming={isStreaming}>{message.text}</Markdown>
|
|
10
|
+
* @example Dentro de un mensaje del asistente
|
|
11
|
+
* <Message>
|
|
12
|
+
* <MessageContent>
|
|
13
|
+
* <Markdown>{answer}</Markdown>
|
|
14
|
+
* </MessageContent>
|
|
15
|
+
* </Message>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Cierra lo que un texto en streaming deja abierto (vallas de código, negrita, cursiva, tachado) para que se pinte
|
|
20
|
+
* bien mientras llega. Solo toca el final; el texto original no se modifica.
|
|
21
|
+
*/
|
|
22
|
+
declare function closeOpenMarkdown(text: string): string;
|
|
23
|
+
declare function Markdown({ children, streaming, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
24
|
+
children: string;
|
|
25
|
+
/** Texto que aún está llegando: cierra lo que haya quedado abierto. */
|
|
26
|
+
streaming?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { Markdown, closeOpenMarkdown };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const markerVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "separator" | "border" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @group content
|
|
5
|
+
* @summary Tarjeta de rejilla con imagen protagonista (vídeo, curso, producto), título, metadato, insignia sobre la imagen y una acción central (reproducir).
|
|
6
|
+
* @see content-card — tarjeta por intención con portada (media, horizontal, cover) y más estructura
|
|
7
|
+
* @see item — fila de una lista de entidades
|
|
8
|
+
* @see card — tarjeta con anatomía libre
|
|
9
|
+
* @example Vídeo con duración y reproducir
|
|
10
|
+
* <MediaCard
|
|
11
|
+
* src={video.thumbnail}
|
|
12
|
+
* title="Primeros pasos"
|
|
13
|
+
* meta="Curso · 12 lecciones"
|
|
14
|
+
* badge="04:32"
|
|
15
|
+
* action={<Button size="icon" aria-label="Reproducir"><PlayIcon /></Button>}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare function MediaCard({ src, alt, title, meta, badge, action, className, children, ...props }: Omit<React.ComponentProps<"article">, "title"> & {
|
|
20
|
+
src?: string;
|
|
21
|
+
/** Texto alternativo de la imagen; vacío si es decorativa (por defecto). */
|
|
22
|
+
alt?: string;
|
|
23
|
+
title: React.ReactNode;
|
|
24
|
+
meta?: React.ReactNode;
|
|
25
|
+
badge?: React.ReactNode;
|
|
26
|
+
action?: React.ReactNode;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { MediaCard };
|