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
|
@@ -0,0 +1,1547 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "orbital-ds",
|
|
3
|
+
"version": "0.44.1",
|
|
4
|
+
"group": "auth",
|
|
5
|
+
"about": "Inicio de sesión, MFA, passkeys, sesiones y consentimiento.",
|
|
6
|
+
"components": {
|
|
7
|
+
"auth-backdrop": {
|
|
8
|
+
"import": "orbital-ds/ui/auth-backdrop",
|
|
9
|
+
"group": "auth",
|
|
10
|
+
"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.",
|
|
11
|
+
"see": [
|
|
12
|
+
{
|
|
13
|
+
"component": "auth-layout",
|
|
14
|
+
"when": "pantalla de acceso completa: su prop `backdrop` ya monta este fondo"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"component": "error-page",
|
|
18
|
+
"when": "página de error con fondo (`backdrop`), sin montarlo a mano"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"component": "empty-state",
|
|
22
|
+
"when": "estado vacío con fondo (`backdrop`), sin montarlo a mano"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"exports": [
|
|
26
|
+
"AuthBackdrop",
|
|
27
|
+
"type AuthBackdropVariant"
|
|
28
|
+
],
|
|
29
|
+
"slots": [
|
|
30
|
+
"auth-backdrop",
|
|
31
|
+
"auth-backdrop-depth",
|
|
32
|
+
"auth-backdrop-glass",
|
|
33
|
+
"auth-backdrop-media"
|
|
34
|
+
],
|
|
35
|
+
"optionalPeers": [],
|
|
36
|
+
"props": {
|
|
37
|
+
"AuthBackdrop": {
|
|
38
|
+
"variant": {
|
|
39
|
+
"type": "AuthBackdropVariant",
|
|
40
|
+
"values": [
|
|
41
|
+
"image",
|
|
42
|
+
"none",
|
|
43
|
+
"grid",
|
|
44
|
+
"dots",
|
|
45
|
+
"aurora",
|
|
46
|
+
"mesh",
|
|
47
|
+
"glow",
|
|
48
|
+
"rings",
|
|
49
|
+
"beams"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"media": {
|
|
53
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
54
|
+
"doc": "image: la foto o el vídeo (un <img>/<video> con alt=\"\")."
|
|
55
|
+
},
|
|
56
|
+
"mediaTint": {
|
|
57
|
+
"type": "\"none\" | \"brand\" | \"duotone\"",
|
|
58
|
+
"values": [
|
|
59
|
+
"none",
|
|
60
|
+
"brand",
|
|
61
|
+
"duotone"
|
|
62
|
+
],
|
|
63
|
+
"doc": "image: tinte de marca (brand), dos tintas (duotone) o la foto tal cual (none)."
|
|
64
|
+
},
|
|
65
|
+
"glass": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"doc": "Cristal esmerilado encima del fondo (mesh, aurora, imagen…): suaviza y da profundidad."
|
|
68
|
+
},
|
|
69
|
+
"interactive": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"doc": "Paralaje suave con inercia al mover el puntero (no en táctil ni con movimiento reducido)."
|
|
72
|
+
},
|
|
73
|
+
"ink": {
|
|
74
|
+
"type": "\"canvas\" | \"brand\"",
|
|
75
|
+
"values": [
|
|
76
|
+
"canvas",
|
|
77
|
+
"brand"
|
|
78
|
+
],
|
|
79
|
+
"doc": "Tinta de puntos y líneas."
|
|
80
|
+
},
|
|
81
|
+
"animated": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"doc": "Motion graphics: false = fondo quieto."
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"notes": [
|
|
88
|
+
"Fondo de las pantallas de acceso: `dots` o `grid` para algo sobrio y técnico; `rings` para una identidad orbital o de plataforma; `beams` para un lanzamiento o producto de consumo; `aurora` o `mesh` para una portada con más presencia; `glow` detrás de una tarjeta centrada. Úsalo una vez por pantalla.",
|
|
89
|
+
"`image` con `media` para una foto de marca (se tiñe con el primario); añade `glass` si el texto va encima sin tarjeta. «mesh + glass» da un fondo de cristal con color vivo debajo.",
|
|
90
|
+
"`interactive` da un paralaje sutil con inercia, no un foco que sigue al puntero: úsalo solo en la portada, nunca detrás de un formulario largo.",
|
|
91
|
+
"Los colores salen de la paleta del tema (--ds-auth-fx-1/2/3/4): para la marca de una app, ajústalos en su brand.css, nunca en el componente."
|
|
92
|
+
],
|
|
93
|
+
"examples": [
|
|
94
|
+
{
|
|
95
|
+
"title": "Detrás de una portada",
|
|
96
|
+
"code": "<div className=\"relative isolate overflow-hidden\">\n <AuthBackdrop variant=\"dots\" />\n <h1>Bienvenida a Acme</h1>\n</div>"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"title": "Foto de marca teñida con cristal",
|
|
100
|
+
"code": "<div className=\"relative isolate overflow-hidden\">\n <AuthBackdrop variant=\"image\" media={<img src=\"/portada.jpg\" alt=\"\" />} mediaTint=\"brand\" glass />\n</div>"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"auth-form": {
|
|
105
|
+
"import": "orbital-ds/ui/auth-form",
|
|
106
|
+
"group": "auth",
|
|
107
|
+
"summary": "Formulario de acceso completo por preset (entrar, registro, enlace mágico, código, SSO, recuperar o cambiar contraseña); la app conecta su backend con callbacks que devuelven AuthResult.",
|
|
108
|
+
"see": [
|
|
109
|
+
{
|
|
110
|
+
"component": "mfa-challenge",
|
|
111
|
+
"when": "solo el segundo factor; dentro del mismo flujo, mejor la prop `mfa` de AuthForm"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"component": "auth-status",
|
|
115
|
+
"when": "pantalla de resultado (revisa tu correo, sesión caducada, cuenta bloqueada)"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"component": "auth-parts",
|
|
119
|
+
"when": "componer una pantalla de acceso a medida con las piezas sueltas"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"exports": [
|
|
123
|
+
"AuthForm",
|
|
124
|
+
"type AuthFormPreset",
|
|
125
|
+
"type AuthFormValues",
|
|
126
|
+
"type AuthOrganization",
|
|
127
|
+
"type AuthResult",
|
|
128
|
+
"type AuthRoute"
|
|
129
|
+
],
|
|
130
|
+
"slots": [
|
|
131
|
+
"auth-form",
|
|
132
|
+
"auth-form-access",
|
|
133
|
+
"auth-form-audience",
|
|
134
|
+
"auth-form-code",
|
|
135
|
+
"auth-form-doors",
|
|
136
|
+
"auth-form-field",
|
|
137
|
+
"auth-form-field-error",
|
|
138
|
+
"auth-form-footer",
|
|
139
|
+
"auth-form-identity",
|
|
140
|
+
"auth-form-organizations",
|
|
141
|
+
"auth-form-redirecting",
|
|
142
|
+
"auth-form-rules"
|
|
143
|
+
],
|
|
144
|
+
"optionalPeers": [],
|
|
145
|
+
"props": {
|
|
146
|
+
"AuthForm": {
|
|
147
|
+
"preset": {
|
|
148
|
+
"type": "AuthFormPreset",
|
|
149
|
+
"values": [
|
|
150
|
+
"sign-in",
|
|
151
|
+
"social",
|
|
152
|
+
"sign-up",
|
|
153
|
+
"magic-link",
|
|
154
|
+
"email-code",
|
|
155
|
+
"sso",
|
|
156
|
+
"forgot-password",
|
|
157
|
+
"reset-password"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"title": {
|
|
161
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
162
|
+
},
|
|
163
|
+
"description": {
|
|
164
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
165
|
+
},
|
|
166
|
+
"icon": {
|
|
167
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
168
|
+
"doc": "Icono sobre el título (IconTile, logo de la app…)."
|
|
169
|
+
},
|
|
170
|
+
"identifier": {
|
|
171
|
+
"type": "AuthIdentifierKind",
|
|
172
|
+
"values": [
|
|
173
|
+
"email",
|
|
174
|
+
"username",
|
|
175
|
+
"email-or-username"
|
|
176
|
+
],
|
|
177
|
+
"doc": "Qué identifica a la persona."
|
|
178
|
+
},
|
|
179
|
+
"defaultIdentifier": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"identifierFirst": {
|
|
183
|
+
"type": "boolean",
|
|
184
|
+
"doc": "sign-in: primero el identificador; luego el método que toque."
|
|
185
|
+
},
|
|
186
|
+
"onIdentify": {
|
|
187
|
+
"type": "(identifier: string) => AuthRoute | Promise<AuthRoute>",
|
|
188
|
+
"doc": "Home realm discovery: la app dice qué método le toca a ese identificador."
|
|
189
|
+
},
|
|
190
|
+
"audience": {
|
|
191
|
+
"type": "\"mixed\" | \"internal\" | \"external\"",
|
|
192
|
+
"values": [
|
|
193
|
+
"mixed",
|
|
194
|
+
"internal",
|
|
195
|
+
"external"
|
|
196
|
+
],
|
|
197
|
+
"doc": "Quién puede entrar: explica en pantalla, antes de escribir el correo, qué puerta le toca a cada persona."
|
|
198
|
+
},
|
|
199
|
+
"entry": {
|
|
200
|
+
"type": "\"identifier\" | \"doors\"",
|
|
201
|
+
"values": [
|
|
202
|
+
"identifier",
|
|
203
|
+
"doors"
|
|
204
|
+
],
|
|
205
|
+
"doc": "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`."
|
|
206
|
+
},
|
|
207
|
+
"fields": {
|
|
208
|
+
"type": "AuthField[]",
|
|
209
|
+
"doc": "Campos y orden (sign-up y reset-password)."
|
|
210
|
+
},
|
|
211
|
+
"extraFields": {
|
|
212
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
213
|
+
"doc": "Campos propios de la app, antes del botón (llegan en `formData`)."
|
|
214
|
+
},
|
|
215
|
+
"passwordRules": {
|
|
216
|
+
"type": "PasswordRules"
|
|
217
|
+
},
|
|
218
|
+
"showStrength": {
|
|
219
|
+
"type": "boolean",
|
|
220
|
+
"doc": "Barra de fuerza de la contraseña (sign-up y reset-password por defecto)."
|
|
221
|
+
},
|
|
222
|
+
"remember": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"doc": "Casilla «mantener la sesión iniciada»."
|
|
225
|
+
},
|
|
226
|
+
"providers": {
|
|
227
|
+
"type": "AuthProviderOption[]",
|
|
228
|
+
"doc": "SSO o redes sociales (la app pone nombre e icono)."
|
|
229
|
+
},
|
|
230
|
+
"onProvider": {
|
|
231
|
+
"type": "(id: string) => void | Promise<AuthResult>"
|
|
232
|
+
},
|
|
233
|
+
"providersPlacement": {
|
|
234
|
+
"type": "\"top\" | \"bottom\"",
|
|
235
|
+
"values": [
|
|
236
|
+
"top",
|
|
237
|
+
"bottom"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"providersLayout": {
|
|
241
|
+
"type": "\"grid\" | \"stack\" | \"icons\"",
|
|
242
|
+
"values": [
|
|
243
|
+
"grid",
|
|
244
|
+
"stack",
|
|
245
|
+
"icons"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"onPasskey": {
|
|
249
|
+
"type": "() => void | Promise<AuthResult>",
|
|
250
|
+
"doc": "Entrar con passkey (y autocompletado de passkeys en el campo del identificador)."
|
|
251
|
+
},
|
|
252
|
+
"onSso": {
|
|
253
|
+
"type": "(input: { identifier: string; organization?: string; }) => AuthResult | Promise<AuthResult | { organizations: AuthOrganization[]; }>",
|
|
254
|
+
"doc": "SSO de empresa: enlace «usar SSO» en sign-in y envío del preset sso."
|
|
255
|
+
},
|
|
256
|
+
"ssoBy": {
|
|
257
|
+
"type": "\"email\" | \"organization\"",
|
|
258
|
+
"values": [
|
|
259
|
+
"email",
|
|
260
|
+
"organization"
|
|
261
|
+
],
|
|
262
|
+
"doc": "sso: se identifica por correo de trabajo o por organización."
|
|
263
|
+
},
|
|
264
|
+
"mfa": {
|
|
265
|
+
"type": "Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"title\"> & { preset?: MfaChallengePreset; methods?: MfaMethod[]; des…",
|
|
266
|
+
"doc": "Segundo factor dentro del mismo flujo: cuando un callback devuelve `{ next: \"mfa\" }` se muestra `MfaChallenge` con estas props (`preset`, `methods`, `destination`, `onVerify`, `onPasskey`…). Sin ella, la app lo pinta aparte."
|
|
267
|
+
},
|
|
268
|
+
"lastUsed": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"doc": "Último método usado en este dispositivo: id de proveedor, \"passkey\", \"sso\" o \"password\"."
|
|
271
|
+
},
|
|
272
|
+
"onSubmit": {
|
|
273
|
+
"type": "(values: AuthFormValues) => AuthResult | Promise<AuthResult>"
|
|
274
|
+
},
|
|
275
|
+
"onVerifyCode": {
|
|
276
|
+
"type": "(code: string, values: { identifier: string; }) => AuthResult | Promise<AuthResult>",
|
|
277
|
+
"doc": "email-code: verifica el código (se llama al completarse)."
|
|
278
|
+
},
|
|
279
|
+
"onResend": {
|
|
280
|
+
"type": "(values: { identifier: string; }) => void | Promise<void>",
|
|
281
|
+
"doc": "Reenviar enlace o código."
|
|
282
|
+
},
|
|
283
|
+
"resendAfter": {
|
|
284
|
+
"type": "number",
|
|
285
|
+
"doc": "Segundos hasta poder reenviar."
|
|
286
|
+
},
|
|
287
|
+
"codeLength": {
|
|
288
|
+
"type": "number"
|
|
289
|
+
},
|
|
290
|
+
"error": {
|
|
291
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
292
|
+
"doc": "Error controlado por la app."
|
|
293
|
+
},
|
|
294
|
+
"fieldErrors": {
|
|
295
|
+
"type": "Partial<Record<AuthField, AuthMessage>>"
|
|
296
|
+
},
|
|
297
|
+
"links": {
|
|
298
|
+
"type": "{ signIn?: AuthLink; email?: AuthLink; signUp?: AuthLink; requestAccess?: AuthLink; forgotPassword?: AuthLink; terms?: AuthLink; privacy?: AuthLink; }",
|
|
299
|
+
"doc": "Enlaces: URL o función del router."
|
|
300
|
+
},
|
|
301
|
+
"submitLabel": {
|
|
302
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
303
|
+
},
|
|
304
|
+
"footer": {
|
|
305
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
306
|
+
"doc": "Sustituye el pie de enlaces."
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"presets": {
|
|
311
|
+
"values": [
|
|
312
|
+
"sign-in",
|
|
313
|
+
"social",
|
|
314
|
+
"sign-up",
|
|
315
|
+
"magic-link",
|
|
316
|
+
"email-code",
|
|
317
|
+
"sso",
|
|
318
|
+
"forgot-password",
|
|
319
|
+
"reset-password"
|
|
320
|
+
],
|
|
321
|
+
"default": "sign-in",
|
|
322
|
+
"intent": {
|
|
323
|
+
"sign-in": "— correo y contraseña; proveedores, passkey, «recordarme» y «¿olvidaste…?».",
|
|
324
|
+
"social": "— solo botones: proveedores (Google, Microsoft…) y passkey, sin formulario. Lo más",
|
|
325
|
+
"sign-up": "— nombre, correo, contraseña con reglas y fuerza, términos (`fields` configurable).",
|
|
326
|
+
"magic-link": "— solo el correo; vista «revisa tu correo» con reenvío y cuenta atrás.",
|
|
327
|
+
"email-code": "— el correo y luego un código de un solo uso (OTP) que se envía solo al completarse.",
|
|
328
|
+
"sso": "— correo de trabajo (o slug de organización) → proveedor de identidad de la empresa.",
|
|
329
|
+
"forgot-password": "— el correo; respuesta que no revela si la cuenta existe.",
|
|
330
|
+
"reset-password": "— contraseña nueva y confirmación, con reglas y fuerza."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"notes": [
|
|
334
|
+
"Presets: `sign-in` (por defecto), `social` (solo botones: lo más sencillo para el público general), `sign-up`, `magic-link` y `email-code` (sin contraseña), `sso` (empresa), `forgot-password` y `reset-password`. Combínalos con AuthLayout para la maqueta y con AuthFlow para el recorrido completo.",
|
|
335
|
+
"Empresa con SSO: `identifierFirst` + `onIdentify` (dominio del correo → { method: \"sso\" }) lleva a cada persona a su proveedor sin que elija; `onSso` añade además el enlace «usar SSO» y el preset `sso`.",
|
|
336
|
+
"Acceso mixto sin escribir el correo: `entry=\"doors\"` (necesita `onSso`; no usa `identifierFirst`) muestra primero «Continuar con SSO» (personal, directo al proveedor de identidad) y, aparte, «Acceso para personas externas» (correo y contraseña, passkey). El preset `sso-staff` de `defineAuthFlow` lo trae (`entry={flow.entry}`).",
|
|
337
|
+
"Segundo factor en el mismo formulario: `mfa={{ preset, methods, onVerify, … }}` (las props de `MfaChallenge`) y un callback que devuelva `{ next: \"mfa\" }` (p. ej. `onSubmit` tras contraseña correcta cuando el flujo exige 2FA). «Volver» regresa a las puertas (`entry=\"doors\"`) o al formulario; la pantalla de redirección a SSO tiene «Cancelar».",
|
|
338
|
+
"Nunca reveles si una cuenta existe: devuelve \"invalid-credentials\" para usuario o contraseña, y `forgot-password` responde igual exista o no.",
|
|
339
|
+
"Passkeys: con `onPasskey`, el campo del identificador ofrece las passkeys guardadas (autocomplete «webauthn») y aparece el botón. Guarda `lastUsed` en la app para destacar el método de la última vez."
|
|
340
|
+
],
|
|
341
|
+
"examples": [
|
|
342
|
+
{
|
|
343
|
+
"title": "Entrar con Better Auth (preset sign-in)",
|
|
344
|
+
"code": "<AuthForm\n preset=\"sign-in\"\n remember\n providers={authProviders([\"google\", \"microsoft\"])}\n onProvider={async (id) => fromBetterAuth(await authClient.signIn.social({ provider: id }))}\n onSubmit={async (v) => fromBetterAuth(await authClient.signIn.email({ email: v.identifier, password: v.password }))}\n links={{ forgotPassword: \"/forgot-password\", signUp: \"/sign-up\" }}\n/>"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"title": "Registro con términos",
|
|
348
|
+
"code": "<AuthForm preset=\"sign-up\" onSubmit={signUp} links={{ signIn: \"/sign-in\", terms: \"/terms\", privacy: \"/privacy\" }} />"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"title": "Segundo factor en el mismo flujo",
|
|
352
|
+
"code": "<AuthForm\n preset=\"sign-in\"\n onSubmit={async (v) => {\n const r = await signIn(v)\n if (r.twoFactorRedirect) return { next: \"mfa\" }\n }}\n mfa={{ preset: \"totp\", methods: [\"totp\", \"backup-code\"], onVerify: verifyTotp }}\n/>"
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
"auth-layout": {
|
|
357
|
+
"import": "orbital-ds/ui/auth-layout",
|
|
358
|
+
"group": "auth",
|
|
359
|
+
"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.",
|
|
360
|
+
"see": [
|
|
361
|
+
{
|
|
362
|
+
"component": "page-shell",
|
|
363
|
+
"when": "maqueta de una página de la app ya dentro (no de acceso)"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"component": "error-page",
|
|
367
|
+
"when": "404, 500, sin conexión o mantenimiento"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"component": "auth-backdrop",
|
|
371
|
+
"when": "solo el fondo animado, detrás de otra superficie"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"exports": [
|
|
375
|
+
"AuthAside",
|
|
376
|
+
"AuthAsideEyebrow",
|
|
377
|
+
"AuthAsideFooter",
|
|
378
|
+
"AuthAsidePoint",
|
|
379
|
+
"AuthAsidePoints",
|
|
380
|
+
"AuthAsideQuote",
|
|
381
|
+
"AuthAsideText",
|
|
382
|
+
"AuthAsideTitle",
|
|
383
|
+
"AuthLayout",
|
|
384
|
+
"type AuthLayoutPreset",
|
|
385
|
+
"type AuthMediaTint",
|
|
386
|
+
"type AuthMotion",
|
|
387
|
+
"type AuthShape",
|
|
388
|
+
"type AuthSurface",
|
|
389
|
+
"useAuthMotion"
|
|
390
|
+
],
|
|
391
|
+
"slots": [
|
|
392
|
+
"auth-aside",
|
|
393
|
+
"auth-aside-eyebrow",
|
|
394
|
+
"auth-aside-footer",
|
|
395
|
+
"auth-aside-logo",
|
|
396
|
+
"auth-aside-point",
|
|
397
|
+
"auth-aside-points",
|
|
398
|
+
"auth-aside-quote",
|
|
399
|
+
"auth-aside-text",
|
|
400
|
+
"auth-aside-title",
|
|
401
|
+
"auth-layout",
|
|
402
|
+
"auth-layout-footer",
|
|
403
|
+
"auth-layout-logo",
|
|
404
|
+
"auth-layout-panel",
|
|
405
|
+
"auth-layout-toolbar",
|
|
406
|
+
"auth-media"
|
|
407
|
+
],
|
|
408
|
+
"optionalPeers": [],
|
|
409
|
+
"props": {
|
|
410
|
+
"AuthAside": {
|
|
411
|
+
"logo": {
|
|
412
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
413
|
+
"doc": "Logo arriba del panel (en split, la maqueta lo quita del formulario en ancho)."
|
|
414
|
+
},
|
|
415
|
+
"align": {
|
|
416
|
+
"type": "\"center\" | \"between\"",
|
|
417
|
+
"values": [
|
|
418
|
+
"center",
|
|
419
|
+
"between"
|
|
420
|
+
],
|
|
421
|
+
"doc": "between = logo arriba y texto abajo (por defecto) · center = todo agrupado y centrado en vertical (portal corporativo)."
|
|
422
|
+
},
|
|
423
|
+
"backdrop": {
|
|
424
|
+
"type": "AuthBackdropVariant",
|
|
425
|
+
"values": [
|
|
426
|
+
"image",
|
|
427
|
+
"none",
|
|
428
|
+
"grid",
|
|
429
|
+
"dots",
|
|
430
|
+
"aurora",
|
|
431
|
+
"mesh",
|
|
432
|
+
"glow",
|
|
433
|
+
"rings",
|
|
434
|
+
"beams"
|
|
435
|
+
],
|
|
436
|
+
"doc": "Fondo animado del panel (por defecto, el del preset)."
|
|
437
|
+
},
|
|
438
|
+
"media": {
|
|
439
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
440
|
+
"doc": "Imagen o vídeo del panel (sustituye al degradado; el texto se lee sobre un velo de la marca)."
|
|
441
|
+
},
|
|
442
|
+
"mediaTint": {
|
|
443
|
+
"type": "AuthMediaTint",
|
|
444
|
+
"values": [
|
|
445
|
+
"none",
|
|
446
|
+
"brand",
|
|
447
|
+
"duotone"
|
|
448
|
+
],
|
|
449
|
+
"doc": "Tinte de marca sobre `media` (por defecto brand: la foto toma el color de la marca)."
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"AuthAsidePoint": {
|
|
453
|
+
"icon": {
|
|
454
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"AuthAsideQuote": {
|
|
458
|
+
"author": {
|
|
459
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
460
|
+
},
|
|
461
|
+
"avatar": {
|
|
462
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"AuthLayout": {
|
|
466
|
+
"preset": {
|
|
467
|
+
"type": "AuthLayoutPreset",
|
|
468
|
+
"values": [
|
|
469
|
+
"banner",
|
|
470
|
+
"centered",
|
|
471
|
+
"split",
|
|
472
|
+
"cover",
|
|
473
|
+
"minimal"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"surface": {
|
|
477
|
+
"type": "AuthSurface",
|
|
478
|
+
"values": [
|
|
479
|
+
"solid",
|
|
480
|
+
"glass",
|
|
481
|
+
"elevated",
|
|
482
|
+
"plain"
|
|
483
|
+
],
|
|
484
|
+
"doc": "Superficie de la tarjeta."
|
|
485
|
+
},
|
|
486
|
+
"shape": {
|
|
487
|
+
"type": "AuthShape",
|
|
488
|
+
"values": [
|
|
489
|
+
"rounded",
|
|
490
|
+
"soft",
|
|
491
|
+
"sharp"
|
|
492
|
+
],
|
|
493
|
+
"doc": "Forma de la tarjeta."
|
|
494
|
+
},
|
|
495
|
+
"backdrop": {
|
|
496
|
+
"type": "AuthBackdropVariant",
|
|
497
|
+
"values": [
|
|
498
|
+
"image",
|
|
499
|
+
"none",
|
|
500
|
+
"grid",
|
|
501
|
+
"dots",
|
|
502
|
+
"aurora",
|
|
503
|
+
"mesh",
|
|
504
|
+
"glow",
|
|
505
|
+
"rings",
|
|
506
|
+
"beams"
|
|
507
|
+
],
|
|
508
|
+
"doc": "Fondo animado del lienzo."
|
|
509
|
+
},
|
|
510
|
+
"backdropMedia": {
|
|
511
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
512
|
+
"doc": "backdrop=\"image\": la foto o el vídeo del lienzo (si falta, usa `media`). Se tiñe con `mediaTint`."
|
|
513
|
+
},
|
|
514
|
+
"backdropGlass": {
|
|
515
|
+
"type": "boolean",
|
|
516
|
+
"doc": "Cristal esmerilado sobre el fondo del lienzo («mesh + glass», «image + glass»)."
|
|
517
|
+
},
|
|
518
|
+
"asideBackdrop": {
|
|
519
|
+
"type": "AuthBackdropVariant",
|
|
520
|
+
"values": [
|
|
521
|
+
"image",
|
|
522
|
+
"none",
|
|
523
|
+
"grid",
|
|
524
|
+
"dots",
|
|
525
|
+
"aurora",
|
|
526
|
+
"mesh",
|
|
527
|
+
"glow",
|
|
528
|
+
"rings",
|
|
529
|
+
"beams"
|
|
530
|
+
],
|
|
531
|
+
"doc": "Fondo animado del panel de marca (split, banner)."
|
|
532
|
+
},
|
|
533
|
+
"interactive": {
|
|
534
|
+
"type": "boolean",
|
|
535
|
+
"doc": "Foco que sigue al puntero en el fondo."
|
|
536
|
+
},
|
|
537
|
+
"motion": {
|
|
538
|
+
"type": "AuthMotion",
|
|
539
|
+
"values": [
|
|
540
|
+
"off",
|
|
541
|
+
"full",
|
|
542
|
+
"entrance"
|
|
543
|
+
],
|
|
544
|
+
"doc": "full = fondo animado y entrada · entrance = solo la entrada · off = quieto."
|
|
545
|
+
},
|
|
546
|
+
"side": {
|
|
547
|
+
"type": "\"start\" | \"end\"",
|
|
548
|
+
"values": [
|
|
549
|
+
"start",
|
|
550
|
+
"end"
|
|
551
|
+
],
|
|
552
|
+
"doc": "split: lado del panel de marca · cover: lado de la tarjeta."
|
|
553
|
+
},
|
|
554
|
+
"logo": {
|
|
555
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
556
|
+
"doc": "Logo de la app (imagen o SVG; su alto lo fija --ds-auth-logo-h)."
|
|
557
|
+
},
|
|
558
|
+
"aside": {
|
|
559
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
560
|
+
"doc": "Panel de marca (split, banner): normalmente <AuthAside>."
|
|
561
|
+
},
|
|
562
|
+
"media": {
|
|
563
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
564
|
+
"doc": "cover: imagen o vídeo de fondo (la app lo pone; se recorta a pantalla completa)."
|
|
565
|
+
},
|
|
566
|
+
"mediaTint": {
|
|
567
|
+
"type": "AuthMediaTint",
|
|
568
|
+
"values": [
|
|
569
|
+
"none",
|
|
570
|
+
"brand",
|
|
571
|
+
"duotone"
|
|
572
|
+
],
|
|
573
|
+
"doc": "cover: tinte de marca sobre `media` (la foto se adapta al color de la marca)."
|
|
574
|
+
},
|
|
575
|
+
"toolbar": {
|
|
576
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
577
|
+
"doc": "Esquina superior: idioma y tema, siempre visibles."
|
|
578
|
+
},
|
|
579
|
+
"footer": {
|
|
580
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
581
|
+
"doc": "Pie: enlaces legales, versión, soporte."
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"presets": {
|
|
586
|
+
"values": [
|
|
587
|
+
"centered",
|
|
588
|
+
"split",
|
|
589
|
+
"cover",
|
|
590
|
+
"banner",
|
|
591
|
+
"minimal"
|
|
592
|
+
],
|
|
593
|
+
"default": "centered",
|
|
594
|
+
"intent": {
|
|
595
|
+
"split": "— panel de marca a un lado y formulario al otro; en estrecho, solo el formulario.",
|
|
596
|
+
"cover": "— imagen o vídeo a pantalla completa (`media`) y tarjeta de cristal encima.",
|
|
597
|
+
"banner": "— franja de marca arriba y tarjeta que la monta.",
|
|
598
|
+
"minimal": "— sin tarjeta: el formulario sobre el lienzo (apps internas, incrustado)."
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"notes": [
|
|
602
|
+
"Presets: `centered` por defecto (cualquier app); `split` para producto con historia de marca (SaaS, portales: panel con propuesta de valor o testimonio); `cover` cuando hay una imagen potente (consumo, eventos); `banner` para portales corporativos con logo protagonista; `minimal` para herramientas internas o incrustado en otra página.",
|
|
603
|
+
"`AuthAside align=\"center\"` agrupa logo y texto centrados en vertical (portal corporativo con titular, texto y 3 puntos); por defecto reparte logo arriba y texto abajo.",
|
|
604
|
+
"Degradado primario → secundario en el panel: en brand.css `--ds-auth-aside-from: var(--primary); --ds-auth-aside-to: var(--secondary);` (el doctor mide el contraste del texto sobre el panel).",
|
|
605
|
+
"La marca va en brand.css: --ds-auth-aside-bg/-fg/-image (panel), --ds-auth-fx-1/2/3 (fondos), --ds-auth-radius, --ds-auth-glass. El doctor mide el contraste del texto del panel (AA).",
|
|
606
|
+
"`motion=\"full\"` aplica siempre los fondos animados; `entrance` deja solo la entrada; `off` lo para todo. Con movimiento reducido del sistema, todo queda quieto (WCAG 2.3.3).",
|
|
607
|
+
"`toolbar` es para idioma y tema, siempre visibles; `footer` para enlaces legales y soporte."
|
|
608
|
+
],
|
|
609
|
+
"examples": [
|
|
610
|
+
{
|
|
611
|
+
"title": "Centrada, con idioma y tema siempre visibles",
|
|
612
|
+
"code": "<AuthLayout\n preset=\"centered\"\n logo={<img src=\"/logo.svg\" alt=\"Acme\" />}\n toolbar={\n <>\n <LocaleSwitcher locales={locales} value={lang} onValueChange={setLang} />\n <ThemeToggle value={theme} onValueChange={setTheme} />\n </>\n }\n>\n <AuthForm preset=\"sign-in\" onSubmit={signIn} />\n</AuthLayout>"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"title": "Panel de marca a un lado (preset split)",
|
|
616
|
+
"code": "<AuthLayout\n preset=\"split\"\n logo={<img src=\"/logo.svg\" alt=\"Acme\" />}\n aside={\n <AuthAside>\n <AuthAsideTitle>Todo tu equipo, en un solo lugar</AuthAsideTitle>\n <AuthAsideText>Entra con tu método favorito.</AuthAsideText>\n </AuthAside>\n }\n>\n <AuthForm preset=\"social\" providers={authProviders([\"google\", \"microsoft\"])} onProvider={signInSocial} />\n</AuthLayout>"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"title": "Sin tarjeta para una app interna",
|
|
620
|
+
"code": "<AuthLayout preset=\"minimal\" backdrop=\"none\">\n <AuthForm preset=\"sso\" onSso={signInSso} />\n</AuthLayout>"
|
|
621
|
+
}
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
"auth-parts": {
|
|
625
|
+
"import": "orbital-ds/ui/auth-parts",
|
|
626
|
+
"group": "auth",
|
|
627
|
+
"summary": "Piezas sueltas de las pantallas de acceso (cabecera, proveedores, separador «o», passkey, error y enlace) para componer una propia; los casos comunes ya los resuelve AuthForm.",
|
|
628
|
+
"see": [
|
|
629
|
+
{
|
|
630
|
+
"component": "auth-form",
|
|
631
|
+
"when": "formulario de acceso completo por preset (lo normal)"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"component": "auth-status",
|
|
635
|
+
"when": "pantalla de resultado del acceso ya montada"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"exports": [
|
|
639
|
+
"AuthAnchor",
|
|
640
|
+
"AuthDivider",
|
|
641
|
+
"AuthError",
|
|
642
|
+
"AuthHeader",
|
|
643
|
+
"AuthPasskeyButton",
|
|
644
|
+
"AuthProviders",
|
|
645
|
+
"AuthStagger"
|
|
646
|
+
],
|
|
647
|
+
"slots": [
|
|
648
|
+
"auth-anchor",
|
|
649
|
+
"auth-divider",
|
|
650
|
+
"auth-error",
|
|
651
|
+
"auth-header",
|
|
652
|
+
"auth-last-used",
|
|
653
|
+
"auth-passkey",
|
|
654
|
+
"auth-provider",
|
|
655
|
+
"auth-providers",
|
|
656
|
+
"auth-stagger"
|
|
657
|
+
],
|
|
658
|
+
"optionalPeers": [],
|
|
659
|
+
"props": {
|
|
660
|
+
"AuthAnchor": {
|
|
661
|
+
"to": {
|
|
662
|
+
"type": "AuthLink",
|
|
663
|
+
"required": true
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"AuthError": {
|
|
667
|
+
"error": {
|
|
668
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"AuthHeader": {
|
|
672
|
+
"icon": {
|
|
673
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
674
|
+
},
|
|
675
|
+
"title": {
|
|
676
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
677
|
+
"required": true
|
|
678
|
+
},
|
|
679
|
+
"description": {
|
|
680
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
681
|
+
},
|
|
682
|
+
"align": {
|
|
683
|
+
"type": "\"center\" | \"start\"",
|
|
684
|
+
"values": [
|
|
685
|
+
"center",
|
|
686
|
+
"start"
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"AuthPasskeyButton": {
|
|
691
|
+
"variant": {
|
|
692
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
693
|
+
"values": [
|
|
694
|
+
"link",
|
|
695
|
+
"default",
|
|
696
|
+
"outline",
|
|
697
|
+
"secondary",
|
|
698
|
+
"ghost",
|
|
699
|
+
"destructive",
|
|
700
|
+
"cta"
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
"size": {
|
|
704
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
705
|
+
"values": [
|
|
706
|
+
"default",
|
|
707
|
+
"xs",
|
|
708
|
+
"sm",
|
|
709
|
+
"lg",
|
|
710
|
+
"icon",
|
|
711
|
+
"icon-xs",
|
|
712
|
+
"icon-sm",
|
|
713
|
+
"icon-lg"
|
|
714
|
+
]
|
|
715
|
+
},
|
|
716
|
+
"nativeButton": {
|
|
717
|
+
"type": "boolean"
|
|
718
|
+
},
|
|
719
|
+
"pending": {
|
|
720
|
+
"type": "boolean"
|
|
721
|
+
},
|
|
722
|
+
"lastUsed": {
|
|
723
|
+
"type": "boolean"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
"AuthProviders": {
|
|
727
|
+
"providers": {
|
|
728
|
+
"type": "AuthProviderOption[]",
|
|
729
|
+
"required": true
|
|
730
|
+
},
|
|
731
|
+
"onProvider": {
|
|
732
|
+
"type": "(id: string) => void"
|
|
733
|
+
},
|
|
734
|
+
"pending": {
|
|
735
|
+
"type": "string",
|
|
736
|
+
"doc": "Proveedor en curso (muestra el spinner y bloquea los demás)."
|
|
737
|
+
},
|
|
738
|
+
"lastUsed": {
|
|
739
|
+
"type": "string",
|
|
740
|
+
"doc": "Último método usado en este dispositivo (lo guarda la app): lleva una etiqueta."
|
|
741
|
+
},
|
|
742
|
+
"layout": {
|
|
743
|
+
"type": "\"grid\" | \"stack\" | \"icons\"",
|
|
744
|
+
"values": [
|
|
745
|
+
"grid",
|
|
746
|
+
"stack",
|
|
747
|
+
"icons"
|
|
748
|
+
],
|
|
749
|
+
"doc": "stack = uno por fila con texto · grid = dos columnas · icons = solo iconos. Por defecto: stack hasta 2, grid desde 3."
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"AuthStagger": {
|
|
753
|
+
"index": {
|
|
754
|
+
"type": "number"
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"notes": [
|
|
759
|
+
"Úsalas para componer una pantalla de acceso a medida dentro de AuthLayout; para los casos comunes, AuthForm, MfaChallenge y AuthStatus ya las combinan.",
|
|
760
|
+
"Proveedores: como mucho tres a la vista (SSO primero). El icono y el nombre de cada uno los pone la app: el paquete no lleva logotipos de marcas. `lastUsed` lo guarda la app (p. ej. en localStorage) para señalar el método de la última vez."
|
|
761
|
+
],
|
|
762
|
+
"examples": [
|
|
763
|
+
{
|
|
764
|
+
"title": "Pantalla de acceso a medida",
|
|
765
|
+
"code": "<AuthHeader title=\"Entra en Acme\" description=\"Elige cómo quieres entrar.\" />\n<AuthProviders providers={authProviders([\"google\", \"microsoft\"])} onProvider={signInSocial} lastUsed=\"google\" />\n<AuthDivider />\n<AuthPasskeyButton onClick={signInPasskey} />\n<AuthError error=\"passkey-failed\" />"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"title": "Enlace con el router de la app",
|
|
769
|
+
"code": "<AuthAnchor to={() => navigate({ to: \"/sign-up\" })}>Crear una cuenta</AuthAnchor>"
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
"auth-status": {
|
|
774
|
+
"import": "orbital-ds/ui/auth-status",
|
|
775
|
+
"group": "auth",
|
|
776
|
+
"summary": "Pantalla de resultado del acceso por preset (revisa tu correo, correo verificado, contraseña cambiada, sesión caducada, sesión cerrada, cuenta bloqueada, enlace caducado, sin permiso).",
|
|
777
|
+
"see": [
|
|
778
|
+
{
|
|
779
|
+
"component": "error-page",
|
|
780
|
+
"when": "errores de navegación (404, 500, sin conexión), no de acceso"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"component": "empty-state",
|
|
784
|
+
"when": "un bloque sin datos dentro de una vista"
|
|
785
|
+
}
|
|
786
|
+
],
|
|
787
|
+
"exports": [
|
|
788
|
+
"AuthStatus",
|
|
789
|
+
"type AuthStatusPreset"
|
|
790
|
+
],
|
|
791
|
+
"slots": [
|
|
792
|
+
"auth-status",
|
|
793
|
+
"auth-status-actions",
|
|
794
|
+
"auth-status-icon"
|
|
795
|
+
],
|
|
796
|
+
"optionalPeers": [],
|
|
797
|
+
"props": {
|
|
798
|
+
"AuthStatus": {
|
|
799
|
+
"preset": {
|
|
800
|
+
"type": "AuthStatusPreset",
|
|
801
|
+
"values": [
|
|
802
|
+
"account-locked",
|
|
803
|
+
"link-expired",
|
|
804
|
+
"session-expired",
|
|
805
|
+
"signed-out",
|
|
806
|
+
"check-email",
|
|
807
|
+
"verify-email",
|
|
808
|
+
"email-verified",
|
|
809
|
+
"password-changed",
|
|
810
|
+
"access-denied"
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
"title": {
|
|
814
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
815
|
+
},
|
|
816
|
+
"description": {
|
|
817
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
818
|
+
},
|
|
819
|
+
"icon": {
|
|
820
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
821
|
+
},
|
|
822
|
+
"email": {
|
|
823
|
+
"type": "string",
|
|
824
|
+
"doc": "check-email, verify-email: a qué correo se envió."
|
|
825
|
+
},
|
|
826
|
+
"action": {
|
|
827
|
+
"type": "AuthLink",
|
|
828
|
+
"doc": "Acción principal (URL o función del router)."
|
|
829
|
+
},
|
|
830
|
+
"actionLabel": {
|
|
831
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
832
|
+
},
|
|
833
|
+
"secondaryAction": {
|
|
834
|
+
"type": "AuthLink"
|
|
835
|
+
},
|
|
836
|
+
"secondaryLabel": {
|
|
837
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
838
|
+
},
|
|
839
|
+
"onResend": {
|
|
840
|
+
"type": "() => void | Promise<void>"
|
|
841
|
+
},
|
|
842
|
+
"resendAfter": {
|
|
843
|
+
"type": "number"
|
|
844
|
+
},
|
|
845
|
+
"align": {
|
|
846
|
+
"type": "\"center\" | \"start\"",
|
|
847
|
+
"values": [
|
|
848
|
+
"center",
|
|
849
|
+
"start"
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"notes": [
|
|
855
|
+
"Úsalo para cada pantalla de resultado del acceso dentro de AuthLayout: tras cerrar sesión, al caducar la sesión, tras enviar un enlace, al verificar el correo, al cambiar la contraseña, con la cuenta bloqueada, con un enlace caducado o sin permiso.",
|
|
856
|
+
"Para errores de navegación (404, 500, sin conexión) usa ErrorPage; AuthStatus es solo para el acceso."
|
|
857
|
+
],
|
|
858
|
+
"examples": [
|
|
859
|
+
{
|
|
860
|
+
"title": "Revisa tu correo, con reenvío",
|
|
861
|
+
"code": "<AuthStatus preset=\"check-email\" email=\"ana@acme.com\" onResend={resend} action=\"/sign-in\" />"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"title": "Sesión caducada",
|
|
865
|
+
"code": "<AuthStatus preset=\"session-expired\" action=\"/sign-in\" />"
|
|
866
|
+
}
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
"connected-accounts": {
|
|
870
|
+
"import": "orbital-ds/ui/connected-accounts",
|
|
871
|
+
"group": "auth",
|
|
872
|
+
"summary": "Lista de cuentas o servicios vinculados por OAuth con conectar, desconectar y reconectar: métodos de acceso de la persona (social) o integraciones que usa la app (integrations).",
|
|
873
|
+
"see": [
|
|
874
|
+
{
|
|
875
|
+
"component": "oauth-consent",
|
|
876
|
+
"when": "la pantalla donde se concede un permiso a un tercero"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"component": "session-list",
|
|
880
|
+
"when": "sesiones abiertas en otros dispositivos"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"component": "passkey-list",
|
|
884
|
+
"when": "llaves de acceso de la cuenta"
|
|
885
|
+
}
|
|
886
|
+
],
|
|
887
|
+
"exports": [
|
|
888
|
+
"ConnectedAccounts",
|
|
889
|
+
"type ConnectedAccountsPreset",
|
|
890
|
+
"type ConnectionItem",
|
|
891
|
+
"type ConnectionStatus"
|
|
892
|
+
],
|
|
893
|
+
"slots": [
|
|
894
|
+
"connected-account",
|
|
895
|
+
"connected-accounts"
|
|
896
|
+
],
|
|
897
|
+
"optionalPeers": [],
|
|
898
|
+
"props": {
|
|
899
|
+
"ConnectedAccounts": {
|
|
900
|
+
"preset": {
|
|
901
|
+
"type": "ConnectedAccountsPreset",
|
|
902
|
+
"values": [
|
|
903
|
+
"social",
|
|
904
|
+
"integrations"
|
|
905
|
+
]
|
|
906
|
+
},
|
|
907
|
+
"items": {
|
|
908
|
+
"type": "ConnectionItem[]",
|
|
909
|
+
"required": true
|
|
910
|
+
},
|
|
911
|
+
"onConnect": {
|
|
912
|
+
"type": "(id: string) => void | Promise<void>"
|
|
913
|
+
},
|
|
914
|
+
"onDisconnect": {
|
|
915
|
+
"type": "(id: string) => void | Promise<void>"
|
|
916
|
+
},
|
|
917
|
+
"keepOne": {
|
|
918
|
+
"type": "boolean",
|
|
919
|
+
"doc": "No dejar quitar la última conexión (por defecto, en social). Si la persona tiene contraseña, pásalo a false."
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
"presets": {
|
|
924
|
+
"values": [
|
|
925
|
+
"social",
|
|
926
|
+
"integrations"
|
|
927
|
+
],
|
|
928
|
+
"default": "social",
|
|
929
|
+
"intent": {
|
|
930
|
+
"social": "— métodos de acceso vinculados (Better Auth `linkSocial` / `unlinkAccount`). Impide"
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
"notes": [
|
|
934
|
+
"social en los ajustes de seguridad de la cuenta (métodos de acceso vinculados); integrations para los servicios externos que la app usa con OAuth (servidores MCP, almacenamiento, mensajería), con «Reconectar» cuando el token caduca.",
|
|
935
|
+
"Si la persona tiene contraseña o passkey además de los proveedores, pasa keepOne={false}: no se queda fuera al quitar el último."
|
|
936
|
+
],
|
|
937
|
+
"examples": [
|
|
938
|
+
{
|
|
939
|
+
"title": "Métodos de acceso vinculados (preset social)",
|
|
940
|
+
"code": "<ConnectedAccounts\n preset=\"social\"\n items={[\n { id: \"google\", label: \"Google\", status: \"connected\", account: \"ana@gmail.com\" },\n { id: \"github\", label: \"GitHub\", status: \"disconnected\" },\n ]}\n onConnect={link}\n onDisconnect={unlink}\n/>"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"title": "Integraciones con token caducado",
|
|
944
|
+
"code": "<ConnectedAccounts\n preset=\"integrations\"\n items={[{ id: \"mcp-crm\", label: \"CRM (servidor MCP)\", status: \"expired\", detail: \"Leer clientes\" }]}\n onConnect={connect}\n onDisconnect={disconnect}\n/>"
|
|
945
|
+
}
|
|
946
|
+
]
|
|
947
|
+
},
|
|
948
|
+
"mfa-challenge": {
|
|
949
|
+
"import": "orbital-ds/ui/mfa-challenge",
|
|
950
|
+
"group": "auth",
|
|
951
|
+
"summary": "Pide el segundo factor al entrar (app de autenticación, SMS, correo, código de respaldo o passkey) con «probar otro método»; onVerify devuelve AuthResult.",
|
|
952
|
+
"see": [
|
|
953
|
+
{
|
|
954
|
+
"component": "mfa-setup",
|
|
955
|
+
"when": "activar un segundo factor nuevo (QR, número, códigos de respaldo)"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"component": "auth-form",
|
|
959
|
+
"when": "si el segundo factor va en el mismo flujo de entrada, su prop `mfa` ya lo monta"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"component": "input-otp",
|
|
963
|
+
"when": "un campo de código suelto fuera del acceso"
|
|
964
|
+
}
|
|
965
|
+
],
|
|
966
|
+
"exports": [
|
|
967
|
+
"MfaChallenge",
|
|
968
|
+
"type MfaChallengePreset"
|
|
969
|
+
],
|
|
970
|
+
"slots": [
|
|
971
|
+
"mfa-challenge",
|
|
972
|
+
"mfa-challenge-code",
|
|
973
|
+
"mfa-challenge-methods"
|
|
974
|
+
],
|
|
975
|
+
"optionalPeers": [],
|
|
976
|
+
"props": {
|
|
977
|
+
"MfaChallenge": {
|
|
978
|
+
"preset": {
|
|
979
|
+
"type": "MfaChallengePreset",
|
|
980
|
+
"values": [
|
|
981
|
+
"email",
|
|
982
|
+
"totp",
|
|
983
|
+
"sms",
|
|
984
|
+
"backup-code",
|
|
985
|
+
"passkey"
|
|
986
|
+
]
|
|
987
|
+
},
|
|
988
|
+
"methods": {
|
|
989
|
+
"type": "MfaMethod[]",
|
|
990
|
+
"doc": "Métodos activos de la persona (el primero no hace falta repetirlo)."
|
|
991
|
+
},
|
|
992
|
+
"destination": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"doc": "Número o correo ya enmascarado («•••• 4821», «f•••@empresa.com»)."
|
|
995
|
+
},
|
|
996
|
+
"codeLength": {
|
|
997
|
+
"type": "number"
|
|
998
|
+
},
|
|
999
|
+
"trustDevice": {
|
|
1000
|
+
"type": "boolean",
|
|
1001
|
+
"doc": "Casilla «no volver a preguntar en este dispositivo»."
|
|
1002
|
+
},
|
|
1003
|
+
"onVerify": {
|
|
1004
|
+
"type": "(code: string, options: { method: MfaMethod; trustDevice: boolean; }) => AuthResult | Promise<AuthResult>"
|
|
1005
|
+
},
|
|
1006
|
+
"onPasskey": {
|
|
1007
|
+
"type": "() => AuthResult | Promise<AuthResult>"
|
|
1008
|
+
},
|
|
1009
|
+
"onResend": {
|
|
1010
|
+
"type": "(method: MfaMethod) => void | Promise<void>",
|
|
1011
|
+
"doc": "sms y email: reenviar el código."
|
|
1012
|
+
},
|
|
1013
|
+
"onMethodChange": {
|
|
1014
|
+
"type": "(method: MfaMethod) => void",
|
|
1015
|
+
"doc": "Se ha cambiado de método (p. ej. para pedir al servidor que envíe el SMS)."
|
|
1016
|
+
},
|
|
1017
|
+
"resendAfter": {
|
|
1018
|
+
"type": "number"
|
|
1019
|
+
},
|
|
1020
|
+
"onCancel": {
|
|
1021
|
+
"type": "() => void",
|
|
1022
|
+
"doc": "Volver (cerrar sesión parcial, volver al inicio)."
|
|
1023
|
+
},
|
|
1024
|
+
"error": {
|
|
1025
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1026
|
+
},
|
|
1027
|
+
"title": {
|
|
1028
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1029
|
+
},
|
|
1030
|
+
"description": {
|
|
1031
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
"presets": {
|
|
1036
|
+
"values": [
|
|
1037
|
+
"totp",
|
|
1038
|
+
"sms",
|
|
1039
|
+
"email",
|
|
1040
|
+
"backup-code",
|
|
1041
|
+
"passkey"
|
|
1042
|
+
],
|
|
1043
|
+
"default": "totp"
|
|
1044
|
+
},
|
|
1045
|
+
"notes": [
|
|
1046
|
+
"Preset = método por defecto de la persona; pasa en `methods` todos los que tiene activos para ofrecer «probar otro método» (siempre conviene el código de respaldo como salida).",
|
|
1047
|
+
"`destination` llega enmascarado desde la app: el componente nunca ve el número o el correo completo.",
|
|
1048
|
+
"Tras varios fallos, devuelve `{ error: \"too-many-attempts\" }`; no bloquees el campo en el cliente."
|
|
1049
|
+
],
|
|
1050
|
+
"examples": [
|
|
1051
|
+
{
|
|
1052
|
+
"title": "App de autenticación con Better Auth",
|
|
1053
|
+
"code": "<MfaChallenge\n preset=\"totp\"\n methods={[\"totp\", \"sms\", \"backup-code\"]}\n destination=\"•••• 4821\"\n trustDevice\n onVerify={async (code, { trustDevice }) => fromBetterAuth(await authClient.twoFactor.verifyTotp({ code, trustDevice }))}\n/>"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"title": "Código por correo con reenvío",
|
|
1057
|
+
"code": "<MfaChallenge preset=\"email\" destination=\"a•••@acme.com\" onVerify={verifyEmailCode} onResend={resend} />"
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
"mfa-setup": {
|
|
1062
|
+
"import": "orbital-ds/ui/mfa-setup",
|
|
1063
|
+
"group": "auth",
|
|
1064
|
+
"summary": "Activa un segundo factor nuevo paso a paso (QR de la app de autenticación o número de SMS) y entrega los códigos de respaldo; para pedirlo al entrar, MfaChallenge.",
|
|
1065
|
+
"see": [
|
|
1066
|
+
{
|
|
1067
|
+
"component": "mfa-challenge",
|
|
1068
|
+
"when": "pedir el segundo factor al entrar"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"component": "passkey-list",
|
|
1072
|
+
"when": "llaves de acceso (entrar sin contraseña), no un segundo factor"
|
|
1073
|
+
}
|
|
1074
|
+
],
|
|
1075
|
+
"exports": [
|
|
1076
|
+
"MfaSetup",
|
|
1077
|
+
"type MfaSetupPreset"
|
|
1078
|
+
],
|
|
1079
|
+
"slots": [
|
|
1080
|
+
"mfa-setup",
|
|
1081
|
+
"mfa-setup-codes",
|
|
1082
|
+
"mfa-setup-qr"
|
|
1083
|
+
],
|
|
1084
|
+
"optionalPeers": [],
|
|
1085
|
+
"props": {
|
|
1086
|
+
"MfaSetup": {
|
|
1087
|
+
"preset": {
|
|
1088
|
+
"type": "MfaSetupPreset",
|
|
1089
|
+
"values": [
|
|
1090
|
+
"totp",
|
|
1091
|
+
"sms",
|
|
1092
|
+
"backup-codes"
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
"qr": {
|
|
1096
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1097
|
+
"doc": "totp: el código QR (nodo de la app)."
|
|
1098
|
+
},
|
|
1099
|
+
"secret": {
|
|
1100
|
+
"type": "string",
|
|
1101
|
+
"doc": "totp: la clave para teclearla a mano."
|
|
1102
|
+
},
|
|
1103
|
+
"backupCodes": {
|
|
1104
|
+
"type": "string[]",
|
|
1105
|
+
"doc": "Códigos de respaldo (último paso de totp/sms, o el preset backup-codes)."
|
|
1106
|
+
},
|
|
1107
|
+
"codeLength": {
|
|
1108
|
+
"type": "number"
|
|
1109
|
+
},
|
|
1110
|
+
"onSendCode": {
|
|
1111
|
+
"type": "(phone: string) => AuthResult | Promise<AuthResult>",
|
|
1112
|
+
"doc": "sms: envía el código al número."
|
|
1113
|
+
},
|
|
1114
|
+
"onVerify": {
|
|
1115
|
+
"type": "(code: string) => AuthResult | Promise<AuthResult>",
|
|
1116
|
+
"doc": "Confirma el código del método nuevo."
|
|
1117
|
+
},
|
|
1118
|
+
"onDone": {
|
|
1119
|
+
"type": "() => void",
|
|
1120
|
+
"doc": "Terminado (con los códigos guardados, si había)."
|
|
1121
|
+
},
|
|
1122
|
+
"onCancel": {
|
|
1123
|
+
"type": "() => void"
|
|
1124
|
+
},
|
|
1125
|
+
"resendAfter": {
|
|
1126
|
+
"type": "number"
|
|
1127
|
+
},
|
|
1128
|
+
"fileName": {
|
|
1129
|
+
"type": "string",
|
|
1130
|
+
"doc": "Nombre del fichero al descargar los códigos."
|
|
1131
|
+
},
|
|
1132
|
+
"error": {
|
|
1133
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
"presets": {
|
|
1138
|
+
"values": [
|
|
1139
|
+
"totp",
|
|
1140
|
+
"sms",
|
|
1141
|
+
"backup-codes"
|
|
1142
|
+
],
|
|
1143
|
+
"default": "totp"
|
|
1144
|
+
},
|
|
1145
|
+
"notes": [
|
|
1146
|
+
"`totp` es el método recomendado; `sms` solo como alternativa (menos seguro). Pasa siempre `backupCodes` al activar el primer método: es la salida si se pierde el dispositivo.",
|
|
1147
|
+
"El QR lo genera la app con su librería (p. ej. `qrcode.react`) a partir de la URI otpauth:// del proveedor; muestra también `secret` para teclearlo a mano."
|
|
1148
|
+
],
|
|
1149
|
+
"examples": [
|
|
1150
|
+
{
|
|
1151
|
+
"title": "App de autenticación (preset totp)",
|
|
1152
|
+
"code": "<MfaSetup\n preset=\"totp\"\n qr={<img src={qrDataUrl} alt=\"Código QR\" />}\n secret={secret}\n onVerify={verify}\n backupCodes={codes}\n onDone={finish}\n/>"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"title": "Solo los códigos de respaldo",
|
|
1156
|
+
"code": "<MfaSetup preset=\"backup-codes\" backupCodes={codes} onDone={finish} />"
|
|
1157
|
+
}
|
|
1158
|
+
]
|
|
1159
|
+
},
|
|
1160
|
+
"oauth-consent": {
|
|
1161
|
+
"import": "orbital-ds/ui/oauth-consent",
|
|
1162
|
+
"group": "auth",
|
|
1163
|
+
"summary": "Pantalla de consentimiento OAuth: quién pide acceso, con qué cuenta y qué permisos; presets authorize (app de terceros), mcp (asistente de IA) y device (código de dispositivo).",
|
|
1164
|
+
"see": [
|
|
1165
|
+
{
|
|
1166
|
+
"component": "connected-accounts",
|
|
1167
|
+
"when": "revisar o revocar después los accesos ya concedidos"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"component": "confirm-action",
|
|
1171
|
+
"when": "confirmar una acción de la propia persona, no conceder permisos"
|
|
1172
|
+
}
|
|
1173
|
+
],
|
|
1174
|
+
"exports": [
|
|
1175
|
+
"OAuthConsent",
|
|
1176
|
+
"type OAuthConsentPreset",
|
|
1177
|
+
"type OAuthParty",
|
|
1178
|
+
"type OAuthScope"
|
|
1179
|
+
],
|
|
1180
|
+
"slots": [
|
|
1181
|
+
"oauth-consent",
|
|
1182
|
+
"oauth-consent-link",
|
|
1183
|
+
"oauth-consent-scope",
|
|
1184
|
+
"oauth-consent-scopes"
|
|
1185
|
+
],
|
|
1186
|
+
"optionalPeers": [],
|
|
1187
|
+
"props": {
|
|
1188
|
+
"OAuthConsent": {
|
|
1189
|
+
"preset": {
|
|
1190
|
+
"type": "OAuthConsentPreset",
|
|
1191
|
+
"values": [
|
|
1192
|
+
"authorize",
|
|
1193
|
+
"mcp",
|
|
1194
|
+
"device"
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
"client": {
|
|
1198
|
+
"type": "OAuthParty",
|
|
1199
|
+
"required": true,
|
|
1200
|
+
"doc": "Quien pide acceso (app, cliente MCP, dispositivo)."
|
|
1201
|
+
},
|
|
1202
|
+
"app": {
|
|
1203
|
+
"type": "OAuthParty",
|
|
1204
|
+
"doc": "Tu app (a la que se da acceso)."
|
|
1205
|
+
},
|
|
1206
|
+
"account": {
|
|
1207
|
+
"type": "{ name?: string; email: string; avatar?: string; }",
|
|
1208
|
+
"doc": "Cuenta con la que se autoriza."
|
|
1209
|
+
},
|
|
1210
|
+
"onSwitchAccount": {
|
|
1211
|
+
"type": "() => void",
|
|
1212
|
+
"doc": "«¿No eres tú?»: cambiar de cuenta."
|
|
1213
|
+
},
|
|
1214
|
+
"scopes": {
|
|
1215
|
+
"type": "OAuthScope[]"
|
|
1216
|
+
},
|
|
1217
|
+
"selectable": {
|
|
1218
|
+
"type": "boolean",
|
|
1219
|
+
"doc": "Consentimiento granular: los permisos no obligatorios se pueden desmarcar."
|
|
1220
|
+
},
|
|
1221
|
+
"redirectUri": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"doc": "URI de vuelta: se muestra su dominio (la persona sabe adónde vuelve)."
|
|
1224
|
+
},
|
|
1225
|
+
"userCode": {
|
|
1226
|
+
"type": "string",
|
|
1227
|
+
"doc": "device: código ya conocido (enlace con ?user_code=…): llega escrito y la persona lo confirma (se valida con `onSubmitCode`)."
|
|
1228
|
+
},
|
|
1229
|
+
"codeLength": {
|
|
1230
|
+
"type": "number"
|
|
1231
|
+
},
|
|
1232
|
+
"onSubmitCode": {
|
|
1233
|
+
"type": "(code: string) => AuthResult | Promise<AuthResult>",
|
|
1234
|
+
"doc": "device: comprueba el código; devuelve { error } si no vale."
|
|
1235
|
+
},
|
|
1236
|
+
"onAllow": {
|
|
1237
|
+
"type": "(scopes: string[]) => AuthResult | void | Promise<AuthResult | void>",
|
|
1238
|
+
"required": true
|
|
1239
|
+
},
|
|
1240
|
+
"onDeny": {
|
|
1241
|
+
"type": "() => void | Promise<void>",
|
|
1242
|
+
"required": true
|
|
1243
|
+
},
|
|
1244
|
+
"error": {
|
|
1245
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1246
|
+
},
|
|
1247
|
+
"title": {
|
|
1248
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1249
|
+
},
|
|
1250
|
+
"description": {
|
|
1251
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
"presets": {
|
|
1256
|
+
"values": [
|
|
1257
|
+
"authorize",
|
|
1258
|
+
"mcp",
|
|
1259
|
+
"device"
|
|
1260
|
+
],
|
|
1261
|
+
"default": "authorize",
|
|
1262
|
+
"intent": {
|
|
1263
|
+
"mcp": "— un asistente de IA o cliente MCP quiere actuar en nombre de la persona: lo dice claro,",
|
|
1264
|
+
"device": "— flujo de dispositivo (RFC 8628): primero el código que muestra la tele, la CLI o el"
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
"notes": [
|
|
1268
|
+
"authorize para apps de terceros (OAuth/OIDC); mcp cuando quien pide acceso es un asistente de IA o cliente MCP (dilo claro y marca `sensitive` en escritura o borrado); device para CLI, tele o agentes sin navegador (RFC 8628).",
|
|
1269
|
+
"Pasa siempre `redirectUri` y `client.verified`: la persona debe saber adónde vuelve y si el cliente es de confianza. Los textos de cada permiso los traduce la app."
|
|
1270
|
+
],
|
|
1271
|
+
"examples": [
|
|
1272
|
+
{
|
|
1273
|
+
"title": "App de terceros con permisos granulares",
|
|
1274
|
+
"code": "<OAuthConsent\n client={{ name: \"Calendly\", verified: true }}\n account={{ email: \"ana@acme.com\" }}\n scopes={[\n { id: \"calendar.read\", label: \"Ver tu calendario\", required: true },\n { id: \"calendar.write\", label: \"Crear eventos\", sensitive: true },\n ]}\n selectable\n redirectUri=\"https://calendly.com/oauth/callback\"\n onAllow={allow}\n onDeny={deny}\n/>"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"title": "Un asistente de IA (preset mcp)",
|
|
1278
|
+
"code": "<OAuthConsent preset=\"mcp\" client={{ name: \"Claude\" }} scopes={scopes} redirectUri={redirectUri} onAllow={allow} onDeny={deny} />"
|
|
1279
|
+
}
|
|
1280
|
+
]
|
|
1281
|
+
},
|
|
1282
|
+
"passkey-list": {
|
|
1283
|
+
"import": "orbital-ds/ui/passkey-list",
|
|
1284
|
+
"group": "auth",
|
|
1285
|
+
"summary": "Lista las llaves de acceso (passkeys) de la cuenta con crear, renombrar y quitar; sin llaves, explica qué son e invita a crear la primera.",
|
|
1286
|
+
"see": [
|
|
1287
|
+
{
|
|
1288
|
+
"component": "session-list",
|
|
1289
|
+
"when": "sesiones abiertas en otros dispositivos"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"component": "mfa-setup",
|
|
1293
|
+
"when": "activar un segundo factor (código), no una llave de acceso"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"component": "connected-accounts",
|
|
1297
|
+
"when": "cuentas sociales vinculadas"
|
|
1298
|
+
}
|
|
1299
|
+
],
|
|
1300
|
+
"exports": [
|
|
1301
|
+
"PasskeyList",
|
|
1302
|
+
"type PasskeyInfo"
|
|
1303
|
+
],
|
|
1304
|
+
"slots": [
|
|
1305
|
+
"passkey-list",
|
|
1306
|
+
"passkey-list-empty",
|
|
1307
|
+
"passkey-list-item"
|
|
1308
|
+
],
|
|
1309
|
+
"optionalPeers": [],
|
|
1310
|
+
"props": {
|
|
1311
|
+
"PasskeyList": {
|
|
1312
|
+
"passkeys": {
|
|
1313
|
+
"type": "PasskeyInfo[]",
|
|
1314
|
+
"required": true
|
|
1315
|
+
},
|
|
1316
|
+
"onAdd": {
|
|
1317
|
+
"type": "() => void | Promise<void>"
|
|
1318
|
+
},
|
|
1319
|
+
"onRename": {
|
|
1320
|
+
"type": "(id: string, name: string) => void | Promise<void>"
|
|
1321
|
+
},
|
|
1322
|
+
"onDelete": {
|
|
1323
|
+
"type": "(id: string) => void | Promise<void>"
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
"notes": [
|
|
1328
|
+
"En los ajustes de seguridad. Sin llaves, el estado vacío explica qué son: es el mejor momento para que la persona cree la primera. Ofrece también crearla justo después de entrar con contraseña.",
|
|
1329
|
+
"Quitar una llave es reversible (se puede crear otra), así que no pide confirmación; si es el único método de acceso, la app debe impedirlo devolviendo un error."
|
|
1330
|
+
],
|
|
1331
|
+
"examples": [
|
|
1332
|
+
{
|
|
1333
|
+
"title": "En los ajustes de seguridad",
|
|
1334
|
+
"code": "<PasskeyList\n passkeys={[{ id: \"a\", name: \"iPhone de Ana\", createdAt: \"2026-09-01\", synced: true }]}\n onAdd={() => authClient.passkey.addPasskey()}\n onRename={rename}\n onDelete={remove}\n/>"
|
|
1335
|
+
}
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
"password-input": {
|
|
1339
|
+
"import": "orbital-ds/ui/password-input",
|
|
1340
|
+
"group": "auth",
|
|
1341
|
+
"summary": "Campo de contraseña con mostrar u ocultar y aviso de mayúsculas activadas; úsalo siempre en lugar de Input type=\"password\".",
|
|
1342
|
+
"see": [
|
|
1343
|
+
{
|
|
1344
|
+
"component": "password-strength",
|
|
1345
|
+
"when": "barra de fuerza al crear una contraseña"
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"component": "input-otp",
|
|
1349
|
+
"when": "códigos de un solo uso"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"component": "input",
|
|
1353
|
+
"when": "cualquier otro campo de texto"
|
|
1354
|
+
}
|
|
1355
|
+
],
|
|
1356
|
+
"exports": [
|
|
1357
|
+
"PasswordInput"
|
|
1358
|
+
],
|
|
1359
|
+
"slots": [
|
|
1360
|
+
"password-input",
|
|
1361
|
+
"password-input-caps",
|
|
1362
|
+
"password-input-toggle"
|
|
1363
|
+
],
|
|
1364
|
+
"optionalPeers": [],
|
|
1365
|
+
"notes": [
|
|
1366
|
+
"Úsalo en lugar de `<Input type=\"password\">`. `autoComplete=\"current-password\"` al entrar y `\"new-password\"` al crear o cambiar: así funcionan los gestores de contraseñas y las passkeys.",
|
|
1367
|
+
"No bloquees pegar ni la autocompletación: es una mala práctica de seguridad (NIST 800-63B)."
|
|
1368
|
+
],
|
|
1369
|
+
"examples": [
|
|
1370
|
+
{
|
|
1371
|
+
"title": "Al entrar",
|
|
1372
|
+
"code": "<Label htmlFor=\"password\">Contraseña</Label>\n<PasswordInput id=\"password\" name=\"password\" autoComplete=\"current-password\" />"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"title": "Al crear o cambiar la contraseña",
|
|
1376
|
+
"code": "<PasswordInput id=\"new-password\" name=\"password\" autoComplete=\"new-password\" />"
|
|
1377
|
+
}
|
|
1378
|
+
]
|
|
1379
|
+
},
|
|
1380
|
+
"session-list": {
|
|
1381
|
+
"import": "orbital-ds/ui/session-list",
|
|
1382
|
+
"group": "auth",
|
|
1383
|
+
"summary": "Lista las sesiones abiertas en otros dispositivos con cerrar una o todas las demás; la sesión actual va primero y no se cierra desde aquí.",
|
|
1384
|
+
"see": [
|
|
1385
|
+
{
|
|
1386
|
+
"component": "sign-out-dialog",
|
|
1387
|
+
"when": "cerrar la sesión actual"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"component": "passkey-list",
|
|
1391
|
+
"when": "llaves de acceso de la cuenta"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"component": "connected-accounts",
|
|
1395
|
+
"when": "cuentas y servicios vinculados"
|
|
1396
|
+
}
|
|
1397
|
+
],
|
|
1398
|
+
"exports": [
|
|
1399
|
+
"SessionList",
|
|
1400
|
+
"type SessionDeviceKind",
|
|
1401
|
+
"type SessionInfo"
|
|
1402
|
+
],
|
|
1403
|
+
"slots": [
|
|
1404
|
+
"session-list",
|
|
1405
|
+
"session-list-item"
|
|
1406
|
+
],
|
|
1407
|
+
"optionalPeers": [],
|
|
1408
|
+
"props": {
|
|
1409
|
+
"SessionList": {
|
|
1410
|
+
"sessions": {
|
|
1411
|
+
"type": "SessionInfo[]",
|
|
1412
|
+
"required": true
|
|
1413
|
+
},
|
|
1414
|
+
"onRevoke": {
|
|
1415
|
+
"type": "(id: string) => void | Promise<void>"
|
|
1416
|
+
},
|
|
1417
|
+
"onRevokeOthers": {
|
|
1418
|
+
"type": "() => void | Promise<void>"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
"notes": [
|
|
1423
|
+
"En los ajustes de seguridad, junto a PasskeyList y ConnectedAccounts. La sesión actual va primero y no se puede cerrar desde aquí (para eso, SignOutDialog)."
|
|
1424
|
+
],
|
|
1425
|
+
"examples": [
|
|
1426
|
+
{
|
|
1427
|
+
"title": "En los ajustes de seguridad",
|
|
1428
|
+
"code": "<SessionList\n sessions={[\n { id: \"1\", device: \"Chrome en Windows\", kind: \"desktop\", location: \"Madrid\", current: true },\n { id: \"2\", device: \"Safari en iPhone\", kind: \"mobile\", location: \"Sevilla\", lastActive: \"2026-11-20T18:00:00Z\" },\n ]}\n onRevoke={revoke}\n onRevokeOthers={revokeOthers}\n/>"
|
|
1429
|
+
}
|
|
1430
|
+
]
|
|
1431
|
+
},
|
|
1432
|
+
"session-timeout": {
|
|
1433
|
+
"import": "orbital-ds/ui/session-timeout",
|
|
1434
|
+
"group": "auth",
|
|
1435
|
+
"summary": "Diálogo que avisa de que la sesión va a caducar, con cuenta atrás y «seguir conectado»; se abre poco antes de que caduque el token.",
|
|
1436
|
+
"see": [
|
|
1437
|
+
{
|
|
1438
|
+
"component": "auth-status",
|
|
1439
|
+
"when": "pantalla tras caducar (preset session-expired)"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"component": "alert-dialog",
|
|
1443
|
+
"when": "otra decisión bloqueante que no es de sesión"
|
|
1444
|
+
}
|
|
1445
|
+
],
|
|
1446
|
+
"exports": [
|
|
1447
|
+
"SessionTimeout"
|
|
1448
|
+
],
|
|
1449
|
+
"slots": [
|
|
1450
|
+
"session-timeout",
|
|
1451
|
+
"session-timeout-time"
|
|
1452
|
+
],
|
|
1453
|
+
"optionalPeers": [],
|
|
1454
|
+
"props": {
|
|
1455
|
+
"SessionTimeout": {
|
|
1456
|
+
"open": {
|
|
1457
|
+
"type": "boolean",
|
|
1458
|
+
"required": true
|
|
1459
|
+
},
|
|
1460
|
+
"seconds": {
|
|
1461
|
+
"type": "number",
|
|
1462
|
+
"doc": "Segundos que quedan al abrirse."
|
|
1463
|
+
},
|
|
1464
|
+
"onExtend": {
|
|
1465
|
+
"type": "() => void | Promise<void>",
|
|
1466
|
+
"required": true,
|
|
1467
|
+
"doc": "Ampliar la sesión (renovar el token)."
|
|
1468
|
+
},
|
|
1469
|
+
"onSignOut": {
|
|
1470
|
+
"type": "() => void | Promise<void>"
|
|
1471
|
+
},
|
|
1472
|
+
"onExpire": {
|
|
1473
|
+
"type": "() => void"
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
"notes": [
|
|
1478
|
+
"Ábrelo un minuto antes de que caduque la sesión (WCAG 2.2.1 pide al menos 20 s para reaccionar). Si la persona amplía, cierra el diálogo y renueva el token; si no, `onExpire` la lleva a AuthStatus preset=\"session-expired\"."
|
|
1479
|
+
],
|
|
1480
|
+
"examples": [
|
|
1481
|
+
{
|
|
1482
|
+
"title": "Aviso un minuto antes",
|
|
1483
|
+
"code": "<SessionTimeout\n open={expiring}\n seconds={60}\n onExtend={refreshSession}\n onSignOut={signOut}\n onExpire={() => navigate({ to: \"/session-expired\" })}\n/>"
|
|
1484
|
+
}
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
"sign-out-dialog": {
|
|
1488
|
+
"import": "orbital-ds/ui/sign-out-dialog",
|
|
1489
|
+
"group": "auth",
|
|
1490
|
+
"summary": "Confirmación de cerrar sesión con la opción de salir en todos los dispositivos; solo cuando salir tiene coste (trabajo sin guardar, equipo compartido).",
|
|
1491
|
+
"see": [
|
|
1492
|
+
{
|
|
1493
|
+
"component": "confirm-dialog",
|
|
1494
|
+
"when": "confirmar cualquier otra acción"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"component": "session-list",
|
|
1498
|
+
"when": "cerrar una a una las sesiones de otros dispositivos"
|
|
1499
|
+
}
|
|
1500
|
+
],
|
|
1501
|
+
"exports": [
|
|
1502
|
+
"SignOutDialog"
|
|
1503
|
+
],
|
|
1504
|
+
"slots": [
|
|
1505
|
+
"sign-out-dialog"
|
|
1506
|
+
],
|
|
1507
|
+
"optionalPeers": [],
|
|
1508
|
+
"props": {
|
|
1509
|
+
"SignOutDialog": {
|
|
1510
|
+
"trigger": {
|
|
1511
|
+
"type": "React.ReactElement<unknown, string | React.JSXElementConstructor<any>>",
|
|
1512
|
+
"doc": "Elemento que abre el diálogo (un botón o un elemento de menú)."
|
|
1513
|
+
},
|
|
1514
|
+
"open": {
|
|
1515
|
+
"type": "boolean"
|
|
1516
|
+
},
|
|
1517
|
+
"onOpenChange": {
|
|
1518
|
+
"type": "(open: boolean) => void"
|
|
1519
|
+
},
|
|
1520
|
+
"onSignOut": {
|
|
1521
|
+
"type": "(options: { everywhere: boolean; }) => void | Promise<void>",
|
|
1522
|
+
"required": true
|
|
1523
|
+
},
|
|
1524
|
+
"allDevices": {
|
|
1525
|
+
"type": "boolean",
|
|
1526
|
+
"doc": "Casilla «en todos los dispositivos»."
|
|
1527
|
+
},
|
|
1528
|
+
"title": {
|
|
1529
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1530
|
+
},
|
|
1531
|
+
"description": {
|
|
1532
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
"notes": [
|
|
1537
|
+
"Confirma solo cuando salir tiene coste (trabajo sin guardar, sesión de equipo compartido); en el menú de usuario de una app normal, «Salir» puede cerrar sin preguntar y llevar a AuthStatus preset=\"signed-out\"."
|
|
1538
|
+
],
|
|
1539
|
+
"examples": [
|
|
1540
|
+
{
|
|
1541
|
+
"title": "Con «en todos los dispositivos»",
|
|
1542
|
+
"code": "<SignOutDialog\n allDevices\n trigger={<Button variant=\"outline\">Cerrar sesión</Button>}\n onSignOut={({ everywhere }) => signOut({ everywhere })}\n/>"
|
|
1543
|
+
}
|
|
1544
|
+
]
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
}
|