@asgardeo/vue 0.3.9 → 0.4.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.
Files changed (86) hide show
  1. package/README.md +2 -32
  2. package/dist/api/updateMeProfile.d.ts +25 -0
  3. package/dist/api/updateMeProfile.d.ts.map +1 -0
  4. package/dist/cjs/index.js +1437 -774
  5. package/dist/cjs/index.js.map +4 -4
  6. package/dist/components/auth/sign-in/AuthOptionFactory.d.ts.map +1 -0
  7. package/dist/components/auth/sign-in/AuthOptionFactoryCore.d.ts.map +1 -0
  8. package/dist/components/auth/sign-in/BaseSignIn.d.ts.map +1 -0
  9. package/dist/components/auth/sign-in/SignIn.d.ts.map +1 -0
  10. package/dist/components/auth/sign-in/v1/BaseSignIn.d.ts.map +1 -0
  11. package/dist/components/auth/sign-in/v1/SignIn.d.ts.map +1 -0
  12. package/dist/components/auth/sign-in/v1/options/SignInOptionFactory.d.ts.map +1 -0
  13. package/dist/components/auth/sign-in/v2/AuthOptionFactory.d.ts.map +1 -0
  14. package/dist/components/auth/sign-in/v2/BaseSignIn.d.ts.map +1 -0
  15. package/dist/components/auth/sign-in/v2/SignIn.d.ts.map +1 -0
  16. package/dist/components/auth/sign-up/BaseSignUp.d.ts.map +1 -0
  17. package/dist/components/auth/sign-up/SignUp.d.ts.map +1 -0
  18. package/dist/components/auth/sign-up/v1/BaseSignUp.d.ts.map +1 -0
  19. package/dist/components/auth/sign-up/v1/SignUp.d.ts.map +1 -0
  20. package/dist/components/auth/sign-up/v1/options/SignUpOptionFactory.d.ts.map +1 -0
  21. package/dist/components/auth/sign-up/v2/BaseSignUp.d.ts.map +1 -0
  22. package/dist/components/auth/sign-up/v2/SignUp.d.ts.map +1 -0
  23. package/dist/components/{control → presentation}/organization/Organization.d.ts +1 -1
  24. package/dist/components/presentation/organization/Organization.d.ts.map +1 -0
  25. package/dist/components/{control → presentation}/user/User.d.ts +2 -2
  26. package/dist/components/presentation/user/User.d.ts.map +1 -0
  27. package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts +28 -3
  28. package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts.map +1 -1
  29. package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts +18 -8
  30. package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts.map +1 -1
  31. package/dist/components/presentation/user-dropdown/UserDropdown.d.ts +20 -2
  32. package/dist/components/presentation/user-dropdown/UserDropdown.d.ts.map +1 -1
  33. package/dist/components/presentation/user-profile/BaseUserProfile.d.ts +9 -17
  34. package/dist/components/presentation/user-profile/BaseUserProfile.d.ts.map +1 -1
  35. package/dist/components/presentation/user-profile/UserProfile.css.d.ts +9 -0
  36. package/dist/components/presentation/user-profile/UserProfile.css.d.ts.map +1 -1
  37. package/dist/components/presentation/user-profile/UserProfile.d.ts.map +1 -1
  38. package/dist/index.d.ts +11 -11
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1391 -721
  41. package/dist/index.js.map +4 -4
  42. package/dist/models/contexts.d.ts +2 -0
  43. package/dist/models/contexts.d.ts.map +1 -1
  44. package/dist/providers/AsgardeoProvider.d.ts.map +1 -1
  45. package/dist/providers/UserProvider.d.ts.map +1 -1
  46. package/dist/utils/getDisplayName.d.ts +23 -0
  47. package/dist/utils/getDisplayName.d.ts.map +1 -0
  48. package/dist/utils/getMappedUserProfileValue.d.ts +21 -0
  49. package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -0
  50. package/package.json +2 -2
  51. package/dist/components/control/organization/Organization.d.ts.map +0 -1
  52. package/dist/components/control/user/User.d.ts.map +0 -1
  53. package/dist/components/presentation/sign-in/AuthOptionFactory.d.ts.map +0 -1
  54. package/dist/components/presentation/sign-in/AuthOptionFactoryCore.d.ts.map +0 -1
  55. package/dist/components/presentation/sign-in/BaseSignIn.d.ts.map +0 -1
  56. package/dist/components/presentation/sign-in/SignIn.d.ts.map +0 -1
  57. package/dist/components/presentation/sign-in/v1/BaseSignIn.d.ts.map +0 -1
  58. package/dist/components/presentation/sign-in/v1/SignIn.d.ts.map +0 -1
  59. package/dist/components/presentation/sign-in/v1/options/SignInOptionFactory.d.ts.map +0 -1
  60. package/dist/components/presentation/sign-in/v2/AuthOptionFactory.d.ts.map +0 -1
  61. package/dist/components/presentation/sign-in/v2/BaseSignIn.d.ts.map +0 -1
  62. package/dist/components/presentation/sign-in/v2/SignIn.d.ts.map +0 -1
  63. package/dist/components/presentation/sign-up/BaseSignUp.d.ts.map +0 -1
  64. package/dist/components/presentation/sign-up/SignUp.d.ts.map +0 -1
  65. package/dist/components/presentation/sign-up/v1/BaseSignUp.d.ts.map +0 -1
  66. package/dist/components/presentation/sign-up/v1/SignUp.d.ts.map +0 -1
  67. package/dist/components/presentation/sign-up/v1/options/SignUpOptionFactory.d.ts.map +0 -1
  68. package/dist/components/presentation/sign-up/v2/BaseSignUp.d.ts.map +0 -1
  69. package/dist/components/presentation/sign-up/v2/SignUp.d.ts.map +0 -1
  70. /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactory.d.ts +0 -0
  71. /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactoryCore.d.ts +0 -0
  72. /package/dist/components/{presentation → auth}/sign-in/BaseSignIn.d.ts +0 -0
  73. /package/dist/components/{presentation → auth}/sign-in/SignIn.d.ts +0 -0
  74. /package/dist/components/{presentation → auth}/sign-in/v1/BaseSignIn.d.ts +0 -0
  75. /package/dist/components/{presentation → auth}/sign-in/v1/SignIn.d.ts +0 -0
  76. /package/dist/components/{presentation → auth}/sign-in/v1/options/SignInOptionFactory.d.ts +0 -0
  77. /package/dist/components/{presentation → auth}/sign-in/v2/AuthOptionFactory.d.ts +0 -0
  78. /package/dist/components/{presentation → auth}/sign-in/v2/BaseSignIn.d.ts +0 -0
  79. /package/dist/components/{presentation → auth}/sign-in/v2/SignIn.d.ts +0 -0
  80. /package/dist/components/{presentation → auth}/sign-up/BaseSignUp.d.ts +0 -0
  81. /package/dist/components/{presentation → auth}/sign-up/SignUp.d.ts +0 -0
  82. /package/dist/components/{presentation → auth}/sign-up/v1/BaseSignUp.d.ts +0 -0
  83. /package/dist/components/{presentation → auth}/sign-up/v1/SignUp.d.ts +0 -0
  84. /package/dist/components/{presentation → auth}/sign-up/v1/options/SignUpOptionFactory.d.ts +0 -0
  85. /package/dist/components/{presentation → auth}/sign-up/v2/BaseSignUp.d.ts +0 -0
  86. /package/dist/components/{presentation → auth}/sign-up/v2/SignUp.d.ts +0 -0
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6
6
  import {
7
7
  AsgardeoRuntimeError as AsgardeoRuntimeError3,
8
8
  extractUserClaimsFromIdToken as extractUserClaimsFromIdToken2,
9
+ generateFlattenedUserProfile as generateFlattenedUserProfile2,
9
10
  hasAuthParamsInUrl,
10
11
  hasCalledForThisInstanceInUrl,
11
12
  Platform as Platform2
@@ -857,17 +858,13 @@ import {
857
858
  var UserProvider = defineComponent7({
858
859
  name: "UserProvider",
859
860
  props: {
860
- /** The flattened profile (top-level attribute map). */
861
- flattenedProfile: { default: null, type: Object },
862
- /** Optional callback run after the profile is updated locally. */
861
+ /** Callback to sync a successfully-saved profile back up to AsgardeoProvider. */
863
862
  onUpdateProfile: { default: void 0, type: Function },
864
863
  /** The full user profile data (nested + flat + schemas). */
865
864
  profile: { default: null, type: Object },
866
865
  /** Re-fetch the user profile from the server. */
867
866
  revalidateProfile: { default: async () => {
868
867
  }, type: Function },
869
- /** The SCIM2 schemas describing user profile attributes. */
870
- schemas: { default: null, type: Array },
871
868
  /** Update the user profile via SCIM2 PATCH. */
872
869
  updateProfile: {
873
870
  default: void 0,
@@ -875,11 +872,13 @@ var UserProvider = defineComponent7({
875
872
  }
876
873
  },
877
874
  setup(props, { slots }) {
878
- const flattenedProfileRef = computed5(() => props.flattenedProfile);
879
875
  const profileRef = computed5(() => props.profile);
880
- const schemasRef = computed5(() => props.schemas);
876
+ const flattenedProfileRef = computed5(() => props.profile?.flattenedProfile ?? null);
877
+ const schemasRef = computed5(() => props.profile?.schemas ?? null);
881
878
  const context = {
882
879
  flattenedProfile: flattenedProfileRef,
880
+ onUpdateProfile: props.onUpdateProfile ?? (() => {
881
+ }),
883
882
  profile: profileRef,
884
883
  revalidateProfile: props.revalidateProfile,
885
884
  schemas: schemasRef,
@@ -1627,8 +1626,6 @@ var AsgardeoProvider = defineComponent8({
1627
1626
  const currentOrganization = shallowRef(null);
1628
1627
  const myOrganizations = shallowRef([]);
1629
1628
  const userProfile = shallowRef(null);
1630
- const flattenedProfile = shallowRef(null);
1631
- const schemas = shallowRef([]);
1632
1629
  const resolvedBaseUrl = ref7(props.baseUrl);
1633
1630
  let isUpdatingSession = false;
1634
1631
  let signInCheckInterval;
@@ -1665,6 +1662,12 @@ var AsgardeoProvider = defineComponent8({
1665
1662
  if (config.platform === Platform2.AsgardeoV2) {
1666
1663
  const claims = extractUserClaimsFromIdToken2(decodedToken);
1667
1664
  user.value = claims;
1665
+ const profileData = {
1666
+ flattenedProfile: claims,
1667
+ profile: claims,
1668
+ schemas: []
1669
+ };
1670
+ userProfile.value = profileData;
1668
1671
  } else {
1669
1672
  try {
1670
1673
  const fetchedUser = await asgardeo.getUser({ baseUrl });
@@ -1684,8 +1687,6 @@ var AsgardeoProvider = defineComponent8({
1684
1687
  try {
1685
1688
  const profileData = await asgardeo.getUserProfile({ baseUrl });
1686
1689
  userProfile.value = profileData;
1687
- flattenedProfile.value = profileData.flattenedProfile || null;
1688
- schemas.value = profileData.schemas || [];
1689
1690
  } catch {
1690
1691
  }
1691
1692
  }
@@ -1905,19 +1906,42 @@ var AsgardeoProvider = defineComponent8({
1905
1906
  default: () => h8(
1906
1907
  UserProvider_default,
1907
1908
  {
1908
- flattenedProfile: flattenedProfile.value,
1909
+ onUpdateProfile: (updatedUser) => {
1910
+ user.value = updatedUser;
1911
+ userProfile.value = {
1912
+ flattenedProfile: generateFlattenedUserProfile2(
1913
+ updatedUser,
1914
+ userProfile.value?.schemas
1915
+ ),
1916
+ profile: updatedUser,
1917
+ schemas: userProfile.value?.schemas ?? []
1918
+ };
1919
+ },
1909
1920
  profile: userProfile.value,
1910
1921
  revalidateProfile: async () => {
1911
- const baseUrl = resolvedBaseUrl.value;
1922
+ const revalConfig = buildConfig();
1923
+ if (revalConfig.platform === Platform2.AsgardeoV2) {
1924
+ try {
1925
+ const decodedToken = await asgardeo.getDecodedIdToken();
1926
+ const claims = extractUserClaimsFromIdToken2(decodedToken);
1927
+ user.value = claims;
1928
+ userProfile.value = {
1929
+ flattenedProfile: claims,
1930
+ profile: claims,
1931
+ schemas: []
1932
+ };
1933
+ } catch {
1934
+ }
1935
+ return;
1936
+ }
1912
1937
  try {
1913
- const profileData = await asgardeo.getUserProfile({ baseUrl });
1938
+ const profileData = await asgardeo.getUserProfile({
1939
+ baseUrl: resolvedBaseUrl.value
1940
+ });
1914
1941
  userProfile.value = profileData;
1915
- flattenedProfile.value = profileData.flattenedProfile || null;
1916
- schemas.value = profileData.schemas || [];
1917
1942
  } catch {
1918
1943
  }
1919
- },
1920
- schemas: schemas.value
1944
+ }
1921
1945
  },
1922
1946
  {
1923
1947
  default: () => h8(
@@ -2664,68 +2688,90 @@ var USER_DROPDOWN_CSS = `
2664
2688
  font-family: var(--asgardeo-typography-fontFamily);
2665
2689
  }
2666
2690
 
2667
- /* Trigger ---------------------------------------------------- */
2691
+ /* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2668
2692
 
2669
2693
  .asgardeo-user-dropdown__trigger {
2670
2694
  display: inline-flex;
2671
2695
  align-items: center;
2672
- gap: calc(var(--asgardeo-spacing-unit) * 0.75);
2673
- padding: calc(var(--asgardeo-spacing-unit) * 0.5) calc(var(--asgardeo-spacing-unit) * 1)
2674
- calc(var(--asgardeo-spacing-unit) * 0.5) calc(var(--asgardeo-spacing-unit) * 0.5);
2696
+ gap: calc(var(--asgardeo-spacing-unit) * 0.5);
2697
+ padding: 3px;
2675
2698
  background: none;
2676
- border: 1px solid var(--asgardeo-color-border);
2677
- border-radius: 9999px;
2699
+ border: 2px solid transparent;
2700
+ border-radius: var(--asgardeo-border-radius-full);
2678
2701
  cursor: pointer;
2679
2702
  color: var(--asgardeo-color-text-primary);
2680
- font-family: var(--asgardeo-typography-fontFamily);
2681
- font-size: var(--asgardeo-typography-fontSize-md);
2682
2703
  transition:
2683
- background-color var(--asgardeo-transition-fast),
2684
2704
  border-color var(--asgardeo-transition-fast),
2685
2705
  box-shadow var(--asgardeo-transition-fast);
2686
2706
  box-sizing: border-box;
2707
+ outline: none;
2687
2708
  }
2688
2709
 
2689
2710
  .asgardeo-user-dropdown__trigger:hover {
2690
- background-color: var(--asgardeo-color-action-hover);
2691
2711
  border-color: var(--asgardeo-color-primary-main);
2692
2712
  }
2693
2713
 
2714
+ .asgardeo-user-dropdown__trigger--open {
2715
+ border-color: var(--asgardeo-color-primary-main);
2716
+ box-shadow: 0 0 0 3px var(--asgardeo-focus-ring-color);
2717
+ }
2718
+
2694
2719
  .asgardeo-user-dropdown__trigger:focus-visible {
2695
- outline: none;
2720
+ border-color: var(--asgardeo-color-primary-main);
2696
2721
  box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);
2697
2722
  }
2698
2723
 
2699
- /* Avatar ---------------------------------------------------- */
2724
+ /* \u2500\u2500 Trigger avatar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2700
2725
 
2701
2726
  .asgardeo-user-dropdown__avatar {
2702
2727
  display: flex;
2703
2728
  align-items: center;
2704
2729
  justify-content: center;
2705
- width: calc(var(--asgardeo-spacing-unit) * 3);
2706
- height: calc(var(--asgardeo-spacing-unit) * 3);
2730
+ width: 32px;
2731
+ height: 32px;
2707
2732
  border-radius: 50%;
2708
- background-color: var(--asgardeo-color-primary-main);
2709
- color: var(--asgardeo-color-primary-contrastText);
2733
+ color: #ffffff;
2710
2734
  flex-shrink: 0;
2711
2735
  font-size: var(--asgardeo-typography-fontSize-sm);
2712
- font-weight: var(--asgardeo-typography-fontWeight-medium);
2736
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
2737
+ line-height: 1;
2738
+ user-select: none;
2739
+ pointer-events: none;
2740
+ }
2741
+
2742
+ /* sm \u2014 28 px */
2743
+ .asgardeo-user-dropdown__avatar--sm {
2744
+ width: 28px;
2745
+ height: 28px;
2746
+ font-size: var(--asgardeo-typography-fontSize-xs);
2713
2747
  }
2714
2748
 
2715
- /* Name ------------------------------------------------------ */
2749
+ /* lg \u2014 38 px */
2750
+ .asgardeo-user-dropdown__avatar--lg {
2751
+ width: 38px;
2752
+ height: 38px;
2753
+ font-size: var(--asgardeo-typography-fontSize-md);
2754
+ }
2716
2755
 
2717
- .asgardeo-user-dropdown__name {
2718
- max-width: 140px;
2719
- white-space: nowrap;
2720
- overflow: hidden;
2721
- text-overflow: ellipsis;
2756
+ /* \u2500\u2500 Chevron \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2757
+
2758
+ .asgardeo-user-dropdown__chevron {
2759
+ display: inline-flex;
2760
+ align-items: center;
2761
+ color: var(--asgardeo-color-text-secondary);
2762
+ transition: transform var(--asgardeo-transition-normal);
2763
+ padding-right: calc(var(--asgardeo-spacing-unit) * 0.25);
2764
+ }
2765
+
2766
+ .asgardeo-user-dropdown__trigger--open .asgardeo-user-dropdown__chevron {
2767
+ transform: rotate(180deg);
2722
2768
  }
2723
2769
 
2724
- /* Dropdown menu --------------------------------------------- */
2770
+ /* \u2500\u2500 Dropdown menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2725
2771
 
2726
2772
  .asgardeo-user-dropdown__menu {
2727
2773
  position: absolute;
2728
- top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.5));
2774
+ top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.75));
2729
2775
  right: 0;
2730
2776
  z-index: 1000;
2731
2777
  background-color: var(--asgardeo-color-background-surface);
@@ -2733,20 +2779,141 @@ var USER_DROPDOWN_CSS = `
2733
2779
  border-radius: var(--asgardeo-dropdown-borderRadius);
2734
2780
  box-shadow: var(--asgardeo-dropdown-shadow);
2735
2781
  overflow: hidden;
2736
- min-width: 160px;
2782
+ min-width: 220px;
2737
2783
  display: flex;
2738
2784
  flex-direction: column;
2739
- padding: calc(var(--asgardeo-spacing-unit) * 0.5) 0;
2785
+ animation: asgardeo-dropdown-enter var(--asgardeo-transition-fast) ease;
2786
+ }
2787
+
2788
+ /* Alignment */
2789
+
2790
+ .asgardeo-user-dropdown__menu--align-left {
2791
+ right: auto;
2792
+ left: 0;
2793
+ }
2794
+
2795
+ /* Size: sm */
2796
+
2797
+ .asgardeo-user-dropdown__menu--size-sm {
2798
+ min-width: 180px;
2799
+ }
2800
+
2801
+ .asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header {
2802
+ padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 1.5);
2803
+ gap: calc(var(--asgardeo-spacing-unit) * 1);
2804
+ }
2805
+
2806
+ .asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header-avatar {
2807
+ width: 30px;
2808
+ height: 30px;
2809
+ font-size: var(--asgardeo-typography-fontSize-sm);
2810
+ }
2811
+
2812
+ .asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__item {
2813
+ padding: calc(var(--asgardeo-spacing-unit) * 0.75) calc(var(--asgardeo-spacing-unit) * 1.5);
2814
+ font-size: var(--asgardeo-typography-fontSize-xs);
2815
+ }
2816
+
2817
+ /* Size: lg */
2818
+
2819
+ .asgardeo-user-dropdown__menu--size-lg {
2820
+ min-width: 280px;
2821
+ }
2822
+
2823
+ .asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header {
2824
+ padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);
2825
+ gap: calc(var(--asgardeo-spacing-unit) * 1.5);
2826
+ }
2827
+
2828
+ .asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header-avatar {
2829
+ width: 42px;
2830
+ height: 42px;
2831
+ font-size: var(--asgardeo-typography-fontSize-lg);
2832
+ }
2833
+
2834
+ .asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__item {
2835
+ padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2);
2836
+ font-size: var(--asgardeo-typography-fontSize-md);
2837
+ }
2838
+
2839
+ @keyframes asgardeo-dropdown-enter {
2840
+ from {
2841
+ opacity: 0;
2842
+ transform: translateY(-6px) scale(0.97);
2843
+ }
2844
+ to {
2845
+ opacity: 1;
2846
+ transform: translateY(0) scale(1);
2847
+ }
2848
+ }
2849
+
2850
+ /* \u2500\u2500 Menu header (user identity) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2851
+
2852
+ .asgardeo-user-dropdown__menu-header {
2853
+ display: flex;
2854
+ align-items: center;
2855
+ gap: calc(var(--asgardeo-spacing-unit) * 1.25);
2856
+ padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 1.75);
2857
+ }
2858
+
2859
+ .asgardeo-user-dropdown__menu-header-avatar {
2860
+ display: flex;
2861
+ align-items: center;
2862
+ justify-content: center;
2863
+ width: 36px;
2864
+ height: 36px;
2865
+ border-radius: 50%;
2866
+ color: #ffffff;
2867
+ flex-shrink: 0;
2868
+ font-size: var(--asgardeo-typography-fontSize-md);
2869
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
2870
+ line-height: 1;
2871
+ user-select: none;
2872
+ }
2873
+
2874
+ .asgardeo-user-dropdown__menu-header-info {
2875
+ display: flex;
2876
+ flex-direction: column;
2877
+ gap: 2px;
2878
+ min-width: 0;
2879
+ }
2880
+
2881
+ .asgardeo-user-dropdown__menu-header-name {
2882
+ font-size: var(--asgardeo-typography-fontSize-sm);
2883
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
2884
+ color: var(--asgardeo-color-text-primary);
2885
+ white-space: nowrap;
2886
+ overflow: hidden;
2887
+ text-overflow: ellipsis;
2888
+ line-height: var(--asgardeo-typography-lineHeight-tight);
2889
+ }
2890
+
2891
+ .asgardeo-user-dropdown__menu-header-subtitle {
2892
+ font-size: var(--asgardeo-typography-fontSize-xs);
2893
+ color: var(--asgardeo-color-text-secondary);
2894
+ white-space: nowrap;
2895
+ overflow: hidden;
2896
+ text-overflow: ellipsis;
2897
+ line-height: var(--asgardeo-typography-lineHeight-normal);
2898
+ }
2899
+
2900
+ /* \u2500\u2500 Menu divider \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2901
+
2902
+ .asgardeo-user-dropdown__menu-divider {
2903
+ height: 1px;
2904
+ background-color: var(--asgardeo-color-border);
2905
+ margin: calc(var(--asgardeo-spacing-unit) * 0.5) 0;
2906
+ flex-shrink: 0;
2740
2907
  }
2741
2908
 
2742
- /* Menu items ------------------------------------------------ */
2909
+ /* \u2500\u2500 Menu items \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2743
2910
 
2744
2911
  .asgardeo-user-dropdown__item {
2745
2912
  display: flex;
2746
2913
  align-items: center;
2747
- gap: calc(var(--asgardeo-spacing-unit) * 0.75);
2914
+ gap: calc(var(--asgardeo-spacing-unit) * 1);
2748
2915
  width: 100%;
2749
- padding: var(--asgardeo-dropdown-itemPaddingY) var(--asgardeo-dropdown-itemPaddingX);
2916
+ padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 1.75);
2750
2917
  background: none;
2751
2918
  border: none;
2752
2919
  cursor: pointer;
@@ -2767,36 +2934,61 @@ var USER_DROPDOWN_CSS = `
2767
2934
  background-color: var(--asgardeo-color-action-focus);
2768
2935
  }
2769
2936
 
2770
- /* Modal overlay ------------------------------------------------ */
2937
+ /* Danger variant (sign-out) */
2938
+
2939
+ .asgardeo-user-dropdown__item--danger {
2940
+ color: var(--asgardeo-color-error-main);
2941
+ }
2942
+
2943
+ .asgardeo-user-dropdown__item--danger:hover {
2944
+ background-color: var(--asgardeo-color-error-light);
2945
+ }
2946
+
2947
+ /* \u2500\u2500 Modal overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2771
2948
 
2772
2949
  .asgardeo-user-dropdown__modal-overlay {
2773
2950
  position: fixed;
2774
- top: 0;
2775
- left: 0;
2776
- right: 0;
2777
- bottom: 0;
2778
- background-color: rgba(0, 0, 0, 0.4);
2951
+ inset: 0;
2952
+ background-color: rgba(0, 0, 0, 0.45);
2779
2953
  display: flex;
2780
2954
  align-items: center;
2781
2955
  justify-content: center;
2782
2956
  z-index: 9999;
2783
- backdrop-filter: blur(2px);
2957
+ backdrop-filter: blur(3px);
2958
+ animation: asgardeo-overlay-enter var(--asgardeo-transition-fast) ease;
2959
+ }
2960
+
2961
+ @keyframes asgardeo-overlay-enter {
2962
+ from { opacity: 0; }
2963
+ to { opacity: 1; }
2784
2964
  }
2785
2965
 
2786
- /* Modal content ------------------------------------------------ */
2966
+ /* \u2500\u2500 Modal content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2787
2967
 
2788
2968
  .asgardeo-user-dropdown__modal-content {
2789
2969
  background: var(--asgardeo-color-background-surface);
2790
- border-radius: var(--asgardeo-border-radius-medium);
2970
+ border-radius: var(--asgardeo-border-radius-large);
2791
2971
  box-shadow: var(--asgardeo-shadow-large);
2792
- max-width: 460px;
2793
- width: 90%;
2972
+ max-width: 480px;
2973
+ width: 92%;
2794
2974
  max-height: 90vh;
2795
2975
  overflow-y: auto;
2796
2976
  position: relative;
2977
+ animation: asgardeo-modal-enter var(--asgardeo-transition-normal) ease;
2978
+ }
2979
+
2980
+ @keyframes asgardeo-modal-enter {
2981
+ from {
2982
+ opacity: 0;
2983
+ transform: translateY(12px) scale(0.97);
2984
+ }
2985
+ to {
2986
+ opacity: 1;
2987
+ transform: translateY(0) scale(1);
2988
+ }
2797
2989
  }
2798
2990
 
2799
- /* Modal close button ------------------------------------------ */
2991
+ /* \u2500\u2500 Modal close button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2800
2992
 
2801
2993
  .asgardeo-user-dropdown__modal-close {
2802
2994
  position: absolute;
@@ -2809,7 +3001,7 @@ var USER_DROPDOWN_CSS = `
2809
3001
  display: flex;
2810
3002
  align-items: center;
2811
3003
  justify-content: center;
2812
- padding: calc(var(--asgardeo-spacing-unit) * 0.5);
3004
+ padding: calc(var(--asgardeo-spacing-unit) * 0.625);
2813
3005
  border-radius: var(--asgardeo-border-radius-small);
2814
3006
  z-index: 10001;
2815
3007
  transition:
@@ -2833,74 +3025,154 @@ var UserDropdown_css_default = USER_DROPDOWN_CSS;
2833
3025
  // src/components/presentation/user-profile/UserProfile.css.ts
2834
3026
  var USER_PROFILE_CSS = `
2835
3027
  /* ============================================================
2836
- UserProfile
3028
+ UserProfile (modern redesign)
2837
3029
  ============================================================ */
2838
3030
 
2839
3031
  .asgardeo-user-profile {
2840
3032
  display: flex;
2841
3033
  flex-direction: column;
2842
3034
  min-width: 320px;
2843
- padding: 0;
2844
3035
  overflow: hidden;
3036
+ font-family: var(--asgardeo-typography-fontFamily);
2845
3037
  }
2846
3038
 
2847
- /* Header ---------------------------------------------------- */
3039
+ /* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2848
3040
 
2849
3041
  .asgardeo-user-profile__header {
2850
- padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5);
2851
- padding-bottom: calc(var(--asgardeo-spacing-unit) * 1.5);
3042
+ display: flex;
3043
+ align-items: center;
3044
+ justify-content: space-between;
3045
+ padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5)
3046
+ calc(var(--asgardeo-spacing-unit) * 1.75);
2852
3047
  }
2853
3048
 
2854
3049
  .asgardeo-user-profile__title {
2855
3050
  margin: 0;
3051
+ font-size: var(--asgardeo-typography-fontSize-md);
3052
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
3053
+ color: var(--asgardeo-color-text-primary);
3054
+ letter-spacing: var(--asgardeo-typography-letterSpacing-tight);
2856
3055
  }
2857
3056
 
2858
3057
  .asgardeo-user-profile__header-divider {
2859
3058
  margin: 0;
2860
3059
  }
2861
3060
 
2862
- /* Avatar ---------------------------------------------------- */
3061
+ /* \u2500\u2500 Hero (avatar + name + subtitle) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2863
3062
 
2864
- .asgardeo-user-profile__avatar-section {
3063
+ .asgardeo-user-profile__hero {
2865
3064
  display: flex;
2866
- justify-content: center;
2867
- padding: calc(var(--asgardeo-spacing-unit) * 2) 0 calc(var(--asgardeo-spacing-unit) * 1.25);
3065
+ flex-direction: column;
3066
+ align-items: center;
3067
+ padding: calc(var(--asgardeo-spacing-unit) * 3) calc(var(--asgardeo-spacing-unit) * 2.5)
3068
+ calc(var(--asgardeo-spacing-unit) * 2);
3069
+ gap: calc(var(--asgardeo-spacing-unit) * 1.25);
3070
+ background: linear-gradient(
3071
+ 180deg,
3072
+ var(--asgardeo-color-primary-light) 0%,
3073
+ var(--asgardeo-color-background-surface) 100%
3074
+ );
3075
+ border-bottom: 1px solid var(--asgardeo-color-border);
3076
+ }
3077
+
3078
+ .asgardeo-user-profile__avatar-wrapper {
3079
+ position: relative;
3080
+ border-radius: 50%;
3081
+ padding: 3px;
3082
+ background: linear-gradient(
3083
+ 135deg,
3084
+ var(--asgardeo-color-primary-main),
3085
+ var(--asgardeo-color-primary-dark)
3086
+ );
3087
+ box-shadow: 0 4px 14px rgba(75, 110, 245, 0.28);
2868
3088
  }
2869
3089
 
2870
3090
  .asgardeo-user-profile__avatar {
2871
- width: var(--asgardeo-avatar-size);
2872
- height: var(--asgardeo-avatar-size);
3091
+ width: var(--asgardeo-avatar-size, 72px);
3092
+ height: var(--asgardeo-avatar-size, 72px);
2873
3093
  border-radius: 50%;
2874
3094
  display: flex;
2875
3095
  align-items: center;
2876
3096
  justify-content: center;
2877
3097
  flex-shrink: 0;
3098
+ border: 2px solid var(--asgardeo-color-background-surface);
3099
+ }
3100
+
3101
+ /* Avatar size variants */
3102
+
3103
+ .asgardeo-user-profile__avatar--sm {
3104
+ width: 48px;
3105
+ height: 48px;
3106
+ }
3107
+
3108
+ .asgardeo-user-profile__avatar--sm .asgardeo-user-profile__avatar-initials {
3109
+ font-size: 1rem;
3110
+ }
3111
+
3112
+ .asgardeo-user-profile__avatar--md {
3113
+ width: 64px;
3114
+ height: 64px;
3115
+ }
3116
+
3117
+ .asgardeo-user-profile__avatar--md .asgardeo-user-profile__avatar-initials {
3118
+ font-size: 1.25rem;
3119
+ }
3120
+
3121
+ .asgardeo-user-profile__avatar--lg {
3122
+ width: 80px;
3123
+ height: 80px;
3124
+ }
3125
+
3126
+ .asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {
3127
+ font-size: 1.625rem;
2878
3128
  }
2879
3129
 
2880
3130
  .asgardeo-user-profile__avatar-initials {
2881
3131
  color: #ffffff;
2882
- font-size: var(--asgardeo-avatar-fontSize);
2883
- font-weight: 600;
3132
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
2884
3133
  line-height: 1;
2885
3134
  letter-spacing: 0.02em;
2886
3135
  pointer-events: none;
2887
3136
  user-select: none;
2888
3137
  }
2889
3138
 
2890
- /* Alerts & loading ------------------------------------------ */
3139
+ .asgardeo-user-profile__hero-info {
3140
+ display: flex;
3141
+ flex-direction: column;
3142
+ align-items: center;
3143
+ gap: calc(var(--asgardeo-spacing-unit) * 0.375);
3144
+ text-align: center;
3145
+ }
3146
+
3147
+ .asgardeo-user-profile__hero-name {
3148
+ font-size: var(--asgardeo-typography-fontSize-lg);
3149
+ font-weight: var(--asgardeo-typography-fontWeight-semibold);
3150
+ color: var(--asgardeo-color-text-primary);
3151
+ line-height: var(--asgardeo-typography-lineHeight-tight);
3152
+ letter-spacing: var(--asgardeo-typography-letterSpacing-tight);
3153
+ }
3154
+
3155
+ .asgardeo-user-profile__hero-subtitle {
3156
+ font-size: var(--asgardeo-typography-fontSize-sm);
3157
+ color: var(--asgardeo-color-text-secondary);
3158
+ line-height: var(--asgardeo-typography-lineHeight-normal);
3159
+ }
3160
+
3161
+ /* \u2500\u2500 Alerts & loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2891
3162
 
2892
3163
  .asgardeo-user-profile__error {
2893
- margin: 0 calc(var(--asgardeo-spacing-unit) * 2.5) calc(var(--asgardeo-spacing-unit) * 1.25);
3164
+ margin: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5)
3165
+ calc(var(--asgardeo-spacing-unit) * 0.5);
2894
3166
  }
2895
3167
 
2896
3168
  .asgardeo-user-profile__loading {
2897
3169
  display: flex;
2898
3170
  align-items: center;
2899
3171
  justify-content: center;
2900
- padding: calc(var(--asgardeo-spacing-unit) * 3) 0;
3172
+ padding: calc(var(--asgardeo-spacing-unit) * 3.5) 0;
2901
3173
  }
2902
3174
 
2903
- /* Fields ---------------------------------------------------- */
3175
+ /* \u2500\u2500 Fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2904
3176
 
2905
3177
  .asgardeo-user-profile__fields {
2906
3178
  display: flex;
@@ -2909,9 +3181,9 @@ var USER_PROFILE_CSS = `
2909
3181
 
2910
3182
  .asgardeo-user-profile__field {
2911
3183
  display: grid;
2912
- grid-template-columns: 36% 64%;
2913
- align-items: center;
2914
- padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2.5);
3184
+ grid-template-columns: 38% 62%;
3185
+ align-items: start;
3186
+ padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);
2915
3187
  gap: calc(var(--asgardeo-spacing-unit) * 0.75);
2916
3188
  box-sizing: border-box;
2917
3189
  transition: background-color var(--asgardeo-transition-fast);
@@ -2925,17 +3197,11 @@ var USER_PROFILE_CSS = `
2925
3197
  border-top: 1px solid var(--asgardeo-color-border);
2926
3198
  }
2927
3199
 
2928
- .asgardeo-user-profile__field-label-col {
2929
- /* label column */
2930
- }
2931
-
2932
3200
  .asgardeo-user-profile__field-label {
2933
3201
  color: var(--asgardeo-color-text-secondary);
2934
3202
  font-size: var(--asgardeo-typography-fontSize-sm);
2935
- }
2936
-
2937
- .asgardeo-user-profile__field-value-col {
2938
- /* value column */
3203
+ font-weight: var(--asgardeo-typography-fontWeight-medium);
3204
+ padding-top: 2px;
2939
3205
  }
2940
3206
 
2941
3207
  .asgardeo-user-profile__field-display {
@@ -2955,16 +3221,22 @@ var USER_PROFILE_CSS = `
2955
3221
 
2956
3222
  .asgardeo-user-profile__field-placeholder {
2957
3223
  color: var(--asgardeo-color-primary-main);
2958
- font-style: italic;
2959
3224
  font-size: var(--asgardeo-typography-fontSize-sm);
3225
+ font-style: italic;
2960
3226
  flex: 1;
2961
3227
  cursor: pointer;
2962
3228
  text-decoration: underline;
2963
3229
  text-decoration-style: dotted;
2964
3230
  text-underline-offset: 2px;
3231
+ opacity: 0.8;
3232
+ transition: opacity var(--asgardeo-transition-fast);
2965
3233
  }
2966
3234
 
2967
- /* Edit button (pencil icon) --------------------------------- */
3235
+ .asgardeo-user-profile__field-placeholder:hover {
3236
+ opacity: 1;
3237
+ }
3238
+
3239
+ /* \u2500\u2500 Edit button (pencil) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
2968
3240
 
2969
3241
  .asgardeo-user-profile__field-edit-btn {
2970
3242
  display: inline-flex;
@@ -3000,12 +3272,13 @@ var USER_PROFILE_CSS = `
3000
3272
  box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);
3001
3273
  }
3002
3274
 
3003
- /* Edit mode ------------------------------------------------- */
3275
+ /* \u2500\u2500 Edit mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
3004
3276
 
3005
3277
  .asgardeo-user-profile__field-edit {
3006
3278
  display: flex;
3007
3279
  flex-direction: column;
3008
3280
  gap: calc(var(--asgardeo-spacing-unit) * 0.75);
3281
+ padding: calc(var(--asgardeo-spacing-unit) * 0.25) 0;
3009
3282
  }
3010
3283
 
3011
3284
  .asgardeo-user-profile__field-edit-actions {
@@ -3014,12 +3287,35 @@ var USER_PROFILE_CSS = `
3014
3287
  gap: calc(var(--asgardeo-spacing-unit) * 0.75);
3015
3288
  }
3016
3289
 
3017
- /* Footer slot ----------------------------------------------- */
3290
+ /* \u2500\u2500 Footer slot \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
3018
3291
 
3019
3292
  .asgardeo-user-profile__footer {
3020
3293
  padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);
3021
3294
  border-top: 1px solid var(--asgardeo-color-border);
3022
3295
  }
3296
+
3297
+ /* \u2500\u2500 Compact modifier \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
3298
+
3299
+ .asgardeo-user-profile--compact .asgardeo-user-profile__hero {
3300
+ padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);
3301
+ }
3302
+
3303
+ .asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg {
3304
+ width: 56px;
3305
+ height: 56px;
3306
+ }
3307
+
3308
+ .asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {
3309
+ font-size: 1.125rem;
3310
+ }
3311
+
3312
+ .asgardeo-user-profile--compact .asgardeo-user-profile__field {
3313
+ padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 2);
3314
+ }
3315
+
3316
+ .asgardeo-user-profile--compact .asgardeo-user-profile__hero-name {
3317
+ font-size: var(--asgardeo-typography-fontSize-md);
3318
+ }
3023
3319
  `;
3024
3320
  var UserProfile_css_default = USER_PROFILE_CSS;
3025
3321
 
@@ -5582,104 +5878,14 @@ var Callback = defineComponent28({
5582
5878
  });
5583
5879
  var Callback_default = Callback;
5584
5880
 
5585
- // src/components/control/SignedIn.ts
5586
- import { defineComponent as defineComponent29, h as h29, Fragment } from "vue";
5587
- var SignedIn = defineComponent29({
5588
- name: "SignedIn",
5589
- setup(_props, { slots }) {
5590
- const { isSignedIn } = useAsgardeo_default();
5591
- return () => {
5592
- if (!isSignedIn.value) {
5593
- const fallbackContent = slots["fallback"]?.();
5594
- return fallbackContent ? h29(Fragment, {}, fallbackContent) : null;
5595
- }
5596
- const defaultContent = slots["default"]?.();
5597
- return defaultContent ? h29(Fragment, {}, defaultContent) : null;
5598
- };
5599
- }
5600
- });
5601
- var SignedIn_default = SignedIn;
5881
+ // src/components/auth/sign-in/SignIn.ts
5882
+ import { Platform as Platform3 } from "@asgardeo/browser";
5883
+ import { defineComponent as defineComponent38, h as h40 } from "vue";
5602
5884
 
5603
- // src/components/control/SignedOut.ts
5604
- import { defineComponent as defineComponent30, h as h30, Fragment as Fragment2 } from "vue";
5605
- var SignedOut = defineComponent30({
5606
- name: "SignedOut",
5607
- setup(_props, { slots }) {
5608
- const { isSignedIn } = useAsgardeo_default();
5609
- return () => {
5610
- if (isSignedIn.value) {
5611
- const fallbackContent = slots["fallback"]?.();
5612
- return fallbackContent ? h30(Fragment2, {}, fallbackContent) : null;
5613
- }
5614
- const defaultContent = slots["default"]?.();
5615
- return defaultContent ? h30(Fragment2, {}, defaultContent) : null;
5616
- };
5617
- }
5618
- });
5619
- var SignedOut_default = SignedOut;
5620
-
5621
- // src/components/control/Loading.ts
5622
- import { defineComponent as defineComponent31, h as h31, Fragment as Fragment3 } from "vue";
5623
- var Loading = defineComponent31({
5624
- name: "Loading",
5625
- setup(_props, { slots }) {
5626
- const { isLoading } = useAsgardeo_default();
5627
- return () => {
5628
- if (!isLoading.value) {
5629
- const fallbackContent = slots["fallback"]?.();
5630
- return fallbackContent ? h31(Fragment3, {}, fallbackContent) : null;
5631
- }
5632
- const defaultContent = slots["default"]?.();
5633
- return defaultContent ? h31(Fragment3, {}, defaultContent) : null;
5634
- };
5635
- }
5636
- });
5637
- var Loading_default = Loading;
5885
+ // src/components/auth/sign-in/v1/SignIn.ts
5886
+ import { defineComponent as defineComponent35, h as h36 } from "vue";
5638
5887
 
5639
- // src/components/control/user/User.ts
5640
- import { defineComponent as defineComponent32, h as h32, Fragment as Fragment4 } from "vue";
5641
- var User5 = defineComponent32({
5642
- name: "User",
5643
- setup(_props, { slots }) {
5644
- const { user } = useAsgardeo_default();
5645
- return () => {
5646
- if (!user.value) {
5647
- const fallbackContent = slots["fallback"]?.();
5648
- return fallbackContent ? h32(Fragment4, {}, fallbackContent) : null;
5649
- }
5650
- const defaultContent = slots["default"]?.({ user: user.value });
5651
- return defaultContent ? h32(Fragment4, {}, defaultContent) : null;
5652
- };
5653
- }
5654
- });
5655
- var User_default = User5;
5656
-
5657
- // src/components/control/organization/Organization.ts
5658
- import { defineComponent as defineComponent33, h as h33, Fragment as Fragment5 } from "vue";
5659
- var Organization5 = defineComponent33({
5660
- name: "Organization",
5661
- setup(_props, { slots }) {
5662
- const { currentOrganization } = useOrganization_default();
5663
- return () => {
5664
- if (!currentOrganization?.value) {
5665
- const fallbackContent = slots["fallback"]?.();
5666
- return fallbackContent ? h33(Fragment5, {}, fallbackContent) : null;
5667
- }
5668
- const defaultContent = slots["default"]?.({ organization: currentOrganization.value });
5669
- return defaultContent ? h33(Fragment5, {}, defaultContent) : null;
5670
- };
5671
- }
5672
- });
5673
- var Organization_default = Organization5;
5674
-
5675
- // src/components/presentation/sign-in/SignIn.ts
5676
- import { Platform as Platform3 } from "@asgardeo/browser";
5677
- import { defineComponent as defineComponent43, h as h45 } from "vue";
5678
-
5679
- // src/components/presentation/sign-in/v1/SignIn.ts
5680
- import { defineComponent as defineComponent40, h as h41 } from "vue";
5681
-
5682
- // src/components/presentation/sign-in/v1/BaseSignIn.ts
5888
+ // src/components/auth/sign-in/v1/BaseSignIn.ts
5683
5889
  import {
5684
5890
  EmbeddedSignInFlowStepType,
5685
5891
  EmbeddedSignInFlowStatus,
@@ -5690,24 +5896,24 @@ import {
5690
5896
  handleWebAuthnAuthentication
5691
5897
  } from "@asgardeo/browser";
5692
5898
  import {
5693
- defineComponent as defineComponent39,
5694
- h as h40,
5899
+ defineComponent as defineComponent34,
5900
+ h as h35,
5695
5901
  ref as ref14,
5696
5902
  watch as watch7
5697
5903
  } from "vue";
5698
5904
 
5699
- // src/components/presentation/sign-in/v1/options/SignInOptionFactory.ts
5905
+ // src/components/auth/sign-in/v1/options/SignInOptionFactory.ts
5700
5906
  import {
5701
5907
  ApplicationNativeAuthenticationConstants,
5702
5908
  EmbeddedSignInFlowAuthenticatorKnownIdPType,
5703
5909
  EmbeddedSignInFlowAuthenticatorParamType,
5704
5910
  FieldType as FieldType2
5705
5911
  } from "@asgardeo/browser";
5706
- import { h as h39 } from "vue";
5912
+ import { h as h34 } from "vue";
5707
5913
 
5708
5914
  // src/components/adapters/FacebookButton.ts
5709
- import { defineComponent as defineComponent34, h as h34 } from "vue";
5710
- var FacebookButton = defineComponent34({
5915
+ import { defineComponent as defineComponent29, h as h29 } from "vue";
5916
+ var FacebookButton = defineComponent29({
5711
5917
  emits: ["click"],
5712
5918
  name: "FacebookButton",
5713
5919
  props: {
@@ -5715,17 +5921,17 @@ var FacebookButton = defineComponent34({
5715
5921
  },
5716
5922
  setup(props, { slots, emit, attrs }) {
5717
5923
  const { t } = useI18n_default();
5718
- const facebookIcon = () => h34("svg", { height: "18", viewBox: "0 0 512 512", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5719
- h34("path", {
5924
+ const facebookIcon = () => h29("svg", { height: "18", viewBox: "0 0 512 512", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5925
+ h29("path", {
5720
5926
  d: "M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64C512,28.704,483.296,0,448,0z",
5721
5927
  fill: "#1976D2"
5722
5928
  }),
5723
- h34("path", {
5929
+ h29("path", {
5724
5930
  d: "M432,256h-80v-64c0-17.664,14.336-16,32-16h32V96h-64l0,0c-53.024,0-96,42.976-96,96v64h-64v80h64v176h96V336h48L432,256z",
5725
5931
  fill: "#FAFAFA"
5726
5932
  })
5727
5933
  ]);
5728
- return () => h34(
5934
+ return () => h29(
5729
5935
  Button_default,
5730
5936
  {
5731
5937
  ...attrs,
@@ -5744,8 +5950,8 @@ var FacebookButton = defineComponent34({
5744
5950
  var FacebookButton_default = FacebookButton;
5745
5951
 
5746
5952
  // src/components/adapters/GitHubButton.ts
5747
- import { defineComponent as defineComponent35, h as h35 } from "vue";
5748
- var GitHubButton = defineComponent35({
5953
+ import { defineComponent as defineComponent30, h as h30 } from "vue";
5954
+ var GitHubButton = defineComponent30({
5749
5955
  emits: ["click"],
5750
5956
  name: "GitHubButton",
5751
5957
  props: {
@@ -5753,15 +5959,15 @@ var GitHubButton = defineComponent35({
5753
5959
  },
5754
5960
  setup(props, { slots, emit, attrs }) {
5755
5961
  const { t } = useI18n_default();
5756
- const gitHubIcon = () => h35("svg", { height: "18", viewBox: "0 0 67.91 66.233", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5757
- h35("g", { transform: "translate(-386.96 658.072)" }, [
5758
- h35("path", {
5962
+ const gitHubIcon = () => h30("svg", { height: "18", viewBox: "0 0 67.91 66.233", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5963
+ h30("g", { transform: "translate(-386.96 658.072)" }, [
5964
+ h30("path", {
5759
5965
  d: "M420.915-658.072a33.956,33.956,0,0,0-33.955,33.955,33.963,33.963,0,0,0,23.221,32.22c1.7.314,2.32-.737,2.32-1.633,0-.81-.031-3.484-.046-6.322-9.446,2.054-11.44-4.006-11.44-4.006-1.545-3.925-3.77-4.968-3.77-4.968-3.081-2.107.232-2.064.232-2.064,3.41.239,5.205,3.5,5.205,3.5,3.028,5.19,7.943,3.69,9.881,2.822a7.23,7.23,0,0,1,2.156-4.54c-7.542-.859-15.47-3.77-15.47-16.781a13.141,13.141,0,0,1,3.5-9.114,12.2,12.2,0,0,1,.329-8.986s2.851-.913,9.34,3.48a32.545,32.545,0,0,1,8.5-1.143,32.629,32.629,0,0,1,8.506,1.143c6.481-4.393,9.328-3.48,9.328-3.48a12.185,12.185,0,0,1,.333,8.986,13.115,13.115,0,0,1,3.495,9.114c0,13.042-7.943,15.913-15.5,16.754,1.218,1.054,2.3,3.12,2.3,6.288,0,4.543-.039,8.2-.039,9.318,0,.9.611,1.962,2.332,1.629a33.959,33.959,0,0,0,23.2-32.215,33.955,33.955,0,0,0-33.955-33.955",
5760
5966
  fill: "currentColor"
5761
5967
  })
5762
5968
  ])
5763
5969
  ]);
5764
- return () => h35(
5970
+ return () => h30(
5765
5971
  Button_default,
5766
5972
  {
5767
5973
  ...attrs,
@@ -5780,8 +5986,8 @@ var GitHubButton = defineComponent35({
5780
5986
  var GitHubButton_default = GitHubButton;
5781
5987
 
5782
5988
  // src/components/adapters/GoogleButton.ts
5783
- import { defineComponent as defineComponent36, h as h36 } from "vue";
5784
- var GoogleButton = defineComponent36({
5989
+ import { defineComponent as defineComponent31, h as h31 } from "vue";
5990
+ var GoogleButton = defineComponent31({
5785
5991
  emits: ["click"],
5786
5992
  name: "GoogleButton",
5787
5993
  props: {
@@ -5789,31 +5995,31 @@ var GoogleButton = defineComponent36({
5789
5995
  },
5790
5996
  setup(props, { slots, emit, attrs }) {
5791
5997
  const { t } = useI18n_default();
5792
- const googleIcon = () => h36("svg", { height: "18", viewBox: "0 0 67.91 67.901", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5793
- h36("g", { transform: "translate(-0.001 -0.001)" }, [
5794
- h36("path", {
5998
+ const googleIcon = () => h31("svg", { height: "18", viewBox: "0 0 67.91 67.901", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
5999
+ h31("g", { transform: "translate(-0.001 -0.001)" }, [
6000
+ h31("path", {
5795
6001
  d: "M15.049,160.965l-2.364,8.824-8.639.183a34.011,34.011,0,0,1-.25-31.7h0l7.691,1.41,3.369,7.645a20.262,20.262,0,0,0,.19,13.642Z",
5796
6002
  fill: "#fbbb00",
5797
6003
  transform: "translate(0 -119.93)"
5798
6004
  }),
5799
- h36("path", {
6005
+ h31("path", {
5800
6006
  d: "M294.24,208.176A33.939,33.939,0,0,1,282.137,241h0l-9.687-.494-1.371-8.559a20.235,20.235,0,0,0,8.706-10.333H261.628V208.176Z",
5801
6007
  fill: "#518ef8",
5802
6008
  transform: "translate(-226.93 -180.567)"
5803
6009
  }),
5804
- h36("path", {
6010
+ h31("path", {
5805
6011
  d: "M81.668,328.8h0a33.962,33.962,0,0,1-51.161-10.387l11-9.006a20.192,20.192,0,0,0,29.1,10.338Z",
5806
6012
  fill: "#28b446",
5807
6013
  transform: "translate(-26.463 -268.374)"
5808
6014
  }),
5809
- h36("path", {
6015
+ h31("path", {
5810
6016
  d: "M80.451,7.816l-11,9A20.19,20.19,0,0,0,39.686,27.393l-11.06-9.055h0A33.959,33.959,0,0,1,80.451,7.816Z",
5811
6017
  fill: "#f14336",
5812
6018
  transform: "translate(-24.828)"
5813
6019
  })
5814
6020
  ])
5815
6021
  ]);
5816
- return () => h36(
6022
+ return () => h31(
5817
6023
  Button_default,
5818
6024
  {
5819
6025
  ...attrs,
@@ -5832,8 +6038,8 @@ var GoogleButton = defineComponent36({
5832
6038
  var GoogleButton_default = GoogleButton;
5833
6039
 
5834
6040
  // src/components/adapters/MicrosoftButton.ts
5835
- import { defineComponent as defineComponent37, h as h37 } from "vue";
5836
- var MicrosoftButton = defineComponent37({
6041
+ import { defineComponent as defineComponent32, h as h32 } from "vue";
6042
+ var MicrosoftButton = defineComponent32({
5837
6043
  emits: ["click"],
5838
6044
  name: "MicrosoftButton",
5839
6045
  props: {
@@ -5841,14 +6047,14 @@ var MicrosoftButton = defineComponent37({
5841
6047
  },
5842
6048
  setup(props, { slots, emit, attrs }) {
5843
6049
  const { t } = useI18n_default();
5844
- const microsoftIcon = () => h37("svg", { height: "14", viewBox: "0 0 23 23", width: "14", xmlns: "http://www.w3.org/2000/svg" }, [
5845
- h37("path", { d: "M0 0h23v23H0z", fill: "#f3f3f3" }),
5846
- h37("path", { d: "M1 1h10v10H1z", fill: "#f35325" }),
5847
- h37("path", { d: "M12 1h10v10H12z", fill: "#81bc06" }),
5848
- h37("path", { d: "M1 12h10v10H1z", fill: "#05a6f0" }),
5849
- h37("path", { d: "M12 12h10v10H12z", fill: "#ffba08" })
6050
+ const microsoftIcon = () => h32("svg", { height: "14", viewBox: "0 0 23 23", width: "14", xmlns: "http://www.w3.org/2000/svg" }, [
6051
+ h32("path", { d: "M0 0h23v23H0z", fill: "#f3f3f3" }),
6052
+ h32("path", { d: "M1 1h10v10H1z", fill: "#f35325" }),
6053
+ h32("path", { d: "M12 1h10v10H12z", fill: "#81bc06" }),
6054
+ h32("path", { d: "M1 12h10v10H1z", fill: "#05a6f0" }),
6055
+ h32("path", { d: "M12 12h10v10H12z", fill: "#ffba08" })
5850
6056
  ]);
5851
- return () => h37(
6057
+ return () => h32(
5852
6058
  Button_default,
5853
6059
  {
5854
6060
  ...attrs,
@@ -5868,7 +6074,7 @@ var MicrosoftButton_default = MicrosoftButton;
5868
6074
 
5869
6075
  // src/components/factories/FieldFactory.ts
5870
6076
  import { FieldType } from "@asgardeo/browser";
5871
- import { defineComponent as defineComponent38, h as h38 } from "vue";
6077
+ import { defineComponent as defineComponent33, h as h33 } from "vue";
5872
6078
  var validateFieldValue = (value, type, required = false, touched = false) => {
5873
6079
  if (required && touched && (!value || value.trim() === "")) {
5874
6080
  return "This field is required";
@@ -5920,44 +6126,44 @@ var createField = (config) => {
5920
6126
  };
5921
6127
  switch (type) {
5922
6128
  case FieldType.Password:
5923
- return h38(PasswordField_default, {
6129
+ return h33(PasswordField_default, {
5924
6130
  ...commonProps,
5925
6131
  "onUpdate:modelValue": onChange
5926
6132
  });
5927
6133
  case FieldType.Text:
5928
- return h38(TextField_default, {
6134
+ return h33(TextField_default, {
5929
6135
  ...commonProps,
5930
6136
  autocomplete: "off",
5931
6137
  "onUpdate:modelValue": onChange,
5932
6138
  type: "text"
5933
6139
  });
5934
6140
  case FieldType.Email:
5935
- return h38(TextField_default, {
6141
+ return h33(TextField_default, {
5936
6142
  ...commonProps,
5937
6143
  autocomplete: "email",
5938
6144
  "onUpdate:modelValue": onChange,
5939
6145
  type: "email"
5940
6146
  });
5941
6147
  case FieldType.Date:
5942
- return h38(DatePicker_default, {
6148
+ return h33(DatePicker_default, {
5943
6149
  ...commonProps,
5944
6150
  "onUpdate:modelValue": onChange
5945
6151
  });
5946
6152
  case FieldType.Checkbox: {
5947
6153
  const isChecked = value === "true" || value === true;
5948
- return h38(Checkbox_default, {
6154
+ return h33(Checkbox_default, {
5949
6155
  ...commonProps,
5950
6156
  modelValue: isChecked,
5951
6157
  "onUpdate:modelValue": (checked) => onChange(checked.toString())
5952
6158
  });
5953
6159
  }
5954
6160
  case FieldType.Otp:
5955
- return h38(OtpField_default, {
6161
+ return h33(OtpField_default, {
5956
6162
  ...commonProps,
5957
6163
  "onUpdate:modelValue": onChange
5958
6164
  });
5959
6165
  case FieldType.Number:
5960
- return h38(TextField_default, {
6166
+ return h33(TextField_default, {
5961
6167
  ...commonProps,
5962
6168
  helperText: "Enter a numeric value",
5963
6169
  "onUpdate:modelValue": onChange,
@@ -5966,14 +6172,14 @@ var createField = (config) => {
5966
6172
  case FieldType.Select: {
5967
6173
  const fieldOptions = options.length > 0 ? options : [];
5968
6174
  if (fieldOptions.length > 0) {
5969
- return h38(Select_default, {
6175
+ return h33(Select_default, {
5970
6176
  ...commonProps,
5971
6177
  helperText: "Select from available options",
5972
6178
  "onUpdate:modelValue": onChange,
5973
6179
  options: fieldOptions
5974
6180
  });
5975
6181
  }
5976
- return h38(TextField_default, {
6182
+ return h33(TextField_default, {
5977
6183
  ...commonProps,
5978
6184
  helperText: "Enter multiple values separated by commas (e.g., value1, value2, value3)",
5979
6185
  "onUpdate:modelValue": onChange,
@@ -5982,7 +6188,7 @@ var createField = (config) => {
5982
6188
  });
5983
6189
  }
5984
6190
  default:
5985
- return h38(TextField_default, {
6191
+ return h33(TextField_default, {
5986
6192
  ...commonProps,
5987
6193
  helperText: "Unknown field type, treating as text",
5988
6194
  "onUpdate:modelValue": onChange,
@@ -5990,7 +6196,7 @@ var createField = (config) => {
5990
6196
  });
5991
6197
  }
5992
6198
  };
5993
- var FieldFactory = defineComponent38({
6199
+ var FieldFactory = defineComponent33({
5994
6200
  emits: ["change", "blur"],
5995
6201
  name: "FieldFactory",
5996
6202
  props: {
@@ -6026,12 +6232,12 @@ var FieldFactory = defineComponent38({
6026
6232
  });
6027
6233
  var FieldFactory_default = FieldFactory;
6028
6234
 
6029
- // src/components/presentation/sign-in/v1/options/SignInOptionFactory.ts
6235
+ // src/components/auth/sign-in/v1/options/SignInOptionFactory.ts
6030
6236
  var renderFormFields = (props) => {
6031
6237
  const { authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName, buttonClassName, t } = props;
6032
6238
  const formFields = authenticator.metadata?.params?.sort((a, b) => a.order - b.order)?.filter((param) => param.param !== "totp") || [];
6033
6239
  const fieldNodes = formFields.map(
6034
- (param) => h39(
6240
+ (param) => h34(
6035
6241
  "div",
6036
6242
  { key: param.param },
6037
6243
  createField({
@@ -6051,7 +6257,7 @@ var renderFormFields = (props) => {
6051
6257
  )
6052
6258
  );
6053
6259
  fieldNodes.push(
6054
- h39(
6260
+ h34(
6055
6261
  Button_default,
6056
6262
  {
6057
6263
  class: buttonClassName,
@@ -6081,10 +6287,10 @@ var renderMultiOptionButton = (props) => {
6081
6287
  [ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp]: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z"
6082
6288
  };
6083
6289
  const iconPath = iconPathMap[authenticator.authenticatorId] || "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z";
6084
- const icon2 = h39("svg", { height: "18", viewBox: "0 0 24 24", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
6085
- h39("path", { d: iconPath, fill: "currentColor" })
6290
+ const icon2 = h34("svg", { height: "18", viewBox: "0 0 24 24", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
6291
+ h34("path", { d: iconPath, fill: "currentColor" })
6086
6292
  ]);
6087
- return h39(
6293
+ return h34(
6088
6294
  Button_default,
6089
6295
  {
6090
6296
  class: buttonClassName,
@@ -6101,17 +6307,17 @@ var renderMultiOptionButton = (props) => {
6101
6307
  };
6102
6308
  var renderSocialButton = (props) => {
6103
6309
  const { authenticator, isLoading, onSubmit, buttonClassName, t } = props;
6104
- const socialIcon = h39(
6310
+ const socialIcon = h34(
6105
6311
  "svg",
6106
6312
  { height: "18", viewBox: "0 0 24 24", width: "18", xmlns: "http://www.w3.org/2000/svg" },
6107
6313
  [
6108
- h39("path", {
6314
+ h34("path", {
6109
6315
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
6110
6316
  fill: "currentColor"
6111
6317
  })
6112
6318
  ]
6113
6319
  );
6114
- return h39(
6320
+ return h34(
6115
6321
  Button_default,
6116
6322
  {
6117
6323
  class: buttonClassName,
@@ -6132,27 +6338,27 @@ var createSignInOption = (props) => {
6132
6338
  switch (authenticator.authenticatorId) {
6133
6339
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:
6134
6340
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:
6135
- return h39("div", {}, renderFormFields(props));
6341
+ return h34("div", {}, renderFormFields(props));
6136
6342
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:
6137
- return h39(GoogleButton_default, {
6343
+ return h34(GoogleButton_default, {
6138
6344
  class: buttonClassName,
6139
6345
  isLoading,
6140
6346
  onClick: () => onSubmit(authenticator)
6141
6347
  });
6142
6348
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:
6143
- return h39(GitHubButton_default, {
6349
+ return h34(GitHubButton_default, {
6144
6350
  class: buttonClassName,
6145
6351
  isLoading,
6146
6352
  onClick: () => onSubmit(authenticator)
6147
6353
  });
6148
6354
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:
6149
- return h39(MicrosoftButton_default, {
6355
+ return h34(MicrosoftButton_default, {
6150
6356
  class: buttonClassName,
6151
6357
  isLoading,
6152
6358
  onClick: () => onSubmit(authenticator)
6153
6359
  });
6154
6360
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:
6155
- return h39(FacebookButton_default, {
6361
+ return h34(FacebookButton_default, {
6156
6362
  class: buttonClassName,
6157
6363
  isLoading,
6158
6364
  onClick: () => onSubmit(authenticator)
@@ -6160,12 +6366,12 @@ var createSignInOption = (props) => {
6160
6366
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
6161
6367
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
6162
6368
  case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
6163
- return hasParams ? h39("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
6369
+ return hasParams ? h34("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
6164
6370
  default:
6165
6371
  if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
6166
6372
  return renderSocialButton(props);
6167
6373
  }
6168
- return hasParams ? h39("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
6374
+ return hasParams ? h34("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
6169
6375
  }
6170
6376
  };
6171
6377
  var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFields, isLoading, onInputChange, onSubmit, t, options) => createSignInOption({
@@ -6179,10 +6385,10 @@ var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFie
6179
6385
  ...options
6180
6386
  });
6181
6387
 
6182
- // src/components/presentation/sign-in/v1/BaseSignIn.ts
6388
+ // src/components/auth/sign-in/v1/BaseSignIn.ts
6183
6389
  var HIDDEN_AUTHENTICATORS = ["T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08"];
6184
6390
  var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && !!authenticator.metadata?.additionalData?.challengeData;
6185
- var BaseSignIn = defineComponent39({
6391
+ var BaseSignIn = defineComponent34({
6186
6392
  emits: ["error", "flowChange", "success"],
6187
6393
  name: "BaseSignInV1",
6188
6394
  props: {
@@ -6571,9 +6777,9 @@ var BaseSignIn = defineComponent39({
6571
6777
  return "info";
6572
6778
  };
6573
6779
  const renderMessages = () => messages.value.map(
6574
- (msg, i) => h40(Alert_default, { key: i, severity: renderAlertVariant(msg.type) }, { default: () => msg.message })
6780
+ (msg, i) => h35(Alert_default, { key: i, severity: renderAlertVariant(msg.type) }, { default: () => msg.message })
6575
6781
  );
6576
- const renderError = () => error.value ? h40(Alert_default, { severity: "error" }, { default: () => error.value }) : null;
6782
+ const renderError = () => error.value ? h35(Alert_default, { severity: "error" }, { default: () => error.value }) : null;
6577
6783
  return () => {
6578
6784
  const cardClass = [
6579
6785
  withVendorCSSClassPrefix17("signin"),
@@ -6582,16 +6788,16 @@ var BaseSignIn = defineComponent39({
6582
6788
  props.className
6583
6789
  ].filter(Boolean).join(" ");
6584
6790
  if (!isInitialized.value && isLoading()) {
6585
- return h40("div", {}, [
6586
- props.showLogo ? h40("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h40(Logo_default)]) : null,
6587
- h40(
6791
+ return h35("div", {}, [
6792
+ props.showLogo ? h35("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h35(Logo_default)]) : null,
6793
+ h35(
6588
6794
  Card_default,
6589
6795
  { class: cardClass, variant: props.variant },
6590
6796
  {
6591
6797
  default: () => [
6592
- h40("div", { class: withVendorCSSClassPrefix17("signin__loading") }, [
6593
- h40(Spinner_default, { size: "medium" }),
6594
- h40(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })
6798
+ h35("div", { class: withVendorCSSClassPrefix17("signin__loading") }, [
6799
+ h35(Spinner_default, { size: "medium" }),
6800
+ h35(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })
6595
6801
  ])
6596
6802
  ]
6597
6803
  }
@@ -6604,9 +6810,9 @@ var BaseSignIn = defineComponent39({
6604
6810
  (auth) => auth.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt || auth.idp === "LOCAL" && auth.metadata?.params && auth.metadata.params.length > 0
6605
6811
  );
6606
6812
  const optionAuths = available.filter((auth) => !userPromptAuths.includes(auth)).filter((auth) => !HIDDEN_AUTHENTICATORS.includes(auth.authenticatorId));
6607
- return h40("div", {}, [
6608
- props.showLogo ? h40("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h40(Logo_default)]) : null,
6609
- h40(
6813
+ return h35("div", {}, [
6814
+ props.showLogo ? h35("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h35(Logo_default)]) : null,
6815
+ h35(
6610
6816
  Card_default,
6611
6817
  { class: cardClass, variant: props.variant },
6612
6818
  {
@@ -6614,9 +6820,9 @@ var BaseSignIn = defineComponent39({
6614
6820
  const children = [];
6615
6821
  if (props.showTitle || props.showSubtitle) {
6616
6822
  children.push(
6617
- h40("div", { class: withVendorCSSClassPrefix17("signin__header") }, [
6618
- props.showTitle ? h40(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }) : null,
6619
- props.showSubtitle ? h40(
6823
+ h35("div", { class: withVendorCSSClassPrefix17("signin__header") }, [
6824
+ props.showTitle ? h35(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }) : null,
6825
+ props.showSubtitle ? h35(
6620
6826
  Typography_default,
6621
6827
  { variant: "body1" },
6622
6828
  { default: () => flowSubtitle.value || t("signin.subheading") }
@@ -6626,22 +6832,22 @@ var BaseSignIn = defineComponent39({
6626
6832
  }
6627
6833
  if (flowMessages.value?.length > 0) {
6628
6834
  children.push(
6629
- h40(
6835
+ h35(
6630
6836
  "div",
6631
6837
  { class: withVendorCSSClassPrefix17("signin__flow-messages") },
6632
6838
  flowMessages.value.map(
6633
- (fm, i) => h40(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
6839
+ (fm, i) => h35(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
6634
6840
  )
6635
6841
  )
6636
6842
  );
6637
6843
  }
6638
- if (messages.value.length > 0) children.push(h40("div", {}, renderMessages()));
6844
+ if (messages.value.length > 0) children.push(h35("div", {}, renderMessages()));
6639
6845
  const errNode = renderError();
6640
6846
  if (errNode) children.push(errNode);
6641
6847
  userPromptAuths.forEach((auth, index) => {
6642
- if (index > 0) children.push(h40(Divider_default, {}, { default: () => "OR" }));
6848
+ if (index > 0) children.push(h35(Divider_default, {}, { default: () => "OR" }));
6643
6849
  children.push(
6644
- h40(
6850
+ h35(
6645
6851
  "form",
6646
6852
  {
6647
6853
  onSubmit: (e) => {
@@ -6673,11 +6879,11 @@ var BaseSignIn = defineComponent39({
6673
6879
  );
6674
6880
  });
6675
6881
  if (userPromptAuths.length > 0 && optionAuths.length > 0) {
6676
- children.push(h40(Divider_default, {}, { default: () => "OR" }));
6882
+ children.push(h35(Divider_default, {}, { default: () => "OR" }));
6677
6883
  }
6678
6884
  optionAuths.forEach((auth) => {
6679
6885
  children.push(
6680
- h40("div", { key: auth.authenticatorId }, [
6886
+ h35("div", { key: auth.authenticatorId }, [
6681
6887
  createSignInOptionFromAuthenticator(
6682
6888
  auth,
6683
6889
  formValues.value,
@@ -6702,15 +6908,15 @@ var BaseSignIn = defineComponent39({
6702
6908
  ]);
6703
6909
  }
6704
6910
  if (!currentAuthenticator.value) {
6705
- return h40("div", {}, [
6706
- props.showLogo ? h40("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h40(Logo_default)]) : null,
6707
- h40(
6911
+ return h35("div", {}, [
6912
+ props.showLogo ? h35("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h35(Logo_default)]) : null,
6913
+ h35(
6708
6914
  Card_default,
6709
6915
  { class: cardClass, variant: props.variant },
6710
6916
  {
6711
6917
  default: () => {
6712
6918
  const errNode = renderError();
6713
- return errNode ? [errNode] : [h40(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })];
6919
+ return errNode ? [errNode] : [h35(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })];
6714
6920
  }
6715
6921
  }
6716
6922
  )
@@ -6718,16 +6924,16 @@ var BaseSignIn = defineComponent39({
6718
6924
  }
6719
6925
  if (isPasskeyAuthenticator(currentAuthenticator.value) && !isLoading()) {
6720
6926
  handleAuthenticatorSelection(currentAuthenticator.value);
6721
- return h40("div", {}, [
6722
- props.showLogo ? h40("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h40(Logo_default)]) : null,
6723
- h40(
6927
+ return h35("div", {}, [
6928
+ props.showLogo ? h35("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h35(Logo_default)]) : null,
6929
+ h35(
6724
6930
  Card_default,
6725
6931
  { class: cardClass, variant: props.variant },
6726
6932
  {
6727
6933
  default: () => [
6728
- h40("div", { style: "text-align:center" }, [
6729
- h40(Spinner_default, { size: "large" }),
6730
- h40(
6934
+ h35("div", { style: "text-align:center" }, [
6935
+ h35(Spinner_default, { size: "large" }),
6936
+ h35(
6731
6937
  Typography_default,
6732
6938
  { variant: "body1" },
6733
6939
  { default: () => t("passkey.authenticating") || "Authenticating with passkey..." }
@@ -6738,36 +6944,36 @@ var BaseSignIn = defineComponent39({
6738
6944
  )
6739
6945
  ]);
6740
6946
  }
6741
- return h40("div", {}, [
6742
- props.showLogo ? h40("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h40(Logo_default)]) : null,
6743
- h40(
6947
+ return h35("div", {}, [
6948
+ props.showLogo ? h35("div", { class: withVendorCSSClassPrefix17("signin__logo") }, [h35(Logo_default)]) : null,
6949
+ h35(
6744
6950
  Card_default,
6745
6951
  { class: cardClass, variant: props.variant },
6746
6952
  {
6747
6953
  default: () => {
6748
6954
  const children = [];
6749
6955
  children.push(
6750
- h40("div", { class: withVendorCSSClassPrefix17("signin__header") }, [
6751
- h40(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }),
6752
- h40(Typography_default, { variant: "body1" }, { default: () => flowSubtitle.value || t("signin.subheading") })
6956
+ h35("div", { class: withVendorCSSClassPrefix17("signin__header") }, [
6957
+ h35(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }),
6958
+ h35(Typography_default, { variant: "body1" }, { default: () => flowSubtitle.value || t("signin.subheading") })
6753
6959
  ])
6754
6960
  );
6755
6961
  if (flowMessages.value?.length > 0) {
6756
6962
  children.push(
6757
- h40(
6963
+ h35(
6758
6964
  "div",
6759
6965
  { class: withVendorCSSClassPrefix17("signin__flow-messages") },
6760
6966
  flowMessages.value.map(
6761
- (fm, i) => h40(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
6967
+ (fm, i) => h35(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
6762
6968
  )
6763
6969
  )
6764
6970
  );
6765
6971
  }
6766
- if (messages.value.length > 0) children.push(h40("div", {}, renderMessages()));
6972
+ if (messages.value.length > 0) children.push(h35("div", {}, renderMessages()));
6767
6973
  const errNode = renderError();
6768
6974
  if (errNode) children.push(errNode);
6769
6975
  children.push(
6770
- h40(
6976
+ h35(
6771
6977
  "form",
6772
6978
  {
6773
6979
  class: withVendorCSSClassPrefix17("signin__form"),
@@ -6808,8 +7014,8 @@ var BaseSignIn = defineComponent39({
6808
7014
  });
6809
7015
  var BaseSignIn_default = BaseSignIn;
6810
7016
 
6811
- // src/components/presentation/sign-in/v1/SignIn.ts
6812
- var SignIn = defineComponent40({
7017
+ // src/components/auth/sign-in/v1/SignIn.ts
7018
+ var SignIn = defineComponent35({
6813
7019
  emits: ["error", "success"],
6814
7020
  name: "SignInV1",
6815
7021
  props: {
@@ -6839,7 +7045,7 @@ var SignIn = defineComponent40({
6839
7045
  window.location.href = url.toString();
6840
7046
  }
6841
7047
  };
6842
- return () => h41(BaseSignIn_default, {
7048
+ return () => h36(BaseSignIn_default, {
6843
7049
  ...attrs,
6844
7050
  afterSignInUrl,
6845
7051
  class: props.className,
@@ -6858,7 +7064,7 @@ var SignIn = defineComponent40({
6858
7064
  });
6859
7065
  var SignIn_default = SignIn;
6860
7066
 
6861
- // src/components/presentation/sign-in/v2/SignIn.ts
7067
+ // src/components/auth/sign-in/v2/SignIn.ts
6862
7068
  import {
6863
7069
  AsgardeoRuntimeError as AsgardeoRuntimeError8,
6864
7070
  EmbeddedFlowType,
@@ -6866,27 +7072,27 @@ import {
6866
7072
  EmbeddedSignInFlowTypeV2
6867
7073
  } from "@asgardeo/browser";
6868
7074
  import {
6869
- defineComponent as defineComponent42,
6870
- h as h44,
7075
+ defineComponent as defineComponent37,
7076
+ h as h39,
6871
7077
  onMounted as onMounted5,
6872
7078
  onUnmounted as onUnmounted2,
6873
7079
  ref as ref16,
6874
7080
  watch as watch9
6875
7081
  } from "vue";
6876
7082
 
6877
- // src/components/presentation/sign-in/v2/BaseSignIn.ts
7083
+ // src/components/auth/sign-in/v2/BaseSignIn.ts
6878
7084
  import {
6879
7085
  withVendorCSSClassPrefix as withVendorCSSClassPrefix18
6880
7086
  } from "@asgardeo/browser";
6881
7087
  import {
6882
7088
  computed as computed6,
6883
- defineComponent as defineComponent41,
6884
- h as h43,
7089
+ defineComponent as defineComponent36,
7090
+ h as h38,
6885
7091
  ref as ref15,
6886
7092
  watch as watch8
6887
7093
  } from "vue";
6888
7094
 
6889
- // src/components/presentation/sign-in/AuthOptionFactoryCore.ts
7095
+ // src/components/auth/sign-in/AuthOptionFactoryCore.ts
6890
7096
  import {
6891
7097
  FieldType as FieldType3,
6892
7098
  EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,
@@ -6896,7 +7102,7 @@ import {
6896
7102
  isEmojiUri
6897
7103
  } from "@asgardeo/browser";
6898
7104
  import DOMPurify from "dompurify";
6899
- import { h as h42 } from "vue";
7105
+ import { h as h37 } from "vue";
6900
7106
  var logger5 = createVueLogger("AuthOptionFactory");
6901
7107
  var getConsentOptionalKey = (purposeId, attr) => `consent_${purposeId}_${attr}`;
6902
7108
  var resolveEmojiUrisInHtml = (html) => {
@@ -7022,30 +7228,30 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7022
7228
  }
7023
7229
  };
7024
7230
  if (matchesSocialProvider(actionId, eventType, buttonText, "google")) {
7025
- return h42(GoogleButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7231
+ return h37(GoogleButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7026
7232
  }
7027
7233
  if (matchesSocialProvider(actionId, eventType, buttonText, "github")) {
7028
- return h42(GitHubButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7234
+ return h37(GitHubButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7029
7235
  }
7030
7236
  if (matchesSocialProvider(actionId, eventType, buttonText, "facebook")) {
7031
- return h42(FacebookButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7237
+ return h37(FacebookButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7032
7238
  }
7033
7239
  if (matchesSocialProvider(actionId, eventType, buttonText, "microsoft")) {
7034
- return h42(MicrosoftButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7240
+ return h37(MicrosoftButton_default, { class: options.buttonClassName, key, onClick: handleClick });
7035
7241
  }
7036
- const startIconVNode = component.startIcon ? h42("img", {
7242
+ const startIconVNode = component.startIcon ? h37("img", {
7037
7243
  alt: "",
7038
7244
  "aria-hidden": "true",
7039
7245
  src: component.startIcon,
7040
7246
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
7041
7247
  }) : null;
7042
- const endIconVNode = component.endIcon ? h42("img", {
7248
+ const endIconVNode = component.endIcon ? h37("img", {
7043
7249
  alt: "",
7044
7250
  "aria-hidden": "true",
7045
7251
  src: component.endIcon,
7046
7252
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
7047
7253
  }) : null;
7048
- return h42(
7254
+ return h37(
7049
7255
  Button_default,
7050
7256
  {
7051
7257
  class: options.buttonClassName,
@@ -7065,7 +7271,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7065
7271
  case EmbeddedFlowComponentType.Text: {
7066
7272
  const variant = getTypographyVariant(component.variant);
7067
7273
  const align = typeof component["align"] === "string" ? component["align"] : "left";
7068
- return h42(
7274
+ return h37(
7069
7275
  Typography_default,
7070
7276
  {
7071
7277
  key,
@@ -7077,7 +7283,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7077
7283
  }
7078
7284
  case EmbeddedFlowComponentType.Divider: {
7079
7285
  const dividerLabel = resolve(component.label) || "";
7080
- return h42(Divider_default, { key }, dividerLabel ? { default: () => dividerLabel } : void 0);
7286
+ return h37(Divider_default, { key }, dividerLabel ? { default: () => dividerLabel } : void 0);
7081
7287
  }
7082
7288
  case EmbeddedFlowComponentType.Select: {
7083
7289
  const identifier = component.ref;
@@ -7090,7 +7296,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7090
7296
  value: typeof opt === "string" ? opt : String(opt.value ?? "")
7091
7297
  })
7092
7298
  );
7093
- return h42(Select_default, {
7299
+ return h37(Select_default, {
7094
7300
  class: options.inputClassName,
7095
7301
  error,
7096
7302
  key,
@@ -7121,12 +7327,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7121
7327
  }
7122
7328
  )
7123
7329
  ).filter(Boolean);
7124
- return h42("form", { id: component.id, key }, blockChildren);
7330
+ return h37("form", { id: component.id, key }, blockChildren);
7125
7331
  }
7126
7332
  return null;
7127
7333
  }
7128
7334
  case EmbeddedFlowComponentType.RichText: {
7129
- return h42("div", {
7335
+ return h37("div", {
7130
7336
  innerHTML: DOMPurify.sanitize(resolveEmojiUrisInHtml(resolve(component.label))),
7131
7337
  key,
7132
7338
  style: { overflowWrap: "anywhere" }
@@ -7135,7 +7341,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7135
7341
  case EmbeddedFlowComponentType.Image: {
7136
7342
  const explicitHeight = resolve(component.height?.toString());
7137
7343
  const explicitWidth = resolve(component.width?.toString());
7138
- return h42("img", {
7344
+ return h37("img", {
7139
7345
  alt: resolve(component.alt) || resolve(component.label) || "Image",
7140
7346
  key,
7141
7347
  src: resolve(component.src),
@@ -7179,7 +7385,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7179
7385
  }
7180
7386
  )
7181
7387
  ) : [];
7182
- return h42("div", { key, style: stackStyle }, stackChildren.filter(Boolean));
7388
+ return h37("div", { key, style: stackStyle }, stackChildren.filter(Boolean));
7183
7389
  }
7184
7390
  case EmbeddedFlowComponentType.Consent: {
7185
7391
  logger5.warn(`Consent component type is not yet fully supported in the Vue SDK.`);
@@ -7190,7 +7396,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
7190
7396
  const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
7191
7397
  const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
7192
7398
  const timerText = textTemplate.replace("{time}", String(expiresIn));
7193
- return h42("div", { class: "asgardeo-flow-timer", key }, timerText);
7399
+ return h37("div", { class: "asgardeo-flow-timer", key }, timerText);
7194
7400
  }
7195
7401
  default:
7196
7402
  logger5.warn(`Unsupported component type: ${component.type}. Skipping render.`);
@@ -7368,7 +7574,7 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
7368
7574
  };
7369
7575
  };
7370
7576
 
7371
- // src/components/presentation/sign-in/v2/BaseSignIn.ts
7577
+ // src/components/auth/sign-in/v2/BaseSignIn.ts
7372
7578
  var extractFormFields = (flowComponents) => {
7373
7579
  const fields = [];
7374
7580
  const process = (comps) => {
@@ -7384,7 +7590,7 @@ var extractFormFields = (flowComponents) => {
7384
7590
  process(flowComponents);
7385
7591
  return fields;
7386
7592
  };
7387
- var BaseSignIn2 = defineComponent41({
7593
+ var BaseSignIn2 = defineComponent36({
7388
7594
  emits: ["error", "success"],
7389
7595
  name: "BaseSignIn",
7390
7596
  props: {
@@ -7550,23 +7756,23 @@ var BaseSignIn2 = defineComponent41({
7550
7756
  validateForm,
7551
7757
  values: formValues.value
7552
7758
  };
7553
- return h43("div", { class: containerClass, ...attrs }, slots["default"](renderProps));
7759
+ return h38("div", { class: containerClass, ...attrs }, slots["default"](renderProps));
7554
7760
  }
7555
7761
  if (isLoading.value && (!props.components || props.components.length === 0)) {
7556
- return h43(
7762
+ return h38(
7557
7763
  Card_default,
7558
7764
  { class: containerClass, variant: props.variant },
7559
- () => h43("div", { style: "display:flex;justify-content:center;padding:2rem" }, h43(Spinner_default))
7765
+ () => h38("div", { style: "display:flex;justify-content:center;padding:2rem" }, h38(Spinner_default))
7560
7766
  );
7561
7767
  }
7562
7768
  if (!props.components || props.components.length === 0) {
7563
- return h43(
7769
+ return h38(
7564
7770
  Card_default,
7565
7771
  { class: containerClass, variant: props.variant },
7566
- () => h43(
7772
+ () => h38(
7567
7773
  Alert_default,
7568
7774
  { severity: "warning" },
7569
- () => h43(
7775
+ () => h38(
7570
7776
  Typography_default,
7571
7777
  { variant: "body1" },
7572
7778
  () => t("errors.signin.components.not.available") || "No sign-in options available"
@@ -7576,24 +7782,24 @@ var BaseSignIn2 = defineComponent41({
7576
7782
  }
7577
7783
  const messages = flowMessages.value || [];
7578
7784
  const externalError = props.error;
7579
- return h43(Card_default, { class: containerClass, ...attrs, variant: props.variant }, () => [
7785
+ return h38(Card_default, { class: containerClass, ...attrs, variant: props.variant }, () => [
7580
7786
  // Show errors and flow messages
7581
- (externalError || messages.length > 0) && h43(
7787
+ (externalError || messages.length > 0) && h38(
7582
7788
  "div",
7583
7789
  { class: [withVendorCSSClassPrefix18("signin__messages"), props.messageClassName].filter(Boolean).join(" ") },
7584
7790
  [
7585
- externalError && h43(Alert_default, { severity: "error" }, () => h43(Typography_default, { variant: "body2" }, () => externalError.message)),
7791
+ externalError && h38(Alert_default, { severity: "error" }, () => h38(Typography_default, { variant: "body2" }, () => externalError.message)),
7586
7792
  ...messages.map(
7587
- (msg, index) => h43(
7793
+ (msg, index) => h38(
7588
7794
  Alert_default,
7589
7795
  { key: index, severity: msg.type === "error" ? "error" : "info" },
7590
- () => h43(Typography_default, { variant: "body2" }, () => msg.message)
7796
+ () => h38(Typography_default, { variant: "body2" }, () => msg.message)
7591
7797
  )
7592
7798
  )
7593
7799
  ]
7594
7800
  ),
7595
7801
  // Render flow components
7596
- h43("div", { class: withVendorCSSClassPrefix18("signin__content") }, renderComponents())
7802
+ h38("div", { class: withVendorCSSClassPrefix18("signin__content") }, renderComponents())
7597
7803
  ]);
7598
7804
  };
7599
7805
  }
@@ -7767,10 +7973,10 @@ var handlePasskeyAuthentication = async (challengeData) => {
7767
7973
  }
7768
7974
  };
7769
7975
 
7770
- // src/components/presentation/sign-in/v2/SignIn.ts
7976
+ // src/components/auth/sign-in/v2/SignIn.ts
7771
7977
  var EXECUTION_ID_STORAGE_KEY = "asgardeo_execution_id";
7772
7978
  var AUTH_ID_STORAGE_KEY = "asgardeo_auth_id";
7773
- var SignIn2 = defineComponent42({
7979
+ var SignIn2 = defineComponent37({
7774
7980
  emits: ["error", "success"],
7775
7981
  name: "SignIn",
7776
7982
  props: {
@@ -8163,9 +8369,9 @@ var SignIn2 = defineComponent42({
8163
8369
  meta: flowMeta.value,
8164
8370
  onSubmit: handleSubmit
8165
8371
  };
8166
- return h44("div", {}, slots["default"](renderProps));
8372
+ return h39("div", {}, slots["default"](renderProps));
8167
8373
  }
8168
- return h44(BaseSignIn_default2, {
8374
+ return h39(BaseSignIn_default2, {
8169
8375
  ...attrs,
8170
8376
  additionalData: additionalData.value,
8171
8377
  class: props.className,
@@ -8183,8 +8389,8 @@ var SignIn2 = defineComponent42({
8183
8389
  });
8184
8390
  var SignIn_default2 = SignIn2;
8185
8391
 
8186
- // src/components/presentation/sign-in/SignIn.ts
8187
- var SignIn3 = defineComponent43({
8392
+ // src/components/auth/sign-in/SignIn.ts
8393
+ var SignIn3 = defineComponent38({
8188
8394
  emits: ["error", "success"],
8189
8395
  name: "SignIn",
8190
8396
  props: {
@@ -8202,7 +8408,7 @@ var SignIn3 = defineComponent43({
8202
8408
  const { platform } = useAsgardeo_default();
8203
8409
  return () => {
8204
8410
  if (platform === Platform3.AsgardeoV2) {
8205
- return h45(
8411
+ return h40(
8206
8412
  SignIn_default2,
8207
8413
  {
8208
8414
  ...attrs,
@@ -8215,7 +8421,7 @@ var SignIn3 = defineComponent43({
8215
8421
  slots
8216
8422
  );
8217
8423
  }
8218
- return h45(
8424
+ return h40(
8219
8425
  SignIn_default,
8220
8426
  {
8221
8427
  ...attrs,
@@ -8232,36 +8438,36 @@ var SignIn3 = defineComponent43({
8232
8438
  });
8233
8439
  var SignIn_default3 = SignIn3;
8234
8440
 
8235
- // src/components/presentation/sign-in/BaseSignIn.ts
8441
+ // src/components/auth/sign-in/BaseSignIn.ts
8236
8442
  import { Platform as Platform4 } from "@asgardeo/browser";
8237
- import { defineComponent as defineComponent44, h as h46 } from "vue";
8238
- var BaseSignIn3 = defineComponent44({
8443
+ import { defineComponent as defineComponent39, h as h41 } from "vue";
8444
+ var BaseSignIn3 = defineComponent39({
8239
8445
  inheritAttrs: false,
8240
8446
  name: "BaseSignIn",
8241
8447
  setup(_props, { attrs, slots }) {
8242
8448
  const { platform } = useAsgardeo_default();
8243
8449
  return () => {
8244
8450
  if (platform === Platform4.AsgardeoV2) {
8245
- return h46(BaseSignIn_default2, { ...attrs }, slots);
8451
+ return h41(BaseSignIn_default2, { ...attrs }, slots);
8246
8452
  }
8247
- return h46(BaseSignIn_default, { ...attrs }, slots);
8453
+ return h41(BaseSignIn_default, { ...attrs }, slots);
8248
8454
  };
8249
8455
  }
8250
8456
  });
8251
8457
  var BaseSignIn_default3 = BaseSignIn3;
8252
8458
 
8253
- // src/components/presentation/sign-up/SignUp.ts
8459
+ // src/components/auth/sign-up/SignUp.ts
8254
8460
  import { Platform as Platform5 } from "@asgardeo/browser";
8255
- import { defineComponent as defineComponent49, h as h52 } from "vue";
8461
+ import { defineComponent as defineComponent44, h as h47 } from "vue";
8256
8462
 
8257
- // src/components/presentation/sign-up/v1/SignUp.ts
8463
+ // src/components/auth/sign-up/v1/SignUp.ts
8258
8464
  import {
8259
8465
  EmbeddedFlowResponseType as EmbeddedFlowResponseType2,
8260
8466
  EmbeddedFlowType as EmbeddedFlowType2
8261
8467
  } from "@asgardeo/browser";
8262
- import { defineComponent as defineComponent46, h as h49 } from "vue";
8468
+ import { defineComponent as defineComponent41, h as h44 } from "vue";
8263
8469
 
8264
- // src/components/presentation/sign-up/v1/BaseSignUp.ts
8470
+ // src/components/auth/sign-up/v1/BaseSignUp.ts
8265
8471
  import {
8266
8472
  EmbeddedFlowComponentType as EmbeddedFlowComponentType3,
8267
8473
  EmbeddedFlowResponseType,
@@ -8269,15 +8475,15 @@ import {
8269
8475
  withVendorCSSClassPrefix as withVendorCSSClassPrefix19
8270
8476
  } from "@asgardeo/browser";
8271
8477
  import {
8272
- defineComponent as defineComponent45,
8273
- h as h48,
8478
+ defineComponent as defineComponent40,
8479
+ h as h43,
8274
8480
  ref as ref17,
8275
8481
  watch as watch10
8276
8482
  } from "vue";
8277
8483
 
8278
- // src/components/presentation/sign-up/v1/options/SignUpOptionFactory.ts
8484
+ // src/components/auth/sign-up/v1/options/SignUpOptionFactory.ts
8279
8485
  import { EmbeddedFlowComponentType as EmbeddedFlowComponentType2, FieldType as FieldType4 } from "@asgardeo/browser";
8280
- import { h as h47 } from "vue";
8486
+ import { h as h42 } from "vue";
8281
8487
  var getInputName = (component) => {
8282
8488
  const cfg = component.config || {};
8283
8489
  return cfg.name || cfg.identifier || component.id;
@@ -8345,7 +8551,7 @@ var createSignUpComponent = (props) => {
8345
8551
  switch (component.type) {
8346
8552
  case EmbeddedFlowComponentType2.Typography: {
8347
8553
  const text = String(cfg.text || cfg.label || "");
8348
- return h47(
8554
+ return h42(
8349
8555
  Typography_default,
8350
8556
  { style: "margin-bottom:0.5rem", variant: inferTypographyVariant(component) },
8351
8557
  { default: () => text }
@@ -8377,18 +8583,18 @@ var createSignUpComponent = (props) => {
8377
8583
  const isPrimary = variant === "PRIMARY";
8378
8584
  const handleClick = () => onSubmit(component, void 0);
8379
8585
  if (matchesSocialProvider2(component, "google")) {
8380
- return h47(GoogleButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8586
+ return h42(GoogleButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8381
8587
  }
8382
8588
  if (matchesSocialProvider2(component, "github")) {
8383
- return h47(GitHubButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8589
+ return h42(GitHubButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8384
8590
  }
8385
8591
  if (matchesSocialProvider2(component, "microsoft")) {
8386
- return h47(MicrosoftButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8592
+ return h42(MicrosoftButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8387
8593
  }
8388
8594
  if (matchesSocialProvider2(component, "facebook")) {
8389
- return h47(FacebookButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8595
+ return h42(FacebookButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
8390
8596
  }
8391
- return h47(
8597
+ return h42(
8392
8598
  Button_default,
8393
8599
  {
8394
8600
  class: buttonClassName,
@@ -8416,7 +8622,7 @@ var createSignUpComponent = (props) => {
8416
8622
  return nodes;
8417
8623
  }
8418
8624
  case EmbeddedFlowComponentType2.Divider: {
8419
- return h47("hr", {
8625
+ return h42("hr", {
8420
8626
  class: "asgardeo-signup__divider",
8421
8627
  style: "margin:0.75rem 0;border:0;border-top:1px solid #e5e7eb"
8422
8628
  });
@@ -8425,12 +8631,12 @@ var createSignUpComponent = (props) => {
8425
8631
  const src = String(cfg.src || cfg.url || "");
8426
8632
  const alt = String(cfg.alt || "");
8427
8633
  if (!src) return null;
8428
- return h47("img", { alt, src, style: "max-width:100%;height:auto;display:block;margin:0.5rem auto" });
8634
+ return h42("img", { alt, src, style: "max-width:100%;height:auto;display:block;margin:0.5rem auto" });
8429
8635
  }
8430
8636
  default: {
8431
8637
  if (String(component.type).toUpperCase() === "RICH_TEXT") {
8432
8638
  const html = String(cfg.text || cfg.label || "");
8433
- return h47("div", { class: "asgardeo-signup__rich-text", innerHTML: html });
8639
+ return h42("div", { class: "asgardeo-signup__rich-text", innerHTML: html });
8434
8640
  }
8435
8641
  return null;
8436
8642
  }
@@ -8459,9 +8665,9 @@ var renderSignUpComponents2 = (components, formValues, touchedFields, formErrors
8459
8665
  return result;
8460
8666
  };
8461
8667
 
8462
- // src/components/presentation/sign-up/v1/BaseSignUp.ts
8668
+ // src/components/auth/sign-up/v1/BaseSignUp.ts
8463
8669
  var logger6 = createVueLogger("BaseSignUpV1");
8464
- var BaseSignUp = defineComponent45({
8670
+ var BaseSignUp = defineComponent40({
8465
8671
  emits: ["error", "flowChange", "complete"],
8466
8672
  name: "BaseSignUpV1",
8467
8673
  props: {
@@ -8746,20 +8952,20 @@ var BaseSignUp = defineComponent45({
8746
8952
  touched: touchedFields.value,
8747
8953
  values: formValues.value
8748
8954
  };
8749
- return h48("div", { class: containerClass }, slots["default"](renderProps));
8955
+ return h43("div", { class: containerClass }, slots["default"](renderProps));
8750
8956
  }
8751
8957
  if (!isFlowInitialized.value && isLoading.value) {
8752
- return h48(
8958
+ return h43(
8753
8959
  Card_default,
8754
8960
  { class: containerClass, variant: props.variant },
8755
- () => h48("div", { style: "display:flex;justify-content:center;padding:2rem" }, h48(Spinner_default))
8961
+ () => h43("div", { style: "display:flex;justify-content:center;padding:2rem" }, h43(Spinner_default))
8756
8962
  );
8757
8963
  }
8758
8964
  if (!currentFlow.value) {
8759
- return h48(
8965
+ return h43(
8760
8966
  Card_default,
8761
8967
  { class: containerClass, variant: props.variant },
8762
- () => h48(
8968
+ () => h43(
8763
8969
  Alert_default,
8764
8970
  { variant: "error" },
8765
8971
  () => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
@@ -8784,33 +8990,33 @@ var BaseSignUp = defineComponent45({
8784
8990
  );
8785
8991
  const cardChildren = [];
8786
8992
  if (props.showLogo) {
8787
- cardChildren.push(h48("div", { style: "display:flex;justify-content:center;margin-bottom:1rem" }, [h48(Logo_default)]));
8993
+ cardChildren.push(h43("div", { style: "display:flex;justify-content:center;margin-bottom:1rem" }, [h43(Logo_default)]));
8788
8994
  }
8789
8995
  if (props.showTitle || props.showSubtitle) {
8790
8996
  const headerChildren = [];
8791
8997
  if (props.showTitle) {
8792
8998
  headerChildren.push(
8793
- h48(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signup.heading") || "Sign Up" })
8999
+ h43(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signup.heading") || "Sign Up" })
8794
9000
  );
8795
9001
  }
8796
9002
  if (props.showSubtitle) {
8797
9003
  headerChildren.push(
8798
- h48(
9004
+ h43(
8799
9005
  Typography_default,
8800
9006
  { variant: "body1" },
8801
9007
  { default: () => flowSubtitle.value || t("signup.subheading") || "Create your account" }
8802
9008
  )
8803
9009
  );
8804
9010
  }
8805
- cardChildren.push(h48("div", { style: "padding: 0 1rem 1rem" }, headerChildren));
9011
+ cardChildren.push(h43("div", { style: "padding: 0 1rem 1rem" }, headerChildren));
8806
9012
  }
8807
9013
  if (flowMessages.value && flowMessages.value.length > 0) {
8808
9014
  cardChildren.push(
8809
- h48(
9015
+ h43(
8810
9016
  "div",
8811
9017
  { style: "padding: 0 1rem" },
8812
9018
  flowMessages.value.map(
8813
- (msg, i) => h48(
9019
+ (msg, i) => h43(
8814
9020
  Alert_default,
8815
9021
  {
8816
9022
  class: props.messageClassName,
@@ -8824,7 +9030,7 @@ var BaseSignUp = defineComponent45({
8824
9030
  );
8825
9031
  }
8826
9032
  cardChildren.push(
8827
- h48(
9033
+ h43(
8828
9034
  "form",
8829
9035
  {
8830
9036
  class: withVendorCSSClassPrefix19("signup__form"),
@@ -8835,7 +9041,7 @@ var BaseSignUp = defineComponent45({
8835
9041
  style: "padding: 1rem;display:flex;flex-direction:column;gap:0.75rem"
8836
9042
  },
8837
9043
  rendered.length > 0 ? rendered : [
8838
- h48(
9044
+ h43(
8839
9045
  Alert_default,
8840
9046
  { variant: "warning" },
8841
9047
  () => t("errors.signup.components.not.available") || "No components available"
@@ -8843,14 +9049,14 @@ var BaseSignUp = defineComponent45({
8843
9049
  ]
8844
9050
  )
8845
9051
  );
8846
- return h48(Card_default, { class: containerClass, variant: props.variant }, () => cardChildren);
9052
+ return h43(Card_default, { class: containerClass, variant: props.variant }, () => cardChildren);
8847
9053
  };
8848
9054
  }
8849
9055
  });
8850
9056
  var BaseSignUp_default = BaseSignUp;
8851
9057
 
8852
- // src/components/presentation/sign-up/v1/SignUp.ts
8853
- var SignUp = defineComponent46({
9058
+ // src/components/auth/sign-up/v1/SignUp.ts
9059
+ var SignUp = defineComponent41({
8854
9060
  name: "SignUpV1",
8855
9061
  props: {
8856
9062
  afterSignUpUrl: { default: void 0, type: String },
@@ -8894,7 +9100,7 @@ var SignUp = defineComponent46({
8894
9100
  }
8895
9101
  }
8896
9102
  };
8897
- return () => h49(
9103
+ return () => h44(
8898
9104
  BaseSignUp_default,
8899
9105
  {
8900
9106
  afterSignUpUrl: props.afterSignUpUrl,
@@ -8919,14 +9125,14 @@ var SignUp = defineComponent46({
8919
9125
  });
8920
9126
  var SignUp_default = SignUp;
8921
9127
 
8922
- // src/components/presentation/sign-up/v2/SignUp.ts
9128
+ // src/components/auth/sign-up/v2/SignUp.ts
8923
9129
  import {
8924
9130
  EmbeddedFlowResponseType as EmbeddedFlowResponseType4,
8925
9131
  EmbeddedFlowType as EmbeddedFlowType3
8926
9132
  } from "@asgardeo/browser";
8927
- import { defineComponent as defineComponent48, h as h51 } from "vue";
9133
+ import { defineComponent as defineComponent43, h as h46 } from "vue";
8928
9134
 
8929
- // src/components/presentation/sign-up/v2/BaseSignUp.ts
9135
+ // src/components/auth/sign-up/v2/BaseSignUp.ts
8930
9136
  import {
8931
9137
  EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType4,
8932
9138
  EmbeddedFlowResponseType as EmbeddedFlowResponseType3,
@@ -8934,8 +9140,8 @@ import {
8934
9140
  withVendorCSSClassPrefix as withVendorCSSClassPrefix20
8935
9141
  } from "@asgardeo/browser";
8936
9142
  import {
8937
- defineComponent as defineComponent47,
8938
- h as h50,
9143
+ defineComponent as defineComponent42,
9144
+ h as h45,
8939
9145
  ref as ref18,
8940
9146
  watch as watch11
8941
9147
  } from "vue";
@@ -9001,7 +9207,7 @@ var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitl
9001
9207
  };
9002
9208
  var getAuthComponentHeadings_default = getAuthComponentHeadings;
9003
9209
 
9004
- // src/components/presentation/sign-up/v2/BaseSignUp.ts
9210
+ // src/components/auth/sign-up/v2/BaseSignUp.ts
9005
9211
  var logger7 = createVueLogger("BaseSignUp");
9006
9212
  var extractFormFields2 = (components) => {
9007
9213
  const fields = [];
@@ -9019,7 +9225,7 @@ var extractFormFields2 = (components) => {
9019
9225
  process(components);
9020
9226
  return fields;
9021
9227
  };
9022
- var BaseSignUp2 = defineComponent47({
9228
+ var BaseSignUp2 = defineComponent42({
9023
9229
  emits: ["error", "complete", "flowChange"],
9024
9230
  name: "BaseSignUp",
9025
9231
  props: {
@@ -9390,20 +9596,20 @@ var BaseSignUp2 = defineComponent47({
9390
9596
  },
9391
9597
  values: formValues.value
9392
9598
  };
9393
- return h50("div", { class: containerClass }, slots["default"](renderProps));
9599
+ return h45("div", { class: containerClass }, slots["default"](renderProps));
9394
9600
  }
9395
9601
  if (!isFlowInitialized.value && isLoading.value) {
9396
- return h50(
9602
+ return h45(
9397
9603
  Card_default,
9398
9604
  { class: containerClass, variant: props.variant },
9399
- () => h50("div", { style: "display:flex;justify-content:center;padding:2rem" }, h50(Spinner_default))
9605
+ () => h45("div", { style: "display:flex;justify-content:center;padding:2rem" }, h45(Spinner_default))
9400
9606
  );
9401
9607
  }
9402
9608
  if (!currentFlow.value) {
9403
- return h50(
9609
+ return h45(
9404
9610
  Card_default,
9405
9611
  { class: containerClass, variant: props.variant },
9406
- () => h50(
9612
+ () => h45(
9407
9613
  Alert_default,
9408
9614
  { variant: "error" },
9409
9615
  () => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
@@ -9438,32 +9644,32 @@ var BaseSignUp2 = defineComponent47({
9438
9644
  variant: props.variant
9439
9645
  }
9440
9646
  ) : [];
9441
- return h50(Card_default, { class: containerClass, variant: props.variant }, () => [
9647
+ return h45(Card_default, { class: containerClass, variant: props.variant }, () => [
9442
9648
  // Header with title/subtitle
9443
- props.showTitle || props.showSubtitle ? h50("div", { style: "padding: 1rem 1rem 0" }, [
9444
- props.showTitle ? h50(Typography_default, { variant: "h5" }, () => title) : null,
9445
- props.showSubtitle ? h50(Typography_default, { style: "margin-top: 0.25rem", variant: "body1" }, () => subtitle) : null
9649
+ props.showTitle || props.showSubtitle ? h45("div", { style: "padding: 1rem 1rem 0" }, [
9650
+ props.showTitle ? h45(Typography_default, { variant: "h5" }, () => title) : null,
9651
+ props.showSubtitle ? h45(Typography_default, { style: "margin-top: 0.25rem", variant: "body1" }, () => subtitle) : null
9446
9652
  ]) : null,
9447
9653
  // External error
9448
- props.error ? h50(
9654
+ props.error ? h45(
9449
9655
  "div",
9450
9656
  { style: "padding: 0 1rem" },
9451
- h50(Alert_default, { variant: "error" }, () => props.error.message)
9657
+ h45(Alert_default, { variant: "error" }, () => props.error.message)
9452
9658
  ) : null,
9453
9659
  // Flow messages
9454
- flowMessages.value.length > 0 ? h50(
9660
+ flowMessages.value.length > 0 ? h45(
9455
9661
  "div",
9456
9662
  { style: "padding: 0 1rem" },
9457
9663
  flowMessages.value.map(
9458
- (msg, i) => h50(Alert_default, { key: i, variant: msg.type === "error" ? "error" : "info" }, () => msg.message)
9664
+ (msg, i) => h45(Alert_default, { key: i, variant: msg.type === "error" ? "error" : "info" }, () => msg.message)
9459
9665
  )
9460
9666
  ) : null,
9461
9667
  // Components
9462
- h50(
9668
+ h45(
9463
9669
  "div",
9464
9670
  { style: "padding: 1rem" },
9465
9671
  renderedComponents.length > 0 ? renderedComponents : [
9466
- h50(
9672
+ h45(
9467
9673
  Alert_default,
9468
9674
  { variant: "warning" },
9469
9675
  () => t("errors.signup.components.not.available") || "No components available"
@@ -9476,8 +9682,8 @@ var BaseSignUp2 = defineComponent47({
9476
9682
  });
9477
9683
  var BaseSignUp_default2 = BaseSignUp2;
9478
9684
 
9479
- // src/components/presentation/sign-up/v2/SignUp.ts
9480
- var SignUp2 = defineComponent48({
9685
+ // src/components/auth/sign-up/v2/SignUp.ts
9686
+ var SignUp2 = defineComponent43({
9481
9687
  name: "SignUp",
9482
9688
  props: {
9483
9689
  afterSignUpUrl: { default: void 0, type: String },
@@ -9521,7 +9727,7 @@ var SignUp2 = defineComponent48({
9521
9727
  window.location.href = response.data.redirectURL;
9522
9728
  }
9523
9729
  };
9524
- return () => h51(
9730
+ return () => h46(
9525
9731
  BaseSignUp_default2,
9526
9732
  {
9527
9733
  afterSignUpUrl: props.afterSignUpUrl,
@@ -9546,74 +9752,233 @@ var SignUp2 = defineComponent48({
9546
9752
  });
9547
9753
  var SignUp_default2 = SignUp2;
9548
9754
 
9549
- // src/components/presentation/sign-up/SignUp.ts
9550
- var SignUp3 = defineComponent49({
9755
+ // src/components/auth/sign-up/SignUp.ts
9756
+ var SignUp3 = defineComponent44({
9551
9757
  inheritAttrs: false,
9552
9758
  name: "SignUp",
9553
9759
  setup(_props, { attrs, slots }) {
9554
9760
  const { platform } = useAsgardeo_default();
9555
9761
  return () => {
9556
9762
  if (platform === Platform5.AsgardeoV2) {
9557
- return h52(SignUp_default2, { ...attrs }, slots);
9763
+ return h47(SignUp_default2, { ...attrs }, slots);
9558
9764
  }
9559
- return h52(SignUp_default, { ...attrs }, slots);
9765
+ return h47(SignUp_default, { ...attrs }, slots);
9560
9766
  };
9561
9767
  }
9562
9768
  });
9563
9769
  var SignUp_default3 = SignUp3;
9564
9770
 
9565
- // src/components/presentation/sign-up/BaseSignUp.ts
9771
+ // src/components/auth/sign-up/BaseSignUp.ts
9566
9772
  import { Platform as Platform6 } from "@asgardeo/browser";
9567
- import { defineComponent as defineComponent50, h as h53 } from "vue";
9568
- var BaseSignUp3 = defineComponent50({
9773
+ import { defineComponent as defineComponent45, h as h48 } from "vue";
9774
+ var BaseSignUp3 = defineComponent45({
9569
9775
  inheritAttrs: false,
9570
9776
  name: "BaseSignUp",
9571
9777
  setup(_props, { attrs, slots }) {
9572
9778
  const { platform } = useAsgardeo_default();
9573
9779
  return () => {
9574
9780
  if (platform === Platform6.AsgardeoV2) {
9575
- return h53(BaseSignUp_default2, { ...attrs }, slots);
9781
+ return h48(BaseSignUp_default2, { ...attrs }, slots);
9576
9782
  }
9577
- return h53(BaseSignUp_default, { ...attrs }, slots);
9783
+ return h48(BaseSignUp_default, { ...attrs }, slots);
9578
9784
  };
9579
9785
  }
9580
9786
  });
9581
9787
  var BaseSignUp_default3 = BaseSignUp3;
9582
9788
 
9789
+ // src/components/control/SignedIn.ts
9790
+ import { defineComponent as defineComponent46, h as h49, Fragment } from "vue";
9791
+ var SignedIn = defineComponent46({
9792
+ name: "SignedIn",
9793
+ setup(_props, { slots }) {
9794
+ const { isSignedIn } = useAsgardeo_default();
9795
+ return () => {
9796
+ if (!isSignedIn.value) {
9797
+ const fallbackContent = slots["fallback"]?.();
9798
+ return fallbackContent ? h49(Fragment, {}, fallbackContent) : null;
9799
+ }
9800
+ const defaultContent = slots["default"]?.();
9801
+ return defaultContent ? h49(Fragment, {}, defaultContent) : null;
9802
+ };
9803
+ }
9804
+ });
9805
+ var SignedIn_default = SignedIn;
9806
+
9807
+ // src/components/control/SignedOut.ts
9808
+ import { defineComponent as defineComponent47, h as h50, Fragment as Fragment2 } from "vue";
9809
+ var SignedOut = defineComponent47({
9810
+ name: "SignedOut",
9811
+ setup(_props, { slots }) {
9812
+ const { isSignedIn } = useAsgardeo_default();
9813
+ return () => {
9814
+ if (isSignedIn.value) {
9815
+ const fallbackContent = slots["fallback"]?.();
9816
+ return fallbackContent ? h50(Fragment2, {}, fallbackContent) : null;
9817
+ }
9818
+ const defaultContent = slots["default"]?.();
9819
+ return defaultContent ? h50(Fragment2, {}, defaultContent) : null;
9820
+ };
9821
+ }
9822
+ });
9823
+ var SignedOut_default = SignedOut;
9824
+
9825
+ // src/components/control/Loading.ts
9826
+ import { defineComponent as defineComponent48, h as h51, Fragment as Fragment3 } from "vue";
9827
+ var Loading = defineComponent48({
9828
+ name: "Loading",
9829
+ setup(_props, { slots }) {
9830
+ const { isLoading } = useAsgardeo_default();
9831
+ return () => {
9832
+ if (!isLoading.value) {
9833
+ const fallbackContent = slots["fallback"]?.();
9834
+ return fallbackContent ? h51(Fragment3, {}, fallbackContent) : null;
9835
+ }
9836
+ const defaultContent = slots["default"]?.();
9837
+ return defaultContent ? h51(Fragment3, {}, defaultContent) : null;
9838
+ };
9839
+ }
9840
+ });
9841
+ var Loading_default = Loading;
9842
+
9843
+ // src/components/presentation/user/User.ts
9844
+ import { defineComponent as defineComponent49, h as h52, Fragment as Fragment4 } from "vue";
9845
+ var User5 = defineComponent49({
9846
+ name: "User",
9847
+ setup(_props, { slots }) {
9848
+ const { user } = useAsgardeo_default();
9849
+ return () => {
9850
+ if (!user.value) {
9851
+ const fallbackContent = slots["fallback"]?.();
9852
+ return fallbackContent ? h52(Fragment4, {}, fallbackContent) : null;
9853
+ }
9854
+ const defaultContent = slots["default"]?.({ user: user.value });
9855
+ return defaultContent ? h52(Fragment4, {}, defaultContent) : null;
9856
+ };
9857
+ }
9858
+ });
9859
+ var User_default = User5;
9860
+
9861
+ // src/components/presentation/organization/Organization.ts
9862
+ import { defineComponent as defineComponent50, h as h53, Fragment as Fragment5 } from "vue";
9863
+ var Organization5 = defineComponent50({
9864
+ name: "Organization",
9865
+ setup(_props, { slots }) {
9866
+ const { currentOrganization } = useOrganization_default();
9867
+ return () => {
9868
+ if (!currentOrganization?.value) {
9869
+ const fallbackContent = slots["fallback"]?.();
9870
+ return fallbackContent ? h53(Fragment5, {}, fallbackContent) : null;
9871
+ }
9872
+ const defaultContent = slots["default"]?.({ organization: currentOrganization.value });
9873
+ return defaultContent ? h53(Fragment5, {}, defaultContent) : null;
9874
+ };
9875
+ }
9876
+ });
9877
+ var Organization_default = Organization5;
9878
+
9583
9879
  // src/components/presentation/user-profile/UserProfile.ts
9584
- import { withVendorCSSClassPrefix as withVendorCSSClassPrefix22 } from "@asgardeo/browser";
9585
- import { defineComponent as defineComponent52, h as h55 } from "vue";
9880
+ import { AsgardeoError, withVendorCSSClassPrefix as withVendorCSSClassPrefix22 } from "@asgardeo/browser";
9881
+ import { defineComponent as defineComponent52, h as h55, ref as ref20 } from "vue";
9586
9882
 
9587
9883
  // src/components/presentation/user-profile/BaseUserProfile.ts
9588
- import {
9589
- WellKnownSchemaIds,
9590
- withVendorCSSClassPrefix as withVendorCSSClassPrefix21
9591
- } from "@asgardeo/browser";
9884
+ import { WellKnownSchemaIds, withVendorCSSClassPrefix as withVendorCSSClassPrefix21 } from "@asgardeo/browser";
9592
9885
  import { defineComponent as defineComponent51, h as h54, ref as ref19 } from "vue";
9593
- var PROFILE_FIELD_DESCRIPTORS = [
9594
- { keys: ["userName", "username"], label: "Username", readonly: true },
9595
- { keys: ["name.givenName", "firstName", "givenName"], label: "First Name", readonly: false },
9596
- { keys: ["name.familyName", "lastName", "familyName"], label: "Last Name", readonly: false },
9597
- { keys: ["emails", "email"], label: "Email", readonly: true },
9598
- { keys: ["country"], label: "Country", readonly: false },
9599
- { keys: ["dateOfBirth", "birthdate", "birthDate"], label: "Birth Date", readonly: false },
9600
- { keys: ["phoneNumbers.mobile", "mobile", "mobileNumbers"], label: "Mobile", readonly: false }
9601
- ];
9602
- var CORE_USER_SCHEMA_ID = WellKnownSchemaIds.User;
9603
- var setNestedPath = (target, segments, value) => {
9604
- let cursor = target;
9605
- for (let i = 0; i < segments.length - 1; i += 1) {
9606
- const segment = segments[i];
9607
- if (typeof cursor[segment] !== "object" || cursor[segment] === null) {
9608
- cursor[segment] = {};
9609
- }
9610
- cursor = cursor[segment];
9886
+
9887
+ // src/utils/getMappedUserProfileValue.ts
9888
+ import { get } from "@asgardeo/browser";
9889
+ var getMappedUserProfileValue = (key, mappings, user) => {
9890
+ if (!key || !mappings || !user) return void 0;
9891
+ const mapping = mappings[key];
9892
+ if (!mapping) return get(user, key);
9893
+ if (Array.isArray(mapping)) {
9894
+ let foundValue;
9895
+ let found = false;
9896
+ mapping.some((path) => {
9897
+ const value = get(user, path);
9898
+ if (value !== void 0 && value !== null && value !== "") {
9899
+ foundValue = value;
9900
+ found = true;
9901
+ return true;
9902
+ }
9903
+ return false;
9904
+ });
9905
+ return found ? foundValue : void 0;
9611
9906
  }
9612
- cursor[segments[segments.length - 1]] = value;
9907
+ return get(user, mapping);
9613
9908
  };
9614
- var buildScimPatchValue = (flatKey, rawValue, schemas) => {
9615
- const list = schemas ?? [];
9616
- const entry = list.find((s) => s.name === flatKey);
9909
+ var getMappedUserProfileValue_default = getMappedUserProfileValue;
9910
+
9911
+ // src/utils/getDisplayName.ts
9912
+ var getDisplayName = (mergedMappings, user, displayAttributes) => {
9913
+ if (displayAttributes && displayAttributes.length > 0) {
9914
+ let foundValue;
9915
+ displayAttributes.some((attr) => {
9916
+ const value = getMappedUserProfileValue_default(attr, mergedMappings, user);
9917
+ if (value !== void 0 && value !== null && value !== "") {
9918
+ foundValue = String(value);
9919
+ return true;
9920
+ }
9921
+ return false;
9922
+ });
9923
+ if (foundValue !== void 0) return foundValue;
9924
+ }
9925
+ const firstName = getMappedUserProfileValue_default("firstName", mergedMappings, user);
9926
+ const lastName = getMappedUserProfileValue_default("lastName", mergedMappings, user);
9927
+ if (firstName && lastName) return `${firstName} ${lastName}`;
9928
+ return getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user) || getMappedUserProfileValue_default("name", mergedMappings, user) || "User";
9929
+ };
9930
+ var getDisplayName_default = getDisplayName;
9931
+
9932
+ // src/components/presentation/user-profile/BaseUserProfile.ts
9933
+ var FIELDS_TO_SKIP = [
9934
+ "roles.default",
9935
+ "active",
9936
+ "groups",
9937
+ "accountLocked",
9938
+ "accountDisabled",
9939
+ "oneTimePassword",
9940
+ "userSourceId",
9941
+ "idpType",
9942
+ "localCredentialExists",
9943
+ "ResourceType",
9944
+ "ExternalID",
9945
+ "MetaData",
9946
+ "verifiedMobileNumbers",
9947
+ "verifiedEmailAddresses",
9948
+ "phoneNumbers.mobile",
9949
+ "emailAddresses",
9950
+ "preferredMFAOption"
9951
+ ];
9952
+ var READONLY_FIELDS = ["username", "userName", "user_name"];
9953
+ var DEFAULT_ATTRIBUTE_MAPPINGS = {
9954
+ email: ["emails", "email"],
9955
+ firstName: ["name.givenName", "given_name"],
9956
+ lastName: ["name.familyName", "family_name"],
9957
+ picture: ["profile", "profileUrl", "picture", "URL"],
9958
+ username: ["userName", "username", "user_name"]
9959
+ };
9960
+ var AVATAR_GRADIENTS = [
9961
+ "linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)",
9962
+ "linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)",
9963
+ "linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)",
9964
+ "linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
9965
+ "linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)",
9966
+ "linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)",
9967
+ "linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
9968
+ "linear-gradient(135deg, #f97316 0%, #ec4899 100%)"
9969
+ ];
9970
+ function getAvatarGradient(seed) {
9971
+ if (!seed) return AVATAR_GRADIENTS[0];
9972
+ let hash = 0;
9973
+ for (let i = 0; i < seed.length; i += 1) {
9974
+ hash = hash * 31 + seed.charCodeAt(i) >>> 0;
9975
+ }
9976
+ return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];
9977
+ }
9978
+ function formatLabel(key) {
9979
+ return key.split(/(?=[A-Z])|[_.]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
9980
+ }
9981
+ function buildScimPatchValue(flatKey, rawValue, schemaId, multiValued) {
9617
9982
  if (flatKey === "phoneNumbers.mobile") {
9618
9983
  return {
9619
9984
  phoneNumbers: [{ type: "mobile", value: rawValue }],
@@ -9638,240 +10003,362 @@ var buildScimPatchValue = (flatKey, rawValue, schemas) => {
9638
10003
  return { [head]: [{ type: tail, value: rawValue }] };
9639
10004
  }
9640
10005
  }
9641
- const value = entry?.multiValued ? [rawValue] : rawValue;
10006
+ const value = multiValued ? [rawValue] : rawValue;
10007
+ if (schemaId && schemaId !== WellKnownSchemaIds.User) {
10008
+ return { [schemaId]: { [flatKey]: value } };
10009
+ }
9642
10010
  const segments = flatKey.split(".");
9643
10011
  const nested = {};
9644
- setNestedPath(nested, segments, value);
9645
- const schemaId = entry?.schemaId;
9646
- if (schemaId && schemaId !== CORE_USER_SCHEMA_ID) {
9647
- return { [schemaId]: nested };
10012
+ let cursor = nested;
10013
+ for (let i = 0; i < segments.length - 1; i += 1) {
10014
+ cursor[segments[i]] = {};
10015
+ cursor = cursor[segments[i]];
9648
10016
  }
10017
+ cursor[segments[segments.length - 1]] = value;
9649
10018
  return nested;
9650
- };
9651
- var AVATAR_GRADIENTS = [
9652
- "linear-gradient(135deg, #a855f7 0%, #ec4899 100%)",
9653
- "linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)",
9654
- "linear-gradient(135deg, #22c55e 0%, #10b981 100%)",
9655
- "linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
9656
- "linear-gradient(135deg, #ec4899 0%, #f43f5e 100%)",
9657
- "linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)",
9658
- "linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
9659
- "linear-gradient(135deg, #f97316 0%, #eab308 100%)"
9660
- ];
9661
- var getAvatarGradient = (seed) => {
9662
- if (!seed) return AVATAR_GRADIENTS[0];
9663
- let hash = 0;
9664
- for (let i = 0; i < seed.length; i += 1) {
9665
- const char = seed.charCodeAt(i);
9666
- hash = hash * 31 + char >>> 0;
9667
- }
9668
- return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];
9669
- };
9670
- var getUserInitials = (user) => {
9671
- if (!user) return "?";
9672
- const given = String(user["givenName"] || user["firstName"] || "");
9673
- const family = String(user["familyName"] || user["lastName"] || "");
9674
- if (given || family) return `${given.charAt(0)}${family.charAt(0)}`.toUpperCase();
9675
- const fallback = String(user["username"] || user["userName"] || user["email"] || user["sub"] || "");
9676
- return fallback.charAt(0).toUpperCase() || "?";
9677
- };
10019
+ }
9678
10020
  var BaseUserProfile = defineComponent51({
9679
10021
  inheritAttrs: false,
9680
10022
  name: "BaseUserProfile",
9681
10023
  props: {
10024
+ /** Avatar circle size. */
10025
+ avatarSize: {
10026
+ default: "lg",
10027
+ type: String
10028
+ },
9682
10029
  cardLayout: { default: true, type: Boolean },
10030
+ /** Shadow / border style of the Card wrapper. */
10031
+ cardVariant: {
10032
+ default: "elevated",
10033
+ type: String
10034
+ },
9683
10035
  className: { default: "", type: String },
10036
+ /** Tighter field spacing for modal / dropdown contexts. */
10037
+ compact: { default: false, type: Boolean },
9684
10038
  editable: { default: true, type: Boolean },
9685
10039
  error: { default: null, type: String },
9686
10040
  flattenedProfile: { default: null, type: Object },
9687
10041
  hideFields: { default: () => [], type: Array },
9688
10042
  isLoading: { default: false, type: Boolean },
9689
- onUpdate: {
9690
- default: void 0,
9691
- type: Function
9692
- },
10043
+ onUpdate: { default: void 0, type: Function },
9693
10044
  profile: { default: null, type: Object },
9694
10045
  schemas: { default: () => [], type: Array },
10046
+ /** Whether to render the avatar hero banner. */
10047
+ showAvatar: { default: true, type: Boolean },
9695
10048
  showFields: { default: () => [], type: Array },
9696
10049
  title: { default: "Profile", type: String }
9697
10050
  },
9698
10051
  setup(props, { slots }) {
9699
10052
  const editingFields = ref19({});
9700
10053
  const editedValues = ref19({});
9701
- return () => {
9702
- if (slots["default"]) {
9703
- return slots["default"]({
9704
- error: props.error,
9705
- isLoading: props.isLoading,
9706
- profile: props.flattenedProfile || props.profile
9707
- });
10054
+ const px = withVendorCSSClassPrefix21;
10055
+ function shouldShowField(fieldName) {
10056
+ if (FIELDS_TO_SKIP.includes(fieldName)) return false;
10057
+ if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(fieldName)) return false;
10058
+ if (props.showFields && props.showFields.length > 0) return props.showFields.includes(fieldName);
10059
+ return true;
10060
+ }
10061
+ function startEditing(fieldName, currentValue) {
10062
+ editedValues.value = { ...editedValues.value, [fieldName]: currentValue ?? "" };
10063
+ editingFields.value = { ...editingFields.value, [fieldName]: true };
10064
+ }
10065
+ function cancelEditing(fieldName) {
10066
+ const data = props.flattenedProfile || props.profile;
10067
+ const originalValue = data?.[fieldName] ?? "";
10068
+ editedValues.value = { ...editedValues.value, [fieldName]: originalValue };
10069
+ editingFields.value = { ...editingFields.value, [fieldName]: false };
10070
+ }
10071
+ function saveField(schema) {
10072
+ if (!props.onUpdate || !schema.name) return;
10073
+ const value = editedValues.value[schema.name] ?? "";
10074
+ const payload = buildScimPatchValue(
10075
+ schema.name,
10076
+ value,
10077
+ schema.schemaId,
10078
+ schema.multiValued
10079
+ );
10080
+ props.onUpdate(payload);
10081
+ editingFields.value = { ...editingFields.value, [schema.name]: false };
10082
+ }
10083
+ function renderInput(schema) {
10084
+ const fieldName = schema.name;
10085
+ const currentValue = editedValues.value[fieldName];
10086
+ switch (schema.type) {
10087
+ case "DATE_TIME":
10088
+ return h54(DatePicker_default, {
10089
+ modelValue: String(currentValue ?? ""),
10090
+ "onUpdate:modelValue": (v) => {
10091
+ editedValues.value = { ...editedValues.value, [fieldName]: v };
10092
+ },
10093
+ placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,
10094
+ required: schema.required
10095
+ });
10096
+ case "BOOLEAN":
10097
+ return h54(Checkbox_default, {
10098
+ label: schema.displayName || fieldName,
10099
+ modelValue: Boolean(currentValue),
10100
+ "onUpdate:modelValue": (v) => {
10101
+ editedValues.value = { ...editedValues.value, [fieldName]: v };
10102
+ }
10103
+ });
10104
+ default:
10105
+ return h54(TextField_default, {
10106
+ modelValue: String(currentValue ?? ""),
10107
+ "onUpdate:modelValue": (v) => {
10108
+ editedValues.value = { ...editedValues.value, [fieldName]: v };
10109
+ },
10110
+ placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,
10111
+ required: schema.required
10112
+ });
9708
10113
  }
9709
- const prefix = withVendorCSSClassPrefix21;
10114
+ }
10115
+ function renderSchemaFieldRow(schema) {
10116
+ const { name, displayName, description, mutability, value } = schema;
10117
+ if (!name || !shouldShowField(name)) return null;
10118
+ const label = displayName || description || formatLabel(name);
10119
+ const isReadonly = mutability === "READ_ONLY" || READONLY_FIELDS.includes(name);
10120
+ const isEditable = Boolean(props.editable) && !isReadonly;
10121
+ const isEditing = Boolean(editingFields.value[name]);
10122
+ const hasValue = value !== void 0 && value !== null && value !== "";
10123
+ if (!hasValue && !isEditing && !(isEditable && mutability === "READ_WRITE")) return null;
10124
+ const editablePlaceholder = isEditable ? h54(
10125
+ "span",
10126
+ { class: px("user-profile__field-placeholder"), onClick: () => startEditing(name, value) },
10127
+ `Enter your ${label.toLowerCase()}`
10128
+ ) : null;
10129
+ const displayValueNode = hasValue ? h54(Typography_default, { class: px("user-profile__field-value"), variant: "body1" }, () => String(value)) : editablePlaceholder;
10130
+ return h54("div", { class: px("user-profile__field"), key: name }, [
10131
+ h54("div", { class: px("user-profile__field-label-col") }, [
10132
+ h54(Typography_default, { class: px("user-profile__field-label"), variant: "body2" }, () => label)
10133
+ ]),
10134
+ h54("div", { class: px("user-profile__field-value-col") }, [
10135
+ isEditing ? h54("div", { class: px("user-profile__field-edit") }, [
10136
+ renderInput(schema),
10137
+ h54("div", { class: px("user-profile__field-edit-actions") }, [
10138
+ h54(
10139
+ Button_default,
10140
+ { onClick: () => saveField(schema), size: "small", variant: "solid" },
10141
+ () => "Save"
10142
+ ),
10143
+ h54(
10144
+ Button_default,
10145
+ { onClick: () => cancelEditing(name), size: "small", variant: "text" },
10146
+ () => "Cancel"
10147
+ )
10148
+ ])
10149
+ ]) : h54("div", { class: px("user-profile__field-display") }, [
10150
+ displayValueNode,
10151
+ isEditable ? h54(
10152
+ "button",
10153
+ {
10154
+ "aria-label": `Edit ${label}`,
10155
+ class: px("user-profile__field-edit-btn"),
10156
+ onClick: () => startEditing(name, value),
10157
+ type: "button"
10158
+ },
10159
+ [h54(PencilIcon)]
10160
+ ) : null
10161
+ ])
10162
+ ])
10163
+ ]);
10164
+ }
10165
+ function renderProfileWithoutSchemas() {
9710
10166
  const data = props.flattenedProfile || props.profile;
9711
- const dataRecord = data;
9712
- const initials = getUserInitials(dataRecord);
10167
+ if (!data) return [];
10168
+ return Object.entries(data).filter(([key, value]) => {
10169
+ if (!shouldShowField(key)) return false;
10170
+ return value !== void 0 && value !== null && value !== "";
10171
+ }).sort(([a], [b]) => a.localeCompare(b)).map(
10172
+ ([key, value]) => h54("div", { class: px("user-profile__field"), key }, [
10173
+ h54("div", { class: px("user-profile__field-label-col") }, [
10174
+ h54(Typography_default, { class: px("user-profile__field-label"), variant: "body2" }, () => formatLabel(key))
10175
+ ]),
10176
+ h54("div", { class: px("user-profile__field-value-col") }, [
10177
+ h54(
10178
+ Typography_default,
10179
+ { class: px("user-profile__field-value"), variant: "body1" },
10180
+ () => typeof value === "object" ? JSON.stringify(value) : String(value)
10181
+ )
10182
+ ])
10183
+ ])
10184
+ );
10185
+ }
10186
+ function renderHero(currentUser) {
10187
+ const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS, currentUser);
10188
+ const email = getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS, currentUser) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS, currentUser);
9713
10189
  const avatarSeed = String(
9714
- (dataRecord && (dataRecord["username"] || dataRecord["userName"] || dataRecord["email"] || dataRecord["sub"])) ?? initials
10190
+ currentUser["username"] || currentUser["userName"] || currentUser["email"] || currentUser["sub"] || displayName
9715
10191
  );
9716
10192
  const avatarGradient = getAvatarGradient(avatarSeed);
9717
- const children = [];
9718
- children.push(
9719
- h54("div", { class: prefix("user-profile__header") }, [
9720
- h54(Typography_default, { class: prefix("user-profile__title"), variant: "h5" }, () => props.title)
9721
- ])
9722
- );
9723
- children.push(h54(Divider_default, { class: prefix("user-profile__header-divider") }));
9724
- children.push(
9725
- h54("div", { class: prefix("user-profile__avatar-section") }, [
10193
+ const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
10194
+ const avatarSizeClass = px(`user-profile__avatar--${props.avatarSize ?? "lg"}`);
10195
+ return h54("div", { class: px("user-profile__hero") }, [
10196
+ h54("div", { class: px("user-profile__avatar-wrapper") }, [
9726
10197
  h54(
9727
10198
  "div",
9728
- {
9729
- class: prefix("user-profile__avatar"),
9730
- style: { background: avatarGradient }
9731
- },
9732
- [h54("span", { class: prefix("user-profile__avatar-initials") }, initials)]
10199
+ { class: [px("user-profile__avatar"), avatarSizeClass].join(" "), style: { background: avatarGradient } },
10200
+ [h54("span", { class: px("user-profile__avatar-initials") }, initials)]
9733
10201
  )
10202
+ ]),
10203
+ h54("div", { class: px("user-profile__hero-info") }, [
10204
+ h54("span", { class: px("user-profile__hero-name") }, displayName),
10205
+ email ? h54("span", { class: px("user-profile__hero-subtitle") }, String(email)) : null
10206
+ ])
10207
+ ]);
10208
+ }
10209
+ return () => {
10210
+ const data = props.flattenedProfile || props.profile;
10211
+ if (!data && !props.isLoading) {
10212
+ return slots["default"] ? slots["default"]({ error: props.error, isLoading: props.isLoading, profile: null }) : null;
10213
+ }
10214
+ if (slots["default"]) {
10215
+ return slots["default"]({ error: props.error, isLoading: props.isLoading, profile: data });
10216
+ }
10217
+ const currentUser = data;
10218
+ const schemas = props.schemas ?? [];
10219
+ const hasSchemas = schemas.length > 0;
10220
+ const rootClasses = [
10221
+ px("user-profile"),
10222
+ props.compact ? px("user-profile--compact") : "",
10223
+ props.className ?? ""
10224
+ ].filter(Boolean).join(" ");
10225
+ const children = [];
10226
+ children.push(
10227
+ h54("div", { class: px("user-profile__header") }, [
10228
+ h54("span", { class: px("user-profile__title") }, props.title ?? "Profile")
9734
10229
  ])
9735
10230
  );
10231
+ children.push(h54(Divider_default, { class: px("user-profile__header-divider") }));
10232
+ if (props.showAvatar !== false && currentUser) {
10233
+ children.push(renderHero(currentUser));
10234
+ }
9736
10235
  if (props.error) {
9737
- children.push(h54(Alert_default, { class: prefix("user-profile__error"), severity: "error" }, () => props.error));
10236
+ children.push(h54(Alert_default, { class: px("user-profile__error"), severity: "error" }, () => props.error));
9738
10237
  }
9739
10238
  if (props.isLoading) {
9740
- children.push(h54("div", { class: prefix("user-profile__loading") }, [h54(Spinner_default)]));
9741
- } else if (data) {
9742
- const fieldDataRecord = data;
9743
- const descriptors = PROFILE_FIELD_DESCRIPTORS.filter((d) => {
9744
- const activeKey = d.keys.find((k) => k in fieldDataRecord);
9745
- const matchKey = activeKey ?? d.keys[0];
9746
- if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(matchKey)) return false;
9747
- if (props.showFields && props.showFields.length > 0 && !props.showFields.some((f) => d.keys.includes(f)))
9748
- return false;
9749
- return true;
9750
- });
9751
- const fieldRows = [];
9752
- descriptors.forEach((descriptor) => {
9753
- const key = descriptor.keys.find((k) => k in fieldDataRecord) ?? descriptor.keys[0];
9754
- const value = fieldDataRecord[key];
9755
- const isReadonly = descriptor.readonly;
9756
- const isEditing = editingFields.value[key];
9757
- const isEmpty2 = value == null || value === "";
9758
- const { label } = descriptor;
9759
- fieldRows.push(
9760
- h54("div", { class: prefix("user-profile__field"), key }, [
9761
- // Label column
9762
- h54("div", { class: prefix("user-profile__field-label-col") }, [
9763
- h54(Typography_default, { class: prefix("user-profile__field-label"), variant: "body2" }, () => label)
9764
- ]),
9765
- // Value column
9766
- h54("div", { class: prefix("user-profile__field-value-col") }, [
9767
- isEditing ? h54("div", { class: prefix("user-profile__field-edit") }, [
9768
- h54(TextField_default, {
9769
- modelValue: editedValues.value[key] ?? String(value ?? ""),
9770
- "onUpdate:modelValue": (v) => {
9771
- editedValues.value = { ...editedValues.value, [key]: v };
9772
- }
9773
- }),
9774
- h54("div", { class: prefix("user-profile__field-edit-actions") }, [
9775
- h54(
9776
- Button_default,
9777
- {
9778
- onClick: async () => {
9779
- if (props.onUpdate) {
9780
- await props.onUpdate({
9781
- payload: buildScimPatchValue(key, editedValues.value[key] ?? "", props.schemas)
9782
- });
9783
- }
9784
- editingFields.value = { ...editingFields.value, [key]: false };
9785
- },
9786
- size: "small",
9787
- variant: "solid"
9788
- },
9789
- () => "Save"
9790
- ),
9791
- h54(
9792
- Button_default,
9793
- {
9794
- onClick: () => {
9795
- editingFields.value = { ...editingFields.value, [key]: false };
9796
- },
9797
- size: "small",
9798
- variant: "text"
9799
- },
9800
- () => "Cancel"
9801
- )
9802
- ])
9803
- ]) : h54("div", { class: prefix("user-profile__field-display") }, [
9804
- isEmpty2 ? h54(
9805
- "span",
9806
- {
9807
- class: prefix("user-profile__field-placeholder"),
9808
- onClick: props.editable && !isReadonly ? () => {
9809
- editingFields.value = { ...editingFields.value, [key]: true };
9810
- editedValues.value = { ...editedValues.value, [key]: "" };
9811
- } : void 0
9812
- },
9813
- `Enter your ${label.toLowerCase()}`
9814
- ) : h54(
9815
- Typography_default,
9816
- { class: prefix("user-profile__field-value"), variant: "body1" },
9817
- () => String(value)
9818
- ),
9819
- props.editable && !isReadonly ? h54(
9820
- "button",
9821
- {
9822
- "aria-label": `Edit ${label}`,
9823
- class: prefix("user-profile__field-edit-btn"),
9824
- onClick: () => {
9825
- editingFields.value = { ...editingFields.value, [key]: true };
9826
- editedValues.value = { ...editedValues.value, [key]: String(value ?? "") };
9827
- },
9828
- type: "button"
9829
- },
9830
- [h54(PencilIcon)]
9831
- ) : null
9832
- ])
9833
- ])
9834
- ])
9835
- );
9836
- });
9837
- children.push(h54("div", { class: prefix("user-profile__fields") }, fieldRows));
10239
+ children.push(h54("div", { class: px("user-profile__loading") }, [h54(Spinner_default)]));
10240
+ } else if (hasSchemas) {
10241
+ const fieldRows = schemas.filter((s) => s.name && shouldShowField(s.name)).sort((a, b) => {
10242
+ const orderA = a.displayOrder ? parseInt(a.displayOrder, 10) : 999;
10243
+ const orderB = b.displayOrder ? parseInt(b.displayOrder, 10) : 999;
10244
+ return orderA - orderB;
10245
+ }).map((schema) => {
10246
+ const value = currentUser && schema.name ? currentUser[schema.name] : void 0;
10247
+ return renderSchemaFieldRow({ ...schema, value });
10248
+ }).filter((node) => node !== null);
10249
+ children.push(h54("div", { class: px("user-profile__fields") }, fieldRows));
10250
+ } else {
10251
+ children.push(h54("div", { class: px("user-profile__fields") }, renderProfileWithoutSchemas()));
9838
10252
  }
9839
10253
  if (slots["footer"]) {
9840
- children.push(h54("div", { class: prefix("user-profile__footer") }, slots["footer"]()));
10254
+ children.push(h54("div", { class: px("user-profile__footer") }, slots["footer"]()));
9841
10255
  }
9842
10256
  if (props.cardLayout) {
9843
- return h54(Card_default, { class: [prefix("user-profile"), props.className].filter(Boolean).join(" ") }, () => children);
10257
+ return h54(Card_default, { class: rootClasses, variant: props.cardVariant ?? "elevated" }, () => children);
9844
10258
  }
9845
- return h54("div", { class: [prefix("user-profile"), props.className].filter(Boolean).join(" ") }, children);
10259
+ return h54("div", { class: rootClasses }, children);
9846
10260
  };
9847
10261
  }
9848
10262
  });
9849
10263
  var BaseUserProfile_default = BaseUserProfile;
9850
10264
 
10265
+ // src/api/updateMeProfile.ts
10266
+ import {
10267
+ AsgardeoSPAClient as AsgardeoSPAClient6,
10268
+ updateMeProfile as baseUpdateMeProfile
10269
+ } from "@asgardeo/browser";
10270
+ var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
10271
+ const defaultFetcher = async (url, config) => {
10272
+ const client = AsgardeoSPAClient6.getInstance(instanceId);
10273
+ const httpClient = client.httpRequest.bind(client);
10274
+ const response = await httpClient({
10275
+ data: config.body ? JSON.parse(config.body) : void 0,
10276
+ headers: config.headers,
10277
+ method: config.method || "PATCH",
10278
+ url
10279
+ });
10280
+ return {
10281
+ json: () => Promise.resolve(response.data),
10282
+ ok: response.status >= 200 && response.status < 300,
10283
+ status: response.status,
10284
+ statusText: response.statusText || "",
10285
+ text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
10286
+ };
10287
+ };
10288
+ return baseUpdateMeProfile({
10289
+ ...requestConfig,
10290
+ fetcher: fetcher || defaultFetcher
10291
+ });
10292
+ };
10293
+ var updateMeProfile_default = updateMeProfile;
10294
+
9851
10295
  // src/components/presentation/user-profile/UserProfile.ts
9852
10296
  var UserProfile3 = defineComponent52({
9853
10297
  name: "UserProfile",
9854
10298
  props: {
10299
+ /** Avatar circle size. */
10300
+ avatarSize: {
10301
+ default: "lg",
10302
+ type: String
10303
+ },
10304
+ /** Whether to render the component inside a Card wrapper. */
9855
10305
  cardLayout: { default: true, type: Boolean },
10306
+ /** Shadow / border style of the card wrapper. */
10307
+ cardVariant: {
10308
+ default: "elevated",
10309
+ type: String
10310
+ },
10311
+ /** Extra CSS class added to the root element. */
9856
10312
  className: { default: "", type: String },
10313
+ /** Tighter spacing — useful when embedded in a modal or dropdown. */
10314
+ compact: { default: false, type: Boolean },
10315
+ /** Whether fields can be edited inline. */
9857
10316
  editable: { default: true, type: Boolean },
10317
+ /** Fields to hide by name. */
9858
10318
  hideFields: { default: () => [], type: Array },
10319
+ /** Whether to render the avatar hero section. */
10320
+ showAvatar: { default: true, type: Boolean },
10321
+ /** Fields to show exclusively (empty = show all). */
9859
10322
  showFields: { default: () => [], type: Array },
10323
+ /** Card header title. */
9860
10324
  title: { default: "Profile", type: String }
9861
10325
  },
9862
10326
  setup(props, { slots }) {
9863
- const { flattenedProfile, schemas, updateProfile } = useUser_default();
10327
+ const { baseUrl, instanceId } = useAsgardeo_default();
10328
+ const { flattenedProfile, profile, schemas, onUpdateProfile } = useUser_default();
10329
+ const { t } = useI18n_default();
10330
+ const error = ref20(null);
10331
+ async function handleProfileUpdate(payload) {
10332
+ if (!baseUrl) return;
10333
+ error.value = null;
10334
+ try {
10335
+ const response = await updateMeProfile_default({ baseUrl, instanceId, payload });
10336
+ onUpdateProfile(response);
10337
+ } catch (caughtError) {
10338
+ let message = t("user.profile.update.generic.error") || "Failed to update profile. Please try again.";
10339
+ if (caughtError instanceof AsgardeoError) {
10340
+ message = caughtError.message;
10341
+ }
10342
+ error.value = message;
10343
+ }
10344
+ }
9864
10345
  return () => h55(
9865
10346
  BaseUserProfile_default,
9866
10347
  {
10348
+ avatarSize: props.avatarSize,
9867
10349
  cardLayout: props.cardLayout,
10350
+ cardVariant: props.cardVariant,
9868
10351
  class: withVendorCSSClassPrefix22("user-profile--styled"),
9869
10352
  className: props.className,
10353
+ compact: props.compact,
9870
10354
  editable: props.editable,
10355
+ error: error.value,
9871
10356
  flattenedProfile: flattenedProfile?.value,
9872
10357
  hideFields: props.hideFields,
9873
- onUpdate: updateProfile,
10358
+ onUpdate: handleProfileUpdate,
10359
+ profile: profile?.value?.profile ?? flattenedProfile?.value,
9874
10360
  schemas: schemas?.value,
10361
+ showAvatar: props.showAvatar,
9875
10362
  showFields: props.showFields,
9876
10363
  title: props.title
9877
10364
  },
@@ -9883,26 +10370,111 @@ var UserProfile_default = UserProfile3;
9883
10370
 
9884
10371
  // src/components/presentation/user-dropdown/UserDropdown.ts
9885
10372
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix24 } from "@asgardeo/browser";
9886
- import { defineComponent as defineComponent54, h as h57, ref as ref21 } from "vue";
10373
+ import { defineComponent as defineComponent54, h as h57, ref as ref22 } from "vue";
9887
10374
 
9888
10375
  // src/components/presentation/user-dropdown/BaseUserDropdown.ts
9889
10376
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix23 } from "@asgardeo/browser";
9890
- import { defineComponent as defineComponent53, h as h56, ref as ref20 } from "vue";
10377
+ import {
10378
+ defineComponent as defineComponent53,
10379
+ h as h56,
10380
+ onMounted as onMounted6,
10381
+ onUnmounted as onUnmounted3,
10382
+ ref as ref21
10383
+ } from "vue";
10384
+ var DEFAULT_ATTRIBUTE_MAPPINGS2 = {
10385
+ email: ["emails", "email"],
10386
+ firstName: ["name.givenName", "given_name"],
10387
+ lastName: ["name.familyName", "family_name"],
10388
+ username: ["userName", "username", "user_name"]
10389
+ };
10390
+ var MENU_MIN_WIDTHS = { lg: 280, md: 220, sm: 180 };
10391
+ var AVATAR_GRADIENTS2 = [
10392
+ "linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)",
10393
+ "linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)",
10394
+ "linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)",
10395
+ "linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
10396
+ "linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)",
10397
+ "linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)",
10398
+ "linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
10399
+ "linear-gradient(135deg, #f97316 0%, #ec4899 100%)"
10400
+ ];
10401
+ function getAvatarGradient2(seed) {
10402
+ if (!seed) return AVATAR_GRADIENTS2[0];
10403
+ let hash = 0;
10404
+ for (let i = 0; i < seed.length; i += 1) {
10405
+ hash = hash * 31 + seed.charCodeAt(i) >>> 0;
10406
+ }
10407
+ return AVATAR_GRADIENTS2[Math.abs(hash) % AVATAR_GRADIENTS2.length];
10408
+ }
10409
+ function resolveUserInfo(user) {
10410
+ if (!user) {
10411
+ return { displayName: "User", gradient: AVATAR_GRADIENTS2[0], initials: "?", subtitle: "" };
10412
+ }
10413
+ const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS2, user) || "User";
10414
+ const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
10415
+ const seed = String(
10416
+ getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || displayName
10417
+ );
10418
+ const subtitle = String(
10419
+ getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || ""
10420
+ );
10421
+ return { displayName, gradient: getAvatarGradient2(seed), initials, subtitle };
10422
+ }
9891
10423
  var BaseUserDropdown = defineComponent53({
9892
10424
  inheritAttrs: false,
9893
10425
  name: "BaseUserDropdown",
9894
10426
  props: {
9895
10427
  className: { default: "", type: String },
9896
10428
  isProfileModalOpen: { default: false, type: Boolean },
10429
+ /**
10430
+ * How to align the dropdown panel relative to the trigger.
10431
+ * - `'auto'` (default) — opens toward the side with more viewport space.
10432
+ * - `'left'` — panel left edge aligns with trigger left edge.
10433
+ * - `'right'` — panel right edge aligns with trigger right edge.
10434
+ */
10435
+ menuAlign: { default: "auto", type: String },
10436
+ /**
10437
+ * Extra items rendered between the Profile link and Sign Out.
10438
+ * Each item can carry an icon, a danger flag, and a separatorBefore flag.
10439
+ */
10440
+ menuItems: { default: void 0, type: Array },
9897
10441
  onProfileClick: { default: void 0, type: Function },
9898
10442
  onProfileModalClose: { default: void 0, type: Function },
9899
10443
  onSignOut: { default: void 0, type: Function },
9900
10444
  profileContent: { default: null, type: Object },
10445
+ /** Show the animated chevron on the trigger. Default `false`. */
10446
+ showChevron: { default: false, type: Boolean },
10447
+ /** Controls avatar size on the trigger and spacing density of the menu. */
10448
+ size: { default: "md", type: String },
9901
10449
  user: { default: null, type: Object }
9902
10450
  },
9903
10451
  setup(props, { slots }) {
9904
- const isOpen = ref20(false);
9905
- const prefix = withVendorCSSClassPrefix23;
10452
+ const isOpen = ref21(false);
10453
+ const containerRef = ref21(null);
10454
+ const px = withVendorCSSClassPrefix23;
10455
+ function handleClickOutside(event) {
10456
+ if (containerRef.value && !containerRef.value.contains(event.target)) {
10457
+ isOpen.value = false;
10458
+ }
10459
+ }
10460
+ function handleKeyDown(event) {
10461
+ if (event.key === "Escape") isOpen.value = false;
10462
+ }
10463
+ onMounted6(() => {
10464
+ document.addEventListener("click", handleClickOutside);
10465
+ document.addEventListener("keydown", handleKeyDown);
10466
+ });
10467
+ onUnmounted3(() => {
10468
+ document.removeEventListener("click", handleClickOutside);
10469
+ document.removeEventListener("keydown", handleKeyDown);
10470
+ });
10471
+ function resolveMenuAlign() {
10472
+ if (props.menuAlign !== "auto") return props.menuAlign;
10473
+ if (!containerRef.value) return "right";
10474
+ const rect = containerRef.value.getBoundingClientRect();
10475
+ const menuWidth = MENU_MIN_WIDTHS[props.size ?? "md"] ?? 220;
10476
+ return window.innerWidth - rect.right >= menuWidth ? "right" : "left";
10477
+ }
9906
10478
  return () => {
9907
10479
  if (slots["default"]) {
9908
10480
  return slots["default"]({
@@ -9913,85 +10485,148 @@ var BaseUserDropdown = defineComponent53({
9913
10485
  user: props.user
9914
10486
  });
9915
10487
  }
9916
- const resolveDisplayName = () => {
9917
- if (!props.user) return void 0;
9918
- const { displayName: displayName2, name, email, username, sub } = props.user;
9919
- if (typeof displayName2 === "string") return displayName2;
9920
- if (typeof name === "string") return name;
9921
- if (typeof name === "object" && name) {
9922
- const parts = [name.givenName, name.familyName].filter(Boolean);
9923
- if (parts.length > 0) return parts.join(" ");
9924
- }
9925
- if (typeof email === "string") return email;
9926
- if (typeof username === "string") return username;
9927
- if (typeof sub === "string") return sub;
9928
- return void 0;
9929
- };
9930
- const displayName = resolveDisplayName();
9931
- const children = [];
9932
- children.push(
9933
- h56(
9934
- "button",
9935
- {
9936
- class: prefix("user-dropdown__trigger"),
9937
- onClick: () => {
9938
- isOpen.value = !isOpen.value;
9939
- },
9940
- type: "button"
10488
+ const { displayName, initials, gradient, subtitle } = resolveUserInfo(props.user ?? null);
10489
+ const size = props.size ?? "md";
10490
+ const avatarSizeClass = size !== "md" ? px(`user-dropdown__avatar--${size}`) : "";
10491
+ const triggerClass = [
10492
+ px("user-dropdown__trigger"),
10493
+ isOpen.value ? px("user-dropdown__trigger--open") : ""
10494
+ ].filter(Boolean).join(" ");
10495
+ const trigger = h56(
10496
+ "button",
10497
+ {
10498
+ "aria-expanded": isOpen.value,
10499
+ "aria-haspopup": "true",
10500
+ class: triggerClass,
10501
+ onClick: (e) => {
10502
+ e.stopPropagation();
10503
+ isOpen.value = !isOpen.value;
9941
10504
  },
9942
- [
9943
- h56("span", { class: prefix("user-dropdown__avatar") }, [h56(UserIcon, { size: 20 })]),
9944
- displayName ? h56(Typography_default, { class: prefix("user-dropdown__name"), variant: "body2" }, () => displayName) : null,
9945
- h56(ChevronDownIcon, { size: 16 })
9946
- ]
9947
- )
10505
+ type: "button"
10506
+ },
10507
+ [
10508
+ h56(
10509
+ "span",
10510
+ {
10511
+ class: [px("user-dropdown__avatar"), avatarSizeClass].filter(Boolean).join(" "),
10512
+ style: { background: gradient }
10513
+ },
10514
+ initials
10515
+ ),
10516
+ props.showChevron ? h56("span", { class: px("user-dropdown__chevron") }, [h56(ChevronDownIcon, { size: 14 })]) : null
10517
+ ]
9948
10518
  );
10519
+ let menu = null;
9949
10520
  if (isOpen.value) {
9950
- const menuItems = [];
9951
- if (props.onProfileClick) {
9952
- menuItems.push(
9953
- h56("button", { class: prefix("user-dropdown__item"), onClick: props.onProfileClick, type: "button" }, [
9954
- h56(UserIcon, { size: 16 }),
9955
- h56("span", null, "Profile")
10521
+ const resolvedAlign = resolveMenuAlign();
10522
+ const alignClass = resolvedAlign === "left" ? px("user-dropdown__menu--align-left") : "";
10523
+ const sizeClass = size !== "md" ? px(`user-dropdown__menu--size-${size}`) : "";
10524
+ const menuClass = [px("user-dropdown__menu"), alignClass, sizeClass].filter(Boolean).join(" ");
10525
+ const menuChildren = [];
10526
+ menuChildren.push(
10527
+ h56("div", { class: px("user-dropdown__menu-header") }, [
10528
+ h56("div", { class: px("user-dropdown__menu-header-avatar"), style: { background: gradient } }, initials),
10529
+ h56("div", { class: px("user-dropdown__menu-header-info") }, [
10530
+ h56("span", { class: px("user-dropdown__menu-header-name") }, displayName),
10531
+ subtitle ? h56("span", { class: px("user-dropdown__menu-header-subtitle") }, subtitle) : null
9956
10532
  ])
10533
+ ])
10534
+ );
10535
+ menuChildren.push(h56("div", { class: px("user-dropdown__menu-divider") }));
10536
+ if (props.onProfileClick) {
10537
+ menuChildren.push(
10538
+ h56(
10539
+ "button",
10540
+ {
10541
+ class: px("user-dropdown__item"),
10542
+ onClick: () => {
10543
+ isOpen.value = false;
10544
+ props.onProfileClick();
10545
+ },
10546
+ type: "button"
10547
+ },
10548
+ [h56(UserIcon, { size: 15 }), h56("span", null, "Profile")]
10549
+ )
9957
10550
  );
9958
10551
  }
10552
+ if (props.menuItems && props.menuItems.length > 0) {
10553
+ props.menuItems.forEach((item, idx) => {
10554
+ if (item.separatorBefore) {
10555
+ menuChildren.push(h56("div", { class: px("user-dropdown__menu-divider"), key: `sep-${idx}` }));
10556
+ }
10557
+ menuChildren.push(
10558
+ h56(
10559
+ "button",
10560
+ {
10561
+ class: [px("user-dropdown__item"), item.danger ? px("user-dropdown__item--danger") : ""].filter(Boolean).join(" "),
10562
+ key: `item-${idx}`,
10563
+ onClick: () => {
10564
+ isOpen.value = false;
10565
+ item.onClick();
10566
+ },
10567
+ type: "button"
10568
+ },
10569
+ [item.icon ?? null, h56("span", null, item.label)]
10570
+ )
10571
+ );
10572
+ });
10573
+ }
9959
10574
  if (slots["items"]) {
9960
- menuItems.push(...slots["items"]() ?? []);
10575
+ menuChildren.push(...slots["items"]() ?? []);
9961
10576
  }
9962
10577
  if (props.onSignOut) {
9963
- menuItems.push(
9964
- h56("button", { class: prefix("user-dropdown__item"), onClick: props.onSignOut, type: "button" }, [
9965
- h56(LogOutIcon, { size: 16 }),
9966
- h56("span", null, "Sign Out")
9967
- ])
10578
+ menuChildren.push(h56("div", { class: px("user-dropdown__menu-divider") }));
10579
+ menuChildren.push(
10580
+ h56(
10581
+ "button",
10582
+ {
10583
+ class: [px("user-dropdown__item"), px("user-dropdown__item--danger")].join(" "),
10584
+ onClick: () => {
10585
+ isOpen.value = false;
10586
+ props.onSignOut();
10587
+ },
10588
+ type: "button"
10589
+ },
10590
+ [h56(LogOutIcon, { size: 15 }), h56("span", null, "Sign Out")]
10591
+ )
9968
10592
  );
9969
10593
  }
9970
- children.push(h56("div", { class: prefix("user-dropdown__menu") }, menuItems));
10594
+ menu = h56("div", { class: menuClass }, menuChildren.filter(Boolean));
9971
10595
  }
9972
10596
  const container = h56(
9973
10597
  "div",
9974
- { class: [prefix("user-dropdown"), props.className].filter(Boolean).join(" ") },
9975
- children
10598
+ { class: [px("user-dropdown"), props.className].filter(Boolean).join(" "), ref: containerRef },
10599
+ [trigger, menu]
9976
10600
  );
9977
10601
  if (props.isProfileModalOpen) {
9978
10602
  return h56("div", [
9979
10603
  container,
9980
- h56("div", { class: prefix("user-dropdown__modal-overlay") }, [
9981
- h56("div", { class: prefix("user-dropdown__modal-content") }, [
9982
- h56(
9983
- "button",
9984
- {
9985
- "aria-label": "Close profile modal",
9986
- class: prefix("user-dropdown__modal-close"),
9987
- onClick: props.onProfileModalClose,
9988
- type: "button"
9989
- },
9990
- [h56(XIcon, { size: 24 })]
9991
- ),
9992
- props.profileContent
9993
- ])
9994
- ])
10604
+ h56(
10605
+ "div",
10606
+ {
10607
+ class: px("user-dropdown__modal-overlay"),
10608
+ onClick: (e) => {
10609
+ if (e.target.classList.contains(px("user-dropdown__modal-overlay"))) {
10610
+ props.onProfileModalClose?.();
10611
+ }
10612
+ }
10613
+ },
10614
+ [
10615
+ h56("div", { class: px("user-dropdown__modal-content") }, [
10616
+ h56(
10617
+ "button",
10618
+ {
10619
+ "aria-label": "Close profile",
10620
+ class: px("user-dropdown__modal-close"),
10621
+ onClick: props.onProfileModalClose,
10622
+ type: "button"
10623
+ },
10624
+ [h56(XIcon, { size: 18 })]
10625
+ ),
10626
+ props.profileContent
10627
+ ])
10628
+ ]
10629
+ )
9995
10630
  ]);
9996
10631
  }
9997
10632
  return container;
@@ -10005,20 +10640,52 @@ var UserDropdown = defineComponent54({
10005
10640
  emits: ["profileClick"],
10006
10641
  name: "UserDropdown",
10007
10642
  props: {
10008
- className: {
10009
- default: "",
10643
+ /** Extra CSS class added to the root element. */
10644
+ className: { default: "", type: String },
10645
+ /**
10646
+ * How to align the dropdown panel relative to the trigger button.
10647
+ * - `'auto'` (default) — picks the side with more available viewport space at open time.
10648
+ * - `'left'` — panel left edge aligns with trigger left edge.
10649
+ * - `'right'` — panel right edge aligns with trigger right edge.
10650
+ */
10651
+ menuAlign: {
10652
+ default: "auto",
10653
+ type: String
10654
+ },
10655
+ /**
10656
+ * Extra items inserted between the Profile link and Sign Out.
10657
+ * Set `separatorBefore: true` on any item to add a divider line before it.
10658
+ * Set `danger: true` for destructive actions (red styling).
10659
+ * Pass an `icon` VNode to render an icon to the left of the label.
10660
+ */
10661
+ menuItems: {
10662
+ default: void 0,
10663
+ type: Array
10664
+ },
10665
+ /** Whether to show the animated down-chevron beside the avatar. Default `false`. */
10666
+ showChevron: { default: false, type: Boolean },
10667
+ /**
10668
+ * Overall density / avatar size of the component.
10669
+ * - `'sm'` — 28 px avatar, compact menu (180 px min-width).
10670
+ * - `'md'` (default) — 32 px avatar, standard menu (220 px min-width).
10671
+ * - `'lg'` — 38 px avatar, spacious menu (280 px min-width).
10672
+ */
10673
+ size: {
10674
+ default: "md",
10010
10675
  type: String
10011
10676
  }
10012
10677
  },
10013
10678
  setup(props, { slots, emit }) {
10014
10679
  const { user, signOut } = useAsgardeo_default();
10015
- const isProfileModalOpen = ref21(false);
10680
+ const isProfileModalOpen = ref22(false);
10016
10681
  return () => h57(
10017
10682
  BaseUserDropdown_default,
10018
10683
  {
10019
10684
  class: withVendorCSSClassPrefix24("user-dropdown--styled"),
10020
10685
  className: props.className,
10021
10686
  isProfileModalOpen: isProfileModalOpen.value,
10687
+ menuAlign: props.menuAlign,
10688
+ menuItems: props.menuItems,
10022
10689
  onProfileClick: () => {
10023
10690
  isProfileModalOpen.value = true;
10024
10691
  emit("profileClick");
@@ -10031,8 +10698,11 @@ var UserDropdown = defineComponent54({
10031
10698
  },
10032
10699
  profileContent: isProfileModalOpen.value ? h57(UserProfile_default, {
10033
10700
  cardLayout: false,
10701
+ compact: true,
10034
10702
  editable: true
10035
10703
  }) : null,
10704
+ showChevron: props.showChevron,
10705
+ size: props.size,
10036
10706
  user: user.value
10037
10707
  },
10038
10708
  slots
@@ -10049,7 +10719,7 @@ import { withVendorCSSClassPrefix as withVendorCSSClassPrefix25 } from "@asgarde
10049
10719
  import {
10050
10720
  defineComponent as defineComponent55,
10051
10721
  h as h58,
10052
- ref as ref22,
10722
+ ref as ref23,
10053
10723
  watch as watch12
10054
10724
  } from "vue";
10055
10725
  var BaseAcceptInvite = defineComponent55({
@@ -10077,17 +10747,17 @@ var BaseAcceptInvite = defineComponent55({
10077
10747
  setup(props, { slots }) {
10078
10748
  const { meta: metaRef } = useFlowMeta_default();
10079
10749
  const { t } = useI18n_default();
10080
- const isLoading = ref22(false);
10081
- const isValidatingToken = ref22(true);
10082
- const isTokenInvalid = ref22(false);
10083
- const isComplete = ref22(false);
10084
- const currentFlow = ref22(null);
10085
- const apiError = ref22(null);
10086
- const completionTitle = ref22(void 0);
10087
- const formValues = ref22({});
10088
- const formErrors = ref22({});
10089
- const touchedFields = ref22({});
10090
- const isFormValid = ref22(true);
10750
+ const isLoading = ref23(false);
10751
+ const isValidatingToken = ref23(true);
10752
+ const isTokenInvalid = ref23(false);
10753
+ const isComplete = ref23(false);
10754
+ const currentFlow = ref23(null);
10755
+ const apiError = ref23(null);
10756
+ const completionTitle = ref23(void 0);
10757
+ const formValues = ref23({});
10758
+ const formErrors = ref23({});
10759
+ const touchedFields = ref23({});
10760
+ const isFormValid = ref23(true);
10091
10761
  let tokenValidationAttempted = false;
10092
10762
  const handleError = (error) => {
10093
10763
  const errorMessage = error?.failureReason || extractErrorMessage(error, t, "components.acceptInvite.errors.generic");
@@ -10109,8 +10779,8 @@ var BaseAcceptInvite = defineComponent55({
10109
10779
  }
10110
10780
  };
10111
10781
  useOAuthCallback({
10112
- currentFlowId: ref22(props.flowId ?? null),
10113
- isInitialized: ref22(true),
10782
+ currentFlowId: ref23(props.flowId ?? null),
10783
+ isInitialized: ref23(true),
10114
10784
  onComplete: () => {
10115
10785
  isComplete.value = true;
10116
10786
  isValidatingToken.value = false;
@@ -10486,7 +11156,7 @@ import { EmbeddedFlowType as EmbeddedFlowType4, withVendorCSSClassPrefix as with
10486
11156
  import {
10487
11157
  defineComponent as defineComponent57,
10488
11158
  h as h60,
10489
- ref as ref23,
11159
+ ref as ref24,
10490
11160
  watch as watch13
10491
11161
  } from "vue";
10492
11162
  var BaseInviteUser = defineComponent57({
@@ -10519,17 +11189,17 @@ var BaseInviteUser = defineComponent57({
10519
11189
  setup(props, { slots }) {
10520
11190
  const { meta: metaRef } = useFlowMeta_default();
10521
11191
  const { t } = useI18n_default();
10522
- const isLoading = ref23(false);
10523
- const isFlowInitialized = ref23(false);
10524
- const currentFlow = ref23(null);
10525
- const apiError = ref23(null);
10526
- const formValues = ref23({});
10527
- const formErrors = ref23({});
10528
- const touchedFields = ref23({});
10529
- const isFormValid = ref23(true);
10530
- const inviteLink = ref23(void 0);
10531
- const inviteLinkCopied = ref23(false);
10532
- const emailSent = ref23(false);
11192
+ const isLoading = ref24(false);
11193
+ const isFlowInitialized = ref24(false);
11194
+ const currentFlow = ref24(null);
11195
+ const apiError = ref24(null);
11196
+ const formValues = ref24({});
11197
+ const formErrors = ref24({});
11198
+ const touchedFields = ref24({});
11199
+ const isFormValid = ref24(true);
11200
+ const inviteLink = ref24(void 0);
11201
+ const inviteLinkCopied = ref24(false);
11202
+ const emailSent = ref24(false);
10533
11203
  let initializationAttempted = false;
10534
11204
  const handleError = (error) => {
10535
11205
  const errorMessage = error?.failureReason || extractErrorMessage(error, t, "components.inviteUser.errors.generic");
@@ -10996,7 +11666,7 @@ import { defineComponent as defineComponent62, h as h65 } from "vue";
10996
11666
 
10997
11667
  // src/components/presentation/organization-profile/BaseOrganizationProfile.ts
10998
11668
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix29 } from "@asgardeo/browser";
10999
- import { defineComponent as defineComponent61, h as h64, ref as ref24 } from "vue";
11669
+ import { defineComponent as defineComponent61, h as h64, ref as ref25 } from "vue";
11000
11670
  var ORG_AVATAR_GRADIENTS = [
11001
11671
  "linear-gradient(135deg, #22d3ee 0%, #2dd4bf 100%)",
11002
11672
  "linear-gradient(135deg, #34d399 0%, #059669 100%)",
@@ -11041,10 +11711,10 @@ var BaseOrganizationProfile = defineComponent61({
11041
11711
  title: { default: "Organization Profile", type: String }
11042
11712
  },
11043
11713
  setup(props, { slots }) {
11044
- const editingName = ref24(false);
11045
- const editingDescription = ref24(false);
11046
- const editedName = ref24("");
11047
- const editedDescription = ref24("");
11714
+ const editingName = ref25(false);
11715
+ const editingDescription = ref25(false);
11716
+ const editedName = ref25("");
11717
+ const editedDescription = ref25("");
11048
11718
  return () => {
11049
11719
  if (slots["default"]) {
11050
11720
  return slots["default"]({ organization: props.organization });
@@ -11350,7 +12020,7 @@ import { defineComponent as defineComponent64, h as h67 } from "vue";
11350
12020
 
11351
12021
  // src/components/presentation/organization-switcher/BaseOrganizationSwitcher.ts
11352
12022
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix31 } from "@asgardeo/browser";
11353
- import { defineComponent as defineComponent63, h as h66, ref as ref25 } from "vue";
12023
+ import { defineComponent as defineComponent63, h as h66, ref as ref26 } from "vue";
11354
12024
  var cls = (name) => withVendorCSSClassPrefix31(`organization-switcher${name}`);
11355
12025
  var BaseOrganizationSwitcher = defineComponent63({
11356
12026
  inheritAttrs: false,
@@ -11363,7 +12033,7 @@ var BaseOrganizationSwitcher = defineComponent63({
11363
12033
  organizations: { default: () => [], type: Array }
11364
12034
  },
11365
12035
  setup(props, { slots }) {
11366
- const isOpen = ref25(false);
12036
+ const isOpen = ref26(false);
11367
12037
  const toggle = () => {
11368
12038
  isOpen.value = !isOpen.value;
11369
12039
  };
@@ -11460,7 +12130,7 @@ import { defineComponent as defineComponent66, h as h69 } from "vue";
11460
12130
 
11461
12131
  // src/components/presentation/create-organization/BaseCreateOrganization.ts
11462
12132
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix33 } from "@asgardeo/browser";
11463
- import { defineComponent as defineComponent65, h as h68, ref as ref26 } from "vue";
12133
+ import { defineComponent as defineComponent65, h as h68, ref as ref27 } from "vue";
11464
12134
  var cls2 = (name) => withVendorCSSClassPrefix33(`create-organization${name}`);
11465
12135
  var BaseCreateOrganization = defineComponent65({
11466
12136
  name: "BaseCreateOrganization",
@@ -11471,9 +12141,9 @@ var BaseCreateOrganization = defineComponent65({
11471
12141
  title: { default: "Create Organization", type: String }
11472
12142
  },
11473
12143
  setup(props, { slots }) {
11474
- const orgName = ref26("");
11475
- const isSubmitting = ref26(false);
11476
- const error = ref26(null);
12144
+ const orgName = ref27("");
12145
+ const isSubmitting = ref27(false);
12146
+ const error = ref27(null);
11477
12147
  const handleSubmit = async () => {
11478
12148
  const name = orgName.value.trim();
11479
12149
  if (!name) {
@@ -11567,7 +12237,7 @@ import { defineComponent as defineComponent68, h as h71 } from "vue";
11567
12237
 
11568
12238
  // src/components/presentation/language-switcher/BaseLanguageSwitcher.ts
11569
12239
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix35 } from "@asgardeo/browser";
11570
- import { defineComponent as defineComponent67, h as h70, ref as ref27 } from "vue";
12240
+ import { defineComponent as defineComponent67, h as h70, ref as ref28 } from "vue";
11571
12241
  var cls3 = (name) => withVendorCSSClassPrefix35(`language-switcher${name}`);
11572
12242
  var BaseLanguageSwitcher = defineComponent67({
11573
12243
  name: "BaseLanguageSwitcher",
@@ -11578,7 +12248,7 @@ var BaseLanguageSwitcher = defineComponent67({
11578
12248
  onLanguageChange: { default: void 0, type: Function }
11579
12249
  },
11580
12250
  setup(props, { slots }) {
11581
- const isOpen = ref27(false);
12251
+ const isOpen = ref28(false);
11582
12252
  const toggle = () => {
11583
12253
  isOpen.value = !isOpen.value;
11584
12254
  };
@@ -11884,7 +12554,7 @@ export {
11884
12554
  Logo_default as Logo,
11885
12555
  MicrosoftButton_default as MicrosoftButton,
11886
12556
  ORGANIZATION_KEY,
11887
- Organization_default as OrganizationComponent,
12557
+ Organization_default as Organization,
11888
12558
  OrganizationList_default as OrganizationList,
11889
12559
  OrganizationProfile_default as OrganizationProfile,
11890
12560
  OrganizationProvider_default as OrganizationProvider,
@@ -11908,7 +12578,7 @@ export {
11908
12578
  TriangleAlertIcon,
11909
12579
  Typography_default as Typography,
11910
12580
  USER_KEY,
11911
- User_default as UserComponent,
12581
+ User_default as User,
11912
12582
  UserDropdown_default as UserDropdown,
11913
12583
  UserIcon,
11914
12584
  UserProfile_default as UserProfile,