@wakastellar/ui 0.1.2 → 0.1.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.
@@ -1,8 +1,26 @@
1
+ import { LoginConfig } from './types';
2
+ export type { LoginConfig, LoginColorConfig, LoginThemeConfig, LoginAssetsConfig, LoginSignupOptions } from './types';
1
3
  export interface LoginProps {
4
+ /** Configuration JSON complète du composant */
5
+ config?: LoginConfig;
6
+ /** Callback lors de la soumission du formulaire */
2
7
  onSubmit?: (data: LoginFormData) => void;
8
+ /** Callback pour le mot de passe oublié */
3
9
  onForgotPassword?: () => void;
10
+ /** Callback pour l'inscription */
4
11
  onSignUp?: () => void;
12
+ /** Callbacks pour les connexions SSO */
13
+ onSSOGoogle?: () => void;
14
+ onSSOMicrosoft?: () => void;
15
+ onSSOApple?: () => void;
16
+ onSSOLinkedIn?: () => void;
17
+ onSSOGithub?: () => void;
18
+ onSSOFacebook?: () => void;
19
+ onSSOInstagram?: () => void;
20
+ onSSOFranceConnect?: () => void;
21
+ /** Afficher la connexion sociale (déprécié, utilise config.signup_options) */
5
22
  showSocialLogin?: boolean;
23
+ /** Classe CSS personnalisée */
6
24
  className?: string;
7
25
  }
8
26
  export interface LoginFormData {
@@ -10,4 +28,4 @@ export interface LoginFormData {
10
28
  password: string;
11
29
  rememberMe?: boolean;
12
30
  }
13
- export declare function Login({ onSubmit, onForgotPassword, onSignUp, showSocialLogin, className, }: LoginProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function Login({ config, onSubmit, onForgotPassword, onSignUp, onSSOGoogle, onSSOMicrosoft, onSSOApple, onSSOLinkedIn, onSSOGithub, onSSOFacebook, onSSOInstagram, onSSOFranceConnect, showSocialLogin, className, }: LoginProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Configuration des couleurs du thème
3
+ */
4
+ export interface LoginColorConfig {
5
+ /** Couleur principale */
6
+ primary: string;
7
+ /** Couleur secondaire */
8
+ secondary: string;
9
+ /** Couleur d'accent */
10
+ accent: string;
11
+ }
12
+ /**
13
+ * Configuration du thème
14
+ */
15
+ export interface LoginThemeConfig {
16
+ /** Nom du thème */
17
+ name: string;
18
+ /** Mode sombre activé */
19
+ dark_mode: boolean;
20
+ }
21
+ /**
22
+ * Assets (logos et images)
23
+ */
24
+ export interface LoginAssetsConfig {
25
+ /** Logo du thème en mode sombre */
26
+ theme_logo_dark?: string;
27
+ /** Logo du thème en mode clair */
28
+ theme_logo_light?: string;
29
+ /** Image du thème en mode clair */
30
+ theme_image_light?: string;
31
+ /** Image du thème en mode sombre */
32
+ theme_image_dark?: string;
33
+ /** Image du sponsor en mode clair */
34
+ sponsor_image_light?: string;
35
+ /** Image du sponsor en mode sombre */
36
+ sponsor_image_dark?: string;
37
+ }
38
+ /**
39
+ * Options d'inscription et de connexion
40
+ */
41
+ export interface LoginSignupOptions {
42
+ /** Autoriser la connexion classique */
43
+ allow_login: boolean;
44
+ /** Requérir la MFA */
45
+ require_MFA: boolean;
46
+ /** MFA par email */
47
+ MFA_email: boolean;
48
+ /** MFA par WhatsApp */
49
+ MFA_whatsapp: boolean;
50
+ /** MFA par RCS */
51
+ MFA_RCS: boolean;
52
+ /** Autoriser SSO Google */
53
+ allow_sso_google: boolean;
54
+ /** Autoriser SSO Microsoft */
55
+ allow_sso_microsoft: boolean;
56
+ /** Autoriser SSO Apple */
57
+ allow_sso_apple: boolean;
58
+ /** Autoriser SSO LinkedIn */
59
+ allow_sso_linkedIn: boolean;
60
+ /** Autoriser SSO GitHub */
61
+ allow_sso_github: boolean;
62
+ /** Autoriser SSO Facebook */
63
+ allow_sso_facebook: boolean;
64
+ /** Autoriser SSO Instagram */
65
+ allow_sso_instagram: boolean;
66
+ /** Autoriser SSO France Connect */
67
+ allow_sso_france_connect: boolean;
68
+ }
69
+ /**
70
+ * Configuration complète du composant Login
71
+ */
72
+ export interface LoginConfig {
73
+ /** Configuration des couleurs */
74
+ color_json: LoginColorConfig;
75
+ /** Configuration du thème */
76
+ theme_json: LoginThemeConfig;
77
+ /** Assets (logos et images) */
78
+ assets: LoginAssetsConfig;
79
+ /** Afficher le badge "Waka Powered" */
80
+ waka_powered: boolean;
81
+ /** Code de langue (ex: "fr_FR") */
82
+ lang_code: string;
83
+ /** Options d'inscription et de connexion */
84
+ signup_options: LoginSignupOptions;
85
+ /** Règles de résolution OEM (optionnel, pour documentation) */
86
+ oem_resolution_rules?: string[];
87
+ }