@asgardeo/react 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -3007,7 +3007,7 @@ Loading.displayName = "Loading";
3007
3007
  var Loading_default = Loading;
3008
3008
 
3009
3009
  // src/components/presentation/SignIn/BaseSignIn.tsx
3010
- var import_browser48 = require("@asgardeo/browser");
3010
+ var import_browser49 = require("@asgardeo/browser");
3011
3011
 
3012
3012
  // src/components/presentation/SignIn/non-component-driven/BaseSignIn.tsx
3013
3013
  var import_browser44 = require("@asgardeo/browser");
@@ -5622,7 +5622,8 @@ var useStyles13 = (theme, colorScheme, variant, clickable) => {
5622
5622
  }
5623
5623
  `;
5624
5624
  const headerStyles = import_css28.css`
5625
- padding: calc(${theme.vars.spacing.unit} * 2) calc(${theme.vars.spacing.unit} * 2) 0;
5625
+ padding: 0 calc(${theme.vars.spacing.unit} * 2);
5626
+ margin-top: calc(${theme.vars.spacing.unit} * 2);
5626
5627
  display: flex;
5627
5628
  flex-direction: column;
5628
5629
  gap: ${theme.vars.spacing.unit};
@@ -5641,7 +5642,8 @@ var useStyles13 = (theme, colorScheme, variant, clickable) => {
5641
5642
  margin-top: ${theme.vars.spacing.unit};
5642
5643
  `;
5643
5644
  const contentStyles = import_css28.css`
5644
- padding: calc(${theme.vars.spacing.unit} * 2);
5645
+ padding: 0 calc(${theme.vars.spacing.unit} * 2);
5646
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
5645
5647
  flex: 1;
5646
5648
  `;
5647
5649
  const footerStyles = import_css28.css`
@@ -6046,7 +6048,7 @@ var Logo = ({ className, src, alt, title, size = "medium" }) => {
6046
6048
  };
6047
6049
  var Logo_default = Logo;
6048
6050
 
6049
- // src/components/presentation/SignIn/non-component-driven/BaseSignIn.styles.ts
6051
+ // src/components/presentation/SignIn/BaseSignIn.styles.ts
6050
6052
  var import_css34 = require("@emotion/css");
6051
6053
  var import_react55 = require("react");
6052
6054
  var useStyles16 = (theme, colorScheme) => {
@@ -6065,17 +6067,18 @@ var useStyles16 = (theme, colorScheme) => {
6065
6067
  display: flex;
6066
6068
  flex-direction: column;
6067
6069
  align-items: center;
6068
- margin-bottom: calc(${theme.vars.spacing.unit} * 3);
6070
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
6069
6071
  `;
6070
6072
  const header = import_css34.css`
6071
6073
  gap: 0;
6074
+ align-items: center;
6072
6075
  `;
6073
6076
  const title = import_css34.css`
6074
6077
  margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
6075
6078
  color: ${theme.vars.colors.text.primary};
6076
6079
  `;
6077
6080
  const subtitle = import_css34.css`
6078
- margin-top: calc(${theme.vars.spacing.unit} * 1);
6081
+ margin-bottom: calc(${theme.vars.spacing.unit} * 1);
6079
6082
  color: ${theme.vars.colors.text.secondary};
6080
6083
  `;
6081
6084
  const messagesContainer = import_css34.css`
@@ -6144,7 +6147,7 @@ var useStyles16 = (theme, colorScheme) => {
6144
6147
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
6145
6148
  `;
6146
6149
  const flowMessagesContainer = import_css34.css`
6147
- margin-top: calc(${theme.vars.spacing.unit} * 2);
6150
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
6148
6151
  `;
6149
6152
  const flowMessageItem = import_css34.css`
6150
6153
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
@@ -6190,12 +6193,12 @@ var BaseSignIn_styles_default = useStyles16;
6190
6193
  // src/components/presentation/SignIn/non-component-driven/BaseSignIn.tsx
6191
6194
  var import_jsx_runtime53 = require("react/jsx-runtime");
6192
6195
  var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === import_browser44.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && authenticator.metadata?.additionalData?.challengeData;
6193
- var BaseSignIn = (props) => {
6196
+ var BaseSignIn = ({ showLogo = true, ...rest }) => {
6194
6197
  const { theme } = useTheme_default();
6195
6198
  const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
6196
6199
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { children: [
6197
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Logo_default, { size: "large" }) }),
6198
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BaseSignInContent, { ...props }) })
6200
+ showLogo && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Logo_default, { size: "large" }) }),
6201
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BaseSignInContent, { showLogo, ...rest }) })
6199
6202
  ] });
6200
6203
  };
6201
6204
  var HIDDEN_AUTHENTICATORS = ["T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08"];
@@ -6213,7 +6216,9 @@ var BaseSignInContent = ({
6213
6216
  errorClassName = "",
6214
6217
  messageClassName = "",
6215
6218
  size = "medium",
6216
- variant = "outlined"
6219
+ variant = "outlined",
6220
+ showTitle = true,
6221
+ showSubtitle = true
6217
6222
  }) => {
6218
6223
  const { theme } = useTheme_default();
6219
6224
  const { t } = useTranslation_default();
@@ -6754,9 +6759,11 @@ var BaseSignInContent = ({
6754
6759
  );
6755
6760
  const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
6756
6761
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Card_default, { className: (0, import_css35.cx)(containerClasses, styles.card), variant, children: [
6757
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Card_default.Header, { className: styles.header, children: [
6758
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
6759
- flowSubtitle && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") }),
6762
+ (showTitle || showSubtitle) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Card_default.Header, { className: styles.header, children: [
6763
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
6764
+ showSubtitle && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") })
6765
+ ] }),
6766
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Card_default.Content, { children: [
6760
6767
  flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: styles.flowMessagesContainer, children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6761
6768
  Alert_default,
6762
6769
  {
@@ -6769,9 +6776,7 @@ var BaseSignInContent = ({
6769
6776
  messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: styles.messagesContainer, children: messages.map((message, index) => {
6770
6777
  const variant2 = message.type.toLowerCase() === "error" ? "error" : message.type.toLowerCase() === "warning" ? "warning" : message.type.toLowerCase() === "success" ? "success" : "info";
6771
6778
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Alert_default, { variant: variant2, className: (0, import_css35.cx)(styles.messageItem, messageClasses), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Alert_default.Description, { children: message.message }) }, index);
6772
- }) })
6773
- ] }),
6774
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Card_default.Content, { children: [
6779
+ }) }),
6775
6780
  error && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Alert_default, { variant: "error", className: (0, import_css35.cx)(styles.errorContainer, errorClasses), children: [
6776
6781
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Alert_default.Title, { children: "Error" }),
6777
6782
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Alert_default.Description, { children: error })
@@ -6897,153 +6902,12 @@ var BaseSignInContent = ({
6897
6902
  var BaseSignIn_default = BaseSignIn;
6898
6903
 
6899
6904
  // src/components/presentation/SignIn/component-driven/BaseSignIn.tsx
6900
- var import_react59 = require("react");
6901
- var import_css37 = require("@emotion/css");
6902
- var import_browser47 = require("@asgardeo/browser");
6903
-
6904
- // src/components/presentation/SignIn/BaseSignIn.styles.ts
6905
+ var import_react58 = require("react");
6905
6906
  var import_css36 = require("@emotion/css");
6906
- var import_react57 = require("react");
6907
- var useStyles17 = (theme, colorScheme) => {
6908
- return (0, import_react57.useMemo)(() => {
6909
- const signIn = import_css36.css`
6910
- min-width: 420px;
6911
- margin: 0 auto;
6912
- `;
6913
- const card = import_css36.css`
6914
- background: ${theme.vars.colors.background.surface};
6915
- border-radius: ${theme.vars.borderRadius.large};
6916
- gap: calc(${theme.vars.spacing.unit} * 2);
6917
- min-width: 420px;
6918
- `;
6919
- const logoContainer = import_css36.css`
6920
- display: flex;
6921
- flex-direction: column;
6922
- align-items: center;
6923
- margin-bottom: calc(${theme.vars.spacing.unit} * 3);
6924
- `;
6925
- const header = import_css36.css`
6926
- gap: 0;
6927
- `;
6928
- const title = import_css36.css`
6929
- margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
6930
- color: ${theme.vars.colors.text.primary};
6931
- `;
6932
- const subtitle = import_css36.css`
6933
- margin-top: calc(${theme.vars.spacing.unit} * 1);
6934
- color: ${theme.vars.colors.text.secondary};
6935
- `;
6936
- const messagesContainer = import_css36.css`
6937
- margin-top: calc(${theme.vars.spacing.unit} * 2);
6938
- `;
6939
- const messageItem = import_css36.css`
6940
- margin-bottom: calc(${theme.vars.spacing.unit} * 1);
6941
- `;
6942
- const errorContainer = import_css36.css`
6943
- margin-bottom: calc(${theme.vars.spacing.unit} * 2);
6944
- `;
6945
- const contentContainer = import_css36.css`
6946
- display: flex;
6947
- flex-direction: column;
6948
- gap: calc(${theme.vars.spacing.unit} * 2);
6949
- `;
6950
- const loadingContainer = import_css36.css`
6951
- display: flex;
6952
- flex-direction: column;
6953
- align-items: center;
6954
- padding: calc(${theme.vars.spacing.unit} * 4);
6955
- `;
6956
- const loadingText = import_css36.css`
6957
- margin-top: calc(${theme.vars.spacing.unit} * 2);
6958
- color: ${theme.vars.colors.text.secondary};
6959
- `;
6960
- const divider = import_css36.css`
6961
- margin: calc(${theme.vars.spacing.unit} * 1) 0;
6962
- `;
6963
- const centeredContainer = import_css36.css`
6964
- text-align: center;
6965
- padding: calc(${theme.vars.spacing.unit} * 4);
6966
- `;
6967
- const passkeyContainer = import_css36.css`
6968
- margin-bottom: calc(${theme.vars.spacing.unit} * 2);
6969
- `;
6970
- const passkeyText = import_css36.css`
6971
- margin-top: calc(${theme.vars.spacing.unit} * 1);
6972
- color: ${theme.vars.colors.text.secondary};
6973
- `;
6974
- const form = import_css36.css`
6975
- display: flex;
6976
- flex-direction: column;
6977
- gap: calc(${theme.vars.spacing.unit} * 2);
6978
- `;
6979
- const formDivider = import_css36.css`
6980
- margin: calc(${theme.vars.spacing.unit} * 1) 0;
6981
- `;
6982
- const authenticatorSection = import_css36.css`
6983
- display: flex;
6984
- flex-direction: column;
6985
- gap: calc(${theme.vars.spacing.unit} * 1);
6986
- `;
6987
- const authenticatorItem = import_css36.css`
6988
- width: 100%;
6989
- `;
6990
- const noAuthenticatorCard = import_css36.css`
6991
- background: ${theme.vars.colors.background.surface};
6992
- border-radius: ${theme.vars.borderRadius.large};
6993
- padding: calc(${theme.vars.spacing.unit} * 2);
6994
- `;
6995
- const errorAlert = import_css36.css`
6996
- margin-bottom: calc(${theme.vars.spacing.unit} * 2);
6997
- `;
6998
- const messagesAlert = import_css36.css`
6999
- margin-bottom: calc(${theme.vars.spacing.unit} * 1);
7000
- `;
7001
- const flowMessagesContainer = import_css36.css`
7002
- margin-top: calc(${theme.vars.spacing.unit} * 2);
7003
- `;
7004
- const flowMessageItem = import_css36.css`
7005
- margin-bottom: calc(${theme.vars.spacing.unit} * 1);
7006
- `;
7007
- return {
7008
- signIn,
7009
- card,
7010
- logoContainer,
7011
- header,
7012
- title,
7013
- subtitle,
7014
- messagesContainer,
7015
- messageItem,
7016
- errorContainer,
7017
- contentContainer,
7018
- loadingContainer,
7019
- loadingText,
7020
- divider,
7021
- centeredContainer,
7022
- passkeyContainer,
7023
- passkeyText,
7024
- form,
7025
- formDivider,
7026
- authenticatorSection,
7027
- authenticatorItem,
7028
- noAuthenticatorCard,
7029
- errorAlert,
7030
- messagesAlert,
7031
- flowMessagesContainer,
7032
- flowMessageItem
7033
- };
7034
- }, [
7035
- theme.vars.colors.background.surface,
7036
- theme.vars.colors.text.primary,
7037
- theme.vars.colors.text.secondary,
7038
- theme.vars.borderRadius.large,
7039
- theme.vars.spacing.unit,
7040
- colorScheme
7041
- ]);
7042
- };
7043
- var BaseSignIn_styles_default2 = useStyles17;
6907
+ var import_browser48 = require("@asgardeo/browser");
7044
6908
 
7045
6909
  // src/components/presentation/SignIn/component-driven/SignInOptionFactory.tsx
7046
- var import_react58 = __toESM(require("react"), 1);
6910
+ var import_react57 = __toESM(require("react"), 1);
7047
6911
  var import_browser45 = require("@asgardeo/browser");
7048
6912
  var import_browser46 = require("@asgardeo/browser");
7049
6913
 
@@ -7118,7 +6982,7 @@ var createSignInComponentFromFlow = (component, formValues, touchedFields, formE
7118
6982
  onBlur: () => options.onInputBlur?.(identifier),
7119
6983
  className: options.inputClassName
7120
6984
  });
7121
- return import_react58.default.cloneElement(field, { key });
6985
+ return import_react57.default.cloneElement(field, { key });
7122
6986
  }
7123
6987
  case import_browser46.EmbeddedFlowComponentType.Button: {
7124
6988
  const handleClick = () => {
@@ -7212,14 +7076,155 @@ var renderSignInComponents = (components, formValues, touchedFields, formErrors,
7212
7076
  )
7213
7077
  ).filter(Boolean);
7214
7078
 
7079
+ // src/components/presentation/SignUp/transformer.ts
7080
+ var import_browser47 = require("@asgardeo/browser");
7081
+ var generateId = (prefix) => {
7082
+ const suffix = Math.random().toString(36).substring(2, 6);
7083
+ return `${prefix}_${suffix}`;
7084
+ };
7085
+ var getInputVariant = (type, name) => {
7086
+ switch (type.toLowerCase()) {
7087
+ case "email":
7088
+ return "EMAIL";
7089
+ case "password":
7090
+ return "PASSWORD";
7091
+ default:
7092
+ return "TEXT";
7093
+ }
7094
+ };
7095
+ var getInputLabel = (name, type, t) => {
7096
+ const i18nKey = `elements.fields.${name}`;
7097
+ const label = t(i18nKey);
7098
+ if (label === i18nKey || !label) {
7099
+ return name.charAt(0).toUpperCase() + name.slice(1);
7100
+ }
7101
+ return label;
7102
+ };
7103
+ var getInputPlaceholder = (name, type, t) => {
7104
+ const label = getInputLabel(name, type, t);
7105
+ const placeholder = t("elements.fields.placeholder", { field: label });
7106
+ if (!placeholder || placeholder === "elements.fields.placeholder") {
7107
+ return `Enter your ${label}`;
7108
+ }
7109
+ return placeholder;
7110
+ };
7111
+ var convertSimpleInputToComponent = (input, t) => {
7112
+ let fieldType = input.type;
7113
+ if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
7114
+ fieldType = "password";
7115
+ }
7116
+ const variant = getInputVariant(input.type, input.name);
7117
+ const label = getInputLabel(input.name, input.type, t);
7118
+ const placeholder = getInputPlaceholder(input.name, input.type, t);
7119
+ return {
7120
+ id: generateId("input"),
7121
+ type: import_browser47.EmbeddedFlowComponentType.Input,
7122
+ variant,
7123
+ config: {
7124
+ type: input.type,
7125
+ label,
7126
+ placeholder,
7127
+ required: input.required,
7128
+ identifier: input.name,
7129
+ hint: ""
7130
+ },
7131
+ components: []
7132
+ };
7133
+ };
7134
+ var convertActionToComponent = (action, t) => {
7135
+ const normalizedId = action.id.replace(/_auth$/, "");
7136
+ const i18nKey = `elements.buttons.${normalizedId}`;
7137
+ let text = t(i18nKey);
7138
+ if (!text || text === i18nKey) {
7139
+ text = action.id.replace(/_/g, " ");
7140
+ text = text.charAt(0).toUpperCase() + text.slice(1);
7141
+ }
7142
+ return {
7143
+ id: generateId("action"),
7144
+ type: import_browser47.EmbeddedFlowComponentType.Button,
7145
+ variant: "SECONDARY",
7146
+ config: {
7147
+ type: "button",
7148
+ text,
7149
+ actionId: action.id,
7150
+ actionType: action.type
7151
+ },
7152
+ components: []
7153
+ };
7154
+ };
7155
+ var transformSimpleToComponentDriven = (response, t) => {
7156
+ const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent(input, t)) || [];
7157
+ const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent(action, t)) || [];
7158
+ const submitButton = inputComponents.length > 0 ? {
7159
+ id: generateId("button"),
7160
+ type: import_browser47.EmbeddedFlowComponentType.Button,
7161
+ variant: "PRIMARY",
7162
+ config: {
7163
+ type: "submit",
7164
+ text: t("elements.buttons.signUp")
7165
+ },
7166
+ components: []
7167
+ } : null;
7168
+ const formComponents = [];
7169
+ if (inputComponents.length > 0) {
7170
+ formComponents.push(...inputComponents);
7171
+ if (submitButton) formComponents.push(submitButton);
7172
+ }
7173
+ const result = [];
7174
+ if (formComponents.length > 0) {
7175
+ result.push({
7176
+ id: generateId("form"),
7177
+ type: import_browser47.EmbeddedFlowComponentType.Form,
7178
+ config: {},
7179
+ components: formComponents
7180
+ });
7181
+ }
7182
+ if (actionComponents.length > 0) {
7183
+ result.push(...actionComponents);
7184
+ }
7185
+ return result;
7186
+ };
7187
+ var extractErrorMessage = (error, t) => {
7188
+ let errorMessage = t("errors.sign.up.flow.failure");
7189
+ if (error && typeof error === "object") {
7190
+ if (error.flowStatus === "ERROR" && error.failureReason) {
7191
+ errorMessage = error.failureReason;
7192
+ } else if (error.code && (error.message || error.description)) {
7193
+ errorMessage = error.description || error.message;
7194
+ } else if (error instanceof Error && error.name === "AsgardeoAPIError") {
7195
+ try {
7196
+ const errorResponse = JSON.parse(
7197
+ error.message
7198
+ );
7199
+ if (errorResponse.failureReason) {
7200
+ errorMessage = errorResponse.failureReason;
7201
+ } else if (errorResponse.description) {
7202
+ errorMessage = errorResponse.description;
7203
+ } else if (errorResponse.message) {
7204
+ errorMessage = errorResponse.message;
7205
+ } else {
7206
+ errorMessage = error.message;
7207
+ }
7208
+ } catch {
7209
+ errorMessage = error.message;
7210
+ }
7211
+ } else if (error.message) {
7212
+ errorMessage = error.message;
7213
+ }
7214
+ } else if (typeof error === "string") {
7215
+ errorMessage = error;
7216
+ }
7217
+ return errorMessage;
7218
+ };
7219
+
7215
7220
  // src/components/presentation/SignIn/component-driven/BaseSignIn.tsx
7216
7221
  var import_jsx_runtime56 = require("react/jsx-runtime");
7217
- var BaseSignIn2 = (props) => {
7222
+ var BaseSignIn2 = ({ showLogo = true, ...rest }) => {
7218
7223
  const { theme } = useTheme_default();
7219
- const styles = BaseSignIn_styles_default2(theme, theme.vars.colors.text.primary);
7224
+ const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
7220
7225
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
7221
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Logo_default, { size: "large" }) }),
7222
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BaseSignInContent2, { ...props }) })
7226
+ showLogo && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Logo_default, { size: "large" }) }),
7227
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BaseSignInContent2, { showLogo, ...rest }) })
7223
7228
  ] });
7224
7229
  };
7225
7230
  var BaseSignInContent2 = ({
@@ -7234,16 +7239,29 @@ var BaseSignInContent2 = ({
7234
7239
  size = "medium",
7235
7240
  variant = "outlined",
7236
7241
  isLoading: externalIsLoading,
7237
- children
7242
+ children,
7243
+ showTitle = true,
7244
+ showSubtitle = true,
7245
+ showLogo = true
7238
7246
  }) => {
7239
7247
  const { theme } = useTheme_default();
7240
7248
  const { t } = useTranslation_default();
7241
- const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages } = useFlow_default();
7242
- const styles = BaseSignIn_styles_default2(theme, theme.vars.colors.text.primary);
7243
- const [isSubmitting, setIsSubmitting] = (0, import_react59.useState)(false);
7244
- const [error, setError] = (0, import_react59.useState)(null);
7249
+ const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
7250
+ const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
7251
+ const [isSubmitting, setIsSubmitting] = (0, import_react58.useState)(false);
7245
7252
  const isLoading = externalIsLoading || isSubmitting;
7246
- const extractFormFields = (0, import_react59.useCallback)(
7253
+ const handleError = (0, import_react58.useCallback)(
7254
+ (error) => {
7255
+ const errorMessage = extractErrorMessage(error, t);
7256
+ clearMessages();
7257
+ addMessage({
7258
+ type: "error",
7259
+ message: errorMessage
7260
+ });
7261
+ },
7262
+ [t, addMessage, clearMessages]
7263
+ );
7264
+ const extractFormFields = (0, import_react58.useCallback)(
7247
7265
  (components2) => {
7248
7266
  const fields = [];
7249
7267
  const processComponents = (comps) => {
@@ -7303,7 +7321,7 @@ var BaseSignInContent2 = ({
7303
7321
  return;
7304
7322
  }
7305
7323
  setIsSubmitting(true);
7306
- setError(null);
7324
+ clearMessages();
7307
7325
  try {
7308
7326
  const filteredInputs = {};
7309
7327
  if (data) {
@@ -7327,40 +7345,39 @@ var BaseSignInContent2 = ({
7327
7345
  }
7328
7346
  await onSubmit?.(payload, component);
7329
7347
  } catch (err) {
7330
- const errorMessage = err instanceof Error ? err.message : t("errors.sign.in.flow.failure");
7331
- setError(errorMessage);
7348
+ handleError(err);
7332
7349
  onError?.(err);
7333
7350
  } finally {
7334
7351
  setIsSubmitting(false);
7335
7352
  }
7336
7353
  };
7337
- const containerClasses = (0, import_css37.cx)(
7354
+ const containerClasses = (0, import_css36.cx)(
7338
7355
  [
7339
- (0, import_browser47.withVendorCSSClassPrefix)("signin"),
7340
- (0, import_browser47.withVendorCSSClassPrefix)(`signin--${size}`),
7341
- (0, import_browser47.withVendorCSSClassPrefix)(`signin--${variant}`)
7356
+ (0, import_browser48.withVendorCSSClassPrefix)("signin"),
7357
+ (0, import_browser48.withVendorCSSClassPrefix)(`signin--${size}`),
7358
+ (0, import_browser48.withVendorCSSClassPrefix)(`signin--${variant}`)
7342
7359
  ],
7343
7360
  className
7344
7361
  );
7345
- const inputClasses = (0, import_css37.cx)(
7362
+ const inputClasses = (0, import_css36.cx)(
7346
7363
  [
7347
- (0, import_browser47.withVendorCSSClassPrefix)("signin__input"),
7348
- size === "small" && (0, import_browser47.withVendorCSSClassPrefix)("signin__input--small"),
7349
- size === "large" && (0, import_browser47.withVendorCSSClassPrefix)("signin__input--large")
7364
+ (0, import_browser48.withVendorCSSClassPrefix)("signin__input"),
7365
+ size === "small" && (0, import_browser48.withVendorCSSClassPrefix)("signin__input--small"),
7366
+ size === "large" && (0, import_browser48.withVendorCSSClassPrefix)("signin__input--large")
7350
7367
  ],
7351
7368
  inputClassName
7352
7369
  );
7353
- const buttonClasses = (0, import_css37.cx)(
7370
+ const buttonClasses = (0, import_css36.cx)(
7354
7371
  [
7355
- (0, import_browser47.withVendorCSSClassPrefix)("signin__button"),
7356
- size === "small" && (0, import_browser47.withVendorCSSClassPrefix)("signin__button--small"),
7357
- size === "large" && (0, import_browser47.withVendorCSSClassPrefix)("signin__button--large")
7372
+ (0, import_browser48.withVendorCSSClassPrefix)("signin__button"),
7373
+ size === "small" && (0, import_browser48.withVendorCSSClassPrefix)("signin__button--small"),
7374
+ size === "large" && (0, import_browser48.withVendorCSSClassPrefix)("signin__button--large")
7358
7375
  ],
7359
7376
  buttonClassName
7360
7377
  );
7361
- const errorClasses = (0, import_css37.cx)([(0, import_browser47.withVendorCSSClassPrefix)("signin__error")], errorClassName);
7362
- const messageClasses = (0, import_css37.cx)([(0, import_browser47.withVendorCSSClassPrefix)("signin__messages")], messageClassName);
7363
- const renderComponents = (0, import_react59.useCallback)(
7378
+ const errorClasses = (0, import_css36.cx)([(0, import_browser48.withVendorCSSClassPrefix)("signin__error")], errorClassName);
7379
+ const messageClasses = (0, import_css36.cx)([(0, import_browser48.withVendorCSSClassPrefix)("signin__messages")], messageClassName);
7380
+ const renderComponents = (0, import_react58.useCallback)(
7364
7381
  (components2) => renderSignInComponents(
7365
7382
  components2,
7366
7383
  formValues,
@@ -7371,7 +7388,6 @@ var BaseSignInContent2 = ({
7371
7388
  handleInputChange,
7372
7389
  {
7373
7390
  buttonClassName: buttonClasses,
7374
- error,
7375
7391
  inputClassName: inputClasses,
7376
7392
  onInputBlur: handleInputBlur,
7377
7393
  onSubmit: handleSubmit,
@@ -7387,7 +7403,6 @@ var BaseSignInContent2 = ({
7387
7403
  isLoading,
7388
7404
  size,
7389
7405
  variant,
7390
- error,
7391
7406
  inputClasses,
7392
7407
  buttonClasses,
7393
7408
  handleInputBlur,
@@ -7401,7 +7416,6 @@ var BaseSignInContent2 = ({
7401
7416
  touched: touchedFields,
7402
7417
  isValid: isFormValid,
7403
7418
  isLoading,
7404
- error,
7405
7419
  components,
7406
7420
  handleInputChange,
7407
7421
  handleSubmit,
@@ -7413,30 +7427,26 @@ var BaseSignInContent2 = ({
7413
7427
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: containerClasses, children: children(renderProps) });
7414
7428
  }
7415
7429
  if (isLoading) {
7416
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default, { className: (0, import_css37.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Spinner_default, {}) }) }) });
7430
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default, { className: (0, import_css36.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Spinner_default, {}) }) }) });
7417
7431
  }
7418
7432
  if (!components || components.length === 0) {
7419
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default, { className: (0, import_css37.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Alert_default, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography_default, { variant: "body1", children: t("errors.sign.in.components.not.available") }) }) }) });
7433
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default, { className: (0, import_css36.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Alert_default, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography_default, { variant: "body1", children: t("errors.sign.in.components.not.available") }) }) }) });
7420
7434
  }
7421
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default, { className: (0, import_css37.cx)(containerClasses, styles.card), variant, children: [
7422
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default.Header, { className: styles.header, children: [
7423
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
7424
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") }),
7435
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default, { className: (0, import_css36.cx)(containerClasses, styles.card), variant, children: [
7436
+ (showTitle || showSubtitle) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default.Header, { className: styles.header, children: [
7437
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
7438
+ showSubtitle && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") })
7439
+ ] }),
7440
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default.Content, { children: [
7425
7441
  flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7426
7442
  Alert_default,
7427
7443
  {
7428
7444
  variant: message.type === "error" ? "error" : "info",
7429
- className: (0, import_css37.cx)(styles.flowMessageItem, messageClasses),
7445
+ className: (0, import_css36.cx)(styles.flowMessageItem, messageClasses),
7430
7446
  children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Alert_default.Description, { children: message.message })
7431
7447
  },
7432
7448
  index
7433
- )) })
7434
- ] }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card_default.Content, { children: [
7436
- error && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Alert_default, { variant: "error", className: (0, import_css37.cx)(styles.errorContainer, errorClasses), children: [
7437
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Alert_default.Title, { children: t("errors.title") }),
7438
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Alert_default.Description, { children: error })
7439
- ] }),
7449
+ )) }),
7440
7450
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: styles.contentContainer, children: components && renderComponents(components) })
7441
7451
  ] })
7442
7452
  ] });
@@ -7447,7 +7457,7 @@ var BaseSignIn_default2 = BaseSignIn2;
7447
7457
  var import_jsx_runtime57 = require("react/jsx-runtime");
7448
7458
  var BaseSignIn3 = (props) => {
7449
7459
  const { platform } = useAsgardeo_default();
7450
- if (platform === import_browser48.Platform.AsgardeoV2) {
7460
+ if (platform === import_browser49.Platform.AsgardeoV2) {
7451
7461
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BaseSignIn_default2, { ...props });
7452
7462
  }
7453
7463
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BaseSignIn_default, { ...props });
@@ -7455,26 +7465,19 @@ var BaseSignIn3 = (props) => {
7455
7465
  var BaseSignIn_default3 = BaseSignIn3;
7456
7466
 
7457
7467
  // src/components/presentation/SignIn/SignIn.tsx
7458
- var import_browser51 = require("@asgardeo/browser");
7468
+ var import_browser52 = require("@asgardeo/browser");
7459
7469
 
7460
7470
  // src/components/presentation/SignIn/component-driven/SignIn.tsx
7461
- var import_react60 = require("react");
7462
- var import_browser50 = require("@asgardeo/browser");
7471
+ var import_react59 = require("react");
7472
+ var import_browser51 = require("@asgardeo/browser");
7463
7473
 
7464
7474
  // src/components/presentation/SignIn/component-driven/transformer.ts
7465
- var import_browser49 = require("@asgardeo/browser");
7466
- var generateId = (prefix) => {
7475
+ var import_browser50 = require("@asgardeo/browser");
7476
+ var generateId2 = (prefix) => {
7467
7477
  const suffix = Math.random().toString(36).substring(2, 6);
7468
7478
  return `${prefix}_${suffix}`;
7469
7479
  };
7470
- var getInputVariant = (type, name) => {
7471
- const lowerName = name.toLowerCase();
7472
- if (lowerName.includes("password")) {
7473
- return "PASSWORD";
7474
- }
7475
- if (lowerName.includes("email")) {
7476
- return "EMAIL";
7477
- }
7480
+ var getInputVariant2 = (type, name) => {
7478
7481
  switch (type.toLowerCase()) {
7479
7482
  case "email":
7480
7483
  return "EMAIL";
@@ -7484,7 +7487,7 @@ var getInputVariant = (type, name) => {
7484
7487
  return "TEXT";
7485
7488
  }
7486
7489
  };
7487
- var getInputLabel = (name, type, t) => {
7490
+ var getInputLabel2 = (name, type, t) => {
7488
7491
  const i18nKey = `elements.fields.${name}`;
7489
7492
  const label = t(i18nKey);
7490
7493
  if (label === i18nKey || !label) {
@@ -7492,24 +7495,28 @@ var getInputLabel = (name, type, t) => {
7492
7495
  }
7493
7496
  return label;
7494
7497
  };
7495
- var getInputPlaceholder = (name, type, t) => {
7496
- const label = getInputLabel(name, type, t);
7498
+ var getInputPlaceholder2 = (name, type, t) => {
7499
+ const label = getInputLabel2(name, type, t);
7497
7500
  const placeholder = t("elements.fields.placeholder", { field: label });
7498
7501
  if (!placeholder || placeholder === "elements.fields.placeholder") {
7499
7502
  return `Enter your ${label}`;
7500
7503
  }
7501
7504
  return placeholder;
7502
7505
  };
7503
- var convertSimpleInputToComponent = (input, t) => {
7504
- const variant = getInputVariant(input.type, input.name);
7505
- const label = getInputLabel(input.name, input.type, t);
7506
- const placeholder = getInputPlaceholder(input.name, input.type, t);
7506
+ var convertSimpleInputToComponent2 = (input, t) => {
7507
+ let fieldType = input.type;
7508
+ if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
7509
+ fieldType = "password";
7510
+ }
7511
+ const variant = getInputVariant2(fieldType, input.name);
7512
+ const label = getInputLabel2(input.name, fieldType, t);
7513
+ const placeholder = getInputPlaceholder2(input.name, fieldType, t);
7507
7514
  return {
7508
- id: generateId("input"),
7509
- type: import_browser49.EmbeddedFlowComponentType.Input,
7515
+ id: generateId2("input"),
7516
+ type: import_browser50.EmbeddedFlowComponentType.Input,
7510
7517
  variant,
7511
7518
  config: {
7512
- type: input.type,
7519
+ type: fieldType,
7513
7520
  label,
7514
7521
  placeholder,
7515
7522
  required: input.required,
@@ -7519,16 +7526,17 @@ var convertSimpleInputToComponent = (input, t) => {
7519
7526
  components: []
7520
7527
  };
7521
7528
  };
7522
- var convertActionToComponent = (action, t) => {
7523
- const i18nKey = `elements.buttons.${action.id}`;
7529
+ var convertActionToComponent2 = (action, t) => {
7530
+ const normalizedId = action.id.replace(/_auth$/, "");
7531
+ const i18nKey = `elements.buttons.${normalizedId}`;
7524
7532
  let text = t(i18nKey);
7525
7533
  if (!text || text === i18nKey) {
7526
7534
  text = action.id.replace(/_/g, " ");
7527
7535
  text = text.charAt(0).toUpperCase() + text.slice(1);
7528
7536
  }
7529
7537
  return {
7530
- id: generateId("action"),
7531
- type: import_browser49.EmbeddedFlowComponentType.Button,
7538
+ id: generateId2("action"),
7539
+ type: import_browser50.EmbeddedFlowComponentType.Button,
7532
7540
  variant: "SECONDARY",
7533
7541
  config: {
7534
7542
  type: "button",
@@ -7539,12 +7547,12 @@ var convertActionToComponent = (action, t) => {
7539
7547
  components: []
7540
7548
  };
7541
7549
  };
7542
- var transformSimpleToComponentDriven = (response, t) => {
7543
- const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent(input, t)) || [];
7544
- const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent(action, t)) || [];
7550
+ var transformSimpleToComponentDriven2 = (response, t) => {
7551
+ const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
7552
+ const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
7545
7553
  const submitButton = inputComponents.length > 0 ? {
7546
- id: generateId("button"),
7547
- type: import_browser49.EmbeddedFlowComponentType.Button,
7554
+ id: generateId2("button"),
7555
+ type: import_browser50.EmbeddedFlowComponentType.Button,
7548
7556
  variant: "PRIMARY",
7549
7557
  config: {
7550
7558
  type: "submit",
@@ -7560,8 +7568,8 @@ var transformSimpleToComponentDriven = (response, t) => {
7560
7568
  const result = [];
7561
7569
  if (formComponents.length > 0) {
7562
7570
  result.push({
7563
- id: generateId("form"),
7564
- type: import_browser49.EmbeddedFlowComponentType.Form,
7571
+ id: generateId2("form"),
7572
+ type: import_browser50.EmbeddedFlowComponentType.Form,
7565
7573
  config: {},
7566
7574
  components: formComponents
7567
7575
  });
@@ -7574,7 +7582,7 @@ var transformSimpleToComponentDriven = (response, t) => {
7574
7582
  var normalizeFlowResponse = (response, t) => {
7575
7583
  return {
7576
7584
  flowId: response.flowId,
7577
- components: transformSimpleToComponentDriven(response, t)
7585
+ components: transformSimpleToComponentDriven2(response, t)
7578
7586
  };
7579
7587
  };
7580
7588
 
@@ -7583,13 +7591,13 @@ var import_jsx_runtime58 = require("react/jsx-runtime");
7583
7591
  var SignIn = ({ className, size = "medium", onSuccess, onError, variant, children }) => {
7584
7592
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading } = useAsgardeo_default();
7585
7593
  const { t } = useTranslation_default();
7586
- const [components, setComponents] = (0, import_react60.useState)([]);
7587
- const [currentFlowId, setCurrentFlowId] = (0, import_react60.useState)(null);
7588
- const [isFlowInitialized, setIsFlowInitialized] = (0, import_react60.useState)(false);
7589
- const [flowError, setFlowError] = (0, import_react60.useState)(null);
7590
- const [isSubmitting, setIsSubmitting] = (0, import_react60.useState)(false);
7591
- const initializationAttemptedRef = (0, import_react60.useRef)(false);
7592
- (0, import_react60.useEffect)(() => {
7594
+ const [components, setComponents] = (0, import_react59.useState)([]);
7595
+ const [currentFlowId, setCurrentFlowId] = (0, import_react59.useState)(null);
7596
+ const [isFlowInitialized, setIsFlowInitialized] = (0, import_react59.useState)(false);
7597
+ const [flowError, setFlowError] = (0, import_react59.useState)(null);
7598
+ const [isSubmitting, setIsSubmitting] = (0, import_react59.useState)(false);
7599
+ const initializationAttemptedRef = (0, import_react59.useRef)(false);
7600
+ (0, import_react59.useEffect)(() => {
7593
7601
  if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current) {
7594
7602
  initializationAttemptedRef.current = true;
7595
7603
  initializeFlow();
@@ -7601,7 +7609,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7601
7609
  const applicationIdFromUrl = urlParams.get("applicationId");
7602
7610
  const effectiveApplicationId = applicationId || applicationIdFromUrl;
7603
7611
  if (!flowIdFromUrl && !effectiveApplicationId) {
7604
- const error = new import_browser50.AsgardeoRuntimeError(
7612
+ const error = new import_browser51.AsgardeoRuntimeError(
7605
7613
  "Either flowId or applicationId is required for authentication",
7606
7614
  "SignIn-initializeFlow-RuntimeError-001",
7607
7615
  "react",
@@ -7620,7 +7628,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7620
7628
  } else {
7621
7629
  response = await signIn({
7622
7630
  applicationId: effectiveApplicationId,
7623
- flowType: import_browser50.EmbeddedFlowType.Authentication
7631
+ flowType: import_browser51.EmbeddedFlowType.Authentication
7624
7632
  });
7625
7633
  }
7626
7634
  const { flowId, components: components2 } = normalizeFlowResponse(response, t);
@@ -7633,7 +7641,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7633
7641
  const err = error;
7634
7642
  setFlowError(err);
7635
7643
  onError?.(err);
7636
- throw new import_browser50.AsgardeoRuntimeError(
7644
+ throw new import_browser51.AsgardeoRuntimeError(
7637
7645
  `Failed to initialize authentication flow: ${error instanceof Error ? error.message : String(error)}`,
7638
7646
  "SignIn-initializeFlow-RuntimeError-002",
7639
7647
  "react",
@@ -7653,7 +7661,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7653
7661
  ...payload
7654
7662
  });
7655
7663
  const { flowId, components: components2 } = normalizeFlowResponse(response, t);
7656
- if (response.flowStatus === import_browser50.EmbeddedSignInFlowStatusV2.Complete) {
7664
+ if (response.flowStatus === import_browser51.EmbeddedSignInFlowStatusV2.Complete) {
7657
7665
  onSuccess && onSuccess({
7658
7666
  redirectUrl: response.redirectUrl || afterSignInUrl,
7659
7667
  ...response.data
@@ -7669,7 +7677,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7669
7677
  const err = error;
7670
7678
  setFlowError(err);
7671
7679
  onError?.(err);
7672
- throw new import_browser50.AsgardeoRuntimeError(
7680
+ throw new import_browser51.AsgardeoRuntimeError(
7673
7681
  `Failed to submit authentication flow: ${error instanceof Error ? error.message : String(error)}`,
7674
7682
  "SignIn-handleSubmit-RuntimeError-001",
7675
7683
  "react",
@@ -7731,7 +7739,7 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7731
7739
  window.location.href = url.toString();
7732
7740
  }
7733
7741
  };
7734
- if (platform === import_browser51.Platform.AsgardeoV2) {
7742
+ if (platform === import_browser52.Platform.AsgardeoV2) {
7735
7743
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7736
7744
  SignIn_default,
7737
7745
  {
@@ -7754,6 +7762,9 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7754
7762
  onSuccess: handleSuccess,
7755
7763
  className,
7756
7764
  size,
7765
+ showLogo: true,
7766
+ showSubtitle: true,
7767
+ showTitle: true,
7757
7768
  ...rest
7758
7769
  }
7759
7770
  );
@@ -7762,14 +7773,14 @@ var SignIn_default2 = SignIn2;
7762
7773
 
7763
7774
  // src/components/presentation/SignUp/BaseSignUp.tsx
7764
7775
  var import_browser60 = require("@asgardeo/browser");
7765
- var import_css39 = require("@emotion/css");
7766
- var import_react62 = require("react");
7776
+ var import_css38 = require("@emotion/css");
7777
+ var import_react61 = require("react");
7767
7778
 
7768
7779
  // src/components/presentation/SignUp/SignUpOptionFactory.tsx
7769
- var import_browser58 = require("@asgardeo/browser");
7780
+ var import_browser59 = require("@asgardeo/browser");
7770
7781
 
7771
7782
  // src/components/adapters/CheckboxInput.tsx
7772
- var import_browser52 = require("@asgardeo/browser");
7783
+ var import_browser53 = require("@asgardeo/browser");
7773
7784
  var CheckboxInput = ({
7774
7785
  component,
7775
7786
  formValues,
@@ -7783,7 +7794,7 @@ var CheckboxInput = ({
7783
7794
  const value = formValues[fieldName] || false;
7784
7795
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7785
7796
  return createField({
7786
- type: import_browser52.FieldType.Checkbox,
7797
+ type: import_browser53.FieldType.Checkbox,
7787
7798
  name: fieldName,
7788
7799
  label: config["label"] || "",
7789
7800
  placeholder: config["placeholder"] || "",
@@ -7797,7 +7808,7 @@ var CheckboxInput = ({
7797
7808
  var CheckboxInput_default = CheckboxInput;
7798
7809
 
7799
7810
  // src/components/adapters/DateInput.tsx
7800
- var import_browser53 = require("@asgardeo/browser");
7811
+ var import_browser54 = require("@asgardeo/browser");
7801
7812
  var DateInput = ({
7802
7813
  component,
7803
7814
  formValues,
@@ -7811,7 +7822,7 @@ var DateInput = ({
7811
7822
  const value = formValues[fieldName] || "";
7812
7823
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7813
7824
  return createField({
7814
- type: import_browser53.FieldType.Date,
7825
+ type: import_browser54.FieldType.Date,
7815
7826
  name: fieldName,
7816
7827
  label: config["label"] || "",
7817
7828
  placeholder: config["placeholder"] || "",
@@ -7844,7 +7855,7 @@ var DividerComponent = ({ component }) => {
7844
7855
  var DividerComponent_default = DividerComponent;
7845
7856
 
7846
7857
  // src/components/adapters/EmailInput.tsx
7847
- var import_browser54 = require("@asgardeo/browser");
7858
+ var import_browser55 = require("@asgardeo/browser");
7848
7859
  var EmailInput = ({
7849
7860
  component,
7850
7861
  formValues,
@@ -7858,7 +7869,7 @@ var EmailInput = ({
7858
7869
  const value = formValues[fieldName] || "";
7859
7870
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7860
7871
  return createField({
7861
- type: import_browser54.FieldType.Email,
7872
+ type: import_browser55.FieldType.Email,
7862
7873
  name: fieldName,
7863
7874
  label: config["label"] || "Email",
7864
7875
  placeholder: config["placeholder"] || "Enter your email",
@@ -7929,7 +7940,7 @@ var ImageComponent = ({ component }) => {
7929
7940
  var ImageComponent_default = ImageComponent;
7930
7941
 
7931
7942
  // src/components/adapters/NumberInput.tsx
7932
- var import_browser55 = require("@asgardeo/browser");
7943
+ var import_browser56 = require("@asgardeo/browser");
7933
7944
  var NumberInput = ({
7934
7945
  component,
7935
7946
  formValues,
@@ -7943,7 +7954,7 @@ var NumberInput = ({
7943
7954
  const value = formValues[fieldName] || "";
7944
7955
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7945
7956
  return createField({
7946
- type: import_browser55.FieldType.Number,
7957
+ type: import_browser56.FieldType.Number,
7947
7958
  name: fieldName,
7948
7959
  label: config["label"] || "",
7949
7960
  placeholder: config["placeholder"] || "",
@@ -7957,7 +7968,7 @@ var NumberInput = ({
7957
7968
  var NumberInput_default = NumberInput;
7958
7969
 
7959
7970
  // src/components/adapters/PasswordInput.tsx
7960
- var import_browser56 = require("@asgardeo/browser");
7971
+ var import_browser57 = require("@asgardeo/browser");
7961
7972
  var PasswordInput = ({
7962
7973
  component,
7963
7974
  formValues,
@@ -8003,7 +8014,7 @@ var PasswordInput = ({
8003
8014
  });
8004
8015
  const hint = validationHints.length > 0 ? validationHints.join(", ") : config["hint"] || "";
8005
8016
  return createField({
8006
- type: import_browser56.FieldType.Password,
8017
+ type: import_browser57.FieldType.Password,
8007
8018
  name: fieldName,
8008
8019
  label: config["label"] || "Password",
8009
8020
  placeholder: config["placeholder"] || "Enter your password",
@@ -8102,7 +8113,7 @@ var TelephoneInput = ({
8102
8113
  var TelephoneInput_default = TelephoneInput;
8103
8114
 
8104
8115
  // src/components/adapters/TextInput.tsx
8105
- var import_browser57 = require("@asgardeo/browser");
8116
+ var import_browser58 = require("@asgardeo/browser");
8106
8117
  var TextInput = ({
8107
8118
  component,
8108
8119
  formValues,
@@ -8116,7 +8127,7 @@ var TextInput = ({
8116
8127
  const value = formValues[fieldName] || "";
8117
8128
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8118
8129
  return createField({
8119
- type: import_browser57.FieldType.Text,
8130
+ type: import_browser58.FieldType.Text,
8120
8131
  name: fieldName,
8121
8132
  label: config["label"] || "",
8122
8133
  placeholder: config["placeholder"] || "",
@@ -8187,9 +8198,9 @@ var Typography_default2 = TypographyComponent;
8187
8198
  var import_jsx_runtime66 = require("react/jsx-runtime");
8188
8199
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8189
8200
  switch (component.type) {
8190
- case import_browser58.EmbeddedFlowComponentType.Typography:
8201
+ case import_browser59.EmbeddedFlowComponentType.Typography:
8191
8202
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography_default2, { component, onSubmit, ...rest });
8192
- case import_browser58.EmbeddedFlowComponentType.Input:
8203
+ case import_browser59.EmbeddedFlowComponentType.Input:
8193
8204
  const inputVariant = component.variant?.toUpperCase();
8194
8205
  const inputType = component.config["type"]?.toLowerCase();
8195
8206
  if (inputVariant === "EMAIL" || inputType === "email") {
@@ -8211,7 +8222,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8211
8222
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CheckboxInput_default, { component, onSubmit, ...rest });
8212
8223
  }
8213
8224
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextInput_default, { component, onSubmit, ...rest });
8214
- case import_browser58.EmbeddedFlowComponentType.Button: {
8225
+ case import_browser59.EmbeddedFlowComponentType.Button: {
8215
8226
  const buttonVariant = component.variant?.toUpperCase();
8216
8227
  const buttonText = component.config["text"] || component.config["label"] || "";
8217
8228
  if (buttonVariant === "SOCIAL") {
@@ -8236,11 +8247,11 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8236
8247
  }
8237
8248
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
8238
8249
  }
8239
- case import_browser58.EmbeddedFlowComponentType.Form:
8250
+ case import_browser59.EmbeddedFlowComponentType.Form:
8240
8251
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FormContainer_default, { component, onSubmit, ...rest });
8241
- case import_browser58.EmbeddedFlowComponentType.Divider:
8252
+ case import_browser59.EmbeddedFlowComponentType.Divider:
8242
8253
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
8243
- case import_browser58.EmbeddedFlowComponentType.Image:
8254
+ case import_browser59.EmbeddedFlowComponentType.Image:
8244
8255
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
8245
8256
  default:
8246
8257
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", {});
@@ -8273,250 +8284,105 @@ var renderSignUpComponents = (components, formValues, touchedFields, formErrors,
8273
8284
  )
8274
8285
  ).filter(Boolean);
8275
8286
 
8276
- // src/components/presentation/SignUp/transformer.ts
8277
- var import_browser59 = require("@asgardeo/browser");
8278
- var generateId2 = (prefix) => {
8279
- const suffix = Math.random().toString(36).substring(2, 6);
8280
- return `${prefix}_${suffix}`;
8281
- };
8282
- var getInputVariant2 = (type, name) => {
8283
- const lowerName = name.toLowerCase();
8284
- if (lowerName.includes("password")) {
8285
- return "PASSWORD";
8286
- }
8287
- if (lowerName.includes("email")) {
8288
- return "EMAIL";
8289
- }
8290
- switch (type.toLowerCase()) {
8291
- case "email":
8292
- return "EMAIL";
8293
- case "password":
8294
- return "PASSWORD";
8295
- default:
8296
- return "TEXT";
8297
- }
8298
- };
8299
- var getInputLabel2 = (name, type, t) => {
8300
- const i18nKey = `elements.fields.${name}`;
8301
- const label = t(i18nKey);
8302
- if (label === i18nKey || !label) {
8303
- return name.charAt(0).toUpperCase() + name.slice(1);
8304
- }
8305
- return label;
8306
- };
8307
- var getInputPlaceholder2 = (name, type, t) => {
8308
- const label = getInputLabel2(name, type, t);
8309
- const placeholder = t("elements.fields.placeholder", { field: label });
8310
- if (!placeholder || placeholder === "elements.fields.placeholder") {
8311
- return `Enter your ${label}`;
8312
- }
8313
- return placeholder;
8314
- };
8315
- var convertSimpleInputToComponent2 = (input, t) => {
8316
- const variant = getInputVariant2(input.type, input.name);
8317
- const label = getInputLabel2(input.name, input.type, t);
8318
- const placeholder = getInputPlaceholder2(input.name, input.type, t);
8319
- return {
8320
- id: generateId2("input"),
8321
- type: import_browser59.EmbeddedFlowComponentType.Input,
8322
- variant,
8323
- config: {
8324
- type: input.type,
8325
- label,
8326
- placeholder,
8327
- required: input.required,
8328
- identifier: input.name,
8329
- hint: ""
8330
- },
8331
- components: []
8332
- };
8333
- };
8334
- var convertActionToComponent2 = (action, t) => {
8335
- const i18nKey = `elements.buttons.${action.id}`;
8336
- let text = t(i18nKey);
8337
- if (!text || text === i18nKey) {
8338
- text = action.id.replace(/_/g, " ");
8339
- text = text.charAt(0).toUpperCase() + text.slice(1);
8340
- }
8341
- return {
8342
- id: generateId2("action"),
8343
- type: import_browser59.EmbeddedFlowComponentType.Button,
8344
- variant: "SECONDARY",
8345
- config: {
8346
- type: "button",
8347
- text,
8348
- actionId: action.id,
8349
- actionType: action.type
8350
- },
8351
- components: []
8352
- };
8353
- };
8354
- var transformSimpleToComponentDriven2 = (response, t) => {
8355
- const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
8356
- const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
8357
- const submitButton = inputComponents.length > 0 ? {
8358
- id: generateId2("button"),
8359
- type: import_browser59.EmbeddedFlowComponentType.Button,
8360
- variant: "PRIMARY",
8361
- config: {
8362
- type: "submit",
8363
- text: t("elements.buttons.signUp")
8364
- },
8365
- components: []
8366
- } : null;
8367
- const formComponents = [];
8368
- if (inputComponents.length > 0) {
8369
- formComponents.push(...inputComponents);
8370
- if (submitButton) formComponents.push(submitButton);
8371
- }
8372
- const result = [];
8373
- if (formComponents.length > 0) {
8374
- result.push({
8375
- id: generateId2("form"),
8376
- type: import_browser59.EmbeddedFlowComponentType.Form,
8377
- config: {},
8378
- components: formComponents
8379
- });
8380
- }
8381
- if (actionComponents.length > 0) {
8382
- result.push(...actionComponents);
8383
- }
8384
- return result;
8385
- };
8386
- var extractErrorMessage = (error, t) => {
8387
- let errorMessage = t("errors.sign.up.flow.failure");
8388
- if (error && typeof error === "object") {
8389
- if (error.flowStatus === "ERROR" && error.failureReason) {
8390
- errorMessage = error.failureReason;
8391
- } else if (error.code && (error.message || error.description)) {
8392
- errorMessage = error.description || error.message;
8393
- } else if (error instanceof Error && error.name === "AsgardeoAPIError") {
8394
- try {
8395
- const errorResponse = JSON.parse(
8396
- error.message
8397
- );
8398
- if (errorResponse.failureReason) {
8399
- errorMessage = errorResponse.failureReason;
8400
- } else if (errorResponse.description) {
8401
- errorMessage = errorResponse.description;
8402
- } else if (errorResponse.message) {
8403
- errorMessage = errorResponse.message;
8404
- } else {
8405
- errorMessage = error.message;
8406
- }
8407
- } catch {
8408
- errorMessage = error.message;
8409
- }
8410
- } else if (error.message) {
8411
- errorMessage = error.message;
8412
- }
8413
- } else if (typeof error === "string") {
8414
- errorMessage = error;
8415
- }
8416
- return errorMessage;
8417
- };
8418
-
8419
8287
  // src/components/presentation/SignUp/BaseSignUp.styles.ts
8420
- var import_css38 = require("@emotion/css");
8421
- var import_react61 = require("react");
8422
- var useStyles18 = (theme, colorScheme) => {
8423
- return (0, import_react61.useMemo)(() => {
8424
- const signUp = import_css38.css`
8288
+ var import_css37 = require("@emotion/css");
8289
+ var import_react60 = require("react");
8290
+ var useStyles17 = (theme, colorScheme) => {
8291
+ return (0, import_react60.useMemo)(() => {
8292
+ const signUp = import_css37.css`
8425
8293
  min-width: 420px;
8426
8294
  margin: 0 auto;
8427
8295
  `;
8428
- const card = import_css38.css`
8296
+ const card = import_css37.css`
8429
8297
  background: ${theme.vars.colors.background.surface};
8430
8298
  border-radius: ${theme.vars.borderRadius.large};
8431
8299
  gap: calc(${theme.vars.spacing.unit} * 2);
8432
8300
  min-width: 420px;
8433
8301
  `;
8434
- const logoContainer = import_css38.css`
8302
+ const logoContainer = import_css37.css`
8435
8303
  display: flex;
8436
8304
  flex-direction: column;
8437
8305
  align-items: center;
8438
- margin-bottom: calc(${theme.vars.spacing.unit} * 3);
8306
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8439
8307
  `;
8440
- const header = import_css38.css`
8308
+ const header = import_css37.css`
8441
8309
  gap: 0;
8310
+ align-items: center;
8442
8311
  `;
8443
- const title = import_css38.css`
8312
+ const title = import_css37.css`
8444
8313
  margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
8445
8314
  color: ${theme.vars.colors.text.primary};
8446
8315
  `;
8447
- const subtitle = import_css38.css`
8448
- margin-top: calc(${theme.vars.spacing.unit} * 1);
8316
+ const subtitle = import_css37.css`
8317
+ margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8449
8318
  color: ${theme.vars.colors.text.secondary};
8450
8319
  `;
8451
- const messagesContainer = import_css38.css`
8452
- margin-top: calc(${theme.vars.spacing.unit} * 2);
8453
- `;
8454
- const messageItem = import_css38.css`
8320
+ const messageItem = import_css37.css`
8455
8321
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8456
8322
  `;
8457
- const errorContainer = import_css38.css`
8323
+ const errorContainer = import_css37.css`
8458
8324
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8459
8325
  `;
8460
- const contentContainer = import_css38.css`
8326
+ const contentContainer = import_css37.css`
8461
8327
  display: flex;
8462
8328
  flex-direction: column;
8463
8329
  gap: calc(${theme.vars.spacing.unit} * 2);
8464
8330
  `;
8465
- const loadingContainer = import_css38.css`
8331
+ const loadingContainer = import_css37.css`
8466
8332
  display: flex;
8467
8333
  flex-direction: column;
8468
8334
  align-items: center;
8469
8335
  padding: calc(${theme.vars.spacing.unit} * 4);
8470
8336
  `;
8471
- const loadingText = import_css38.css`
8337
+ const loadingText = import_css37.css`
8472
8338
  margin-top: calc(${theme.vars.spacing.unit} * 2);
8473
8339
  color: ${theme.vars.colors.text.secondary};
8474
8340
  `;
8475
- const divider = import_css38.css`
8341
+ const divider = import_css37.css`
8476
8342
  margin: calc(${theme.vars.spacing.unit} * 1) 0;
8477
8343
  `;
8478
- const centeredContainer = import_css38.css`
8344
+ const centeredContainer = import_css37.css`
8479
8345
  text-align: center;
8480
8346
  padding: calc(${theme.vars.spacing.unit} * 4);
8481
8347
  `;
8482
- const passkeyContainer = import_css38.css`
8348
+ const passkeyContainer = import_css37.css`
8483
8349
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8484
8350
  `;
8485
- const passkeyText = import_css38.css`
8351
+ const passkeyText = import_css37.css`
8486
8352
  margin-top: calc(${theme.vars.spacing.unit} * 1);
8487
8353
  color: ${theme.vars.colors.text.secondary};
8488
8354
  `;
8489
- const form = import_css38.css`
8355
+ const form = import_css37.css`
8490
8356
  display: flex;
8491
8357
  flex-direction: column;
8492
8358
  gap: calc(${theme.vars.spacing.unit} * 2);
8493
8359
  `;
8494
- const formDivider = import_css38.css`
8360
+ const formDivider = import_css37.css`
8495
8361
  margin: calc(${theme.vars.spacing.unit} * 1) 0;
8496
8362
  `;
8497
- const authenticatorSection = import_css38.css`
8363
+ const authenticatorSection = import_css37.css`
8498
8364
  display: flex;
8499
8365
  flex-direction: column;
8500
8366
  gap: calc(${theme.vars.spacing.unit} * 1);
8501
8367
  `;
8502
- const authenticatorItem = import_css38.css`
8368
+ const authenticatorItem = import_css37.css`
8503
8369
  width: 100%;
8504
8370
  `;
8505
- const noAuthenticatorCard = import_css38.css`
8371
+ const noAuthenticatorCard = import_css37.css`
8506
8372
  background: ${theme.vars.colors.background.surface};
8507
8373
  border-radius: ${theme.vars.borderRadius.large};
8508
8374
  padding: calc(${theme.vars.spacing.unit} * 2);
8509
8375
  `;
8510
- const errorAlert = import_css38.css`
8376
+ const errorAlert = import_css37.css`
8511
8377
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8512
8378
  `;
8513
- const messagesAlert = import_css38.css`
8379
+ const messagesAlert = import_css37.css`
8514
8380
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8515
8381
  `;
8516
- const flowMessagesContainer = import_css38.css`
8517
- margin-top: calc(${theme.vars.spacing.unit} * 2);
8382
+ const flowMessagesContainer = import_css37.css`
8383
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8518
8384
  `;
8519
- const flowMessageItem = import_css38.css`
8385
+ const flowMessageItem = import_css37.css`
8520
8386
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8521
8387
  `;
8522
8388
  return {
@@ -8526,7 +8392,6 @@ var useStyles18 = (theme, colorScheme) => {
8526
8392
  header,
8527
8393
  title,
8528
8394
  subtitle,
8529
- messagesContainer,
8530
8395
  messageItem,
8531
8396
  errorContainer,
8532
8397
  contentContainer,
@@ -8555,16 +8420,16 @@ var useStyles18 = (theme, colorScheme) => {
8555
8420
  colorScheme
8556
8421
  ]);
8557
8422
  };
8558
- var BaseSignUp_styles_default = useStyles18;
8423
+ var BaseSignUp_styles_default = useStyles17;
8559
8424
 
8560
8425
  // src/components/presentation/SignUp/BaseSignUp.tsx
8561
8426
  var import_jsx_runtime67 = require("react/jsx-runtime");
8562
- var BaseSignUp = (props) => {
8427
+ var BaseSignUp = ({ showLogo = true, ...rest }) => {
8563
8428
  const { theme, colorScheme } = useTheme_default();
8564
8429
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8565
8430
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { children: [
8566
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo_default, { size: "large" }) }),
8567
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BaseSignUpContent, { ...props }) })
8431
+ showLogo && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo_default, { size: "large" }) }),
8432
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BaseSignUpContent, { showLogo, ...rest }) })
8568
8433
  ] });
8569
8434
  };
8570
8435
  var BaseSignUpContent = ({
@@ -8582,13 +8447,15 @@ var BaseSignUpContent = ({
8582
8447
  size = "medium",
8583
8448
  variant = "outlined",
8584
8449
  isInitialized,
8585
- children
8450
+ children,
8451
+ showTitle = true,
8452
+ showSubtitle = true
8586
8453
  }) => {
8587
8454
  const { theme, colorScheme } = useTheme_default();
8588
8455
  const { t } = useTranslation_default();
8589
8456
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
8590
8457
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8591
- const handleError = (0, import_react62.useCallback)(
8458
+ const handleError = (0, import_react61.useCallback)(
8592
8459
  (error) => {
8593
8460
  const errorMessage = extractErrorMessage(error, t);
8594
8461
  clearMessages();
@@ -8599,18 +8466,18 @@ var BaseSignUpContent = ({
8599
8466
  },
8600
8467
  [t, addMessage, clearMessages]
8601
8468
  );
8602
- const [isLoading, setIsLoading] = (0, import_react62.useState)(false);
8603
- const [isFlowInitialized, setIsFlowInitialized] = (0, import_react62.useState)(false);
8604
- const [currentFlow, setCurrentFlow] = (0, import_react62.useState)(null);
8605
- const [formData, setFormData] = (0, import_react62.useState)({});
8606
- const initializationAttemptedRef = (0, import_react62.useRef)(false);
8607
- const normalizeFlowResponse2 = (0, import_react62.useCallback)(
8469
+ const [isLoading, setIsLoading] = (0, import_react61.useState)(false);
8470
+ const [isFlowInitialized, setIsFlowInitialized] = (0, import_react61.useState)(false);
8471
+ const [currentFlow, setCurrentFlow] = (0, import_react61.useState)(null);
8472
+ const [formData, setFormData] = (0, import_react61.useState)({});
8473
+ const initializationAttemptedRef = (0, import_react61.useRef)(false);
8474
+ const normalizeFlowResponse2 = (0, import_react61.useCallback)(
8608
8475
  (response) => {
8609
8476
  if (response?.data?.components && Array.isArray(response.data.components)) {
8610
8477
  return response;
8611
8478
  }
8612
8479
  if (response?.data && (response.data.inputs || response.data.actions)) {
8613
- const transformedComponents = transformSimpleToComponentDriven2(response, t);
8480
+ const transformedComponents = transformSimpleToComponentDriven(response, t);
8614
8481
  return {
8615
8482
  ...response,
8616
8483
  data: {
@@ -8623,7 +8490,7 @@ var BaseSignUpContent = ({
8623
8490
  },
8624
8491
  [t]
8625
8492
  );
8626
- const extractFormFields = (0, import_react62.useCallback)(
8493
+ const extractFormFields = (0, import_react61.useCallback)(
8627
8494
  (components) => {
8628
8495
  const fields = [];
8629
8496
  const processComponents = (comps) => {
@@ -8679,7 +8546,7 @@ var BaseSignUpContent = ({
8679
8546
  touchAllFields,
8680
8547
  reset: resetForm
8681
8548
  } = form;
8682
- const setupFormFields = (0, import_react62.useCallback)(
8549
+ const setupFormFields = (0, import_react61.useCallback)(
8683
8550
  (flowResponse) => {
8684
8551
  const fields = extractFormFields(flowResponse.data?.components || []);
8685
8552
  const initialValues = {};
@@ -8853,7 +8720,7 @@ var BaseSignUpContent = ({
8853
8720
  }
8854
8721
  return false;
8855
8722
  };
8856
- const containerClasses = (0, import_css39.cx)(
8723
+ const containerClasses = (0, import_css38.cx)(
8857
8724
  [
8858
8725
  (0, import_browser60.withVendorCSSClassPrefix)("signup"),
8859
8726
  (0, import_browser60.withVendorCSSClassPrefix)(`signup--${size}`),
@@ -8861,7 +8728,7 @@ var BaseSignUpContent = ({
8861
8728
  ],
8862
8729
  className
8863
8730
  );
8864
- const inputClasses = (0, import_css39.cx)(
8731
+ const inputClasses = (0, import_css38.cx)(
8865
8732
  [
8866
8733
  (0, import_browser60.withVendorCSSClassPrefix)("signup__input"),
8867
8734
  size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__input--small"),
@@ -8869,7 +8736,7 @@ var BaseSignUpContent = ({
8869
8736
  ],
8870
8737
  inputClassName
8871
8738
  );
8872
- const buttonClasses = (0, import_css39.cx)(
8739
+ const buttonClasses = (0, import_css38.cx)(
8873
8740
  [
8874
8741
  (0, import_browser60.withVendorCSSClassPrefix)("signup__button"),
8875
8742
  size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__button--small"),
@@ -8877,9 +8744,9 @@ var BaseSignUpContent = ({
8877
8744
  ],
8878
8745
  buttonClassName
8879
8746
  );
8880
- const errorClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__error")], errorClassName);
8881
- const messageClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
8882
- const renderComponents = (0, import_react62.useCallback)(
8747
+ const errorClasses = (0, import_css38.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__error")], errorClassName);
8748
+ const messageClasses = (0, import_css38.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
8749
+ const renderComponents = (0, import_react61.useCallback)(
8883
8750
  (components) => renderSignUpComponents(
8884
8751
  components,
8885
8752
  formValues,
@@ -8909,7 +8776,7 @@ var BaseSignUpContent = ({
8909
8776
  handleSubmit
8910
8777
  ]
8911
8778
  );
8912
- (0, import_react62.useEffect)(() => {
8779
+ (0, import_react61.useEffect)(() => {
8913
8780
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
8914
8781
  initializationAttemptedRef.current = true;
8915
8782
  (async () => {
@@ -8966,29 +8833,31 @@ var BaseSignUpContent = ({
8966
8833
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: containerClasses, children: children(renderProps) });
8967
8834
  }
8968
8835
  if (!isFlowInitialized && isLoading) {
8969
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css39.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.loadingContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Spinner_default, { size: "medium" }) }) }) });
8836
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css38.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.loadingContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Spinner_default, { size: "medium" }) }) }) });
8970
8837
  }
8971
8838
  if (!currentFlow) {
8972
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css39.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Alert_default, { variant: "error", className: errorClasses, children: [
8839
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css38.cx)(containerClasses, styles.card), variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Alert_default, { variant: "error", className: errorClasses, children: [
8973
8840
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Title, { children: t("errors.title") }),
8974
8841
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: t("errors.sign.up.flow.initialization.failure") })
8975
8842
  ] }) }) });
8976
8843
  }
8977
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default, { className: (0, import_css39.cx)(containerClasses, styles.card), variant, children: [
8978
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default.Header, { className: styles.header, children: [
8979
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
8980
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subtitle") }),
8844
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default, { className: (0, import_css38.cx)(containerClasses, styles.card), variant, children: [
8845
+ (showTitle || showSubtitle) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default.Header, { className: styles.header, children: [
8846
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
8847
+ showSubtitle && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subtitle") })
8848
+ ] }),
8849
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default.Content, { children: [
8981
8850
  flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
8982
8851
  Alert_default,
8983
8852
  {
8984
8853
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
8985
- className: (0, import_css39.cx)(styles.flowMessageItem, messageClasses),
8854
+ className: (0, import_css38.cx)(styles.flowMessageItem, messageClasses),
8986
8855
  children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: message.message })
8987
8856
  },
8988
8857
  message.id || index
8989
- )) })
8990
- ] }),
8991
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Typography_default, { variant: "body1", children: t("errors.sign.up.components.not.available") }) }) }) })
8858
+ )) }),
8859
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Typography_default, { variant: "body1", children: t("errors.sign.up.components.not.available") }) }) })
8860
+ ] })
8992
8861
  ] });
8993
8862
  };
8994
8863
  var BaseSignUp_default = BaseSignUp;
@@ -9008,9 +8877,12 @@ var SignUp = ({
9008
8877
  }) => {
9009
8878
  const { signUp, isInitialized, applicationId, platform } = useAsgardeo_default();
9010
8879
  const handleInitialize = async (payload) => {
8880
+ const urlParams = new URL(window.location.href).searchParams;
8881
+ const applicationIdFromUrl = urlParams.get("applicationId");
8882
+ const effectiveApplicationId = applicationId || applicationIdFromUrl;
9011
8883
  const initialPayload = payload || {
9012
8884
  flowType: import_browser61.EmbeddedFlowType.Registration,
9013
- ...platform === import_browser61.Platform.AsgardeoV2 && applicationId && { applicationId }
8885
+ ...platform === import_browser61.Platform.AsgardeoV2 && effectiveApplicationId && { applicationId: effectiveApplicationId }
9014
8886
  };
9015
8887
  return await signUp(initialPayload);
9016
8888
  };
@@ -9037,6 +8909,9 @@ var SignUp = ({
9037
8909
  size,
9038
8910
  isInitialized,
9039
8911
  children,
8912
+ showLogo: true,
8913
+ showTitle: platform === import_browser61.Platform.AsgardeoV2,
8914
+ showSubtitle: platform === import_browser61.Platform.AsgardeoV2,
9040
8915
  ...rest
9041
8916
  }
9042
8917
  );
@@ -9085,8 +8960,8 @@ var Organization_default = Organization5;
9085
8960
 
9086
8961
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
9087
8962
  var import_browser67 = require("@asgardeo/browser");
9088
- var import_css47 = require("@emotion/css");
9089
- var import_react71 = require("react");
8963
+ var import_css46 = require("@emotion/css");
8964
+ var import_react70 = require("react");
9090
8965
 
9091
8966
  // src/utils/getMappedUserProfileValue.ts
9092
8967
  var import_browser62 = require("@asgardeo/browser");
@@ -9113,15 +8988,15 @@ var getMappedUserProfileValue_default = getMappedUserProfileValue;
9113
8988
 
9114
8989
  // src/components/primitives/Avatar/Avatar.tsx
9115
8990
  var import_browser63 = require("@asgardeo/browser");
9116
- var import_css41 = require("@emotion/css");
9117
- var import_react64 = require("react");
9118
-
9119
- // src/components/primitives/Avatar/Avatar.styles.ts
9120
8991
  var import_css40 = require("@emotion/css");
9121
8992
  var import_react63 = require("react");
9122
- var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9123
- return (0, import_react63.useMemo)(() => {
9124
- const baseAvatar = import_css40.css`
8993
+
8994
+ // src/components/primitives/Avatar/Avatar.styles.ts
8995
+ var import_css39 = require("@emotion/css");
8996
+ var import_react62 = require("react");
8997
+ var useStyles18 = (theme, colorScheme, size, variant, backgroundColor) => {
8998
+ return (0, import_react62.useMemo)(() => {
8999
+ const baseAvatar = import_css39.css`
9125
9000
  align-items: center;
9126
9001
  background: ${backgroundColor || theme.vars.colors.background.surface};
9127
9002
  border: ${backgroundColor ? "none" : `1px solid ${theme.vars.colors.border}`};
@@ -9137,19 +9012,19 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9137
9012
  width: ${size}px;
9138
9013
  `;
9139
9014
  const variantStyles = {
9140
- circular: import_css40.css`
9015
+ circular: import_css39.css`
9141
9016
  border-radius: 50%;
9142
9017
  `,
9143
- square: import_css40.css`
9018
+ square: import_css39.css`
9144
9019
  border-radius: 8px;
9145
9020
  `
9146
9021
  };
9147
- const imageStyles = import_css40.css`
9022
+ const imageStyles = import_css39.css`
9148
9023
  height: 100%;
9149
9024
  object-fit: cover;
9150
9025
  width: 100%;
9151
9026
  `;
9152
- const skeletonStyles = import_css40.css`
9027
+ const skeletonStyles = import_css39.css`
9153
9028
  width: 100%;
9154
9029
  height: 100%;
9155
9030
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
@@ -9166,7 +9041,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9166
9041
  }
9167
9042
  }
9168
9043
  `;
9169
- const iconStyles = import_css40.css`
9044
+ const iconStyles = import_css39.css`
9170
9045
  width: 60%;
9171
9046
  height: 60%;
9172
9047
  fill: ${backgroundColor ? "#ffffff" : theme.vars.colors.text.secondary};
@@ -9181,7 +9056,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9181
9056
  };
9182
9057
  }, [theme, colorScheme, size, variant, backgroundColor]);
9183
9058
  };
9184
- var Avatar_styles_default = useStyles19;
9059
+ var Avatar_styles_default = useStyles18;
9185
9060
 
9186
9061
  // src/components/primitives/Avatar/Avatar.tsx
9187
9062
  var import_jsx_runtime73 = require("react/jsx-runtime");
@@ -9214,7 +9089,7 @@ var Avatar = ({
9214
9089
  const colors = generateColor(seed);
9215
9090
  return `linear-gradient(${angle}deg, ${colors})`;
9216
9091
  };
9217
- const backgroundColor = (0, import_react64.useMemo)(() => {
9092
+ const backgroundColor = (0, import_react63.useMemo)(() => {
9218
9093
  if (!name || imageUrl) {
9219
9094
  return void 0;
9220
9095
  }
@@ -9231,20 +9106,20 @@ var Avatar = ({
9231
9106
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
9232
9107
  const renderContent = () => {
9233
9108
  if (imageUrl) {
9234
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("img", { src: imageUrl, alt, className: (0, import_css41.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "image")), styles.image) });
9109
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("img", { src: imageUrl, alt, className: (0, import_css40.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "image")), styles.image) });
9235
9110
  }
9236
9111
  if (name) {
9237
9112
  return getInitials(name);
9238
9113
  }
9239
9114
  if (isLoading) {
9240
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: (0, import_css41.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "skeleton")), styles.skeleton) });
9115
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: (0, import_css40.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "skeleton")), styles.skeleton) });
9241
9116
  }
9242
9117
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9243
9118
  "svg",
9244
9119
  {
9245
9120
  xmlns: "http://www.w3.org/2000/svg",
9246
9121
  viewBox: "0 0 640 640",
9247
- className: (0, import_css41.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "icon")), styles.icon),
9122
+ className: (0, import_css40.cx)((0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar", "icon")), styles.icon),
9248
9123
  children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("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" })
9249
9124
  }
9250
9125
  );
@@ -9252,7 +9127,7 @@ var Avatar = ({
9252
9127
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9253
9128
  "div",
9254
9129
  {
9255
- className: (0, import_css41.cx)(
9130
+ className: (0, import_css40.cx)(
9256
9131
  (0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar")),
9257
9132
  styles.avatar,
9258
9133
  styles.variant,
@@ -9268,9 +9143,9 @@ var Avatar_default = Avatar;
9268
9143
 
9269
9144
  // src/components/primitives/Dialog/Dialog.tsx
9270
9145
  var import_browser64 = require("@asgardeo/browser");
9271
- var import_react66 = require("@floating-ui/react");
9272
- var import_css43 = require("@emotion/css");
9273
- var import_react67 = __toESM(require("react"), 1);
9146
+ var import_react65 = require("@floating-ui/react");
9147
+ var import_css42 = require("@emotion/css");
9148
+ var import_react66 = __toESM(require("react"), 1);
9274
9149
 
9275
9150
  // src/components/primitives/Icons/LogOut.tsx
9276
9151
  var import_jsx_runtime74 = require("react/jsx-runtime");
@@ -9366,18 +9241,18 @@ var X = (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
9366
9241
  var X_default = X;
9367
9242
 
9368
9243
  // src/components/primitives/Dialog/Dialog.styles.ts
9369
- var import_css42 = require("@emotion/css");
9370
- var import_react65 = require("react");
9371
- var useStyles20 = (theme, colorScheme) => {
9372
- return (0, import_react65.useMemo)(() => {
9373
- const overlay = import_css42.css`
9244
+ var import_css41 = require("@emotion/css");
9245
+ var import_react64 = require("react");
9246
+ var useStyles19 = (theme, colorScheme) => {
9247
+ return (0, import_react64.useMemo)(() => {
9248
+ const overlay = import_css41.css`
9374
9249
  background-color: rgba(0, 0, 0, 0.5);
9375
9250
  display: flex;
9376
9251
  align-items: center;
9377
9252
  justify-content: center;
9378
9253
  z-index: 9999;
9379
9254
  `;
9380
- const content = import_css42.css`
9255
+ const content = import_css41.css`
9381
9256
  background: ${theme.vars.colors.background.surface};
9382
9257
  border-radius: ${theme.vars.borderRadius.large};
9383
9258
  box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
@@ -9385,7 +9260,7 @@ var useStyles20 = (theme, colorScheme) => {
9385
9260
  overflow-y: auto;
9386
9261
  z-index: 10000;
9387
9262
  `;
9388
- const dropdownContent = import_css42.css`
9263
+ const dropdownContent = import_css41.css`
9389
9264
  background: ${theme.vars.colors.background.surface};
9390
9265
  border-radius: ${theme.vars.borderRadius.large};
9391
9266
  box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
@@ -9395,23 +9270,23 @@ var useStyles20 = (theme, colorScheme) => {
9395
9270
  overflow-y: auto;
9396
9271
  z-index: 10000;
9397
9272
  `;
9398
- const header = import_css42.css`
9273
+ const header = import_css41.css`
9399
9274
  display: flex;
9400
9275
  justify-content: space-between;
9401
9276
  align-items: center;
9402
9277
  padding: calc(${theme.vars.spacing.unit} * 3) calc(${theme.vars.spacing.unit} * 4.5);
9403
9278
  border-bottom: 1px solid ${theme.vars.colors.border};
9404
9279
  `;
9405
- const headerTitle = import_css42.css`
9280
+ const headerTitle = import_css41.css`
9406
9281
  margin: 0;
9407
9282
  font-size: 1.2rem;
9408
9283
  font-weight: 600;
9409
9284
  color: ${theme.vars.colors.text.primary};
9410
9285
  `;
9411
- const contentBody = import_css42.css`
9286
+ const contentBody = import_css41.css`
9412
9287
  padding: calc(${theme.vars.spacing.unit} * 2);
9413
9288
  `;
9414
- const description = import_css42.css`
9289
+ const description = import_css41.css`
9415
9290
  margin: 0;
9416
9291
  color: ${theme.vars.colors.text.secondary};
9417
9292
  font-size: ${theme.vars.typography.fontSizes.sm};
@@ -9428,7 +9303,7 @@ var useStyles20 = (theme, colorScheme) => {
9428
9303
  };
9429
9304
  }, [theme, colorScheme]);
9430
9305
  };
9431
- var Dialog_styles_default = useStyles20;
9306
+ var Dialog_styles_default = useStyles19;
9432
9307
 
9433
9308
  // src/components/primitives/Dialog/Dialog.tsx
9434
9309
  var import_jsx_runtime78 = require("react/jsx-runtime");
@@ -9437,23 +9312,23 @@ function useDialog({
9437
9312
  open: controlledOpen,
9438
9313
  onOpenChange: setControlledOpen
9439
9314
  } = {}) {
9440
- const [uncontrolledOpen, setUncontrolledOpen] = import_react67.default.useState(initialOpen);
9441
- const [labelId, setLabelId] = import_react67.default.useState();
9442
- const [descriptionId, setDescriptionId] = import_react67.default.useState();
9315
+ const [uncontrolledOpen, setUncontrolledOpen] = import_react66.default.useState(initialOpen);
9316
+ const [labelId, setLabelId] = import_react66.default.useState();
9317
+ const [descriptionId, setDescriptionId] = import_react66.default.useState();
9443
9318
  const open = controlledOpen ?? uncontrolledOpen;
9444
9319
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
9445
- const data = (0, import_react66.useFloating)({
9320
+ const data = (0, import_react65.useFloating)({
9446
9321
  open,
9447
9322
  onOpenChange: setOpen
9448
9323
  });
9449
9324
  const { context } = data;
9450
- const click = (0, import_react66.useClick)(context, {
9325
+ const click = (0, import_react65.useClick)(context, {
9451
9326
  enabled: controlledOpen == null
9452
9327
  });
9453
- const dismiss = (0, import_react66.useDismiss)(context, { outsidePressEvent: "mousedown" });
9454
- const role = (0, import_react66.useRole)(context);
9455
- const interactions = (0, import_react66.useInteractions)([click, dismiss, role]);
9456
- return import_react67.default.useMemo(
9328
+ const dismiss = (0, import_react65.useDismiss)(context, { outsidePressEvent: "mousedown" });
9329
+ const role = (0, import_react65.useRole)(context);
9330
+ const interactions = (0, import_react65.useInteractions)([click, dismiss, role]);
9331
+ return import_react66.default.useMemo(
9457
9332
  () => ({
9458
9333
  open,
9459
9334
  setOpen,
@@ -9467,9 +9342,9 @@ function useDialog({
9467
9342
  [open, setOpen, interactions, data, labelId, descriptionId]
9468
9343
  );
9469
9344
  }
9470
- var DialogContext = import_react67.default.createContext(null);
9345
+ var DialogContext = import_react66.default.createContext(null);
9471
9346
  var useDialogContext = () => {
9472
- const context = import_react67.default.useContext(DialogContext);
9347
+ const context = import_react66.default.useContext(DialogContext);
9473
9348
  if (context == null) {
9474
9349
  throw new Error("Dialog components must be wrapped in <Dialog />");
9475
9350
  }
@@ -9479,13 +9354,13 @@ function Dialog({ children, ...options }) {
9479
9354
  const dialog = useDialog(options);
9480
9355
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DialogContext.Provider, { value: dialog, children });
9481
9356
  }
9482
- var DialogTrigger = import_react67.default.forwardRef(
9357
+ var DialogTrigger = import_react66.default.forwardRef(
9483
9358
  ({ children, asChild = false, ...props }, propRef) => {
9484
9359
  const context = useDialogContext();
9485
9360
  const childrenRef = children.ref;
9486
- const ref = (0, import_react66.useMergeRefs)([context.refs.setReference, propRef, childrenRef]);
9487
- if (asChild && import_react67.default.isValidElement(children)) {
9488
- return import_react67.default.cloneElement(
9361
+ const ref = (0, import_react65.useMergeRefs)([context.refs.setReference, propRef, childrenRef]);
9362
+ if (asChild && import_react66.default.isValidElement(children)) {
9363
+ return import_react66.default.cloneElement(
9489
9364
  children,
9490
9365
  context.getReferenceProps({
9491
9366
  ref,
@@ -9498,17 +9373,17 @@ var DialogTrigger = import_react67.default.forwardRef(
9498
9373
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
9499
9374
  }
9500
9375
  );
9501
- var DialogContent = import_react67.default.forwardRef((props, propRef) => {
9376
+ var DialogContent = import_react66.default.forwardRef((props, propRef) => {
9502
9377
  const { context: floatingContext, ...context } = useDialogContext();
9503
9378
  const { theme, colorScheme } = useTheme_default();
9504
9379
  const styles = Dialog_styles_default(theme, colorScheme);
9505
- const ref = (0, import_react66.useMergeRefs)([context.refs.setFloating, propRef]);
9380
+ const ref = (0, import_react65.useMergeRefs)([context.refs.setFloating, propRef]);
9506
9381
  if (!floatingContext.open) return null;
9507
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react66.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react66.FloatingOverlay, { className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react66.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
9382
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react65.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react65.FloatingOverlay, { className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react65.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
9508
9383
  "div",
9509
9384
  {
9510
9385
  ref,
9511
- className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "content")), styles.content, props.className),
9386
+ className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "content")), styles.content, props.className),
9512
9387
  "aria-labelledby": context.labelId,
9513
9388
  "aria-describedby": context.descriptionId,
9514
9389
  ...context.getFloatingProps(props),
@@ -9516,24 +9391,24 @@ var DialogContent = import_react67.default.forwardRef((props, propRef) => {
9516
9391
  }
9517
9392
  ) }) }) });
9518
9393
  });
9519
- var DialogHeading = import_react67.default.forwardRef(
9394
+ var DialogHeading = import_react66.default.forwardRef(
9520
9395
  ({ children, ...props }, ref) => {
9521
9396
  const context = useDialogContext();
9522
9397
  const { theme, colorScheme } = useTheme_default();
9523
9398
  const styles = Dialog_styles_default(theme, colorScheme);
9524
- const id = (0, import_react66.useId)();
9525
- import_react67.default.useLayoutEffect(() => {
9399
+ const id = (0, import_react65.useId)();
9400
+ import_react66.default.useLayoutEffect(() => {
9526
9401
  context.setLabelId(id);
9527
9402
  return () => context.setLabelId(void 0);
9528
9403
  }, [id, context.setLabelId]);
9529
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "header")), styles.header), children: [
9404
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "header")), styles.header), children: [
9530
9405
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
9531
9406
  "h2",
9532
9407
  {
9533
9408
  ...props,
9534
9409
  ref,
9535
9410
  id,
9536
- className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "title")), styles.headerTitle),
9411
+ className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "title")), styles.headerTitle),
9537
9412
  children
9538
9413
  }
9539
9414
  ),
@@ -9552,13 +9427,13 @@ var DialogHeading = import_react67.default.forwardRef(
9552
9427
  ] });
9553
9428
  }
9554
9429
  );
9555
- var DialogDescription = import_react67.default.forwardRef(
9430
+ var DialogDescription = import_react66.default.forwardRef(
9556
9431
  ({ children, ...props }, ref) => {
9557
9432
  const context = useDialogContext();
9558
9433
  const { theme, colorScheme } = useTheme_default();
9559
9434
  const styles = Dialog_styles_default(theme, colorScheme);
9560
- const id = (0, import_react66.useId)();
9561
- import_react67.default.useLayoutEffect(() => {
9435
+ const id = (0, import_react65.useId)();
9436
+ import_react66.default.useLayoutEffect(() => {
9562
9437
  context.setDescriptionId(id);
9563
9438
  return () => context.setDescriptionId(void 0);
9564
9439
  }, [id, context.setDescriptionId]);
@@ -9568,24 +9443,24 @@ var DialogDescription = import_react67.default.forwardRef(
9568
9443
  ...props,
9569
9444
  ref,
9570
9445
  id,
9571
- className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "description")), styles.description, props.className),
9446
+ className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "description")), styles.description, props.className),
9572
9447
  children
9573
9448
  }
9574
9449
  );
9575
9450
  }
9576
9451
  );
9577
- var DialogClose = import_react67.default.forwardRef(({ children, asChild = false, ...props }, propRef) => {
9452
+ var DialogClose = import_react66.default.forwardRef(({ children, asChild = false, ...props }, propRef) => {
9578
9453
  const context = useDialogContext();
9579
9454
  const { theme, colorScheme } = useTheme_default();
9580
9455
  const styles = Dialog_styles_default(theme, colorScheme);
9581
9456
  const childrenRef = children?.ref;
9582
- const ref = (0, import_react66.useMergeRefs)([propRef, childrenRef]);
9457
+ const ref = (0, import_react65.useMergeRefs)([propRef, childrenRef]);
9583
9458
  const handleClick = (event) => {
9584
9459
  context.setOpen(false);
9585
9460
  props.onClick?.(event);
9586
9461
  };
9587
- if (asChild && import_react67.default.isValidElement(children)) {
9588
- return import_react67.default.cloneElement(children, {
9462
+ if (asChild && import_react66.default.isValidElement(children)) {
9463
+ return import_react66.default.cloneElement(children, {
9589
9464
  ref,
9590
9465
  ...props,
9591
9466
  ...children.props,
@@ -9598,7 +9473,7 @@ var DialogClose = import_react67.default.forwardRef(({ children, asChild = false
9598
9473
  ...props,
9599
9474
  ref,
9600
9475
  onClick: handleClick,
9601
- className: (0, import_css43.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "close")), props.className),
9476
+ className: (0, import_css42.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("dialog", "close")), props.className),
9602
9477
  variant: "text",
9603
9478
  children
9604
9479
  }
@@ -9617,41 +9492,41 @@ Dialog.Close = DialogClose;
9617
9492
  var Dialog_default = Dialog;
9618
9493
 
9619
9494
  // src/components/primitives/MultiInput/MultiInput.tsx
9620
- var import_react69 = require("react");
9621
- var import_css45 = require("@emotion/css");
9495
+ var import_react68 = require("react");
9496
+ var import_css44 = require("@emotion/css");
9622
9497
  var import_browser65 = require("@asgardeo/browser");
9623
9498
 
9624
9499
  // src/components/primitives/MultiInput/MultiInput.styles.ts
9625
- var import_css44 = require("@emotion/css");
9626
- var import_react68 = require("react");
9627
- var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove) => {
9628
- return (0, import_react68.useMemo)(() => {
9629
- const container = import_css44.css`
9500
+ var import_css43 = require("@emotion/css");
9501
+ var import_react67 = require("react");
9502
+ var useStyles20 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove) => {
9503
+ return (0, import_react67.useMemo)(() => {
9504
+ const container = import_css43.css`
9630
9505
  display: flex;
9631
9506
  flex-direction: column;
9632
9507
  gap: ${theme.vars.spacing.unit};
9633
9508
  `;
9634
- const inputRow = import_css44.css`
9509
+ const inputRow = import_css43.css`
9635
9510
  display: flex;
9636
9511
  align-items: center;
9637
9512
  gap: ${theme.vars.spacing.unit};
9638
9513
  position: relative;
9639
9514
  `;
9640
- const inputWrapper = import_css44.css`
9515
+ const inputWrapper = import_css43.css`
9641
9516
  flex: 1;
9642
9517
  `;
9643
- const plusIcon = import_css44.css`
9518
+ const plusIcon = import_css43.css`
9644
9519
  background: ${theme.vars.colors.secondary.main};
9645
9520
  border-radius: 50%;
9646
9521
  outline: 4px ${theme.vars.colors.secondary.main} auto;
9647
9522
  color: ${theme.vars.colors.secondary.contrastText};
9648
9523
  `;
9649
- const listContainer = import_css44.css`
9524
+ const listContainer = import_css43.css`
9650
9525
  display: flex;
9651
9526
  flex-direction: column;
9652
9527
  gap: 0;
9653
9528
  `;
9654
- const listItem = import_css44.css`
9529
+ const listItem = import_css43.css`
9655
9530
  display: flex;
9656
9531
  align-items: center;
9657
9532
  justify-content: space-between;
@@ -9666,11 +9541,11 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9666
9541
  margin-bottom: 0;
9667
9542
  }
9668
9543
  `;
9669
- const listItemText = import_css44.css`
9544
+ const listItemText = import_css43.css`
9670
9545
  flex: 1;
9671
9546
  word-break: break-word;
9672
9547
  `;
9673
- const removeButton = import_css44.css`
9548
+ const removeButton = import_css43.css`
9674
9549
  padding: calc(${theme.vars.spacing.unit} / 2);
9675
9550
  min-width: auto;
9676
9551
  color: ${theme.vars.colors.error.main};
@@ -9690,7 +9565,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9690
9565
  opacity: 0.6;
9691
9566
  }
9692
9567
  `;
9693
- const icon = import_css44.css`
9568
+ const icon = import_css43.css`
9694
9569
  width: 16px;
9695
9570
  height: 16px;
9696
9571
  stroke: currentColor;
@@ -9712,7 +9587,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9712
9587
  };
9713
9588
  }, [theme, colorScheme, disabled, hasError, canAddMore, canRemove]);
9714
9589
  };
9715
- var MultiInput_styles_default = useStyles21;
9590
+ var MultiInput_styles_default = useStyles20;
9716
9591
 
9717
9592
  // src/components/primitives/MultiInput/MultiInput.tsx
9718
9593
  var import_jsx_runtime79 = require("react/jsx-runtime");
@@ -9738,9 +9613,9 @@ var MultiInput = ({
9738
9613
  const canAddMore = !maxFields || values.length < maxFields;
9739
9614
  const canRemove = values.length > minFields;
9740
9615
  const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
9741
- const PlusIcon = ({ className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: (0, import_css45.cx)(styles.icon, className2), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { d: "M12 5v14M5 12h14" }) });
9742
- const BinIcon = ({ className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: (0, import_css45.cx)(styles.icon, className2), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("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" }) });
9743
- const handleAddValue = (0, import_react69.useCallback)(
9616
+ const PlusIcon = ({ className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: (0, import_css44.cx)(styles.icon, className2), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { d: "M12 5v14M5 12h14" }) });
9617
+ const BinIcon = ({ className: className2 }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: (0, import_css44.cx)(styles.icon, className2), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("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" }) });
9618
+ const handleAddValue = (0, import_react68.useCallback)(
9744
9619
  (newValue) => {
9745
9620
  if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
9746
9621
  onChange([...values, newValue.trim()]);
@@ -9748,7 +9623,7 @@ var MultiInput = ({
9748
9623
  },
9749
9624
  [values, onChange, maxFields]
9750
9625
  );
9751
- const handleRemoveValue = (0, import_react69.useCallback)(
9626
+ const handleRemoveValue = (0, import_react68.useCallback)(
9752
9627
  (index) => {
9753
9628
  if (values.length > minFields) {
9754
9629
  const updatedValues = values.filter((_, i) => i !== index);
@@ -9757,7 +9632,7 @@ var MultiInput = ({
9757
9632
  },
9758
9633
  [values, onChange, minFields]
9759
9634
  );
9760
- const renderInputField = (0, import_react69.useCallback)(
9635
+ const renderInputField = (0, import_react68.useCallback)(
9761
9636
  (value, onValueChange, attachedEndIcon, onEndIconClick) => {
9762
9637
  const handleInputChange = (e) => {
9763
9638
  const newValue = e.target ? e.target.value : e;
@@ -9799,8 +9674,8 @@ var MultiInput = ({
9799
9674
  },
9800
9675
  [placeholder, disabled, startIcon, endIcon, error, fieldType, type]
9801
9676
  );
9802
- const [currentInputValue, setCurrentInputValue] = (0, import_react69.useState)("");
9803
- const handleInputSubmit = (0, import_react69.useCallback)(() => {
9677
+ const [currentInputValue, setCurrentInputValue] = (0, import_react68.useState)("");
9678
+ const handleInputSubmit = (0, import_react68.useCallback)(() => {
9804
9679
  if (currentInputValue.trim() !== "") {
9805
9680
  handleAddValue(currentInputValue);
9806
9681
  setCurrentInputValue("");
@@ -9811,26 +9686,26 @@ var MultiInput = ({
9811
9686
  {
9812
9687
  error,
9813
9688
  helperText,
9814
- className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input")), className),
9689
+ className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input")), className),
9815
9690
  style,
9816
9691
  children: [
9817
9692
  label && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(InputLabel_default, { required, error: !!error, children: label }),
9818
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "container")), styles.container), children: [
9819
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
9693
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "container")), styles.container), children: [
9694
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
9820
9695
  currentInputValue,
9821
9696
  setCurrentInputValue,
9822
9697
  canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlusIcon, { className: styles.plusIcon }) : void 0,
9823
9698
  canAddMore ? handleInputSubmit : void 0
9824
9699
  ) }) }),
9825
- values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
9700
+ values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
9826
9701
  "div",
9827
9702
  {
9828
- className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-item")), styles.listItem),
9703
+ className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-item")), styles.listItem),
9829
9704
  children: [
9830
9705
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
9831
9706
  "span",
9832
9707
  {
9833
- className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-item-text")), styles.listItemText),
9708
+ className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "list-item-text")), styles.listItemText),
9834
9709
  children: value
9835
9710
  }
9836
9711
  ),
@@ -9840,7 +9715,7 @@ var MultiInput = ({
9840
9715
  type: "button",
9841
9716
  onClick: () => handleRemoveValue(index),
9842
9717
  disabled,
9843
- className: (0, import_css45.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "remove-button")), styles.removeButton),
9718
+ className: (0, import_css44.cx)((0, import_browser65.withVendorCSSClassPrefix)((0, import_browser65.bem)("multi-input", "remove-button")), styles.removeButton),
9844
9719
  title: "Remove value",
9845
9720
  children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BinIcon, { className: styles.icon })
9846
9721
  }
@@ -9857,15 +9732,15 @@ var MultiInput = ({
9857
9732
  var MultiInput_default = MultiInput;
9858
9733
 
9859
9734
  // src/components/presentation/UserProfile/BaseUserProfile.styles.ts
9860
- var import_css46 = require("@emotion/css");
9861
- var import_react70 = require("react");
9735
+ var import_css45 = require("@emotion/css");
9736
+ var import_react69 = require("react");
9862
9737
  var import_browser66 = require("@asgardeo/browser");
9863
- var useStyles22 = (theme, colorScheme) => {
9864
- const valuePlaceholder = import_css46.css`
9738
+ var useStyles21 = (theme, colorScheme) => {
9739
+ const valuePlaceholder = import_css45.css`
9865
9740
  font-style: italic;
9866
9741
  opacity: 0.7;
9867
9742
  `;
9868
- const editButton = import_css46.css`
9743
+ const editButton = import_css45.css`
9869
9744
  font-style: italic;
9870
9745
  text-decoration: underline;
9871
9746
  opacity: 0.7;
@@ -9876,19 +9751,19 @@ var useStyles22 = (theme, colorScheme) => {
9876
9751
  background-color: transparent;
9877
9752
  }
9878
9753
  `;
9879
- const fieldInner = import_css46.css`
9754
+ const fieldInner = import_css45.css`
9880
9755
  flex: 1;
9881
9756
  display: flex;
9882
9757
  align-items: center;
9883
9758
  gap: ${theme.vars.spacing.unit};
9884
9759
  `;
9885
- const fieldActions = import_css46.css`
9760
+ const fieldActions = import_css45.css`
9886
9761
  display: flex;
9887
9762
  gap: calc(${theme.vars.spacing.unit} / 2);
9888
9763
  align-items: center;
9889
9764
  margin-inline-start: calc(${theme.vars.spacing.unit} * 4);
9890
9765
  `;
9891
- const complexTextarea = import_css46.css`
9766
+ const complexTextarea = import_css45.css`
9892
9767
  min-height: 60px;
9893
9768
  width: 100%;
9894
9769
  padding: 8px;
@@ -9896,57 +9771,57 @@ var useStyles22 = (theme, colorScheme) => {
9896
9771
  border-radius: ${theme.vars.borderRadius.small};
9897
9772
  resize: vertical;
9898
9773
  `;
9899
- const objectKey = import_css46.css`
9774
+ const objectKey = import_css45.css`
9900
9775
  padding: ${theme.vars.spacing.unit};
9901
9776
  vertical-align: top;
9902
9777
  `;
9903
- const objectValue = import_css46.css`
9778
+ const objectValue = import_css45.css`
9904
9779
  padding: ${theme.vars.spacing.unit};
9905
9780
  vertical-align: top;
9906
9781
  `;
9907
- return (0, import_react70.useMemo)(() => {
9908
- const root = import_css46.css`
9782
+ return (0, import_react69.useMemo)(() => {
9783
+ const root = import_css45.css`
9909
9784
  padding: calc(${theme.vars.spacing.unit} * 4);
9910
9785
  min-width: 600px;
9911
9786
  margin: 0 auto;
9912
9787
  `;
9913
- const card = import_css46.css`
9788
+ const card = import_css45.css`
9914
9789
  background: ${theme.vars.colors.background.surface};
9915
9790
  border-radius: ${theme.vars.borderRadius.large};
9916
9791
  `;
9917
- const header = import_css46.css`
9792
+ const header = import_css45.css`
9918
9793
  display: flex;
9919
9794
  align-items: center;
9920
9795
  gap: calc(${theme.vars.spacing.unit} * 1.5);
9921
9796
  margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
9922
9797
  `;
9923
- const profileInfo = import_css46.css`
9798
+ const profileInfo = import_css45.css`
9924
9799
  flex: 1;
9925
9800
  `;
9926
- const name = import_css46.css`
9801
+ const name = import_css45.css`
9927
9802
  font-size: 1.5rem;
9928
9803
  font-weight: 600;
9929
9804
  margin: 0;
9930
9805
  color: ${theme.vars.colors.text.primary};
9931
9806
  `;
9932
- const infoContainer = import_css46.css`
9807
+ const infoContainer = import_css45.css`
9933
9808
  display: flex;
9934
9809
  flex-direction: column;
9935
9810
  `;
9936
- const info = import_css46.css`
9811
+ const info = import_css45.css`
9937
9812
  padding: calc(${theme.vars.spacing.unit} * 1.5) 0;
9938
9813
  border-bottom: 1px solid ${theme.vars.colors.border};
9939
9814
  `;
9940
- const field = import_css46.css`
9815
+ const field = import_css45.css`
9941
9816
  display: flex;
9942
9817
  align-items: center;
9943
9818
  padding: calc(${theme.vars.spacing.unit} / 2) 0;
9944
9819
  min-height: 28px;
9945
9820
  `;
9946
- const lastField = import_css46.css`
9821
+ const lastField = import_css45.css`
9947
9822
  border-bottom: none;
9948
9823
  `;
9949
- const label = import_css46.css`
9824
+ const label = import_css45.css`
9950
9825
  font-size: 0.875rem;
9951
9826
  font-weight: 500;
9952
9827
  color: ${theme.vars.colors.text.secondary};
@@ -9955,7 +9830,7 @@ var useStyles22 = (theme, colorScheme) => {
9955
9830
  line-height: 28px;
9956
9831
  text-align: start;
9957
9832
  `;
9958
- const value = import_css46.css`
9833
+ const value = import_css45.css`
9959
9834
  color: ${theme.vars.colors.text.primary};
9960
9835
  flex: 1;
9961
9836
  display: inline-block;
@@ -9988,10 +9863,10 @@ var useStyles22 = (theme, colorScheme) => {
9988
9863
  border-color: ${theme.vars.colors.border};
9989
9864
  }
9990
9865
  `;
9991
- const popup = import_css46.css`
9866
+ const popup = import_css45.css`
9992
9867
  padding: calc(${theme.vars.spacing.unit} * 2);
9993
9868
  `;
9994
- const alert = import_css46.css`
9869
+ const alert = import_css45.css`
9995
9870
  margin-bottom: calc(${theme.vars.spacing.unit} * 3);
9996
9871
  `;
9997
9872
  return {
@@ -10027,7 +9902,7 @@ var useStyles22 = (theme, colorScheme) => {
10027
9902
  colorScheme
10028
9903
  ]);
10029
9904
  };
10030
- var BaseUserProfile_styles_default = useStyles22;
9905
+ var BaseUserProfile_styles_default = useStyles21;
10031
9906
 
10032
9907
  // src/utils/getDisplayName.ts
10033
9908
  var getDisplayName = (mergedMappings, user) => {
@@ -10083,10 +9958,10 @@ var BaseUserProfile = ({
10083
9958
  hideFields = []
10084
9959
  }) => {
10085
9960
  const { theme, colorScheme } = useTheme_default();
10086
- const [editedUser, setEditedUser] = (0, import_react71.useState)(flattenedProfile || profile);
10087
- const [editingFields, setEditingFields] = (0, import_react71.useState)({});
9961
+ const [editedUser, setEditedUser] = (0, import_react70.useState)(flattenedProfile || profile);
9962
+ const [editingFields, setEditingFields] = (0, import_react70.useState)({});
10088
9963
  const { t } = useTranslation_default();
10089
- const shouldShowField = (0, import_react71.useCallback)(
9964
+ const shouldShowField = (0, import_react70.useCallback)(
10090
9965
  (fieldName) => {
10091
9966
  if (fieldsToSkip.includes(fieldName)) {
10092
9967
  return false;
@@ -10115,13 +9990,13 @@ var BaseUserProfile = ({
10115
9990
  children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
10116
9991
  }
10117
9992
  );
10118
- const toggleFieldEdit = (0, import_react71.useCallback)((fieldName) => {
9993
+ const toggleFieldEdit = (0, import_react70.useCallback)((fieldName) => {
10119
9994
  setEditingFields((prev) => ({
10120
9995
  ...prev,
10121
9996
  [fieldName]: !prev[fieldName]
10122
9997
  }));
10123
9998
  }, []);
10124
- const getFieldPlaceholder = (0, import_react71.useCallback)((schema) => {
9999
+ const getFieldPlaceholder = (0, import_react70.useCallback)((schema) => {
10125
10000
  const { type, displayName, description, name } = schema;
10126
10001
  const fieldLabel = displayName || description || name || "value";
10127
10002
  switch (type) {
@@ -10160,7 +10035,7 @@ var BaseUserProfile = ({
10160
10035
  }
10161
10036
  }
10162
10037
  }
10163
- const handleFieldSave = (0, import_react71.useCallback)(
10038
+ const handleFieldSave = (0, import_react70.useCallback)(
10164
10039
  (schema) => {
10165
10040
  if (!onUpdate || !schema.name) return;
10166
10041
  const fieldName = schema.name;
@@ -10183,7 +10058,7 @@ var BaseUserProfile = ({
10183
10058
  },
10184
10059
  [editedUser, flattenedProfile, onUpdate, toggleFieldEdit]
10185
10060
  );
10186
- const handleFieldCancel = (0, import_react71.useCallback)(
10061
+ const handleFieldCancel = (0, import_react70.useCallback)(
10187
10062
  (fieldName) => {
10188
10063
  const currentUser2 = flattenedProfile || profile;
10189
10064
  setEditedUser((prev) => ({
@@ -10194,7 +10069,7 @@ var BaseUserProfile = ({
10194
10069
  },
10195
10070
  [flattenedProfile, profile, toggleFieldEdit]
10196
10071
  );
10197
- const formatLabel = (0, import_react71.useCallback)(
10072
+ const formatLabel = (0, import_react70.useCallback)(
10198
10073
  (key) => key.split(/(?=[A-Z])|_/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" "),
10199
10074
  []
10200
10075
  );
@@ -10268,7 +10143,7 @@ var BaseUserProfile = ({
10268
10143
  }
10269
10144
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
10270
10145
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: styles.label, children: label }),
10271
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: (0, import_css47.cx)(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
10146
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: (0, import_css46.cx)(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
10272
10147
  Button_default,
10273
10148
  {
10274
10149
  onClick: onStartEdit,
@@ -10338,7 +10213,7 @@ var BaseUserProfile = ({
10338
10213
  }
10339
10214
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
10340
10215
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: styles.label, children: label }),
10341
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: (0, import_css47.cx)(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
10216
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: (0, import_css46.cx)(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
10342
10217
  Button_default,
10343
10218
  {
10344
10219
  onClick: onStartEdit,
@@ -10400,7 +10275,7 @@ var BaseUserProfile = ({
10400
10275
  if (!profile && !flattenedProfile) {
10401
10276
  return fallback;
10402
10277
  }
10403
- const containerClasses = (0, import_css47.cx)(
10278
+ const containerClasses = (0, import_css46.cx)(
10404
10279
  styles.root,
10405
10280
  cardLayout ? styles.card : "",
10406
10281
  (0, import_browser67.withVendorCSSClassPrefix)("user-profile"),
@@ -10421,7 +10296,7 @@ var BaseUserProfile = ({
10421
10296
  ] }, key)) });
10422
10297
  };
10423
10298
  const profileContent = /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Card_default, { className: containerClasses, children: [
10424
- error && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Alert_default, { variant: "error", className: (0, import_css47.cx)((0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("user-profile", "alert")), styles.alert), children: [
10299
+ error && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Alert_default, { variant: "error", className: (0, import_css46.cx)((0, import_browser67.withVendorCSSClassPrefix)((0, import_browser67.bem)("user-profile", "alert")), styles.alert), children: [
10425
10300
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Alert_default.Title, { children: t("errors.title") || "Error" }),
10426
10301
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Alert_default.Description, { children: error })
10427
10302
  ] }),
@@ -10466,7 +10341,7 @@ var BaseUserProfile = ({
10466
10341
  var BaseUserProfile_default = BaseUserProfile;
10467
10342
 
10468
10343
  // src/components/presentation/UserProfile/UserProfile.tsx
10469
- var import_react72 = require("react");
10344
+ var import_react71 = require("react");
10470
10345
 
10471
10346
  // src/api/updateMeProfile.ts
10472
10347
  var import_browser68 = require("@asgardeo/browser");
@@ -10501,7 +10376,7 @@ var UserProfile3 = ({ ...rest }) => {
10501
10376
  const { baseUrl, isLoading } = useAsgardeo_default();
10502
10377
  const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
10503
10378
  const { t } = useTranslation_default();
10504
- const [error, setError] = (0, import_react72.useState)(null);
10379
+ const [error, setError] = (0, import_react71.useState)(null);
10505
10380
  const handleProfileUpdate = async (payload) => {
10506
10381
  setError(null);
10507
10382
  try {
@@ -10531,16 +10406,16 @@ var UserProfile_default = UserProfile3;
10531
10406
 
10532
10407
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
10533
10408
  var import_browser70 = require("@asgardeo/browser");
10534
- var import_react74 = require("@floating-ui/react");
10535
- var import_css49 = require("@emotion/css");
10536
- var import_react75 = require("react");
10409
+ var import_react73 = require("@floating-ui/react");
10410
+ var import_css48 = require("@emotion/css");
10411
+ var import_react74 = require("react");
10537
10412
 
10538
10413
  // src/components/presentation/UserDropdown/BaseUserDropdown.styles.ts
10539
- var import_css48 = require("@emotion/css");
10540
- var import_react73 = require("react");
10541
- var useStyles23 = (theme, colorScheme) => {
10542
- return (0, import_react73.useMemo)(() => {
10543
- const trigger = import_css48.css`
10414
+ var import_css47 = require("@emotion/css");
10415
+ var import_react72 = require("react");
10416
+ var useStyles22 = (theme, colorScheme) => {
10417
+ return (0, import_react72.useMemo)(() => {
10418
+ const trigger = import_css47.css`
10544
10419
  display: inline-flex;
10545
10420
  align-items: center;
10546
10421
  gap: calc(${theme.vars.spacing.unit} * 0.75);
@@ -10567,7 +10442,7 @@ var useStyles23 = (theme, colorScheme) => {
10567
10442
  box-shadow: none;
10568
10443
  }
10569
10444
  `;
10570
- const userName = import_css48.css`
10445
+ const userName = import_css47.css`
10571
10446
  color: ${theme.vars.colors.text.primary};
10572
10447
  font-size: 0.875rem;
10573
10448
  font-weight: 500;
@@ -10576,7 +10451,7 @@ var useStyles23 = (theme, colorScheme) => {
10576
10451
  text-overflow: ellipsis;
10577
10452
  white-space: nowrap;
10578
10453
  `;
10579
- const dropdownContent = import_css48.css`
10454
+ const dropdownContent = import_css47.css`
10580
10455
  background: ${theme.vars.colors.background.surface};
10581
10456
  border-radius: ${theme.vars.borderRadius.large};
10582
10457
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
@@ -10586,12 +10461,12 @@ var useStyles23 = (theme, colorScheme) => {
10586
10461
  z-index: 1000;
10587
10462
  overflow: hidden;
10588
10463
  `;
10589
- const dropdownMenu = import_css48.css`
10464
+ const dropdownMenu = import_css47.css`
10590
10465
  display: flex;
10591
10466
  flex-direction: column;
10592
10467
  width: 100%;
10593
10468
  `;
10594
- const menuItem = import_css48.css`
10469
+ const menuItem = import_css47.css`
10595
10470
  display: flex;
10596
10471
  align-items: center;
10597
10472
  justify-content: flex-start;
@@ -10619,7 +10494,7 @@ var useStyles23 = (theme, colorScheme) => {
10619
10494
  box-shadow: none;
10620
10495
  }
10621
10496
  `;
10622
- const menuItemAnchor = import_css48.css`
10497
+ const menuItemAnchor = import_css47.css`
10623
10498
  display: flex;
10624
10499
  align-items: center;
10625
10500
  justify-content: flex-start;
@@ -10640,18 +10515,18 @@ var useStyles23 = (theme, colorScheme) => {
10640
10515
  background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.05)"};
10641
10516
  }
10642
10517
  `;
10643
- const divider = import_css48.css`
10518
+ const divider = import_css47.css`
10644
10519
  margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
10645
10520
  border-bottom: 1px solid ${theme.vars.colors.border};
10646
10521
  `;
10647
- const dropdownHeader = import_css48.css`
10522
+ const dropdownHeader = import_css47.css`
10648
10523
  display: flex;
10649
10524
  align-items: center;
10650
10525
  gap: ${theme.vars.spacing.unit};
10651
10526
  padding: calc(${theme.vars.spacing.unit} * 1.5);
10652
10527
  border-bottom: 1px solid ${theme.vars.colors.border};
10653
10528
  `;
10654
- const headerInfo = import_css48.css`
10529
+ const headerInfo = import_css47.css`
10655
10530
  display: flex;
10656
10531
  flex-direction: column;
10657
10532
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -10661,7 +10536,7 @@ var useStyles23 = (theme, colorScheme) => {
10661
10536
  text-overflow: ellipsis;
10662
10537
  white-space: nowrap;
10663
10538
  `;
10664
- const headerName = import_css48.css`
10539
+ const headerName = import_css47.css`
10665
10540
  color: ${theme.vars.colors.text.primary};
10666
10541
  font-size: 1rem;
10667
10542
  font-weight: 500;
@@ -10670,7 +10545,7 @@ var useStyles23 = (theme, colorScheme) => {
10670
10545
  text-overflow: ellipsis;
10671
10546
  white-space: nowrap;
10672
10547
  `;
10673
- const headerEmail = import_css48.css`
10548
+ const headerEmail = import_css47.css`
10674
10549
  color: ${theme.vars.colors.text.secondary};
10675
10550
  font-size: 0.875rem;
10676
10551
  margin: 0;
@@ -10678,14 +10553,14 @@ var useStyles23 = (theme, colorScheme) => {
10678
10553
  text-overflow: ellipsis;
10679
10554
  white-space: nowrap;
10680
10555
  `;
10681
- const loadingContainer = import_css48.css`
10556
+ const loadingContainer = import_css47.css`
10682
10557
  display: flex;
10683
10558
  align-items: center;
10684
10559
  justify-content: center;
10685
10560
  min-height: 80px;
10686
10561
  gap: ${theme.vars.spacing.unit};
10687
10562
  `;
10688
- const loadingText = import_css48.css`
10563
+ const loadingText = import_css47.css`
10689
10564
  color: ${theme.vars.colors.text.secondary};
10690
10565
  font-size: 0.875rem;
10691
10566
  `;
@@ -10717,7 +10592,7 @@ var useStyles23 = (theme, colorScheme) => {
10717
10592
  colorScheme
10718
10593
  ]);
10719
10594
  };
10720
- var BaseUserDropdown_styles_default = useStyles23;
10595
+ var BaseUserDropdown_styles_default = useStyles22;
10721
10596
 
10722
10597
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
10723
10598
  var import_jsx_runtime82 = require("react/jsx-runtime");
@@ -10736,19 +10611,19 @@ var BaseUserDropdown = ({
10736
10611
  }) => {
10737
10612
  const { theme, colorScheme } = useTheme_default();
10738
10613
  const styles = BaseUserDropdown_styles_default(theme, colorScheme);
10739
- const [isOpen, setIsOpen] = (0, import_react75.useState)(false);
10740
- const [hoveredItemIndex, setHoveredItemIndex] = (0, import_react75.useState)(null);
10741
- const { refs, floatingStyles, context } = (0, import_react74.useFloating)({
10614
+ const [isOpen, setIsOpen] = (0, import_react74.useState)(false);
10615
+ const [hoveredItemIndex, setHoveredItemIndex] = (0, import_react74.useState)(null);
10616
+ const { refs, floatingStyles, context } = (0, import_react73.useFloating)({
10742
10617
  open: isOpen,
10743
10618
  onOpenChange: setIsOpen,
10744
10619
  placement: "bottom-end",
10745
- middleware: [(0, import_react74.offset)(5), (0, import_react74.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react74.shift)({ padding: 5 })],
10746
- whileElementsMounted: import_react74.autoUpdate
10620
+ middleware: [(0, import_react73.offset)(5), (0, import_react73.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react73.shift)({ padding: 5 })],
10621
+ whileElementsMounted: import_react73.autoUpdate
10747
10622
  });
10748
- const click = (0, import_react74.useClick)(context);
10749
- const dismiss = (0, import_react74.useDismiss)(context);
10750
- const role = (0, import_react74.useRole)(context);
10751
- const { getReferenceProps, getFloatingProps } = (0, import_react74.useInteractions)([click, dismiss, role]);
10623
+ const click = (0, import_react73.useClick)(context);
10624
+ const dismiss = (0, import_react73.useDismiss)(context);
10625
+ const role = (0, import_react73.useRole)(context);
10626
+ const { getReferenceProps, getFloatingProps } = (0, import_react73.useInteractions)([click, dismiss, role]);
10752
10627
  const defaultAttributeMappings = {
10753
10628
  picture: ["profile", "profileUrl", "picture", "URL"],
10754
10629
  firstName: ["name.givenName", "given_name"],
@@ -10791,12 +10666,12 @@ var BaseUserDropdown = ({
10791
10666
  }
10792
10667
  allMenuItems.push(...defaultMenuItems);
10793
10668
  }
10794
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
10669
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
10795
10670
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10796
10671
  Button_default,
10797
10672
  {
10798
10673
  ref: refs.setReference,
10799
- className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
10674
+ className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
10800
10675
  color: "tertiary",
10801
10676
  variant: "text",
10802
10677
  size: "medium",
@@ -10815,18 +10690,18 @@ var BaseUserDropdown = ({
10815
10690
  Typography_default,
10816
10691
  {
10817
10692
  variant: "body2",
10818
- className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
10693
+ className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
10819
10694
  children: getDisplayName_default(mergedMappings, user)
10820
10695
  }
10821
10696
  )
10822
10697
  ]
10823
10698
  }
10824
10699
  ),
10825
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react74.FloatingPortal, { id: portalId, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react74.FloatingFocusManager, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10700
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react73.FloatingPortal, { id: portalId, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react73.FloatingFocusManager, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10826
10701
  "div",
10827
10702
  {
10828
10703
  ref: refs.setFloating,
10829
- className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
10704
+ className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
10830
10705
  style: {
10831
10706
  ...floatingStyles,
10832
10707
  // Floating UI doesn't set a z-index by default, so we set a high value to ensure the dropdown appears above other elements.
@@ -10835,7 +10710,7 @@ var BaseUserDropdown = ({
10835
10710
  },
10836
10711
  ...getFloatingProps(),
10837
10712
  children: [
10838
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__header"), styles.dropdownHeader), children: [
10713
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__header"), styles.dropdownHeader), children: [
10839
10714
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
10840
10715
  Avatar,
10841
10716
  {
@@ -10845,7 +10720,7 @@ var BaseUserDropdown = ({
10845
10720
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
10846
10721
  }
10847
10722
  ),
10848
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles.headerInfo), children: [
10723
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles.headerInfo), children: [
10849
10724
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
10850
10725
  Typography_default,
10851
10726
  {
@@ -10868,14 +10743,14 @@ var BaseUserDropdown = ({
10868
10743
  )
10869
10744
  ] })
10870
10745
  ] }),
10871
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: item.label === "" ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10746
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: item.label === "" ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10872
10747
  "a",
10873
10748
  {
10874
10749
  href: item.href,
10875
10750
  style: {
10876
10751
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
10877
10752
  },
10878
- className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
10753
+ className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
10879
10754
  onMouseEnter: () => setHoveredItemIndex(index),
10880
10755
  onMouseLeave: () => setHoveredItemIndex(null),
10881
10756
  onFocus: () => setHoveredItemIndex(index),
@@ -10892,7 +10767,7 @@ var BaseUserDropdown = ({
10892
10767
  style: {
10893
10768
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
10894
10769
  },
10895
- className: (0, import_css49.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
10770
+ className: (0, import_css48.cx)((0, import_browser70.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
10896
10771
  color: "tertiary",
10897
10772
  variant: "text",
10898
10773
  size: "small",
@@ -10910,7 +10785,7 @@ var BaseUserDropdown = ({
10910
10785
  var BaseUserDropdown_default = BaseUserDropdown;
10911
10786
 
10912
10787
  // src/components/presentation/UserDropdown/UserDropdown.tsx
10913
- var import_react76 = require("react");
10788
+ var import_react75 = require("react");
10914
10789
  var import_jsx_runtime83 = require("react/jsx-runtime");
10915
10790
  var UserDropdown = ({
10916
10791
  children,
@@ -10920,7 +10795,7 @@ var UserDropdown = ({
10920
10795
  ...rest
10921
10796
  }) => {
10922
10797
  const { user, isLoading, signOut } = useAsgardeo_default();
10923
- const [isProfileOpen, setIsProfileOpen] = (0, import_react76.useState)(false);
10798
+ const [isProfileOpen, setIsProfileOpen] = (0, import_react75.useState)(false);
10924
10799
  const handleManageProfile = () => {
10925
10800
  setIsProfileOpen(true);
10926
10801
  };
@@ -10977,9 +10852,9 @@ var UserDropdown = ({
10977
10852
  var UserDropdown_default = UserDropdown;
10978
10853
 
10979
10854
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
10980
- var import_react78 = require("@floating-ui/react");
10981
- var import_css51 = require("@emotion/css");
10982
- var import_react79 = require("react");
10855
+ var import_react77 = require("@floating-ui/react");
10856
+ var import_css50 = require("@emotion/css");
10857
+ var import_react78 = require("react");
10983
10858
 
10984
10859
  // src/components/primitives/Icons/Building.tsx
10985
10860
  var import_jsx_runtime84 = require("react/jsx-runtime");
@@ -11017,15 +10892,15 @@ ChevronDown.displayName = "ChevronDown";
11017
10892
  var ChevronDown_default = ChevronDown;
11018
10893
 
11019
10894
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.ts
11020
- var import_css50 = require("@emotion/css");
11021
- var import_react77 = require("react");
11022
- var useStyles24 = (theme, colorScheme) => {
11023
- return (0, import_react77.useMemo)(() => {
11024
- const root = import_css50.css`
10895
+ var import_css49 = require("@emotion/css");
10896
+ var import_react76 = require("react");
10897
+ var useStyles23 = (theme, colorScheme) => {
10898
+ return (0, import_react76.useMemo)(() => {
10899
+ const root = import_css49.css`
11025
10900
  display: inline-block;
11026
10901
  position: relative;
11027
10902
  `;
11028
- const trigger = import_css50.css`
10903
+ const trigger = import_css49.css`
11029
10904
  display: inline-flex;
11030
10905
  align-items: center;
11031
10906
  gap: ${theme.vars.spacing.unit};
@@ -11045,7 +10920,7 @@ var useStyles24 = (theme, colorScheme) => {
11045
10920
  background-color: ${theme.vars.colors.background.surface};
11046
10921
  }
11047
10922
  `;
11048
- const triggerLabel = import_css50.css`
10923
+ const triggerLabel = import_css49.css`
11049
10924
  color: ${theme.vars.colors.text.primary};
11050
10925
  font-weight: 500;
11051
10926
  overflow: hidden;
@@ -11053,7 +10928,7 @@ var useStyles24 = (theme, colorScheme) => {
11053
10928
  white-space: nowrap;
11054
10929
  flex: 1;
11055
10930
  `;
11056
- const content = import_css50.css`
10931
+ const content = import_css49.css`
11057
10932
  min-width: 280px;
11058
10933
  max-width: 400px;
11059
10934
  background-color: ${theme.vars.colors.background.surface};
@@ -11063,13 +10938,13 @@ var useStyles24 = (theme, colorScheme) => {
11063
10938
  outline: none;
11064
10939
  z-index: 1000;
11065
10940
  `;
11066
- const header = import_css50.css`
10941
+ const header = import_css49.css`
11067
10942
  display: flex;
11068
10943
  align-items: center;
11069
10944
  gap: ${theme.vars.spacing.unit};
11070
10945
  padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 2);
11071
10946
  `;
11072
- const headerInfo = import_css50.css`
10947
+ const headerInfo = import_css49.css`
11073
10948
  display: flex;
11074
10949
  flex-direction: column;
11075
10950
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -11077,7 +10952,7 @@ var useStyles24 = (theme, colorScheme) => {
11077
10952
  min-width: 0;
11078
10953
  overflow: hidden;
11079
10954
  `;
11080
- const headerName = import_css50.css`
10955
+ const headerName = import_css49.css`
11081
10956
  color: ${theme.vars.colors.text.primary};
11082
10957
  font-size: 0.875rem;
11083
10958
  font-weight: 500;
@@ -11086,7 +10961,7 @@ var useStyles24 = (theme, colorScheme) => {
11086
10961
  text-overflow: ellipsis;
11087
10962
  white-space: nowrap;
11088
10963
  `;
11089
- const headerMeta = import_css50.css`
10964
+ const headerMeta = import_css49.css`
11090
10965
  color: ${theme.vars.colors.text.secondary};
11091
10966
  font-size: 0.75rem;
11092
10967
  margin: 0;
@@ -11094,7 +10969,7 @@ var useStyles24 = (theme, colorScheme) => {
11094
10969
  text-overflow: ellipsis;
11095
10970
  white-space: nowrap;
11096
10971
  `;
11097
- const headerRole = import_css50.css`
10972
+ const headerRole = import_css49.css`
11098
10973
  color: ${theme.vars.colors.text.secondary};
11099
10974
  font-size: 0.75rem;
11100
10975
  margin: 0;
@@ -11103,16 +10978,16 @@ var useStyles24 = (theme, colorScheme) => {
11103
10978
  white-space: nowrap;
11104
10979
  text-transform: capitalize;
11105
10980
  `;
11106
- const manageButton = import_css50.css`
10981
+ const manageButton = import_css49.css`
11107
10982
  min-width: auto;
11108
10983
  margin-inline-start: auto;
11109
10984
  `;
11110
- const menu = import_css50.css`
10985
+ const menu = import_css49.css`
11111
10986
  display: flex;
11112
10987
  flex-direction: column;
11113
10988
  width: 100%;
11114
10989
  `;
11115
- const menuItem = import_css50.css`
10990
+ const menuItem = import_css49.css`
11116
10991
  display: flex;
11117
10992
  align-items: center;
11118
10993
  justify-content: flex-start;
@@ -11137,11 +11012,11 @@ var useStyles24 = (theme, colorScheme) => {
11137
11012
  background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.04)"};
11138
11013
  }
11139
11014
  `;
11140
- const menuDivider = import_css50.css`
11015
+ const menuDivider = import_css49.css`
11141
11016
  margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
11142
11017
  border-bottom: 1px solid ${theme.vars.colors.border};
11143
11018
  `;
11144
- const organizationInfo = import_css50.css`
11019
+ const organizationInfo = import_css49.css`
11145
11020
  display: flex;
11146
11021
  flex-direction: column;
11147
11022
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -11149,7 +11024,7 @@ var useStyles24 = (theme, colorScheme) => {
11149
11024
  min-width: 0;
11150
11025
  overflow: hidden;
11151
11026
  `;
11152
- const organizationName = import_css50.css`
11027
+ const organizationName = import_css49.css`
11153
11028
  color: ${theme.vars.colors.text.primary};
11154
11029
  font-size: 0.875rem;
11155
11030
  font-weight: 500;
@@ -11158,7 +11033,7 @@ var useStyles24 = (theme, colorScheme) => {
11158
11033
  text-overflow: ellipsis;
11159
11034
  white-space: nowrap;
11160
11035
  `;
11161
- const organizationMeta = import_css50.css`
11036
+ const organizationMeta = import_css49.css`
11162
11037
  color: ${theme.vars.colors.text.secondary};
11163
11038
  font-size: 0.75rem;
11164
11039
  margin: 0;
@@ -11166,40 +11041,40 @@ var useStyles24 = (theme, colorScheme) => {
11166
11041
  text-overflow: ellipsis;
11167
11042
  white-space: nowrap;
11168
11043
  `;
11169
- const loadingContainer = import_css50.css`
11044
+ const loadingContainer = import_css49.css`
11170
11045
  display: flex;
11171
11046
  align-items: center;
11172
11047
  justify-content: center;
11173
11048
  min-height: 80px;
11174
11049
  gap: ${theme.vars.spacing.unit};
11175
11050
  `;
11176
- const loadingText = import_css50.css`
11051
+ const loadingText = import_css49.css`
11177
11052
  color: ${theme.vars.colors.text.secondary};
11178
11053
  font-size: 0.875rem;
11179
11054
  `;
11180
- const errorContainer = import_css50.css`
11055
+ const errorContainer = import_css49.css`
11181
11056
  display: flex;
11182
11057
  align-items: center;
11183
11058
  justify-content: center;
11184
11059
  min-height: 80px;
11185
11060
  padding: calc(${theme.vars.spacing.unit} * 2);
11186
11061
  `;
11187
- const errorText = import_css50.css`
11062
+ const errorText = import_css49.css`
11188
11063
  color: ${theme.vars.colors.text.secondary};
11189
11064
  font-size: 0.875rem;
11190
11065
  text-align: center;
11191
11066
  `;
11192
- const sectionHeader = import_css50.css`
11067
+ const sectionHeader = import_css49.css`
11193
11068
  text-transform: uppercase;
11194
11069
  letter-spacing: 0.05em;
11195
11070
  color: ${theme.vars.colors.text.secondary};
11196
11071
  `;
11197
- const sectionHeaderContainer = import_css50.css`
11072
+ const sectionHeaderContainer = import_css49.css`
11198
11073
  border-top: none;
11199
11074
  border-bottom: none;
11200
11075
  padding-bottom: calc(${theme.vars.spacing.unit} / 2);
11201
11076
  `;
11202
- const roleCapitalized = import_css50.css`
11077
+ const roleCapitalized = import_css49.css`
11203
11078
  text-transform: capitalize;
11204
11079
  `;
11205
11080
  return {
@@ -11239,7 +11114,7 @@ var useStyles24 = (theme, colorScheme) => {
11239
11114
  colorScheme
11240
11115
  ]);
11241
11116
  };
11242
- var BaseOrganizationSwitcher_styles_default = useStyles24;
11117
+ var BaseOrganizationSwitcher_styles_default = useStyles23;
11243
11118
 
11244
11119
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
11245
11120
  var import_jsx_runtime87 = require("react/jsx-runtime");
@@ -11265,21 +11140,21 @@ var BaseOrganizationSwitcher = ({
11265
11140
  }) => {
11266
11141
  const { theme, colorScheme, direction } = useTheme_default();
11267
11142
  const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
11268
- const [isOpen, setIsOpen] = (0, import_react79.useState)(false);
11269
- const [hoveredItemIndex, setHoveredItemIndex] = (0, import_react79.useState)(null);
11143
+ const [isOpen, setIsOpen] = (0, import_react78.useState)(false);
11144
+ const [hoveredItemIndex, setHoveredItemIndex] = (0, import_react78.useState)(null);
11270
11145
  const { t } = useTranslation_default();
11271
11146
  const isRTL = direction === "rtl";
11272
- const { refs, floatingStyles, context } = (0, import_react78.useFloating)({
11147
+ const { refs, floatingStyles, context } = (0, import_react77.useFloating)({
11273
11148
  open: isOpen,
11274
11149
  onOpenChange: setIsOpen,
11275
11150
  placement: "bottom-end",
11276
- middleware: [(0, import_react78.offset)(5), (0, import_react78.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react78.shift)({ padding: 5 })],
11277
- whileElementsMounted: import_react78.autoUpdate
11151
+ middleware: [(0, import_react77.offset)(5), (0, import_react77.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react77.shift)({ padding: 5 })],
11152
+ whileElementsMounted: import_react77.autoUpdate
11278
11153
  });
11279
- const click = (0, import_react78.useClick)(context);
11280
- const dismiss = (0, import_react78.useDismiss)(context);
11281
- const role = (0, import_react78.useRole)(context);
11282
- const { getReferenceProps, getFloatingProps } = (0, import_react78.useInteractions)([click, dismiss, role]);
11154
+ const click = (0, import_react77.useClick)(context);
11155
+ const dismiss = (0, import_react77.useDismiss)(context);
11156
+ const role = (0, import_react77.useRole)(context);
11157
+ const { getReferenceProps, getFloatingProps } = (0, import_react77.useInteractions)([click, dismiss, role]);
11283
11158
  if (fallback && !currentOrganization && !loading && organizations.length === 0) {
11284
11159
  return fallback;
11285
11160
  }
@@ -11307,28 +11182,28 @@ var BaseOrganizationSwitcher = ({
11307
11182
  alt: `${organization.name} avatar`
11308
11183
  }
11309
11184
  ),
11310
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.organizationInfo), children: [
11311
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", fontWeight: "medium", className: (0, import_css51.cx)(styles.organizationName), children: organization.name }),
11312
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.organizationMeta), children: [
11185
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.organizationInfo), children: [
11186
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", fontWeight: "medium", className: (0, import_css50.cx)(styles.organizationName), children: organization.name }),
11187
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.organizationMeta), children: [
11313
11188
  showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { children: [
11314
11189
  organization.memberCount,
11315
11190
  " ",
11316
11191
  organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
11317
11192
  ] }),
11318
11193
  showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: " \u2022 " }),
11319
- showRole && organization.role && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: (0, import_css51.cx)(styles.roleCapitalized), children: organization.role })
11194
+ showRole && organization.role && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: (0, import_css50.cx)(styles.roleCapitalized), children: organization.role })
11320
11195
  ] })
11321
11196
  ] }),
11322
11197
  isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
11323
11198
  ] });
11324
- const defaultRenderLoading2 = () => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css51.cx)(styles.loadingContainer), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", className: (0, import_css51.cx)(styles.loadingText), children: t("organization.switcher.loading.organizations") }) });
11325
- const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css51.cx)(styles.errorContainer), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", className: (0, import_css51.cx)(styles.errorText), children: errorMessage }) });
11326
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.root, className), style, children: [
11199
+ const defaultRenderLoading2 = () => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css50.cx)(styles.loadingContainer), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", className: (0, import_css50.cx)(styles.loadingText), children: t("organization.switcher.loading.organizations") }) });
11200
+ const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css50.cx)(styles.errorContainer), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", className: (0, import_css50.cx)(styles.errorText), children: errorMessage }) });
11201
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.root, className), style, children: [
11327
11202
  /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11328
11203
  Button_default,
11329
11204
  {
11330
11205
  ref: refs.setReference,
11331
- className: (0, import_css51.cx)(styles.trigger),
11206
+ className: (0, import_css50.cx)(styles.trigger),
11332
11207
  color: "tertiary",
11333
11208
  variant: "outline",
11334
11209
  size: "medium",
@@ -11345,17 +11220,17 @@ var BaseOrganizationSwitcher = ({
11345
11220
  alt: `${currentOrganization.name} avatar`
11346
11221
  }
11347
11222
  ),
11348
- showTriggerLabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", className: (0, import_css51.cx)(styles.triggerLabel), children: currentOrganization.name })
11223
+ showTriggerLabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", className: (0, import_css50.cx)(styles.triggerLabel), children: currentOrganization.name })
11349
11224
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11350
11225
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Building_default, { width: avatarSize, height: avatarSize }),
11351
- showTriggerLabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", className: (0, import_css51.cx)(styles.triggerLabel), children: t("organization.switcher.select.organization") })
11226
+ showTriggerLabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", className: (0, import_css50.cx)(styles.triggerLabel), children: t("organization.switcher.select.organization") })
11352
11227
  ] }),
11353
11228
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { style: { transform: isRTL ? "scaleX(-1)" : "none", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ChevronDown_default, { width: "16", height: "16" }) })
11354
11229
  ]
11355
11230
  }
11356
11231
  ),
11357
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react78.FloatingPortal, { id: portalId, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react78.FloatingFocusManager, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ref: refs.setFloating, className: (0, import_css51.cx)(styles.content), style: floatingStyles, ...getFloatingProps(), children: [
11358
- currentOrganization && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.header), children: [
11232
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react77.FloatingPortal, { id: portalId, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react77.FloatingFocusManager, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ref: refs.setFloating, className: (0, import_css50.cx)(styles.content), style: floatingStyles, ...getFloatingProps(), children: [
11233
+ currentOrganization && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.header), children: [
11359
11234
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11360
11235
  Avatar,
11361
11236
  {
@@ -11366,9 +11241,9 @@ var BaseOrganizationSwitcher = ({
11366
11241
  alt: `${currentOrganization.name} avatar`
11367
11242
  }
11368
11243
  ),
11369
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.headerInfo), children: [
11370
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { noWrap: true, className: (0, import_css51.cx)(styles.headerName), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
11371
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.headerMeta), children: [
11244
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.headerInfo), children: [
11245
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { noWrap: true, className: (0, import_css50.cx)(styles.headerName), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
11246
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css50.cx)(styles.headerMeta), children: [
11372
11247
  showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11373
11248
  Typography_default,
11374
11249
  {
@@ -11386,7 +11261,7 @@ var BaseOrganizationSwitcher = ({
11386
11261
  ]
11387
11262
  }
11388
11263
  ),
11389
- showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { noWrap: true, className: (0, import_css51.cx)(styles.headerRole), variant: "caption", color: "secondary", children: currentOrganization.role })
11264
+ showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { noWrap: true, className: (0, import_css50.cx)(styles.headerRole), variant: "caption", color: "secondary", children: currentOrganization.role })
11390
11265
  ] })
11391
11266
  ] }),
11392
11267
  onManageProfile && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
@@ -11397,7 +11272,7 @@ var BaseOrganizationSwitcher = ({
11397
11272
  variant: "outline",
11398
11273
  size: "small",
11399
11274
  "aria-label": "Manage Organization Profile",
11400
- className: (0, import_css51.cx)(styles.manageButton),
11275
+ className: (0, import_css50.cx)(styles.manageButton),
11401
11276
  endIcon: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11402
11277
  "svg",
11403
11278
  {
@@ -11422,21 +11297,21 @@ var BaseOrganizationSwitcher = ({
11422
11297
  organizations.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11423
11298
  "div",
11424
11299
  {
11425
- className: (0, import_css51.cx)(styles.header, styles.sectionHeaderContainer),
11300
+ className: (0, import_css50.cx)(styles.header, styles.sectionHeaderContainer),
11426
11301
  style: {
11427
11302
  borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
11428
11303
  },
11429
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", fontWeight: 600, className: (0, import_css51.cx)(styles.sectionHeader), children: t("organization.switcher.switch.organization") })
11304
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "caption", fontWeight: 600, className: (0, import_css50.cx)(styles.sectionHeader), children: t("organization.switcher.switch.organization") })
11430
11305
  }
11431
11306
  ),
11432
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css51.cx)(styles.menu), children: loading ? renderLoading ? renderLoading() : defaultRenderLoading2() : error ? renderError ? renderError(error) : defaultRenderError2(error) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11307
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css50.cx)(styles.menu), children: loading ? renderLoading ? renderLoading() : defaultRenderLoading2() : error ? renderError ? renderError(error) : defaultRenderError2(error) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11433
11308
  switchableOrganizations.map((organization) => {
11434
11309
  const isSelected = false;
11435
11310
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11436
11311
  Button_default,
11437
11312
  {
11438
11313
  onClick: () => handleOrganizationSwitch(organization),
11439
- className: (0, import_css51.cx)(styles.menuItem),
11314
+ className: (0, import_css50.cx)(styles.menuItem),
11440
11315
  color: "tertiary",
11441
11316
  variant: "text",
11442
11317
  size: "small",
@@ -11451,7 +11326,7 @@ var BaseOrganizationSwitcher = ({
11451
11326
  );
11452
11327
  }),
11453
11328
  menuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11454
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css51.cx)(styles.menuDivider) }),
11329
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: (0, import_css50.cx)(styles.menuDivider) }),
11455
11330
  menuItems.map(
11456
11331
  (item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: item.href ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11457
11332
  "a",
@@ -11460,7 +11335,7 @@ var BaseOrganizationSwitcher = ({
11460
11335
  style: {
11461
11336
  backgroundColor: hoveredItemIndex === switchableOrganizations.length + index ? theme.vars.colors.action?.hover : "transparent"
11462
11337
  },
11463
- className: (0, import_css51.cx)(styles.menuItem),
11338
+ className: (0, import_css50.cx)(styles.menuItem),
11464
11339
  onMouseEnter: () => setHoveredItemIndex(switchableOrganizations.length + index),
11465
11340
  onMouseLeave: () => setHoveredItemIndex(null),
11466
11341
  onFocus: () => setHoveredItemIndex(switchableOrganizations.length + index),
@@ -11477,7 +11352,7 @@ var BaseOrganizationSwitcher = ({
11477
11352
  style: {
11478
11353
  backgroundColor: hoveredItemIndex === switchableOrganizations.length + index ? theme.vars.colors.action?.hover : "transparent"
11479
11354
  },
11480
- className: (0, import_css51.cx)(styles.menuItem),
11355
+ className: (0, import_css50.cx)(styles.menuItem),
11481
11356
  color: "tertiary",
11482
11357
  variant: "text",
11483
11358
  size: "small",
@@ -11496,60 +11371,60 @@ var BaseOrganizationSwitcher = ({
11496
11371
  var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
11497
11372
 
11498
11373
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
11499
- var import_react92 = require("react");
11374
+ var import_react91 = require("react");
11500
11375
 
11501
11376
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
11502
- var import_react82 = require("react");
11503
-
11504
- // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11505
- var import_css53 = require("@emotion/css");
11506
11377
  var import_react81 = require("react");
11507
11378
 
11508
- // src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
11379
+ // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11509
11380
  var import_css52 = require("@emotion/css");
11510
11381
  var import_react80 = require("react");
11511
- var useStyles25 = (theme, colorScheme) => {
11512
- return (0, import_react80.useMemo)(() => {
11513
- const root = import_css52.css`
11382
+
11383
+ // src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
11384
+ var import_css51 = require("@emotion/css");
11385
+ var import_react79 = require("react");
11386
+ var useStyles24 = (theme, colorScheme) => {
11387
+ return (0, import_react79.useMemo)(() => {
11388
+ const root = import_css51.css`
11514
11389
  padding: calc(${theme.vars.spacing.unit} * 4);
11515
11390
  min-width: 600px;
11516
11391
  margin: 0 auto;
11517
11392
  `;
11518
- const card = import_css52.css`
11393
+ const card = import_css51.css`
11519
11394
  background: ${theme.vars.colors.background.surface};
11520
11395
  border-radius: ${theme.vars.borderRadius.large};
11521
11396
  padding: calc(${theme.vars.spacing.unit} * 4);
11522
11397
  `;
11523
- const content = import_css52.css`
11398
+ const content = import_css51.css`
11524
11399
  display: flex;
11525
11400
  flex-direction: column;
11526
11401
  gap: calc(${theme.vars.spacing.unit} * 2);
11527
11402
  `;
11528
- const form = import_css52.css`
11403
+ const form = import_css51.css`
11529
11404
  display: flex;
11530
11405
  flex-direction: column;
11531
11406
  gap: calc(${theme.vars.spacing.unit} * 2);
11532
11407
  width: 100%;
11533
11408
  `;
11534
- const header = import_css52.css`
11409
+ const header = import_css51.css`
11535
11410
  display: flex;
11536
11411
  align-items: center;
11537
11412
  gap: calc(${theme.vars.spacing.unit} * 1.5);
11538
11413
  margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
11539
11414
  `;
11540
- const field = import_css52.css`
11415
+ const field = import_css51.css`
11541
11416
  display: flex;
11542
11417
  align-items: center;
11543
11418
  padding: ${theme.vars.spacing.unit} 0;
11544
11419
  border-bottom: 1px solid ${theme.vars.colors.border};
11545
11420
  min-height: 32px;
11546
11421
  `;
11547
- const fieldGroup = import_css52.css`
11422
+ const fieldGroup = import_css51.css`
11548
11423
  display: flex;
11549
11424
  flex-direction: column;
11550
11425
  gap: calc(${theme.vars.spacing.unit} * 0.5);
11551
11426
  `;
11552
- const textarea = import_css52.css`
11427
+ const textarea = import_css51.css`
11553
11428
  width: 100%;
11554
11429
  padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 1.5);
11555
11430
  border: 1px solid ${theme.vars.colors.border};
@@ -11571,28 +11446,28 @@ var useStyles25 = (theme, colorScheme) => {
11571
11446
  cursor: not-allowed;
11572
11447
  }
11573
11448
  `;
11574
- const textareaError = import_css52.css`
11449
+ const textareaError = import_css51.css`
11575
11450
  border-color: ${theme.vars.colors.error.main};
11576
11451
  `;
11577
- const input = import_css52.css``;
11578
- const avatarContainer = import_css52.css`
11452
+ const input = import_css51.css``;
11453
+ const avatarContainer = import_css51.css`
11579
11454
  align-items: flex-start;
11580
11455
  display: flex;
11581
11456
  gap: calc(${theme.vars.spacing.unit} * 2);
11582
11457
  margin-bottom: ${theme.vars.spacing.unit};
11583
11458
  `;
11584
- const actions = import_css52.css`
11459
+ const actions = import_css51.css`
11585
11460
  display: flex;
11586
11461
  gap: ${theme.vars.spacing.unit};
11587
11462
  justify-content: flex-end;
11588
11463
  padding-top: calc(${theme.vars.spacing.unit} * 2);
11589
11464
  `;
11590
- const infoContainer = import_css52.css`
11465
+ const infoContainer = import_css51.css`
11591
11466
  display: flex;
11592
11467
  flex-direction: column;
11593
11468
  gap: ${theme.vars.spacing.unit};
11594
11469
  `;
11595
- const value = import_css52.css`
11470
+ const value = import_css51.css`
11596
11471
  color: ${theme.vars.colors.text.primary};
11597
11472
  flex: 1;
11598
11473
  display: flex;
@@ -11602,10 +11477,10 @@ var useStyles25 = (theme, colorScheme) => {
11602
11477
  min-height: 32px;
11603
11478
  line-height: 32px;
11604
11479
  `;
11605
- const popup = import_css52.css`
11480
+ const popup = import_css51.css`
11606
11481
  padding: calc(${theme.vars.spacing.unit} * 2);
11607
11482
  `;
11608
- const errorAlert = import_css52.css`
11483
+ const errorAlert = import_css51.css`
11609
11484
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
11610
11485
  `;
11611
11486
  return {
@@ -11641,7 +11516,7 @@ var useStyles25 = (theme, colorScheme) => {
11641
11516
  colorScheme
11642
11517
  ]);
11643
11518
  };
11644
- var BaseCreateOrganization_styles_default = useStyles25;
11519
+ var BaseCreateOrganization_styles_default = useStyles24;
11645
11520
 
11646
11521
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11647
11522
  var import_jsx_runtime88 = require("react/jsx-runtime");
@@ -11665,13 +11540,13 @@ var BaseCreateOrganization = ({
11665
11540
  const { theme, colorScheme } = useTheme_default();
11666
11541
  const styles = BaseCreateOrganization_styles_default(theme, colorScheme);
11667
11542
  const { t } = useTranslation_default();
11668
- const [formData, setFormData] = (0, import_react81.useState)({
11543
+ const [formData, setFormData] = (0, import_react80.useState)({
11669
11544
  description: "",
11670
11545
  handle: "",
11671
11546
  name: "",
11672
11547
  ...initialValues
11673
11548
  });
11674
- const [formErrors, setFormErrors] = (0, import_react81.useState)({});
11549
+ const [formErrors, setFormErrors] = (0, import_react80.useState)({});
11675
11550
  const validateForm = () => {
11676
11551
  const errors = {};
11677
11552
  if (!formData.name.trim()) {
@@ -11731,13 +11606,13 @@ var BaseCreateOrganization = ({
11731
11606
  console.error("Form submission error:", submitError);
11732
11607
  }
11733
11608
  };
11734
- const createOrganizationContent = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css53.cx)(styles.root, cardLayout && styles.card, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_css53.cx)(styles.content), children: [
11735
- /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("form", { id: "create-organization-form", className: (0, import_css53.cx)(styles.form), onSubmit: handleSubmit, children: [
11609
+ const createOrganizationContent = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css52.cx)(styles.root, cardLayout && styles.card, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_css52.cx)(styles.content), children: [
11610
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("form", { id: "create-organization-form", className: (0, import_css52.cx)(styles.form), onSubmit: handleSubmit, children: [
11736
11611
  error && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Alert_default, { variant: "error", className: styles.errorAlert, children: [
11737
11612
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Title, { children: "Error" }),
11738
11613
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Description, { children: error })
11739
11614
  ] }),
11740
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css53.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11615
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css52.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11741
11616
  TextField_default,
11742
11617
  {
11743
11618
  label: `${t("organization.create.name.label")}`,
@@ -11747,10 +11622,10 @@ var BaseCreateOrganization = ({
11747
11622
  disabled: loading,
11748
11623
  required: true,
11749
11624
  error: formErrors.name,
11750
- className: (0, import_css53.cx)(styles.input)
11625
+ className: (0, import_css52.cx)(styles.input)
11751
11626
  }
11752
11627
  ) }),
11753
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css53.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11628
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css52.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11754
11629
  TextField_default,
11755
11630
  {
11756
11631
  label: `${t("organization.create.handle.label") || "Organization Handle"}`,
@@ -11761,15 +11636,15 @@ var BaseCreateOrganization = ({
11761
11636
  required: true,
11762
11637
  error: formErrors.handle,
11763
11638
  helperText: "This will be your organization's unique identifier. Only lowercase letters, numbers, and hyphens are allowed.",
11764
- className: (0, import_css53.cx)(styles.input)
11639
+ className: (0, import_css52.cx)(styles.input)
11765
11640
  }
11766
11641
  ) }),
11767
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css53.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(FormControl_default, { error: formErrors.description, children: [
11642
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: (0, import_css52.cx)(styles.fieldGroup), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(FormControl_default, { error: formErrors.description, children: [
11768
11643
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(InputLabel_default, { required: true, children: t("organization.create.description.label") }),
11769
11644
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11770
11645
  "textarea",
11771
11646
  {
11772
- className: (0, import_css53.cx)(styles.textarea, formErrors.description && styles.textareaError),
11647
+ className: (0, import_css52.cx)(styles.textarea, formErrors.description && styles.textareaError),
11773
11648
  placeholder: t("organization.create.description.placeholder"),
11774
11649
  value: formData.description,
11775
11650
  onChange: (e) => handleInputChange("description", e.target.value),
@@ -11780,7 +11655,7 @@ var BaseCreateOrganization = ({
11780
11655
  ] }) }),
11781
11656
  renderAdditionalFields && renderAdditionalFields()
11782
11657
  ] }),
11783
- /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_css53.cx)(styles.actions), children: [
11658
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_css52.cx)(styles.actions), children: [
11784
11659
  onCancel && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.cancel") }),
11785
11660
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.creating") : t("organization.create.button") })
11786
11661
  ] })
@@ -11831,8 +11706,8 @@ var CreateOrganization = ({
11831
11706
  }) => {
11832
11707
  const { isSignedIn, baseUrl } = useAsgardeo_default();
11833
11708
  const { currentOrganization, revalidateMyOrganizations } = useOrganization_default();
11834
- const [loading, setLoading] = (0, import_react82.useState)(false);
11835
- const [error, setError] = (0, import_react82.useState)(null);
11709
+ const [loading, setLoading] = (0, import_react81.useState)(false);
11710
+ const [error, setError] = (0, import_react81.useState)(null);
11836
11711
  if (!isSignedIn && fallback) {
11837
11712
  return fallback;
11838
11713
  }
@@ -11885,43 +11760,43 @@ var CreateOrganization = ({
11885
11760
  };
11886
11761
 
11887
11762
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
11888
- var import_react87 = require("react");
11763
+ var import_react86 = require("react");
11889
11764
 
11890
11765
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
11891
11766
  var import_browser73 = require("@asgardeo/browser");
11892
- var import_css57 = require("@emotion/css");
11893
- var import_react86 = require("react");
11767
+ var import_css56 = require("@emotion/css");
11768
+ var import_react85 = require("react");
11894
11769
 
11895
11770
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
11896
11771
  var import_browser72 = require("@asgardeo/browser");
11897
- var import_css55 = require("@emotion/css");
11898
- var import_react84 = require("react");
11899
-
11900
- // src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
11901
11772
  var import_css54 = require("@emotion/css");
11902
11773
  var import_react83 = require("react");
11903
- var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11904
- return (0, import_react83.useMemo)(() => {
11905
- const container = import_css54.css`
11774
+
11775
+ // src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
11776
+ var import_css53 = require("@emotion/css");
11777
+ var import_react82 = require("react");
11778
+ var useStyles25 = (theme, colorScheme, disabled, readOnly, hasError) => {
11779
+ return (0, import_react82.useMemo)(() => {
11780
+ const container = import_css53.css`
11906
11781
  display: flex;
11907
11782
  flex-direction: column;
11908
11783
  gap: calc(${theme.vars.spacing.unit} / 2);
11909
11784
  `;
11910
- const label = import_css54.css`
11785
+ const label = import_css53.css`
11911
11786
  font-size: 0.875rem;
11912
11787
  font-weight: 500;
11913
11788
  color: ${theme.vars.colors.text.primary};
11914
11789
  margin-bottom: calc(${theme.vars.spacing.unit} / 2);
11915
11790
  `;
11916
- const requiredIndicator = import_css54.css`
11791
+ const requiredIndicator = import_css53.css`
11917
11792
  color: ${theme.vars.colors.error.main};
11918
11793
  `;
11919
- const pairsList = import_css54.css`
11794
+ const pairsList = import_css53.css`
11920
11795
  display: flex;
11921
11796
  flex-direction: column;
11922
11797
  gap: calc(${theme.vars.spacing.unit} / 4);
11923
11798
  `;
11924
- const pairRow = import_css54.css`
11799
+ const pairRow = import_css53.css`
11925
11800
  display: flex;
11926
11801
  align-items: center;
11927
11802
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -11934,11 +11809,11 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11934
11809
  background-color: ${theme.vars.colors.action.hover};
11935
11810
  }
11936
11811
  `;
11937
- const pairInput = import_css54.css`
11812
+ const pairInput = import_css53.css`
11938
11813
  flex: 1;
11939
11814
  min-width: 0;
11940
11815
  `;
11941
- const addRow = import_css54.css`
11816
+ const addRow = import_css53.css`
11942
11817
  display: flex;
11943
11818
  align-items: center;
11944
11819
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -11948,7 +11823,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11948
11823
  background-color: transparent;
11949
11824
  margin-top: calc(${theme.vars.spacing.unit} / 2);
11950
11825
  `;
11951
- const removeButton = import_css54.css`
11826
+ const removeButton = import_css53.css`
11952
11827
  min-width: auto;
11953
11828
  width: 24px;
11954
11829
  height: 24px;
@@ -11971,7 +11846,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11971
11846
  opacity: 0.6;
11972
11847
  }
11973
11848
  `;
11974
- const addButton = import_css54.css`
11849
+ const addButton = import_css53.css`
11975
11850
  min-width: auto;
11976
11851
  width: 24px;
11977
11852
  height: 24px;
@@ -11994,39 +11869,39 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11994
11869
  opacity: 0.6;
11995
11870
  }
11996
11871
  `;
11997
- const helperText = import_css54.css`
11872
+ const helperText = import_css53.css`
11998
11873
  font-size: 0.75rem;
11999
11874
  color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
12000
11875
  margin-top: calc(${theme.vars.spacing.unit} / 2);
12001
11876
  `;
12002
- const emptyState = import_css54.css`
11877
+ const emptyState = import_css53.css`
12003
11878
  padding: ${theme.vars.spacing.unit};
12004
11879
  text-align: center;
12005
11880
  color: ${theme.vars.colors.text.secondary};
12006
11881
  font-style: italic;
12007
11882
  font-size: 0.75rem;
12008
11883
  `;
12009
- const readOnlyPair = import_css54.css`
11884
+ const readOnlyPair = import_css53.css`
12010
11885
  display: flex;
12011
11886
  align-items: center;
12012
11887
  gap: calc(${theme.vars.spacing.unit} / 2);
12013
11888
  padding: calc(${theme.vars.spacing.unit} / 4) 0;
12014
11889
  min-height: 20px;
12015
11890
  `;
12016
- const readOnlyKey = import_css54.css`
11891
+ const readOnlyKey = import_css53.css`
12017
11892
  font-size: 0.75rem;
12018
11893
  font-weight: 500;
12019
11894
  color: ${theme.vars.colors.text.secondary};
12020
11895
  min-width: 80px;
12021
11896
  flex-shrink: 0;
12022
11897
  `;
12023
- const readOnlyValue = import_css54.css`
11898
+ const readOnlyValue = import_css53.css`
12024
11899
  font-size: 0.75rem;
12025
11900
  color: ${theme.vars.colors.text.primary};
12026
11901
  word-break: break-word;
12027
11902
  flex: 1;
12028
11903
  `;
12029
- const counterText = import_css54.css`
11904
+ const counterText = import_css53.css`
12030
11905
  font-size: 0.75rem;
12031
11906
  color: ${theme.vars.colors.text.secondary};
12032
11907
  margin-top: calc(${theme.vars.spacing.unit} / 2);
@@ -12050,7 +11925,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
12050
11925
  };
12051
11926
  }, [theme, colorScheme, disabled, readOnly, hasError]);
12052
11927
  };
12053
- var KeyValueInput_styles_default = useStyles26;
11928
+ var KeyValueInput_styles_default = useStyles25;
12054
11929
 
12055
11930
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
12056
11931
  var import_jsx_runtime90 = require("react/jsx-runtime");
@@ -12076,10 +11951,10 @@ var KeyValueInput = ({
12076
11951
  const { theme, colorScheme } = useTheme_default();
12077
11952
  const styles = KeyValueInput_styles_default(theme, colorScheme, disabled, readOnly, !!error);
12078
11953
  const initialPairs = Array.isArray(value) ? value : Object.entries(value).map(([key, val]) => ({ key, value: String(val) }));
12079
- const [pairs, setPairs] = (0, import_react84.useState)(initialPairs);
12080
- const [newKey, setNewKey] = (0, import_react84.useState)("");
12081
- const [newValue, setNewValue] = (0, import_react84.useState)("");
12082
- const handleAddPair = (0, import_react84.useCallback)(() => {
11954
+ const [pairs, setPairs] = (0, import_react83.useState)(initialPairs);
11955
+ const [newKey, setNewKey] = (0, import_react83.useState)("");
11956
+ const [newValue, setNewValue] = (0, import_react83.useState)("");
11957
+ const handleAddPair = (0, import_react83.useCallback)(() => {
12083
11958
  if (!newKey.trim() || !newValue.trim()) return;
12084
11959
  if (maxPairs && pairs.length >= maxPairs) return;
12085
11960
  const newPair = {
@@ -12097,7 +11972,7 @@ var KeyValueInput = ({
12097
11972
  onAdd(newPair);
12098
11973
  }
12099
11974
  }, [newKey, newValue, pairs, maxPairs, onChange, onAdd]);
12100
- const handleRemovePair = (0, import_react84.useCallback)(
11975
+ const handleRemovePair = (0, import_react83.useCallback)(
12101
11976
  (index) => {
12102
11977
  const pairToRemove = pairs[index];
12103
11978
  const updatedPairs = pairs.filter((_, i) => i !== index);
@@ -12111,7 +11986,7 @@ var KeyValueInput = ({
12111
11986
  },
12112
11987
  [pairs, onChange, onRemove]
12113
11988
  );
12114
- const handleUpdatePair = (0, import_react84.useCallback)(
11989
+ const handleUpdatePair = (0, import_react83.useCallback)(
12115
11990
  (index, field, newVal) => {
12116
11991
  const updatedPairs = pairs.map((pair, i) => {
12117
11992
  if (i === index) {
@@ -12128,27 +12003,27 @@ var KeyValueInput = ({
12128
12003
  );
12129
12004
  const canAddMore = !maxPairs || pairs.length < maxPairs;
12130
12005
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
12131
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input")), styles.container, className), children: [
12132
- label && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("label", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "label")), styles.label), children: [
12006
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input")), styles.container, className), children: [
12007
+ label && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("label", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "label")), styles.label), children: [
12133
12008
  label,
12134
12009
  required && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12135
12010
  "span",
12136
12011
  {
12137
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "required")), styles.requiredIndicator),
12012
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "required")), styles.requiredIndicator),
12138
12013
  children: " *"
12139
12014
  }
12140
12015
  )
12141
12016
  ] }),
12142
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pairs-list")), styles.pairsList), children: [
12143
- pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12017
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pairs-list")), styles.pairsList), children: [
12018
+ pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12144
12019
  "div",
12145
12020
  {
12146
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-pair")), styles.readOnlyPair),
12021
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-pair")), styles.readOnlyPair),
12147
12022
  children: [
12148
12023
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12149
12024
  "span",
12150
12025
  {
12151
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-key")), styles.readOnlyKey),
12026
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-key")), styles.readOnlyKey),
12152
12027
  children: [
12153
12028
  pair.key,
12154
12029
  ":"
@@ -12158,7 +12033,7 @@ var KeyValueInput = ({
12158
12033
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12159
12034
  "span",
12160
12035
  {
12161
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-value")), styles.readOnlyValue),
12036
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "readonly-value")), styles.readOnlyValue),
12162
12037
  children: pair.value
12163
12038
  }
12164
12039
  )
@@ -12168,7 +12043,7 @@ var KeyValueInput = ({
12168
12043
  )) : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12169
12044
  "div",
12170
12045
  {
12171
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-row")), styles.pairRow),
12046
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-row")), styles.pairRow),
12172
12047
  children: [
12173
12048
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12174
12049
  TextField_default,
@@ -12177,7 +12052,7 @@ var KeyValueInput = ({
12177
12052
  value: pair.key,
12178
12053
  onChange: (e) => handleUpdatePair(index, "key", e.target.value),
12179
12054
  disabled: disabled || readOnly,
12180
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12055
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12181
12056
  "aria-label": `${keyLabel} ${index + 1}`
12182
12057
  }
12183
12058
  ),
@@ -12188,7 +12063,7 @@ var KeyValueInput = ({
12188
12063
  value: pair.value,
12189
12064
  onChange: (e) => handleUpdatePair(index, "value", e.target.value),
12190
12065
  disabled: disabled || readOnly,
12191
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12066
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12192
12067
  "aria-label": `${valueLabel} ${index + 1}`
12193
12068
  }
12194
12069
  ),
@@ -12198,7 +12073,7 @@ var KeyValueInput = ({
12198
12073
  type: "button",
12199
12074
  onClick: () => handleRemovePair(index),
12200
12075
  disabled,
12201
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "remove-button")), styles.removeButton),
12076
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "remove-button")), styles.removeButton),
12202
12077
  "aria-label": `${removeButtonText} ${pair.key}`,
12203
12078
  children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(X_default, { width: 16, height: 16 })
12204
12079
  }
@@ -12207,7 +12082,7 @@ var KeyValueInput = ({
12207
12082
  },
12208
12083
  `${pair.key}-${index}`
12209
12084
  )),
12210
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "add-row")), styles.addRow), children: [
12085
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "add-row")), styles.addRow), children: [
12211
12086
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12212
12087
  TextField_default,
12213
12088
  {
@@ -12215,7 +12090,7 @@ var KeyValueInput = ({
12215
12090
  value: newKey,
12216
12091
  onChange: (e) => setNewKey(e.target.value),
12217
12092
  disabled,
12218
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12093
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12219
12094
  "aria-label": "New key"
12220
12095
  }
12221
12096
  ),
@@ -12226,7 +12101,7 @@ var KeyValueInput = ({
12226
12101
  value: newValue,
12227
12102
  onChange: (e) => setNewValue(e.target.value),
12228
12103
  disabled,
12229
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12104
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "pair-input")), styles.pairInput),
12230
12105
  "aria-label": "New value",
12231
12106
  onKeyPress: (e) => {
12232
12107
  if (e.key === "Enter" && !isAddDisabled) {
@@ -12241,15 +12116,15 @@ var KeyValueInput = ({
12241
12116
  type: "button",
12242
12117
  onClick: handleAddPair,
12243
12118
  disabled: isAddDisabled,
12244
- className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "add-button")), styles.addButton),
12119
+ className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "add-button")), styles.addButton),
12245
12120
  "aria-label": "Add new key-value pair",
12246
12121
  children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Plus_default, { width: 16, height: 16 })
12247
12122
  }
12248
12123
  )
12249
12124
  ] })
12250
12125
  ] }),
12251
- (helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
12252
- maxPairs && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css55.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "counter")), styles.counterText), children: [
12126
+ (helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
12127
+ maxPairs && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser72.withVendorCSSClassPrefix)((0, import_browser72.bem)("key-value-input", "counter")), styles.counterText), children: [
12253
12128
  pairs.length,
12254
12129
  " of ",
12255
12130
  maxPairs,
@@ -12260,48 +12135,48 @@ var KeyValueInput = ({
12260
12135
  var KeyValueInput_default = KeyValueInput;
12261
12136
 
12262
12137
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.ts
12263
- var import_css56 = require("@emotion/css");
12264
- var import_react85 = require("react");
12265
- var useStyles27 = (theme, colorScheme) => {
12266
- return (0, import_react85.useMemo)(() => {
12138
+ var import_css55 = require("@emotion/css");
12139
+ var import_react84 = require("react");
12140
+ var useStyles26 = (theme, colorScheme) => {
12141
+ return (0, import_react84.useMemo)(() => {
12267
12142
  return {
12268
- root: import_css56.css`
12143
+ root: import_css55.css`
12269
12144
  padding: calc(${theme.vars.spacing.unit} * 4);
12270
12145
  min-width: 600px;
12271
12146
  margin: 0 auto;
12272
12147
  `,
12273
- card: import_css56.css`
12148
+ card: import_css55.css`
12274
12149
  background: ${theme.vars.colors.background.surface};
12275
12150
  border-radius: ${theme.vars.borderRadius.large};
12276
12151
  `,
12277
- header: import_css56.css`
12152
+ header: import_css55.css`
12278
12153
  display: flex;
12279
12154
  align-items: center;
12280
12155
  gap: calc(${theme.vars.spacing.unit} * 2);
12281
12156
  margin-bottom: calc(${theme.vars.spacing.unit} * 3);
12282
12157
  padding-bottom: calc(${theme.vars.spacing.unit} * 2);
12283
12158
  `,
12284
- orgInfo: import_css56.css`
12159
+ orgInfo: import_css55.css`
12285
12160
  flex: 1;
12286
12161
  `,
12287
- name: import_css56.css`
12162
+ name: import_css55.css`
12288
12163
  font-size: 1.5rem;
12289
12164
  font-weight: 600;
12290
12165
  margin: 0 0 8px 0;
12291
12166
  color: ${theme.vars.colors.text.primary};
12292
12167
  `,
12293
- handle: import_css56.css`
12168
+ handle: import_css55.css`
12294
12169
  font-size: 1rem;
12295
12170
  color: ${theme.vars.colors.text.secondary};
12296
12171
  margin: 0;
12297
12172
  font-family: monospace;
12298
12173
  `,
12299
- infoContainer: import_css56.css`
12174
+ infoContainer: import_css55.css`
12300
12175
  display: flex;
12301
12176
  flex-direction: column;
12302
12177
  gap: ${theme.vars.spacing.unit};
12303
12178
  `,
12304
- field: import_css56.css`
12179
+ field: import_css55.css`
12305
12180
  display: flex;
12306
12181
  align-items: flex-start;
12307
12182
  padding: calc(${theme.vars.spacing.unit} / 2) 0;
@@ -12309,21 +12184,21 @@ var useStyles27 = (theme, colorScheme) => {
12309
12184
  min-height: 28px;
12310
12185
  gap: ${theme.vars.spacing.unit};
12311
12186
  `,
12312
- fieldLast: import_css56.css`
12187
+ fieldLast: import_css55.css`
12313
12188
  border-bottom: none;
12314
12189
  `,
12315
- fieldContent: import_css56.css`
12190
+ fieldContent: import_css55.css`
12316
12191
  flex: 1;
12317
12192
  display: flex;
12318
12193
  align-items: center;
12319
12194
  gap: ${theme.vars.spacing.unit};
12320
12195
  `,
12321
- fieldActions: import_css56.css`
12196
+ fieldActions: import_css55.css`
12322
12197
  display: flex;
12323
12198
  align-items: center;
12324
12199
  gap: calc(${theme.vars.spacing.unit} / 2);
12325
12200
  `,
12326
- label: import_css56.css`
12201
+ label: import_css55.css`
12327
12202
  font-size: 0.875rem;
12328
12203
  font-weight: 500;
12329
12204
  color: ${theme.vars.colors.text.secondary};
@@ -12331,7 +12206,7 @@ var useStyles27 = (theme, colorScheme) => {
12331
12206
  flex-shrink: 0;
12332
12207
  line-height: 28px;
12333
12208
  `,
12334
- value: import_css56.css`
12209
+ value: import_css55.css`
12335
12210
  color: ${theme.vars.colors.text.primary};
12336
12211
  flex: 1;
12337
12212
  display: flex;
@@ -12342,11 +12217,11 @@ var useStyles27 = (theme, colorScheme) => {
12342
12217
  line-height: 28px;
12343
12218
  word-break: break-word;
12344
12219
  `,
12345
- valueEmpty: import_css56.css`
12220
+ valueEmpty: import_css55.css`
12346
12221
  font-style: italic;
12347
12222
  opacity: 0.7;
12348
12223
  `,
12349
- statusBadge: import_css56.css`
12224
+ statusBadge: import_css55.css`
12350
12225
  padding: calc(${theme.vars.spacing.unit} / 2) ${theme.vars.spacing.unit};
12351
12226
  border-radius: ${theme.vars.borderRadius.small};
12352
12227
  font-size: 0.75rem;
@@ -12355,12 +12230,12 @@ var useStyles27 = (theme, colorScheme) => {
12355
12230
  text-transform: uppercase;
12356
12231
  letter-spacing: 0.5px;
12357
12232
  `,
12358
- permissionsList: import_css56.css`
12233
+ permissionsList: import_css55.css`
12359
12234
  display: flex;
12360
12235
  flex-wrap: wrap;
12361
12236
  gap: calc(${theme.vars.spacing.unit} / 2);
12362
12237
  `,
12363
- permissionBadge: import_css56.css`
12238
+ permissionBadge: import_css55.css`
12364
12239
  padding: calc(${theme.vars.spacing.unit} / 4) ${theme.vars.spacing.unit};
12365
12240
  border-radius: ${theme.vars.borderRadius.small};
12366
12241
  font-size: 0.75rem;
@@ -12368,52 +12243,52 @@ var useStyles27 = (theme, colorScheme) => {
12368
12243
  color: ${theme.vars.colors.primary.contrastText};
12369
12244
  border: 1px solid ${theme.vars.colors.border};
12370
12245
  `,
12371
- attributesList: import_css56.css`
12246
+ attributesList: import_css55.css`
12372
12247
  display: flex;
12373
12248
  flex-direction: column;
12374
12249
  gap: calc(${theme.vars.spacing.unit} / 4);
12375
12250
  `,
12376
- attributeItem: import_css56.css`
12251
+ attributeItem: import_css55.css`
12377
12252
  display: flex;
12378
12253
  gap: ${theme.vars.spacing.unit};
12379
12254
  padding: calc(${theme.vars.spacing.unit} / 4) 0;
12380
12255
  align-items: center;
12381
12256
  `,
12382
- attributeKey: import_css56.css`
12257
+ attributeKey: import_css55.css`
12383
12258
  font-size: 0.75rem;
12384
12259
  font-weight: 500;
12385
12260
  color: ${theme.vars.colors.text.secondary};
12386
12261
  min-width: 80px;
12387
12262
  flex-shrink: 0;
12388
12263
  `,
12389
- attributeValue: import_css56.css`
12264
+ attributeValue: import_css55.css`
12390
12265
  font-size: 0.75rem;
12391
12266
  color: ${theme.vars.colors.text.primary};
12392
12267
  word-break: break-word;
12393
12268
  flex: 1;
12394
12269
  `,
12395
- popup: import_css56.css`
12270
+ popup: import_css55.css`
12396
12271
  padding: calc(${theme.vars.spacing.unit} * 2);
12397
12272
  `,
12398
- editButton: import_css56.css`
12273
+ editButton: import_css55.css`
12399
12274
  min-width: auto;
12400
12275
  padding: calc(${theme.vars.spacing.unit} / 2);
12401
12276
  min-height: auto;
12402
12277
  `,
12403
- placeholderButton: import_css56.css`
12278
+ placeholderButton: import_css55.css`
12404
12279
  font-style: italic;
12405
12280
  text-decoration: underline;
12406
12281
  opacity: 0.7;
12407
12282
  padding: 0;
12408
12283
  min-height: auto;
12409
12284
  `,
12410
- fieldInput: import_css56.css`
12285
+ fieldInput: import_css55.css`
12411
12286
  margin-bottom: 0;
12412
12287
  `
12413
12288
  };
12414
12289
  }, [theme, colorScheme]);
12415
12290
  };
12416
- var BaseOrganizationProfile_styles_default = useStyles27;
12291
+ var BaseOrganizationProfile_styles_default = useStyles26;
12417
12292
 
12418
12293
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
12419
12294
  var import_jsx_runtime91 = require("react/jsx-runtime");
@@ -12465,8 +12340,8 @@ var BaseOrganizationProfile = ({
12465
12340
  }) => {
12466
12341
  const { theme, colorScheme } = useTheme_default();
12467
12342
  const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
12468
- const [editedOrganization, setEditedOrganization] = (0, import_react86.useState)(organization);
12469
- const [editingFields, setEditingFields] = (0, import_react86.useState)({});
12343
+ const [editedOrganization, setEditedOrganization] = (0, import_react85.useState)(organization);
12344
+ const [editingFields, setEditingFields] = (0, import_react85.useState)({});
12470
12345
  const PencilIcon = () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12471
12346
  "svg",
12472
12347
  {
@@ -12481,13 +12356,13 @@ var BaseOrganizationProfile = ({
12481
12356
  children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
12482
12357
  }
12483
12358
  );
12484
- const toggleFieldEdit = (0, import_react86.useCallback)((fieldName) => {
12359
+ const toggleFieldEdit = (0, import_react85.useCallback)((fieldName) => {
12485
12360
  setEditingFields((prev) => ({
12486
12361
  ...prev,
12487
12362
  [fieldName]: !prev[fieldName]
12488
12363
  }));
12489
12364
  }, []);
12490
- const getFieldPlaceholder = (0, import_react86.useCallback)((fieldKey) => {
12365
+ const getFieldPlaceholder = (0, import_react85.useCallback)((fieldKey) => {
12491
12366
  const fieldLabels = {
12492
12367
  name: "organization name",
12493
12368
  description: "organization description",
@@ -12498,7 +12373,7 @@ var BaseOrganizationProfile = ({
12498
12373
  const fieldLabel = fieldLabels[fieldKey] || fieldKey.toLowerCase();
12499
12374
  return `Enter ${fieldLabel}`;
12500
12375
  }, []);
12501
- const handleFieldSave = (0, import_react86.useCallback)(
12376
+ const handleFieldSave = (0, import_react85.useCallback)(
12502
12377
  (fieldKey) => {
12503
12378
  if (!onUpdate || !fieldKey) return;
12504
12379
  const fieldValue = editedOrganization && fieldKey && editedOrganization[fieldKey] !== void 0 ? editedOrganization[fieldKey] : organization && organization[fieldKey] !== void 0 ? organization[fieldKey] : "";
@@ -12510,7 +12385,7 @@ var BaseOrganizationProfile = ({
12510
12385
  },
12511
12386
  [editedOrganization, organization, onUpdate, toggleFieldEdit]
12512
12387
  );
12513
- const handleFieldCancel = (0, import_react86.useCallback)(
12388
+ const handleFieldCancel = (0, import_react85.useCallback)(
12514
12389
  (fieldKey) => {
12515
12390
  setEditedOrganization((prev) => ({
12516
12391
  ...prev,
@@ -12536,7 +12411,7 @@ var BaseOrganizationProfile = ({
12536
12411
  value: typeof fieldValue === "object" ? JSON.stringify(fieldValue) : String(fieldValue || ""),
12537
12412
  onChange: (e) => onEditValue(e.target ? e.target.value : e),
12538
12413
  placeholder: getFieldPlaceholder(key),
12539
- className: (0, import_css57.cx)(styles.fieldInput)
12414
+ className: (0, import_css56.cx)(styles.fieldInput)
12540
12415
  };
12541
12416
  let fieldInput;
12542
12417
  if (key === "attributes") {
@@ -12582,8 +12457,8 @@ var BaseOrganizationProfile = ({
12582
12457
  fieldInput = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TextField_default, { ...commonProps });
12583
12458
  }
12584
12459
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12585
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css57.cx)(styles.label), children: label }),
12586
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.value), children: fieldInput })
12460
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css56.cx)(styles.label), children: label }),
12461
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.value), children: fieldInput })
12587
12462
  ] });
12588
12463
  }
12589
12464
  const hasValue = value !== void 0 && value !== null && value !== "";
@@ -12597,8 +12472,8 @@ var BaseOrganizationProfile = ({
12597
12472
  displayValue = "-";
12598
12473
  }
12599
12474
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12600
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css57.cx)(styles.label), children: label }),
12601
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.value, !hasValue && styles.valueEmpty), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12475
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css56.cx)(styles.label), children: label }),
12476
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.value, !hasValue && styles.valueEmpty), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12602
12477
  Button_default,
12603
12478
  {
12604
12479
  onClick: onStartEdit,
@@ -12606,7 +12481,7 @@ var BaseOrganizationProfile = ({
12606
12481
  color: "secondary",
12607
12482
  size: "small",
12608
12483
  title: "Click to edit",
12609
- className: (0, import_css57.cx)(styles.placeholderButton),
12484
+ className: (0, import_css56.cx)(styles.placeholderButton),
12610
12485
  children: displayValue
12611
12486
  }
12612
12487
  ) : displayValue })
@@ -12621,8 +12496,8 @@ var BaseOrganizationProfile = ({
12621
12496
  if (!shouldShow) {
12622
12497
  return null;
12623
12498
  }
12624
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css57.cx)(styles.field), children: [
12625
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.fieldContent), children: renderField(
12499
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css56.cx)(styles.field), children: [
12500
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.fieldContent), children: renderField(
12626
12501
  field,
12627
12502
  isFieldEditing,
12628
12503
  (value) => {
@@ -12632,7 +12507,7 @@ var BaseOrganizationProfile = ({
12632
12507
  },
12633
12508
  () => toggleFieldEdit(field.key)
12634
12509
  ) }),
12635
- isFieldEditable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.fieldActions), children: isFieldEditing ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12510
+ isFieldEditable && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.fieldActions), children: isFieldEditing ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12636
12511
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12637
12512
  Button_default,
12638
12513
  {
@@ -12663,7 +12538,7 @@ var BaseOrganizationProfile = ({
12663
12538
  color: "secondary",
12664
12539
  size: "small",
12665
12540
  title: "Edit field",
12666
- className: (0, import_css57.cx)(styles.editButton),
12541
+ className: (0, import_css56.cx)(styles.editButton),
12667
12542
  children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PencilIcon, {})
12668
12543
  }
12669
12544
  ) })
@@ -12672,23 +12547,23 @@ var BaseOrganizationProfile = ({
12672
12547
  if (!organization) {
12673
12548
  return fallback;
12674
12549
  }
12675
- const profileContent = /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Card_default, { className: (0, import_css57.cx)(styles.root, cardLayout && styles.card, className), children: [
12676
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css57.cx)(styles.header), children: [
12550
+ const profileContent = /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Card_default, { className: (0, import_css56.cx)(styles.root, cardLayout && styles.card, className), children: [
12551
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css56.cx)(styles.header), children: [
12677
12552
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
12678
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css57.cx)(styles.orgInfo), children: [
12679
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { className: (0, import_css57.cx)(styles.name), children: organization.name }),
12680
- organization.orgHandle && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: (0, import_css57.cx)(styles.handle), children: [
12553
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css56.cx)(styles.orgInfo), children: [
12554
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { className: (0, import_css56.cx)(styles.name), children: organization.name }),
12555
+ organization.orgHandle && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: (0, import_css56.cx)(styles.handle), children: [
12681
12556
  "@",
12682
12557
  organization.orgHandle
12683
12558
  ] })
12684
12559
  ] })
12685
12560
  ] }),
12686
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.infoContainer), children: fields.map((field, index) => renderOrganizationField(field)) })
12561
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.infoContainer), children: fields.map((field, index) => renderOrganizationField(field)) })
12687
12562
  ] });
12688
12563
  if (mode === "popup") {
12689
12564
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Dialog_default.Content, { children: [
12690
12565
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Dialog_default.Heading, { children: title }),
12691
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css57.cx)(styles.popup), children: profileContent })
12566
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css56.cx)(styles.popup), children: profileContent })
12692
12567
  ] }) });
12693
12568
  }
12694
12569
  return profileContent;
@@ -12764,9 +12639,9 @@ var OrganizationProfile = ({
12764
12639
  }) => {
12765
12640
  const { baseUrl } = useAsgardeo_default();
12766
12641
  const { t } = useTranslation_default();
12767
- const [organization, setOrganization] = (0, import_react87.useState)(null);
12768
- const [loading, setLoading] = (0, import_react87.useState)(true);
12769
- const [error, setError] = (0, import_react87.useState)(false);
12642
+ const [organization, setOrganization] = (0, import_react86.useState)(null);
12643
+ const [loading, setLoading] = (0, import_react86.useState)(true);
12644
+ const [error, setError] = (0, import_react86.useState)(false);
12770
12645
  const fetchOrganization = async () => {
12771
12646
  if (!baseUrl || !organizationId) {
12772
12647
  setLoading(false);
@@ -12789,7 +12664,7 @@ var OrganizationProfile = ({
12789
12664
  setLoading(false);
12790
12665
  }
12791
12666
  };
12792
- (0, import_react87.useEffect)(() => {
12667
+ (0, import_react86.useEffect)(() => {
12793
12668
  fetchOrganization();
12794
12669
  }, [baseUrl, organizationId]);
12795
12670
  const handleOrganizationUpdate = async (payload) => {
@@ -12826,26 +12701,26 @@ var OrganizationProfile = ({
12826
12701
  var OrganizationProfile_default = OrganizationProfile;
12827
12702
 
12828
12703
  // src/components/presentation/OrganizationList/OrganizationList.tsx
12829
- var import_css61 = require("@emotion/css");
12830
- var import_react91 = require("react");
12704
+ var import_css60 = require("@emotion/css");
12705
+ var import_react90 = require("react");
12831
12706
 
12832
12707
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
12833
- var import_css59 = require("@emotion/css");
12834
- var import_react89 = require("react");
12835
-
12836
- // src/components/presentation/OrganizationList/BaseOrganizationList.styles.ts
12837
12708
  var import_css58 = require("@emotion/css");
12838
12709
  var import_react88 = require("react");
12839
- var useStyles28 = (theme, colorScheme) => {
12840
- return (0, import_react88.useMemo)(() => {
12841
- const root = import_css58.css`
12710
+
12711
+ // src/components/presentation/OrganizationList/BaseOrganizationList.styles.ts
12712
+ var import_css57 = require("@emotion/css");
12713
+ var import_react87 = require("react");
12714
+ var useStyles27 = (theme, colorScheme) => {
12715
+ return (0, import_react87.useMemo)(() => {
12716
+ const root = import_css57.css`
12842
12717
  padding: calc(${theme.vars.spacing.unit} * 4);
12843
12718
  min-width: 600px;
12844
12719
  margin: 0 auto;
12845
12720
  background: ${theme.vars.colors.background.surface};
12846
12721
  border-radius: ${theme.vars.borderRadius.large};
12847
12722
  `;
12848
- const header = import_css58.css`
12723
+ const header = import_css57.css`
12849
12724
  display: flex;
12850
12725
  align-items: center;
12851
12726
  justify-content: space-between;
@@ -12853,21 +12728,21 @@ var useStyles28 = (theme, colorScheme) => {
12853
12728
  padding-bottom: calc(${theme.vars.spacing.unit} * 2);
12854
12729
  border-bottom: 1px solid ${theme.vars.colors.border};
12855
12730
  `;
12856
- const headerInfo = import_css58.css`
12731
+ const headerInfo = import_css57.css`
12857
12732
  flex: 1;
12858
12733
  `;
12859
- const title = import_css58.css`
12734
+ const title = import_css57.css`
12860
12735
  font-size: 1.5rem;
12861
12736
  font-weight: 600;
12862
12737
  margin: 0 0 8px 0;
12863
12738
  color: ${theme.vars.colors.text.primary};
12864
12739
  `;
12865
- const subtitle = import_css58.css`
12740
+ const subtitle = import_css57.css`
12866
12741
  color: ${theme.vars.colors.text.secondary};
12867
12742
  font-size: 0.875rem;
12868
12743
  margin: 0;
12869
12744
  `;
12870
- const refreshButton = import_css58.css`
12745
+ const refreshButton = import_css57.css`
12871
12746
  background-color: ${theme.vars.colors.background.surface};
12872
12747
  border: 1px solid ${theme.vars.colors.border};
12873
12748
  border-radius: ${theme.vars.borderRadius.small};
@@ -12881,12 +12756,12 @@ var useStyles28 = (theme, colorScheme) => {
12881
12756
  border-color: ${theme.vars.colors.primary.main};
12882
12757
  }
12883
12758
  `;
12884
- const listContainer = import_css58.css`
12759
+ const listContainer = import_css57.css`
12885
12760
  display: flex;
12886
12761
  flex-direction: column;
12887
12762
  gap: calc(${theme.vars.spacing.unit} * 1.5);
12888
12763
  `;
12889
- const organizationItem = import_css58.css`
12764
+ const organizationItem = import_css57.css`
12890
12765
  border: 1px solid ${theme.vars.colors.border};
12891
12766
  border-radius: ${theme.vars.borderRadius.medium};
12892
12767
  display: flex;
@@ -12899,46 +12774,46 @@ var useStyles28 = (theme, colorScheme) => {
12899
12774
  box-shadow: 0 2px 8px ${theme.vars.colors.primary.main}20;
12900
12775
  }
12901
12776
  `;
12902
- const organizationContent = import_css58.css`
12777
+ const organizationContent = import_css57.css`
12903
12778
  display: flex;
12904
12779
  align-items: center;
12905
12780
  gap: calc(${theme.vars.spacing.unit} * 2);
12906
12781
  flex: 1;
12907
12782
  `;
12908
- const organizationInfo = import_css58.css`
12783
+ const organizationInfo = import_css57.css`
12909
12784
  flex: 1;
12910
12785
  `;
12911
- const organizationName = import_css58.css`
12786
+ const organizationName = import_css57.css`
12912
12787
  font-size: 1.125rem;
12913
12788
  font-weight: 600;
12914
12789
  margin: 0 0 4px 0;
12915
12790
  color: ${theme.vars.colors.text.primary};
12916
12791
  `;
12917
- const organizationHandle = import_css58.css`
12792
+ const organizationHandle = import_css57.css`
12918
12793
  color: ${theme.vars.colors.text.secondary};
12919
12794
  font-size: 0.875rem;
12920
12795
  margin: 0 0 4px 0;
12921
12796
  font-family: monospace;
12922
12797
  `;
12923
- const organizationStatus = import_css58.css`
12798
+ const organizationStatus = import_css57.css`
12924
12799
  color: ${theme.vars.colors.text.secondary};
12925
12800
  font-size: 0.875rem;
12926
12801
  margin: 0;
12927
12802
  `;
12928
- const statusText = import_css58.css`
12803
+ const statusText = import_css57.css`
12929
12804
  font-weight: 500;
12930
12805
  `;
12931
- const statusTextActive = import_css58.css`
12806
+ const statusTextActive = import_css57.css`
12932
12807
  color: ${theme.vars.colors.success.main};
12933
12808
  `;
12934
- const statusTextInactive = import_css58.css`
12809
+ const statusTextInactive = import_css57.css`
12935
12810
  color: ${theme.vars.colors.error.main};
12936
12811
  `;
12937
- const organizationActions = import_css58.css`
12812
+ const organizationActions = import_css57.css`
12938
12813
  display: flex;
12939
12814
  align-items: center;
12940
12815
  `;
12941
- const badge = import_css58.css`
12816
+ const badge = import_css57.css`
12942
12817
  border-radius: ${theme.vars.borderRadius.large};
12943
12818
  font-size: 0.75rem;
12944
12819
  font-weight: 500;
@@ -12946,15 +12821,15 @@ var useStyles28 = (theme, colorScheme) => {
12946
12821
  text-transform: uppercase;
12947
12822
  letter-spacing: 0.5px;
12948
12823
  `;
12949
- const badgeSuccess = import_css58.css`
12824
+ const badgeSuccess = import_css57.css`
12950
12825
  background-color: color-mix(in srgb, ${theme.vars.colors.success.main} 20%, transparent);
12951
12826
  color: ${theme.vars.colors.success.main};
12952
12827
  `;
12953
- const badgeError = import_css58.css`
12828
+ const badgeError = import_css57.css`
12954
12829
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
12955
12830
  color: ${theme.vars.colors.error.main};
12956
12831
  `;
12957
- const loadingContainer = import_css58.css`
12832
+ const loadingContainer = import_css57.css`
12958
12833
  padding: calc(${theme.vars.spacing.unit} * 4);
12959
12834
  text-align: center;
12960
12835
  display: flex;
@@ -12962,25 +12837,25 @@ var useStyles28 = (theme, colorScheme) => {
12962
12837
  align-items: center;
12963
12838
  gap: calc(${theme.vars.spacing.unit} * 2);
12964
12839
  `;
12965
- const loadingText = import_css58.css`
12840
+ const loadingText = import_css57.css`
12966
12841
  margin-top: ${theme.vars.spacing.unit};
12967
12842
  `;
12968
- const errorContainer = import_css58.css`
12843
+ const errorContainer = import_css57.css`
12969
12844
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
12970
12845
  border: 1px solid ${theme.vars.colors.error.main};
12971
12846
  border-radius: ${theme.vars.borderRadius.medium};
12972
12847
  color: ${theme.vars.colors.error.main};
12973
12848
  padding: calc(${theme.vars.spacing.unit} * 2);
12974
12849
  `;
12975
- const emptyContainer = import_css58.css`
12850
+ const emptyContainer = import_css57.css`
12976
12851
  padding: calc(${theme.vars.spacing.unit} * 4);
12977
12852
  text-align: center;
12978
12853
  `;
12979
- const emptyText = import_css58.css`
12854
+ const emptyText = import_css57.css`
12980
12855
  color: ${theme.vars.colors.text.secondary};
12981
12856
  font-size: 1rem;
12982
12857
  `;
12983
- const loadMoreButton = import_css58.css`
12858
+ const loadMoreButton = import_css57.css`
12984
12859
  background-color: ${theme.vars.colors.primary.main};
12985
12860
  border: none;
12986
12861
  border-radius: ${theme.vars.borderRadius.medium};
@@ -13001,13 +12876,13 @@ var useStyles28 = (theme, colorScheme) => {
13001
12876
  opacity: 0.6;
13002
12877
  }
13003
12878
  `;
13004
- const errorMargin = import_css58.css`
12879
+ const errorMargin = import_css57.css`
13005
12880
  margin-top: calc(${theme.vars.spacing.unit} * 2);
13006
12881
  `;
13007
- const loadMoreMargin = import_css58.css`
12882
+ const loadMoreMargin = import_css57.css`
13008
12883
  margin-top: calc(${theme.vars.spacing.unit} * 3);
13009
12884
  `;
13010
- const popupContent = import_css58.css`
12885
+ const popupContent = import_css57.css`
13011
12886
  padding: ${theme.vars.spacing.unit};
13012
12887
  `;
13013
12888
  return {
@@ -13057,27 +12932,27 @@ var useStyles28 = (theme, colorScheme) => {
13057
12932
  colorScheme
13058
12933
  ]);
13059
12934
  };
13060
- var BaseOrganizationList_styles_default = useStyles28;
12935
+ var BaseOrganizationList_styles_default = useStyles27;
13061
12936
 
13062
12937
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
13063
12938
  var import_jsx_runtime93 = require("react/jsx-runtime");
13064
12939
  var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => {
13065
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.organizationItem), children: [
13066
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.organizationContent), children: [
12940
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.organizationItem), children: [
12941
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.organizationContent), children: [
13067
12942
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Avatar_default, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
13068
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.organizationInfo), children: [
13069
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "h6", className: (0, import_css59.cx)(styles.organizationName), children: organization.name }),
13070
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css59.cx)(styles.organizationHandle), children: [
12943
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.organizationInfo), children: [
12944
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "h6", className: (0, import_css58.cx)(styles.organizationName), children: organization.name }),
12945
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css58.cx)(styles.organizationHandle), children: [
13071
12946
  "@",
13072
12947
  organization.orgHandle
13073
12948
  ] }),
13074
- showStatus && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css59.cx)(styles.organizationStatus), children: [
12949
+ showStatus && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css58.cx)(styles.organizationStatus), children: [
13075
12950
  t("organization.switcher.status.label"),
13076
12951
  " ",
13077
12952
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
13078
12953
  "span",
13079
12954
  {
13080
- className: (0, import_css59.cx)(
12955
+ className: (0, import_css58.cx)(
13081
12956
  styles.statusText,
13082
12957
  organization.status === "ACTIVE" ? styles.statusTextActive : styles.statusTextInactive
13083
12958
  ),
@@ -13087,7 +12962,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
13087
12962
  ] })
13088
12963
  ] })
13089
12964
  ] }),
13090
- organization.canSwitch && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.organizationActions), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
12965
+ organization.canSwitch && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.organizationActions), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
13091
12966
  Button_default,
13092
12967
  {
13093
12968
  onClick: (e) => {
@@ -13101,17 +12976,17 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
13101
12976
  ) })
13102
12977
  ] }, organization.id);
13103
12978
  };
13104
- var defaultRenderLoading = (t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.loadingContainer), children: [
12979
+ var defaultRenderLoading = (t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.loadingContainer), children: [
13105
12980
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Spinner_default, { size: "medium" }),
13106
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body1", color: "textSecondary", className: (0, import_css59.cx)(styles.loadingText), children: t("organization.switcher.loading.organizations") })
12981
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body1", color: "textSecondary", className: (0, import_css58.cx)(styles.loadingText), children: t("organization.switcher.loading.organizations") })
13107
12982
  ] });
13108
- var defaultRenderError = (error, t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.errorContainer), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body1", color: "error", children: [
12983
+ var defaultRenderError = (error, t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.errorContainer), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Typography_default, { variant: "body1", color: "error", children: [
13109
12984
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("strong", { children: t("organization.switcher.error.prefix") }),
13110
12985
  " ",
13111
12986
  error
13112
12987
  ] }) });
13113
- var defaultRenderLoadMore = (onLoadMore, isLoading, t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button_default, { onClick: onLoadMore, disabled: isLoading, className: (0, import_css59.cx)(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoading ? t("organization.switcher.loading.more") : t("organization.switcher.load.more") });
13114
- var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.emptyContainer), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body1", color: "textSecondary", className: (0, import_css59.cx)(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
12988
+ var defaultRenderLoadMore = (onLoadMore, isLoading, t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button_default, { onClick: onLoadMore, disabled: isLoading, className: (0, import_css58.cx)(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoading ? t("organization.switcher.loading.more") : t("organization.switcher.load.more") });
12989
+ var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.emptyContainer), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body1", color: "textSecondary", className: (0, import_css58.cx)(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
13115
12990
  var BaseOrganizationList = ({
13116
12991
  className = "",
13117
12992
  allOrganizations,
@@ -13138,7 +13013,7 @@ var BaseOrganizationList = ({
13138
13013
  const { theme, colorScheme } = useTheme_default();
13139
13014
  const styles = BaseOrganizationList_styles_default(theme, colorScheme);
13140
13015
  const { t } = useTranslation_default();
13141
- const organizationsWithSwitchAccess = (0, import_react89.useMemo)(() => {
13016
+ const organizationsWithSwitchAccess = (0, import_react88.useMemo)(() => {
13142
13017
  if (!allOrganizations?.organizations) {
13143
13018
  return [];
13144
13019
  }
@@ -13154,53 +13029,53 @@ var BaseOrganizationList = ({
13154
13029
  const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, isLoading2) => defaultRenderLoadMore(onLoadMore, isLoading2, t, styles));
13155
13030
  const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
13156
13031
  if (isLoading && organizationsWithSwitchAccess?.length === 0) {
13157
- const loadingContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.root, className), style, children: renderLoadingWithStyles() });
13032
+ const loadingContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.root, className), style, children: renderLoadingWithStyles() });
13158
13033
  if (mode === "popup") {
13159
13034
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13160
13035
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13161
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.popupContent), children: loadingContent })
13036
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.popupContent), children: loadingContent })
13162
13037
  ] }) });
13163
13038
  }
13164
13039
  return loadingContent;
13165
13040
  }
13166
13041
  if (error && organizationsWithSwitchAccess?.length === 0) {
13167
- const errorContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.root, className), style, children: renderErrorWithStyles(error) });
13042
+ const errorContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.root, className), style, children: renderErrorWithStyles(error) });
13168
13043
  if (mode === "popup") {
13169
13044
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13170
13045
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13171
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.popupContent), children: errorContent })
13046
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.popupContent), children: errorContent })
13172
13047
  ] }) });
13173
13048
  }
13174
13049
  return errorContent;
13175
13050
  }
13176
13051
  if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
13177
- const emptyContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.root, className), style, children: renderEmptyWithStyles() });
13052
+ const emptyContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.root, className), style, children: renderEmptyWithStyles() });
13178
13053
  if (mode === "popup") {
13179
13054
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13180
13055
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13181
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.popupContent), children: emptyContent })
13056
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.popupContent), children: emptyContent })
13182
13057
  ] }) });
13183
13058
  }
13184
13059
  return emptyContent;
13185
13060
  }
13186
- const organizationListContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.root, className), style, children: [
13187
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.header), children: [
13188
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.headerInfo), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css59.cx)(styles.subtitle), children: t("organization.switcher.showing.count", {
13061
+ const organizationListContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.root, className), style, children: [
13062
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css58.cx)(styles.header), children: [
13063
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.headerInfo), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "body2", color: "textSecondary", className: (0, import_css58.cx)(styles.subtitle), children: t("organization.switcher.showing.count", {
13189
13064
  showing: organizationsWithSwitchAccess?.length,
13190
13065
  total: allOrganizations?.organizations?.length || 0
13191
13066
  }) }) }),
13192
- onRefresh && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button_default, { onClick: onRefresh, className: (0, import_css59.cx)(styles.refreshButton), type: "button", variant: "outline", size: "small", children: t("organization.switcher.refresh.button") })
13067
+ onRefresh && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button_default, { onClick: onRefresh, className: (0, import_css58.cx)(styles.refreshButton), type: "button", variant: "outline", size: "small", children: t("organization.switcher.refresh.button") })
13193
13068
  ] }),
13194
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.listContainer), children: organizationsWithSwitchAccess?.map(
13069
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.listContainer), children: organizationsWithSwitchAccess?.map(
13195
13070
  (organization, index) => renderOrganizationWithStyles(organization, index)
13196
13071
  ) }),
13197
- error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.errorMargin), children: renderErrorWithStyles(error) }),
13198
- hasMore && fetchMore && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.loadMoreMargin), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
13072
+ error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.errorMargin), children: renderErrorWithStyles(error) }),
13073
+ hasMore && fetchMore && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.loadMoreMargin), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
13199
13074
  ] });
13200
13075
  if (mode === "popup") {
13201
13076
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13202
13077
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13203
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.popupContent), children: organizationListContent })
13078
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css58.cx)(styles.popupContent), children: organizationListContent })
13204
13079
  ] }) });
13205
13080
  }
13206
13081
  return organizationListContent;
@@ -13208,11 +13083,11 @@ var BaseOrganizationList = ({
13208
13083
  var BaseOrganizationList_default = BaseOrganizationList;
13209
13084
 
13210
13085
  // src/components/presentation/OrganizationList/OrganizationList.styles.ts
13211
- var import_css60 = require("@emotion/css");
13212
- var import_react90 = require("react");
13213
- var useStyles29 = (theme, colorScheme) => {
13214
- return (0, import_react90.useMemo)(() => {
13215
- const cssOrganizationListWrapper = import_css60.css`
13086
+ var import_css59 = require("@emotion/css");
13087
+ var import_react89 = require("react");
13088
+ var useStyles28 = (theme, colorScheme) => {
13089
+ return (0, import_react89.useMemo)(() => {
13090
+ const cssOrganizationListWrapper = import_css59.css`
13216
13091
  /* Container wrapper styles for OrganizationList component */
13217
13092
  width: 100%;
13218
13093
 
@@ -13243,11 +13118,11 @@ var useStyles29 = (theme, colorScheme) => {
13243
13118
  `;
13244
13119
  return {
13245
13120
  root: cssOrganizationListWrapper,
13246
- container: import_css60.css`
13121
+ container: import_css59.css`
13247
13122
  position: relative;
13248
13123
  width: 100%;
13249
13124
  `,
13250
- errorState: import_css60.css`
13125
+ errorState: import_css59.css`
13251
13126
  padding: calc(${theme.vars.spacing.unit} * 2);
13252
13127
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 10%, transparent);
13253
13128
  border: 1px solid ${theme.vars.colors.error.main};
@@ -13255,7 +13130,7 @@ var useStyles29 = (theme, colorScheme) => {
13255
13130
  color: ${theme.vars.colors.error.main};
13256
13131
  text-align: center;
13257
13132
  `,
13258
- loadingOverlay: import_css60.css`
13133
+ loadingOverlay: import_css59.css`
13259
13134
  position: absolute;
13260
13135
  inset: 0;
13261
13136
  background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
@@ -13268,7 +13143,7 @@ var useStyles29 = (theme, colorScheme) => {
13268
13143
  };
13269
13144
  }, [theme, colorScheme]);
13270
13145
  };
13271
- var OrganizationList_styles_default = useStyles29;
13146
+ var OrganizationList_styles_default = useStyles28;
13272
13147
 
13273
13148
  // src/components/presentation/OrganizationList/OrganizationList.tsx
13274
13149
  var import_jsx_runtime94 = require("react/jsx-runtime");
@@ -13285,15 +13160,15 @@ var OrganizationList = ({
13285
13160
  const { theme, colorScheme } = useTheme_default();
13286
13161
  const styles = OrganizationList_styles_default(theme, colorScheme);
13287
13162
  const { getAllOrganizations: getAllOrganizations2, error, isLoading, myOrganizations } = useOrganization_default();
13288
- const [allOrganizations, setAllOrganizations] = (0, import_react91.useState)({
13163
+ const [allOrganizations, setAllOrganizations] = (0, import_react90.useState)({
13289
13164
  organizations: []
13290
13165
  });
13291
- (0, import_react91.useEffect)(() => {
13166
+ (0, import_react90.useEffect)(() => {
13292
13167
  (async () => {
13293
13168
  setAllOrganizations(await getAllOrganizations2());
13294
13169
  })();
13295
13170
  }, []);
13296
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: (0, import_css61.cx)(styles.root, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: (0, import_css61.cx)(styles.container), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
13171
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: (0, import_css60.cx)(styles.root, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: (0, import_css60.cx)(styles.container), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
13297
13172
  BaseOrganizationList_default,
13298
13173
  {
13299
13174
  allOrganizations,
@@ -13352,9 +13227,9 @@ var OrganizationSwitcher = ({
13352
13227
  isLoading,
13353
13228
  error
13354
13229
  } = useOrganization_default();
13355
- const [isCreateOrgOpen, setIsCreateOrgOpen] = (0, import_react92.useState)(false);
13356
- const [isProfileOpen, setIsProfileOpen] = (0, import_react92.useState)(false);
13357
- const [isOrganizationListOpen, setIsOrganizationListOpen] = (0, import_react92.useState)(false);
13230
+ const [isCreateOrgOpen, setIsCreateOrgOpen] = (0, import_react91.useState)(false);
13231
+ const [isProfileOpen, setIsProfileOpen] = (0, import_react91.useState)(false);
13232
+ const [isOrganizationListOpen, setIsOrganizationListOpen] = (0, import_react91.useState)(false);
13358
13233
  const { t } = useTranslation_default();
13359
13234
  if (!isSignedIn && fallback) {
13360
13235
  return fallback;