itrm-components 1.0.43 → 1.0.44
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.
|
@@ -21,13 +21,10 @@ export interface Verify2FAResult {
|
|
|
21
21
|
data?: unknown;
|
|
22
22
|
}
|
|
23
23
|
interface Verify2FAProps {
|
|
24
|
-
/** Verifica el código. La app implementa la lógica (backend, login posterior, etc.) y devuelve el resultado. */
|
|
25
24
|
onVerify: (code: string) => Promise<Verify2FAResult>;
|
|
26
25
|
onSuccess?: (data?: unknown) => void;
|
|
27
26
|
onError?: (error: string) => void;
|
|
28
|
-
/** Acción del enlace "volver". Router-agnóstico: la app decide a dónde navegar. */
|
|
29
27
|
onBack?: () => void;
|
|
30
|
-
/** Render personalizado del enlace "volver". Recibe el contexto para decidir destino/etiqueta. Tiene prioridad sobre onBack. */
|
|
31
28
|
renderBackLink?: (ctx: {
|
|
32
29
|
isLoginFlow: boolean;
|
|
33
30
|
label: string;
|
|
@@ -36,17 +33,11 @@ interface Verify2FAProps {
|
|
|
36
33
|
labels?: Partial<Verify2FALabels>;
|
|
37
34
|
className?: string;
|
|
38
35
|
classNames?: Partial<Verify2FAClassNames>;
|
|
39
|
-
/** Muestra u oculta el fondo de video. Default: true. */
|
|
40
36
|
showBackground?: boolean;
|
|
41
|
-
/** Fuente del video de fondo. Default: asset de Elemento Alpha. */
|
|
42
37
|
backgroundVideoSrc?: string;
|
|
43
|
-
/** Muestra u oculta el logo y la marca. Default: true. */
|
|
44
38
|
showLogo?: boolean;
|
|
45
|
-
/** Fuente del logo. Default: asset de Elemento Alpha. */
|
|
46
39
|
logoSrc?: string;
|
|
47
|
-
/** Muestra u oculta el tooltip informativo (solo aplica en flujo de login). Default: true. */
|
|
48
40
|
showTooltip?: boolean;
|
|
49
|
-
/** Íconos personalizables. Pasa un nodo para reemplazar o null para ocultar; undefined usa el default. */
|
|
50
41
|
icons?: Verify2FAIcons;
|
|
51
42
|
}
|
|
52
43
|
export interface Verify2FAIcons {
|
package/dist/index.es.js
CHANGED
|
@@ -26361,7 +26361,7 @@ const UI2 = {
|
|
|
26361
26361
|
_(P);
|
|
26362
26362
|
}
|
|
26363
26363
|
function j(S) {
|
|
26364
|
-
S.key === "Enter" && w.length === 6 && !I && C();
|
|
26364
|
+
S.key === "Enter" && (S.preventDefault(), w.length === 6 && !I && C());
|
|
26365
26365
|
}
|
|
26366
26366
|
return /* @__PURE__ */ f("div", { className: [b("video-background-container", "root"), c].filter(Boolean).join(" "), children: [
|
|
26367
26367
|
g && i && /* @__PURE__ */ h("div", { className: "video-background-wrapper", children: /* @__PURE__ */ h("video", { autoPlay: !0, loop: !0, muted: !0, className: "video-background", children: /* @__PURE__ */ h("source", { src: i, type: "video/mp4" }) }) }),
|
|
@@ -26387,7 +26387,7 @@ const UI2 = {
|
|
|
26387
26387
|
placeholder: u.placeholder,
|
|
26388
26388
|
value: w,
|
|
26389
26389
|
onChange: (S) => W(S.target.value),
|
|
26390
|
-
|
|
26390
|
+
onKeyDown: j,
|
|
26391
26391
|
maxLength: 6,
|
|
26392
26392
|
disabled: I,
|
|
26393
26393
|
autoFocus: !0
|
|
@@ -26398,7 +26398,7 @@ const UI2 = {
|
|
|
26398
26398
|
/* @__PURE__ */ h("div", { className: "generic-2fa-tooltip-content", role: "tooltip", children: u.tooltip })
|
|
26399
26399
|
] })
|
|
26400
26400
|
] }),
|
|
26401
|
-
/* @__PURE__ */ h("button", { className: b("generic-2fa-btn-verify", "verifyButton"), onClick: C, disabled: I || w.length !== 6, children: I ? u.loadingButton : u.verifyButton })
|
|
26401
|
+
/* @__PURE__ */ h("button", { type: "button", className: b("generic-2fa-btn-verify", "verifyButton"), onClick: C, disabled: I || w.length !== 6, children: I ? u.loadingButton : u.verifyButton })
|
|
26402
26402
|
] }),
|
|
26403
26403
|
/* @__PURE__ */ h("div", { className: b("generic-2fa-back-link", "backLink"), children: s ? s({ isLoginFlow: n, label: n ? u.backToLogin : u.backToDashboard }) : l && /* @__PURE__ */ h("a", { role: "button", tabIndex: 0, style: { cursor: "pointer" }, onClick: l, onKeyDown: (S) => {
|
|
26404
26404
|
(S.key === "Enter" || S.key === " ") && l();
|