orbital-ds 0.41.0 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +28 -9
- package/components.manifest.json +6469 -3569
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +7 -0
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/format.js +177 -0
- package/dist/lib/i18n.d.ts +14 -2
- package/dist/lib/i18n.js +32 -2
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +535 -0
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +535 -0
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +535 -0
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +535 -0
- package/dist/styles.css +39 -1
- package/dist/ui/a2ui-renderer.d.ts +11 -0
- package/dist/ui/agent-events.d.ts +17 -0
- package/dist/ui/ai-tag.d.ts +16 -0
- package/dist/ui/alert-dialog.d.ts +37 -0
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/animated-number.d.ts +11 -0
- package/dist/ui/app-bar.d.ts +22 -0
- package/dist/ui/attachment.d.ts +3 -3
- package/dist/ui/auth-backdrop.d.ts +17 -0
- package/dist/ui/auth-form.d.ts +3 -112
- package/dist/ui/auth-form.js +13 -6
- package/dist/ui/auth-layout.d.ts +38 -0
- package/dist/ui/avatar.d.ts +27 -0
- package/dist/ui/ayuda.d.ts +1 -1
- package/dist/ui/ayuda.js +4 -1
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/bottom-nav.d.ts +22 -0
- package/dist/ui/breadcrumb.d.ts +22 -0
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/button-group.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +3 -0
- package/dist/ui/card-stack.d.ts +27 -0
- package/dist/ui/card.d.ts +33 -0
- package/dist/ui/carousel.d.ts +35 -0
- package/dist/ui/carousel.js +10 -5
- package/dist/ui/chain-of-thought.d.ts +15 -0
- package/dist/ui/chart-card.d.ts +19 -0
- package/dist/ui/chart.d.ts +19 -0
- package/dist/ui/chat-composer.d.ts +19 -0
- package/dist/ui/choice-card.d.ts +33 -0
- package/dist/ui/code-block.d.ts +15 -0
- package/dist/ui/combobox.d.ts +48 -0
- package/dist/ui/command-palette.d.ts +18 -0
- package/dist/ui/command.d.ts +34 -0
- package/dist/ui/confirm-action.d.ts +30 -0
- package/dist/ui/confirm-dialog.d.ts +23 -0
- package/dist/ui/content-card.d.ts +14 -0
- package/dist/ui/context-menu.d.ts +35 -0
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/conversation-list.d.ts +20 -0
- package/dist/ui/copy-button.d.ts +11 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/date-time.js +55 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/description-list.js +86 -0
- package/dist/ui/detail-panel.d.ts +22 -0
- package/dist/ui/dialog.d.ts +35 -0
- package/dist/ui/dock.d.ts +17 -0
- package/dist/ui/drawer.d.ts +41 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/echart.d.ts +15 -0
- package/dist/ui/entity-list.d.ts +32 -0
- package/dist/ui/field.d.ts +1 -1
- package/dist/ui/form-layout.d.ts +24 -0
- package/dist/ui/gauge.d.ts +26 -0
- package/dist/ui/generated-image.d.ts +19 -0
- package/dist/ui/generated-table.d.ts +18 -0
- package/dist/ui/heatmap-grid.d.ts +20 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hero.js +145 -0
- package/dist/ui/i18n-provider.d.ts +16 -0
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-otp.d.ts +23 -0
- package/dist/ui/input.d.ts +16 -0
- package/dist/ui/instruction-editor.d.ts +17 -0
- package/dist/ui/item.d.ts +3 -3
- package/dist/ui/label.d.ts +17 -0
- package/dist/ui/legend.d.ts +25 -0
- package/dist/ui/level-meter.d.ts +12 -0
- package/dist/ui/load-more.d.ts +17 -0
- package/dist/ui/loading-state.d.ts +12 -0
- package/dist/ui/markdown.d.ts +15 -0
- package/dist/ui/marker.d.ts +1 -1
- package/dist/ui/media-card.d.ts +16 -0
- package/dist/ui/menubar.d.ts +39 -0
- package/dist/ui/message-actions.d.ts +9 -0
- package/dist/ui/message-scroller.d.ts +30 -0
- package/dist/ui/message.d.ts +33 -0
- package/dist/ui/mfa-challenge.d.ts +3 -32
- package/dist/ui/mfa-challenge.js +1 -1
- package/dist/ui/mfa-setup.d.ts +1 -1
- package/dist/ui/mosaic.d.ts +23 -0
- package/dist/ui/motion-provider.d.ts +17 -0
- package/dist/ui/native-select.d.ts +22 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/next-step-card.js +92 -0
- package/dist/ui/notice-review.d.ts +32 -0
- package/dist/ui/oauth-consent.d.ts +1 -1
- package/dist/ui/page-header.d.ts +46 -4
- package/dist/ui/page-header.js +20 -11
- package/dist/ui/page-loader.d.ts +17 -0
- package/dist/ui/page-shell.d.ts +17 -0
- package/dist/ui/pagination.d.ts +20 -0
- package/dist/ui/pagination.js +2 -2
- package/dist/ui/panel.d.ts +2 -2
- package/dist/ui/password-strength.d.ts +14 -0
- package/dist/ui/popover.d.ts +32 -0
- package/dist/ui/proportion-bar.d.ts +25 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/quantity.js +27 -0
- package/dist/ui/questionnaire.d.ts +38 -0
- package/dist/ui/reasoning.d.ts +14 -0
- package/dist/ui/reveal.d.ts +17 -0
- package/dist/ui/sheet.d.ts +39 -2
- package/dist/ui/sheet.js +6 -2
- package/dist/ui/shield.d.ts +14 -0
- package/dist/ui/show-more.d.ts +14 -0
- package/dist/ui/sidebar.d.ts +5 -3
- package/dist/ui/sidebar.js +7 -3
- package/dist/ui/sparkline.d.ts +1 -1
- package/dist/ui/stat-group.d.ts +32 -0
- package/dist/ui/status-badge.d.ts +2 -2
- package/dist/ui/status-hero.d.ts +18 -0
- package/dist/ui/step-dots.d.ts +12 -0
- package/dist/ui/step-ring.d.ts +14 -0
- package/dist/ui/suggestions.d.ts +9 -0
- package/dist/ui/table.d.ts +26 -0
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/tag-input.js +169 -0
- package/dist/ui/task-loader.d.ts +15 -0
- package/dist/ui/task-progress.d.ts +14 -0
- package/dist/ui/textarea.d.ts +22 -1
- package/dist/ui/textarea.js +7 -1
- package/dist/ui/timeline.d.ts +26 -0
- package/dist/ui/toggle-group.d.ts +24 -0
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tool-call.d.ts +12 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/usage-meter.js +116 -0
- package/dist/ui/week-strip.d.ts +11 -0
- package/dist/ui/week-strip.js +2 -2
- package/dist/ui/workflow-run.d.ts +28 -0
- package/docs/adr/0001-rtl-clases-logicas.md +14 -1
- package/docs/designer/flujo.md +1 -1
- package/docs/designer/patrones.md +40 -1
- package/manifest/actions.json +364 -0
- package/manifest/agents.json +399 -0
- package/manifest/ai.json +128 -0
- package/manifest/auth.json +1547 -0
- package/manifest/chat.json +612 -0
- package/manifest/content.json +2298 -0
- package/manifest/data.json +2904 -0
- package/manifest/feedback.json +1005 -0
- package/manifest/forms.json +1954 -0
- package/manifest/motion.json +196 -0
- package/manifest/navigation.json +1792 -0
- package/manifest/overlays.json +931 -0
- package/package.json +242 -238
- package/scripts/cli.mjs +105 -8
- package/scripts/doctor.mjs +126 -1
- package/scripts/eslint-plugin.mjs +93 -0
- package/scripts/i18n.mjs +1 -1
- package/scripts/manifest.mjs +159 -7
- package/skill/SKILL.md +8 -3
|
@@ -5,6 +5,43 @@ import 'class-variance-authority/types';
|
|
|
5
5
|
import '@base-ui/react/use-render';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @group overlays
|
|
10
|
+
* @summary Diálogo modal que interrumpe para pedir una decisión importante o destructiva, montado por piezas; úsalo cuando el contenido no encaja en ConfirmAction.
|
|
11
|
+
* @see confirm-action — confirmación ya montada (título, descripción, verbo, escribir el nombre) junto a un botón
|
|
12
|
+
* @see confirm-dialog — confirmar desde un manejador con `await confirm(...)`, sin estado de apertura
|
|
13
|
+
* @see dialog — ventana modal que no pide una decisión (formulario corto, detalle)
|
|
14
|
+
* @example Confirmar un borrado (AlertDialogAction no cierra solo: cierra tú tras actuar)
|
|
15
|
+
* <AlertDialog open={open} onOpenChange={setOpen}>
|
|
16
|
+
* <AlertDialogTrigger render={<Button variant="destructive" />}>Eliminar proyecto</AlertDialogTrigger>
|
|
17
|
+
* <AlertDialogContent>
|
|
18
|
+
* <AlertDialogHeader>
|
|
19
|
+
* <AlertDialogTitle>¿Eliminar «Campaña otoño»?</AlertDialogTitle>
|
|
20
|
+
* <AlertDialogDescription>Se borrarán sus 34 tareas. No se puede deshacer.</AlertDialogDescription>
|
|
21
|
+
* </AlertDialogHeader>
|
|
22
|
+
* <AlertDialogFooter>
|
|
23
|
+
* <AlertDialogCancel>Cancelar</AlertDialogCancel>
|
|
24
|
+
* <AlertDialogAction variant="destructive" onClick={() => { remove(); setOpen(false); }}>
|
|
25
|
+
* Eliminar proyecto
|
|
26
|
+
* </AlertDialogAction>
|
|
27
|
+
* </AlertDialogFooter>
|
|
28
|
+
* </AlertDialogContent>
|
|
29
|
+
* </AlertDialog>
|
|
30
|
+
* @example Tamaño pequeño con icono
|
|
31
|
+
* <AlertDialogContent size="sm">
|
|
32
|
+
* <AlertDialogHeader>
|
|
33
|
+
* <AlertDialogMedia>
|
|
34
|
+
* <UploadIcon />
|
|
35
|
+
* </AlertDialogMedia>
|
|
36
|
+
* <AlertDialogTitle>¿Publicar la nueva versión?</AlertDialogTitle>
|
|
37
|
+
* </AlertDialogHeader>
|
|
38
|
+
* <AlertDialogFooter>
|
|
39
|
+
* <AlertDialogCancel>Cancelar</AlertDialogCancel>
|
|
40
|
+
* <AlertDialogAction onClick={publish}>Publicar</AlertDialogAction>
|
|
41
|
+
* </AlertDialogFooter>
|
|
42
|
+
* </AlertDialogContent>
|
|
43
|
+
*/
|
|
44
|
+
|
|
8
45
|
declare function AlertDialog({ ...props }: AlertDialog$1.Root.Props): React.JSX.Element;
|
|
9
46
|
declare function AlertDialogTrigger({ ...props }: AlertDialog$1.Trigger.Props): React.JSX.Element;
|
|
10
47
|
declare function AlertDialogPortal({ ...props }: AlertDialog$1.Portal.Props): React.JSX.Element;
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
|
-
variant?: "info" | "
|
|
6
|
+
variant?: "info" | "success" | "warning" | "danger" | "default" | "destructive" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
9
9
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group data
|
|
5
|
+
* @summary Cifra que rueda como un cuentakilómetros al aparecer o cambiar, para la cifra principal de un resumen. Dentro de un KPI basta con StatValue animate.
|
|
6
|
+
* @see stat — KPI con etiqueta, variación y tono (StatValue animate ya anima la cifra)
|
|
7
|
+
* @see quantity — cifra con unidad que no necesita animarse (tablas, textos, fichas)
|
|
8
|
+
* @example Cifra principal de un resumen
|
|
9
|
+
* <AnimatedNumber value={1284} />
|
|
10
|
+
* @example Con unidad fija (la unidad no rueda)
|
|
11
|
+
* <AnimatedNumber value={12.5} format={(n) => `${n.toFixed(1)} h`} />
|
|
12
|
+
*/
|
|
13
|
+
|
|
3
14
|
declare function AnimatedNumber({ value, format, className, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
4
15
|
value: number;
|
|
5
16
|
/** Cómo escribir el número. Por defecto, `Intl.NumberFormat` del idioma activo. */
|
package/dist/ui/app-bar.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group navigation
|
|
5
|
+
* @summary Barra superior de la app dentro del lienzo: botón de menú, título corto y controles fijos (avisos, idioma, tema). El título de la vista va en PageHeader.
|
|
6
|
+
* @see page-header — título (h1), subtítulo y acciones de la vista, al inicio del contenido
|
|
7
|
+
* @see sidebar — navegación principal lateral; su SidebarTrigger va dentro de la AppBar
|
|
8
|
+
* @see bottom-nav — navegación principal inferior en móvil
|
|
9
|
+
* @example Menú, título, idioma y tema
|
|
10
|
+
* <AppBar>
|
|
11
|
+
* <SidebarTrigger />
|
|
12
|
+
* <AppBarTitle>Clientes</AppBarTitle>
|
|
13
|
+
* <AppBarActions>
|
|
14
|
+
* <LocaleSwitcher locales={locales} value={locale} onValueChange={setLocale} />
|
|
15
|
+
* <ThemeToggle value={theme} onValueChange={setTheme} />
|
|
16
|
+
* </AppBarActions>
|
|
17
|
+
* </AppBar>
|
|
18
|
+
* @example Preset transparent sobre un lienzo flotante
|
|
19
|
+
* <AppBar preset="transparent">
|
|
20
|
+
* <SidebarTrigger />
|
|
21
|
+
* <AppBarTitle>Mapa</AppBarTitle>
|
|
22
|
+
* </AppBar>
|
|
23
|
+
*/
|
|
24
|
+
|
|
3
25
|
type AppBarPreset = "app" | "compact" | "transparent";
|
|
4
26
|
declare function AppBar({ preset, className, ...props }: React.ComponentProps<"header"> & {
|
|
5
27
|
preset?: AppBarPreset;
|
package/dist/ui/attachment.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
import { Button } from './button.js';
|
|
6
6
|
|
|
7
7
|
declare const attachmentVariants: (props?: ({
|
|
8
|
-
size?: "default" | "
|
|
9
|
-
orientation?: "
|
|
8
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
9
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
declare function Attachment({ className, state, size, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & {
|
|
12
12
|
state?: "idle" | "uploading" | "processing" | "error" | "done";
|
|
13
13
|
}): React.JSX.Element;
|
|
14
14
|
declare const attachmentMediaVariants: (props?: ({
|
|
15
|
-
variant?: "
|
|
15
|
+
variant?: "image" | "icon" | null | undefined;
|
|
16
16
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
17
|
declare function AttachmentMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): React.JSX.Element;
|
|
18
18
|
declare function AttachmentContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group auth
|
|
5
|
+
* @summary Fondo decorativo y animado (puntos, rejilla, aurora, malla, anillos, haces o foto de marca) detrás de una pantalla de acceso o una portada; va dentro de un contenedor relativo.
|
|
6
|
+
* @see auth-layout — pantalla de acceso completa: su prop `backdrop` ya monta este fondo
|
|
7
|
+
* @see error-page — página de error con fondo (`backdrop`), sin montarlo a mano
|
|
8
|
+
* @see empty-state — estado vacío con fondo (`backdrop`), sin montarlo a mano
|
|
9
|
+
* @example Detrás de una portada
|
|
10
|
+
* <div className="relative isolate overflow-hidden">
|
|
11
|
+
* <AuthBackdrop variant="dots" />
|
|
12
|
+
* <h1>Bienvenida a Acme</h1>
|
|
13
|
+
* </div>
|
|
14
|
+
* @example Foto de marca teñida con cristal
|
|
15
|
+
* <div className="relative isolate overflow-hidden">
|
|
16
|
+
* <AuthBackdrop variant="image" media={<img src="/portada.jpg" alt="" />} mediaTint="brand" glass />
|
|
17
|
+
* </div>
|
|
18
|
+
*/
|
|
19
|
+
|
|
3
20
|
type AuthBackdropVariant = "none" | "dots" | "grid" | "aurora" | "mesh" | "glow" | "rings" | "beams" | "image";
|
|
4
21
|
declare function AuthBackdrop({ variant, interactive, ink, animated, media, mediaTint, glass, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
5
22
|
variant?: AuthBackdropVariant;
|
package/dist/ui/auth-form.d.ts
CHANGED
|
@@ -1,113 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import 'react';
|
|
2
|
+
import '../lib/auth.js';
|
|
3
|
+
export { b as AuthForm, c as AuthFormPreset, d as AuthFormValues, e as AuthOrganization, A as AuthResult, f as AuthRoute } from '../auth-form-B1hgbXkI.js';
|
|
3
4
|
import '../lib/i18n.js';
|
|
4
|
-
|
|
5
|
-
type AuthFormPreset = "sign-in" | "social" | "sign-up" | "magic-link" | "email-code" | "sso" | "forgot-password" | "reset-password";
|
|
6
|
-
type AuthIdentifierKind = "email" | "username" | "email-or-username";
|
|
7
|
-
type AuthMessage = AuthErrorCode | React.ReactNode;
|
|
8
|
-
type AuthFormValues = {
|
|
9
|
-
identifier: string;
|
|
10
|
-
password: string;
|
|
11
|
-
name: string;
|
|
12
|
-
confirmPassword: string;
|
|
13
|
-
remember: boolean;
|
|
14
|
-
terms: boolean;
|
|
15
|
-
/** Campos extra (`extraFields`) y todo lo demás del formulario. */
|
|
16
|
-
formData: FormData;
|
|
17
|
-
};
|
|
18
|
-
type AuthOrganization = {
|
|
19
|
-
id: string;
|
|
20
|
-
label: React.ReactNode;
|
|
21
|
-
description?: React.ReactNode;
|
|
22
|
-
icon?: React.ReactNode;
|
|
23
|
-
};
|
|
24
|
-
/** Lo que devuelve un callback: error general, errores por campo o la vista siguiente. */
|
|
25
|
-
type AuthResult = void | undefined | {
|
|
26
|
-
error?: AuthMessage;
|
|
27
|
-
fieldErrors?: Partial<Record<AuthField, AuthMessage>>;
|
|
28
|
-
next?: "password" | "code" | "sent" | "sso" | "redirecting";
|
|
29
|
-
};
|
|
30
|
-
/** Ruta que decide la app para un identificador (home realm discovery). */
|
|
31
|
-
type AuthRoute = void | undefined | {
|
|
32
|
-
method: "password" | "sso" | "passkey" | "email-code" | "magic-link";
|
|
33
|
-
/** Puerta por la que entra: plantilla o gente de fuera (se muestra junto al correo). */
|
|
34
|
-
access?: "internal" | "external";
|
|
35
|
-
/** SSO con varias organizaciones para el mismo dominio: se deja elegir. */
|
|
36
|
-
organizations?: AuthOrganization[];
|
|
37
|
-
error?: AuthMessage;
|
|
38
|
-
};
|
|
39
|
-
declare function AuthForm({ preset, title, description, icon, identifier, defaultIdentifier, identifierFirst, onIdentify, audience, entry, fields, extraFields, passwordRules, showStrength, remember, providers, onProvider, providersPlacement, providersLayout, onPasskey, onSso, ssoBy, lastUsed, onSubmit, onVerifyCode, onResend, resendAfter, codeLength, error: errorProp, fieldErrors: fieldErrorsProp, links, submitLabel, footer, className, ...props }: Omit<React.ComponentProps<"div">, "title" | "onSubmit"> & {
|
|
40
|
-
preset?: AuthFormPreset;
|
|
41
|
-
title?: React.ReactNode;
|
|
42
|
-
description?: React.ReactNode;
|
|
43
|
-
/** Icono sobre el título (IconTile, logo de la app…). */
|
|
44
|
-
icon?: React.ReactNode;
|
|
45
|
-
/** Qué identifica a la persona. */
|
|
46
|
-
identifier?: AuthIdentifierKind;
|
|
47
|
-
defaultIdentifier?: string;
|
|
48
|
-
/** sign-in: primero el identificador; luego el método que toque. */
|
|
49
|
-
identifierFirst?: boolean;
|
|
50
|
-
/** Home realm discovery: la app dice qué método le toca a ese identificador. */
|
|
51
|
-
onIdentify?: (identifier: string) => AuthRoute | Promise<AuthRoute>;
|
|
52
|
-
/** Quién puede entrar: explica en pantalla, antes de escribir el correo, qué puerta le toca a cada persona. */
|
|
53
|
-
audience?: "internal" | "external" | "mixed";
|
|
54
|
-
/** Inicio del acceso mixto: `identifier` pide el correo y el dominio decide; `doors` ofrece dos puertas sin escribir: «Continuar con SSO» para el personal y «Acceso para personas externas», que abre el formulario de cuenta propia (correo y contraseña, passkey). Necesita `onSso`. */
|
|
55
|
-
entry?: "identifier" | "doors";
|
|
56
|
-
/** Campos y orden (sign-up y reset-password). */
|
|
57
|
-
fields?: AuthField[];
|
|
58
|
-
/** Campos propios de la app, antes del botón (llegan en `formData`). */
|
|
59
|
-
extraFields?: React.ReactNode;
|
|
60
|
-
passwordRules?: PasswordRules;
|
|
61
|
-
/** Barra de fuerza de la contraseña (sign-up y reset-password por defecto). */
|
|
62
|
-
showStrength?: boolean;
|
|
63
|
-
/** Casilla «mantener la sesión iniciada». */
|
|
64
|
-
remember?: boolean;
|
|
65
|
-
/** SSO o redes sociales (la app pone nombre e icono). */
|
|
66
|
-
providers?: AuthProviderOption[];
|
|
67
|
-
onProvider?: (id: string) => void | Promise<AuthResult>;
|
|
68
|
-
providersPlacement?: "top" | "bottom";
|
|
69
|
-
providersLayout?: "stack" | "grid" | "icons";
|
|
70
|
-
/** Entrar con passkey (y autocompletado de passkeys en el campo del identificador). */
|
|
71
|
-
onPasskey?: () => void | Promise<AuthResult>;
|
|
72
|
-
/** SSO de empresa: enlace «usar SSO» en sign-in y envío del preset sso. */
|
|
73
|
-
onSso?: (input: {
|
|
74
|
-
identifier: string;
|
|
75
|
-
organization?: string;
|
|
76
|
-
}) => AuthResult | Promise<AuthResult | {
|
|
77
|
-
organizations: AuthOrganization[];
|
|
78
|
-
}>;
|
|
79
|
-
/** sso: se identifica por correo de trabajo o por organización. */
|
|
80
|
-
ssoBy?: "email" | "organization";
|
|
81
|
-
/** Último método usado en este dispositivo: id de proveedor, "passkey", "sso" o "password". */
|
|
82
|
-
lastUsed?: string | null;
|
|
83
|
-
onSubmit?: (values: AuthFormValues) => AuthResult | Promise<AuthResult>;
|
|
84
|
-
/** email-code: verifica el código (se llama al completarse). */
|
|
85
|
-
onVerifyCode?: (code: string, values: {
|
|
86
|
-
identifier: string;
|
|
87
|
-
}) => AuthResult | Promise<AuthResult>;
|
|
88
|
-
/** Reenviar enlace o código. */
|
|
89
|
-
onResend?: (values: {
|
|
90
|
-
identifier: string;
|
|
91
|
-
}) => void | Promise<void>;
|
|
92
|
-
/** Segundos hasta poder reenviar. */
|
|
93
|
-
resendAfter?: number;
|
|
94
|
-
codeLength?: number;
|
|
95
|
-
/** Error controlado por la app. */
|
|
96
|
-
error?: AuthMessage;
|
|
97
|
-
fieldErrors?: Partial<Record<AuthField, AuthMessage>>;
|
|
98
|
-
/** Enlaces: URL o función del router. */
|
|
99
|
-
links?: {
|
|
100
|
-
signIn?: AuthLink;
|
|
101
|
-
email?: AuthLink;
|
|
102
|
-
signUp?: AuthLink;
|
|
103
|
-
requestAccess?: AuthLink;
|
|
104
|
-
forgotPassword?: AuthLink;
|
|
105
|
-
terms?: AuthLink;
|
|
106
|
-
privacy?: AuthLink;
|
|
107
|
-
};
|
|
108
|
-
submitLabel?: React.ReactNode;
|
|
109
|
-
/** Sustituye el pie de enlaces. */
|
|
110
|
-
footer?: React.ReactNode;
|
|
111
|
-
}): React.JSX.Element;
|
|
112
|
-
|
|
113
|
-
export { AuthForm, type AuthFormPreset, type AuthFormValues, type AuthOrganization, type AuthResult, type AuthRoute };
|
package/dist/ui/auth-form.js
CHANGED
|
@@ -21,6 +21,7 @@ import { Checkbox } from "./checkbox.js";
|
|
|
21
21
|
import { IconTile } from "./icon-tile.js";
|
|
22
22
|
import { Input } from "./input.js";
|
|
23
23
|
import { InputOTP, InputOTPGroup, InputOTPSlot } from "./input-otp.js";
|
|
24
|
+
import { MfaChallenge } from "./mfa-challenge.js";
|
|
24
25
|
import { Label } from "./label.js";
|
|
25
26
|
import { PasswordInput } from "./password-input.js";
|
|
26
27
|
import { PasswordStrength } from "./password-strength.js";
|
|
@@ -59,6 +60,7 @@ function AuthForm({
|
|
|
59
60
|
onSso,
|
|
60
61
|
ssoBy = "email",
|
|
61
62
|
lastUsed,
|
|
63
|
+
mfa,
|
|
62
64
|
onSubmit,
|
|
63
65
|
onVerifyCode,
|
|
64
66
|
onResend,
|
|
@@ -80,6 +82,7 @@ function AuthForm({
|
|
|
80
82
|
const stepFirst = preset === "sign-in" && !doors && (identifierFirst ?? d.identifierFirst);
|
|
81
83
|
const strength = showStrength ?? d.strength;
|
|
82
84
|
const uid = React.useId();
|
|
85
|
+
const fallbackView = preset === "sso" ? "sso" : doors ? "doors" : "form";
|
|
83
86
|
const ids = (f) => `${uid}-${f}`;
|
|
84
87
|
const [view, setView] = React.useState(preset === "sso" ? "sso" : doors ? "doors" : "form");
|
|
85
88
|
const [values, setValues] = React.useState({ identifier: defaultIdentifier, password: "", name: "", confirmPassword: "", remember: false, terms: false });
|
|
@@ -93,6 +96,7 @@ function AuthForm({
|
|
|
93
96
|
const formRef = React.useRef(null);
|
|
94
97
|
if (preset === "sign-up" && !list.includes("identifier")) dsWarn("AuthForm", 'preset "sign-up" without "identifier" in `fields`.');
|
|
95
98
|
if (preset === "email-code" && !onVerifyCode) dsWarn("AuthForm", 'preset "email-code" expects `onVerifyCode`.');
|
|
99
|
+
if (!mfa && view === "mfa") dsWarn("AuthForm", 'a callback returned `next: "mfa"` but there is no `mfa` prop.');
|
|
96
100
|
if (preset === "sso" && !onSso) dsWarn("AuthForm", 'preset "sso" expects `onSso`.');
|
|
97
101
|
const shownError = errorProp ?? error;
|
|
98
102
|
const fieldError = (f) => fieldErrorsProp?.[f] ?? errors[f];
|
|
@@ -384,9 +388,9 @@ function AuthForm({
|
|
|
384
388
|
onPasskey && (preset === "sign-in" || preset === "social") ? /* @__PURE__ */ jsx(AuthPasskeyButton, { pending: pending === "passkey", disabled: pending != null && pending !== "passkey", lastUsed: lastUsed === "passkey", onClick: () => void run("passkey", async () => apply(await onPasskey() ?? void 0, null)) }) : null
|
|
385
389
|
] }) : null;
|
|
386
390
|
const divider = providersBlock && preset !== "social" ? /* @__PURE__ */ jsx(AuthStagger, { index: 2, children: /* @__PURE__ */ jsx(AuthDivider, {}) }) : null;
|
|
387
|
-
const backToForm = /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "self-start", onClick: () => go(preset === "sso" ? "sso" : "form"), children: [
|
|
388
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
389
|
-
t.authUseDifferentEmail
|
|
391
|
+
const backToForm = /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "self-start", onClick: () => go(doors && view !== "code" && view !== "sent" ? "doors" : preset === "sso" ? "sso" : "form"), children: [
|
|
392
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "rtl:rotate-180" }),
|
|
393
|
+
doors && view !== "code" && view !== "sent" ? t.authBackToSignIn : t.authUseDifferentEmail
|
|
390
394
|
] });
|
|
391
395
|
let content;
|
|
392
396
|
if (view === "sent") {
|
|
@@ -483,10 +487,13 @@ function AuthForm({
|
|
|
483
487
|
] })
|
|
484
488
|
] })
|
|
485
489
|
] });
|
|
490
|
+
} else if (view === "mfa" && mfa) {
|
|
491
|
+
content = /* @__PURE__ */ jsx(MfaChallenge, { ...mfa, onCancel: () => go(fallbackView) });
|
|
486
492
|
} else if (view === "redirecting") {
|
|
487
493
|
content = /* @__PURE__ */ jsxs("div", { "data-slot": "auth-form-redirecting", role: "status", className: "flex flex-col items-center gap-4 py-6 text-center", children: [
|
|
488
494
|
/* @__PURE__ */ jsx(Spinner, { className: "size-6" }),
|
|
489
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.authSsoRedirecting })
|
|
495
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.authSsoRedirecting }),
|
|
496
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => go(fallbackView), children: t.authCancel })
|
|
490
497
|
] });
|
|
491
498
|
} else {
|
|
492
499
|
const ssoView = view === "sso";
|
|
@@ -527,11 +534,11 @@ function AuthForm({
|
|
|
527
534
|
t.authUseSso
|
|
528
535
|
] }) }) : null,
|
|
529
536
|
doors && view === "form" ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "self-center", onClick: () => go("doors"), children: [
|
|
530
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
537
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "rtl:rotate-180" }),
|
|
531
538
|
t.authBackToSignIn
|
|
532
539
|
] }) : null,
|
|
533
540
|
ssoView && (preset === "sign-in" || preset === "social") ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "self-center", onClick: () => go(doors ? "doors" : "form"), children: [
|
|
534
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
541
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "rtl:rotate-180" }),
|
|
535
542
|
t.authBackToSignIn
|
|
536
543
|
] }) : null
|
|
537
544
|
] });
|
package/dist/ui/auth-layout.d.ts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AuthBackdropVariant } from './auth-backdrop.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @group auth
|
|
6
|
+
* @summary Maqueta de la pantalla de acceso (centered, split, cover, banner, minimal) con logo, fondo, panel de marca e idioma y tema en la esquina; dentro va AuthForm u otra pieza de acceso.
|
|
7
|
+
* @see page-shell — maqueta de una página de la app ya dentro (no de acceso)
|
|
8
|
+
* @see error-page — 404, 500, sin conexión o mantenimiento
|
|
9
|
+
* @see auth-backdrop — solo el fondo animado, detrás de otra superficie
|
|
10
|
+
* @example Centrada, con idioma y tema siempre visibles
|
|
11
|
+
* <AuthLayout
|
|
12
|
+
* preset="centered"
|
|
13
|
+
* logo={<img src="/logo.svg" alt="Acme" />}
|
|
14
|
+
* toolbar={
|
|
15
|
+
* <>
|
|
16
|
+
* <LocaleSwitcher locales={locales} value={lang} onValueChange={setLang} />
|
|
17
|
+
* <ThemeToggle value={theme} onValueChange={setTheme} />
|
|
18
|
+
* </>
|
|
19
|
+
* }
|
|
20
|
+
* >
|
|
21
|
+
* <AuthForm preset="sign-in" onSubmit={signIn} />
|
|
22
|
+
* </AuthLayout>
|
|
23
|
+
* @example Panel de marca a un lado (preset split)
|
|
24
|
+
* <AuthLayout
|
|
25
|
+
* preset="split"
|
|
26
|
+
* logo={<img src="/logo.svg" alt="Acme" />}
|
|
27
|
+
* aside={
|
|
28
|
+
* <AuthAside>
|
|
29
|
+
* <AuthAsideTitle>Todo tu equipo, en un solo lugar</AuthAsideTitle>
|
|
30
|
+
* <AuthAsideText>Entra con tu método favorito.</AuthAsideText>
|
|
31
|
+
* </AuthAside>
|
|
32
|
+
* }
|
|
33
|
+
* >
|
|
34
|
+
* <AuthForm preset="social" providers={authProviders(["google", "microsoft"])} onProvider={signInSocial} />
|
|
35
|
+
* </AuthLayout>
|
|
36
|
+
* @example Sin tarjeta para una app interna
|
|
37
|
+
* <AuthLayout preset="minimal" backdrop="none">
|
|
38
|
+
* <AuthForm preset="sso" onSso={signInSso} />
|
|
39
|
+
* </AuthLayout>
|
|
40
|
+
*/
|
|
41
|
+
|
|
4
42
|
type AuthLayoutPreset = "centered" | "split" | "cover" | "banner" | "minimal";
|
|
5
43
|
type AuthSurface = "solid" | "glass" | "elevated" | "plain";
|
|
6
44
|
type AuthShape = "rounded" | "soft" | "sharp";
|
package/dist/ui/avatar.d.ts
CHANGED
|
@@ -2,6 +2,33 @@ import * as React from 'react';
|
|
|
2
2
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
3
3
|
import { DsDataTone } from './legend.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @group content
|
|
7
|
+
* @summary Foto o iniciales que identifican a una persona (o cuenta), con insignia de estado opcional y grupos solapados con contador.
|
|
8
|
+
* @see icon-tile — icono en baldosa tintada para objetos que no son personas
|
|
9
|
+
* @see badge — etiqueta de texto o de estado, no una identidad
|
|
10
|
+
* @example Foto con iniciales de respaldo
|
|
11
|
+
* <Avatar>
|
|
12
|
+
* <AvatarImage src={user.avatarUrl} alt="" />
|
|
13
|
+
* <AvatarFallback>LM</AvatarFallback>
|
|
14
|
+
* </Avatar>
|
|
15
|
+
* @example Iniciales con tono y tamaño
|
|
16
|
+
* <Avatar size="lg">
|
|
17
|
+
* <AvatarFallback tone="info">AR</AvatarFallback>
|
|
18
|
+
* </Avatar>
|
|
19
|
+
* @example Grupo con contador
|
|
20
|
+
* <AvatarGroup>
|
|
21
|
+
* <Avatar size="sm">
|
|
22
|
+
* <AvatarFallback>AR</AvatarFallback>
|
|
23
|
+
* </Avatar>
|
|
24
|
+
* <Avatar size="sm">
|
|
25
|
+
* <AvatarFallback>JO</AvatarFallback>
|
|
26
|
+
* </Avatar>
|
|
27
|
+
* <AvatarGroupCount>+5</AvatarGroupCount>
|
|
28
|
+
* </AvatarGroup>
|
|
29
|
+
* @note Pon siempre AvatarFallback (iniciales) aunque haya foto: se ve mientras carga o si falla. Si el nombre ya está escrito al lado, la imagen lleva `alt=""`.
|
|
30
|
+
*/
|
|
31
|
+
|
|
5
32
|
declare function Avatar({ className, size, ...props }: Avatar$1.Root.Props & {
|
|
6
33
|
size?: "default" | "sm" | "lg";
|
|
7
34
|
}): React.JSX.Element;
|
package/dist/ui/ayuda.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React$1 from 'react';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
/** Texto de ayuda. Una o dos frases: si necesita más, el sitio es la propia pantalla, no esto. */
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
/** Para lectores de pantalla: qué término se está explicando (p. ej. «Qué es
|
|
6
|
+
/** Para lectores de pantalla: qué término se está explicando (p. ej. «banda»; se anuncia como «Qué es: banda»). */
|
|
7
7
|
etiqueta: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
package/dist/ui/ayuda.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CircleHelpIcon } from "lucide-react";
|
|
3
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
4
|
+
import { dsFormat } from "../lib/i18n.js";
|
|
3
5
|
import {
|
|
4
6
|
Popover,
|
|
5
7
|
PopoverContent,
|
|
6
8
|
PopoverTrigger
|
|
7
9
|
} from "./popover.js";
|
|
8
10
|
function Ayuda({ children, etiqueta }) {
|
|
11
|
+
const t = useDsMessages();
|
|
9
12
|
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
10
13
|
/* @__PURE__ */ jsx(
|
|
11
14
|
PopoverTrigger,
|
|
12
15
|
{
|
|
13
16
|
"data-slot": "help-trigger",
|
|
14
17
|
type: "button",
|
|
15
|
-
"aria-label":
|
|
18
|
+
"aria-label": dsFormat(t.helpAbout, { term: etiqueta }),
|
|
16
19
|
className: "text-muted-foreground hover:text-foreground inline-flex shrink-0 items-center rounded-full outline-none focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
|
|
17
20
|
children: /* @__PURE__ */ jsx(CircleHelpIcon, { "aria-hidden": "true", className: "size-3.5" })
|
|
18
21
|
}
|
package/dist/ui/banner.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const bannerVariants: (props?: ({
|
|
6
|
-
variant?: "info" | "
|
|
6
|
+
variant?: "info" | "success" | "warning" | "danger" | "default" | "brand" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
declare function Banner({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bannerVariants>): React.JSX.Element;
|
|
9
9
|
declare function BannerContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/bottom-nav.d.ts
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
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 Navegación principal inferior de móvil con 3–5 destinos de primer nivel (icono y texto). En escritorio, la navegación principal es Sidebar.
|
|
7
|
+
* @see sidebar — navegación principal en escritorio, con grupos y muchos destinos
|
|
8
|
+
* @see dock — raíl de solo iconos con efecto lupa, sin textos
|
|
9
|
+
* @see tabs — cambiar entre vistas de una misma página, no entre destinos de la app
|
|
10
|
+
* @example Destinos con enlace del router y contador
|
|
11
|
+
* <BottomNav>
|
|
12
|
+
* <BottomNavItem active render={<Link to="/" />}>
|
|
13
|
+
* <BottomNavIcon><HouseIcon /></BottomNavIcon>
|
|
14
|
+
* <BottomNavLabel>Inicio</BottomNavLabel>
|
|
15
|
+
* </BottomNavItem>
|
|
16
|
+
* <BottomNavItem render={<Link to="/inbox" />}>
|
|
17
|
+
* <BottomNavIcon>
|
|
18
|
+
* <InboxIcon />
|
|
19
|
+
* <BottomNavBadge>3</BottomNavBadge>
|
|
20
|
+
* </BottomNavIcon>
|
|
21
|
+
* <BottomNavLabel>Avisos</BottomNavLabel>
|
|
22
|
+
* </BottomNavItem>
|
|
23
|
+
* </BottomNav>
|
|
24
|
+
*/
|
|
25
|
+
|
|
4
26
|
declare function BottomNav({ className, position, ...props }: React.ComponentProps<"nav"> & {
|
|
5
27
|
position?: "fixed" | "static";
|
|
6
28
|
}): React.JSX.Element;
|
package/dist/ui/breadcrumb.d.ts
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
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 Migas de pan: dónde está la persona dentro de una jerarquía (sección › entidad) y cómo subir a un nivel superior.
|
|
7
|
+
* @see page-header — su hueco PageHeaderBreadcrumb coloca las migas sobre el título de la vista
|
|
8
|
+
* @see tabs — cambiar entre vistas hermanas, no subir de nivel
|
|
9
|
+
* @see stepper — pasos de un proceso, no niveles de una jerarquía
|
|
10
|
+
* @example Sección y entidad actual
|
|
11
|
+
* <Breadcrumb>
|
|
12
|
+
* <BreadcrumbList>
|
|
13
|
+
* <BreadcrumbItem>
|
|
14
|
+
* <BreadcrumbLink render={<Link to="/clients" />}>Clientes</BreadcrumbLink>
|
|
15
|
+
* </BreadcrumbItem>
|
|
16
|
+
* <BreadcrumbSeparator />
|
|
17
|
+
* <BreadcrumbItem>
|
|
18
|
+
* <BreadcrumbPage>Construcciones Levante</BreadcrumbPage>
|
|
19
|
+
* </BreadcrumbItem>
|
|
20
|
+
* </BreadcrumbList>
|
|
21
|
+
* </Breadcrumb>
|
|
22
|
+
* @note El último nivel es BreadcrumbPage (no es enlace); con un router, BreadcrumbLink usa `render={<Link … />}`, nunca asChild.
|
|
23
|
+
* @note Con más de 4 niveles, recorta los intermedios con BreadcrumbEllipsis.
|
|
24
|
+
*/
|
|
25
|
+
|
|
4
26
|
declare function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
5
27
|
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
6
28
|
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -85,7 +85,7 @@ function BreadcrumbSeparator({
|
|
|
85
85
|
"aria-hidden": "true",
|
|
86
86
|
className: cn("[&>svg]:size-3.5", className),
|
|
87
87
|
...props,
|
|
88
|
-
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
88
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { className: "rtl:rotate-180" })
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
91
|
}
|
package/dist/ui/bubble.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
7
|
declare const bubbleVariants: (props?: ({
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "muted" | "tinted" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
|
|
11
11
|
align?: "start" | "end";
|
|
@@ -6,7 +6,7 @@ import { Separator } from './separator.js';
|
|
|
6
6
|
import '@base-ui/react/separator';
|
|
7
7
|
|
|
8
8
|
declare const buttonGroupVariants: (props?: ({
|
|
9
|
-
orientation?: "
|
|
9
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): React$1.JSX.Element;
|
|
12
12
|
declare function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "icon" | "default" | "
|
|
7
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | "cta" | null | undefined;
|
|
8
|
+
size?: "icon" | "default" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Button({ className, variant, size, render, nativeButton: _nativeButton, ...props }: useRender.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
11
11
|
nativeButton?: boolean;
|
package/dist/ui/calendar.d.ts
CHANGED
|
@@ -5,6 +5,19 @@ import 'class-variance-authority/types';
|
|
|
5
5
|
import '@base-ui/react/use-render';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @group forms
|
|
10
|
+
* @summary Calendario mensual siempre visible para elegir un día o un rango (react-day-picker); base de DatePicker.
|
|
11
|
+
* @see date-picker — elegir una fecha o un rango en un formulario, desde un botón que abre el calendario
|
|
12
|
+
* @see week-strip — moverse por los días de una semana en una agenda
|
|
13
|
+
* @example Un día
|
|
14
|
+
* <Calendar mode="single" selected={fecha} onSelect={setFecha} />
|
|
15
|
+
* @example Rango en dos meses
|
|
16
|
+
* <Calendar mode="range" numberOfMonths={2} selected={rango} onSelect={setRango} />
|
|
17
|
+
* @note En un formulario usa DatePicker o DateRangePicker: ya traen botón, idioma, límites y confirmación.
|
|
18
|
+
* @note react-day-picker es dependencia opcional de la app; `captionLayout="dropdown"` añade selectores de mes y año.
|
|
19
|
+
*/
|
|
20
|
+
|
|
8
21
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
9
22
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
10
23
|
}): React.JSX.Element;
|
package/dist/ui/calendar.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "react-day-picker";
|
|
9
9
|
import { Button, buttonVariants } from "./button.js";
|
|
10
10
|
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
11
|
+
import { useDirection } from "@base-ui/react/direction-provider";
|
|
11
12
|
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react";
|
|
12
13
|
function Calendar({
|
|
13
14
|
className,
|
|
@@ -22,9 +23,11 @@ function Calendar({
|
|
|
22
23
|
}) {
|
|
23
24
|
const defaultClassNames = getDefaultClassNames();
|
|
24
25
|
const t = useDsMessages();
|
|
26
|
+
const direction = useDirection();
|
|
25
27
|
return /* @__PURE__ */ jsx(
|
|
26
28
|
DayPicker,
|
|
27
29
|
{
|
|
30
|
+
dir: direction,
|
|
28
31
|
showOutsideDays,
|
|
29
32
|
className: cn(
|
|
30
33
|
"group/calendar bg-background p-3 [--cell-radius:var(--radius-control)] [--cell-size:var(--ds-control-h-sm)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
package/dist/ui/card-stack.d.ts
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @group content
|
|
5
|
+
* @summary Baraja controlada de pocas tarjetas que se atienden de una en una: la de delante es la activa y las siguientes asoman detrás; la app avanza `index`.
|
|
6
|
+
* @see carousel — recorrer varias piezas del mismo nivel con flechas o deslizando
|
|
7
|
+
* @see item — lista normal de entidades, todas visibles a la vez
|
|
8
|
+
* @example Recordatorios que se descartan
|
|
9
|
+
* const [i, setI] = React.useState(0)
|
|
10
|
+
* <CardStack index={i}>
|
|
11
|
+
* <Item variant="card">
|
|
12
|
+
* <ItemContent>
|
|
13
|
+
* <ItemTitle>Revisa la factura de mayo</ItemTitle>
|
|
14
|
+
* </ItemContent>
|
|
15
|
+
* <ItemActions>
|
|
16
|
+
* <Button size="sm" onClick={() => setI(i + 1)}>Hecho</Button>
|
|
17
|
+
* </ItemActions>
|
|
18
|
+
* </Item>
|
|
19
|
+
* <Item variant="card">
|
|
20
|
+
* <ItemContent>
|
|
21
|
+
* <ItemTitle>Confirma tu correo</ItemTitle>
|
|
22
|
+
* </ItemContent>
|
|
23
|
+
* <ItemActions>
|
|
24
|
+
* <Button size="sm" onClick={() => setI(i + 1)}>Hecho</Button>
|
|
25
|
+
* </ItemActions>
|
|
26
|
+
* </Item>
|
|
27
|
+
* </CardStack>
|
|
28
|
+
*/
|
|
29
|
+
|
|
3
30
|
declare function CardStack({ index, className, style, children, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
4
31
|
/** Posición de la tarjeta de delante (se envuelve: pasado el final vuelve a la primera). */
|
|
5
32
|
index: number;
|