orbital-ds 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/AGENTS.md +303 -273
  2. package/components.manifest.json +526 -12
  3. package/dist/hooks/use-ds-messages.d.ts +205 -0
  4. package/dist/lib/auth-better-auth.d.ts +29 -0
  5. package/dist/lib/auth-better-auth.js +60 -0
  6. package/dist/lib/auth-flow.d.ts +83 -0
  7. package/dist/lib/auth-flow.js +152 -0
  8. package/dist/lib/auth-providers.d.ts +194 -0
  9. package/dist/lib/auth-providers.js +64 -0
  10. package/dist/lib/auth.d.ts +68 -0
  11. package/dist/lib/auth.js +110 -0
  12. package/dist/lib/header-control.d.ts +4 -0
  13. package/dist/lib/header-control.js +14 -0
  14. package/dist/lib/i18n.d.ts +205 -0
  15. package/dist/lib/i18n.js +624 -3
  16. package/dist/ui/app-bar.d.ts +10 -0
  17. package/dist/ui/app-bar.js +51 -0
  18. package/dist/ui/attachment.js +1 -1
  19. package/dist/ui/auth-backdrop.d.ts +20 -0
  20. package/dist/ui/auth-backdrop.js +137 -0
  21. package/dist/ui/auth-form.d.ts +111 -0
  22. package/dist/ui/auth-form.js +531 -0
  23. package/dist/ui/auth-layout.d.ts +70 -0
  24. package/dist/ui/auth-layout.js +283 -0
  25. package/dist/ui/auth-parts.d.ts +43 -0
  26. package/dist/ui/auth-parts.js +159 -0
  27. package/dist/ui/auth-status.d.ts +23 -0
  28. package/dist/ui/auth-status.js +99 -0
  29. package/dist/ui/badge.js +2 -2
  30. package/dist/ui/button.js +1 -1
  31. package/dist/ui/connected-accounts.d.ts +25 -0
  32. package/dist/ui/connected-accounts.js +89 -0
  33. package/dist/ui/content-card.d.ts +6 -2
  34. package/dist/ui/content-card.js +27 -3
  35. package/dist/ui/dropzone.js +1 -1
  36. package/dist/ui/empty-state.d.ts +10 -1
  37. package/dist/ui/empty-state.js +28 -7
  38. package/dist/ui/error-page.d.ts +10 -1
  39. package/dist/ui/error-page.js +74 -28
  40. package/dist/ui/icon-tile.d.ts +1 -1
  41. package/dist/ui/input-otp.js +2 -1
  42. package/dist/ui/item.js +1 -1
  43. package/dist/ui/legend.js +1 -1
  44. package/dist/ui/locale-switcher.d.ts +19 -0
  45. package/dist/ui/locale-switcher.js +54 -0
  46. package/dist/ui/menubar.js +1 -1
  47. package/dist/ui/message-scroller.js +1 -1
  48. package/dist/ui/mfa-challenge.d.ts +33 -0
  49. package/dist/ui/mfa-challenge.js +214 -0
  50. package/dist/ui/mfa-setup.d.ts +29 -0
  51. package/dist/ui/mfa-setup.js +196 -0
  52. package/dist/ui/navigation-menu.js +2 -2
  53. package/dist/ui/notice-review.d.ts +1 -0
  54. package/dist/ui/notifications.d.ts +12 -2
  55. package/dist/ui/notifications.js +28 -5
  56. package/dist/ui/oauth-consent.d.ts +54 -0
  57. package/dist/ui/oauth-consent.js +208 -0
  58. package/dist/ui/passkey-list.d.ts +17 -0
  59. package/dist/ui/passkey-list.js +112 -0
  60. package/dist/ui/password-input.d.ts +5 -0
  61. package/dist/ui/password-input.js +77 -0
  62. package/dist/ui/session-list.d.ts +19 -0
  63. package/dist/ui/session-list.js +70 -0
  64. package/dist/ui/session-timeout.d.ts +13 -0
  65. package/dist/ui/session-timeout.js +87 -0
  66. package/dist/ui/sidebar.d.ts +27 -5
  67. package/dist/ui/sidebar.js +56 -11
  68. package/dist/ui/sign-out-dialog.d.ts +17 -0
  69. package/dist/ui/sign-out-dialog.js +82 -0
  70. package/dist/ui/stat-group.d.ts +1 -1
  71. package/dist/ui/stat-group.js +6 -2
  72. package/dist/ui/stat.d.ts +24 -5
  73. package/dist/ui/stat.js +124 -19
  74. package/dist/ui/status-badge.d.ts +1 -1
  75. package/dist/ui/theme-toggle.d.ts +14 -0
  76. package/dist/ui/theme-toggle.js +112 -0
  77. package/dist/ui/toggle.js +2 -2
  78. package/dist/ui/week-strip.js +1 -1
  79. package/docs/CONTRACT.md +1 -1
  80. package/docs/designer/patrones.md +27 -0
  81. package/docs/designer/revision.md +8 -0
  82. package/package.json +3 -2
  83. package/scripts/brand-core.d.mts +2 -0
  84. package/scripts/brand-core.mjs +21 -1
  85. package/scripts/cli.mjs +452 -452
  86. package/scripts/doctor.mjs +3 -0
  87. package/scripts/init.mjs +7 -3
  88. package/dist/motion.css +0 -146
  89. package/dist/styles.css +0 -1240
  90. package/dist/themes/fractalia.css +0 -549
  91. package/dist/themes/fractalia.fonts.css +0 -3
  92. package/dist/themes/fractalia.guide.md +0 -86
  93. package/dist/themes/fractalia.meta.json +0 -112
  94. package/dist/themes/fractalia.scoped.css +0 -549
  95. package/dist/themes/fractalia.tokens.json +0 -39
  96. package/dist/themes/friendly.css +0 -367
  97. package/dist/themes/friendly.fonts.css +0 -2
  98. package/dist/themes/friendly.guide.md +0 -38
  99. package/dist/themes/friendly.meta.json +0 -82
  100. package/dist/themes/friendly.scoped.css +0 -367
  101. package/dist/themes/friendly.tokens.json +0 -45
  102. package/dist/themes/lagoon.css +0 -348
  103. package/dist/themes/lagoon.fonts.css +0 -2
  104. package/dist/themes/lagoon.guide.md +0 -47
  105. package/dist/themes/lagoon.meta.json +0 -84
  106. package/dist/themes/lagoon.scoped.css +0 -348
  107. package/dist/themes/lagoon.tokens.json +0 -49
  108. package/dist/themes/liquid.css +0 -502
  109. package/dist/themes/liquid.fonts.css +0 -7
  110. package/dist/themes/liquid.guide.md +0 -82
  111. package/dist/themes/liquid.meta.json +0 -134
  112. package/dist/themes/liquid.scoped.css +0 -502
  113. package/dist/themes/liquid.tokens.json +0 -47
  114. package/dist/themes/qratia.css +0 -260
  115. package/dist/themes/qratia.fonts.css +0 -2
  116. package/dist/themes/qratia.guide.md +0 -34
  117. package/dist/themes/qratia.meta.json +0 -49
  118. package/dist/themes/qratia.scoped.css +0 -260
  119. package/dist/themes/qratia.tokens.json +0 -49
  120. package/dist/themes/tactile.css +0 -588
  121. package/dist/themes/tactile.fonts.css +0 -3
  122. package/dist/themes/tactile.guide.md +0 -82
  123. package/dist/themes/tactile.meta.json +0 -182
  124. package/dist/themes/tactile.scoped.css +0 -588
  125. package/dist/themes/tactile.tokens.json +0 -42
  126. package/dist/themes/twitter.css +0 -357
  127. package/dist/themes/twitter.fonts.css +0 -6
  128. package/dist/themes/twitter.guide.md +0 -35
  129. package/dist/themes/twitter.meta.json +0 -90
  130. package/dist/themes/twitter.scoped.css +0 -357
  131. package/dist/themes/twitter.tokens.json +0 -45
  132. package/dist/themes/zyro.css +0 -434
  133. package/dist/themes/zyro.fonts.css +0 -2
  134. package/dist/themes/zyro.guide.md +0 -33
  135. package/dist/themes/zyro.meta.json +0 -74
  136. package/dist/themes/zyro.scoped.css +0 -434
  137. package/dist/themes/zyro.tokens.json +0 -46
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ type AppBarPreset = "app" | "compact" | "transparent";
4
+ declare function AppBar({ preset, className, ...props }: React.ComponentProps<"header"> & {
5
+ preset?: AppBarPreset;
6
+ }): React.JSX.Element;
7
+ declare function AppBarTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function AppBarActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+
10
+ export { AppBar, AppBarActions, type AppBarPreset, AppBarTitle };
@@ -0,0 +1,51 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ const APPBAR_PRESETS = {
4
+ app: "",
5
+ compact: "[--ds-appbar-h:var(--ds-appbar-h-compact)]",
6
+ transparent: "[--ds-appbar-bg:transparent] [--ds-appbar-border:transparent]"
7
+ };
8
+ function AppBar({
9
+ preset = "app",
10
+ className,
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(
14
+ "header",
15
+ {
16
+ "data-slot": "app-bar",
17
+ "data-preset": preset,
18
+ className: cn(
19
+ "flex h-(--ds-appbar-h) shrink-0 items-center gap-(--ds-appbar-gap) border-b border-(--ds-appbar-border) bg-(--ds-appbar-bg) px-(--ds-appbar-px)",
20
+ APPBAR_PRESETS[preset],
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function AppBarTitle({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ "data-slot": "app-bar-title",
32
+ className: cn("min-w-0 flex-1 truncate text-sm font-(--ds-title-weight)", className),
33
+ ...props
34
+ }
35
+ );
36
+ }
37
+ function AppBarActions({ className, ...props }) {
38
+ return /* @__PURE__ */ jsx(
39
+ "div",
40
+ {
41
+ "data-slot": "app-bar-actions",
42
+ className: cn("ms-auto flex shrink-0 items-center gap-(--ds-appbar-gap)", className),
43
+ ...props
44
+ }
45
+ );
46
+ }
47
+ export {
48
+ AppBar,
49
+ AppBarActions,
50
+ AppBarTitle
51
+ };
@@ -5,7 +5,7 @@ import { cva } from "class-variance-authority";
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { Button } from "./button.js";
7
7
  const attachmentVariants = cva(
8
- "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-chip border bg-card text-card-foreground transition-colors duration-(--ds-motion-snap) focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-danger/30 data-[state=idle]:border-dashed",
8
+ "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-chip border bg-card text-card-foreground transition-colors duration-(--ds-motion-snap) focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-[>a,>button]:hover:bg-(--ds-row-hover) data-[state=error]:border-danger/30 data-[state=idle]:border-dashed",
9
9
  {
10
10
  variants: {
11
11
  size: {
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+
3
+ type AuthBackdropVariant = "none" | "dots" | "grid" | "aurora" | "mesh" | "glow" | "rings" | "beams" | "image";
4
+ declare function AuthBackdrop({ variant, interactive, ink, animated, media, mediaTint, glass, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
5
+ variant?: AuthBackdropVariant;
6
+ /** image: la foto o el vídeo (un <img>/<video> con alt=""). */
7
+ media?: React.ReactNode;
8
+ /** image: tinte de marca (brand), dos tintas (duotone) o la foto tal cual (none). */
9
+ mediaTint?: "none" | "brand" | "duotone";
10
+ /** Cristal esmerilado encima del fondo (mesh, aurora, imagen…): suaviza y da profundidad. */
11
+ glass?: boolean;
12
+ /** Paralaje suave con inercia al mover el puntero (no en táctil ni con movimiento reducido). */
13
+ interactive?: boolean;
14
+ /** Tinta de puntos y líneas. */
15
+ ink?: "canvas" | "brand";
16
+ /** Motion graphics: false = fondo quieto. */
17
+ animated?: boolean;
18
+ }): React.JSX.Element | null;
19
+
20
+ export { AuthBackdrop, type AuthBackdropVariant };
@@ -0,0 +1,137 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ const INERTIA = 0.06;
6
+ function AuthBackdrop({
7
+ variant = "dots",
8
+ interactive = false,
9
+ ink = "canvas",
10
+ animated = true,
11
+ media,
12
+ mediaTint = "brand",
13
+ glass = false,
14
+ className,
15
+ ...props
16
+ }) {
17
+ const ref = React.useRef(null);
18
+ React.useEffect(() => {
19
+ const el = ref.current;
20
+ const host = el?.parentElement;
21
+ if (!interactive || !animated || !el || !host || typeof window === "undefined") return;
22
+ const quiet = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
23
+ const fine = window.matchMedia?.("(pointer: fine)").matches;
24
+ if (quiet || fine === false) return;
25
+ const target = { x: 0, y: 0 };
26
+ const now = { x: 0, y: 0 };
27
+ let frame = 0;
28
+ const tick = () => {
29
+ now.x += (target.x - now.x) * INERTIA;
30
+ now.y += (target.y - now.y) * INERTIA;
31
+ el.style.setProperty("--ds-auth-px", now.x.toFixed(4));
32
+ el.style.setProperty("--ds-auth-py", now.y.toFixed(4));
33
+ frame = Math.abs(target.x - now.x) + Math.abs(target.y - now.y) > 1e-3 ? requestAnimationFrame(tick) : 0;
34
+ };
35
+ const kick = () => {
36
+ if (!frame) frame = requestAnimationFrame(tick);
37
+ };
38
+ const move = (event) => {
39
+ const box = host.getBoundingClientRect();
40
+ target.x = (event.clientX - box.left) / box.width * 2 - 1;
41
+ target.y = (event.clientY - box.top) / box.height * 2 - 1;
42
+ kick();
43
+ };
44
+ const leave = () => {
45
+ target.x = 0;
46
+ target.y = 0;
47
+ kick();
48
+ };
49
+ host.addEventListener("pointermove", move);
50
+ host.addEventListener("pointerleave", leave);
51
+ return () => {
52
+ cancelAnimationFrame(frame);
53
+ host.removeEventListener("pointermove", move);
54
+ host.removeEventListener("pointerleave", leave);
55
+ };
56
+ }, [interactive, animated]);
57
+ if (variant === "none") return null;
58
+ const still = animated ? "motion-reduce:animate-none" : "animate-none";
59
+ const pattern = variant === "dots" ? "ds-auth-fx-dots" : "ds-auth-fx-grid";
60
+ return /* @__PURE__ */ jsxs(
61
+ "div",
62
+ {
63
+ ref,
64
+ "aria-hidden": "true",
65
+ "data-slot": "auth-backdrop",
66
+ "data-variant": variant,
67
+ className: cn(
68
+ "pointer-events-none absolute inset-0 -z-0 overflow-hidden",
69
+ ink === "brand" ? "[--ds-auth-fx-ink:var(--ds-auth-aside-fg)]" : "[--ds-auth-fx-ink:var(--foreground)]",
70
+ className
71
+ ),
72
+ ...props,
73
+ children: [
74
+ /* @__PURE__ */ jsxs("div", { "data-slot": "auth-backdrop-depth", className: "absolute -inset-(--ds-auth-parallax) ds-auth-fx-depth", children: [
75
+ variant === "image" && media ? /* @__PURE__ */ jsxs(Fragment, { children: [
76
+ /* @__PURE__ */ jsx(
77
+ "div",
78
+ {
79
+ "data-slot": "auth-backdrop-media",
80
+ "data-tint": mediaTint,
81
+ className: cn(
82
+ "absolute inset-0 [&>*]:size-full [&>img]:object-cover [&>video]:object-cover animate-ds-auth-zoom",
83
+ mediaTint === "duotone" && "grayscale contrast-125",
84
+ still
85
+ ),
86
+ children: media
87
+ }
88
+ ),
89
+ mediaTint === "brand" ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-(--ds-auth-media-tint) mix-blend-color" }) : null,
90
+ mediaTint === "duotone" ? /* @__PURE__ */ jsxs(Fragment, { children: [
91
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-(--ds-auth-media-duo-dark) mix-blend-screen" }),
92
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-(--ds-auth-media-duo-light) mix-blend-multiply" })
93
+ ] }) : null,
94
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-(--ds-auth-fx-image-veil)" })
95
+ ] }) : null,
96
+ variant === "dots" || variant === "grid" ? /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ /* @__PURE__ */ jsx("div", { className: cn("absolute inset-0", pattern) }),
98
+ /* @__PURE__ */ jsx("div", { className: cn("absolute inset-0 ds-auth-fx-sweep animate-ds-auth-sweep", pattern, still) })
99
+ ] }) : null,
100
+ variant === "aurora" ? /* @__PURE__ */ jsxs(Fragment, { children: [
101
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-ribbon top-[5%] animate-ds-auth-wave", still) }),
102
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-ribbon top-[35%] animate-ds-auth-wave-reverse", still) }),
103
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-blob start-[25%] -bottom-[25%] size-[50%] bg-(--ds-auth-fx-3) animate-ds-auth-float-c", still) })
104
+ ] }) : null,
105
+ variant === "mesh" ? /* @__PURE__ */ jsxs(Fragment, { children: [
106
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-blob -start-[10%] -top-[15%] size-[65%] bg-(--ds-auth-fx-1) animate-ds-auth-float-a", still) }),
107
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-blob -end-[10%] top-[5%] size-[60%] bg-(--ds-auth-fx-2) animate-ds-auth-float-b", still) }),
108
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-blob start-[15%] -bottom-[20%] size-[55%] bg-(--ds-auth-fx-3) animate-ds-auth-float-c", still) }),
109
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-blob end-[10%] -bottom-[10%] size-[45%] bg-(--ds-auth-fx-4) animate-ds-auth-float-d", still) })
110
+ ] }) : null,
111
+ variant === "glow" ? /* @__PURE__ */ jsx(
112
+ "div",
113
+ {
114
+ className: cn(
115
+ "absolute start-1/2 top-1/2 size-(--ds-auth-glow-size) -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2",
116
+ "ds-auth-fx-glow animate-ds-auth-breathe",
117
+ still
118
+ )
119
+ }
120
+ ) : null,
121
+ variant === "rings" ? /* @__PURE__ */ jsxs(Fragment, { children: [
122
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-ring w-[45%] min-w-(--ds-auth-glow-size) aspect-square animate-ds-auth-spin", still), children: /* @__PURE__ */ jsx("span", { className: "ds-auth-fx-satellite" }) }),
123
+ /* @__PURE__ */ jsx("div", { className: cn("ds-auth-fx-ring w-[75%] aspect-square animate-ds-auth-spin-reverse", still), children: /* @__PURE__ */ jsx("span", { className: "ds-auth-fx-satellite" }) }),
124
+ /* @__PURE__ */ jsx("div", { className: "ds-auth-fx-ring w-[110%] aspect-square" }),
125
+ /* @__PURE__ */ jsx("div", { className: cn("absolute start-1/2 top-1/2 size-(--ds-auth-glow-size) -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2 ds-auth-fx-glow animate-ds-auth-breathe", still) })
126
+ ] }) : null,
127
+ variant === "beams" ? /* @__PURE__ */ jsx("div", { className: cn("absolute -inset-[30%] ds-auth-fx-beams animate-ds-auth-spin", still) }) : null
128
+ ] }),
129
+ glass ? /* @__PURE__ */ jsx("div", { "data-slot": "auth-backdrop-glass", className: "absolute inset-0 ds-auth-fx-glass" }) : null,
130
+ variant === "aurora" || variant === "mesh" || variant === "beams" || glass ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 ds-auth-fx-grain" }) : null
131
+ ]
132
+ }
133
+ );
134
+ }
135
+ export {
136
+ AuthBackdrop
137
+ };
@@ -0,0 +1,111 @@
1
+ import * as React from 'react';
2
+ import { AuthErrorCode, AuthField, PasswordRules, AuthProviderOption, AuthLink } from '../lib/auth.js';
3
+ 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, 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
+ /** Campos y orden (sign-up y reset-password). */
55
+ fields?: AuthField[];
56
+ /** Campos propios de la app, antes del botón (llegan en `formData`). */
57
+ extraFields?: React.ReactNode;
58
+ passwordRules?: PasswordRules;
59
+ /** Barra de fuerza de la contraseña (sign-up y reset-password por defecto). */
60
+ showStrength?: boolean;
61
+ /** Casilla «mantener la sesión iniciada». */
62
+ remember?: boolean;
63
+ /** SSO o redes sociales (la app pone nombre e icono). */
64
+ providers?: AuthProviderOption[];
65
+ onProvider?: (id: string) => void | Promise<AuthResult>;
66
+ providersPlacement?: "top" | "bottom";
67
+ providersLayout?: "stack" | "grid" | "icons";
68
+ /** Entrar con passkey (y autocompletado de passkeys en el campo del identificador). */
69
+ onPasskey?: () => void | Promise<AuthResult>;
70
+ /** SSO de empresa: enlace «usar SSO» en sign-in y envío del preset sso. */
71
+ onSso?: (input: {
72
+ identifier: string;
73
+ organization?: string;
74
+ }) => AuthResult | Promise<AuthResult | {
75
+ organizations: AuthOrganization[];
76
+ }>;
77
+ /** sso: se identifica por correo de trabajo o por organización. */
78
+ ssoBy?: "email" | "organization";
79
+ /** Último método usado en este dispositivo: id de proveedor, "passkey", "sso" o "password". */
80
+ lastUsed?: string | null;
81
+ onSubmit?: (values: AuthFormValues) => AuthResult | Promise<AuthResult>;
82
+ /** email-code: verifica el código (se llama al completarse). */
83
+ onVerifyCode?: (code: string, values: {
84
+ identifier: string;
85
+ }) => AuthResult | Promise<AuthResult>;
86
+ /** Reenviar enlace o código. */
87
+ onResend?: (values: {
88
+ identifier: string;
89
+ }) => void | Promise<void>;
90
+ /** Segundos hasta poder reenviar. */
91
+ resendAfter?: number;
92
+ codeLength?: number;
93
+ /** Error controlado por la app. */
94
+ error?: AuthMessage;
95
+ fieldErrors?: Partial<Record<AuthField, AuthMessage>>;
96
+ /** Enlaces: URL o función del router. */
97
+ links?: {
98
+ signIn?: AuthLink;
99
+ email?: AuthLink;
100
+ signUp?: AuthLink;
101
+ requestAccess?: AuthLink;
102
+ forgotPassword?: AuthLink;
103
+ terms?: AuthLink;
104
+ privacy?: AuthLink;
105
+ };
106
+ submitLabel?: React.ReactNode;
107
+ /** Sustituye el pie de enlaces. */
108
+ footer?: React.ReactNode;
109
+ }): React.JSX.Element;
110
+
111
+ export { AuthForm, type AuthFormPreset, type AuthFormValues, type AuthOrganization, type AuthResult, type AuthRoute };