@dloizides/auth-web 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +150 -85
- package/dist/index.d.ts +150 -85
- package/dist/index.js +151 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +110 -110
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,134 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
|
2
2
|
import { BffAuthClient, BffUser, HttpClient, BffLoginRequest, BffForgotPasswordRequest, BffResetPasswordRequest, BffOtpRequestResult } from '@dloizides/auth-client';
|
|
3
3
|
export { BffAuthClient, BffAuthClientOptions, BffForgotPasswordRequest, BffLoginRequest, BffOtpRequestRequest, BffOtpRequestResult, BffOtpVerifyRequest, BffPinLoginRequest, BffRegisterRequest, BffResetPasswordRequest, BffUser, HttpClient, HttpRequest, HttpResponse, createFetchHttpClient } from '@dloizides/auth-client';
|
|
4
4
|
import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* `AuthTheme` — the design-token contract every `@dloizides/auth-web` component
|
|
8
|
+
* is styled against.
|
|
9
|
+
*
|
|
10
|
+
* The package owns **no** brand. Katalogos, Erevna and Kefi each look different;
|
|
11
|
+
* each one maps its own theme system onto this flat token bag and passes it in
|
|
12
|
+
* (via the `theme` prop or `<AuthThemeProvider>`). The component code only ever
|
|
13
|
+
* reads these tokens — never an app-specific theme object — so the same
|
|
14
|
+
* `<LoginForm>` renders on-brand in three visually distinct apps.
|
|
15
|
+
*
|
|
16
|
+
* Keep this shape minimal and stable: it is a public API surface.
|
|
17
|
+
*/
|
|
18
|
+
/** Colour tokens — the only colours the auth components reference. */
|
|
19
|
+
interface AuthThemeColors {
|
|
20
|
+
/** Page / screen background behind the form card. */
|
|
21
|
+
background: string;
|
|
22
|
+
/** The form card surface colour. */
|
|
23
|
+
surface: string;
|
|
24
|
+
/** Primary text (titles, labels, input text). */
|
|
25
|
+
text: string;
|
|
26
|
+
/** Muted / secondary text (subtitles, helper copy). */
|
|
27
|
+
textSecondary: string;
|
|
28
|
+
/** Input + card border colour; also the disabled-button fill. */
|
|
29
|
+
border: string;
|
|
30
|
+
/** Brand primary — the submit button fill and link colour. */
|
|
31
|
+
primary: string;
|
|
32
|
+
/** Text drawn on top of `primary` (e.g. the submit button label). */
|
|
33
|
+
onPrimary: string;
|
|
34
|
+
/** Error text and error-state borders. */
|
|
35
|
+
danger: string;
|
|
36
|
+
/** Success text (e.g. the forgot-password confirmation). */
|
|
37
|
+
success: string;
|
|
38
|
+
}
|
|
39
|
+
/** Corner-radius tokens. */
|
|
40
|
+
interface AuthThemeRadii {
|
|
41
|
+
/** Inputs and buttons. */
|
|
42
|
+
input: number;
|
|
43
|
+
/** The form card. */
|
|
44
|
+
card: number;
|
|
45
|
+
}
|
|
46
|
+
/** Spacing scale (in density-independent pixels). */
|
|
47
|
+
interface AuthThemeSpacing {
|
|
48
|
+
/** Tight gap — e.g. label-to-input. */
|
|
49
|
+
xs: number;
|
|
50
|
+
/** Small gap. */
|
|
51
|
+
sm: number;
|
|
52
|
+
/** Default gap — between stacked fields. */
|
|
53
|
+
md: number;
|
|
54
|
+
/** Large gap — section separation. */
|
|
55
|
+
lg: number;
|
|
56
|
+
/** Card inner padding. */
|
|
57
|
+
xl: number;
|
|
58
|
+
}
|
|
59
|
+
/** Font-size tokens. */
|
|
60
|
+
interface AuthThemeTypography {
|
|
61
|
+
/** Form title. */
|
|
62
|
+
title: number;
|
|
63
|
+
/** Form subtitle. */
|
|
64
|
+
subtitle: number;
|
|
65
|
+
/** Field labels. */
|
|
66
|
+
label: number;
|
|
67
|
+
/** Input text and button text. */
|
|
68
|
+
body: number;
|
|
69
|
+
/** Helper / error / footer copy. */
|
|
70
|
+
caption: number;
|
|
71
|
+
}
|
|
72
|
+
/** The full token bag a consuming app supplies. */
|
|
73
|
+
interface AuthTheme {
|
|
74
|
+
colors: AuthThemeColors;
|
|
75
|
+
radii: AuthThemeRadii;
|
|
76
|
+
spacing: AuthThemeSpacing;
|
|
77
|
+
typography: AuthThemeTypography;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A neutral, accessible light-mode theme. Apps are expected to override this —
|
|
81
|
+
* it exists so a component renders sensibly with zero configuration and so
|
|
82
|
+
* `<AuthThemeProvider>` has a default value.
|
|
83
|
+
*/
|
|
84
|
+
declare const defaultAuthTheme: AuthTheme;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* `<AuthScreen>` — the screen-level auth composition, extracted from Kefi's
|
|
88
|
+
* login card (the design reference) so every app gets ONE tidy card instead of
|
|
89
|
+
* hand-rolling its own wrapper.
|
|
90
|
+
*
|
|
91
|
+
* The package's forms (`<LoginForm>`, `<OtpForm>`, `<PinForm>`) each render their
|
|
92
|
+
* own `screen` + `card` chrome by default (drop-one-in-on-a-blank-route mode).
|
|
93
|
+
* When an app needs to compose several controls (method tabs + a form + a passkey
|
|
94
|
+
* button + a hint) onto ONE surface, it renders them as `chromeless` children of
|
|
95
|
+
* an `<AuthScreen>`: the AuthScreen owns the single card, the forms contribute
|
|
96
|
+
* fields only. This makes the P1-04 "loose wrapper" bug impossible by
|
|
97
|
+
* construction — the app can no longer assemble a card with the wrong (or no)
|
|
98
|
+
* surface, border, padding or width.
|
|
99
|
+
*
|
|
100
|
+
* Slots mirror Kefi's login composition exactly: an optional `title`/`subtitle`
|
|
101
|
+
* at the top of the card, the `children` (the auth controls), and an optional
|
|
102
|
+
* `footer` rendered OUTSIDE the card (Kefi's sign-up footer sits below it).
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Default auth-card max width, in dp. Matches the package's standalone form card
|
|
107
|
+
* so a single `<LoginForm>` and an `<AuthScreen>`-composed login read the same
|
|
108
|
+
* width unless the app overrides it.
|
|
109
|
+
*/
|
|
110
|
+
declare const DEFAULT_AUTH_CARD_MAX_WIDTH = 420;
|
|
111
|
+
interface AuthScreenProps {
|
|
112
|
+
/** The auth controls placed on the shared card (forms should be `chromeless`). */
|
|
113
|
+
children: ReactNode;
|
|
114
|
+
/** Explicit theme; overrides any `<AuthThemeProvider>`. Falls back to the default theme. */
|
|
115
|
+
theme?: AuthTheme;
|
|
116
|
+
/** testID on the outer full-screen centering container. */
|
|
117
|
+
testID?: string;
|
|
118
|
+
/** testID on the inner card surface. */
|
|
119
|
+
cardTestID?: string;
|
|
120
|
+
/** Max card width in dp. Defaults to {@link DEFAULT_AUTH_CARD_MAX_WIDTH}. */
|
|
121
|
+
maxWidth?: number;
|
|
122
|
+
/** Optional heading rendered at the top of the card. */
|
|
123
|
+
title?: string;
|
|
124
|
+
/** Optional sub-heading rendered under the title. */
|
|
125
|
+
subtitle?: string;
|
|
126
|
+
/** Optional content rendered below/outside the card (e.g. a sign-up footer). */
|
|
127
|
+
footer?: ReactNode;
|
|
128
|
+
}
|
|
129
|
+
/** The screen-level auth composition: one centered card the controls share. */
|
|
130
|
+
declare function AuthScreen({ children, theme: themeProp, testID, cardTestID, maxWidth, title, subtitle, footer, }: Readonly<AuthScreenProps>): ReactElement;
|
|
131
|
+
|
|
6
132
|
/**
|
|
7
133
|
* Label bags for the auth components.
|
|
8
134
|
*
|
|
@@ -293,86 +419,6 @@ declare const DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS: PreferredMethodSettingsL
|
|
|
293
419
|
declare const DEFAULT_PREFERRED_METHOD_HINT_LABELS: PreferredMethodHintLabels;
|
|
294
420
|
declare const DEFAULT_RESET_PASSWORD_LABELS: ResetPasswordFormLabels;
|
|
295
421
|
|
|
296
|
-
/**
|
|
297
|
-
* `AuthTheme` — the design-token contract every `@dloizides/auth-web` component
|
|
298
|
-
* is styled against.
|
|
299
|
-
*
|
|
300
|
-
* The package owns **no** brand. Katalogos, Erevna and Kefi each look different;
|
|
301
|
-
* each one maps its own theme system onto this flat token bag and passes it in
|
|
302
|
-
* (via the `theme` prop or `<AuthThemeProvider>`). The component code only ever
|
|
303
|
-
* reads these tokens — never an app-specific theme object — so the same
|
|
304
|
-
* `<LoginForm>` renders on-brand in three visually distinct apps.
|
|
305
|
-
*
|
|
306
|
-
* Keep this shape minimal and stable: it is a public API surface.
|
|
307
|
-
*/
|
|
308
|
-
/** Colour tokens — the only colours the auth components reference. */
|
|
309
|
-
interface AuthThemeColors {
|
|
310
|
-
/** Page / screen background behind the form card. */
|
|
311
|
-
background: string;
|
|
312
|
-
/** The form card surface colour. */
|
|
313
|
-
surface: string;
|
|
314
|
-
/** Primary text (titles, labels, input text). */
|
|
315
|
-
text: string;
|
|
316
|
-
/** Muted / secondary text (subtitles, helper copy). */
|
|
317
|
-
textSecondary: string;
|
|
318
|
-
/** Input + card border colour; also the disabled-button fill. */
|
|
319
|
-
border: string;
|
|
320
|
-
/** Brand primary — the submit button fill and link colour. */
|
|
321
|
-
primary: string;
|
|
322
|
-
/** Text drawn on top of `primary` (e.g. the submit button label). */
|
|
323
|
-
onPrimary: string;
|
|
324
|
-
/** Error text and error-state borders. */
|
|
325
|
-
danger: string;
|
|
326
|
-
/** Success text (e.g. the forgot-password confirmation). */
|
|
327
|
-
success: string;
|
|
328
|
-
}
|
|
329
|
-
/** Corner-radius tokens. */
|
|
330
|
-
interface AuthThemeRadii {
|
|
331
|
-
/** Inputs and buttons. */
|
|
332
|
-
input: number;
|
|
333
|
-
/** The form card. */
|
|
334
|
-
card: number;
|
|
335
|
-
}
|
|
336
|
-
/** Spacing scale (in density-independent pixels). */
|
|
337
|
-
interface AuthThemeSpacing {
|
|
338
|
-
/** Tight gap — e.g. label-to-input. */
|
|
339
|
-
xs: number;
|
|
340
|
-
/** Small gap. */
|
|
341
|
-
sm: number;
|
|
342
|
-
/** Default gap — between stacked fields. */
|
|
343
|
-
md: number;
|
|
344
|
-
/** Large gap — section separation. */
|
|
345
|
-
lg: number;
|
|
346
|
-
/** Card inner padding. */
|
|
347
|
-
xl: number;
|
|
348
|
-
}
|
|
349
|
-
/** Font-size tokens. */
|
|
350
|
-
interface AuthThemeTypography {
|
|
351
|
-
/** Form title. */
|
|
352
|
-
title: number;
|
|
353
|
-
/** Form subtitle. */
|
|
354
|
-
subtitle: number;
|
|
355
|
-
/** Field labels. */
|
|
356
|
-
label: number;
|
|
357
|
-
/** Input text and button text. */
|
|
358
|
-
body: number;
|
|
359
|
-
/** Helper / error / footer copy. */
|
|
360
|
-
caption: number;
|
|
361
|
-
}
|
|
362
|
-
/** The full token bag a consuming app supplies. */
|
|
363
|
-
interface AuthTheme {
|
|
364
|
-
colors: AuthThemeColors;
|
|
365
|
-
radii: AuthThemeRadii;
|
|
366
|
-
spacing: AuthThemeSpacing;
|
|
367
|
-
typography: AuthThemeTypography;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* A neutral, accessible light-mode theme. Apps are expected to override this —
|
|
371
|
-
* it exists so a component renders sensibly with zero configuration and so
|
|
372
|
-
* `<AuthThemeProvider>` has a default value.
|
|
373
|
-
*/
|
|
374
|
-
declare const defaultAuthTheme: AuthTheme;
|
|
375
|
-
|
|
376
422
|
/**
|
|
377
423
|
* `<LoginForm>` — the ready-made, themeable password-login form.
|
|
378
424
|
*
|
|
@@ -407,9 +453,16 @@ interface LoginFormProps {
|
|
|
407
453
|
onSignUp?: () => void;
|
|
408
454
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
409
455
|
testIdPrefix?: string;
|
|
456
|
+
/**
|
|
457
|
+
* When `true`, render the form fields WITHOUT the built-in `screen` + `card`
|
|
458
|
+
* chrome, so the form can be composed as a child of `<AuthScreen>` (which owns
|
|
459
|
+
* the single shared card). Defaults to `false` — standalone drop-in behaviour
|
|
460
|
+
* is byte-identical to before.
|
|
461
|
+
*/
|
|
462
|
+
chromeless?: boolean;
|
|
410
463
|
}
|
|
411
464
|
/** Themeable password-login form built on `useBffAuth`. */
|
|
412
|
-
declare function LoginForm({ client, theme: themeProp, labels: labelsProp, onSuccess, onForgotPassword, onSignUp, testIdPrefix, }: Readonly<LoginFormProps>): ReactElement;
|
|
465
|
+
declare function LoginForm({ client, theme: themeProp, labels: labelsProp, onSuccess, onForgotPassword, onSignUp, testIdPrefix, chromeless, }: Readonly<LoginFormProps>): ReactElement;
|
|
413
466
|
|
|
414
467
|
/**
|
|
415
468
|
* `<ForgotPasswordForm>` — the ready-made, themeable "request a reset link"
|
|
@@ -555,9 +608,15 @@ interface OtpFormProps {
|
|
|
555
608
|
onSuccess: (user: BffUser) => void;
|
|
556
609
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
557
610
|
testIdPrefix?: string;
|
|
611
|
+
/**
|
|
612
|
+
* When `true`, render WITHOUT the built-in `screen` + `card` chrome so the
|
|
613
|
+
* form can be composed as a child of `<AuthScreen>`. Defaults to `false` —
|
|
614
|
+
* standalone drop-in behaviour is byte-identical to before.
|
|
615
|
+
*/
|
|
616
|
+
chromeless?: boolean;
|
|
558
617
|
}
|
|
559
618
|
/** Themeable two-step email-OTP login form built on `useOtpLogin`. */
|
|
560
|
-
declare function OtpForm({ client, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, }: Readonly<OtpFormProps>): ReactElement;
|
|
619
|
+
declare function OtpForm({ client, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, chromeless, }: Readonly<OtpFormProps>): ReactElement;
|
|
561
620
|
|
|
562
621
|
/**
|
|
563
622
|
* `<PinForm>` — the ready-made, themeable single-step event-PIN login form.
|
|
@@ -593,9 +652,15 @@ interface PinFormProps {
|
|
|
593
652
|
onSuccess: (user: BffUser) => void;
|
|
594
653
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
595
654
|
testIdPrefix?: string;
|
|
655
|
+
/**
|
|
656
|
+
* When `true`, render WITHOUT the built-in `screen` + `card` chrome so the
|
|
657
|
+
* form can be composed as a child of `<AuthScreen>`. Defaults to `false` —
|
|
658
|
+
* standalone drop-in behaviour is byte-identical to before.
|
|
659
|
+
*/
|
|
660
|
+
chromeless?: boolean;
|
|
596
661
|
}
|
|
597
662
|
/** Themeable single-step event-PIN login form built on `usePinLogin`. */
|
|
598
|
-
declare function PinForm({ client, eventExternalId, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, }: Readonly<PinFormProps>): ReactElement;
|
|
663
|
+
declare function PinForm({ client, eventExternalId, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, chromeless, }: Readonly<PinFormProps>): ReactElement;
|
|
599
664
|
|
|
600
665
|
/**
|
|
601
666
|
* A masked numeric PIN input for the device-PIN unlock + enrol surfaces.
|
|
@@ -1824,4 +1889,4 @@ declare function validatePasswordPolicy(password: string): PasswordPolicyError[]
|
|
|
1824
1889
|
/** `true` when the password satisfies every policy rule. */
|
|
1825
1890
|
declare function isPasswordValid(password: string): boolean;
|
|
1826
1891
|
|
|
1827
|
-
export { AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type CreateBffAuthClientOptions, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createPreferencesClient, defaultAuthTheme, isAllowedPinDigits, isPasswordValid, isValidForgotPasswordEmail, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, resolvePostLoginRoute, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePinLogin, usePreferredMethodSetting, useResetPasswordForm, validatePasswordPolicy, withTestIdPrefix };
|
|
1892
|
+
export { AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type CreateBffAuthClientOptions, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createPreferencesClient, defaultAuthTheme, isAllowedPinDigits, isPasswordValid, isValidForgotPasswordEmail, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, resolvePostLoginRoute, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePinLogin, usePreferredMethodSetting, useResetPasswordForm, validatePasswordPolicy, withTestIdPrefix };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,134 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
|
2
2
|
import { BffAuthClient, BffUser, HttpClient, BffLoginRequest, BffForgotPasswordRequest, BffResetPasswordRequest, BffOtpRequestResult } from '@dloizides/auth-client';
|
|
3
3
|
export { BffAuthClient, BffAuthClientOptions, BffForgotPasswordRequest, BffLoginRequest, BffOtpRequestRequest, BffOtpRequestResult, BffOtpVerifyRequest, BffPinLoginRequest, BffRegisterRequest, BffResetPasswordRequest, BffUser, HttpClient, HttpRequest, HttpResponse, createFetchHttpClient } from '@dloizides/auth-client';
|
|
4
4
|
import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* `AuthTheme` — the design-token contract every `@dloizides/auth-web` component
|
|
8
|
+
* is styled against.
|
|
9
|
+
*
|
|
10
|
+
* The package owns **no** brand. Katalogos, Erevna and Kefi each look different;
|
|
11
|
+
* each one maps its own theme system onto this flat token bag and passes it in
|
|
12
|
+
* (via the `theme` prop or `<AuthThemeProvider>`). The component code only ever
|
|
13
|
+
* reads these tokens — never an app-specific theme object — so the same
|
|
14
|
+
* `<LoginForm>` renders on-brand in three visually distinct apps.
|
|
15
|
+
*
|
|
16
|
+
* Keep this shape minimal and stable: it is a public API surface.
|
|
17
|
+
*/
|
|
18
|
+
/** Colour tokens — the only colours the auth components reference. */
|
|
19
|
+
interface AuthThemeColors {
|
|
20
|
+
/** Page / screen background behind the form card. */
|
|
21
|
+
background: string;
|
|
22
|
+
/** The form card surface colour. */
|
|
23
|
+
surface: string;
|
|
24
|
+
/** Primary text (titles, labels, input text). */
|
|
25
|
+
text: string;
|
|
26
|
+
/** Muted / secondary text (subtitles, helper copy). */
|
|
27
|
+
textSecondary: string;
|
|
28
|
+
/** Input + card border colour; also the disabled-button fill. */
|
|
29
|
+
border: string;
|
|
30
|
+
/** Brand primary — the submit button fill and link colour. */
|
|
31
|
+
primary: string;
|
|
32
|
+
/** Text drawn on top of `primary` (e.g. the submit button label). */
|
|
33
|
+
onPrimary: string;
|
|
34
|
+
/** Error text and error-state borders. */
|
|
35
|
+
danger: string;
|
|
36
|
+
/** Success text (e.g. the forgot-password confirmation). */
|
|
37
|
+
success: string;
|
|
38
|
+
}
|
|
39
|
+
/** Corner-radius tokens. */
|
|
40
|
+
interface AuthThemeRadii {
|
|
41
|
+
/** Inputs and buttons. */
|
|
42
|
+
input: number;
|
|
43
|
+
/** The form card. */
|
|
44
|
+
card: number;
|
|
45
|
+
}
|
|
46
|
+
/** Spacing scale (in density-independent pixels). */
|
|
47
|
+
interface AuthThemeSpacing {
|
|
48
|
+
/** Tight gap — e.g. label-to-input. */
|
|
49
|
+
xs: number;
|
|
50
|
+
/** Small gap. */
|
|
51
|
+
sm: number;
|
|
52
|
+
/** Default gap — between stacked fields. */
|
|
53
|
+
md: number;
|
|
54
|
+
/** Large gap — section separation. */
|
|
55
|
+
lg: number;
|
|
56
|
+
/** Card inner padding. */
|
|
57
|
+
xl: number;
|
|
58
|
+
}
|
|
59
|
+
/** Font-size tokens. */
|
|
60
|
+
interface AuthThemeTypography {
|
|
61
|
+
/** Form title. */
|
|
62
|
+
title: number;
|
|
63
|
+
/** Form subtitle. */
|
|
64
|
+
subtitle: number;
|
|
65
|
+
/** Field labels. */
|
|
66
|
+
label: number;
|
|
67
|
+
/** Input text and button text. */
|
|
68
|
+
body: number;
|
|
69
|
+
/** Helper / error / footer copy. */
|
|
70
|
+
caption: number;
|
|
71
|
+
}
|
|
72
|
+
/** The full token bag a consuming app supplies. */
|
|
73
|
+
interface AuthTheme {
|
|
74
|
+
colors: AuthThemeColors;
|
|
75
|
+
radii: AuthThemeRadii;
|
|
76
|
+
spacing: AuthThemeSpacing;
|
|
77
|
+
typography: AuthThemeTypography;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A neutral, accessible light-mode theme. Apps are expected to override this —
|
|
81
|
+
* it exists so a component renders sensibly with zero configuration and so
|
|
82
|
+
* `<AuthThemeProvider>` has a default value.
|
|
83
|
+
*/
|
|
84
|
+
declare const defaultAuthTheme: AuthTheme;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* `<AuthScreen>` — the screen-level auth composition, extracted from Kefi's
|
|
88
|
+
* login card (the design reference) so every app gets ONE tidy card instead of
|
|
89
|
+
* hand-rolling its own wrapper.
|
|
90
|
+
*
|
|
91
|
+
* The package's forms (`<LoginForm>`, `<OtpForm>`, `<PinForm>`) each render their
|
|
92
|
+
* own `screen` + `card` chrome by default (drop-one-in-on-a-blank-route mode).
|
|
93
|
+
* When an app needs to compose several controls (method tabs + a form + a passkey
|
|
94
|
+
* button + a hint) onto ONE surface, it renders them as `chromeless` children of
|
|
95
|
+
* an `<AuthScreen>`: the AuthScreen owns the single card, the forms contribute
|
|
96
|
+
* fields only. This makes the P1-04 "loose wrapper" bug impossible by
|
|
97
|
+
* construction — the app can no longer assemble a card with the wrong (or no)
|
|
98
|
+
* surface, border, padding or width.
|
|
99
|
+
*
|
|
100
|
+
* Slots mirror Kefi's login composition exactly: an optional `title`/`subtitle`
|
|
101
|
+
* at the top of the card, the `children` (the auth controls), and an optional
|
|
102
|
+
* `footer` rendered OUTSIDE the card (Kefi's sign-up footer sits below it).
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Default auth-card max width, in dp. Matches the package's standalone form card
|
|
107
|
+
* so a single `<LoginForm>` and an `<AuthScreen>`-composed login read the same
|
|
108
|
+
* width unless the app overrides it.
|
|
109
|
+
*/
|
|
110
|
+
declare const DEFAULT_AUTH_CARD_MAX_WIDTH = 420;
|
|
111
|
+
interface AuthScreenProps {
|
|
112
|
+
/** The auth controls placed on the shared card (forms should be `chromeless`). */
|
|
113
|
+
children: ReactNode;
|
|
114
|
+
/** Explicit theme; overrides any `<AuthThemeProvider>`. Falls back to the default theme. */
|
|
115
|
+
theme?: AuthTheme;
|
|
116
|
+
/** testID on the outer full-screen centering container. */
|
|
117
|
+
testID?: string;
|
|
118
|
+
/** testID on the inner card surface. */
|
|
119
|
+
cardTestID?: string;
|
|
120
|
+
/** Max card width in dp. Defaults to {@link DEFAULT_AUTH_CARD_MAX_WIDTH}. */
|
|
121
|
+
maxWidth?: number;
|
|
122
|
+
/** Optional heading rendered at the top of the card. */
|
|
123
|
+
title?: string;
|
|
124
|
+
/** Optional sub-heading rendered under the title. */
|
|
125
|
+
subtitle?: string;
|
|
126
|
+
/** Optional content rendered below/outside the card (e.g. a sign-up footer). */
|
|
127
|
+
footer?: ReactNode;
|
|
128
|
+
}
|
|
129
|
+
/** The screen-level auth composition: one centered card the controls share. */
|
|
130
|
+
declare function AuthScreen({ children, theme: themeProp, testID, cardTestID, maxWidth, title, subtitle, footer, }: Readonly<AuthScreenProps>): ReactElement;
|
|
131
|
+
|
|
6
132
|
/**
|
|
7
133
|
* Label bags for the auth components.
|
|
8
134
|
*
|
|
@@ -293,86 +419,6 @@ declare const DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS: PreferredMethodSettingsL
|
|
|
293
419
|
declare const DEFAULT_PREFERRED_METHOD_HINT_LABELS: PreferredMethodHintLabels;
|
|
294
420
|
declare const DEFAULT_RESET_PASSWORD_LABELS: ResetPasswordFormLabels;
|
|
295
421
|
|
|
296
|
-
/**
|
|
297
|
-
* `AuthTheme` — the design-token contract every `@dloizides/auth-web` component
|
|
298
|
-
* is styled against.
|
|
299
|
-
*
|
|
300
|
-
* The package owns **no** brand. Katalogos, Erevna and Kefi each look different;
|
|
301
|
-
* each one maps its own theme system onto this flat token bag and passes it in
|
|
302
|
-
* (via the `theme` prop or `<AuthThemeProvider>`). The component code only ever
|
|
303
|
-
* reads these tokens — never an app-specific theme object — so the same
|
|
304
|
-
* `<LoginForm>` renders on-brand in three visually distinct apps.
|
|
305
|
-
*
|
|
306
|
-
* Keep this shape minimal and stable: it is a public API surface.
|
|
307
|
-
*/
|
|
308
|
-
/** Colour tokens — the only colours the auth components reference. */
|
|
309
|
-
interface AuthThemeColors {
|
|
310
|
-
/** Page / screen background behind the form card. */
|
|
311
|
-
background: string;
|
|
312
|
-
/** The form card surface colour. */
|
|
313
|
-
surface: string;
|
|
314
|
-
/** Primary text (titles, labels, input text). */
|
|
315
|
-
text: string;
|
|
316
|
-
/** Muted / secondary text (subtitles, helper copy). */
|
|
317
|
-
textSecondary: string;
|
|
318
|
-
/** Input + card border colour; also the disabled-button fill. */
|
|
319
|
-
border: string;
|
|
320
|
-
/** Brand primary — the submit button fill and link colour. */
|
|
321
|
-
primary: string;
|
|
322
|
-
/** Text drawn on top of `primary` (e.g. the submit button label). */
|
|
323
|
-
onPrimary: string;
|
|
324
|
-
/** Error text and error-state borders. */
|
|
325
|
-
danger: string;
|
|
326
|
-
/** Success text (e.g. the forgot-password confirmation). */
|
|
327
|
-
success: string;
|
|
328
|
-
}
|
|
329
|
-
/** Corner-radius tokens. */
|
|
330
|
-
interface AuthThemeRadii {
|
|
331
|
-
/** Inputs and buttons. */
|
|
332
|
-
input: number;
|
|
333
|
-
/** The form card. */
|
|
334
|
-
card: number;
|
|
335
|
-
}
|
|
336
|
-
/** Spacing scale (in density-independent pixels). */
|
|
337
|
-
interface AuthThemeSpacing {
|
|
338
|
-
/** Tight gap — e.g. label-to-input. */
|
|
339
|
-
xs: number;
|
|
340
|
-
/** Small gap. */
|
|
341
|
-
sm: number;
|
|
342
|
-
/** Default gap — between stacked fields. */
|
|
343
|
-
md: number;
|
|
344
|
-
/** Large gap — section separation. */
|
|
345
|
-
lg: number;
|
|
346
|
-
/** Card inner padding. */
|
|
347
|
-
xl: number;
|
|
348
|
-
}
|
|
349
|
-
/** Font-size tokens. */
|
|
350
|
-
interface AuthThemeTypography {
|
|
351
|
-
/** Form title. */
|
|
352
|
-
title: number;
|
|
353
|
-
/** Form subtitle. */
|
|
354
|
-
subtitle: number;
|
|
355
|
-
/** Field labels. */
|
|
356
|
-
label: number;
|
|
357
|
-
/** Input text and button text. */
|
|
358
|
-
body: number;
|
|
359
|
-
/** Helper / error / footer copy. */
|
|
360
|
-
caption: number;
|
|
361
|
-
}
|
|
362
|
-
/** The full token bag a consuming app supplies. */
|
|
363
|
-
interface AuthTheme {
|
|
364
|
-
colors: AuthThemeColors;
|
|
365
|
-
radii: AuthThemeRadii;
|
|
366
|
-
spacing: AuthThemeSpacing;
|
|
367
|
-
typography: AuthThemeTypography;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* A neutral, accessible light-mode theme. Apps are expected to override this —
|
|
371
|
-
* it exists so a component renders sensibly with zero configuration and so
|
|
372
|
-
* `<AuthThemeProvider>` has a default value.
|
|
373
|
-
*/
|
|
374
|
-
declare const defaultAuthTheme: AuthTheme;
|
|
375
|
-
|
|
376
422
|
/**
|
|
377
423
|
* `<LoginForm>` — the ready-made, themeable password-login form.
|
|
378
424
|
*
|
|
@@ -407,9 +453,16 @@ interface LoginFormProps {
|
|
|
407
453
|
onSignUp?: () => void;
|
|
408
454
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
409
455
|
testIdPrefix?: string;
|
|
456
|
+
/**
|
|
457
|
+
* When `true`, render the form fields WITHOUT the built-in `screen` + `card`
|
|
458
|
+
* chrome, so the form can be composed as a child of `<AuthScreen>` (which owns
|
|
459
|
+
* the single shared card). Defaults to `false` — standalone drop-in behaviour
|
|
460
|
+
* is byte-identical to before.
|
|
461
|
+
*/
|
|
462
|
+
chromeless?: boolean;
|
|
410
463
|
}
|
|
411
464
|
/** Themeable password-login form built on `useBffAuth`. */
|
|
412
|
-
declare function LoginForm({ client, theme: themeProp, labels: labelsProp, onSuccess, onForgotPassword, onSignUp, testIdPrefix, }: Readonly<LoginFormProps>): ReactElement;
|
|
465
|
+
declare function LoginForm({ client, theme: themeProp, labels: labelsProp, onSuccess, onForgotPassword, onSignUp, testIdPrefix, chromeless, }: Readonly<LoginFormProps>): ReactElement;
|
|
413
466
|
|
|
414
467
|
/**
|
|
415
468
|
* `<ForgotPasswordForm>` — the ready-made, themeable "request a reset link"
|
|
@@ -555,9 +608,15 @@ interface OtpFormProps {
|
|
|
555
608
|
onSuccess: (user: BffUser) => void;
|
|
556
609
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
557
610
|
testIdPrefix?: string;
|
|
611
|
+
/**
|
|
612
|
+
* When `true`, render WITHOUT the built-in `screen` + `card` chrome so the
|
|
613
|
+
* form can be composed as a child of `<AuthScreen>`. Defaults to `false` —
|
|
614
|
+
* standalone drop-in behaviour is byte-identical to before.
|
|
615
|
+
*/
|
|
616
|
+
chromeless?: boolean;
|
|
558
617
|
}
|
|
559
618
|
/** Themeable two-step email-OTP login form built on `useOtpLogin`. */
|
|
560
|
-
declare function OtpForm({ client, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, }: Readonly<OtpFormProps>): ReactElement;
|
|
619
|
+
declare function OtpForm({ client, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, chromeless, }: Readonly<OtpFormProps>): ReactElement;
|
|
561
620
|
|
|
562
621
|
/**
|
|
563
622
|
* `<PinForm>` — the ready-made, themeable single-step event-PIN login form.
|
|
@@ -593,9 +652,15 @@ interface PinFormProps {
|
|
|
593
652
|
onSuccess: (user: BffUser) => void;
|
|
594
653
|
/** Prefix applied to every `testID` so multiple forms can share a screen. */
|
|
595
654
|
testIdPrefix?: string;
|
|
655
|
+
/**
|
|
656
|
+
* When `true`, render WITHOUT the built-in `screen` + `card` chrome so the
|
|
657
|
+
* form can be composed as a child of `<AuthScreen>`. Defaults to `false` —
|
|
658
|
+
* standalone drop-in behaviour is byte-identical to before.
|
|
659
|
+
*/
|
|
660
|
+
chromeless?: boolean;
|
|
596
661
|
}
|
|
597
662
|
/** Themeable single-step event-PIN login form built on `usePinLogin`. */
|
|
598
|
-
declare function PinForm({ client, eventExternalId, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, }: Readonly<PinFormProps>): ReactElement;
|
|
663
|
+
declare function PinForm({ client, eventExternalId, theme: themeProp, labels: labelsProp, onSuccess, testIdPrefix, chromeless, }: Readonly<PinFormProps>): ReactElement;
|
|
599
664
|
|
|
600
665
|
/**
|
|
601
666
|
* A masked numeric PIN input for the device-PIN unlock + enrol surfaces.
|
|
@@ -1824,4 +1889,4 @@ declare function validatePasswordPolicy(password: string): PasswordPolicyError[]
|
|
|
1824
1889
|
/** `true` when the password satisfies every policy rule. */
|
|
1825
1890
|
declare function isPasswordValid(password: string): boolean;
|
|
1826
1891
|
|
|
1827
|
-
export { AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type CreateBffAuthClientOptions, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createPreferencesClient, defaultAuthTheme, isAllowedPinDigits, isPasswordValid, isValidForgotPasswordEmail, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, resolvePostLoginRoute, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePinLogin, usePreferredMethodSetting, useResetPasswordForm, validatePasswordPolicy, withTestIdPrefix };
|
|
1892
|
+
export { AuthScreen, type AuthScreenProps, AuthTestIds, type AuthTheme, type AuthThemeColors, AuthThemeProvider, type AuthThemeProviderProps, type AuthThemeRadii, type AuthThemeSpacing, type AuthThemeTypography, BffAuthStatus, type BffDeviceState, type BffLoginConfig, type CreateBffAuthClientOptions, DEFAULT_AUTH_CARD_MAX_WIDTH, DEFAULT_DEVICE_PIN_ENROLL_LABELS, DEFAULT_DEVICE_PIN_SETTINGS_LABELS, DEFAULT_DEVICE_PIN_UNLOCK_LABELS, DEFAULT_FORGOT_PASSWORD_FIELDS_LABELS, DEFAULT_FORGOT_PASSWORD_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_OTP_LABELS, DEFAULT_PASSKEY_LOGIN_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_PIN_LABELS, DEFAULT_PREFERRED_METHOD_HINT_LABELS, DEFAULT_PREFERRED_METHOD_SETTINGS_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEVICE_PIN_ALLOWED_DIGITS, DEVICE_PIN_DEFAULT_DIGITS, type DevicePinCapableClient, type DevicePinDisableCapableClient, type DevicePinEnrollCapableClient, DevicePinEnrollErrorKey, DevicePinEnrollForm, type DevicePinEnrollFormProps, type DevicePinEnrollLabels, type DevicePinEnrollResult, DevicePinErrorKey, DevicePinInput, type DevicePinInputProps, DevicePinLengthPicker, type DevicePinLengthPickerProps, DevicePinOffer, type DevicePinOfferProps, DevicePinSettingsCard, type DevicePinSettingsCardProps, type DevicePinSettingsLabels, type DevicePinUnlockCapableClient, type DevicePinUnlockLabels, type DevicePinUnlockResult, DevicePinUnlockScreen, type DevicePinUnlockScreenProps, type DevicePinUnlockedUser, ForgotPasswordFields, type ForgotPasswordFieldsLabels, type ForgotPasswordFieldsProps, ForgotPasswordForm, type ForgotPasswordFormLabels, type ForgotPasswordFormProps, type LoginConfigCapableClient, LoginForm, type LoginFormLabels, type LoginFormProps, OtpForm, type OtpFormLabels, type OtpFormProps, OtpLoginStep, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, type PasskeyErrorCode, PasskeyLoginButton, type PasskeyLoginButtonProps, type PasskeyLoginLabels, PasskeySettingsCard, type PasskeySettingsCardProps, type PasskeySettingsLabels, PasswordPolicyError, PinForm, type PinFormLabels, type PinFormProps, type PreferencesClientOptions, type PreferredMethodClient, PreferredMethodHint, type PreferredMethodHintLabels, type PreferredMethodHintProps, PreferredMethodSettingsCard, type PreferredMethodSettingsCardProps, type PreferredMethodSettingsLabels, ResetPasswordError, ResetPasswordForm, type ResetPasswordFormLabels, type ResetPasswordFormProps, type RoleRoute, type RoleRouteTable, type UseBffAuthOptions, type UseBffAuthResult, type UseBffForgotPasswordOptions, type UseBffLoginConfigResult, type UseBffResetPasswordOptions, type UseDevicePinDisableArgs, type UseDevicePinDisableResult, type UseDevicePinEnrollArgs, type UseDevicePinEnrollResult, type UseDevicePinUnlockArgs, type UseDevicePinUnlockResult, type UseForgotPasswordSubmitArgs, type UseForgotPasswordSubmitResult, type UseOtpLoginOptions, type UseOtpLoginResult, type UsePinLoginOptions, type UsePinLoginResult, type UsePreferredMethodSettingArgs, type UsePreferredMethodSettingResult, type UseResetPasswordFormArgs, type UseResetPasswordFormResult, cachePreferredMethod, clearCachedPreferredMethod, collectUserRoles, createBffAuthClient, createPreferencesClient, defaultAuthTheme, isAllowedPinDigits, isPasswordValid, isValidForgotPasswordEmail, readCachedPreferredMethod, readPasskeyError, readPasskeyRegistered, resolvePostLoginRoute, startPasskeyLogin, startPasskeyRegistration, syncPreferredMethodFromServer, useAuthTheme, useBffAuth, useBffForgotPassword, useBffLoginConfig, useBffResetPassword, useDevicePinDisable, useDevicePinEnroll, useDevicePinUnlock, useForgotPasswordSubmit, useOtpLogin, usePinLogin, usePreferredMethodSetting, useResetPasswordForm, validatePasswordPolicy, withTestIdPrefix };
|