@asgardeo/react 0.5.33 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -63,7 +63,8 @@ import {
63
63
  navigate,
64
64
  getRedirectBasedSignUpUrl,
65
65
  Platform,
66
- isEmpty
66
+ isEmpty,
67
+ executeEmbeddedSignUpFlowV2
67
68
  } from "@asgardeo/browser";
68
69
 
69
70
  // src/__temp__/api.ts
@@ -778,16 +779,22 @@ var AsgardeoReactClient = class extends AsgardeoBrowserClient {
778
779
  return Promise.resolve(String(response));
779
780
  }
780
781
  async signUp(...args) {
781
- const configData = await this.asgardeo.getConfigData();
782
+ const config = await this.asgardeo.getConfigData();
782
783
  const firstArg = args[0];
784
+ const baseUrl = config?.baseUrl;
785
+ if (config.platform === Platform.AsgardeoV2) {
786
+ return executeEmbeddedSignUpFlowV2({
787
+ baseUrl,
788
+ payload: firstArg
789
+ });
790
+ }
783
791
  if (typeof firstArg === "object" && "flowType" in firstArg) {
784
- const baseUrl = configData?.baseUrl;
785
792
  return executeEmbeddedSignUpFlow({
786
793
  baseUrl,
787
794
  payload: firstArg
788
795
  });
789
796
  }
790
- navigate(getRedirectBasedSignUpUrl(configData));
797
+ navigate(getRedirectBasedSignUpUrl(config));
791
798
  }
792
799
  async request(requestConfig) {
793
800
  return this.asgardeo.httpRequest(requestConfig);
@@ -1283,6 +1290,7 @@ var ThemeProvider = ({
1283
1290
  };
1284
1291
  }, [inheritFromBranding, brandingTheme, themeConfig]);
1285
1292
  const theme = useMemo4(() => createTheme(finalThemeConfig, colorScheme === "dark"), [finalThemeConfig, colorScheme]);
1293
+ const direction = finalThemeConfig?.direction || "ltr";
1286
1294
  const handleThemeChange = useCallback4((isDark) => {
1287
1295
  setColorScheme(isDark ? "dark" : "light");
1288
1296
  }, []);
@@ -1321,9 +1329,15 @@ var ThemeProvider = ({
1321
1329
  useEffect2(() => {
1322
1330
  applyThemeToDOM(theme);
1323
1331
  }, [theme]);
1332
+ useEffect2(() => {
1333
+ if (typeof document !== "undefined") {
1334
+ document.documentElement.dir = direction;
1335
+ }
1336
+ }, [direction]);
1324
1337
  const value = {
1325
1338
  theme,
1326
1339
  colorScheme,
1340
+ direction,
1327
1341
  toggleTheme,
1328
1342
  isBrandingLoading,
1329
1343
  brandingError,
@@ -1785,7 +1799,10 @@ var AsgardeoProvider = ({
1785
1799
  ThemeProvider_default,
1786
1800
  {
1787
1801
  inheritFromBranding: preferences?.theme?.inheritFromBranding,
1788
- theme: preferences?.theme?.overrides,
1802
+ theme: {
1803
+ ...preferences?.theme?.overrides,
1804
+ direction: preferences?.theme?.direction
1805
+ },
1789
1806
  mode: getActiveTheme(preferences?.theme?.mode),
1790
1807
  children: /* @__PURE__ */ jsx7(FlowProvider_default, { children: /* @__PURE__ */ jsx7(UserProvider_default, { profile: userProfile, onUpdateProfile: handleProfileUpdate, children: /* @__PURE__ */ jsx7(
1791
1808
  OrganizationProvider_default,
@@ -2889,6 +2906,11 @@ var Loading = ({ children, fallback = null }) => {
2889
2906
  Loading.displayName = "Loading";
2890
2907
  var Loading_default = Loading;
2891
2908
 
2909
+ // src/components/presentation/SignIn/BaseSignIn.tsx
2910
+ import {
2911
+ Platform as Platform3
2912
+ } from "@asgardeo/browser";
2913
+
2892
2914
  // src/components/presentation/SignIn/non-component-driven/BaseSignIn.tsx
2893
2915
  import {
2894
2916
  EmbeddedSignInFlowStepType,
@@ -3288,13 +3310,13 @@ import { useMemo as useMemo11 } from "react";
3288
3310
  var useStyles4 = (theme, colorScheme, helperTextAlign, helperTextMarginLeft, hasError) => {
3289
3311
  return useMemo11(() => {
3290
3312
  const formControl = css4`
3291
- text-align: left;
3313
+ text-align: start;
3292
3314
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
3293
3315
  `;
3294
3316
  const helperText = css4`
3295
3317
  margin-top: calc(${theme.vars.spacing.unit} / 2);
3296
- text-align: ${helperTextAlign};
3297
- ${helperTextMarginLeft && `margin-left: ${helperTextMarginLeft};`}
3318
+ text-align: ${helperTextAlign === "left" ? "start" : helperTextAlign};
3319
+ ${helperTextMarginLeft && `margin-inline-start: ${helperTextMarginLeft};`}
3298
3320
  `;
3299
3321
  const helperTextError = css4`
3300
3322
  color: ${theme.vars.colors.error.main};
@@ -3428,8 +3450,8 @@ import { css as css6 } from "@emotion/css";
3428
3450
  import { useMemo as useMemo13 } from "react";
3429
3451
  var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIcon) => {
3430
3452
  return useMemo13(() => {
3431
- const leftPadding = hasStartIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
3432
- const rightPadding = hasEndIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
3453
+ const inlineStartPadding = hasStartIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
3454
+ const inlineEndPadding = hasEndIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
3433
3455
  const inputContainer = css6`
3434
3456
  position: relative;
3435
3457
  display: flex;
@@ -3437,7 +3459,9 @@ var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIc
3437
3459
  `;
3438
3460
  const input = css6`
3439
3461
  width: 100%;
3440
- padding: ${theme.vars.spacing.unit} ${rightPadding} ${theme.vars.spacing.unit} ${leftPadding};
3462
+ padding-block: ${theme.vars.spacing.unit};
3463
+ padding-inline-start: ${inlineStartPadding};
3464
+ padding-inline-end: ${inlineEndPadding};
3441
3465
  border: 1px solid ${hasError ? theme.vars.colors.error.main : theme.vars.colors.border};
3442
3466
  border-radius: ${theme.vars.components?.Field?.root?.borderRadius || theme.vars.borderRadius.medium};
3443
3467
  font-size: ${theme.vars.typography.fontSizes.md};
@@ -3508,11 +3532,11 @@ var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIc
3508
3532
  `;
3509
3533
  const startIcon = css6`
3510
3534
  ${icon};
3511
- left: ${theme.vars.spacing.unit};
3535
+ inset-inline-start: ${theme.vars.spacing.unit};
3512
3536
  `;
3513
3537
  const endIcon = css6`
3514
3538
  ${icon};
3515
- right: ${theme.vars.spacing.unit};
3539
+ inset-inline-end: ${theme.vars.spacing.unit};
3516
3540
  `;
3517
3541
  return {
3518
3542
  inputContainer,
@@ -4227,7 +4251,7 @@ var useStyles11 = (theme, colorScheme, hasError, required) => {
4227
4251
  const inputStyles = css11`
4228
4252
  width: calc(${theme.vars.spacing.unit} * 2.5);
4229
4253
  height: calc(${theme.vars.spacing.unit} * 2.5);
4230
- margin-right: ${theme.vars.spacing.unit};
4254
+ margin-inline-end: ${theme.vars.spacing.unit};
4231
4255
  accent-color: ${theme.vars.colors.primary.main};
4232
4256
  cursor: pointer;
4233
4257
 
@@ -4347,6 +4371,7 @@ var createField = (config) => {
4347
4371
  required,
4348
4372
  value,
4349
4373
  onChange,
4374
+ onBlur,
4350
4375
  disabled = false,
4351
4376
  error,
4352
4377
  className,
@@ -4363,7 +4388,8 @@ var createField = (config) => {
4363
4388
  error: validationError,
4364
4389
  className,
4365
4390
  value,
4366
- placeholder
4391
+ placeholder,
4392
+ onBlur
4367
4393
  };
4368
4394
  switch (type) {
4369
4395
  case FieldType.Password:
@@ -5748,8 +5774,9 @@ var useStyles14 = (theme, colorScheme, orientation, variant, color, hasChildren)
5748
5774
  height: 100%;
5749
5775
  min-height: calc(${theme.vars.spacing.unit} * 2);
5750
5776
  width: 1px;
5751
- border-left: 1px ${borderStyle} ${baseColor};
5752
- margin: 0 calc(${theme.vars.spacing.unit} * 1);
5777
+ border-inline-start: 1px ${borderStyle} ${baseColor};
5778
+ margin-block: 0;
5779
+ margin-inline: calc(${theme.vars.spacing.unit} * 1);
5753
5780
  `;
5754
5781
  const horizontalDivider = css14`
5755
5782
  display: flex;
@@ -6786,14 +6813,6 @@ var BaseSignInContent = ({
6786
6813
  };
6787
6814
  var BaseSignIn_default = BaseSignIn;
6788
6815
 
6789
- // src/components/presentation/SignIn/SignIn.tsx
6790
- import {
6791
- Platform as Platform3
6792
- } from "@asgardeo/browser";
6793
-
6794
- // src/components/presentation/SignIn/component-driven/SignIn.tsx
6795
- import { useState as useState16, useEffect as useEffect13, useRef as useRef4 } from "react";
6796
-
6797
6816
  // src/components/presentation/SignIn/component-driven/BaseSignIn.tsx
6798
6817
  import { useState as useState15, useCallback as useCallback10 } from "react";
6799
6818
  import { cx as cx20 } from "@emotion/css";
@@ -7013,6 +7032,7 @@ var createSignInComponentFromFlow = (component, formValues, touchedFields, formE
7013
7032
  value,
7014
7033
  error,
7015
7034
  onChange: (newValue) => onInputChange(identifier, newValue),
7035
+ onBlur: () => options.onInputBlur?.(identifier),
7016
7036
  className: options.inputClassName
7017
7037
  });
7018
7038
  return React.cloneElement(field, { key });
@@ -7189,6 +7209,8 @@ var BaseSignInContent2 = ({
7189
7209
  } = form;
7190
7210
  const handleInputChange = (name, value) => {
7191
7211
  setFormValue(name, value);
7212
+ };
7213
+ const handleInputBlur = (name) => {
7192
7214
  setFormTouched(name, true);
7193
7215
  };
7194
7216
  const handleSubmit = async (component, data) => {
@@ -7268,6 +7290,7 @@ var BaseSignInContent2 = ({
7268
7290
  buttonClassName: buttonClasses,
7269
7291
  error,
7270
7292
  inputClassName: inputClasses,
7293
+ onInputBlur: handleInputBlur,
7271
7294
  onSubmit: handleSubmit,
7272
7295
  size,
7273
7296
  variant
@@ -7284,6 +7307,7 @@ var BaseSignInContent2 = ({
7284
7307
  error,
7285
7308
  inputClasses,
7286
7309
  buttonClasses,
7310
+ handleInputBlur,
7287
7311
  handleSubmit
7288
7312
  ]
7289
7313
  );
@@ -7336,7 +7360,24 @@ var BaseSignInContent2 = ({
7336
7360
  };
7337
7361
  var BaseSignIn_default2 = BaseSignIn2;
7338
7362
 
7363
+ // src/components/presentation/SignIn/BaseSignIn.tsx
7364
+ import { jsx as jsx57 } from "react/jsx-runtime";
7365
+ var BaseSignIn3 = (props) => {
7366
+ const { platform } = useAsgardeo_default();
7367
+ if (platform === Platform3.AsgardeoV2) {
7368
+ return /* @__PURE__ */ jsx57(BaseSignIn_default2, { ...props });
7369
+ }
7370
+ return /* @__PURE__ */ jsx57(BaseSignIn_default, { ...props });
7371
+ };
7372
+ var BaseSignIn_default3 = BaseSignIn3;
7373
+
7374
+ // src/components/presentation/SignIn/SignIn.tsx
7375
+ import {
7376
+ Platform as Platform4
7377
+ } from "@asgardeo/browser";
7378
+
7339
7379
  // src/components/presentation/SignIn/component-driven/SignIn.tsx
7380
+ import { useState as useState16, useEffect as useEffect13, useRef as useRef4 } from "react";
7340
7381
  import {
7341
7382
  AsgardeoRuntimeError as AsgardeoRuntimeError8,
7342
7383
  EmbeddedFlowType,
@@ -7349,7 +7390,14 @@ var generateId = (prefix) => {
7349
7390
  const suffix = Math.random().toString(36).substring(2, 6);
7350
7391
  return `${prefix}_${suffix}`;
7351
7392
  };
7352
- var getInputVariant = (type) => {
7393
+ var getInputVariant = (type, name) => {
7394
+ const lowerName = name.toLowerCase();
7395
+ if (lowerName.includes("password")) {
7396
+ return "PASSWORD";
7397
+ }
7398
+ if (lowerName.includes("email")) {
7399
+ return "EMAIL";
7400
+ }
7353
7401
  switch (type.toLowerCase()) {
7354
7402
  case "email":
7355
7403
  return "EMAIL";
@@ -7376,7 +7424,7 @@ var getInputPlaceholder = (name, type, t) => {
7376
7424
  return placeholder;
7377
7425
  };
7378
7426
  var convertSimpleInputToComponent = (input, t) => {
7379
- const variant = getInputVariant(input.type);
7427
+ const variant = getInputVariant(input.type, input.name);
7380
7428
  const label = getInputLabel(input.name, input.type, t);
7381
7429
  const placeholder = getInputPlaceholder(input.name, input.type, t);
7382
7430
  return {
@@ -7384,7 +7432,7 @@ var convertSimpleInputToComponent = (input, t) => {
7384
7432
  type: EmbeddedFlowComponentType2.Input,
7385
7433
  variant,
7386
7434
  config: {
7387
- type: input.type === "string" ? "text" : input.type,
7435
+ type: input.type,
7388
7436
  label,
7389
7437
  placeholder,
7390
7438
  required: input.required,
@@ -7454,7 +7502,7 @@ var normalizeFlowResponse = (response, t) => {
7454
7502
  };
7455
7503
 
7456
7504
  // src/components/presentation/SignIn/component-driven/SignIn.tsx
7457
- import { Fragment as Fragment12, jsx as jsx57 } from "react/jsx-runtime";
7505
+ import { Fragment as Fragment12, jsx as jsx58 } from "react/jsx-runtime";
7458
7506
  var SignIn = ({ className, size = "medium", onSuccess, onError, variant, children }) => {
7459
7507
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading } = useAsgardeo_default();
7460
7508
  const { t } = useTranslation_default();
@@ -7568,9 +7616,9 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7568
7616
  components,
7569
7617
  error: flowError
7570
7618
  };
7571
- return /* @__PURE__ */ jsx57(Fragment12, { children: children(renderProps) });
7619
+ return /* @__PURE__ */ jsx58(Fragment12, { children: children(renderProps) });
7572
7620
  }
7573
- return /* @__PURE__ */ jsx57(
7621
+ return /* @__PURE__ */ jsx58(
7574
7622
  BaseSignIn_default2,
7575
7623
  {
7576
7624
  components,
@@ -7586,7 +7634,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7586
7634
  var SignIn_default = SignIn;
7587
7635
 
7588
7636
  // src/components/presentation/SignIn/SignIn.tsx
7589
- import { jsx as jsx58 } from "react/jsx-runtime";
7637
+ import { jsx as jsx59 } from "react/jsx-runtime";
7590
7638
  var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7591
7639
  const { signIn, afterSignInUrl, isInitialized, isLoading, platform } = useAsgardeo_default();
7592
7640
  const handleInitialize = async () => {
@@ -7606,8 +7654,8 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7606
7654
  window.location.href = url.toString();
7607
7655
  }
7608
7656
  };
7609
- if (platform === Platform3.AsgardeoV2) {
7610
- return /* @__PURE__ */ jsx58(
7657
+ if (platform === Platform4.AsgardeoV2) {
7658
+ return /* @__PURE__ */ jsx59(
7611
7659
  SignIn_default,
7612
7660
  {
7613
7661
  className,
@@ -7619,7 +7667,7 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7619
7667
  }
7620
7668
  );
7621
7669
  }
7622
- return /* @__PURE__ */ jsx58(
7670
+ return /* @__PURE__ */ jsx59(
7623
7671
  BaseSignIn_default,
7624
7672
  {
7625
7673
  isLoading: isLoading || !isInitialized,
@@ -7638,10 +7686,9 @@ var SignIn_default2 = SignIn2;
7638
7686
  // src/components/presentation/SignUp/BaseSignUp.tsx
7639
7687
  import {
7640
7688
  EmbeddedFlowStatus,
7641
- EmbeddedFlowComponentType as EmbeddedFlowComponentType4,
7689
+ EmbeddedFlowComponentType as EmbeddedFlowComponentType5,
7642
7690
  EmbeddedFlowResponseType,
7643
- withVendorCSSClassPrefix as withVendorCSSClassPrefix21,
7644
- AsgardeoAPIError as AsgardeoAPIError3
7691
+ withVendorCSSClassPrefix as withVendorCSSClassPrefix21
7645
7692
  } from "@asgardeo/browser";
7646
7693
  import { cx as cx21 } from "@emotion/css";
7647
7694
  import { useEffect as useEffect14, useState as useState17, useCallback as useCallback11, useRef as useRef5 } from "react";
@@ -7706,13 +7753,13 @@ var DateInput = ({
7706
7753
  var DateInput_default = DateInput;
7707
7754
 
7708
7755
  // src/components/adapters/DividerComponent.tsx
7709
- import { jsx as jsx59 } from "react/jsx-runtime";
7756
+ import { jsx as jsx60 } from "react/jsx-runtime";
7710
7757
  var DividerComponent = ({ component }) => {
7711
7758
  const { theme } = useTheme_default();
7712
7759
  const config = component.config || {};
7713
7760
  const text = config["text"] || "";
7714
7761
  const variant = component.variant?.toLowerCase() || "horizontal";
7715
- return /* @__PURE__ */ jsx59(
7762
+ return /* @__PURE__ */ jsx60(
7716
7763
  Divider_default,
7717
7764
  {
7718
7765
  orientation: variant === "vertical" ? "vertical" : "horizontal",
@@ -7753,7 +7800,7 @@ var EmailInput = ({
7753
7800
  var EmailInput_default = EmailInput;
7754
7801
 
7755
7802
  // src/components/adapters/FormContainer.tsx
7756
- import { jsx as jsx60 } from "react/jsx-runtime";
7803
+ import { jsx as jsx61 } from "react/jsx-runtime";
7757
7804
  var FormContainer = (props) => {
7758
7805
  const { component } = props;
7759
7806
  if (component.components && component.components.length > 0) {
@@ -7766,19 +7813,19 @@ var FormContainer = (props) => {
7766
7813
  props.onSubmit(submitButton, props.formValues);
7767
7814
  }
7768
7815
  };
7769
- return /* @__PURE__ */ jsx60("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
7816
+ return /* @__PURE__ */ jsx61("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
7770
7817
  (childComponent, index) => createSignUpComponent({
7771
7818
  ...props,
7772
7819
  component: childComponent
7773
7820
  })
7774
7821
  ) }, component.id);
7775
7822
  }
7776
- return /* @__PURE__ */ jsx60("div", {}, component.id);
7823
+ return /* @__PURE__ */ jsx61("div", {}, component.id);
7777
7824
  };
7778
7825
  var FormContainer_default = FormContainer;
7779
7826
 
7780
7827
  // src/components/adapters/ImageComponent.tsx
7781
- import { jsx as jsx61 } from "react/jsx-runtime";
7828
+ import { jsx as jsx62 } from "react/jsx-runtime";
7782
7829
  var ImageComponent = ({ component }) => {
7783
7830
  const { theme } = useTheme_default();
7784
7831
  const config = component.config || {};
@@ -7795,7 +7842,7 @@ var ImageComponent = ({ component }) => {
7795
7842
  if (!src) {
7796
7843
  return null;
7797
7844
  }
7798
- return /* @__PURE__ */ jsx61("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx61(
7845
+ return /* @__PURE__ */ jsx62("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx62(
7799
7846
  "img",
7800
7847
  {
7801
7848
  src,
@@ -7898,7 +7945,7 @@ var PasswordInput = ({
7898
7945
  var PasswordInput_default = PasswordInput;
7899
7946
 
7900
7947
  // src/components/adapters/SubmitButton.tsx
7901
- import { jsx as jsx62 } from "react/jsx-runtime";
7948
+ import { jsx as jsx63 } from "react/jsx-runtime";
7902
7949
  var ButtonComponent = ({
7903
7950
  component,
7904
7951
  isLoading,
@@ -7931,7 +7978,7 @@ var ButtonComponent = ({
7931
7978
  onSubmit(component);
7932
7979
  }
7933
7980
  };
7934
- return /* @__PURE__ */ jsx62(
7981
+ return /* @__PURE__ */ jsx63(
7935
7982
  Button_default,
7936
7983
  {
7937
7984
  type: buttonType === "submit" ? "submit" : "button",
@@ -7942,7 +7989,7 @@ var ButtonComponent = ({
7942
7989
  onClick: buttonType !== "submit" ? handleClick : void 0,
7943
7990
  className: buttonClassName,
7944
7991
  style: { width: "100%" },
7945
- children: isLoading ? /* @__PURE__ */ jsx62(Spinner_default, { size: "small" }) : buttonText
7992
+ children: isLoading ? /* @__PURE__ */ jsx63(Spinner_default, { size: "small" }) : buttonText
7946
7993
  },
7947
7994
  component.id
7948
7995
  );
@@ -7950,7 +7997,7 @@ var ButtonComponent = ({
7950
7997
  var SubmitButton_default = ButtonComponent;
7951
7998
 
7952
7999
  // src/components/adapters/TelephoneInput.tsx
7953
- import { jsx as jsx63 } from "react/jsx-runtime";
8000
+ import { jsx as jsx64 } from "react/jsx-runtime";
7954
8001
  var TelephoneInput = ({
7955
8002
  component,
7956
8003
  formValues,
@@ -7963,7 +8010,7 @@ var TelephoneInput = ({
7963
8010
  const fieldName = config["identifier"] || config["name"] || component.id;
7964
8011
  const value = formValues[fieldName] || "";
7965
8012
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7966
- return /* @__PURE__ */ jsx63(
8013
+ return /* @__PURE__ */ jsx64(
7967
8014
  TextField_default,
7968
8015
  {
7969
8016
  name: fieldName,
@@ -8011,7 +8058,7 @@ var TextInput = ({
8011
8058
  var TextInput_default = TextInput;
8012
8059
 
8013
8060
  // src/components/adapters/Typography.tsx
8014
- import { jsx as jsx64 } from "react/jsx-runtime";
8061
+ import { jsx as jsx65 } from "react/jsx-runtime";
8015
8062
  var TypographyComponent = ({ component }) => {
8016
8063
  const { theme } = useTheme_default();
8017
8064
  const config = component.config || {};
@@ -8052,7 +8099,7 @@ var TypographyComponent = ({ component }) => {
8052
8099
  default:
8053
8100
  typographyVariant = "body1";
8054
8101
  }
8055
- return /* @__PURE__ */ jsx64(
8102
+ return /* @__PURE__ */ jsx65(
8056
8103
  Typography_default,
8057
8104
  {
8058
8105
  variant: typographyVariant,
@@ -8065,66 +8112,66 @@ var TypographyComponent = ({ component }) => {
8065
8112
  var Typography_default2 = TypographyComponent;
8066
8113
 
8067
8114
  // src/components/presentation/SignUp/SignUpOptionFactory.tsx
8068
- import { jsx as jsx65 } from "react/jsx-runtime";
8115
+ import { jsx as jsx66 } from "react/jsx-runtime";
8069
8116
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8070
8117
  switch (component.type) {
8071
8118
  case EmbeddedFlowComponentType3.Typography:
8072
- return /* @__PURE__ */ jsx65(Typography_default2, { component, onSubmit, ...rest });
8119
+ return /* @__PURE__ */ jsx66(Typography_default2, { component, onSubmit, ...rest });
8073
8120
  case EmbeddedFlowComponentType3.Input:
8074
8121
  const inputVariant = component.variant?.toUpperCase();
8075
8122
  const inputType = component.config["type"]?.toLowerCase();
8076
8123
  if (inputVariant === "EMAIL" || inputType === "email") {
8077
- return /* @__PURE__ */ jsx65(EmailInput_default, { component, onSubmit, ...rest });
8124
+ return /* @__PURE__ */ jsx66(EmailInput_default, { component, onSubmit, ...rest });
8078
8125
  }
8079
8126
  if (inputVariant === "PASSWORD" || inputType === "password") {
8080
- return /* @__PURE__ */ jsx65(PasswordInput_default, { component, onSubmit, ...rest });
8127
+ return /* @__PURE__ */ jsx66(PasswordInput_default, { component, onSubmit, ...rest });
8081
8128
  }
8082
8129
  if (inputVariant === "TELEPHONE" || inputType === "tel") {
8083
- return /* @__PURE__ */ jsx65(TelephoneInput_default, { component, onSubmit, ...rest });
8130
+ return /* @__PURE__ */ jsx66(TelephoneInput_default, { component, onSubmit, ...rest });
8084
8131
  }
8085
8132
  if (inputVariant === "NUMBER" || inputType === "number") {
8086
- return /* @__PURE__ */ jsx65(NumberInput_default, { component, onSubmit, ...rest });
8133
+ return /* @__PURE__ */ jsx66(NumberInput_default, { component, onSubmit, ...rest });
8087
8134
  }
8088
8135
  if (inputVariant === "DATE" || inputType === "date") {
8089
- return /* @__PURE__ */ jsx65(DateInput_default, { component, onSubmit, ...rest });
8136
+ return /* @__PURE__ */ jsx66(DateInput_default, { component, onSubmit, ...rest });
8090
8137
  }
8091
8138
  if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
8092
- return /* @__PURE__ */ jsx65(CheckboxInput_default, { component, onSubmit, ...rest });
8139
+ return /* @__PURE__ */ jsx66(CheckboxInput_default, { component, onSubmit, ...rest });
8093
8140
  }
8094
- return /* @__PURE__ */ jsx65(TextInput_default, { component, onSubmit, ...rest });
8141
+ return /* @__PURE__ */ jsx66(TextInput_default, { component, onSubmit, ...rest });
8095
8142
  case EmbeddedFlowComponentType3.Button: {
8096
8143
  const buttonVariant = component.variant?.toUpperCase();
8097
8144
  const buttonText = component.config["text"] || component.config["label"] || "";
8098
8145
  if (buttonVariant === "SOCIAL") {
8099
8146
  if (buttonText.toLowerCase().includes("google")) {
8100
- return /* @__PURE__ */ jsx65(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8147
+ return /* @__PURE__ */ jsx66(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8101
8148
  }
8102
8149
  if (buttonText.toLowerCase().includes("github")) {
8103
- return /* @__PURE__ */ jsx65(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8150
+ return /* @__PURE__ */ jsx66(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8104
8151
  }
8105
8152
  if (buttonText.toLowerCase().includes("microsoft")) {
8106
- return /* @__PURE__ */ jsx65(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8153
+ return /* @__PURE__ */ jsx66(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8107
8154
  }
8108
8155
  if (buttonText.toLowerCase().includes("facebook")) {
8109
- return /* @__PURE__ */ jsx65(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8156
+ return /* @__PURE__ */ jsx66(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8110
8157
  }
8111
8158
  if (buttonText.toLowerCase().includes("linkedin")) {
8112
- return /* @__PURE__ */ jsx65(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8159
+ return /* @__PURE__ */ jsx66(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8113
8160
  }
8114
8161
  if (buttonText.toLowerCase().includes("ethereum")) {
8115
- return /* @__PURE__ */ jsx65(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8162
+ return /* @__PURE__ */ jsx66(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
8116
8163
  }
8117
8164
  }
8118
- return /* @__PURE__ */ jsx65(SubmitButton_default, { component, onSubmit, ...rest });
8165
+ return /* @__PURE__ */ jsx66(SubmitButton_default, { component, onSubmit, ...rest });
8119
8166
  }
8120
8167
  case EmbeddedFlowComponentType3.Form:
8121
- return /* @__PURE__ */ jsx65(FormContainer_default, { component, onSubmit, ...rest });
8168
+ return /* @__PURE__ */ jsx66(FormContainer_default, { component, onSubmit, ...rest });
8122
8169
  case EmbeddedFlowComponentType3.Divider:
8123
- return /* @__PURE__ */ jsx65(DividerComponent_default, { component, onSubmit, ...rest });
8170
+ return /* @__PURE__ */ jsx66(DividerComponent_default, { component, onSubmit, ...rest });
8124
8171
  case EmbeddedFlowComponentType3.Image:
8125
- return /* @__PURE__ */ jsx65(ImageComponent_default, { component, onSubmit, ...rest });
8172
+ return /* @__PURE__ */ jsx66(ImageComponent_default, { component, onSubmit, ...rest });
8126
8173
  default:
8127
- return /* @__PURE__ */ jsx65("div", {});
8174
+ return /* @__PURE__ */ jsx66("div", {});
8128
8175
  }
8129
8176
  };
8130
8177
  var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
@@ -8154,6 +8201,151 @@ var renderSignUpComponents = (components, formValues, touchedFields, formErrors,
8154
8201
  )
8155
8202
  ).filter(Boolean);
8156
8203
 
8204
+ // src/components/presentation/SignUp/transformer.ts
8205
+ import {
8206
+ EmbeddedFlowComponentType as EmbeddedFlowComponentType4
8207
+ } from "@asgardeo/browser";
8208
+ var generateId2 = (prefix) => {
8209
+ const suffix = Math.random().toString(36).substring(2, 6);
8210
+ return `${prefix}_${suffix}`;
8211
+ };
8212
+ var getInputVariant2 = (type, name) => {
8213
+ const lowerName = name.toLowerCase();
8214
+ if (lowerName.includes("password")) {
8215
+ return "PASSWORD";
8216
+ }
8217
+ if (lowerName.includes("email")) {
8218
+ return "EMAIL";
8219
+ }
8220
+ switch (type.toLowerCase()) {
8221
+ case "email":
8222
+ return "EMAIL";
8223
+ case "password":
8224
+ return "PASSWORD";
8225
+ default:
8226
+ return "TEXT";
8227
+ }
8228
+ };
8229
+ var getInputLabel2 = (name, type, t) => {
8230
+ const i18nKey = `elements.fields.${name}`;
8231
+ const label = t(i18nKey);
8232
+ if (label === i18nKey || !label) {
8233
+ return name.charAt(0).toUpperCase() + name.slice(1);
8234
+ }
8235
+ return label;
8236
+ };
8237
+ var getInputPlaceholder2 = (name, type, t) => {
8238
+ const label = getInputLabel2(name, type, t);
8239
+ const placeholder = t("elements.fields.placeholder", { field: label });
8240
+ if (!placeholder || placeholder === "elements.fields.placeholder") {
8241
+ return `Enter your ${label}`;
8242
+ }
8243
+ return placeholder;
8244
+ };
8245
+ var convertSimpleInputToComponent2 = (input, t) => {
8246
+ const variant = getInputVariant2(input.type, input.name);
8247
+ const label = getInputLabel2(input.name, input.type, t);
8248
+ const placeholder = getInputPlaceholder2(input.name, input.type, t);
8249
+ return {
8250
+ id: generateId2("input"),
8251
+ type: EmbeddedFlowComponentType4.Input,
8252
+ variant,
8253
+ config: {
8254
+ type: input.type,
8255
+ label,
8256
+ placeholder,
8257
+ required: input.required,
8258
+ identifier: input.name,
8259
+ hint: ""
8260
+ },
8261
+ components: []
8262
+ };
8263
+ };
8264
+ var convertActionToComponent2 = (action, t) => {
8265
+ const i18nKey = `elements.buttons.${action.id}`;
8266
+ let text = t(i18nKey);
8267
+ if (!text || text === i18nKey) {
8268
+ text = action.id.replace(/_/g, " ");
8269
+ text = text.charAt(0).toUpperCase() + text.slice(1);
8270
+ }
8271
+ return {
8272
+ id: generateId2("action"),
8273
+ type: EmbeddedFlowComponentType4.Button,
8274
+ variant: "SECONDARY",
8275
+ config: {
8276
+ type: "button",
8277
+ text,
8278
+ actionId: action.id,
8279
+ actionType: action.type
8280
+ },
8281
+ components: []
8282
+ };
8283
+ };
8284
+ var transformSimpleToComponentDriven2 = (response, t) => {
8285
+ const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
8286
+ const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
8287
+ const submitButton = inputComponents.length > 0 ? {
8288
+ id: generateId2("button"),
8289
+ type: EmbeddedFlowComponentType4.Button,
8290
+ variant: "PRIMARY",
8291
+ config: {
8292
+ type: "submit",
8293
+ text: t("elements.buttons.signUp")
8294
+ },
8295
+ components: []
8296
+ } : null;
8297
+ const formComponents = [];
8298
+ if (inputComponents.length > 0) {
8299
+ formComponents.push(...inputComponents);
8300
+ if (submitButton) formComponents.push(submitButton);
8301
+ }
8302
+ const result = [];
8303
+ if (formComponents.length > 0) {
8304
+ result.push({
8305
+ id: generateId2("form"),
8306
+ type: EmbeddedFlowComponentType4.Form,
8307
+ config: {},
8308
+ components: formComponents
8309
+ });
8310
+ }
8311
+ if (actionComponents.length > 0) {
8312
+ result.push(...actionComponents);
8313
+ }
8314
+ return result;
8315
+ };
8316
+ var extractErrorMessage = (error, t) => {
8317
+ let errorMessage = t("errors.sign.up.flow.failure");
8318
+ if (error && typeof error === "object") {
8319
+ if (error.flowStatus === "ERROR" && error.failureReason) {
8320
+ errorMessage = error.failureReason;
8321
+ } else if (error.code && (error.message || error.description)) {
8322
+ errorMessage = error.description || error.message;
8323
+ } else if (error instanceof Error && error.name === "AsgardeoAPIError") {
8324
+ try {
8325
+ const errorResponse = JSON.parse(
8326
+ error.message
8327
+ );
8328
+ if (errorResponse.failureReason) {
8329
+ errorMessage = errorResponse.failureReason;
8330
+ } else if (errorResponse.description) {
8331
+ errorMessage = errorResponse.description;
8332
+ } else if (errorResponse.message) {
8333
+ errorMessage = errorResponse.message;
8334
+ } else {
8335
+ errorMessage = error.message;
8336
+ }
8337
+ } catch {
8338
+ errorMessage = error.message;
8339
+ }
8340
+ } else if (error.message) {
8341
+ errorMessage = error.message;
8342
+ }
8343
+ } else if (typeof error === "string") {
8344
+ errorMessage = error;
8345
+ }
8346
+ return errorMessage;
8347
+ };
8348
+
8157
8349
  // src/components/presentation/SignUp/BaseSignUp.styles.ts
8158
8350
  import { css as css18 } from "@emotion/css";
8159
8351
  import { useMemo as useMemo25 } from "react";
@@ -8296,13 +8488,13 @@ var useStyles18 = (theme, colorScheme) => {
8296
8488
  var BaseSignUp_styles_default = useStyles18;
8297
8489
 
8298
8490
  // src/components/presentation/SignUp/BaseSignUp.tsx
8299
- import { jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
8491
+ import { jsx as jsx67, jsxs as jsxs28 } from "react/jsx-runtime";
8300
8492
  var BaseSignUp = (props) => {
8301
8493
  const { theme, colorScheme } = useTheme_default();
8302
8494
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8303
8495
  return /* @__PURE__ */ jsxs28("div", { children: [
8304
- /* @__PURE__ */ jsx66("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx66(Logo_default, { size: "large" }) }),
8305
- /* @__PURE__ */ jsx66(FlowProvider_default, { children: /* @__PURE__ */ jsx66(BaseSignUpContent, { ...props }) })
8496
+ /* @__PURE__ */ jsx67("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx67(Logo_default, { size: "large" }) }),
8497
+ /* @__PURE__ */ jsx67(FlowProvider_default, { children: /* @__PURE__ */ jsx67(BaseSignUpContent, { ...props }) })
8306
8498
  ] });
8307
8499
  };
8308
8500
  var BaseSignUpContent = ({
@@ -8319,24 +8511,54 @@ var BaseSignUpContent = ({
8319
8511
  messageClassName = "",
8320
8512
  size = "medium",
8321
8513
  variant = "outlined",
8322
- isInitialized
8514
+ isInitialized,
8515
+ children
8323
8516
  }) => {
8324
8517
  const { theme, colorScheme } = useTheme_default();
8325
8518
  const { t } = useTranslation_default();
8326
- const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages } = useFlow_default();
8519
+ const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
8327
8520
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8521
+ const handleError = useCallback11(
8522
+ (error) => {
8523
+ const errorMessage = extractErrorMessage(error, t);
8524
+ clearMessages();
8525
+ addMessage({
8526
+ type: "error",
8527
+ message: errorMessage
8528
+ });
8529
+ },
8530
+ [t, addMessage, clearMessages]
8531
+ );
8328
8532
  const [isLoading, setIsLoading] = useState17(false);
8329
8533
  const [isFlowInitialized, setIsFlowInitialized] = useState17(false);
8330
8534
  const [currentFlow, setCurrentFlow] = useState17(null);
8331
- const [error, setError] = useState17(null);
8332
8535
  const [formData, setFormData] = useState17({});
8333
8536
  const initializationAttemptedRef = useRef5(false);
8537
+ const normalizeFlowResponse2 = useCallback11(
8538
+ (response) => {
8539
+ if (response?.data?.components && Array.isArray(response.data.components)) {
8540
+ return response;
8541
+ }
8542
+ if (response?.data && (response.data.inputs || response.data.actions)) {
8543
+ const transformedComponents = transformSimpleToComponentDriven2(response, t);
8544
+ return {
8545
+ ...response,
8546
+ data: {
8547
+ ...response.data,
8548
+ components: transformedComponents
8549
+ }
8550
+ };
8551
+ }
8552
+ return response;
8553
+ },
8554
+ [t]
8555
+ );
8334
8556
  const extractFormFields = useCallback11(
8335
8557
  (components) => {
8336
8558
  const fields = [];
8337
8559
  const processComponents = (comps) => {
8338
8560
  comps.forEach((component) => {
8339
- if (component.type === EmbeddedFlowComponentType4.Input) {
8561
+ if (component.type === EmbeddedFlowComponentType5.Input) {
8340
8562
  const config = component.config || {};
8341
8563
  fields.push({
8342
8564
  name: config.name || component.id,
@@ -8410,7 +8632,7 @@ var BaseSignUpContent = ({
8410
8632
  return;
8411
8633
  }
8412
8634
  setIsLoading(true);
8413
- setError(null);
8635
+ clearMessages();
8414
8636
  try {
8415
8637
  const filteredInputs = {};
8416
8638
  if (data) {
@@ -8426,7 +8648,8 @@ var BaseSignUpContent = ({
8426
8648
  inputs: filteredInputs,
8427
8649
  actionId: component.id
8428
8650
  };
8429
- const response = await onSubmit(payload);
8651
+ const rawResponse = await onSubmit(payload);
8652
+ const response = normalizeFlowResponse2(rawResponse);
8430
8653
  onFlowChange?.(response);
8431
8654
  if (response.flowStatus === EmbeddedFlowStatus.Complete) {
8432
8655
  onComplete?.(response);
@@ -8440,8 +8663,7 @@ var BaseSignUpContent = ({
8440
8663
  setupFormFields(response);
8441
8664
  }
8442
8665
  } catch (err) {
8443
- const errorMessage = err instanceof AsgardeoAPIError3 ? err.message : t("errors.sign.up.flow.failure");
8444
- setError(errorMessage);
8666
+ handleError(err);
8445
8667
  onError?.(err);
8446
8668
  } finally {
8447
8669
  setIsLoading(false);
@@ -8486,8 +8708,7 @@ var BaseSignUpContent = ({
8486
8708
  popup.close();
8487
8709
  cleanup();
8488
8710
  } catch (err) {
8489
- const errorMessage = err instanceof AsgardeoAPIError3 ? err.message : t("errors.sign.up.flow.failure");
8490
- setError(errorMessage);
8711
+ handleError(err);
8491
8712
  onError?.(err);
8492
8713
  popup.close();
8493
8714
  cleanup();
@@ -8518,9 +8739,9 @@ var BaseSignUpContent = ({
8518
8739
  const url = new URL(popupUrl);
8519
8740
  const code = url.searchParams.get("code");
8520
8741
  const state = url.searchParams.get("state");
8521
- const error2 = url.searchParams.get("error");
8522
- if (error2) {
8523
- console.error("OAuth error:", error2);
8742
+ const error = url.searchParams.get("error");
8743
+ if (error) {
8744
+ console.error("OAuth error:", error);
8524
8745
  popup.close();
8525
8746
  cleanup();
8526
8747
  return;
@@ -8546,8 +8767,7 @@ var BaseSignUpContent = ({
8546
8767
  }
8547
8768
  popup.close();
8548
8769
  } catch (err) {
8549
- const errorMessage = err instanceof AsgardeoAPIError3 ? err.message : t("errors.sign.up.flow.failure");
8550
- setError(errorMessage);
8770
+ handleError(err);
8551
8771
  onError?.(err);
8552
8772
  popup.close();
8553
8773
  }
@@ -8600,7 +8820,6 @@ var BaseSignUpContent = ({
8600
8820
  handleInputChange,
8601
8821
  {
8602
8822
  buttonClassName: buttonClasses,
8603
- error,
8604
8823
  inputClassName: inputClasses,
8605
8824
  onSubmit: handleSubmit,
8606
8825
  size,
@@ -8615,7 +8834,6 @@ var BaseSignUpContent = ({
8615
8834
  isLoading,
8616
8835
  size,
8617
8836
  variant,
8618
- error,
8619
8837
  inputClasses,
8620
8838
  buttonClasses,
8621
8839
  handleSubmit
@@ -8626,9 +8844,10 @@ var BaseSignUpContent = ({
8626
8844
  initializationAttemptedRef.current = true;
8627
8845
  (async () => {
8628
8846
  setIsLoading(true);
8629
- setError(null);
8847
+ clearMessages();
8630
8848
  try {
8631
- const response = await onInitialize();
8849
+ const rawResponse = await onInitialize();
8850
+ const response = normalizeFlowResponse2(rawResponse);
8632
8851
  setCurrentFlow(response);
8633
8852
  setIsFlowInitialized(true);
8634
8853
  onFlowChange?.(response);
@@ -8640,8 +8859,7 @@ var BaseSignUpContent = ({
8640
8859
  setupFormFields(response);
8641
8860
  }
8642
8861
  } catch (err) {
8643
- const errorMessage = err instanceof Error ? err.message : t("errors.sign.up.flow.initialization.failure");
8644
- setError(errorMessage);
8862
+ handleError(err);
8645
8863
  onError?.(err);
8646
8864
  } finally {
8647
8865
  setIsLoading(false);
@@ -8656,35 +8874,51 @@ var BaseSignUpContent = ({
8656
8874
  onError,
8657
8875
  onFlowChange,
8658
8876
  setupFormFields,
8877
+ normalizeFlowResponse2,
8659
8878
  afterSignUpUrl,
8660
8879
  t
8661
8880
  ]);
8881
+ if (children) {
8882
+ const renderProps = {
8883
+ values: formValues,
8884
+ errors: formErrors,
8885
+ touched: touchedFields,
8886
+ isValid: isFormValid,
8887
+ isLoading,
8888
+ components: currentFlow?.data?.components || [],
8889
+ handleInputChange,
8890
+ handleSubmit,
8891
+ validateForm,
8892
+ title: flowTitle || t("signup.title"),
8893
+ subtitle: flowSubtitle || t("signup.subtitle"),
8894
+ messages: flowMessages || []
8895
+ };
8896
+ return /* @__PURE__ */ jsx67("div", { className: containerClasses, children: children(renderProps) });
8897
+ }
8662
8898
  if (!isFlowInitialized && isLoading) {
8663
- return /* @__PURE__ */ jsx66(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx66(Card_default.Content, { children: /* @__PURE__ */ jsx66("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx66(Spinner_default, { size: "medium" }) }) }) });
8899
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx67(Spinner_default, { size: "medium" }) }) }) });
8664
8900
  }
8665
8901
  if (!currentFlow) {
8666
- return /* @__PURE__ */ jsx66(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx66(Card_default.Content, { children: /* @__PURE__ */ jsxs28(Alert_default, { variant: "error", className: errorClasses, children: [
8667
- /* @__PURE__ */ jsx66(Alert_default.Title, { children: t("errors.title") || "Error" }),
8668
- /* @__PURE__ */ jsx66(Alert_default.Description, { children: error || t("errors.sign.up.flow.initialization.failure") })
8902
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsxs28(Alert_default, { variant: "error", className: errorClasses, children: [
8903
+ /* @__PURE__ */ jsx67(Alert_default.Title, { children: t("errors.title") }),
8904
+ /* @__PURE__ */ jsx67(Alert_default.Description, { children: t("errors.sign.up.flow.initialization.failure") })
8669
8905
  ] }) }) });
8670
8906
  }
8671
8907
  return /* @__PURE__ */ jsxs28(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
8672
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx66(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx66("div", { className: styles.messagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx66(
8673
- Alert_default,
8674
- {
8675
- variant: message.type?.toLowerCase() === "error" ? "error" : "info",
8676
- className: cx21(styles.messageItem, messageClasses),
8677
- children: /* @__PURE__ */ jsx66(Alert_default.Description, { children: message.message })
8678
- },
8679
- message.id || index
8680
- )) }) }),
8681
- /* @__PURE__ */ jsxs28(Card_default.Content, { children: [
8682
- error && /* @__PURE__ */ jsxs28(Alert_default, { variant: "error", className: cx21(styles.errorContainer, errorClasses), children: [
8683
- /* @__PURE__ */ jsx66(Alert_default.Title, { children: t("errors.title") || "Error" }),
8684
- /* @__PURE__ */ jsx66(Alert_default.Description, { children: error })
8685
- ] }),
8686
- /* @__PURE__ */ jsx66("div", { className: styles.contentContainer, children: currentFlow.data?.components && renderComponents(currentFlow.data.components) })
8687
- ] })
8908
+ /* @__PURE__ */ jsxs28(Card_default.Header, { className: styles.header, children: [
8909
+ /* @__PURE__ */ jsx67(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
8910
+ /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subtitle") }),
8911
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx67(
8912
+ Alert_default,
8913
+ {
8914
+ variant: message.type?.toLowerCase() === "error" ? "error" : "info",
8915
+ className: cx21(styles.flowMessageItem, messageClasses),
8916
+ children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: message.message })
8917
+ },
8918
+ message.id || index
8919
+ )) })
8920
+ ] }),
8921
+ /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx67(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", children: t("errors.sign.up.components.not.available") }) }) }) })
8688
8922
  ] });
8689
8923
  };
8690
8924
  var BaseSignUp_default = BaseSignUp;
@@ -8692,9 +8926,10 @@ var BaseSignUp_default = BaseSignUp;
8692
8926
  // src/components/presentation/SignUp/SignUp.tsx
8693
8927
  import {
8694
8928
  EmbeddedFlowResponseType as EmbeddedFlowResponseType2,
8695
- EmbeddedFlowType as EmbeddedFlowType2
8929
+ EmbeddedFlowType as EmbeddedFlowType2,
8930
+ Platform as Platform5
8696
8931
  } from "@asgardeo/browser";
8697
- import { jsx as jsx67 } from "react/jsx-runtime";
8932
+ import { jsx as jsx68 } from "react/jsx-runtime";
8698
8933
  var SignUp = ({
8699
8934
  className,
8700
8935
  size = "medium",
@@ -8702,14 +8937,17 @@ var SignUp = ({
8702
8937
  onError,
8703
8938
  onComplete,
8704
8939
  shouldRedirectAfterSignUp = true,
8940
+ children,
8705
8941
  ...rest
8706
8942
  }) => {
8707
- const { signUp, isInitialized } = useAsgardeo_default();
8708
- const handleInitialize = async (payload) => await signUp(
8709
- payload || {
8710
- flowType: EmbeddedFlowType2.Registration
8711
- }
8712
- );
8943
+ const { signUp, isInitialized, applicationId, platform } = useAsgardeo_default();
8944
+ const handleInitialize = async (payload) => {
8945
+ const initialPayload = payload || {
8946
+ flowType: EmbeddedFlowType2.Registration,
8947
+ ...platform === Platform5.AsgardeoV2 && applicationId && { applicationId }
8948
+ };
8949
+ return await signUp(initialPayload);
8950
+ };
8713
8951
  const handleOnSubmit = async (payload) => await signUp(payload);
8714
8952
  const handleComplete = (response) => {
8715
8953
  onComplete?.(response);
@@ -8721,7 +8959,7 @@ var SignUp = ({
8721
8959
  window.location.href = response.data.redirectURL;
8722
8960
  }
8723
8961
  };
8724
- return /* @__PURE__ */ jsx67(
8962
+ return /* @__PURE__ */ jsx68(
8725
8963
  BaseSignUp_default,
8726
8964
  {
8727
8965
  afterSignUpUrl,
@@ -8732,6 +8970,7 @@ var SignUp = ({
8732
8970
  className,
8733
8971
  size,
8734
8972
  isInitialized,
8973
+ children,
8735
8974
  ...rest
8736
8975
  }
8737
8976
  );
@@ -8739,41 +8978,41 @@ var SignUp = ({
8739
8978
  var SignUp_default = SignUp;
8740
8979
 
8741
8980
  // src/components/presentation/User/BaseUser.tsx
8742
- import { Fragment as Fragment13, jsx as jsx68 } from "react/jsx-runtime";
8981
+ import { Fragment as Fragment13, jsx as jsx69 } from "react/jsx-runtime";
8743
8982
  var BaseUser = ({ user, children, fallback = null }) => {
8744
8983
  if (!user) {
8745
- return /* @__PURE__ */ jsx68(Fragment13, { children: fallback });
8984
+ return /* @__PURE__ */ jsx69(Fragment13, { children: fallback });
8746
8985
  }
8747
- return /* @__PURE__ */ jsx68(Fragment13, { children: children(user) });
8986
+ return /* @__PURE__ */ jsx69(Fragment13, { children: children(user) });
8748
8987
  };
8749
8988
  BaseUser.displayName = "BaseUser";
8750
8989
  var BaseUser_default = BaseUser;
8751
8990
 
8752
8991
  // src/components/presentation/User/User.tsx
8753
- import { jsx as jsx69 } from "react/jsx-runtime";
8992
+ import { jsx as jsx70 } from "react/jsx-runtime";
8754
8993
  var User5 = ({ children, fallback = null }) => {
8755
8994
  const { user } = useAsgardeo_default();
8756
- return /* @__PURE__ */ jsx69(BaseUser_default, { user, fallback, children });
8995
+ return /* @__PURE__ */ jsx70(BaseUser_default, { user, fallback, children });
8757
8996
  };
8758
8997
  User5.displayName = "User";
8759
8998
  var User_default = User5;
8760
8999
 
8761
9000
  // src/components/presentation/Organization/BaseOrganization.tsx
8762
- import { Fragment as Fragment14, jsx as jsx70 } from "react/jsx-runtime";
9001
+ import { Fragment as Fragment14, jsx as jsx71 } from "react/jsx-runtime";
8763
9002
  var BaseOrganization = ({ children, fallback = null, organization }) => {
8764
9003
  if (!organization) {
8765
- return /* @__PURE__ */ jsx70(Fragment14, { children: fallback });
9004
+ return /* @__PURE__ */ jsx71(Fragment14, { children: fallback });
8766
9005
  }
8767
- return /* @__PURE__ */ jsx70(Fragment14, { children: children(organization) });
9006
+ return /* @__PURE__ */ jsx71(Fragment14, { children: children(organization) });
8768
9007
  };
8769
9008
  BaseOrganization.displayName = "BaseOrganization";
8770
9009
  var BaseOrganization_default = BaseOrganization;
8771
9010
 
8772
9011
  // src/components/presentation/Organization/Organization.tsx
8773
- import { jsx as jsx71 } from "react/jsx-runtime";
9012
+ import { jsx as jsx72 } from "react/jsx-runtime";
8774
9013
  var Organization5 = ({ children, fallback = null }) => {
8775
9014
  const { currentOrganization } = useOrganization_default();
8776
- return /* @__PURE__ */ jsx71(BaseOrganization_default, { organization: currentOrganization, fallback, children });
9015
+ return /* @__PURE__ */ jsx72(BaseOrganization_default, { organization: currentOrganization, fallback, children });
8777
9016
  };
8778
9017
  Organization5.displayName = "Organization";
8779
9018
  var Organization_default = Organization5;
@@ -8879,7 +9118,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
8879
9118
  var Avatar_styles_default = useStyles19;
8880
9119
 
8881
9120
  // src/components/primitives/Avatar/Avatar.tsx
8882
- import { jsx as jsx72 } from "react/jsx-runtime";
9121
+ import { jsx as jsx73 } from "react/jsx-runtime";
8883
9122
  var Avatar = ({
8884
9123
  alt = "User avatar",
8885
9124
  background = "random",
@@ -8926,25 +9165,25 @@ var Avatar = ({
8926
9165
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
8927
9166
  const renderContent = () => {
8928
9167
  if (imageUrl) {
8929
- return /* @__PURE__ */ jsx72("img", { src: imageUrl, alt, className: cx22(withVendorCSSClassPrefix22(bem16("avatar", "image")), styles.image) });
9168
+ return /* @__PURE__ */ jsx73("img", { src: imageUrl, alt, className: cx22(withVendorCSSClassPrefix22(bem16("avatar", "image")), styles.image) });
8930
9169
  }
8931
9170
  if (name) {
8932
9171
  return getInitials(name);
8933
9172
  }
8934
9173
  if (isLoading) {
8935
- return /* @__PURE__ */ jsx72("div", { className: cx22(withVendorCSSClassPrefix22(bem16("avatar", "skeleton")), styles.skeleton) });
9174
+ return /* @__PURE__ */ jsx73("div", { className: cx22(withVendorCSSClassPrefix22(bem16("avatar", "skeleton")), styles.skeleton) });
8936
9175
  }
8937
- return /* @__PURE__ */ jsx72(
9176
+ return /* @__PURE__ */ jsx73(
8938
9177
  "svg",
8939
9178
  {
8940
9179
  xmlns: "http://www.w3.org/2000/svg",
8941
9180
  viewBox: "0 0 640 640",
8942
9181
  className: cx22(withVendorCSSClassPrefix22(bem16("avatar", "icon")), styles.icon),
8943
- children: /* @__PURE__ */ jsx72("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
9182
+ children: /* @__PURE__ */ jsx73("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
8944
9183
  }
8945
9184
  );
8946
9185
  };
8947
- return /* @__PURE__ */ jsx72(
9186
+ return /* @__PURE__ */ jsx73(
8948
9187
  "div",
8949
9188
  {
8950
9189
  className: cx22(
@@ -8979,7 +9218,7 @@ import { cx as cx23 } from "@emotion/css";
8979
9218
  import React2 from "react";
8980
9219
 
8981
9220
  // src/components/primitives/Icons/LogOut.tsx
8982
- import { jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
9221
+ import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
8983
9222
  var LogOut = (props) => /* @__PURE__ */ jsxs29(
8984
9223
  "svg",
8985
9224
  {
@@ -8994,16 +9233,16 @@ var LogOut = (props) => /* @__PURE__ */ jsxs29(
8994
9233
  strokeLinejoin: "round",
8995
9234
  ...props,
8996
9235
  children: [
8997
- /* @__PURE__ */ jsx73("path", { d: "m16 17 5-5-5-5" }),
8998
- /* @__PURE__ */ jsx73("path", { d: "M21 12H9" }),
8999
- /* @__PURE__ */ jsx73("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
9236
+ /* @__PURE__ */ jsx74("path", { d: "m16 17 5-5-5-5" }),
9237
+ /* @__PURE__ */ jsx74("path", { d: "M21 12H9" }),
9238
+ /* @__PURE__ */ jsx74("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
9000
9239
  ]
9001
9240
  }
9002
9241
  );
9003
9242
  var LogOut_default = LogOut;
9004
9243
 
9005
9244
  // src/components/primitives/Icons/Plus.tsx
9006
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
9245
+ import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
9007
9246
  var Plus = (props) => /* @__PURE__ */ jsxs30(
9008
9247
  "svg",
9009
9248
  {
@@ -9018,15 +9257,15 @@ var Plus = (props) => /* @__PURE__ */ jsxs30(
9018
9257
  strokeLinejoin: "round",
9019
9258
  ...props,
9020
9259
  children: [
9021
- /* @__PURE__ */ jsx74("path", { d: "M5 12h14" }),
9022
- /* @__PURE__ */ jsx74("path", { d: "M12 5v14" })
9260
+ /* @__PURE__ */ jsx75("path", { d: "M5 12h14" }),
9261
+ /* @__PURE__ */ jsx75("path", { d: "M12 5v14" })
9023
9262
  ]
9024
9263
  }
9025
9264
  );
9026
9265
  var Plus_default = Plus;
9027
9266
 
9028
9267
  // src/components/primitives/Icons/User.tsx
9029
- import { jsx as jsx75, jsxs as jsxs31 } from "react/jsx-runtime";
9268
+ import { jsx as jsx76, jsxs as jsxs31 } from "react/jsx-runtime";
9030
9269
  var User7 = (props) => /* @__PURE__ */ jsxs31(
9031
9270
  "svg",
9032
9271
  {
@@ -9041,15 +9280,15 @@ var User7 = (props) => /* @__PURE__ */ jsxs31(
9041
9280
  strokeLinejoin: "round",
9042
9281
  ...props,
9043
9282
  children: [
9044
- /* @__PURE__ */ jsx75("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
9045
- /* @__PURE__ */ jsx75("circle", { cx: "12", cy: "7", r: "4" })
9283
+ /* @__PURE__ */ jsx76("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
9284
+ /* @__PURE__ */ jsx76("circle", { cx: "12", cy: "7", r: "4" })
9046
9285
  ]
9047
9286
  }
9048
9287
  );
9049
9288
  var User_default2 = User7;
9050
9289
 
9051
9290
  // src/components/primitives/Icons/X.tsx
9052
- import { jsx as jsx76, jsxs as jsxs32 } from "react/jsx-runtime";
9291
+ import { jsx as jsx77, jsxs as jsxs32 } from "react/jsx-runtime";
9053
9292
  var X = (props) => /* @__PURE__ */ jsxs32(
9054
9293
  "svg",
9055
9294
  {
@@ -9064,8 +9303,8 @@ var X = (props) => /* @__PURE__ */ jsxs32(
9064
9303
  strokeLinejoin: "round",
9065
9304
  ...props,
9066
9305
  children: [
9067
- /* @__PURE__ */ jsx76("path", { d: "M18 6 6 18" }),
9068
- /* @__PURE__ */ jsx76("path", { d: "m6 6 12 12" })
9306
+ /* @__PURE__ */ jsx77("path", { d: "M18 6 6 18" }),
9307
+ /* @__PURE__ */ jsx77("path", { d: "m6 6 12 12" })
9069
9308
  ]
9070
9309
  }
9071
9310
  );
@@ -9137,7 +9376,7 @@ var useStyles20 = (theme, colorScheme) => {
9137
9376
  var Dialog_styles_default = useStyles20;
9138
9377
 
9139
9378
  // src/components/primitives/Dialog/Dialog.tsx
9140
- import { jsx as jsx77, jsxs as jsxs33 } from "react/jsx-runtime";
9379
+ import { jsx as jsx78, jsxs as jsxs33 } from "react/jsx-runtime";
9141
9380
  function useDialog({
9142
9381
  initialOpen = false,
9143
9382
  open: controlledOpen,
@@ -9183,7 +9422,7 @@ var useDialogContext = () => {
9183
9422
  };
9184
9423
  function Dialog({ children, ...options }) {
9185
9424
  const dialog = useDialog(options);
9186
- return /* @__PURE__ */ jsx77(DialogContext.Provider, { value: dialog, children });
9425
+ return /* @__PURE__ */ jsx78(DialogContext.Provider, { value: dialog, children });
9187
9426
  }
9188
9427
  var DialogTrigger = React2.forwardRef(
9189
9428
  ({ children, asChild = false, ...props }, propRef) => {
@@ -9201,7 +9440,7 @@ var DialogTrigger = React2.forwardRef(
9201
9440
  })
9202
9441
  );
9203
9442
  }
9204
- return /* @__PURE__ */ jsx77("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
9443
+ return /* @__PURE__ */ jsx78("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
9205
9444
  }
9206
9445
  );
9207
9446
  var DialogContent = React2.forwardRef((props, propRef) => {
@@ -9210,7 +9449,7 @@ var DialogContent = React2.forwardRef((props, propRef) => {
9210
9449
  const styles = Dialog_styles_default(theme, colorScheme);
9211
9450
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
9212
9451
  if (!floatingContext.open) return null;
9213
- return /* @__PURE__ */ jsx77(FloatingPortal, { children: /* @__PURE__ */ jsx77(FloatingOverlay, { className: cx23(withVendorCSSClassPrefix23(bem17("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ jsx77(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx77(
9452
+ return /* @__PURE__ */ jsx78(FloatingPortal, { children: /* @__PURE__ */ jsx78(FloatingOverlay, { className: cx23(withVendorCSSClassPrefix23(bem17("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ jsx78(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx78(
9214
9453
  "div",
9215
9454
  {
9216
9455
  ref,
@@ -9233,7 +9472,7 @@ var DialogHeading = React2.forwardRef(
9233
9472
  return () => context.setLabelId(void 0);
9234
9473
  }, [id, context.setLabelId]);
9235
9474
  return /* @__PURE__ */ jsxs33("div", { className: cx23(withVendorCSSClassPrefix23(bem17("dialog", "header")), styles.header), children: [
9236
- /* @__PURE__ */ jsx77(
9475
+ /* @__PURE__ */ jsx78(
9237
9476
  "h2",
9238
9477
  {
9239
9478
  ...props,
@@ -9243,7 +9482,7 @@ var DialogHeading = React2.forwardRef(
9243
9482
  children
9244
9483
  }
9245
9484
  ),
9246
- /* @__PURE__ */ jsx77(
9485
+ /* @__PURE__ */ jsx78(
9247
9486
  Button_default,
9248
9487
  {
9249
9488
  color: "tertiary",
@@ -9252,7 +9491,7 @@ var DialogHeading = React2.forwardRef(
9252
9491
  shape: "round",
9253
9492
  onClick: () => context.setOpen(false),
9254
9493
  "aria-label": "Close",
9255
- children: /* @__PURE__ */ jsx77(X_default, { width: 16, height: 16 })
9494
+ children: /* @__PURE__ */ jsx78(X_default, { width: 16, height: 16 })
9256
9495
  }
9257
9496
  )
9258
9497
  ] });
@@ -9268,7 +9507,7 @@ var DialogDescription = React2.forwardRef(
9268
9507
  context.setDescriptionId(id);
9269
9508
  return () => context.setDescriptionId(void 0);
9270
9509
  }, [id, context.setDescriptionId]);
9271
- return /* @__PURE__ */ jsx77(
9510
+ return /* @__PURE__ */ jsx78(
9272
9511
  "p",
9273
9512
  {
9274
9513
  ...props,
@@ -9298,7 +9537,7 @@ var DialogClose = React2.forwardRef(({ children, asChild = false, ...props }, pr
9298
9537
  onClick: handleClick
9299
9538
  });
9300
9539
  }
9301
- return /* @__PURE__ */ jsx77(
9540
+ return /* @__PURE__ */ jsx78(
9302
9541
  Button_default,
9303
9542
  {
9304
9543
  ...props,
@@ -9421,7 +9660,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9421
9660
  var MultiInput_styles_default = useStyles21;
9422
9661
 
9423
9662
  // src/components/primitives/MultiInput/MultiInput.tsx
9424
- import { jsx as jsx78, jsxs as jsxs34 } from "react/jsx-runtime";
9663
+ import { jsx as jsx79, jsxs as jsxs34 } from "react/jsx-runtime";
9425
9664
  var MultiInput = ({
9426
9665
  label,
9427
9666
  error,
@@ -9444,8 +9683,8 @@ var MultiInput = ({
9444
9683
  const canAddMore = !maxFields || values.length < maxFields;
9445
9684
  const canRemove = values.length > minFields;
9446
9685
  const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
9447
- const PlusIcon = ({ className: className2 }) => /* @__PURE__ */ jsx78("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx24(styles.icon, className2), children: /* @__PURE__ */ jsx78("path", { d: "M12 5v14M5 12h14" }) });
9448
- const BinIcon = ({ className: className2 }) => /* @__PURE__ */ jsx78("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx24(styles.icon, className2), children: /* @__PURE__ */ jsx78("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
9686
+ const PlusIcon = ({ className: className2 }) => /* @__PURE__ */ jsx79("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx24(styles.icon, className2), children: /* @__PURE__ */ jsx79("path", { d: "M12 5v14M5 12h14" }) });
9687
+ const BinIcon = ({ className: className2 }) => /* @__PURE__ */ jsx79("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx24(styles.icon, className2), children: /* @__PURE__ */ jsx79("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
9449
9688
  const handleAddValue = useCallback12(
9450
9689
  (newValue) => {
9451
9690
  if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
@@ -9489,9 +9728,9 @@ var MultiInput = ({
9489
9728
  };
9490
9729
  switch (fieldType) {
9491
9730
  case "DATE_TIME":
9492
- return /* @__PURE__ */ jsx78(DatePicker_default, { ...commonProps });
9731
+ return /* @__PURE__ */ jsx79(DatePicker_default, { ...commonProps });
9493
9732
  case "BOOLEAN":
9494
- return /* @__PURE__ */ jsx78(
9733
+ return /* @__PURE__ */ jsx79(
9495
9734
  Checkbox_default,
9496
9735
  {
9497
9736
  ...commonProps,
@@ -9500,7 +9739,7 @@ var MultiInput = ({
9500
9739
  }
9501
9740
  );
9502
9741
  default:
9503
- return /* @__PURE__ */ jsx78(TextField_default, { ...commonProps, type });
9742
+ return /* @__PURE__ */ jsx79(TextField_default, { ...commonProps, type });
9504
9743
  }
9505
9744
  },
9506
9745
  [placeholder, disabled, startIcon, endIcon, error, fieldType, type]
@@ -9520,27 +9759,27 @@ var MultiInput = ({
9520
9759
  className: cx24(withVendorCSSClassPrefix24(bem18("multi-input")), className),
9521
9760
  style,
9522
9761
  children: [
9523
- label && /* @__PURE__ */ jsx78(InputLabel_default, { required, error: !!error, children: label }),
9762
+ label && /* @__PURE__ */ jsx79(InputLabel_default, { required, error: !!error, children: label }),
9524
9763
  /* @__PURE__ */ jsxs34("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "container")), styles.container), children: [
9525
- /* @__PURE__ */ jsx78("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ jsx78("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
9764
+ /* @__PURE__ */ jsx79("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ jsx79("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
9526
9765
  currentInputValue,
9527
9766
  setCurrentInputValue,
9528
- canAddMore ? /* @__PURE__ */ jsx78(PlusIcon, { className: styles.plusIcon }) : void 0,
9767
+ canAddMore ? /* @__PURE__ */ jsx79(PlusIcon, { className: styles.plusIcon }) : void 0,
9529
9768
  canAddMore ? handleInputSubmit : void 0
9530
9769
  ) }) }),
9531
- values.length > 0 && /* @__PURE__ */ jsx78("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ jsxs34(
9770
+ values.length > 0 && /* @__PURE__ */ jsx79("div", { className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ jsxs34(
9532
9771
  "div",
9533
9772
  {
9534
9773
  className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "list-item")), styles.listItem),
9535
9774
  children: [
9536
- /* @__PURE__ */ jsx78(
9775
+ /* @__PURE__ */ jsx79(
9537
9776
  "span",
9538
9777
  {
9539
9778
  className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "list-item-text")), styles.listItemText),
9540
9779
  children: value
9541
9780
  }
9542
9781
  ),
9543
- canRemove && /* @__PURE__ */ jsx78(
9782
+ canRemove && /* @__PURE__ */ jsx79(
9544
9783
  "button",
9545
9784
  {
9546
9785
  type: "button",
@@ -9548,7 +9787,7 @@ var MultiInput = ({
9548
9787
  disabled,
9549
9788
  className: cx24(withVendorCSSClassPrefix24(bem18("multi-input", "remove-button")), styles.removeButton),
9550
9789
  title: "Remove value",
9551
- children: /* @__PURE__ */ jsx78(BinIcon, { className: styles.icon })
9790
+ children: /* @__PURE__ */ jsx79(BinIcon, { className: styles.icon })
9552
9791
  }
9553
9792
  )
9554
9793
  ]
@@ -9592,7 +9831,7 @@ var useStyles22 = (theme, colorScheme) => {
9592
9831
  display: flex;
9593
9832
  gap: calc(${theme.vars.spacing.unit} / 2);
9594
9833
  align-items: center;
9595
- margin-left: calc(${theme.vars.spacing.unit} * 4);
9834
+ margin-inline-start: calc(${theme.vars.spacing.unit} * 4);
9596
9835
  `;
9597
9836
  const complexTextarea = css22`
9598
9837
  min-height: 60px;
@@ -9659,7 +9898,7 @@ var useStyles22 = (theme, colorScheme) => {
9659
9898
  width: 120px;
9660
9899
  flex-shrink: 0;
9661
9900
  line-height: 28px;
9662
- text-align: left;
9901
+ text-align: start;
9663
9902
  `;
9664
9903
  const value = css22`
9665
9904
  color: ${theme.vars.colors.text.primary};
@@ -9674,7 +9913,7 @@ var useStyles22 = (theme, colorScheme) => {
9674
9913
  text-overflow: ellipsis;
9675
9914
  white-space: nowrap;
9676
9915
  max-width: 350px;
9677
- text-align: left;
9916
+ text-align: start;
9678
9917
 
9679
9918
  .${withVendorCSSClassPrefix25("form-control")} {
9680
9919
  margin-bottom: 0;
@@ -9747,7 +9986,7 @@ var getDisplayName = (mergedMappings, user) => {
9747
9986
  var getDisplayName_default = getDisplayName;
9748
9987
 
9749
9988
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
9750
- import { Fragment as Fragment15, jsx as jsx79, jsxs as jsxs35 } from "react/jsx-runtime";
9989
+ import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs35 } from "react/jsx-runtime";
9751
9990
  var fieldsToSkip = [
9752
9991
  "roles.default",
9753
9992
  "active",
@@ -9807,7 +10046,7 @@ var BaseUserProfile = ({
9807
10046
  },
9808
10047
  [showFields, hideFields]
9809
10048
  );
9810
- const PencilIcon = () => /* @__PURE__ */ jsx79(
10049
+ const PencilIcon = () => /* @__PURE__ */ jsx80(
9811
10050
  "svg",
9812
10051
  {
9813
10052
  width: "16",
@@ -9818,7 +10057,7 @@ var BaseUserProfile = ({
9818
10057
  strokeWidth: "2",
9819
10058
  strokeLinecap: "round",
9820
10059
  strokeLinejoin: "round",
9821
- children: /* @__PURE__ */ jsx79("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
10060
+ children: /* @__PURE__ */ jsx80("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
9822
10061
  }
9823
10062
  );
9824
10063
  const toggleFieldEdit = useCallback13((fieldName) => {
@@ -9843,12 +10082,12 @@ var BaseUserProfile = ({
9843
10082
  }, []);
9844
10083
  const ObjectDisplay = ({ data }) => {
9845
10084
  if (!data || typeof data !== "object") return null;
9846
- return /* @__PURE__ */ jsx79("table", { className: styles.value, children: /* @__PURE__ */ jsx79("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs35("tr", { children: [
9847
- /* @__PURE__ */ jsx79("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs35("strong", { children: [
10085
+ return /* @__PURE__ */ jsx80("table", { className: styles.value, children: /* @__PURE__ */ jsx80("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs35("tr", { children: [
10086
+ /* @__PURE__ */ jsx80("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs35("strong", { children: [
9848
10087
  formatLabel(key),
9849
10088
  ":"
9850
10089
  ] }) }),
9851
- /* @__PURE__ */ jsx79("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx79(ObjectDisplay, { data: value }) : String(value) })
10090
+ /* @__PURE__ */ jsx80("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx80(ObjectDisplay, { data: value }) : String(value) })
9852
10091
  ] }, key)) }) });
9853
10092
  };
9854
10093
  function set(obj, path, value) {
@@ -9921,9 +10160,9 @@ var BaseUserProfile = ({
9921
10160
  const { value, displayName, description, name, type, required, mutability, subAttributes, multiValued } = schema;
9922
10161
  const label = displayName || description || name || "";
9923
10162
  if (subAttributes && Array.isArray(subAttributes)) {
9924
- return /* @__PURE__ */ jsx79(Fragment15, { children: subAttributes.map((subAttr, index) => /* @__PURE__ */ jsxs35("div", { className: styles.field, children: [
9925
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
9926
- /* @__PURE__ */ jsx79("div", { className: styles.value, children: Array.isArray(subAttr.value) ? subAttr.value.map((item) => typeof item === "object" ? JSON.stringify(item) : String(item)).join(", ") : typeof subAttr.value === "object" ? JSON.stringify(subAttr.value) : String(subAttr.value) })
10163
+ return /* @__PURE__ */ jsx80(Fragment15, { children: subAttributes.map((subAttr, index) => /* @__PURE__ */ jsxs35("div", { className: styles.field, children: [
10164
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
10165
+ /* @__PURE__ */ jsx80("div", { className: styles.value, children: Array.isArray(subAttr.value) ? subAttr.value.map((item) => typeof item === "object" ? JSON.stringify(item) : String(item)).join(", ") : typeof subAttr.value === "object" ? JSON.stringify(subAttr.value) : String(subAttr.value) })
9927
10166
  ] }, index)) });
9928
10167
  }
9929
10168
  if (Array.isArray(value) || multiValued) {
@@ -9940,8 +10179,8 @@ var BaseUserProfile = ({
9940
10179
  fieldValues = [];
9941
10180
  }
9942
10181
  return /* @__PURE__ */ jsxs35(Fragment15, { children: [
9943
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: label }),
9944
- /* @__PURE__ */ jsx79("div", { className: styles.value, children: /* @__PURE__ */ jsx79(
10182
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: label }),
10183
+ /* @__PURE__ */ jsx80("div", { className: styles.value, children: /* @__PURE__ */ jsx80(
9945
10184
  MultiInput_default,
9946
10185
  {
9947
10186
  values: fieldValues,
@@ -9973,8 +10212,8 @@ var BaseUserProfile = ({
9973
10212
  displayValue2 = "-";
9974
10213
  }
9975
10214
  return /* @__PURE__ */ jsxs35(Fragment15, { children: [
9976
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: label }),
9977
- /* @__PURE__ */ jsx79("div", { className: cx25(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx79(
10215
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: label }),
10216
+ /* @__PURE__ */ jsx80("div", { className: cx25(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx80(
9978
10217
  Button_default,
9979
10218
  {
9980
10219
  onClick: onStartEdit,
@@ -9989,7 +10228,7 @@ var BaseUserProfile = ({
9989
10228
  ] });
9990
10229
  }
9991
10230
  if (type === "COMPLEX" && typeof value === "object") {
9992
- return /* @__PURE__ */ jsx79(ObjectDisplay, { data: value });
10231
+ return /* @__PURE__ */ jsx80(ObjectDisplay, { data: value });
9993
10232
  }
9994
10233
  if (isEditing && onEditValue && mutability !== "READ_ONLY" && !readonlyFields.includes(name || "")) {
9995
10234
  const fieldValue = editedUser && name && editedUser[name] !== void 0 ? editedUser[name] : flattenedProfile && name && flattenedProfile[name] !== void 0 ? flattenedProfile[name] : value || "";
@@ -10004,16 +10243,16 @@ var BaseUserProfile = ({
10004
10243
  let field;
10005
10244
  switch (type) {
10006
10245
  case "STRING":
10007
- field = /* @__PURE__ */ jsx79(TextField_default, { ...commonProps });
10246
+ field = /* @__PURE__ */ jsx80(TextField_default, { ...commonProps });
10008
10247
  break;
10009
10248
  case "DATE_TIME":
10010
- field = /* @__PURE__ */ jsx79(DatePicker_default, { ...commonProps });
10249
+ field = /* @__PURE__ */ jsx80(DatePicker_default, { ...commonProps });
10011
10250
  break;
10012
10251
  case "BOOLEAN":
10013
- field = /* @__PURE__ */ jsx79(Checkbox_default, { ...commonProps, checked: !!fieldValue, onChange: (e) => onEditValue(e.target.checked) });
10252
+ field = /* @__PURE__ */ jsx80(Checkbox_default, { ...commonProps, checked: !!fieldValue, onChange: (e) => onEditValue(e.target.checked) });
10014
10253
  break;
10015
10254
  case "COMPLEX":
10016
- field = /* @__PURE__ */ jsx79(
10255
+ field = /* @__PURE__ */ jsx80(
10017
10256
  "textarea",
10018
10257
  {
10019
10258
  value: fieldValue,
@@ -10025,11 +10264,11 @@ var BaseUserProfile = ({
10025
10264
  );
10026
10265
  break;
10027
10266
  default:
10028
- field = /* @__PURE__ */ jsx79(TextField_default, { ...commonProps });
10267
+ field = /* @__PURE__ */ jsx80(TextField_default, { ...commonProps });
10029
10268
  }
10030
10269
  return /* @__PURE__ */ jsxs35(Fragment15, { children: [
10031
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: label }),
10032
- /* @__PURE__ */ jsx79("div", { className: styles.value, children: field })
10270
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: label }),
10271
+ /* @__PURE__ */ jsx80("div", { className: styles.value, children: field })
10033
10272
  ] });
10034
10273
  }
10035
10274
  const hasValue = value !== void 0 && value !== null && value !== "";
@@ -10043,8 +10282,8 @@ var BaseUserProfile = ({
10043
10282
  displayValue = "-";
10044
10283
  }
10045
10284
  return /* @__PURE__ */ jsxs35(Fragment15, { children: [
10046
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: label }),
10047
- /* @__PURE__ */ jsx79("div", { className: cx25(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx79(
10285
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: label }),
10286
+ /* @__PURE__ */ jsx80("div", { className: cx25(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx80(
10048
10287
  Button_default,
10049
10288
  {
10050
10289
  onClick: onStartEdit,
@@ -10073,7 +10312,7 @@ var BaseUserProfile = ({
10073
10312
  gap: theme.vars.spacing.unit
10074
10313
  };
10075
10314
  return /* @__PURE__ */ jsxs35("div", { className: styles.field, children: [
10076
- /* @__PURE__ */ jsx79("div", { className: styles.fieldInner, children: renderSchemaField(
10315
+ /* @__PURE__ */ jsx80("div", { className: styles.fieldInner, children: renderSchemaField(
10077
10316
  schema,
10078
10317
  isFieldEditing,
10079
10318
  (value) => {
@@ -10085,10 +10324,10 @@ var BaseUserProfile = ({
10085
10324
  ) }),
10086
10325
  editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs35("div", { className: styles.fieldActions, children: [
10087
10326
  isFieldEditing && /* @__PURE__ */ jsxs35(Fragment15, { children: [
10088
- /* @__PURE__ */ jsx79(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
10089
- /* @__PURE__ */ jsx79(Button_default, { size: "small", color: "secondary", variant: "solid", onClick: () => handleFieldCancel(schema.name), children: "Cancel" })
10327
+ /* @__PURE__ */ jsx80(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
10328
+ /* @__PURE__ */ jsx80(Button_default, { size: "small", color: "secondary", variant: "solid", onClick: () => handleFieldCancel(schema.name), children: "Cancel" })
10090
10329
  ] }),
10091
- !isFieldEditing && hasValue && /* @__PURE__ */ jsx79(
10330
+ !isFieldEditing && hasValue && /* @__PURE__ */ jsx80(
10092
10331
  Button_default,
10093
10332
  {
10094
10333
  size: "small",
@@ -10097,7 +10336,7 @@ var BaseUserProfile = ({
10097
10336
  onClick: () => toggleFieldEdit(schema.name),
10098
10337
  title: "Edit",
10099
10338
  className: styles.editButton,
10100
- children: /* @__PURE__ */ jsx79(PencilIcon, {})
10339
+ children: /* @__PURE__ */ jsx80(PencilIcon, {})
10101
10340
  }
10102
10341
  )
10103
10342
  ] })
@@ -10121,17 +10360,17 @@ var BaseUserProfile = ({
10121
10360
  if (!shouldShowField(key)) return false;
10122
10361
  return value !== void 0 && value !== "" && value !== null;
10123
10362
  }).sort(([a], [b]) => a.localeCompare(b));
10124
- return /* @__PURE__ */ jsx79(Fragment15, { children: profileEntries.map(([key, value]) => /* @__PURE__ */ jsxs35("div", { className: styles.field, children: [
10125
- /* @__PURE__ */ jsx79("span", { className: styles.label, children: formatLabel(key) }),
10126
- /* @__PURE__ */ jsx79("div", { className: styles.value, children: typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) })
10363
+ return /* @__PURE__ */ jsx80(Fragment15, { children: profileEntries.map(([key, value]) => /* @__PURE__ */ jsxs35("div", { className: styles.field, children: [
10364
+ /* @__PURE__ */ jsx80("span", { className: styles.label, children: formatLabel(key) }),
10365
+ /* @__PURE__ */ jsx80("div", { className: styles.value, children: typeof value === "object" ? JSON.stringify(value, null, 2) : String(value) })
10127
10366
  ] }, key)) });
10128
10367
  };
10129
10368
  const profileContent = /* @__PURE__ */ jsxs35(Card_default, { className: containerClasses, children: [
10130
10369
  error && /* @__PURE__ */ jsxs35(Alert_default, { variant: "error", className: cx25(withVendorCSSClassPrefix26(bem19("user-profile", "alert")), styles.alert), children: [
10131
- /* @__PURE__ */ jsx79(Alert_default.Title, { children: t("errors.title") || "Error" }),
10132
- /* @__PURE__ */ jsx79(Alert_default.Description, { children: error })
10370
+ /* @__PURE__ */ jsx80(Alert_default.Title, { children: t("errors.title") || "Error" }),
10371
+ /* @__PURE__ */ jsx80(Alert_default.Description, { children: error })
10133
10372
  ] }),
10134
- /* @__PURE__ */ jsx79("div", { className: styles.header, children: /* @__PURE__ */ jsx79(
10373
+ /* @__PURE__ */ jsx80("div", { className: styles.header, children: /* @__PURE__ */ jsx80(
10135
10374
  Avatar,
10136
10375
  {
10137
10376
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
@@ -10141,7 +10380,7 @@ var BaseUserProfile = ({
10141
10380
  isLoading
10142
10381
  }
10143
10382
  ) }),
10144
- /* @__PURE__ */ jsx79("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
10383
+ /* @__PURE__ */ jsx80("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
10145
10384
  if (!schema.name || !shouldShowField(schema.name)) return false;
10146
10385
  if (!editable) {
10147
10386
  const value = flattenedProfile && schema.name ? flattenedProfile[schema.name] : void 0;
@@ -10158,13 +10397,13 @@ var BaseUserProfile = ({
10158
10397
  ...schema,
10159
10398
  value
10160
10399
  };
10161
- return /* @__PURE__ */ jsx79("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
10400
+ return /* @__PURE__ */ jsx80("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
10162
10401
  }) : renderProfileWithoutSchemas() })
10163
10402
  ] });
10164
10403
  if (mode === "popup") {
10165
- return /* @__PURE__ */ jsx79(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs35(Dialog_default.Content, { children: [
10166
- /* @__PURE__ */ jsx79(Dialog_default.Heading, { children: title ?? t("user.profile.title") }),
10167
- /* @__PURE__ */ jsx79("div", { className: styles.popup, children: profileContent })
10404
+ return /* @__PURE__ */ jsx80(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs35(Dialog_default.Content, { children: [
10405
+ /* @__PURE__ */ jsx80(Dialog_default.Heading, { children: title ?? t("user.profile.title") }),
10406
+ /* @__PURE__ */ jsx80("div", { className: styles.popup, children: profileContent })
10168
10407
  ] }) });
10169
10408
  }
10170
10409
  return profileContent;
@@ -10205,7 +10444,7 @@ var updateMeProfile_default = updateMeProfile;
10205
10444
 
10206
10445
  // src/components/presentation/UserProfile/UserProfile.tsx
10207
10446
  import { AsgardeoError } from "@asgardeo/browser";
10208
- import { jsx as jsx80 } from "react/jsx-runtime";
10447
+ import { jsx as jsx81 } from "react/jsx-runtime";
10209
10448
  var UserProfile3 = ({ ...rest }) => {
10210
10449
  const { baseUrl, isLoading } = useAsgardeo_default();
10211
10450
  const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
@@ -10224,7 +10463,7 @@ var UserProfile3 = ({ ...rest }) => {
10224
10463
  setError(message);
10225
10464
  }
10226
10465
  };
10227
- return /* @__PURE__ */ jsx80(
10466
+ return /* @__PURE__ */ jsx81(
10228
10467
  BaseUserProfile_default,
10229
10468
  {
10230
10469
  profile,
@@ -10324,7 +10563,7 @@ var useStyles23 = (theme, colorScheme) => {
10324
10563
  border: none;
10325
10564
  cursor: pointer;
10326
10565
  font-size: 0.875rem;
10327
- text-align: left;
10566
+ text-align: start;
10328
10567
  border-radius: ${theme.vars.borderRadius.medium};
10329
10568
  transition: none;
10330
10569
  box-shadow: none;
@@ -10353,7 +10592,7 @@ var useStyles23 = (theme, colorScheme) => {
10353
10592
  background: none;
10354
10593
  cursor: pointer;
10355
10594
  font-size: 0.875rem;
10356
- text-align: left;
10595
+ text-align: start;
10357
10596
  border-radius: ${theme.vars.borderRadius.medium};
10358
10597
  transition: background-color 0.15s ease-in-out;
10359
10598
 
@@ -10441,7 +10680,7 @@ var useStyles23 = (theme, colorScheme) => {
10441
10680
  var BaseUserDropdown_styles_default = useStyles23;
10442
10681
 
10443
10682
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
10444
- import { jsx as jsx81, jsxs as jsxs36 } from "react/jsx-runtime";
10683
+ import { jsx as jsx82, jsxs as jsxs36 } from "react/jsx-runtime";
10445
10684
  var BaseUserDropdown = ({
10446
10685
  fallback = null,
10447
10686
  className = "",
@@ -10495,14 +10734,14 @@ var BaseUserDropdown = ({
10495
10734
  defaultMenuItems.push({
10496
10735
  label: "Manage Profile",
10497
10736
  onClick: onManageProfile,
10498
- icon: /* @__PURE__ */ jsx81(User_default2, { width: "16", height: "16" })
10737
+ icon: /* @__PURE__ */ jsx82(User_default2, { width: "16", height: "16" })
10499
10738
  });
10500
10739
  }
10501
10740
  if (onSignOut) {
10502
10741
  defaultMenuItems.push({
10503
10742
  label: "Sign Out",
10504
10743
  onClick: onSignOut,
10505
- icon: /* @__PURE__ */ jsx81(LogOut_default, { width: "16", height: "16" })
10744
+ icon: /* @__PURE__ */ jsx82(LogOut_default, { width: "16", height: "16" })
10506
10745
  });
10507
10746
  }
10508
10747
  const allMenuItems = [...menuItems];
@@ -10523,7 +10762,7 @@ var BaseUserDropdown = ({
10523
10762
  size: "medium",
10524
10763
  ...getReferenceProps(),
10525
10764
  children: [
10526
- /* @__PURE__ */ jsx81(
10765
+ /* @__PURE__ */ jsx82(
10527
10766
  Avatar,
10528
10767
  {
10529
10768
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -10532,7 +10771,7 @@ var BaseUserDropdown = ({
10532
10771
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
10533
10772
  }
10534
10773
  ),
10535
- showTriggerLabel && /* @__PURE__ */ jsx81(
10774
+ showTriggerLabel && /* @__PURE__ */ jsx82(
10536
10775
  Typography_default,
10537
10776
  {
10538
10777
  variant: "body2",
@@ -10543,7 +10782,7 @@ var BaseUserDropdown = ({
10543
10782
  ]
10544
10783
  }
10545
10784
  ),
10546
- isOpen && /* @__PURE__ */ jsx81(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx81(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs36(
10785
+ isOpen && /* @__PURE__ */ jsx82(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx82(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs36(
10547
10786
  "div",
10548
10787
  {
10549
10788
  ref: refs.setFloating,
@@ -10557,7 +10796,7 @@ var BaseUserDropdown = ({
10557
10796
  ...getFloatingProps(),
10558
10797
  children: [
10559
10798
  /* @__PURE__ */ jsxs36("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__header"), styles.dropdownHeader), children: [
10560
- /* @__PURE__ */ jsx81(
10799
+ /* @__PURE__ */ jsx82(
10561
10800
  Avatar,
10562
10801
  {
10563
10802
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -10567,7 +10806,7 @@ var BaseUserDropdown = ({
10567
10806
  }
10568
10807
  ),
10569
10808
  /* @__PURE__ */ jsxs36("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__header-info"), styles.headerInfo), children: [
10570
- /* @__PURE__ */ jsx81(
10809
+ /* @__PURE__ */ jsx82(
10571
10810
  Typography_default,
10572
10811
  {
10573
10812
  noWrap: true,
@@ -10577,7 +10816,7 @@ var BaseUserDropdown = ({
10577
10816
  children: getDisplayName_default(mergedMappings, user)
10578
10817
  }
10579
10818
  ),
10580
- /* @__PURE__ */ jsx81(
10819
+ /* @__PURE__ */ jsx82(
10581
10820
  Typography_default,
10582
10821
  {
10583
10822
  noWrap: true,
@@ -10589,7 +10828,7 @@ var BaseUserDropdown = ({
10589
10828
  )
10590
10829
  ] })
10591
10830
  ] }),
10592
- /* @__PURE__ */ jsx81("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx81("div", { children: item.label === "" ? /* @__PURE__ */ jsx81("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ jsxs36(
10831
+ /* @__PURE__ */ jsx82("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx82("div", { children: item.label === "" ? /* @__PURE__ */ jsx82("div", { className: cx26(withVendorCSSClassPrefix27("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ jsxs36(
10593
10832
  "a",
10594
10833
  {
10595
10834
  href: item.href,
@@ -10603,10 +10842,10 @@ var BaseUserDropdown = ({
10603
10842
  onBlur: () => setHoveredItemIndex(null),
10604
10843
  children: [
10605
10844
  item.icon,
10606
- /* @__PURE__ */ jsx81("span", { children: item.label })
10845
+ /* @__PURE__ */ jsx82("span", { children: item.label })
10607
10846
  ]
10608
10847
  }
10609
- ) : /* @__PURE__ */ jsx81(
10848
+ ) : /* @__PURE__ */ jsx82(
10610
10849
  Button_default,
10611
10850
  {
10612
10851
  onClick: () => handleMenuItemClick(item),
@@ -10632,7 +10871,7 @@ var BaseUserDropdown_default = BaseUserDropdown;
10632
10871
 
10633
10872
  // src/components/presentation/UserDropdown/UserDropdown.tsx
10634
10873
  import { useState as useState22 } from "react";
10635
- import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs37 } from "react/jsx-runtime";
10874
+ import { Fragment as Fragment16, jsx as jsx83, jsxs as jsxs37 } from "react/jsx-runtime";
10636
10875
  var UserDropdown = ({
10637
10876
  children,
10638
10877
  renderTrigger,
@@ -10663,12 +10902,12 @@ var UserDropdown = ({
10663
10902
  if (children) {
10664
10903
  return /* @__PURE__ */ jsxs37(Fragment16, { children: [
10665
10904
  children(renderProps),
10666
- /* @__PURE__ */ jsx82(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10905
+ /* @__PURE__ */ jsx83(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10667
10906
  ] });
10668
10907
  }
10669
10908
  if (renderTrigger || renderDropdown) {
10670
10909
  return /* @__PURE__ */ jsxs37(Fragment16, { children: [
10671
- renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx82(
10910
+ renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx83(
10672
10911
  BaseUserDropdown_default,
10673
10912
  {
10674
10913
  user,
@@ -10678,11 +10917,11 @@ var UserDropdown = ({
10678
10917
  ...rest
10679
10918
  }
10680
10919
  ),
10681
- /* @__PURE__ */ jsx82(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10920
+ /* @__PURE__ */ jsx83(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10682
10921
  ] });
10683
10922
  }
10684
10923
  return /* @__PURE__ */ jsxs37(Fragment16, { children: [
10685
- /* @__PURE__ */ jsx82(
10924
+ /* @__PURE__ */ jsx83(
10686
10925
  BaseUserDropdown_default,
10687
10926
  {
10688
10927
  user,
@@ -10692,7 +10931,7 @@ var UserDropdown = ({
10692
10931
  ...rest
10693
10932
  }
10694
10933
  ),
10695
- isProfileOpen && /* @__PURE__ */ jsx82(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10934
+ isProfileOpen && /* @__PURE__ */ jsx83(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
10696
10935
  ] });
10697
10936
  };
10698
10937
  var UserDropdown_default = UserDropdown;
@@ -10715,9 +10954,9 @@ import { cx as cx27 } from "@emotion/css";
10715
10954
  import { useState as useState23 } from "react";
10716
10955
 
10717
10956
  // src/components/primitives/Icons/Building.tsx
10718
- import { jsx as jsx83, jsxs as jsxs38 } from "react/jsx-runtime";
10957
+ import { jsx as jsx84, jsxs as jsxs38 } from "react/jsx-runtime";
10719
10958
  var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs38("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
10720
- /* @__PURE__ */ jsx83(
10959
+ /* @__PURE__ */ jsx84(
10721
10960
  "path",
10722
10961
  {
10723
10962
  d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",
@@ -10727,25 +10966,25 @@ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PU
10727
10966
  strokeLinejoin: "round"
10728
10967
  }
10729
10968
  ),
10730
- /* @__PURE__ */ jsx83("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10731
- /* @__PURE__ */ jsx83("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10732
- /* @__PURE__ */ jsx83("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10733
- /* @__PURE__ */ jsx83("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10734
- /* @__PURE__ */ jsx83("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10735
- /* @__PURE__ */ jsx83("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
10969
+ /* @__PURE__ */ jsx84("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10970
+ /* @__PURE__ */ jsx84("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10971
+ /* @__PURE__ */ jsx84("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10972
+ /* @__PURE__ */ jsx84("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10973
+ /* @__PURE__ */ jsx84("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
10974
+ /* @__PURE__ */ jsx84("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
10736
10975
  ] });
10737
10976
  Building.displayName = "Building";
10738
10977
  var Building_default = Building;
10739
10978
 
10740
10979
  // src/components/primitives/Icons/Check.tsx
10741
- import { jsx as jsx84 } from "react/jsx-runtime";
10742
- var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx84("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx84("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
10980
+ import { jsx as jsx85 } from "react/jsx-runtime";
10981
+ var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx85("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx85("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
10743
10982
  Check.displayName = "Check";
10744
10983
  var Check_default = Check;
10745
10984
 
10746
10985
  // src/components/primitives/Icons/ChevronDown.tsx
10747
- import { jsx as jsx85 } from "react/jsx-runtime";
10748
- var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx85("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx85("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
10986
+ import { jsx as jsx86 } from "react/jsx-runtime";
10987
+ var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx86("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx86("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
10749
10988
  ChevronDown.displayName = "ChevronDown";
10750
10989
  var ChevronDown_default = ChevronDown;
10751
10990
 
@@ -10838,7 +11077,7 @@ var useStyles24 = (theme, colorScheme) => {
10838
11077
  `;
10839
11078
  const manageButton = css24`
10840
11079
  min-width: auto;
10841
- margin-left: auto;
11080
+ margin-inline-start: auto;
10842
11081
  `;
10843
11082
  const menu = css24`
10844
11083
  display: flex;
@@ -10858,7 +11097,7 @@ var useStyles24 = (theme, colorScheme) => {
10858
11097
  background-color: transparent;
10859
11098
  cursor: pointer;
10860
11099
  font-size: 0.875rem;
10861
- text-align: left;
11100
+ text-align: start;
10862
11101
  border-radius: ${theme.vars.borderRadius.medium};
10863
11102
  transition: background-color 0.15s ease-in-out;
10864
11103
 
@@ -10975,7 +11214,7 @@ var useStyles24 = (theme, colorScheme) => {
10975
11214
  var BaseOrganizationSwitcher_styles_default = useStyles24;
10976
11215
 
10977
11216
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
10978
- import { Fragment as Fragment17, jsx as jsx86, jsxs as jsxs39 } from "react/jsx-runtime";
11217
+ import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs39 } from "react/jsx-runtime";
10979
11218
  var BaseOrganizationSwitcher = ({
10980
11219
  organizations,
10981
11220
  currentOrganization,
@@ -10996,11 +11235,12 @@ var BaseOrganizationSwitcher = ({
10996
11235
  avatarSize = 24,
10997
11236
  fallback = null
10998
11237
  }) => {
10999
- const { theme, colorScheme } = useTheme_default();
11238
+ const { theme, colorScheme, direction } = useTheme_default();
11000
11239
  const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
11001
11240
  const [isOpen, setIsOpen] = useState23(false);
11002
11241
  const [hoveredItemIndex, setHoveredItemIndex] = useState23(null);
11003
11242
  const { t } = useTranslation_default();
11243
+ const isRTL = direction === "rtl";
11004
11244
  const { refs, floatingStyles, context } = useFloating3({
11005
11245
  open: isOpen,
11006
11246
  onOpenChange: setIsOpen,
@@ -11029,7 +11269,7 @@ var BaseOrganizationSwitcher = ({
11029
11269
  (org) => org.id !== currentOrganization?.id
11030
11270
  );
11031
11271
  const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs39(Fragment17, { children: [
11032
- /* @__PURE__ */ jsx86(
11272
+ /* @__PURE__ */ jsx87(
11033
11273
  Avatar,
11034
11274
  {
11035
11275
  variant: "square",
@@ -11040,21 +11280,21 @@ var BaseOrganizationSwitcher = ({
11040
11280
  }
11041
11281
  ),
11042
11282
  /* @__PURE__ */ jsxs39("div", { className: cx27(styles.organizationInfo), children: [
11043
- /* @__PURE__ */ jsx86(Typography_default, { variant: "body2", fontWeight: "medium", className: cx27(styles.organizationName), children: organization.name }),
11283
+ /* @__PURE__ */ jsx87(Typography_default, { variant: "body2", fontWeight: "medium", className: cx27(styles.organizationName), children: organization.name }),
11044
11284
  /* @__PURE__ */ jsxs39("div", { className: cx27(styles.organizationMeta), children: [
11045
11285
  showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs39("span", { children: [
11046
11286
  organization.memberCount,
11047
11287
  " ",
11048
11288
  organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
11049
11289
  ] }),
11050
- showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx86("span", { children: " \u2022 " }),
11051
- showRole && organization.role && /* @__PURE__ */ jsx86("span", { className: cx27(styles.roleCapitalized), children: organization.role })
11290
+ showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx87("span", { children: " \u2022 " }),
11291
+ showRole && organization.role && /* @__PURE__ */ jsx87("span", { className: cx27(styles.roleCapitalized), children: organization.role })
11052
11292
  ] })
11053
11293
  ] }),
11054
- isSelected && /* @__PURE__ */ jsx86(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
11294
+ isSelected && /* @__PURE__ */ jsx87(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
11055
11295
  ] });
11056
- const defaultRenderLoading2 = () => /* @__PURE__ */ jsx86("div", { className: cx27(styles.loadingContainer), children: /* @__PURE__ */ jsx86(Typography_default, { variant: "caption", className: cx27(styles.loadingText), children: t("organization.switcher.loading.organizations") }) });
11057
- const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx86("div", { className: cx27(styles.errorContainer), children: /* @__PURE__ */ jsx86(Typography_default, { variant: "caption", className: cx27(styles.errorText), children: errorMessage }) });
11296
+ const defaultRenderLoading2 = () => /* @__PURE__ */ jsx87("div", { className: cx27(styles.loadingContainer), children: /* @__PURE__ */ jsx87(Typography_default, { variant: "caption", className: cx27(styles.loadingText), children: t("organization.switcher.loading.organizations") }) });
11297
+ const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx87("div", { className: cx27(styles.errorContainer), children: /* @__PURE__ */ jsx87(Typography_default, { variant: "caption", className: cx27(styles.errorText), children: errorMessage }) });
11058
11298
  return /* @__PURE__ */ jsxs39("div", { className: cx27(styles.root, className), style, children: [
11059
11299
  /* @__PURE__ */ jsxs39(
11060
11300
  Button_default,
@@ -11067,7 +11307,7 @@ var BaseOrganizationSwitcher = ({
11067
11307
  ...getReferenceProps(),
11068
11308
  children: [
11069
11309
  currentOrganization ? /* @__PURE__ */ jsxs39(Fragment17, { children: [
11070
- /* @__PURE__ */ jsx86(
11310
+ /* @__PURE__ */ jsx87(
11071
11311
  Avatar,
11072
11312
  {
11073
11313
  variant: "square",
@@ -11077,18 +11317,18 @@ var BaseOrganizationSwitcher = ({
11077
11317
  alt: `${currentOrganization.name} avatar`
11078
11318
  }
11079
11319
  ),
11080
- showTriggerLabel && /* @__PURE__ */ jsx86(Typography_default, { variant: "body2", className: cx27(styles.triggerLabel), children: currentOrganization.name })
11320
+ showTriggerLabel && /* @__PURE__ */ jsx87(Typography_default, { variant: "body2", className: cx27(styles.triggerLabel), children: currentOrganization.name })
11081
11321
  ] }) : /* @__PURE__ */ jsxs39(Fragment17, { children: [
11082
- /* @__PURE__ */ jsx86(Building_default, { width: avatarSize, height: avatarSize }),
11083
- showTriggerLabel && /* @__PURE__ */ jsx86(Typography_default, { variant: "body2", className: cx27(styles.triggerLabel), children: t("organization.switcher.select.organization") })
11322
+ /* @__PURE__ */ jsx87(Building_default, { width: avatarSize, height: avatarSize }),
11323
+ showTriggerLabel && /* @__PURE__ */ jsx87(Typography_default, { variant: "body2", className: cx27(styles.triggerLabel), children: t("organization.switcher.select.organization") })
11084
11324
  ] }),
11085
- /* @__PURE__ */ jsx86(ChevronDown_default, { width: "16", height: "16" })
11325
+ /* @__PURE__ */ jsx87("span", { style: { transform: isRTL ? "scaleX(-1)" : "none", display: "inline-flex" }, children: /* @__PURE__ */ jsx87(ChevronDown_default, { width: "16", height: "16" }) })
11086
11326
  ]
11087
11327
  }
11088
11328
  ),
11089
- isOpen && /* @__PURE__ */ jsx86(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx86(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs39("div", { ref: refs.setFloating, className: cx27(styles.content), style: floatingStyles, ...getFloatingProps(), children: [
11329
+ isOpen && /* @__PURE__ */ jsx87(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx87(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs39("div", { ref: refs.setFloating, className: cx27(styles.content), style: floatingStyles, ...getFloatingProps(), children: [
11090
11330
  currentOrganization && /* @__PURE__ */ jsxs39("div", { className: cx27(styles.header), children: [
11091
- /* @__PURE__ */ jsx86(
11331
+ /* @__PURE__ */ jsx87(
11092
11332
  Avatar,
11093
11333
  {
11094
11334
  variant: "square",
@@ -11099,7 +11339,7 @@ var BaseOrganizationSwitcher = ({
11099
11339
  }
11100
11340
  ),
11101
11341
  /* @__PURE__ */ jsxs39("div", { className: cx27(styles.headerInfo), children: [
11102
- /* @__PURE__ */ jsx86(Typography_default, { noWrap: true, className: cx27(styles.headerName), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
11342
+ /* @__PURE__ */ jsx87(Typography_default, { noWrap: true, className: cx27(styles.headerName), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
11103
11343
  /* @__PURE__ */ jsxs39("div", { className: cx27(styles.headerMeta), children: [
11104
11344
  showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs39(
11105
11345
  Typography_default,
@@ -11118,10 +11358,10 @@ var BaseOrganizationSwitcher = ({
11118
11358
  ]
11119
11359
  }
11120
11360
  ),
11121
- showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx86(Typography_default, { noWrap: true, className: cx27(styles.headerRole), variant: "caption", color: "secondary", children: currentOrganization.role })
11361
+ showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx87(Typography_default, { noWrap: true, className: cx27(styles.headerRole), variant: "caption", color: "secondary", children: currentOrganization.role })
11122
11362
  ] })
11123
11363
  ] }),
11124
- onManageProfile && /* @__PURE__ */ jsx86(
11364
+ onManageProfile && /* @__PURE__ */ jsx87(
11125
11365
  Button_default,
11126
11366
  {
11127
11367
  onClick: onManageProfile,
@@ -11142,8 +11382,8 @@ var BaseOrganizationSwitcher = ({
11142
11382
  strokeLinecap: "round",
11143
11383
  strokeLinejoin: "round",
11144
11384
  children: [
11145
- /* @__PURE__ */ jsx86("circle", { cx: "12", cy: "12", r: "3" }),
11146
- /* @__PURE__ */ jsx86("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
11385
+ /* @__PURE__ */ jsx87("circle", { cx: "12", cy: "12", r: "3" }),
11386
+ /* @__PURE__ */ jsx87("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
11147
11387
  ]
11148
11388
  }
11149
11389
  ),
@@ -11151,20 +11391,20 @@ var BaseOrganizationSwitcher = ({
11151
11391
  }
11152
11392
  )
11153
11393
  ] }),
11154
- organizations.length > 1 && /* @__PURE__ */ jsx86(
11394
+ organizations.length > 1 && /* @__PURE__ */ jsx87(
11155
11395
  "div",
11156
11396
  {
11157
11397
  className: cx27(styles.header, styles.sectionHeaderContainer),
11158
11398
  style: {
11159
11399
  borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
11160
11400
  },
11161
- children: /* @__PURE__ */ jsx86(Typography_default, { variant: "caption", fontWeight: 600, className: cx27(styles.sectionHeader), children: t("organization.switcher.switch.organization") })
11401
+ children: /* @__PURE__ */ jsx87(Typography_default, { variant: "caption", fontWeight: 600, className: cx27(styles.sectionHeader), children: t("organization.switcher.switch.organization") })
11162
11402
  }
11163
11403
  ),
11164
- /* @__PURE__ */ jsx86("div", { className: cx27(styles.menu), children: loading ? renderLoading ? renderLoading() : defaultRenderLoading2() : error ? renderError ? renderError(error) : defaultRenderError2(error) : /* @__PURE__ */ jsxs39(Fragment17, { children: [
11404
+ /* @__PURE__ */ jsx87("div", { className: cx27(styles.menu), children: loading ? renderLoading ? renderLoading() : defaultRenderLoading2() : error ? renderError ? renderError(error) : defaultRenderError2(error) : /* @__PURE__ */ jsxs39(Fragment17, { children: [
11165
11405
  switchableOrganizations.map((organization) => {
11166
11406
  const isSelected = false;
11167
- return /* @__PURE__ */ jsx86(
11407
+ return /* @__PURE__ */ jsx87(
11168
11408
  Button_default,
11169
11409
  {
11170
11410
  onClick: () => handleOrganizationSwitch(organization),
@@ -11183,9 +11423,9 @@ var BaseOrganizationSwitcher = ({
11183
11423
  );
11184
11424
  }),
11185
11425
  menuItems.length > 0 && /* @__PURE__ */ jsxs39(Fragment17, { children: [
11186
- /* @__PURE__ */ jsx86("div", { className: cx27(styles.menuDivider) }),
11426
+ /* @__PURE__ */ jsx87("div", { className: cx27(styles.menuDivider) }),
11187
11427
  menuItems.map(
11188
- (item, index) => /* @__PURE__ */ jsx86("div", { children: item.href ? /* @__PURE__ */ jsxs39(
11428
+ (item, index) => /* @__PURE__ */ jsx87("div", { children: item.href ? /* @__PURE__ */ jsxs39(
11189
11429
  "a",
11190
11430
  {
11191
11431
  href: item.href,
@@ -11199,10 +11439,10 @@ var BaseOrganizationSwitcher = ({
11199
11439
  onBlur: () => setHoveredItemIndex(null),
11200
11440
  children: [
11201
11441
  item.icon,
11202
- /* @__PURE__ */ jsx86("span", { children: item.label })
11442
+ /* @__PURE__ */ jsx87("span", { children: item.label })
11203
11443
  ]
11204
11444
  }
11205
- ) : /* @__PURE__ */ jsx86(
11445
+ ) : /* @__PURE__ */ jsx87(
11206
11446
  Button_default,
11207
11447
  {
11208
11448
  onClick: () => handleMenuItemClick(item),
@@ -11376,7 +11616,7 @@ var useStyles25 = (theme, colorScheme) => {
11376
11616
  var BaseCreateOrganization_styles_default = useStyles25;
11377
11617
 
11378
11618
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11379
- import { jsx as jsx87, jsxs as jsxs40 } from "react/jsx-runtime";
11619
+ import { jsx as jsx88, jsxs as jsxs40 } from "react/jsx-runtime";
11380
11620
  var BaseCreateOrganization = ({
11381
11621
  cardLayout = true,
11382
11622
  className = "",
@@ -11463,13 +11703,13 @@ var BaseCreateOrganization = ({
11463
11703
  console.error("Form submission error:", submitError);
11464
11704
  }
11465
11705
  };
11466
- const createOrganizationContent = /* @__PURE__ */ jsx87("div", { className: cx28(styles.root, cardLayout && styles.card, className), style, children: /* @__PURE__ */ jsxs40("div", { className: cx28(styles.content), children: [
11706
+ const createOrganizationContent = /* @__PURE__ */ jsx88("div", { className: cx28(styles.root, cardLayout && styles.card, className), style, children: /* @__PURE__ */ jsxs40("div", { className: cx28(styles.content), children: [
11467
11707
  /* @__PURE__ */ jsxs40("form", { id: "create-organization-form", className: cx28(styles.form), onSubmit: handleSubmit, children: [
11468
11708
  error && /* @__PURE__ */ jsxs40(Alert_default, { variant: "error", className: styles.errorAlert, children: [
11469
- /* @__PURE__ */ jsx87(Alert_default.Title, { children: "Error" }),
11470
- /* @__PURE__ */ jsx87(Alert_default.Description, { children: error })
11709
+ /* @__PURE__ */ jsx88(Alert_default.Title, { children: "Error" }),
11710
+ /* @__PURE__ */ jsx88(Alert_default.Description, { children: error })
11471
11711
  ] }),
11472
- /* @__PURE__ */ jsx87("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsx87(
11712
+ /* @__PURE__ */ jsx88("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsx88(
11473
11713
  TextField_default,
11474
11714
  {
11475
11715
  label: `${t("organization.create.name.label")}`,
@@ -11482,7 +11722,7 @@ var BaseCreateOrganization = ({
11482
11722
  className: cx28(styles.input)
11483
11723
  }
11484
11724
  ) }),
11485
- /* @__PURE__ */ jsx87("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsx87(
11725
+ /* @__PURE__ */ jsx88("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsx88(
11486
11726
  TextField_default,
11487
11727
  {
11488
11728
  label: `${t("organization.create.handle.label") || "Organization Handle"}`,
@@ -11496,9 +11736,9 @@ var BaseCreateOrganization = ({
11496
11736
  className: cx28(styles.input)
11497
11737
  }
11498
11738
  ) }),
11499
- /* @__PURE__ */ jsx87("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsxs40(FormControl_default, { error: formErrors.description, children: [
11500
- /* @__PURE__ */ jsx87(InputLabel_default, { required: true, children: t("organization.create.description.label") }),
11501
- /* @__PURE__ */ jsx87(
11739
+ /* @__PURE__ */ jsx88("div", { className: cx28(styles.fieldGroup), children: /* @__PURE__ */ jsxs40(FormControl_default, { error: formErrors.description, children: [
11740
+ /* @__PURE__ */ jsx88(InputLabel_default, { required: true, children: t("organization.create.description.label") }),
11741
+ /* @__PURE__ */ jsx88(
11502
11742
  "textarea",
11503
11743
  {
11504
11744
  className: cx28(styles.textarea, formErrors.description && styles.textareaError),
@@ -11513,14 +11753,14 @@ var BaseCreateOrganization = ({
11513
11753
  renderAdditionalFields && renderAdditionalFields()
11514
11754
  ] }),
11515
11755
  /* @__PURE__ */ jsxs40("div", { className: cx28(styles.actions), children: [
11516
- onCancel && /* @__PURE__ */ jsx87(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.cancel") }),
11517
- /* @__PURE__ */ jsx87(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.creating") : t("organization.create.button") })
11756
+ onCancel && /* @__PURE__ */ jsx88(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.cancel") }),
11757
+ /* @__PURE__ */ jsx88(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.creating") : t("organization.create.button") })
11518
11758
  ] })
11519
11759
  ] }) });
11520
11760
  if (mode === "popup") {
11521
- return /* @__PURE__ */ jsx87(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs40(Dialog_default.Content, { children: [
11522
- /* @__PURE__ */ jsx87(Dialog_default.Heading, { children: title }),
11523
- /* @__PURE__ */ jsx87("div", { className: styles.popup, children: createOrganizationContent })
11761
+ return /* @__PURE__ */ jsx88(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs40(Dialog_default.Content, { children: [
11762
+ /* @__PURE__ */ jsx88(Dialog_default.Heading, { children: title }),
11763
+ /* @__PURE__ */ jsx88("div", { className: styles.popup, children: createOrganizationContent })
11524
11764
  ] }) });
11525
11765
  }
11526
11766
  return createOrganizationContent;
@@ -11556,7 +11796,7 @@ var createOrganization = async ({ fetcher, ...requestConfig }) => {
11556
11796
  var createOrganization_default = createOrganization;
11557
11797
 
11558
11798
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
11559
- import { Fragment as Fragment18, jsx as jsx88 } from "react/jsx-runtime";
11799
+ import { Fragment as Fragment18, jsx as jsx89 } from "react/jsx-runtime";
11560
11800
  var CreateOrganization = ({
11561
11801
  onCreateOrganization,
11562
11802
  fallback = null,
@@ -11572,7 +11812,7 @@ var CreateOrganization = ({
11572
11812
  return fallback;
11573
11813
  }
11574
11814
  if (!isSignedIn) {
11575
- return /* @__PURE__ */ jsx88(Fragment18, {});
11815
+ return /* @__PURE__ */ jsx89(Fragment18, {});
11576
11816
  }
11577
11817
  const parentId = defaultParentId || currentOrganization?.id || "";
11578
11818
  const handleSubmit = async (payload) => {
@@ -11606,7 +11846,7 @@ var CreateOrganization = ({
11606
11846
  setLoading(false);
11607
11847
  }
11608
11848
  };
11609
- return /* @__PURE__ */ jsx88(
11849
+ return /* @__PURE__ */ jsx89(
11610
11850
  BaseCreateOrganization,
11611
11851
  {
11612
11852
  onSubmit: handleSubmit,
@@ -11788,7 +12028,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11788
12028
  var KeyValueInput_styles_default = useStyles26;
11789
12029
 
11790
12030
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
11791
- import { jsx as jsx89, jsxs as jsxs41 } from "react/jsx-runtime";
12031
+ import { jsx as jsx90, jsxs as jsxs41 } from "react/jsx-runtime";
11792
12032
  var KeyValueInput = ({
11793
12033
  className = "",
11794
12034
  disabled = false,
@@ -11866,7 +12106,7 @@ var KeyValueInput = ({
11866
12106
  return /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input")), styles.container, className), children: [
11867
12107
  label && /* @__PURE__ */ jsxs41("label", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "label")), styles.label), children: [
11868
12108
  label,
11869
- required && /* @__PURE__ */ jsx89(
12109
+ required && /* @__PURE__ */ jsx90(
11870
12110
  "span",
11871
12111
  {
11872
12112
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "required")), styles.requiredIndicator),
@@ -11875,7 +12115,7 @@ var KeyValueInput = ({
11875
12115
  )
11876
12116
  ] }),
11877
12117
  /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "pairs-list")), styles.pairsList), children: [
11878
- pairs.length === 0 && readOnly ? /* @__PURE__ */ jsx89("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ jsxs41(
12118
+ pairs.length === 0 && readOnly ? /* @__PURE__ */ jsx90("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ jsxs41(
11879
12119
  "div",
11880
12120
  {
11881
12121
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "readonly-pair")), styles.readOnlyPair),
@@ -11890,7 +12130,7 @@ var KeyValueInput = ({
11890
12130
  ]
11891
12131
  }
11892
12132
  ),
11893
- /* @__PURE__ */ jsx89(
12133
+ /* @__PURE__ */ jsx90(
11894
12134
  "span",
11895
12135
  {
11896
12136
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "readonly-value")), styles.readOnlyValue),
@@ -11905,7 +12145,7 @@ var KeyValueInput = ({
11905
12145
  {
11906
12146
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "pair-row")), styles.pairRow),
11907
12147
  children: [
11908
- /* @__PURE__ */ jsx89(
12148
+ /* @__PURE__ */ jsx90(
11909
12149
  TextField_default,
11910
12150
  {
11911
12151
  placeholder: keyPlaceholder,
@@ -11916,7 +12156,7 @@ var KeyValueInput = ({
11916
12156
  "aria-label": `${keyLabel} ${index + 1}`
11917
12157
  }
11918
12158
  ),
11919
- /* @__PURE__ */ jsx89(
12159
+ /* @__PURE__ */ jsx90(
11920
12160
  TextField_default,
11921
12161
  {
11922
12162
  placeholder: valuePlaceholder,
@@ -11927,7 +12167,7 @@ var KeyValueInput = ({
11927
12167
  "aria-label": `${valueLabel} ${index + 1}`
11928
12168
  }
11929
12169
  ),
11930
- !readOnly && /* @__PURE__ */ jsx89(
12170
+ !readOnly && /* @__PURE__ */ jsx90(
11931
12171
  "button",
11932
12172
  {
11933
12173
  type: "button",
@@ -11935,7 +12175,7 @@ var KeyValueInput = ({
11935
12175
  disabled,
11936
12176
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "remove-button")), styles.removeButton),
11937
12177
  "aria-label": `${removeButtonText} ${pair.key}`,
11938
- children: /* @__PURE__ */ jsx89(X_default, { width: 16, height: 16 })
12178
+ children: /* @__PURE__ */ jsx90(X_default, { width: 16, height: 16 })
11939
12179
  }
11940
12180
  )
11941
12181
  ]
@@ -11943,7 +12183,7 @@ var KeyValueInput = ({
11943
12183
  `${pair.key}-${index}`
11944
12184
  )),
11945
12185
  !readOnly && /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "add-row")), styles.addRow), children: [
11946
- /* @__PURE__ */ jsx89(
12186
+ /* @__PURE__ */ jsx90(
11947
12187
  TextField_default,
11948
12188
  {
11949
12189
  placeholder: keyPlaceholder,
@@ -11954,7 +12194,7 @@ var KeyValueInput = ({
11954
12194
  "aria-label": "New key"
11955
12195
  }
11956
12196
  ),
11957
- /* @__PURE__ */ jsx89(
12197
+ /* @__PURE__ */ jsx90(
11958
12198
  TextField_default,
11959
12199
  {
11960
12200
  placeholder: valuePlaceholder,
@@ -11970,7 +12210,7 @@ var KeyValueInput = ({
11970
12210
  }
11971
12211
  }
11972
12212
  ),
11973
- /* @__PURE__ */ jsx89(
12213
+ /* @__PURE__ */ jsx90(
11974
12214
  "button",
11975
12215
  {
11976
12216
  type: "button",
@@ -11978,12 +12218,12 @@ var KeyValueInput = ({
11978
12218
  disabled: isAddDisabled,
11979
12219
  className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "add-button")), styles.addButton),
11980
12220
  "aria-label": "Add new key-value pair",
11981
- children: /* @__PURE__ */ jsx89(Plus_default, { width: 16, height: 16 })
12221
+ children: /* @__PURE__ */ jsx90(Plus_default, { width: 16, height: 16 })
11982
12222
  }
11983
12223
  )
11984
12224
  ] })
11985
12225
  ] }),
11986
- (helperText || error) && /* @__PURE__ */ jsx89("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
12226
+ (helperText || error) && /* @__PURE__ */ jsx90("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
11987
12227
  maxPairs && /* @__PURE__ */ jsxs41("div", { className: cx29(withVendorCSSClassPrefix28(bem20("key-value-input", "counter")), styles.counterText), children: [
11988
12228
  pairs.length,
11989
12229
  " of ",
@@ -12151,7 +12391,7 @@ var useStyles27 = (theme, colorScheme) => {
12151
12391
  var BaseOrganizationProfile_styles_default = useStyles27;
12152
12392
 
12153
12393
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
12154
- import { Fragment as Fragment19, jsx as jsx90, jsxs as jsxs42 } from "react/jsx-runtime";
12394
+ import { Fragment as Fragment19, jsx as jsx91, jsxs as jsxs42 } from "react/jsx-runtime";
12155
12395
  var BaseOrganizationProfile = ({
12156
12396
  fallback = null,
12157
12397
  className = "",
@@ -12202,7 +12442,7 @@ var BaseOrganizationProfile = ({
12202
12442
  const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
12203
12443
  const [editedOrganization, setEditedOrganization] = useState27(organization);
12204
12444
  const [editingFields, setEditingFields] = useState27({});
12205
- const PencilIcon = () => /* @__PURE__ */ jsx90(
12445
+ const PencilIcon = () => /* @__PURE__ */ jsx91(
12206
12446
  "svg",
12207
12447
  {
12208
12448
  width: "16",
@@ -12213,7 +12453,7 @@ var BaseOrganizationProfile = ({
12213
12453
  strokeWidth: "2",
12214
12454
  strokeLinecap: "round",
12215
12455
  strokeLinejoin: "round",
12216
- children: /* @__PURE__ */ jsx90("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
12456
+ children: /* @__PURE__ */ jsx91("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
12217
12457
  }
12218
12458
  );
12219
12459
  const toggleFieldEdit = useCallback15((fieldName) => {
@@ -12276,7 +12516,7 @@ var BaseOrganizationProfile = ({
12276
12516
  let fieldInput;
12277
12517
  if (key === "attributes") {
12278
12518
  const attributesValue = typeof fieldValue === "object" && fieldValue !== null ? fieldValue : {};
12279
- fieldInput = /* @__PURE__ */ jsx90(
12519
+ fieldInput = /* @__PURE__ */ jsx91(
12280
12520
  KeyValueInput_default,
12281
12521
  {
12282
12522
  value: attributesValue,
@@ -12314,26 +12554,26 @@ var BaseOrganizationProfile = ({
12314
12554
  }
12315
12555
  );
12316
12556
  } else {
12317
- fieldInput = /* @__PURE__ */ jsx90(TextField_default, { ...commonProps });
12557
+ fieldInput = /* @__PURE__ */ jsx91(TextField_default, { ...commonProps });
12318
12558
  }
12319
12559
  return /* @__PURE__ */ jsxs42(Fragment19, { children: [
12320
- /* @__PURE__ */ jsx90("span", { className: cx30(styles.label), children: label }),
12321
- /* @__PURE__ */ jsx90("div", { className: cx30(styles.value), children: fieldInput })
12560
+ /* @__PURE__ */ jsx91("span", { className: cx30(styles.label), children: label }),
12561
+ /* @__PURE__ */ jsx91("div", { className: cx30(styles.value), children: fieldInput })
12322
12562
  ] });
12323
12563
  }
12324
12564
  const hasValue = value !== void 0 && value !== null && value !== "";
12325
12565
  const isFieldEditable = editable && fieldEditable;
12326
12566
  let displayValue;
12327
12567
  if (hasValue) {
12328
- displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx90(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
12568
+ displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx91(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
12329
12569
  } else if (isFieldEditable) {
12330
12570
  displayValue = getFieldPlaceholder(key);
12331
12571
  } else {
12332
12572
  displayValue = "-";
12333
12573
  }
12334
12574
  return /* @__PURE__ */ jsxs42(Fragment19, { children: [
12335
- /* @__PURE__ */ jsx90("span", { className: cx30(styles.label), children: label }),
12336
- /* @__PURE__ */ jsx90("div", { className: cx30(styles.value, !hasValue && styles.valueEmpty), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx90(
12575
+ /* @__PURE__ */ jsx91("span", { className: cx30(styles.label), children: label }),
12576
+ /* @__PURE__ */ jsx91("div", { className: cx30(styles.value, !hasValue && styles.valueEmpty), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx91(
12337
12577
  Button_default,
12338
12578
  {
12339
12579
  onClick: onStartEdit,
@@ -12357,7 +12597,7 @@ var BaseOrganizationProfile = ({
12357
12597
  return null;
12358
12598
  }
12359
12599
  return /* @__PURE__ */ jsxs42("div", { className: cx30(styles.field), children: [
12360
- /* @__PURE__ */ jsx90("div", { className: cx30(styles.fieldContent), children: renderField(
12600
+ /* @__PURE__ */ jsx91("div", { className: cx30(styles.fieldContent), children: renderField(
12361
12601
  field,
12362
12602
  isFieldEditing,
12363
12603
  (value) => {
@@ -12367,8 +12607,8 @@ var BaseOrganizationProfile = ({
12367
12607
  },
12368
12608
  () => toggleFieldEdit(field.key)
12369
12609
  ) }),
12370
- isFieldEditable && /* @__PURE__ */ jsx90("div", { className: cx30(styles.fieldActions), children: isFieldEditing ? /* @__PURE__ */ jsxs42(Fragment19, { children: [
12371
- /* @__PURE__ */ jsx90(
12610
+ isFieldEditable && /* @__PURE__ */ jsx91("div", { className: cx30(styles.fieldActions), children: isFieldEditing ? /* @__PURE__ */ jsxs42(Fragment19, { children: [
12611
+ /* @__PURE__ */ jsx91(
12372
12612
  Button_default,
12373
12613
  {
12374
12614
  onClick: () => handleFieldSave(field.key),
@@ -12379,7 +12619,7 @@ var BaseOrganizationProfile = ({
12379
12619
  children: saveButtonText
12380
12620
  }
12381
12621
  ),
12382
- /* @__PURE__ */ jsx90(
12622
+ /* @__PURE__ */ jsx91(
12383
12623
  Button_default,
12384
12624
  {
12385
12625
  onClick: () => handleFieldCancel(field.key),
@@ -12390,7 +12630,7 @@ var BaseOrganizationProfile = ({
12390
12630
  children: cancelButtonText
12391
12631
  }
12392
12632
  )
12393
- ] }) : hasValue && /* @__PURE__ */ jsx90(
12633
+ ] }) : hasValue && /* @__PURE__ */ jsx91(
12394
12634
  Button_default,
12395
12635
  {
12396
12636
  onClick: () => toggleFieldEdit(field.key),
@@ -12399,7 +12639,7 @@ var BaseOrganizationProfile = ({
12399
12639
  size: "small",
12400
12640
  title: "Edit field",
12401
12641
  className: cx30(styles.editButton),
12402
- children: /* @__PURE__ */ jsx90(PencilIcon, {})
12642
+ children: /* @__PURE__ */ jsx91(PencilIcon, {})
12403
12643
  }
12404
12644
  ) })
12405
12645
  ] }, field.key);
@@ -12409,21 +12649,21 @@ var BaseOrganizationProfile = ({
12409
12649
  }
12410
12650
  const profileContent = /* @__PURE__ */ jsxs42(Card_default, { className: cx30(styles.root, cardLayout && styles.card, className), children: [
12411
12651
  /* @__PURE__ */ jsxs42("div", { className: cx30(styles.header), children: [
12412
- /* @__PURE__ */ jsx90(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
12652
+ /* @__PURE__ */ jsx91(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
12413
12653
  /* @__PURE__ */ jsxs42("div", { className: cx30(styles.orgInfo), children: [
12414
- /* @__PURE__ */ jsx90("h2", { className: cx30(styles.name), children: organization.name }),
12654
+ /* @__PURE__ */ jsx91("h2", { className: cx30(styles.name), children: organization.name }),
12415
12655
  organization.orgHandle && /* @__PURE__ */ jsxs42("p", { className: cx30(styles.handle), children: [
12416
12656
  "@",
12417
12657
  organization.orgHandle
12418
12658
  ] })
12419
12659
  ] })
12420
12660
  ] }),
12421
- /* @__PURE__ */ jsx90("div", { className: cx30(styles.infoContainer), children: fields.map((field, index) => renderOrganizationField(field)) })
12661
+ /* @__PURE__ */ jsx91("div", { className: cx30(styles.infoContainer), children: fields.map((field, index) => renderOrganizationField(field)) })
12422
12662
  ] });
12423
12663
  if (mode === "popup") {
12424
- return /* @__PURE__ */ jsx90(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs42(Dialog_default.Content, { children: [
12425
- /* @__PURE__ */ jsx90(Dialog_default.Heading, { children: title }),
12426
- /* @__PURE__ */ jsx90("div", { className: cx30(styles.popup), children: profileContent })
12664
+ return /* @__PURE__ */ jsx91(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs42(Dialog_default.Content, { children: [
12665
+ /* @__PURE__ */ jsx91(Dialog_default.Heading, { children: title }),
12666
+ /* @__PURE__ */ jsx91("div", { className: cx30(styles.popup), children: profileContent })
12427
12667
  ] }) });
12428
12668
  }
12429
12669
  return profileContent;
@@ -12492,7 +12732,7 @@ var updateOrganization = async ({
12492
12732
  var updateOrganization_default = updateOrganization;
12493
12733
 
12494
12734
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
12495
- import { jsx as jsx91 } from "react/jsx-runtime";
12735
+ import { jsx as jsx92 } from "react/jsx-runtime";
12496
12736
  var OrganizationProfile = ({
12497
12737
  organizationId,
12498
12738
  mode = "default",
@@ -12500,8 +12740,8 @@ var OrganizationProfile = ({
12500
12740
  onOpenChange,
12501
12741
  onUpdate,
12502
12742
  popupTitle,
12503
- loadingFallback = /* @__PURE__ */ jsx91("div", { children: "Loading organization..." }),
12504
- errorFallback = /* @__PURE__ */ jsx91("div", { children: "Failed to load organization data" }),
12743
+ loadingFallback = /* @__PURE__ */ jsx92("div", { children: "Loading organization..." }),
12744
+ errorFallback = /* @__PURE__ */ jsx92("div", { children: "Failed to load organization data" }),
12505
12745
  ...rest
12506
12746
  }) => {
12507
12747
  const { baseUrl } = useAsgardeo_default();
@@ -12552,7 +12792,7 @@ var OrganizationProfile = ({
12552
12792
  throw err;
12553
12793
  }
12554
12794
  };
12555
- return /* @__PURE__ */ jsx91(
12795
+ return /* @__PURE__ */ jsx92(
12556
12796
  BaseOrganizationProfile_default,
12557
12797
  {
12558
12798
  organization,
@@ -12802,13 +13042,13 @@ var useStyles28 = (theme, colorScheme) => {
12802
13042
  var BaseOrganizationList_styles_default = useStyles28;
12803
13043
 
12804
13044
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
12805
- import { jsx as jsx92, jsxs as jsxs43 } from "react/jsx-runtime";
13045
+ import { jsx as jsx93, jsxs as jsxs43 } from "react/jsx-runtime";
12806
13046
  var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => {
12807
13047
  return /* @__PURE__ */ jsxs43("div", { className: cx31(styles.organizationItem), children: [
12808
13048
  /* @__PURE__ */ jsxs43("div", { className: cx31(styles.organizationContent), children: [
12809
- /* @__PURE__ */ jsx92(Avatar_default, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
13049
+ /* @__PURE__ */ jsx93(Avatar_default, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
12810
13050
  /* @__PURE__ */ jsxs43("div", { className: cx31(styles.organizationInfo), children: [
12811
- /* @__PURE__ */ jsx92(Typography_default, { variant: "h6", className: cx31(styles.organizationName), children: organization.name }),
13051
+ /* @__PURE__ */ jsx93(Typography_default, { variant: "h6", className: cx31(styles.organizationName), children: organization.name }),
12812
13052
  /* @__PURE__ */ jsxs43(Typography_default, { variant: "body2", color: "textSecondary", className: cx31(styles.organizationHandle), children: [
12813
13053
  "@",
12814
13054
  organization.orgHandle
@@ -12816,7 +13056,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
12816
13056
  showStatus && /* @__PURE__ */ jsxs43(Typography_default, { variant: "body2", color: "textSecondary", className: cx31(styles.organizationStatus), children: [
12817
13057
  t("organization.switcher.status.label"),
12818
13058
  " ",
12819
- /* @__PURE__ */ jsx92(
13059
+ /* @__PURE__ */ jsx93(
12820
13060
  "span",
12821
13061
  {
12822
13062
  className: cx31(
@@ -12829,7 +13069,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
12829
13069
  ] })
12830
13070
  ] })
12831
13071
  ] }),
12832
- organization.canSwitch && /* @__PURE__ */ jsx92("div", { className: cx31(styles.organizationActions), children: /* @__PURE__ */ jsx92(
13072
+ organization.canSwitch && /* @__PURE__ */ jsx93("div", { className: cx31(styles.organizationActions), children: /* @__PURE__ */ jsx93(
12833
13073
  Button_default,
12834
13074
  {
12835
13075
  onClick: (e) => {
@@ -12844,16 +13084,16 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
12844
13084
  ] }, organization.id);
12845
13085
  };
12846
13086
  var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs43("div", { className: cx31(styles.loadingContainer), children: [
12847
- /* @__PURE__ */ jsx92(Spinner_default, { size: "medium" }),
12848
- /* @__PURE__ */ jsx92(Typography_default, { variant: "body1", color: "textSecondary", className: cx31(styles.loadingText), children: t("organization.switcher.loading.organizations") })
13087
+ /* @__PURE__ */ jsx93(Spinner_default, { size: "medium" }),
13088
+ /* @__PURE__ */ jsx93(Typography_default, { variant: "body1", color: "textSecondary", className: cx31(styles.loadingText), children: t("organization.switcher.loading.organizations") })
12849
13089
  ] });
12850
- var defaultRenderError = (error, t, styles) => /* @__PURE__ */ jsx92("div", { className: cx31(styles.errorContainer), children: /* @__PURE__ */ jsxs43(Typography_default, { variant: "body1", color: "error", children: [
12851
- /* @__PURE__ */ jsx92("strong", { children: t("organization.switcher.error.prefix") }),
13090
+ var defaultRenderError = (error, t, styles) => /* @__PURE__ */ jsx93("div", { className: cx31(styles.errorContainer), children: /* @__PURE__ */ jsxs43(Typography_default, { variant: "body1", color: "error", children: [
13091
+ /* @__PURE__ */ jsx93("strong", { children: t("organization.switcher.error.prefix") }),
12852
13092
  " ",
12853
13093
  error
12854
13094
  ] }) });
12855
- var defaultRenderLoadMore = (onLoadMore, isLoading, t, styles) => /* @__PURE__ */ jsx92(Button_default, { onClick: onLoadMore, disabled: isLoading, className: cx31(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoading ? t("organization.switcher.loading.more") : t("organization.switcher.load.more") });
12856
- var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx92("div", { className: cx31(styles.emptyContainer), children: /* @__PURE__ */ jsx92(Typography_default, { variant: "body1", color: "textSecondary", className: cx31(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
13095
+ var defaultRenderLoadMore = (onLoadMore, isLoading, t, styles) => /* @__PURE__ */ jsx93(Button_default, { onClick: onLoadMore, disabled: isLoading, className: cx31(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoading ? t("organization.switcher.loading.more") : t("organization.switcher.load.more") });
13096
+ var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx93("div", { className: cx31(styles.emptyContainer), children: /* @__PURE__ */ jsx93(Typography_default, { variant: "body1", color: "textSecondary", className: cx31(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
12857
13097
  var BaseOrganizationList = ({
12858
13098
  className = "",
12859
13099
  allOrganizations,
@@ -12896,53 +13136,53 @@ var BaseOrganizationList = ({
12896
13136
  const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, isLoading2) => defaultRenderLoadMore(onLoadMore, isLoading2, t, styles));
12897
13137
  const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
12898
13138
  if (isLoading && organizationsWithSwitchAccess?.length === 0) {
12899
- const loadingContent = /* @__PURE__ */ jsx92("div", { className: cx31(styles.root, className), style, children: renderLoadingWithStyles() });
13139
+ const loadingContent = /* @__PURE__ */ jsx93("div", { className: cx31(styles.root, className), style, children: renderLoadingWithStyles() });
12900
13140
  if (mode === "popup") {
12901
- return /* @__PURE__ */ jsx92(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
12902
- /* @__PURE__ */ jsx92(Dialog_default.Heading, { children: title }),
12903
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.popupContent), children: loadingContent })
13141
+ return /* @__PURE__ */ jsx93(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
13142
+ /* @__PURE__ */ jsx93(Dialog_default.Heading, { children: title }),
13143
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.popupContent), children: loadingContent })
12904
13144
  ] }) });
12905
13145
  }
12906
13146
  return loadingContent;
12907
13147
  }
12908
13148
  if (error && organizationsWithSwitchAccess?.length === 0) {
12909
- const errorContent = /* @__PURE__ */ jsx92("div", { className: cx31(styles.root, className), style, children: renderErrorWithStyles(error) });
13149
+ const errorContent = /* @__PURE__ */ jsx93("div", { className: cx31(styles.root, className), style, children: renderErrorWithStyles(error) });
12910
13150
  if (mode === "popup") {
12911
- return /* @__PURE__ */ jsx92(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
12912
- /* @__PURE__ */ jsx92(Dialog_default.Heading, { children: title }),
12913
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.popupContent), children: errorContent })
13151
+ return /* @__PURE__ */ jsx93(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
13152
+ /* @__PURE__ */ jsx93(Dialog_default.Heading, { children: title }),
13153
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.popupContent), children: errorContent })
12914
13154
  ] }) });
12915
13155
  }
12916
13156
  return errorContent;
12917
13157
  }
12918
13158
  if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
12919
- const emptyContent = /* @__PURE__ */ jsx92("div", { className: cx31(styles.root, className), style, children: renderEmptyWithStyles() });
13159
+ const emptyContent = /* @__PURE__ */ jsx93("div", { className: cx31(styles.root, className), style, children: renderEmptyWithStyles() });
12920
13160
  if (mode === "popup") {
12921
- return /* @__PURE__ */ jsx92(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
12922
- /* @__PURE__ */ jsx92(Dialog_default.Heading, { children: title }),
12923
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.popupContent), children: emptyContent })
13161
+ return /* @__PURE__ */ jsx93(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
13162
+ /* @__PURE__ */ jsx93(Dialog_default.Heading, { children: title }),
13163
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.popupContent), children: emptyContent })
12924
13164
  ] }) });
12925
13165
  }
12926
13166
  return emptyContent;
12927
13167
  }
12928
13168
  const organizationListContent = /* @__PURE__ */ jsxs43("div", { className: cx31(styles.root, className), style, children: [
12929
13169
  /* @__PURE__ */ jsxs43("div", { className: cx31(styles.header), children: [
12930
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.headerInfo), children: /* @__PURE__ */ jsx92(Typography_default, { variant: "body2", color: "textSecondary", className: cx31(styles.subtitle), children: t("organization.switcher.showing.count", {
13170
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.headerInfo), children: /* @__PURE__ */ jsx93(Typography_default, { variant: "body2", color: "textSecondary", className: cx31(styles.subtitle), children: t("organization.switcher.showing.count", {
12931
13171
  showing: organizationsWithSwitchAccess?.length,
12932
13172
  total: allOrganizations?.organizations?.length || 0
12933
13173
  }) }) }),
12934
- onRefresh && /* @__PURE__ */ jsx92(Button_default, { onClick: onRefresh, className: cx31(styles.refreshButton), type: "button", variant: "outline", size: "small", children: t("organization.switcher.refresh.button") })
13174
+ onRefresh && /* @__PURE__ */ jsx93(Button_default, { onClick: onRefresh, className: cx31(styles.refreshButton), type: "button", variant: "outline", size: "small", children: t("organization.switcher.refresh.button") })
12935
13175
  ] }),
12936
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.listContainer), children: organizationsWithSwitchAccess?.map(
13176
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.listContainer), children: organizationsWithSwitchAccess?.map(
12937
13177
  (organization, index) => renderOrganizationWithStyles(organization, index)
12938
13178
  ) }),
12939
- error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx92("div", { className: cx31(styles.errorMargin), children: renderErrorWithStyles(error) }),
12940
- hasMore && fetchMore && /* @__PURE__ */ jsx92("div", { className: cx31(styles.loadMoreMargin), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
13179
+ error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx93("div", { className: cx31(styles.errorMargin), children: renderErrorWithStyles(error) }),
13180
+ hasMore && fetchMore && /* @__PURE__ */ jsx93("div", { className: cx31(styles.loadMoreMargin), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
12941
13181
  ] });
12942
13182
  if (mode === "popup") {
12943
- return /* @__PURE__ */ jsx92(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
12944
- /* @__PURE__ */ jsx92(Dialog_default.Heading, { children: title }),
12945
- /* @__PURE__ */ jsx92("div", { className: cx31(styles.popupContent), children: organizationListContent })
13183
+ return /* @__PURE__ */ jsx93(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(Dialog_default.Content, { children: [
13184
+ /* @__PURE__ */ jsx93(Dialog_default.Heading, { children: title }),
13185
+ /* @__PURE__ */ jsx93("div", { className: cx31(styles.popupContent), children: organizationListContent })
12946
13186
  ] }) });
12947
13187
  }
12948
13188
  return organizationListContent;
@@ -12974,10 +13214,7 @@ var useStyles29 = (theme, colorScheme) => {
12974
13214
 
12975
13215
  &__loading-overlay {
12976
13216
  position: absolute;
12977
- top: 0;
12978
- left: 0;
12979
- right: 0;
12980
- bottom: 0;
13217
+ inset: 0;
12981
13218
  background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
12982
13219
  display: flex;
12983
13220
  align-items: center;
@@ -13002,10 +13239,7 @@ var useStyles29 = (theme, colorScheme) => {
13002
13239
  `,
13003
13240
  loadingOverlay: css29`
13004
13241
  position: absolute;
13005
- top: 0;
13006
- left: 0;
13007
- right: 0;
13008
- bottom: 0;
13242
+ inset: 0;
13009
13243
  background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
13010
13244
  display: flex;
13011
13245
  align-items: center;
@@ -13019,7 +13253,7 @@ var useStyles29 = (theme, colorScheme) => {
13019
13253
  var OrganizationList_styles_default = useStyles29;
13020
13254
 
13021
13255
  // src/components/presentation/OrganizationList/OrganizationList.tsx
13022
- import { jsx as jsx93 } from "react/jsx-runtime";
13256
+ import { jsx as jsx94 } from "react/jsx-runtime";
13023
13257
  var OrganizationList = ({
13024
13258
  autoFetch = true,
13025
13259
  filter = "",
@@ -13041,7 +13275,7 @@ var OrganizationList = ({
13041
13275
  setAllOrganizations(await getAllOrganizations2());
13042
13276
  })();
13043
13277
  }, []);
13044
- return /* @__PURE__ */ jsx93("div", { className: cx32(styles.root, className), style, children: /* @__PURE__ */ jsx93("div", { className: cx32(styles.container), children: /* @__PURE__ */ jsx93(
13278
+ return /* @__PURE__ */ jsx94("div", { className: cx32(styles.root, className), style, children: /* @__PURE__ */ jsx94("div", { className: cx32(styles.container), children: /* @__PURE__ */ jsx94(
13045
13279
  BaseOrganizationList_default,
13046
13280
  {
13047
13281
  allOrganizations,
@@ -13056,7 +13290,7 @@ var OrganizationList = ({
13056
13290
  var OrganizationList_default = OrganizationList;
13057
13291
 
13058
13292
  // src/components/primitives/Icons/BuildingAlt.tsx
13059
- import { jsx as jsx94, jsxs as jsxs44 } from "react/jsx-runtime";
13293
+ import { jsx as jsx95, jsxs as jsxs44 } from "react/jsx-runtime";
13060
13294
  var BuildingAlt = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs44(
13061
13295
  "svg",
13062
13296
  {
@@ -13070,13 +13304,13 @@ var BuildingAlt = ({ color = "currentColor", height = 24, width = 24 }) => /* @_
13070
13304
  strokeLinecap: "round",
13071
13305
  strokeLinejoin: "round",
13072
13306
  children: [
13073
- /* @__PURE__ */ jsx94("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
13074
- /* @__PURE__ */ jsx94("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
13075
- /* @__PURE__ */ jsx94("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
13076
- /* @__PURE__ */ jsx94("path", { d: "M10 6h4" }),
13077
- /* @__PURE__ */ jsx94("path", { d: "M10 10h4" }),
13078
- /* @__PURE__ */ jsx94("path", { d: "M10 14h4" }),
13079
- /* @__PURE__ */ jsx94("path", { d: "M10 18h4" })
13307
+ /* @__PURE__ */ jsx95("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
13308
+ /* @__PURE__ */ jsx95("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
13309
+ /* @__PURE__ */ jsx95("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
13310
+ /* @__PURE__ */ jsx95("path", { d: "M10 6h4" }),
13311
+ /* @__PURE__ */ jsx95("path", { d: "M10 10h4" }),
13312
+ /* @__PURE__ */ jsx95("path", { d: "M10 14h4" }),
13313
+ /* @__PURE__ */ jsx95("path", { d: "M10 18h4" })
13080
13314
  ]
13081
13315
  }
13082
13316
  );
@@ -13084,7 +13318,7 @@ BuildingAlt.displayName = "BuildingAlt";
13084
13318
  var BuildingAlt_default = BuildingAlt;
13085
13319
 
13086
13320
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
13087
- import { Fragment as Fragment20, jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
13321
+ import { Fragment as Fragment20, jsx as jsx96, jsxs as jsxs45 } from "react/jsx-runtime";
13088
13322
  var OrganizationSwitcher = ({
13089
13323
  currentOrganization: propCurrentOrganization,
13090
13324
  fallback = null,
@@ -13108,7 +13342,7 @@ var OrganizationSwitcher = ({
13108
13342
  return fallback;
13109
13343
  }
13110
13344
  if (!isSignedIn) {
13111
- return /* @__PURE__ */ jsx95(Fragment20, {});
13345
+ return /* @__PURE__ */ jsx96(Fragment20, {});
13112
13346
  }
13113
13347
  const organizations = propOrganizations || contextOrganizations || [];
13114
13348
  const currentOrganization = propCurrentOrganization || contextCurrentOrganization;
@@ -13122,19 +13356,19 @@ var OrganizationSwitcher = ({
13122
13356
  const defaultMenuItems = [];
13123
13357
  if (currentOrganization) {
13124
13358
  defaultMenuItems.push({
13125
- icon: /* @__PURE__ */ jsx95(BuildingAlt_default, {}),
13359
+ icon: /* @__PURE__ */ jsx96(BuildingAlt_default, {}),
13126
13360
  label: t("organization.switcher.manage.organizations"),
13127
13361
  onClick: handleManageOrganizations
13128
13362
  });
13129
13363
  }
13130
13364
  defaultMenuItems.push({
13131
- icon: /* @__PURE__ */ jsx95("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx95("path", { d: "M12 5v14m-7-7h14" }) }),
13365
+ icon: /* @__PURE__ */ jsx96("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx96("path", { d: "M12 5v14m-7-7h14" }) }),
13132
13366
  label: t("organization.switcher.create.organization"),
13133
13367
  onClick: () => setIsCreateOrgOpen(true)
13134
13368
  });
13135
13369
  const menuItems = props.menuItems ? [...defaultMenuItems, ...props.menuItems] : defaultMenuItems;
13136
13370
  return /* @__PURE__ */ jsxs45(Fragment20, { children: [
13137
- /* @__PURE__ */ jsx95(
13371
+ /* @__PURE__ */ jsx96(
13138
13372
  BaseOrganizationSwitcher_default,
13139
13373
  {
13140
13374
  organizations,
@@ -13147,7 +13381,7 @@ var OrganizationSwitcher = ({
13147
13381
  ...props
13148
13382
  }
13149
13383
  ),
13150
- /* @__PURE__ */ jsx95(
13384
+ /* @__PURE__ */ jsx96(
13151
13385
  CreateOrganization,
13152
13386
  {
13153
13387
  mode: "popup",
@@ -13161,7 +13395,7 @@ var OrganizationSwitcher = ({
13161
13395
  }
13162
13396
  }
13163
13397
  ),
13164
- currentOrganization && /* @__PURE__ */ jsx95(
13398
+ currentOrganization && /* @__PURE__ */ jsx96(
13165
13399
  OrganizationProfile_default,
13166
13400
  {
13167
13401
  organizationId: currentOrganization.id,
@@ -13169,11 +13403,11 @@ var OrganizationSwitcher = ({
13169
13403
  open: isProfileOpen,
13170
13404
  onOpenChange: setIsProfileOpen,
13171
13405
  cardLayout: true,
13172
- loadingFallback: /* @__PURE__ */ jsx95("div", { children: t("organization.profile.loading") }),
13173
- errorFallback: /* @__PURE__ */ jsx95("div", { children: t("organization.profile.error") })
13406
+ loadingFallback: /* @__PURE__ */ jsx96("div", { children: t("organization.profile.loading") }),
13407
+ errorFallback: /* @__PURE__ */ jsx96("div", { children: t("organization.profile.error") })
13174
13408
  }
13175
13409
  ),
13176
- /* @__PURE__ */ jsx95(
13410
+ /* @__PURE__ */ jsx96(
13177
13411
  OrganizationList_default,
13178
13412
  {
13179
13413
  mode: "popup",
@@ -13206,7 +13440,7 @@ export {
13206
13440
  BaseOrganizationList_default as BaseOrganizationList,
13207
13441
  BaseOrganizationProfile_default as BaseOrganizationProfile,
13208
13442
  BaseOrganizationSwitcher_default as BaseOrganizationSwitcher,
13209
- BaseSignIn_default as BaseSignIn,
13443
+ BaseSignIn_default3 as BaseSignIn,
13210
13444
  BaseSignInButton_default as BaseSignInButton,
13211
13445
  BaseSignOutButton_default as BaseSignOutButton,
13212
13446
  BaseSignUp_default as BaseSignUp,