import { LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index'; import { ExtendedCSSProperties } from '../../Common'; import { CustomComponent } from '../ComponentsOptions'; interface TitleProps { title: string; } interface MessageProps { message: string; } export interface GoToSignupMessageProps { goToSignup: () => void; goToSignupMessage: string; goToSignupButtonText: string; } export interface ResendOTCProps { haventReceiveOTCMessage: string; resendingMessage: string; resendOTCMessage: string; resendOTC: () => void; } export interface LoginDisclaimerOptions { textStyle: ExtendedCSSProperties; disclaimerContainerStyle?: ExtendedCSSProperties; placement?: 'box' | 'page'; terms: { enabled?: boolean; linkStyle?: ExtendedCSSProperties; }; privacy: { enabled?: boolean; linkStyle?: ExtendedCSSProperties; }; } export type OperatorType = 'startWith' | 'endWith' | 'contains' | 'equals'; export interface DirectLoginActionConfig { allowList?: { operator: OperatorType; value: string; }[]; } export interface LoginPageComponentsTheme { /** * Showing a login page header title */ showLoginPageTitle?: boolean; /** * Showing a login page header subtitle */ showLoginPageSubtitle?: boolean; /** * Login page container style */ containerStyle?: ExtendedCSSProperties; carouselArrowsContainerStyle?: ExtendedCSSProperties; carouselArrowsStyle?: ExtendedCSSProperties; pageTitleStyle?: ExtendedCSSProperties; pageSubtitleStyle?: ExtendedCSSProperties; carouselIndicatorStyle?: ExtendedCSSProperties; carouselActiveIndicatorStyle?: ExtendedCSSProperties; /** * Login page form container style */ formContainerStyle?: ExtendedCSSProperties; /** * Login page title default is 'Sign In' * displayed in login screen (login with password, pre-login) * passing 'null' will hide the title */ title?: CustomComponent; /** * Direct css style for Login Page title */ titleStyle?: ExtendedCSSProperties; /** * Go to signup component displayed under box title default is 'Don't have an account? Sign up' * displayed in login screen (login with password, pre-login) * passing 'null' will hide the signup message */ signupMessage?: CustomComponent; signupMessagePlacement?: 'box' | 'page'; /** * Direct css style for 'Go to signup component' */ signupMessageStyle?: ExtendedCSSProperties; /** * Recover Multi-factor page title default is 'Recover MFA' * displayed in recover mfa screen * passing 'null' will hide the title */ recoverMfaTitle?: CustomComponent; /** * Direct css style for Recover Multi-factor title */ recoverMfaTitleStyle?: ExtendedCSSProperties; /** * One time code login title default is 'Check your email' * displayed after pre-login with OTC enabled * passing 'null' will hide the title */ otcTitle?: CustomComponent; /** * Direct css style for One time code */ otcTitleStyle?: ExtendedCSSProperties; /** * One time code login message component default is 'We have sent an six-digit code to smaple@email.com' * displayed after pre-login with OTC enabled * passing 'null' will hide the title */ otcMessage?: CustomComponent; /** * Direct css style for One time code login message */ otcMessageStyle?: ExtendedCSSProperties; /** * Resend OTC container component, displaye after otc submit button, * passing 'null' will hide the otc resend button * WRONG TYPE HERE */ resendOTC?: ExtendedCSSProperties; /** * Direct css style for Resent OTC container */ resendOTCStyle?: ExtendedCSSProperties; /** * Direct style for the text displayed before resend otc button, * default is 'Haven’t received it?' */ resendOTCMessageStyle?: ExtendedCSSProperties; /** * Direct css style for OTC code input */ otcInputStyle?: ExtendedCSSProperties; touchIdTitle?: CustomComponent; touchIdMessage?: CustomComponent; androidTitle?: CustomComponent; androidMessage?: CustomComponent; usbKeyTitle?: CustomComponent; usbKeyMessage?: CustomComponent; smsPreviewTitle?: CustomComponent; smsPreviewMessage?: CustomComponent; smsChangePhoneTitle?: CustomComponent; smsChangePhoneMessage?: CustomComponent; smsVerifyCodeTitle?: CustomComponent; smsVerifyCodeMessage?: CustomComponent; /** * MagicLink success login title default is 'Check your email' * displayed after pre-login if MagicLink enabled * passing 'null' will hide the title */ magicLinkTitle?: CustomComponent; /** * Direct css style for MagicLink title */ magicLinkTitleStyle?: ExtendedCSSProperties; /** * MagicLink login message component default is 'We have sent an email to smaple@email.com' * displayed after pre-login with MagicLink enabled * passing 'null' will hide the title */ magicLinkMessage?: CustomComponent; /** * Direct css style for MagicLink message */ magicLinkMessageStyle?: ExtendedCSSProperties; /** * Disclaimer text options * on login page can be displayed as text info only */ disclaimer?: LoginDisclaimerOptions; touchIdCardIcon?: CustomComponent<{}>; androidCardIcon?: CustomComponent<{}>; smsCardIcon?: CustomComponent<{}>; usbKeyCardIcon?: CustomComponent<{}>; loginCardIcon?: CustomComponent<{}>; enrollMFAListTitle?: CustomComponent; enrollMFAListMessage?: CustomComponent; mfaListTitle?: CustomComponent; mfaListMessage?: CustomComponent; enrollMFAAuthenticatorAppTitle?: CustomComponent; enrollMFAAuthenticatorAppMessage?: CustomComponent; mfaAuthenticatorAppTitle?: CustomComponent; enrollMFASMSTitle?: CustomComponent; enrollMFASMSMessage?: CustomComponent; preEnrollMfaSMSTitle?: CustomComponent; preEnrollMfaSMSMessage?: CustomComponent; mfaSMSTitle?: CustomComponent; mfaSMSMessage?: CustomComponent; enrollMFAListTitleStyle?: ExtendedCSSProperties; enrollMFAListMessageStyle?: ExtendedCSSProperties; mfaListTitleStyle?: ExtendedCSSProperties; mfaListMessageStyle?: ExtendedCSSProperties; enrollMFAAuthenticatorAppTitleStyle?: ExtendedCSSProperties; enrollMFAAuthenticatorAppMessageStyle?: ExtendedCSSProperties; mfaAuthenticatorAppTitleStyle?: ExtendedCSSProperties; enrollMFASMSTitleStyle?: ExtendedCSSProperties; enrollMFASMSMessageStyle?: ExtendedCSSProperties; preEnrollMfaSMSTitleStyle?: ExtendedCSSProperties; preEnrollMfaSMSMessageStyle?: ExtendedCSSProperties; mfaSMSTitleStyle?: ExtendedCSSProperties; mfaSMSMessageStyle?: ExtendedCSSProperties; mfaBackButtonStyle?: ExtendedCSSProperties; enrollMFAEmailCodeTitleStyle?: ExtendedCSSProperties; enrollMFAEmailCodeMessageStyle?: ExtendedCSSProperties; /** * Option to override direct login action config * allowList - list of rules to enable direct login for specific urls */ directLoginActionConfig?: DirectLoginActionConfig; } export interface LoginPageThemeOptions extends LoginBoxCommonThemeOptions, LoginPageComponentsTheme { } export interface LoginPageTheme extends LoginBoxCommonTheme, LoginPageComponentsTheme { } export {};