@frontegg/types 5.57.0 → 5.57.3

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.
@@ -0,0 +1,25 @@
1
+ interface Testimonial {
2
+ label: string;
3
+ subtitle: string;
4
+ text: string;
5
+ }
6
+ export interface TitleDescriptionComponentLocalization {
7
+ description: string;
8
+ titleBeforeCompanyName: string;
9
+ companyName: string;
10
+ titleAfterCompanyName: string;
11
+ }
12
+ export interface ValuesComponentLocalization {
13
+ value1: string;
14
+ value2?: string;
15
+ value3?: string;
16
+ value4?: string;
17
+ }
18
+ export interface TestimonialComponentLocalization {
19
+ testimonial1: Testimonial;
20
+ testimonial2?: Testimonial;
21
+ testimonial3?: Testimonial;
22
+ testimonial4?: Testimonial;
23
+ testimonial5?: Testimonial;
24
+ }
25
+ export {};
@@ -16,4 +16,5 @@ export * from './socialLogins';
16
16
  export * from './acceptInvitation';
17
17
  export * from './activateAccount';
18
18
  export * from './recoveryMfa';
19
+ export * from './SplitPageTypes';
19
20
  export declare type LoginBoxLocalization = LoginLocalization & SignupLocalization & ForgetPasswordLocalization & ResetPhoneNumberLocalization & ResetPasswordLocalization & SocialLoginsLocalization & AcceptInvitationLocalization & ActivateAccountLocalization & RecoveryMfaLocalization;
@@ -1,3 +1,4 @@
1
+ import { TestimonialComponentLocalization, TitleDescriptionComponentLocalization, ValuesComponentLocalization } from "./SplitPageTypes";
1
2
  export interface LoginLocalization {
2
3
  /**
3
4
  * strings in login page
@@ -264,6 +265,14 @@ export interface LoginLocalization {
264
265
  * EX: "Don't ask again on this device for {{count}} day"
265
266
  */
266
267
  forceMfaRememberThisDevice: string;
268
+ /**
269
+ * Localizations for split login components
270
+ */
271
+ splitLogin?: {
272
+ valuesComponent?: ValuesComponentLocalization;
273
+ testimonialComponent?: TestimonialComponentLocalization;
274
+ titleDescriptionComponent?: TitleDescriptionComponentLocalization;
275
+ };
267
276
  /**
268
277
  * Login disclaimer text
269
278
  * this text is optional
@@ -1,3 +1,4 @@
1
+ import { TestimonialComponentLocalization, TitleDescriptionComponentLocalization, ValuesComponentLocalization } from "./SplitPageTypes";
1
2
  export interface SignupLocalizationOptions {
2
3
  /**
3
4
  * Sign up page title
@@ -165,6 +166,14 @@ export interface SignupLocalizationOptions {
165
166
  * Go to login link button text in Signup page header
166
167
  */
167
168
  successGoToLoginButton: string;
169
+ /**
170
+ * Localizations for split login components
171
+ */
172
+ splitSignUp?: {
173
+ valuesComponent?: ValuesComponentLocalization;
174
+ testimonialComponent?: TestimonialComponentLocalization;
175
+ titleDescriptionComponent?: TitleDescriptionComponentLocalization;
176
+ };
168
177
  }
169
178
  export interface SignupLocalization {
170
179
  /**
@@ -1,5 +1,27 @@
1
1
  import { CSSProperties, ExtendedCSSProperties } from '../Common';
2
2
  export declare type CustomComponent<T = {}> = null | string | ((props: T) => string | any);
3
+ export interface ITestimonial {
4
+ image: string;
5
+ }
6
+ export interface ITestimonialComponent {
7
+ testimonial1: ITestimonial;
8
+ testimonial2?: ITestimonial;
9
+ testimonial3?: ITestimonial;
10
+ testimonial4?: ITestimonial;
11
+ testimonial5?: ITestimonial;
12
+ }
13
+ export interface ILogosComponent {
14
+ layout?: 'horizontal' | 'vertical';
15
+ logos?: {
16
+ logo1: string;
17
+ logo2?: string;
18
+ logo3?: string;
19
+ logo4?: string;
20
+ logo5?: string;
21
+ logo6?: string;
22
+ };
23
+ }
24
+ export declare type SideElement = 'testimonials' | 'values' | 'logos';
3
25
  export interface InputThemeOptions {
4
26
  /**
5
27
  * Input label style
@@ -1,6 +1,6 @@
1
1
  import { ExtendedCSSProperties } from '../../Common';
2
- import { BaseTheme, BaseThemeOptions } from '../index';
3
- import { ButtonThemeOptions, CustomComponent, InputThemeOptions } from '../ComponentsOptions';
2
+ import { BaseTheme, BaseThemeOptions, SocialLoginsThemeOptions } from '../index';
3
+ import { SideElement, ButtonThemeOptions, CustomComponent, InputThemeOptions, ILogosComponent, ITestimonialComponent } from '../ComponentsOptions';
4
4
  /**
5
5
  * @RootElement
6
6
  * - @WrapperElement
@@ -33,7 +33,7 @@ interface LogoComponent {
33
33
  */
34
34
  style?: ExtendedCSSProperties;
35
35
  }
36
- interface LayoutOptions {
36
+ export interface LayoutOptions {
37
37
  /**
38
38
  * Layout type for login box page, Default is Center login box elements
39
39
  * By choosing Side type you can provide HTML element for the other
@@ -41,6 +41,11 @@ interface LayoutOptions {
41
41
  * with default width equal to 50% of the window width
42
42
  */
43
43
  type: 'float-right' | 'center' | 'float-left';
44
+ /**
45
+ * splitSize is for the side element to setup how much % of the window side elements wi'll take
46
+ * default is 50 = 50%;
47
+ */
48
+ splitSize: number;
44
49
  /**
45
50
  * Will be displayed if type is 'float-right' or 'float-left',
46
51
  * Accepts:
@@ -50,6 +55,52 @@ interface LayoutOptions {
50
55
  */
51
56
  sideElement?: CustomComponent;
52
57
  sideElementStyle?: ExtendedCSSProperties;
58
+ sideContainerStyle?: ExtendedCSSProperties;
59
+ /**
60
+ * Will be displayed if type is 'float-right' or 'float-left',
61
+ * Accepts:
62
+ * - values, testimonials, titleDescription, logos
63
+ * only two elements can be active together
64
+ */
65
+ sideElements?: {
66
+ logos?: ILogosComponent;
67
+ testimonials?: ITestimonialComponent;
68
+ showDivider?: boolean;
69
+ showTitleDivider?: boolean;
70
+ activeElements?: {
71
+ titleDescription?: boolean;
72
+ element1: SideElement;
73
+ element2?: SideElement;
74
+ };
75
+ };
76
+ sideElementsStyle?: {
77
+ dividerStyle?: ExtendedCSSProperties;
78
+ mainSideContainerStyle?: ExtendedCSSProperties;
79
+ logos?: {
80
+ logoStyle?: ExtendedCSSProperties;
81
+ logosContainerStyle?: ExtendedCSSProperties;
82
+ };
83
+ values?: {
84
+ valuesIconStyle?: ExtendedCSSProperties;
85
+ valuesContainerStyle?: ExtendedCSSProperties;
86
+ valuesTextStyle?: ExtendedCSSProperties;
87
+ };
88
+ testimonials?: {
89
+ testimonialsContainerStyle?: ExtendedCSSProperties;
90
+ testimonialsTitleStyle?: ExtendedCSSProperties;
91
+ testtomonialsSubtitleStyle?: ExtendedCSSProperties;
92
+ testimonialsTextStyle?: ExtendedCSSProperties;
93
+ testimonialsIndicatorStyle?: ExtendedCSSProperties;
94
+ testimonialsActiveIndicatorStyle?: ExtendedCSSProperties;
95
+ testimonialsIndicatorContainerStyle?: ExtendedCSSProperties;
96
+ };
97
+ titleDescription?: {
98
+ titleDescriptionContainerStyle?: ExtendedCSSProperties;
99
+ titleDescriptionTitleStyle?: ExtendedCSSProperties;
100
+ titleDescriptionCompanyNameStyle?: ExtendedCSSProperties;
101
+ titleDescriptionDescriptionStyle?: ExtendedCSSProperties;
102
+ };
103
+ };
53
104
  }
54
105
  interface LoginBoxOptionalCommon {
55
106
  /**
@@ -84,7 +135,7 @@ interface LoginBoxOptionalCommon {
84
135
  * box = inside the login box element
85
136
  * page = displayed at the bottom of the page
86
137
  */
87
- poweredByPlacement?: 'box' | 'page';
138
+ poweredByPlacement?: 'box' | 'page' | 'leftBottomCorner';
88
139
  /**
89
140
  * BoxElement
90
141
  * It is a Card component placed inside the [WrapperElement]{@link pageStyle}
@@ -137,6 +188,11 @@ interface LoginBoxOptionalCommon {
137
188
  * css style for every state (base, hover, focus, disabled, etc...)
138
189
  */
139
190
  submitButtonTheme?: ButtonThemeOptions;
191
+ /**
192
+ * Option to customize login box social logins buttons by providing
193
+ * layous options for every button and element
194
+ */
195
+ socialLogins?: SocialLoginsThemeOptions;
140
196
  }
141
197
  export interface LoginBoxCommonTheme extends BaseTheme, LoginBoxOptionalCommon {
142
198
  /**
@@ -19,6 +19,7 @@ export interface ResendOTCProps {
19
19
  }
20
20
  export interface LoginDisclaimerOptions {
21
21
  textStyle: ExtendedCSSProperties;
22
+ disclaimerContainerStyle?: ExtendedCSSProperties;
22
23
  terms: {
23
24
  enabled?: boolean;
24
25
  linkStyle?: ExtendedCSSProperties;
@@ -53,6 +54,7 @@ export interface LoginPageComponentsTheme {
53
54
  * passing 'null' will hide the signup message
54
55
  */
55
56
  signupMessage?: CustomComponent<GoToSignupMessageProps>;
57
+ signupMessagePlacement?: 'box' | 'page';
56
58
  /**
57
59
  * Direct css style for 'Go to signup component'
58
60
  */
@@ -11,6 +11,7 @@ export interface GoToLoginMessageProps {
11
11
  }
12
12
  export interface SignUpDisclaimerOptions {
13
13
  hasCheckbox: boolean;
14
+ disclaimerContainerStyle?: ExtendedCSSProperties;
14
15
  textStyle?: ExtendedCSSProperties;
15
16
  checkBoxStyle?: {
16
17
  unchecked?: {
@@ -85,6 +86,7 @@ export interface SignupPageComponentsTheme {
85
86
  * on sign page can be displayed as mandatory checkbox or text info
86
87
  */
87
88
  disclaimer?: SignUpDisclaimerOptions;
89
+ loginMessagePlacement?: 'box' | 'page';
88
90
  }
89
91
  export interface SignupPageThemeOptions extends LoginBoxCommonThemeOptions, SignupPageComponentsTheme {
90
92
  }
@@ -10,10 +10,28 @@ export interface SocialLoginComponentKeyRender {
10
10
  githubIcon: {};
11
11
  }
12
12
  export declare type SocialLoginCustomComponent<T extends keyof SocialLoginComponentKeyRender> = string | ((props?: SocialLoginComponentKeyRender[T]) => string | any);
13
- export interface SocialLoginsThemeOptions extends BaseThemeOptions {
13
+ export interface SocialLoginsLayoutBase {
14
+ placement?: 'bottom' | 'top';
15
+ stackedContainerStyle?: ExtendedCSSProperties;
16
+ stackedButtonsStyle?: Omit<ButtonThemeOptions, 'disabled'>;
17
+ mainButtonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
18
+ }
19
+ declare type SocialLoginTypes = 'google' | 'facebook' | 'microsoft' | 'github';
20
+ export interface SocialLoginsLayoutStacked extends SocialLoginsLayoutBase {
21
+ mode: 'stack';
22
+ mainButton?: SocialLoginTypes;
23
+ }
24
+ export declare type SocialLoginsLayoutEventually = SocialLoginsLayoutBase & {
25
+ mode: 'eventually';
26
+ };
27
+ export declare type SocialLoginsLayout = SocialLoginsLayoutStacked | SocialLoginsLayoutEventually;
28
+ export interface SocialLoginsCustomComponents {
14
29
  divider?: SocialLoginCustomComponent<'divider'>;
15
30
  dividerStyle?: ExtendedCSSProperties;
16
31
  dividerTextStyle?: ExtendedCSSProperties;
32
+ }
33
+ export interface SocialLoginsThemeOptions extends BaseThemeOptions, SocialLoginsCustomComponents {
34
+ socialLoginsLayout?: SocialLoginsLayout;
17
35
  containerStyle?: ExtendedCSSProperties;
18
36
  buttonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
19
37
  iconsOnly?: boolean;
@@ -27,6 +45,7 @@ export interface SocialLoginsThemeOptions extends BaseThemeOptions {
27
45
  githubButtonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
28
46
  }
29
47
  export interface SocialLoginsTheme extends BaseTheme {
48
+ socialLoginsLayout?: SocialLoginsLayout;
30
49
  dividerStyle?: ExtendedCSSProperties;
31
50
  dividerTextStyle?: ExtendedCSSProperties;
32
51
  divider?: SocialLoginCustomComponent<'divider'>;
@@ -42,3 +61,4 @@ export interface SocialLoginsTheme extends BaseTheme {
42
61
  githubIcon?: SocialLoginCustomComponent<'githubIcon'>;
43
62
  githubButtonStyle?: Omit<ButtonThemeOptions, 'disabled'>;
44
63
  }
64
+ export {};
@@ -29,8 +29,8 @@ export interface AuthPageThemeOptions extends BaseThemeOptions, AuthPageCustomCo
29
29
  };
30
30
  }
31
31
  export interface LoginBoxThemeOptions extends LoginBoxCommonThemeOptions {
32
- themeName?: 'classic' | 'modern' | 'vivid' | 'dark';
33
- poweredByPlacement?: 'box' | 'page';
32
+ themeName?: 'classic' | 'modern' | 'vivid' | 'dark' | 'modernV2' | 'darkV2' | 'classicV2' | 'vividV2';
33
+ poweredByPlacement?: 'box' | 'page' | 'leftBottomCorner';
34
34
  acceptInvitation?: AcceptInvitationPageThemeOptions;
35
35
  activateAccount?: ActivateAccountPageThemeOptions;
36
36
  forgotPassword?: ForgotPasswordPageThemeOptions;
@@ -42,7 +42,7 @@ export interface LoginBoxThemeOptions extends LoginBoxCommonThemeOptions {
42
42
  loader?: LoaderThemeOptions;
43
43
  }
44
44
  export interface LoginBoxTheme extends LoginBoxCommonTheme {
45
- themeName: 'classic' | 'modern' | 'vivid' | 'dark';
45
+ themeName: 'classic' | 'modern' | 'vivid' | 'dark' | 'modernV2' | 'darkV2' | 'classicV2' | 'vividV2';
46
46
  acceptInvitation: AcceptInvitationPageTheme;
47
47
  activateAccount: ActivateAccountPageTheme;
48
48
  forgotPassword: ForgotPasswordPageTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/types",
3
- "version": "5.57.0",
3
+ "version": "5.57.3",
4
4
  "main": "./node/index.js",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",