keycloakify 6.3.6 → 6.4.1

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.
Files changed (78) hide show
  1. package/README.md +6 -0
  2. package/lib/components/Error.d.ts +2 -1
  3. package/lib/components/Error.js +2 -2
  4. package/lib/components/Error.js.map +1 -1
  5. package/lib/components/IdpReviewUserProfile.d.ts +2 -1
  6. package/lib/components/IdpReviewUserProfile.js +2 -2
  7. package/lib/components/IdpReviewUserProfile.js.map +1 -1
  8. package/lib/components/Info.d.ts +2 -1
  9. package/lib/components/Info.js +2 -2
  10. package/lib/components/Info.js.map +1 -1
  11. package/lib/components/KcApp.d.ts +1 -0
  12. package/lib/components/KcApp.js.map +1 -1
  13. package/lib/components/Login.d.ts +2 -1
  14. package/lib/components/Login.js +2 -2
  15. package/lib/components/Login.js.map +1 -1
  16. package/lib/components/LoginConfigTotp.d.ts +2 -1
  17. package/lib/components/LoginConfigTotp.js +2 -2
  18. package/lib/components/LoginConfigTotp.js.map +1 -1
  19. package/lib/components/LoginIdpLinkConfirm.d.ts +2 -1
  20. package/lib/components/LoginIdpLinkConfirm.js +2 -2
  21. package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
  22. package/lib/components/LoginIdpLinkEmail.d.ts +2 -1
  23. package/lib/components/LoginIdpLinkEmail.js +2 -2
  24. package/lib/components/LoginIdpLinkEmail.js.map +1 -1
  25. package/lib/components/LoginOtp.d.ts +2 -1
  26. package/lib/components/LoginOtp.js +2 -2
  27. package/lib/components/LoginOtp.js.map +1 -1
  28. package/lib/components/LoginPageExpired.d.ts +2 -1
  29. package/lib/components/LoginPageExpired.js +2 -2
  30. package/lib/components/LoginPageExpired.js.map +1 -1
  31. package/lib/components/LoginResetPassword.d.ts +2 -1
  32. package/lib/components/LoginResetPassword.js +2 -2
  33. package/lib/components/LoginResetPassword.js.map +1 -1
  34. package/lib/components/LoginUpdatePassword.d.ts +2 -1
  35. package/lib/components/LoginUpdatePassword.js +2 -2
  36. package/lib/components/LoginUpdatePassword.js.map +1 -1
  37. package/lib/components/LoginUpdateProfile.d.ts +2 -1
  38. package/lib/components/LoginUpdateProfile.js +2 -2
  39. package/lib/components/LoginUpdateProfile.js.map +1 -1
  40. package/lib/components/LoginVerifyEmail.d.ts +2 -1
  41. package/lib/components/LoginVerifyEmail.js +2 -2
  42. package/lib/components/LoginVerifyEmail.js.map +1 -1
  43. package/lib/components/LogoutConfirm.d.ts +2 -1
  44. package/lib/components/LogoutConfirm.js +2 -2
  45. package/lib/components/LogoutConfirm.js.map +1 -1
  46. package/lib/components/Register.d.ts +2 -1
  47. package/lib/components/Register.js +2 -2
  48. package/lib/components/Register.js.map +1 -1
  49. package/lib/components/RegisterUserProfile.d.ts +2 -1
  50. package/lib/components/RegisterUserProfile.js +2 -2
  51. package/lib/components/RegisterUserProfile.js.map +1 -1
  52. package/lib/components/Terms.d.ts +2 -1
  53. package/lib/components/Terms.js +2 -2
  54. package/lib/components/Terms.js.map +1 -1
  55. package/lib/components/UpdateUserProfile.d.ts +2 -1
  56. package/lib/components/UpdateUserProfile.js +2 -2
  57. package/lib/components/UpdateUserProfile.js.map +1 -1
  58. package/lib/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +5 -5
  60. package/src/lib/components/Error.tsx +30 -24
  61. package/src/lib/components/IdpReviewUserProfile.tsx +41 -30
  62. package/src/lib/components/Info.tsx +41 -35
  63. package/src/lib/components/KcApp.tsx +64 -58
  64. package/src/lib/components/Login.tsx +174 -166
  65. package/src/lib/components/LoginConfigTotp.tsx +158 -152
  66. package/src/lib/components/LoginIdpLinkConfirm.tsx +42 -36
  67. package/src/lib/components/LoginIdpLinkEmail.tsx +30 -24
  68. package/src/lib/components/LoginOtp.tsx +75 -64
  69. package/src/lib/components/LoginPageExpired.tsx +34 -28
  70. package/src/lib/components/LoginResetPassword.tsx +63 -52
  71. package/src/lib/components/LoginUpdatePassword.tsx +101 -95
  72. package/src/lib/components/LoginUpdateProfile.tsx +103 -91
  73. package/src/lib/components/LoginVerifyEmail.tsx +30 -24
  74. package/src/lib/components/LogoutConfirm.tsx +53 -47
  75. package/src/lib/components/Register.tsx +126 -115
  76. package/src/lib/components/RegisterUserProfile.tsx +59 -48
  77. package/src/lib/components/Terms.tsx +51 -45
  78. package/src/lib/components/UpdateUserProfile.tsx +57 -51
@@ -6,66 +6,72 @@ import { useCssAndCx } from "../tools/useCssAndCx";
6
6
  import type { I18n } from "../i18n";
7
7
  import { UserProfileFormFields } from "./shared/UserProfileCommons";
8
8
 
9
- const UpdateUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.UpdateUserProfile; i18n: I18n } & KcProps) => {
10
- const { cx } = useCssAndCx();
9
+ const UpdateUserProfile = memo(
10
+ ({
11
+ kcContext,
12
+ i18n,
13
+ doFetchDefaultThemeResources = true,
14
+ ...props
15
+ }: { kcContext: KcContextBase.UpdateUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
16
+ const { cx } = useCssAndCx();
11
17
 
12
- const { msg, msgStr } = i18n;
18
+ const { msg, msgStr } = i18n;
13
19
 
14
- const { url, isAppInitiatedAction } = kcContext;
20
+ const { url, isAppInitiatedAction } = kcContext;
15
21
 
16
- const [isFomSubmittable, setIsFomSubmittable] = useState(false);
22
+ const [isFomSubmittable, setIsFomSubmittable] = useState(false);
17
23
 
18
- return (
19
- <Template
20
- {...{ kcContext, i18n, ...props }}
21
- doFetchDefaultThemeResources={true}
22
- headerNode={msg("loginProfileTitle")}
23
- formNode={
24
- <form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
25
- <UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...props} />
24
+ return (
25
+ <Template
26
+ {...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
27
+ headerNode={msg("loginProfileTitle")}
28
+ formNode={
29
+ <form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
30
+ <UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...props} />
26
31
 
27
- <div className={cx(props.kcFormGroupClass)}>
28
- <div id="kc-form-options" className={cx(props.kcFormOptionsClass)}>
29
- <div className={cx(props.kcFormOptionsWrapperClass)}></div>
30
- </div>
32
+ <div className={cx(props.kcFormGroupClass)}>
33
+ <div id="kc-form-options" className={cx(props.kcFormOptionsClass)}>
34
+ <div className={cx(props.kcFormOptionsWrapperClass)}></div>
35
+ </div>
31
36
 
32
- <div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
33
- {isAppInitiatedAction ? (
34
- <>
37
+ <div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
38
+ {isAppInitiatedAction ? (
39
+ <>
40
+ <input
41
+ className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonLargeClass)}
42
+ type="submit"
43
+ value={msgStr("doSubmit")}
44
+ />
45
+ <button
46
+ className={cx(props.kcButtonClass, props.kcButtonDefaultClass, props.kcButtonLargeClass)}
47
+ type="submit"
48
+ name="cancel-aia"
49
+ value="true"
50
+ formNoValidate
51
+ >
52
+ {msg("doCancel")}
53
+ </button>
54
+ </>
55
+ ) : (
35
56
  <input
36
- className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonLargeClass)}
57
+ className={cx(
58
+ props.kcButtonClass,
59
+ props.kcButtonPrimaryClass,
60
+ props.kcButtonBlockClass,
61
+ props.kcButtonLargeClass
62
+ )}
37
63
  type="submit"
38
- value={msgStr("doSubmit")}
64
+ defaultValue={msgStr("doSubmit")}
65
+ disabled={!isFomSubmittable}
39
66
  />
40
- <button
41
- className={cx(props.kcButtonClass, props.kcButtonDefaultClass, props.kcButtonLargeClass)}
42
- type="submit"
43
- name="cancel-aia"
44
- value="true"
45
- formNoValidate
46
- >
47
- {msg("doCancel")}
48
- </button>
49
- </>
50
- ) : (
51
- <input
52
- className={cx(
53
- props.kcButtonClass,
54
- props.kcButtonPrimaryClass,
55
- props.kcButtonBlockClass,
56
- props.kcButtonLargeClass
57
- )}
58
- type="submit"
59
- defaultValue={msgStr("doSubmit")}
60
- disabled={!isFomSubmittable}
61
- />
62
- )}
67
+ )}
68
+ </div>
63
69
  </div>
64
- </div>
65
- </form>
66
- }
67
- />
68
- );
69
- });
70
+ </form>
71
+ }
72
+ />
73
+ );
74
+ }
75
+ );
70
76
 
71
77
  export default UpdateUserProfile;