@asgardeo/react 0.6.2 → 0.6.4

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.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
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(fieldType, input.name);
7117
+ const label = getInputLabel(input.name, fieldType, t);
7118
+ const placeholder = getInputPlaceholder(input.name, fieldType, 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,19 +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) => {
7480
+ var getInputVariant2 = (type, name) => {
7471
7481
  switch (type.toLowerCase()) {
7472
7482
  case "email":
7473
7483
  return "EMAIL";
@@ -7477,7 +7487,7 @@ var getInputVariant = (type, name) => {
7477
7487
  return "TEXT";
7478
7488
  }
7479
7489
  };
7480
- var getInputLabel = (name, type, t) => {
7490
+ var getInputLabel2 = (name, type, t) => {
7481
7491
  const i18nKey = `elements.fields.${name}`;
7482
7492
  const label = t(i18nKey);
7483
7493
  if (label === i18nKey || !label) {
@@ -7485,25 +7495,25 @@ var getInputLabel = (name, type, t) => {
7485
7495
  }
7486
7496
  return label;
7487
7497
  };
7488
- var getInputPlaceholder = (name, type, t) => {
7489
- const label = getInputLabel(name, type, t);
7498
+ var getInputPlaceholder2 = (name, type, t) => {
7499
+ const label = getInputLabel2(name, type, t);
7490
7500
  const placeholder = t("elements.fields.placeholder", { field: label });
7491
7501
  if (!placeholder || placeholder === "elements.fields.placeholder") {
7492
7502
  return `Enter your ${label}`;
7493
7503
  }
7494
7504
  return placeholder;
7495
7505
  };
7496
- var convertSimpleInputToComponent = (input, t) => {
7506
+ var convertSimpleInputToComponent2 = (input, t) => {
7497
7507
  let fieldType = input.type;
7498
7508
  if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
7499
7509
  fieldType = "password";
7500
7510
  }
7501
- const variant = getInputVariant(fieldType, input.name);
7502
- const label = getInputLabel(input.name, fieldType, t);
7503
- const placeholder = getInputPlaceholder(input.name, fieldType, t);
7511
+ const variant = getInputVariant2(fieldType, input.name);
7512
+ const label = getInputLabel2(input.name, fieldType, t);
7513
+ const placeholder = getInputPlaceholder2(input.name, fieldType, t);
7504
7514
  return {
7505
- id: generateId("input"),
7506
- type: import_browser49.EmbeddedFlowComponentType.Input,
7515
+ id: generateId2("input"),
7516
+ type: import_browser50.EmbeddedFlowComponentType.Input,
7507
7517
  variant,
7508
7518
  config: {
7509
7519
  type: fieldType,
@@ -7516,7 +7526,7 @@ var convertSimpleInputToComponent = (input, t) => {
7516
7526
  components: []
7517
7527
  };
7518
7528
  };
7519
- var convertActionToComponent = (action, t) => {
7529
+ var convertActionToComponent2 = (action, t) => {
7520
7530
  const normalizedId = action.id.replace(/_auth$/, "");
7521
7531
  const i18nKey = `elements.buttons.${normalizedId}`;
7522
7532
  let text = t(i18nKey);
@@ -7525,8 +7535,8 @@ var convertActionToComponent = (action, t) => {
7525
7535
  text = text.charAt(0).toUpperCase() + text.slice(1);
7526
7536
  }
7527
7537
  return {
7528
- id: generateId("action"),
7529
- type: import_browser49.EmbeddedFlowComponentType.Button,
7538
+ id: generateId2("action"),
7539
+ type: import_browser50.EmbeddedFlowComponentType.Button,
7530
7540
  variant: "SECONDARY",
7531
7541
  config: {
7532
7542
  type: "button",
@@ -7537,12 +7547,12 @@ var convertActionToComponent = (action, t) => {
7537
7547
  components: []
7538
7548
  };
7539
7549
  };
7540
- var transformSimpleToComponentDriven = (response, t) => {
7541
- const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent(input, t)) || [];
7542
- 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)) || [];
7543
7553
  const submitButton = inputComponents.length > 0 ? {
7544
- id: generateId("button"),
7545
- type: import_browser49.EmbeddedFlowComponentType.Button,
7554
+ id: generateId2("button"),
7555
+ type: import_browser50.EmbeddedFlowComponentType.Button,
7546
7556
  variant: "PRIMARY",
7547
7557
  config: {
7548
7558
  type: "submit",
@@ -7558,8 +7568,8 @@ var transformSimpleToComponentDriven = (response, t) => {
7558
7568
  const result = [];
7559
7569
  if (formComponents.length > 0) {
7560
7570
  result.push({
7561
- id: generateId("form"),
7562
- type: import_browser49.EmbeddedFlowComponentType.Form,
7571
+ id: generateId2("form"),
7572
+ type: import_browser50.EmbeddedFlowComponentType.Form,
7563
7573
  config: {},
7564
7574
  components: formComponents
7565
7575
  });
@@ -7572,7 +7582,7 @@ var transformSimpleToComponentDriven = (response, t) => {
7572
7582
  var normalizeFlowResponse = (response, t) => {
7573
7583
  return {
7574
7584
  flowId: response.flowId,
7575
- components: transformSimpleToComponentDriven(response, t)
7585
+ components: transformSimpleToComponentDriven2(response, t)
7576
7586
  };
7577
7587
  };
7578
7588
 
@@ -7581,13 +7591,13 @@ var import_jsx_runtime58 = require("react/jsx-runtime");
7581
7591
  var SignIn = ({ className, size = "medium", onSuccess, onError, variant, children }) => {
7582
7592
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading } = useAsgardeo_default();
7583
7593
  const { t } = useTranslation_default();
7584
- const [components, setComponents] = (0, import_react60.useState)([]);
7585
- const [currentFlowId, setCurrentFlowId] = (0, import_react60.useState)(null);
7586
- const [isFlowInitialized, setIsFlowInitialized] = (0, import_react60.useState)(false);
7587
- const [flowError, setFlowError] = (0, import_react60.useState)(null);
7588
- const [isSubmitting, setIsSubmitting] = (0, import_react60.useState)(false);
7589
- const initializationAttemptedRef = (0, import_react60.useRef)(false);
7590
- (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)(() => {
7591
7601
  if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current) {
7592
7602
  initializationAttemptedRef.current = true;
7593
7603
  initializeFlow();
@@ -7599,7 +7609,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7599
7609
  const applicationIdFromUrl = urlParams.get("applicationId");
7600
7610
  const effectiveApplicationId = applicationId || applicationIdFromUrl;
7601
7611
  if (!flowIdFromUrl && !effectiveApplicationId) {
7602
- const error = new import_browser50.AsgardeoRuntimeError(
7612
+ const error = new import_browser51.AsgardeoRuntimeError(
7603
7613
  "Either flowId or applicationId is required for authentication",
7604
7614
  "SignIn-initializeFlow-RuntimeError-001",
7605
7615
  "react",
@@ -7618,7 +7628,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7618
7628
  } else {
7619
7629
  response = await signIn({
7620
7630
  applicationId: effectiveApplicationId,
7621
- flowType: import_browser50.EmbeddedFlowType.Authentication
7631
+ flowType: import_browser51.EmbeddedFlowType.Authentication
7622
7632
  });
7623
7633
  }
7624
7634
  const { flowId, components: components2 } = normalizeFlowResponse(response, t);
@@ -7631,7 +7641,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7631
7641
  const err = error;
7632
7642
  setFlowError(err);
7633
7643
  onError?.(err);
7634
- throw new import_browser50.AsgardeoRuntimeError(
7644
+ throw new import_browser51.AsgardeoRuntimeError(
7635
7645
  `Failed to initialize authentication flow: ${error instanceof Error ? error.message : String(error)}`,
7636
7646
  "SignIn-initializeFlow-RuntimeError-002",
7637
7647
  "react",
@@ -7651,7 +7661,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7651
7661
  ...payload
7652
7662
  });
7653
7663
  const { flowId, components: components2 } = normalizeFlowResponse(response, t);
7654
- if (response.flowStatus === import_browser50.EmbeddedSignInFlowStatusV2.Complete) {
7664
+ if (response.flowStatus === import_browser51.EmbeddedSignInFlowStatusV2.Complete) {
7655
7665
  onSuccess && onSuccess({
7656
7666
  redirectUrl: response.redirectUrl || afterSignInUrl,
7657
7667
  ...response.data
@@ -7667,7 +7677,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7667
7677
  const err = error;
7668
7678
  setFlowError(err);
7669
7679
  onError?.(err);
7670
- throw new import_browser50.AsgardeoRuntimeError(
7680
+ throw new import_browser51.AsgardeoRuntimeError(
7671
7681
  `Failed to submit authentication flow: ${error instanceof Error ? error.message : String(error)}`,
7672
7682
  "SignIn-handleSubmit-RuntimeError-001",
7673
7683
  "react",
@@ -7729,7 +7739,7 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7729
7739
  window.location.href = url.toString();
7730
7740
  }
7731
7741
  };
7732
- if (platform === import_browser51.Platform.AsgardeoV2) {
7742
+ if (platform === import_browser52.Platform.AsgardeoV2) {
7733
7743
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
7734
7744
  SignIn_default,
7735
7745
  {
@@ -7752,6 +7762,9 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
7752
7762
  onSuccess: handleSuccess,
7753
7763
  className,
7754
7764
  size,
7765
+ showLogo: true,
7766
+ showSubtitle: true,
7767
+ showTitle: true,
7755
7768
  ...rest
7756
7769
  }
7757
7770
  );
@@ -7760,14 +7773,14 @@ var SignIn_default2 = SignIn2;
7760
7773
 
7761
7774
  // src/components/presentation/SignUp/BaseSignUp.tsx
7762
7775
  var import_browser60 = require("@asgardeo/browser");
7763
- var import_css39 = require("@emotion/css");
7764
- var import_react62 = require("react");
7776
+ var import_css38 = require("@emotion/css");
7777
+ var import_react61 = require("react");
7765
7778
 
7766
7779
  // src/components/presentation/SignUp/SignUpOptionFactory.tsx
7767
- var import_browser58 = require("@asgardeo/browser");
7780
+ var import_browser59 = require("@asgardeo/browser");
7768
7781
 
7769
7782
  // src/components/adapters/CheckboxInput.tsx
7770
- var import_browser52 = require("@asgardeo/browser");
7783
+ var import_browser53 = require("@asgardeo/browser");
7771
7784
  var CheckboxInput = ({
7772
7785
  component,
7773
7786
  formValues,
@@ -7781,7 +7794,7 @@ var CheckboxInput = ({
7781
7794
  const value = formValues[fieldName] || false;
7782
7795
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7783
7796
  return createField({
7784
- type: import_browser52.FieldType.Checkbox,
7797
+ type: import_browser53.FieldType.Checkbox,
7785
7798
  name: fieldName,
7786
7799
  label: config["label"] || "",
7787
7800
  placeholder: config["placeholder"] || "",
@@ -7795,7 +7808,7 @@ var CheckboxInput = ({
7795
7808
  var CheckboxInput_default = CheckboxInput;
7796
7809
 
7797
7810
  // src/components/adapters/DateInput.tsx
7798
- var import_browser53 = require("@asgardeo/browser");
7811
+ var import_browser54 = require("@asgardeo/browser");
7799
7812
  var DateInput = ({
7800
7813
  component,
7801
7814
  formValues,
@@ -7809,7 +7822,7 @@ var DateInput = ({
7809
7822
  const value = formValues[fieldName] || "";
7810
7823
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7811
7824
  return createField({
7812
- type: import_browser53.FieldType.Date,
7825
+ type: import_browser54.FieldType.Date,
7813
7826
  name: fieldName,
7814
7827
  label: config["label"] || "",
7815
7828
  placeholder: config["placeholder"] || "",
@@ -7842,7 +7855,7 @@ var DividerComponent = ({ component }) => {
7842
7855
  var DividerComponent_default = DividerComponent;
7843
7856
 
7844
7857
  // src/components/adapters/EmailInput.tsx
7845
- var import_browser54 = require("@asgardeo/browser");
7858
+ var import_browser55 = require("@asgardeo/browser");
7846
7859
  var EmailInput = ({
7847
7860
  component,
7848
7861
  formValues,
@@ -7856,7 +7869,7 @@ var EmailInput = ({
7856
7869
  const value = formValues[fieldName] || "";
7857
7870
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7858
7871
  return createField({
7859
- type: import_browser54.FieldType.Email,
7872
+ type: import_browser55.FieldType.Email,
7860
7873
  name: fieldName,
7861
7874
  label: config["label"] || "Email",
7862
7875
  placeholder: config["placeholder"] || "Enter your email",
@@ -7927,7 +7940,7 @@ var ImageComponent = ({ component }) => {
7927
7940
  var ImageComponent_default = ImageComponent;
7928
7941
 
7929
7942
  // src/components/adapters/NumberInput.tsx
7930
- var import_browser55 = require("@asgardeo/browser");
7943
+ var import_browser56 = require("@asgardeo/browser");
7931
7944
  var NumberInput = ({
7932
7945
  component,
7933
7946
  formValues,
@@ -7941,7 +7954,7 @@ var NumberInput = ({
7941
7954
  const value = formValues[fieldName] || "";
7942
7955
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
7943
7956
  return createField({
7944
- type: import_browser55.FieldType.Number,
7957
+ type: import_browser56.FieldType.Number,
7945
7958
  name: fieldName,
7946
7959
  label: config["label"] || "",
7947
7960
  placeholder: config["placeholder"] || "",
@@ -7955,7 +7968,7 @@ var NumberInput = ({
7955
7968
  var NumberInput_default = NumberInput;
7956
7969
 
7957
7970
  // src/components/adapters/PasswordInput.tsx
7958
- var import_browser56 = require("@asgardeo/browser");
7971
+ var import_browser57 = require("@asgardeo/browser");
7959
7972
  var PasswordInput = ({
7960
7973
  component,
7961
7974
  formValues,
@@ -8001,7 +8014,7 @@ var PasswordInput = ({
8001
8014
  });
8002
8015
  const hint = validationHints.length > 0 ? validationHints.join(", ") : config["hint"] || "";
8003
8016
  return createField({
8004
- type: import_browser56.FieldType.Password,
8017
+ type: import_browser57.FieldType.Password,
8005
8018
  name: fieldName,
8006
8019
  label: config["label"] || "Password",
8007
8020
  placeholder: config["placeholder"] || "Enter your password",
@@ -8100,7 +8113,7 @@ var TelephoneInput = ({
8100
8113
  var TelephoneInput_default = TelephoneInput;
8101
8114
 
8102
8115
  // src/components/adapters/TextInput.tsx
8103
- var import_browser57 = require("@asgardeo/browser");
8116
+ var import_browser58 = require("@asgardeo/browser");
8104
8117
  var TextInput = ({
8105
8118
  component,
8106
8119
  formValues,
@@ -8114,7 +8127,7 @@ var TextInput = ({
8114
8127
  const value = formValues[fieldName] || "";
8115
8128
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
8116
8129
  return createField({
8117
- type: import_browser57.FieldType.Text,
8130
+ type: import_browser58.FieldType.Text,
8118
8131
  name: fieldName,
8119
8132
  label: config["label"] || "",
8120
8133
  placeholder: config["placeholder"] || "",
@@ -8185,9 +8198,9 @@ var Typography_default2 = TypographyComponent;
8185
8198
  var import_jsx_runtime66 = require("react/jsx-runtime");
8186
8199
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8187
8200
  switch (component.type) {
8188
- case import_browser58.EmbeddedFlowComponentType.Typography:
8201
+ case import_browser59.EmbeddedFlowComponentType.Typography:
8189
8202
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography_default2, { component, onSubmit, ...rest });
8190
- case import_browser58.EmbeddedFlowComponentType.Input:
8203
+ case import_browser59.EmbeddedFlowComponentType.Input:
8191
8204
  const inputVariant = component.variant?.toUpperCase();
8192
8205
  const inputType = component.config["type"]?.toLowerCase();
8193
8206
  if (inputVariant === "EMAIL" || inputType === "email") {
@@ -8209,7 +8222,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8209
8222
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CheckboxInput_default, { component, onSubmit, ...rest });
8210
8223
  }
8211
8224
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TextInput_default, { component, onSubmit, ...rest });
8212
- case import_browser58.EmbeddedFlowComponentType.Button: {
8225
+ case import_browser59.EmbeddedFlowComponentType.Button: {
8213
8226
  const buttonVariant = component.variant?.toUpperCase();
8214
8227
  const buttonText = component.config["text"] || component.config["label"] || "";
8215
8228
  if (buttonVariant === "SOCIAL") {
@@ -8234,11 +8247,11 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
8234
8247
  }
8235
8248
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
8236
8249
  }
8237
- case import_browser58.EmbeddedFlowComponentType.Form:
8250
+ case import_browser59.EmbeddedFlowComponentType.Form:
8238
8251
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FormContainer_default, { component, onSubmit, ...rest });
8239
- case import_browser58.EmbeddedFlowComponentType.Divider:
8252
+ case import_browser59.EmbeddedFlowComponentType.Divider:
8240
8253
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
8241
- case import_browser58.EmbeddedFlowComponentType.Image:
8254
+ case import_browser59.EmbeddedFlowComponentType.Image:
8242
8255
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
8243
8256
  default:
8244
8257
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", {});
@@ -8271,248 +8284,105 @@ var renderSignUpComponents = (components, formValues, touchedFields, formErrors,
8271
8284
  )
8272
8285
  ).filter(Boolean);
8273
8286
 
8274
- // src/components/presentation/SignUp/transformer.ts
8275
- var import_browser59 = require("@asgardeo/browser");
8276
- var generateId2 = (prefix) => {
8277
- const suffix = Math.random().toString(36).substring(2, 6);
8278
- return `${prefix}_${suffix}`;
8279
- };
8280
- var getInputVariant2 = (type, name) => {
8281
- switch (type.toLowerCase()) {
8282
- case "email":
8283
- return "EMAIL";
8284
- case "password":
8285
- return "PASSWORD";
8286
- default:
8287
- return "TEXT";
8288
- }
8289
- };
8290
- var getInputLabel2 = (name, type, t) => {
8291
- const i18nKey = `elements.fields.${name}`;
8292
- const label = t(i18nKey);
8293
- if (label === i18nKey || !label) {
8294
- return name.charAt(0).toUpperCase() + name.slice(1);
8295
- }
8296
- return label;
8297
- };
8298
- var getInputPlaceholder2 = (name, type, t) => {
8299
- const label = getInputLabel2(name, type, t);
8300
- const placeholder = t("elements.fields.placeholder", { field: label });
8301
- if (!placeholder || placeholder === "elements.fields.placeholder") {
8302
- return `Enter your ${label}`;
8303
- }
8304
- return placeholder;
8305
- };
8306
- var convertSimpleInputToComponent2 = (input, t) => {
8307
- let fieldType = input.type;
8308
- if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
8309
- fieldType = "password";
8310
- }
8311
- const variant = getInputVariant2(input.type, input.name);
8312
- const label = getInputLabel2(input.name, input.type, t);
8313
- const placeholder = getInputPlaceholder2(input.name, input.type, t);
8314
- return {
8315
- id: generateId2("input"),
8316
- type: import_browser59.EmbeddedFlowComponentType.Input,
8317
- variant,
8318
- config: {
8319
- type: input.type,
8320
- label,
8321
- placeholder,
8322
- required: input.required,
8323
- identifier: input.name,
8324
- hint: ""
8325
- },
8326
- components: []
8327
- };
8328
- };
8329
- var convertActionToComponent2 = (action, t) => {
8330
- const normalizedId = action.id.replace(/_auth$/, "");
8331
- const i18nKey = `elements.buttons.${normalizedId}`;
8332
- let text = t(i18nKey);
8333
- if (!text || text === i18nKey) {
8334
- text = action.id.replace(/_/g, " ");
8335
- text = text.charAt(0).toUpperCase() + text.slice(1);
8336
- }
8337
- return {
8338
- id: generateId2("action"),
8339
- type: import_browser59.EmbeddedFlowComponentType.Button,
8340
- variant: "SECONDARY",
8341
- config: {
8342
- type: "button",
8343
- text,
8344
- actionId: action.id,
8345
- actionType: action.type
8346
- },
8347
- components: []
8348
- };
8349
- };
8350
- var transformSimpleToComponentDriven2 = (response, t) => {
8351
- const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
8352
- const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
8353
- const submitButton = inputComponents.length > 0 ? {
8354
- id: generateId2("button"),
8355
- type: import_browser59.EmbeddedFlowComponentType.Button,
8356
- variant: "PRIMARY",
8357
- config: {
8358
- type: "submit",
8359
- text: t("elements.buttons.signUp")
8360
- },
8361
- components: []
8362
- } : null;
8363
- const formComponents = [];
8364
- if (inputComponents.length > 0) {
8365
- formComponents.push(...inputComponents);
8366
- if (submitButton) formComponents.push(submitButton);
8367
- }
8368
- const result = [];
8369
- if (formComponents.length > 0) {
8370
- result.push({
8371
- id: generateId2("form"),
8372
- type: import_browser59.EmbeddedFlowComponentType.Form,
8373
- config: {},
8374
- components: formComponents
8375
- });
8376
- }
8377
- if (actionComponents.length > 0) {
8378
- result.push(...actionComponents);
8379
- }
8380
- return result;
8381
- };
8382
- var extractErrorMessage = (error, t) => {
8383
- let errorMessage = t("errors.sign.up.flow.failure");
8384
- if (error && typeof error === "object") {
8385
- if (error.flowStatus === "ERROR" && error.failureReason) {
8386
- errorMessage = error.failureReason;
8387
- } else if (error.code && (error.message || error.description)) {
8388
- errorMessage = error.description || error.message;
8389
- } else if (error instanceof Error && error.name === "AsgardeoAPIError") {
8390
- try {
8391
- const errorResponse = JSON.parse(
8392
- error.message
8393
- );
8394
- if (errorResponse.failureReason) {
8395
- errorMessage = errorResponse.failureReason;
8396
- } else if (errorResponse.description) {
8397
- errorMessage = errorResponse.description;
8398
- } else if (errorResponse.message) {
8399
- errorMessage = errorResponse.message;
8400
- } else {
8401
- errorMessage = error.message;
8402
- }
8403
- } catch {
8404
- errorMessage = error.message;
8405
- }
8406
- } else if (error.message) {
8407
- errorMessage = error.message;
8408
- }
8409
- } else if (typeof error === "string") {
8410
- errorMessage = error;
8411
- }
8412
- return errorMessage;
8413
- };
8414
-
8415
8287
  // src/components/presentation/SignUp/BaseSignUp.styles.ts
8416
- var import_css38 = require("@emotion/css");
8417
- var import_react61 = require("react");
8418
- var useStyles18 = (theme, colorScheme) => {
8419
- return (0, import_react61.useMemo)(() => {
8420
- 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`
8421
8293
  min-width: 420px;
8422
8294
  margin: 0 auto;
8423
8295
  `;
8424
- const card = import_css38.css`
8296
+ const card = import_css37.css`
8425
8297
  background: ${theme.vars.colors.background.surface};
8426
8298
  border-radius: ${theme.vars.borderRadius.large};
8427
8299
  gap: calc(${theme.vars.spacing.unit} * 2);
8428
8300
  min-width: 420px;
8429
8301
  `;
8430
- const logoContainer = import_css38.css`
8302
+ const logoContainer = import_css37.css`
8431
8303
  display: flex;
8432
8304
  flex-direction: column;
8433
8305
  align-items: center;
8434
- margin-bottom: calc(${theme.vars.spacing.unit} * 3);
8306
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8435
8307
  `;
8436
- const header = import_css38.css`
8308
+ const header = import_css37.css`
8437
8309
  gap: 0;
8310
+ align-items: center;
8438
8311
  `;
8439
- const title = import_css38.css`
8312
+ const title = import_css37.css`
8440
8313
  margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
8441
8314
  color: ${theme.vars.colors.text.primary};
8442
8315
  `;
8443
- const subtitle = import_css38.css`
8444
- margin-top: calc(${theme.vars.spacing.unit} * 1);
8316
+ const subtitle = import_css37.css`
8317
+ margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8445
8318
  color: ${theme.vars.colors.text.secondary};
8446
8319
  `;
8447
- const messagesContainer = import_css38.css`
8448
- margin-top: calc(${theme.vars.spacing.unit} * 2);
8449
- `;
8450
- const messageItem = import_css38.css`
8320
+ const messageItem = import_css37.css`
8451
8321
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8452
8322
  `;
8453
- const errorContainer = import_css38.css`
8323
+ const errorContainer = import_css37.css`
8454
8324
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8455
8325
  `;
8456
- const contentContainer = import_css38.css`
8326
+ const contentContainer = import_css37.css`
8457
8327
  display: flex;
8458
8328
  flex-direction: column;
8459
8329
  gap: calc(${theme.vars.spacing.unit} * 2);
8460
8330
  `;
8461
- const loadingContainer = import_css38.css`
8331
+ const loadingContainer = import_css37.css`
8462
8332
  display: flex;
8463
8333
  flex-direction: column;
8464
8334
  align-items: center;
8465
8335
  padding: calc(${theme.vars.spacing.unit} * 4);
8466
8336
  `;
8467
- const loadingText = import_css38.css`
8337
+ const loadingText = import_css37.css`
8468
8338
  margin-top: calc(${theme.vars.spacing.unit} * 2);
8469
8339
  color: ${theme.vars.colors.text.secondary};
8470
8340
  `;
8471
- const divider = import_css38.css`
8341
+ const divider = import_css37.css`
8472
8342
  margin: calc(${theme.vars.spacing.unit} * 1) 0;
8473
8343
  `;
8474
- const centeredContainer = import_css38.css`
8344
+ const centeredContainer = import_css37.css`
8475
8345
  text-align: center;
8476
8346
  padding: calc(${theme.vars.spacing.unit} * 4);
8477
8347
  `;
8478
- const passkeyContainer = import_css38.css`
8348
+ const passkeyContainer = import_css37.css`
8479
8349
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8480
8350
  `;
8481
- const passkeyText = import_css38.css`
8351
+ const passkeyText = import_css37.css`
8482
8352
  margin-top: calc(${theme.vars.spacing.unit} * 1);
8483
8353
  color: ${theme.vars.colors.text.secondary};
8484
8354
  `;
8485
- const form = import_css38.css`
8355
+ const form = import_css37.css`
8486
8356
  display: flex;
8487
8357
  flex-direction: column;
8488
8358
  gap: calc(${theme.vars.spacing.unit} * 2);
8489
8359
  `;
8490
- const formDivider = import_css38.css`
8360
+ const formDivider = import_css37.css`
8491
8361
  margin: calc(${theme.vars.spacing.unit} * 1) 0;
8492
8362
  `;
8493
- const authenticatorSection = import_css38.css`
8363
+ const authenticatorSection = import_css37.css`
8494
8364
  display: flex;
8495
8365
  flex-direction: column;
8496
8366
  gap: calc(${theme.vars.spacing.unit} * 1);
8497
8367
  `;
8498
- const authenticatorItem = import_css38.css`
8368
+ const authenticatorItem = import_css37.css`
8499
8369
  width: 100%;
8500
8370
  `;
8501
- const noAuthenticatorCard = import_css38.css`
8371
+ const noAuthenticatorCard = import_css37.css`
8502
8372
  background: ${theme.vars.colors.background.surface};
8503
8373
  border-radius: ${theme.vars.borderRadius.large};
8504
8374
  padding: calc(${theme.vars.spacing.unit} * 2);
8505
8375
  `;
8506
- const errorAlert = import_css38.css`
8376
+ const errorAlert = import_css37.css`
8507
8377
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8508
8378
  `;
8509
- const messagesAlert = import_css38.css`
8379
+ const messagesAlert = import_css37.css`
8510
8380
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8511
8381
  `;
8512
- const flowMessagesContainer = import_css38.css`
8513
- margin-top: calc(${theme.vars.spacing.unit} * 2);
8382
+ const flowMessagesContainer = import_css37.css`
8383
+ margin-bottom: calc(${theme.vars.spacing.unit} * 2);
8514
8384
  `;
8515
- const flowMessageItem = import_css38.css`
8385
+ const flowMessageItem = import_css37.css`
8516
8386
  margin-bottom: calc(${theme.vars.spacing.unit} * 1);
8517
8387
  `;
8518
8388
  return {
@@ -8522,7 +8392,6 @@ var useStyles18 = (theme, colorScheme) => {
8522
8392
  header,
8523
8393
  title,
8524
8394
  subtitle,
8525
- messagesContainer,
8526
8395
  messageItem,
8527
8396
  errorContainer,
8528
8397
  contentContainer,
@@ -8551,16 +8420,16 @@ var useStyles18 = (theme, colorScheme) => {
8551
8420
  colorScheme
8552
8421
  ]);
8553
8422
  };
8554
- var BaseSignUp_styles_default = useStyles18;
8423
+ var BaseSignUp_styles_default = useStyles17;
8555
8424
 
8556
8425
  // src/components/presentation/SignUp/BaseSignUp.tsx
8557
8426
  var import_jsx_runtime67 = require("react/jsx-runtime");
8558
- var BaseSignUp = (props) => {
8427
+ var BaseSignUp = ({ showLogo = true, ...rest }) => {
8559
8428
  const { theme, colorScheme } = useTheme_default();
8560
8429
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8561
8430
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { children: [
8562
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo_default, { size: "large" }) }),
8563
- /* @__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 }) })
8564
8433
  ] });
8565
8434
  };
8566
8435
  var BaseSignUpContent = ({
@@ -8578,13 +8447,15 @@ var BaseSignUpContent = ({
8578
8447
  size = "medium",
8579
8448
  variant = "outlined",
8580
8449
  isInitialized,
8581
- children
8450
+ children,
8451
+ showTitle = true,
8452
+ showSubtitle = true
8582
8453
  }) => {
8583
8454
  const { theme, colorScheme } = useTheme_default();
8584
8455
  const { t } = useTranslation_default();
8585
8456
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
8586
8457
  const styles = BaseSignUp_styles_default(theme, colorScheme);
8587
- const handleError = (0, import_react62.useCallback)(
8458
+ const handleError = (0, import_react61.useCallback)(
8588
8459
  (error) => {
8589
8460
  const errorMessage = extractErrorMessage(error, t);
8590
8461
  clearMessages();
@@ -8595,18 +8466,18 @@ var BaseSignUpContent = ({
8595
8466
  },
8596
8467
  [t, addMessage, clearMessages]
8597
8468
  );
8598
- const [isLoading, setIsLoading] = (0, import_react62.useState)(false);
8599
- const [isFlowInitialized, setIsFlowInitialized] = (0, import_react62.useState)(false);
8600
- const [currentFlow, setCurrentFlow] = (0, import_react62.useState)(null);
8601
- const [formData, setFormData] = (0, import_react62.useState)({});
8602
- const initializationAttemptedRef = (0, import_react62.useRef)(false);
8603
- 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)(
8604
8475
  (response) => {
8605
8476
  if (response?.data?.components && Array.isArray(response.data.components)) {
8606
8477
  return response;
8607
8478
  }
8608
8479
  if (response?.data && (response.data.inputs || response.data.actions)) {
8609
- const transformedComponents = transformSimpleToComponentDriven2(response, t);
8480
+ const transformedComponents = transformSimpleToComponentDriven(response, t);
8610
8481
  return {
8611
8482
  ...response,
8612
8483
  data: {
@@ -8619,7 +8490,7 @@ var BaseSignUpContent = ({
8619
8490
  },
8620
8491
  [t]
8621
8492
  );
8622
- const extractFormFields = (0, import_react62.useCallback)(
8493
+ const extractFormFields = (0, import_react61.useCallback)(
8623
8494
  (components) => {
8624
8495
  const fields = [];
8625
8496
  const processComponents = (comps) => {
@@ -8675,7 +8546,7 @@ var BaseSignUpContent = ({
8675
8546
  touchAllFields,
8676
8547
  reset: resetForm
8677
8548
  } = form;
8678
- const setupFormFields = (0, import_react62.useCallback)(
8549
+ const setupFormFields = (0, import_react61.useCallback)(
8679
8550
  (flowResponse) => {
8680
8551
  const fields = extractFormFields(flowResponse.data?.components || []);
8681
8552
  const initialValues = {};
@@ -8849,7 +8720,7 @@ var BaseSignUpContent = ({
8849
8720
  }
8850
8721
  return false;
8851
8722
  };
8852
- const containerClasses = (0, import_css39.cx)(
8723
+ const containerClasses = (0, import_css38.cx)(
8853
8724
  [
8854
8725
  (0, import_browser60.withVendorCSSClassPrefix)("signup"),
8855
8726
  (0, import_browser60.withVendorCSSClassPrefix)(`signup--${size}`),
@@ -8857,7 +8728,7 @@ var BaseSignUpContent = ({
8857
8728
  ],
8858
8729
  className
8859
8730
  );
8860
- const inputClasses = (0, import_css39.cx)(
8731
+ const inputClasses = (0, import_css38.cx)(
8861
8732
  [
8862
8733
  (0, import_browser60.withVendorCSSClassPrefix)("signup__input"),
8863
8734
  size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__input--small"),
@@ -8865,7 +8736,7 @@ var BaseSignUpContent = ({
8865
8736
  ],
8866
8737
  inputClassName
8867
8738
  );
8868
- const buttonClasses = (0, import_css39.cx)(
8739
+ const buttonClasses = (0, import_css38.cx)(
8869
8740
  [
8870
8741
  (0, import_browser60.withVendorCSSClassPrefix)("signup__button"),
8871
8742
  size === "small" && (0, import_browser60.withVendorCSSClassPrefix)("signup__button--small"),
@@ -8873,9 +8744,9 @@ var BaseSignUpContent = ({
8873
8744
  ],
8874
8745
  buttonClassName
8875
8746
  );
8876
- const errorClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__error")], errorClassName);
8877
- const messageClasses = (0, import_css39.cx)([(0, import_browser60.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
8878
- 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)(
8879
8750
  (components) => renderSignUpComponents(
8880
8751
  components,
8881
8752
  formValues,
@@ -8905,7 +8776,7 @@ var BaseSignUpContent = ({
8905
8776
  handleSubmit
8906
8777
  ]
8907
8778
  );
8908
- (0, import_react62.useEffect)(() => {
8779
+ (0, import_react61.useEffect)(() => {
8909
8780
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
8910
8781
  initializationAttemptedRef.current = true;
8911
8782
  (async () => {
@@ -8962,29 +8833,31 @@ var BaseSignUpContent = ({
8962
8833
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: containerClasses, children: children(renderProps) });
8963
8834
  }
8964
8835
  if (!isFlowInitialized && isLoading) {
8965
- 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" }) }) }) });
8966
8837
  }
8967
8838
  if (!currentFlow) {
8968
- 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: [
8969
8840
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Title, { children: t("errors.title") }),
8970
8841
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: t("errors.sign.up.flow.initialization.failure") })
8971
8842
  ] }) }) });
8972
8843
  }
8973
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default, { className: (0, import_css39.cx)(containerClasses, styles.card), variant, children: [
8974
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default.Header, { className: styles.header, children: [
8975
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
8976
- /* @__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: [
8977
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)(
8978
8851
  Alert_default,
8979
8852
  {
8980
8853
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
8981
- className: (0, import_css39.cx)(styles.flowMessageItem, messageClasses),
8854
+ className: (0, import_css38.cx)(styles.flowMessageItem, messageClasses),
8982
8855
  children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: message.message })
8983
8856
  },
8984
8857
  message.id || index
8985
- )) })
8986
- ] }),
8987
- /* @__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
+ ] })
8988
8861
  ] });
8989
8862
  };
8990
8863
  var BaseSignUp_default = BaseSignUp;
@@ -9004,9 +8877,12 @@ var SignUp = ({
9004
8877
  }) => {
9005
8878
  const { signUp, isInitialized, applicationId, platform } = useAsgardeo_default();
9006
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;
9007
8883
  const initialPayload = payload || {
9008
8884
  flowType: import_browser61.EmbeddedFlowType.Registration,
9009
- ...platform === import_browser61.Platform.AsgardeoV2 && applicationId && { applicationId }
8885
+ ...platform === import_browser61.Platform.AsgardeoV2 && effectiveApplicationId && { applicationId: effectiveApplicationId }
9010
8886
  };
9011
8887
  return await signUp(initialPayload);
9012
8888
  };
@@ -9033,6 +8909,9 @@ var SignUp = ({
9033
8909
  size,
9034
8910
  isInitialized,
9035
8911
  children,
8912
+ showLogo: true,
8913
+ showTitle: platform === import_browser61.Platform.AsgardeoV2,
8914
+ showSubtitle: platform === import_browser61.Platform.AsgardeoV2,
9036
8915
  ...rest
9037
8916
  }
9038
8917
  );
@@ -9081,8 +8960,8 @@ var Organization_default = Organization5;
9081
8960
 
9082
8961
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
9083
8962
  var import_browser67 = require("@asgardeo/browser");
9084
- var import_css47 = require("@emotion/css");
9085
- var import_react71 = require("react");
8963
+ var import_css46 = require("@emotion/css");
8964
+ var import_react70 = require("react");
9086
8965
 
9087
8966
  // src/utils/getMappedUserProfileValue.ts
9088
8967
  var import_browser62 = require("@asgardeo/browser");
@@ -9109,15 +8988,15 @@ var getMappedUserProfileValue_default = getMappedUserProfileValue;
9109
8988
 
9110
8989
  // src/components/primitives/Avatar/Avatar.tsx
9111
8990
  var import_browser63 = require("@asgardeo/browser");
9112
- var import_css41 = require("@emotion/css");
9113
- var import_react64 = require("react");
9114
-
9115
- // src/components/primitives/Avatar/Avatar.styles.ts
9116
8991
  var import_css40 = require("@emotion/css");
9117
8992
  var import_react63 = require("react");
9118
- var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9119
- return (0, import_react63.useMemo)(() => {
9120
- 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`
9121
9000
  align-items: center;
9122
9001
  background: ${backgroundColor || theme.vars.colors.background.surface};
9123
9002
  border: ${backgroundColor ? "none" : `1px solid ${theme.vars.colors.border}`};
@@ -9133,19 +9012,19 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9133
9012
  width: ${size}px;
9134
9013
  `;
9135
9014
  const variantStyles = {
9136
- circular: import_css40.css`
9015
+ circular: import_css39.css`
9137
9016
  border-radius: 50%;
9138
9017
  `,
9139
- square: import_css40.css`
9018
+ square: import_css39.css`
9140
9019
  border-radius: 8px;
9141
9020
  `
9142
9021
  };
9143
- const imageStyles = import_css40.css`
9022
+ const imageStyles = import_css39.css`
9144
9023
  height: 100%;
9145
9024
  object-fit: cover;
9146
9025
  width: 100%;
9147
9026
  `;
9148
- const skeletonStyles = import_css40.css`
9027
+ const skeletonStyles = import_css39.css`
9149
9028
  width: 100%;
9150
9029
  height: 100%;
9151
9030
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
@@ -9162,7 +9041,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9162
9041
  }
9163
9042
  }
9164
9043
  `;
9165
- const iconStyles = import_css40.css`
9044
+ const iconStyles = import_css39.css`
9166
9045
  width: 60%;
9167
9046
  height: 60%;
9168
9047
  fill: ${backgroundColor ? "#ffffff" : theme.vars.colors.text.secondary};
@@ -9177,7 +9056,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
9177
9056
  };
9178
9057
  }, [theme, colorScheme, size, variant, backgroundColor]);
9179
9058
  };
9180
- var Avatar_styles_default = useStyles19;
9059
+ var Avatar_styles_default = useStyles18;
9181
9060
 
9182
9061
  // src/components/primitives/Avatar/Avatar.tsx
9183
9062
  var import_jsx_runtime73 = require("react/jsx-runtime");
@@ -9210,7 +9089,7 @@ var Avatar = ({
9210
9089
  const colors = generateColor(seed);
9211
9090
  return `linear-gradient(${angle}deg, ${colors})`;
9212
9091
  };
9213
- const backgroundColor = (0, import_react64.useMemo)(() => {
9092
+ const backgroundColor = (0, import_react63.useMemo)(() => {
9214
9093
  if (!name || imageUrl) {
9215
9094
  return void 0;
9216
9095
  }
@@ -9227,20 +9106,20 @@ var Avatar = ({
9227
9106
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
9228
9107
  const renderContent = () => {
9229
9108
  if (imageUrl) {
9230
- 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) });
9231
9110
  }
9232
9111
  if (name) {
9233
9112
  return getInitials(name);
9234
9113
  }
9235
9114
  if (isLoading) {
9236
- 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) });
9237
9116
  }
9238
9117
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9239
9118
  "svg",
9240
9119
  {
9241
9120
  xmlns: "http://www.w3.org/2000/svg",
9242
9121
  viewBox: "0 0 640 640",
9243
- 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),
9244
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" })
9245
9124
  }
9246
9125
  );
@@ -9248,7 +9127,7 @@ var Avatar = ({
9248
9127
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
9249
9128
  "div",
9250
9129
  {
9251
- className: (0, import_css41.cx)(
9130
+ className: (0, import_css40.cx)(
9252
9131
  (0, import_browser63.withVendorCSSClassPrefix)((0, import_browser63.bem)("avatar")),
9253
9132
  styles.avatar,
9254
9133
  styles.variant,
@@ -9264,9 +9143,9 @@ var Avatar_default = Avatar;
9264
9143
 
9265
9144
  // src/components/primitives/Dialog/Dialog.tsx
9266
9145
  var import_browser64 = require("@asgardeo/browser");
9267
- var import_react66 = require("@floating-ui/react");
9268
- var import_css43 = require("@emotion/css");
9269
- 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);
9270
9149
 
9271
9150
  // src/components/primitives/Icons/LogOut.tsx
9272
9151
  var import_jsx_runtime74 = require("react/jsx-runtime");
@@ -9362,18 +9241,18 @@ var X = (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
9362
9241
  var X_default = X;
9363
9242
 
9364
9243
  // src/components/primitives/Dialog/Dialog.styles.ts
9365
- var import_css42 = require("@emotion/css");
9366
- var import_react65 = require("react");
9367
- var useStyles20 = (theme, colorScheme) => {
9368
- return (0, import_react65.useMemo)(() => {
9369
- 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`
9370
9249
  background-color: rgba(0, 0, 0, 0.5);
9371
9250
  display: flex;
9372
9251
  align-items: center;
9373
9252
  justify-content: center;
9374
9253
  z-index: 9999;
9375
9254
  `;
9376
- const content = import_css42.css`
9255
+ const content = import_css41.css`
9377
9256
  background: ${theme.vars.colors.background.surface};
9378
9257
  border-radius: ${theme.vars.borderRadius.large};
9379
9258
  box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
@@ -9381,7 +9260,7 @@ var useStyles20 = (theme, colorScheme) => {
9381
9260
  overflow-y: auto;
9382
9261
  z-index: 10000;
9383
9262
  `;
9384
- const dropdownContent = import_css42.css`
9263
+ const dropdownContent = import_css41.css`
9385
9264
  background: ${theme.vars.colors.background.surface};
9386
9265
  border-radius: ${theme.vars.borderRadius.large};
9387
9266
  box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
@@ -9391,23 +9270,23 @@ var useStyles20 = (theme, colorScheme) => {
9391
9270
  overflow-y: auto;
9392
9271
  z-index: 10000;
9393
9272
  `;
9394
- const header = import_css42.css`
9273
+ const header = import_css41.css`
9395
9274
  display: flex;
9396
9275
  justify-content: space-between;
9397
9276
  align-items: center;
9398
9277
  padding: calc(${theme.vars.spacing.unit} * 3) calc(${theme.vars.spacing.unit} * 4.5);
9399
9278
  border-bottom: 1px solid ${theme.vars.colors.border};
9400
9279
  `;
9401
- const headerTitle = import_css42.css`
9280
+ const headerTitle = import_css41.css`
9402
9281
  margin: 0;
9403
9282
  font-size: 1.2rem;
9404
9283
  font-weight: 600;
9405
9284
  color: ${theme.vars.colors.text.primary};
9406
9285
  `;
9407
- const contentBody = import_css42.css`
9286
+ const contentBody = import_css41.css`
9408
9287
  padding: calc(${theme.vars.spacing.unit} * 2);
9409
9288
  `;
9410
- const description = import_css42.css`
9289
+ const description = import_css41.css`
9411
9290
  margin: 0;
9412
9291
  color: ${theme.vars.colors.text.secondary};
9413
9292
  font-size: ${theme.vars.typography.fontSizes.sm};
@@ -9424,7 +9303,7 @@ var useStyles20 = (theme, colorScheme) => {
9424
9303
  };
9425
9304
  }, [theme, colorScheme]);
9426
9305
  };
9427
- var Dialog_styles_default = useStyles20;
9306
+ var Dialog_styles_default = useStyles19;
9428
9307
 
9429
9308
  // src/components/primitives/Dialog/Dialog.tsx
9430
9309
  var import_jsx_runtime78 = require("react/jsx-runtime");
@@ -9433,23 +9312,23 @@ function useDialog({
9433
9312
  open: controlledOpen,
9434
9313
  onOpenChange: setControlledOpen
9435
9314
  } = {}) {
9436
- const [uncontrolledOpen, setUncontrolledOpen] = import_react67.default.useState(initialOpen);
9437
- const [labelId, setLabelId] = import_react67.default.useState();
9438
- 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();
9439
9318
  const open = controlledOpen ?? uncontrolledOpen;
9440
9319
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
9441
- const data = (0, import_react66.useFloating)({
9320
+ const data = (0, import_react65.useFloating)({
9442
9321
  open,
9443
9322
  onOpenChange: setOpen
9444
9323
  });
9445
9324
  const { context } = data;
9446
- const click = (0, import_react66.useClick)(context, {
9325
+ const click = (0, import_react65.useClick)(context, {
9447
9326
  enabled: controlledOpen == null
9448
9327
  });
9449
- const dismiss = (0, import_react66.useDismiss)(context, { outsidePressEvent: "mousedown" });
9450
- const role = (0, import_react66.useRole)(context);
9451
- const interactions = (0, import_react66.useInteractions)([click, dismiss, role]);
9452
- 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(
9453
9332
  () => ({
9454
9333
  open,
9455
9334
  setOpen,
@@ -9463,9 +9342,9 @@ function useDialog({
9463
9342
  [open, setOpen, interactions, data, labelId, descriptionId]
9464
9343
  );
9465
9344
  }
9466
- var DialogContext = import_react67.default.createContext(null);
9345
+ var DialogContext = import_react66.default.createContext(null);
9467
9346
  var useDialogContext = () => {
9468
- const context = import_react67.default.useContext(DialogContext);
9347
+ const context = import_react66.default.useContext(DialogContext);
9469
9348
  if (context == null) {
9470
9349
  throw new Error("Dialog components must be wrapped in <Dialog />");
9471
9350
  }
@@ -9475,13 +9354,13 @@ function Dialog({ children, ...options }) {
9475
9354
  const dialog = useDialog(options);
9476
9355
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DialogContext.Provider, { value: dialog, children });
9477
9356
  }
9478
- var DialogTrigger = import_react67.default.forwardRef(
9357
+ var DialogTrigger = import_react66.default.forwardRef(
9479
9358
  ({ children, asChild = false, ...props }, propRef) => {
9480
9359
  const context = useDialogContext();
9481
9360
  const childrenRef = children.ref;
9482
- const ref = (0, import_react66.useMergeRefs)([context.refs.setReference, propRef, childrenRef]);
9483
- if (asChild && import_react67.default.isValidElement(children)) {
9484
- 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(
9485
9364
  children,
9486
9365
  context.getReferenceProps({
9487
9366
  ref,
@@ -9494,17 +9373,17 @@ var DialogTrigger = import_react67.default.forwardRef(
9494
9373
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
9495
9374
  }
9496
9375
  );
9497
- var DialogContent = import_react67.default.forwardRef((props, propRef) => {
9376
+ var DialogContent = import_react66.default.forwardRef((props, propRef) => {
9498
9377
  const { context: floatingContext, ...context } = useDialogContext();
9499
9378
  const { theme, colorScheme } = useTheme_default();
9500
9379
  const styles = Dialog_styles_default(theme, colorScheme);
9501
- const ref = (0, import_react66.useMergeRefs)([context.refs.setFloating, propRef]);
9380
+ const ref = (0, import_react65.useMergeRefs)([context.refs.setFloating, propRef]);
9502
9381
  if (!floatingContext.open) return null;
9503
- 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)(
9504
9383
  "div",
9505
9384
  {
9506
9385
  ref,
9507
- 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),
9508
9387
  "aria-labelledby": context.labelId,
9509
9388
  "aria-describedby": context.descriptionId,
9510
9389
  ...context.getFloatingProps(props),
@@ -9512,24 +9391,24 @@ var DialogContent = import_react67.default.forwardRef((props, propRef) => {
9512
9391
  }
9513
9392
  ) }) }) });
9514
9393
  });
9515
- var DialogHeading = import_react67.default.forwardRef(
9394
+ var DialogHeading = import_react66.default.forwardRef(
9516
9395
  ({ children, ...props }, ref) => {
9517
9396
  const context = useDialogContext();
9518
9397
  const { theme, colorScheme } = useTheme_default();
9519
9398
  const styles = Dialog_styles_default(theme, colorScheme);
9520
- const id = (0, import_react66.useId)();
9521
- import_react67.default.useLayoutEffect(() => {
9399
+ const id = (0, import_react65.useId)();
9400
+ import_react66.default.useLayoutEffect(() => {
9522
9401
  context.setLabelId(id);
9523
9402
  return () => context.setLabelId(void 0);
9524
9403
  }, [id, context.setLabelId]);
9525
- 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: [
9526
9405
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
9527
9406
  "h2",
9528
9407
  {
9529
9408
  ...props,
9530
9409
  ref,
9531
9410
  id,
9532
- 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),
9533
9412
  children
9534
9413
  }
9535
9414
  ),
@@ -9548,13 +9427,13 @@ var DialogHeading = import_react67.default.forwardRef(
9548
9427
  ] });
9549
9428
  }
9550
9429
  );
9551
- var DialogDescription = import_react67.default.forwardRef(
9430
+ var DialogDescription = import_react66.default.forwardRef(
9552
9431
  ({ children, ...props }, ref) => {
9553
9432
  const context = useDialogContext();
9554
9433
  const { theme, colorScheme } = useTheme_default();
9555
9434
  const styles = Dialog_styles_default(theme, colorScheme);
9556
- const id = (0, import_react66.useId)();
9557
- import_react67.default.useLayoutEffect(() => {
9435
+ const id = (0, import_react65.useId)();
9436
+ import_react66.default.useLayoutEffect(() => {
9558
9437
  context.setDescriptionId(id);
9559
9438
  return () => context.setDescriptionId(void 0);
9560
9439
  }, [id, context.setDescriptionId]);
@@ -9564,24 +9443,24 @@ var DialogDescription = import_react67.default.forwardRef(
9564
9443
  ...props,
9565
9444
  ref,
9566
9445
  id,
9567
- 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),
9568
9447
  children
9569
9448
  }
9570
9449
  );
9571
9450
  }
9572
9451
  );
9573
- var DialogClose = import_react67.default.forwardRef(({ children, asChild = false, ...props }, propRef) => {
9452
+ var DialogClose = import_react66.default.forwardRef(({ children, asChild = false, ...props }, propRef) => {
9574
9453
  const context = useDialogContext();
9575
9454
  const { theme, colorScheme } = useTheme_default();
9576
9455
  const styles = Dialog_styles_default(theme, colorScheme);
9577
9456
  const childrenRef = children?.ref;
9578
- const ref = (0, import_react66.useMergeRefs)([propRef, childrenRef]);
9457
+ const ref = (0, import_react65.useMergeRefs)([propRef, childrenRef]);
9579
9458
  const handleClick = (event) => {
9580
9459
  context.setOpen(false);
9581
9460
  props.onClick?.(event);
9582
9461
  };
9583
- if (asChild && import_react67.default.isValidElement(children)) {
9584
- return import_react67.default.cloneElement(children, {
9462
+ if (asChild && import_react66.default.isValidElement(children)) {
9463
+ return import_react66.default.cloneElement(children, {
9585
9464
  ref,
9586
9465
  ...props,
9587
9466
  ...children.props,
@@ -9594,7 +9473,7 @@ var DialogClose = import_react67.default.forwardRef(({ children, asChild = false
9594
9473
  ...props,
9595
9474
  ref,
9596
9475
  onClick: handleClick,
9597
- 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),
9598
9477
  variant: "text",
9599
9478
  children
9600
9479
  }
@@ -9613,41 +9492,41 @@ Dialog.Close = DialogClose;
9613
9492
  var Dialog_default = Dialog;
9614
9493
 
9615
9494
  // src/components/primitives/MultiInput/MultiInput.tsx
9616
- var import_react69 = require("react");
9617
- var import_css45 = require("@emotion/css");
9495
+ var import_react68 = require("react");
9496
+ var import_css44 = require("@emotion/css");
9618
9497
  var import_browser65 = require("@asgardeo/browser");
9619
9498
 
9620
9499
  // src/components/primitives/MultiInput/MultiInput.styles.ts
9621
- var import_css44 = require("@emotion/css");
9622
- var import_react68 = require("react");
9623
- var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove) => {
9624
- return (0, import_react68.useMemo)(() => {
9625
- 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`
9626
9505
  display: flex;
9627
9506
  flex-direction: column;
9628
9507
  gap: ${theme.vars.spacing.unit};
9629
9508
  `;
9630
- const inputRow = import_css44.css`
9509
+ const inputRow = import_css43.css`
9631
9510
  display: flex;
9632
9511
  align-items: center;
9633
9512
  gap: ${theme.vars.spacing.unit};
9634
9513
  position: relative;
9635
9514
  `;
9636
- const inputWrapper = import_css44.css`
9515
+ const inputWrapper = import_css43.css`
9637
9516
  flex: 1;
9638
9517
  `;
9639
- const plusIcon = import_css44.css`
9518
+ const plusIcon = import_css43.css`
9640
9519
  background: ${theme.vars.colors.secondary.main};
9641
9520
  border-radius: 50%;
9642
9521
  outline: 4px ${theme.vars.colors.secondary.main} auto;
9643
9522
  color: ${theme.vars.colors.secondary.contrastText};
9644
9523
  `;
9645
- const listContainer = import_css44.css`
9524
+ const listContainer = import_css43.css`
9646
9525
  display: flex;
9647
9526
  flex-direction: column;
9648
9527
  gap: 0;
9649
9528
  `;
9650
- const listItem = import_css44.css`
9529
+ const listItem = import_css43.css`
9651
9530
  display: flex;
9652
9531
  align-items: center;
9653
9532
  justify-content: space-between;
@@ -9662,11 +9541,11 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9662
9541
  margin-bottom: 0;
9663
9542
  }
9664
9543
  `;
9665
- const listItemText = import_css44.css`
9544
+ const listItemText = import_css43.css`
9666
9545
  flex: 1;
9667
9546
  word-break: break-word;
9668
9547
  `;
9669
- const removeButton = import_css44.css`
9548
+ const removeButton = import_css43.css`
9670
9549
  padding: calc(${theme.vars.spacing.unit} / 2);
9671
9550
  min-width: auto;
9672
9551
  color: ${theme.vars.colors.error.main};
@@ -9686,7 +9565,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9686
9565
  opacity: 0.6;
9687
9566
  }
9688
9567
  `;
9689
- const icon = import_css44.css`
9568
+ const icon = import_css43.css`
9690
9569
  width: 16px;
9691
9570
  height: 16px;
9692
9571
  stroke: currentColor;
@@ -9708,7 +9587,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
9708
9587
  };
9709
9588
  }, [theme, colorScheme, disabled, hasError, canAddMore, canRemove]);
9710
9589
  };
9711
- var MultiInput_styles_default = useStyles21;
9590
+ var MultiInput_styles_default = useStyles20;
9712
9591
 
9713
9592
  // src/components/primitives/MultiInput/MultiInput.tsx
9714
9593
  var import_jsx_runtime79 = require("react/jsx-runtime");
@@ -9734,9 +9613,9 @@ var MultiInput = ({
9734
9613
  const canAddMore = !maxFields || values.length < maxFields;
9735
9614
  const canRemove = values.length > minFields;
9736
9615
  const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
9737
- 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" }) });
9738
- 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" }) });
9739
- 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)(
9740
9619
  (newValue) => {
9741
9620
  if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
9742
9621
  onChange([...values, newValue.trim()]);
@@ -9744,7 +9623,7 @@ var MultiInput = ({
9744
9623
  },
9745
9624
  [values, onChange, maxFields]
9746
9625
  );
9747
- const handleRemoveValue = (0, import_react69.useCallback)(
9626
+ const handleRemoveValue = (0, import_react68.useCallback)(
9748
9627
  (index) => {
9749
9628
  if (values.length > minFields) {
9750
9629
  const updatedValues = values.filter((_, i) => i !== index);
@@ -9753,7 +9632,7 @@ var MultiInput = ({
9753
9632
  },
9754
9633
  [values, onChange, minFields]
9755
9634
  );
9756
- const renderInputField = (0, import_react69.useCallback)(
9635
+ const renderInputField = (0, import_react68.useCallback)(
9757
9636
  (value, onValueChange, attachedEndIcon, onEndIconClick) => {
9758
9637
  const handleInputChange = (e) => {
9759
9638
  const newValue = e.target ? e.target.value : e;
@@ -9795,8 +9674,8 @@ var MultiInput = ({
9795
9674
  },
9796
9675
  [placeholder, disabled, startIcon, endIcon, error, fieldType, type]
9797
9676
  );
9798
- const [currentInputValue, setCurrentInputValue] = (0, import_react69.useState)("");
9799
- const handleInputSubmit = (0, import_react69.useCallback)(() => {
9677
+ const [currentInputValue, setCurrentInputValue] = (0, import_react68.useState)("");
9678
+ const handleInputSubmit = (0, import_react68.useCallback)(() => {
9800
9679
  if (currentInputValue.trim() !== "") {
9801
9680
  handleAddValue(currentInputValue);
9802
9681
  setCurrentInputValue("");
@@ -9807,26 +9686,26 @@ var MultiInput = ({
9807
9686
  {
9808
9687
  error,
9809
9688
  helperText,
9810
- 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),
9811
9690
  style,
9812
9691
  children: [
9813
9692
  label && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(InputLabel_default, { required, error: !!error, children: label }),
9814
- /* @__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: [
9815
- /* @__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(
9816
9695
  currentInputValue,
9817
9696
  setCurrentInputValue,
9818
9697
  canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(PlusIcon, { className: styles.plusIcon }) : void 0,
9819
9698
  canAddMore ? handleInputSubmit : void 0
9820
9699
  ) }) }),
9821
- 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)(
9822
9701
  "div",
9823
9702
  {
9824
- 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),
9825
9704
  children: [
9826
9705
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
9827
9706
  "span",
9828
9707
  {
9829
- 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),
9830
9709
  children: value
9831
9710
  }
9832
9711
  ),
@@ -9836,7 +9715,7 @@ var MultiInput = ({
9836
9715
  type: "button",
9837
9716
  onClick: () => handleRemoveValue(index),
9838
9717
  disabled,
9839
- 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),
9840
9719
  title: "Remove value",
9841
9720
  children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BinIcon, { className: styles.icon })
9842
9721
  }
@@ -9853,15 +9732,15 @@ var MultiInput = ({
9853
9732
  var MultiInput_default = MultiInput;
9854
9733
 
9855
9734
  // src/components/presentation/UserProfile/BaseUserProfile.styles.ts
9856
- var import_css46 = require("@emotion/css");
9857
- var import_react70 = require("react");
9735
+ var import_css45 = require("@emotion/css");
9736
+ var import_react69 = require("react");
9858
9737
  var import_browser66 = require("@asgardeo/browser");
9859
- var useStyles22 = (theme, colorScheme) => {
9860
- const valuePlaceholder = import_css46.css`
9738
+ var useStyles21 = (theme, colorScheme) => {
9739
+ const valuePlaceholder = import_css45.css`
9861
9740
  font-style: italic;
9862
9741
  opacity: 0.7;
9863
9742
  `;
9864
- const editButton = import_css46.css`
9743
+ const editButton = import_css45.css`
9865
9744
  font-style: italic;
9866
9745
  text-decoration: underline;
9867
9746
  opacity: 0.7;
@@ -9872,19 +9751,19 @@ var useStyles22 = (theme, colorScheme) => {
9872
9751
  background-color: transparent;
9873
9752
  }
9874
9753
  `;
9875
- const fieldInner = import_css46.css`
9754
+ const fieldInner = import_css45.css`
9876
9755
  flex: 1;
9877
9756
  display: flex;
9878
9757
  align-items: center;
9879
9758
  gap: ${theme.vars.spacing.unit};
9880
9759
  `;
9881
- const fieldActions = import_css46.css`
9760
+ const fieldActions = import_css45.css`
9882
9761
  display: flex;
9883
9762
  gap: calc(${theme.vars.spacing.unit} / 2);
9884
9763
  align-items: center;
9885
9764
  margin-inline-start: calc(${theme.vars.spacing.unit} * 4);
9886
9765
  `;
9887
- const complexTextarea = import_css46.css`
9766
+ const complexTextarea = import_css45.css`
9888
9767
  min-height: 60px;
9889
9768
  width: 100%;
9890
9769
  padding: 8px;
@@ -9892,57 +9771,57 @@ var useStyles22 = (theme, colorScheme) => {
9892
9771
  border-radius: ${theme.vars.borderRadius.small};
9893
9772
  resize: vertical;
9894
9773
  `;
9895
- const objectKey = import_css46.css`
9774
+ const objectKey = import_css45.css`
9896
9775
  padding: ${theme.vars.spacing.unit};
9897
9776
  vertical-align: top;
9898
9777
  `;
9899
- const objectValue = import_css46.css`
9778
+ const objectValue = import_css45.css`
9900
9779
  padding: ${theme.vars.spacing.unit};
9901
9780
  vertical-align: top;
9902
9781
  `;
9903
- return (0, import_react70.useMemo)(() => {
9904
- const root = import_css46.css`
9782
+ return (0, import_react69.useMemo)(() => {
9783
+ const root = import_css45.css`
9905
9784
  padding: calc(${theme.vars.spacing.unit} * 4);
9906
9785
  min-width: 600px;
9907
9786
  margin: 0 auto;
9908
9787
  `;
9909
- const card = import_css46.css`
9788
+ const card = import_css45.css`
9910
9789
  background: ${theme.vars.colors.background.surface};
9911
9790
  border-radius: ${theme.vars.borderRadius.large};
9912
9791
  `;
9913
- const header = import_css46.css`
9792
+ const header = import_css45.css`
9914
9793
  display: flex;
9915
9794
  align-items: center;
9916
9795
  gap: calc(${theme.vars.spacing.unit} * 1.5);
9917
9796
  margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
9918
9797
  `;
9919
- const profileInfo = import_css46.css`
9798
+ const profileInfo = import_css45.css`
9920
9799
  flex: 1;
9921
9800
  `;
9922
- const name = import_css46.css`
9801
+ const name = import_css45.css`
9923
9802
  font-size: 1.5rem;
9924
9803
  font-weight: 600;
9925
9804
  margin: 0;
9926
9805
  color: ${theme.vars.colors.text.primary};
9927
9806
  `;
9928
- const infoContainer = import_css46.css`
9807
+ const infoContainer = import_css45.css`
9929
9808
  display: flex;
9930
9809
  flex-direction: column;
9931
9810
  `;
9932
- const info = import_css46.css`
9811
+ const info = import_css45.css`
9933
9812
  padding: calc(${theme.vars.spacing.unit} * 1.5) 0;
9934
9813
  border-bottom: 1px solid ${theme.vars.colors.border};
9935
9814
  `;
9936
- const field = import_css46.css`
9815
+ const field = import_css45.css`
9937
9816
  display: flex;
9938
9817
  align-items: center;
9939
9818
  padding: calc(${theme.vars.spacing.unit} / 2) 0;
9940
9819
  min-height: 28px;
9941
9820
  `;
9942
- const lastField = import_css46.css`
9821
+ const lastField = import_css45.css`
9943
9822
  border-bottom: none;
9944
9823
  `;
9945
- const label = import_css46.css`
9824
+ const label = import_css45.css`
9946
9825
  font-size: 0.875rem;
9947
9826
  font-weight: 500;
9948
9827
  color: ${theme.vars.colors.text.secondary};
@@ -9951,7 +9830,7 @@ var useStyles22 = (theme, colorScheme) => {
9951
9830
  line-height: 28px;
9952
9831
  text-align: start;
9953
9832
  `;
9954
- const value = import_css46.css`
9833
+ const value = import_css45.css`
9955
9834
  color: ${theme.vars.colors.text.primary};
9956
9835
  flex: 1;
9957
9836
  display: inline-block;
@@ -9984,10 +9863,10 @@ var useStyles22 = (theme, colorScheme) => {
9984
9863
  border-color: ${theme.vars.colors.border};
9985
9864
  }
9986
9865
  `;
9987
- const popup = import_css46.css`
9866
+ const popup = import_css45.css`
9988
9867
  padding: calc(${theme.vars.spacing.unit} * 2);
9989
9868
  `;
9990
- const alert = import_css46.css`
9869
+ const alert = import_css45.css`
9991
9870
  margin-bottom: calc(${theme.vars.spacing.unit} * 3);
9992
9871
  `;
9993
9872
  return {
@@ -10023,7 +9902,7 @@ var useStyles22 = (theme, colorScheme) => {
10023
9902
  colorScheme
10024
9903
  ]);
10025
9904
  };
10026
- var BaseUserProfile_styles_default = useStyles22;
9905
+ var BaseUserProfile_styles_default = useStyles21;
10027
9906
 
10028
9907
  // src/utils/getDisplayName.ts
10029
9908
  var getDisplayName = (mergedMappings, user) => {
@@ -10079,10 +9958,10 @@ var BaseUserProfile = ({
10079
9958
  hideFields = []
10080
9959
  }) => {
10081
9960
  const { theme, colorScheme } = useTheme_default();
10082
- const [editedUser, setEditedUser] = (0, import_react71.useState)(flattenedProfile || profile);
10083
- 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)({});
10084
9963
  const { t } = useTranslation_default();
10085
- const shouldShowField = (0, import_react71.useCallback)(
9964
+ const shouldShowField = (0, import_react70.useCallback)(
10086
9965
  (fieldName) => {
10087
9966
  if (fieldsToSkip.includes(fieldName)) {
10088
9967
  return false;
@@ -10111,13 +9990,13 @@ var BaseUserProfile = ({
10111
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" })
10112
9991
  }
10113
9992
  );
10114
- const toggleFieldEdit = (0, import_react71.useCallback)((fieldName) => {
9993
+ const toggleFieldEdit = (0, import_react70.useCallback)((fieldName) => {
10115
9994
  setEditingFields((prev) => ({
10116
9995
  ...prev,
10117
9996
  [fieldName]: !prev[fieldName]
10118
9997
  }));
10119
9998
  }, []);
10120
- const getFieldPlaceholder = (0, import_react71.useCallback)((schema) => {
9999
+ const getFieldPlaceholder = (0, import_react70.useCallback)((schema) => {
10121
10000
  const { type, displayName, description, name } = schema;
10122
10001
  const fieldLabel = displayName || description || name || "value";
10123
10002
  switch (type) {
@@ -10156,7 +10035,7 @@ var BaseUserProfile = ({
10156
10035
  }
10157
10036
  }
10158
10037
  }
10159
- const handleFieldSave = (0, import_react71.useCallback)(
10038
+ const handleFieldSave = (0, import_react70.useCallback)(
10160
10039
  (schema) => {
10161
10040
  if (!onUpdate || !schema.name) return;
10162
10041
  const fieldName = schema.name;
@@ -10179,7 +10058,7 @@ var BaseUserProfile = ({
10179
10058
  },
10180
10059
  [editedUser, flattenedProfile, onUpdate, toggleFieldEdit]
10181
10060
  );
10182
- const handleFieldCancel = (0, import_react71.useCallback)(
10061
+ const handleFieldCancel = (0, import_react70.useCallback)(
10183
10062
  (fieldName) => {
10184
10063
  const currentUser2 = flattenedProfile || profile;
10185
10064
  setEditedUser((prev) => ({
@@ -10190,7 +10069,7 @@ var BaseUserProfile = ({
10190
10069
  },
10191
10070
  [flattenedProfile, profile, toggleFieldEdit]
10192
10071
  );
10193
- const formatLabel = (0, import_react71.useCallback)(
10072
+ const formatLabel = (0, import_react70.useCallback)(
10194
10073
  (key) => key.split(/(?=[A-Z])|_/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" "),
10195
10074
  []
10196
10075
  );
@@ -10264,7 +10143,7 @@ var BaseUserProfile = ({
10264
10143
  }
10265
10144
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
10266
10145
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: styles.label, children: label }),
10267
- /* @__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)(
10268
10147
  Button_default,
10269
10148
  {
10270
10149
  onClick: onStartEdit,
@@ -10334,7 +10213,7 @@ var BaseUserProfile = ({
10334
10213
  }
10335
10214
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
10336
10215
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: styles.label, children: label }),
10337
- /* @__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)(
10338
10217
  Button_default,
10339
10218
  {
10340
10219
  onClick: onStartEdit,
@@ -10396,7 +10275,7 @@ var BaseUserProfile = ({
10396
10275
  if (!profile && !flattenedProfile) {
10397
10276
  return fallback;
10398
10277
  }
10399
- const containerClasses = (0, import_css47.cx)(
10278
+ const containerClasses = (0, import_css46.cx)(
10400
10279
  styles.root,
10401
10280
  cardLayout ? styles.card : "",
10402
10281
  (0, import_browser67.withVendorCSSClassPrefix)("user-profile"),
@@ -10417,7 +10296,7 @@ var BaseUserProfile = ({
10417
10296
  ] }, key)) });
10418
10297
  };
10419
10298
  const profileContent = /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Card_default, { className: containerClasses, children: [
10420
- 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: [
10421
10300
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Alert_default.Title, { children: t("errors.title") || "Error" }),
10422
10301
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Alert_default.Description, { children: error })
10423
10302
  ] }),
@@ -10462,7 +10341,7 @@ var BaseUserProfile = ({
10462
10341
  var BaseUserProfile_default = BaseUserProfile;
10463
10342
 
10464
10343
  // src/components/presentation/UserProfile/UserProfile.tsx
10465
- var import_react72 = require("react");
10344
+ var import_react71 = require("react");
10466
10345
 
10467
10346
  // src/api/updateMeProfile.ts
10468
10347
  var import_browser68 = require("@asgardeo/browser");
@@ -10497,7 +10376,7 @@ var UserProfile3 = ({ ...rest }) => {
10497
10376
  const { baseUrl, isLoading } = useAsgardeo_default();
10498
10377
  const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
10499
10378
  const { t } = useTranslation_default();
10500
- const [error, setError] = (0, import_react72.useState)(null);
10379
+ const [error, setError] = (0, import_react71.useState)(null);
10501
10380
  const handleProfileUpdate = async (payload) => {
10502
10381
  setError(null);
10503
10382
  try {
@@ -10527,16 +10406,16 @@ var UserProfile_default = UserProfile3;
10527
10406
 
10528
10407
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
10529
10408
  var import_browser70 = require("@asgardeo/browser");
10530
- var import_react74 = require("@floating-ui/react");
10531
- var import_css49 = require("@emotion/css");
10532
- 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");
10533
10412
 
10534
10413
  // src/components/presentation/UserDropdown/BaseUserDropdown.styles.ts
10535
- var import_css48 = require("@emotion/css");
10536
- var import_react73 = require("react");
10537
- var useStyles23 = (theme, colorScheme) => {
10538
- return (0, import_react73.useMemo)(() => {
10539
- 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`
10540
10419
  display: inline-flex;
10541
10420
  align-items: center;
10542
10421
  gap: calc(${theme.vars.spacing.unit} * 0.75);
@@ -10563,7 +10442,7 @@ var useStyles23 = (theme, colorScheme) => {
10563
10442
  box-shadow: none;
10564
10443
  }
10565
10444
  `;
10566
- const userName = import_css48.css`
10445
+ const userName = import_css47.css`
10567
10446
  color: ${theme.vars.colors.text.primary};
10568
10447
  font-size: 0.875rem;
10569
10448
  font-weight: 500;
@@ -10572,7 +10451,7 @@ var useStyles23 = (theme, colorScheme) => {
10572
10451
  text-overflow: ellipsis;
10573
10452
  white-space: nowrap;
10574
10453
  `;
10575
- const dropdownContent = import_css48.css`
10454
+ const dropdownContent = import_css47.css`
10576
10455
  background: ${theme.vars.colors.background.surface};
10577
10456
  border-radius: ${theme.vars.borderRadius.large};
10578
10457
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
@@ -10582,12 +10461,12 @@ var useStyles23 = (theme, colorScheme) => {
10582
10461
  z-index: 1000;
10583
10462
  overflow: hidden;
10584
10463
  `;
10585
- const dropdownMenu = import_css48.css`
10464
+ const dropdownMenu = import_css47.css`
10586
10465
  display: flex;
10587
10466
  flex-direction: column;
10588
10467
  width: 100%;
10589
10468
  `;
10590
- const menuItem = import_css48.css`
10469
+ const menuItem = import_css47.css`
10591
10470
  display: flex;
10592
10471
  align-items: center;
10593
10472
  justify-content: flex-start;
@@ -10615,7 +10494,7 @@ var useStyles23 = (theme, colorScheme) => {
10615
10494
  box-shadow: none;
10616
10495
  }
10617
10496
  `;
10618
- const menuItemAnchor = import_css48.css`
10497
+ const menuItemAnchor = import_css47.css`
10619
10498
  display: flex;
10620
10499
  align-items: center;
10621
10500
  justify-content: flex-start;
@@ -10636,18 +10515,18 @@ var useStyles23 = (theme, colorScheme) => {
10636
10515
  background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.05)"};
10637
10516
  }
10638
10517
  `;
10639
- const divider = import_css48.css`
10518
+ const divider = import_css47.css`
10640
10519
  margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
10641
10520
  border-bottom: 1px solid ${theme.vars.colors.border};
10642
10521
  `;
10643
- const dropdownHeader = import_css48.css`
10522
+ const dropdownHeader = import_css47.css`
10644
10523
  display: flex;
10645
10524
  align-items: center;
10646
10525
  gap: ${theme.vars.spacing.unit};
10647
10526
  padding: calc(${theme.vars.spacing.unit} * 1.5);
10648
10527
  border-bottom: 1px solid ${theme.vars.colors.border};
10649
10528
  `;
10650
- const headerInfo = import_css48.css`
10529
+ const headerInfo = import_css47.css`
10651
10530
  display: flex;
10652
10531
  flex-direction: column;
10653
10532
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -10657,7 +10536,7 @@ var useStyles23 = (theme, colorScheme) => {
10657
10536
  text-overflow: ellipsis;
10658
10537
  white-space: nowrap;
10659
10538
  `;
10660
- const headerName = import_css48.css`
10539
+ const headerName = import_css47.css`
10661
10540
  color: ${theme.vars.colors.text.primary};
10662
10541
  font-size: 1rem;
10663
10542
  font-weight: 500;
@@ -10666,7 +10545,7 @@ var useStyles23 = (theme, colorScheme) => {
10666
10545
  text-overflow: ellipsis;
10667
10546
  white-space: nowrap;
10668
10547
  `;
10669
- const headerEmail = import_css48.css`
10548
+ const headerEmail = import_css47.css`
10670
10549
  color: ${theme.vars.colors.text.secondary};
10671
10550
  font-size: 0.875rem;
10672
10551
  margin: 0;
@@ -10674,14 +10553,14 @@ var useStyles23 = (theme, colorScheme) => {
10674
10553
  text-overflow: ellipsis;
10675
10554
  white-space: nowrap;
10676
10555
  `;
10677
- const loadingContainer = import_css48.css`
10556
+ const loadingContainer = import_css47.css`
10678
10557
  display: flex;
10679
10558
  align-items: center;
10680
10559
  justify-content: center;
10681
10560
  min-height: 80px;
10682
10561
  gap: ${theme.vars.spacing.unit};
10683
10562
  `;
10684
- const loadingText = import_css48.css`
10563
+ const loadingText = import_css47.css`
10685
10564
  color: ${theme.vars.colors.text.secondary};
10686
10565
  font-size: 0.875rem;
10687
10566
  `;
@@ -10713,7 +10592,7 @@ var useStyles23 = (theme, colorScheme) => {
10713
10592
  colorScheme
10714
10593
  ]);
10715
10594
  };
10716
- var BaseUserDropdown_styles_default = useStyles23;
10595
+ var BaseUserDropdown_styles_default = useStyles22;
10717
10596
 
10718
10597
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
10719
10598
  var import_jsx_runtime82 = require("react/jsx-runtime");
@@ -10732,19 +10611,19 @@ var BaseUserDropdown = ({
10732
10611
  }) => {
10733
10612
  const { theme, colorScheme } = useTheme_default();
10734
10613
  const styles = BaseUserDropdown_styles_default(theme, colorScheme);
10735
- const [isOpen, setIsOpen] = (0, import_react75.useState)(false);
10736
- const [hoveredItemIndex, setHoveredItemIndex] = (0, import_react75.useState)(null);
10737
- 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)({
10738
10617
  open: isOpen,
10739
10618
  onOpenChange: setIsOpen,
10740
10619
  placement: "bottom-end",
10741
- middleware: [(0, import_react74.offset)(5), (0, import_react74.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react74.shift)({ padding: 5 })],
10742
- 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
10743
10622
  });
10744
- const click = (0, import_react74.useClick)(context);
10745
- const dismiss = (0, import_react74.useDismiss)(context);
10746
- const role = (0, import_react74.useRole)(context);
10747
- 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]);
10748
10627
  const defaultAttributeMappings = {
10749
10628
  picture: ["profile", "profileUrl", "picture", "URL"],
10750
10629
  firstName: ["name.givenName", "given_name"],
@@ -10787,12 +10666,12 @@ var BaseUserDropdown = ({
10787
10666
  }
10788
10667
  allMenuItems.push(...defaultMenuItems);
10789
10668
  }
10790
- 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: [
10791
10670
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
10792
10671
  Button_default,
10793
10672
  {
10794
10673
  ref: refs.setReference,
10795
- 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),
10796
10675
  color: "tertiary",
10797
10676
  variant: "text",
10798
10677
  size: "medium",
@@ -10811,18 +10690,18 @@ var BaseUserDropdown = ({
10811
10690
  Typography_default,
10812
10691
  {
10813
10692
  variant: "body2",
10814
- 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),
10815
10694
  children: getDisplayName_default(mergedMappings, user)
10816
10695
  }
10817
10696
  )
10818
10697
  ]
10819
10698
  }
10820
10699
  ),
10821
- 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)(
10822
10701
  "div",
10823
10702
  {
10824
10703
  ref: refs.setFloating,
10825
- 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),
10826
10705
  style: {
10827
10706
  ...floatingStyles,
10828
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.
@@ -10831,7 +10710,7 @@ var BaseUserDropdown = ({
10831
10710
  },
10832
10711
  ...getFloatingProps(),
10833
10712
  children: [
10834
- /* @__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: [
10835
10714
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
10836
10715
  Avatar,
10837
10716
  {
@@ -10841,7 +10720,7 @@ var BaseUserDropdown = ({
10841
10720
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
10842
10721
  }
10843
10722
  ),
10844
- /* @__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: [
10845
10724
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
10846
10725
  Typography_default,
10847
10726
  {
@@ -10864,14 +10743,14 @@ var BaseUserDropdown = ({
10864
10743
  )
10865
10744
  ] })
10866
10745
  ] }),
10867
- /* @__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)(
10868
10747
  "a",
10869
10748
  {
10870
10749
  href: item.href,
10871
10750
  style: {
10872
10751
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
10873
10752
  },
10874
- 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),
10875
10754
  onMouseEnter: () => setHoveredItemIndex(index),
10876
10755
  onMouseLeave: () => setHoveredItemIndex(null),
10877
10756
  onFocus: () => setHoveredItemIndex(index),
@@ -10888,7 +10767,7 @@ var BaseUserDropdown = ({
10888
10767
  style: {
10889
10768
  backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
10890
10769
  },
10891
- 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),
10892
10771
  color: "tertiary",
10893
10772
  variant: "text",
10894
10773
  size: "small",
@@ -10906,7 +10785,7 @@ var BaseUserDropdown = ({
10906
10785
  var BaseUserDropdown_default = BaseUserDropdown;
10907
10786
 
10908
10787
  // src/components/presentation/UserDropdown/UserDropdown.tsx
10909
- var import_react76 = require("react");
10788
+ var import_react75 = require("react");
10910
10789
  var import_jsx_runtime83 = require("react/jsx-runtime");
10911
10790
  var UserDropdown = ({
10912
10791
  children,
@@ -10916,7 +10795,7 @@ var UserDropdown = ({
10916
10795
  ...rest
10917
10796
  }) => {
10918
10797
  const { user, isLoading, signOut } = useAsgardeo_default();
10919
- const [isProfileOpen, setIsProfileOpen] = (0, import_react76.useState)(false);
10798
+ const [isProfileOpen, setIsProfileOpen] = (0, import_react75.useState)(false);
10920
10799
  const handleManageProfile = () => {
10921
10800
  setIsProfileOpen(true);
10922
10801
  };
@@ -10973,9 +10852,9 @@ var UserDropdown = ({
10973
10852
  var UserDropdown_default = UserDropdown;
10974
10853
 
10975
10854
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
10976
- var import_react78 = require("@floating-ui/react");
10977
- var import_css51 = require("@emotion/css");
10978
- 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");
10979
10858
 
10980
10859
  // src/components/primitives/Icons/Building.tsx
10981
10860
  var import_jsx_runtime84 = require("react/jsx-runtime");
@@ -11013,15 +10892,15 @@ ChevronDown.displayName = "ChevronDown";
11013
10892
  var ChevronDown_default = ChevronDown;
11014
10893
 
11015
10894
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.ts
11016
- var import_css50 = require("@emotion/css");
11017
- var import_react77 = require("react");
11018
- var useStyles24 = (theme, colorScheme) => {
11019
- return (0, import_react77.useMemo)(() => {
11020
- 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`
11021
10900
  display: inline-block;
11022
10901
  position: relative;
11023
10902
  `;
11024
- const trigger = import_css50.css`
10903
+ const trigger = import_css49.css`
11025
10904
  display: inline-flex;
11026
10905
  align-items: center;
11027
10906
  gap: ${theme.vars.spacing.unit};
@@ -11041,7 +10920,7 @@ var useStyles24 = (theme, colorScheme) => {
11041
10920
  background-color: ${theme.vars.colors.background.surface};
11042
10921
  }
11043
10922
  `;
11044
- const triggerLabel = import_css50.css`
10923
+ const triggerLabel = import_css49.css`
11045
10924
  color: ${theme.vars.colors.text.primary};
11046
10925
  font-weight: 500;
11047
10926
  overflow: hidden;
@@ -11049,7 +10928,7 @@ var useStyles24 = (theme, colorScheme) => {
11049
10928
  white-space: nowrap;
11050
10929
  flex: 1;
11051
10930
  `;
11052
- const content = import_css50.css`
10931
+ const content = import_css49.css`
11053
10932
  min-width: 280px;
11054
10933
  max-width: 400px;
11055
10934
  background-color: ${theme.vars.colors.background.surface};
@@ -11059,13 +10938,13 @@ var useStyles24 = (theme, colorScheme) => {
11059
10938
  outline: none;
11060
10939
  z-index: 1000;
11061
10940
  `;
11062
- const header = import_css50.css`
10941
+ const header = import_css49.css`
11063
10942
  display: flex;
11064
10943
  align-items: center;
11065
10944
  gap: ${theme.vars.spacing.unit};
11066
10945
  padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 2);
11067
10946
  `;
11068
- const headerInfo = import_css50.css`
10947
+ const headerInfo = import_css49.css`
11069
10948
  display: flex;
11070
10949
  flex-direction: column;
11071
10950
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -11073,7 +10952,7 @@ var useStyles24 = (theme, colorScheme) => {
11073
10952
  min-width: 0;
11074
10953
  overflow: hidden;
11075
10954
  `;
11076
- const headerName = import_css50.css`
10955
+ const headerName = import_css49.css`
11077
10956
  color: ${theme.vars.colors.text.primary};
11078
10957
  font-size: 0.875rem;
11079
10958
  font-weight: 500;
@@ -11082,7 +10961,7 @@ var useStyles24 = (theme, colorScheme) => {
11082
10961
  text-overflow: ellipsis;
11083
10962
  white-space: nowrap;
11084
10963
  `;
11085
- const headerMeta = import_css50.css`
10964
+ const headerMeta = import_css49.css`
11086
10965
  color: ${theme.vars.colors.text.secondary};
11087
10966
  font-size: 0.75rem;
11088
10967
  margin: 0;
@@ -11090,7 +10969,7 @@ var useStyles24 = (theme, colorScheme) => {
11090
10969
  text-overflow: ellipsis;
11091
10970
  white-space: nowrap;
11092
10971
  `;
11093
- const headerRole = import_css50.css`
10972
+ const headerRole = import_css49.css`
11094
10973
  color: ${theme.vars.colors.text.secondary};
11095
10974
  font-size: 0.75rem;
11096
10975
  margin: 0;
@@ -11099,16 +10978,16 @@ var useStyles24 = (theme, colorScheme) => {
11099
10978
  white-space: nowrap;
11100
10979
  text-transform: capitalize;
11101
10980
  `;
11102
- const manageButton = import_css50.css`
10981
+ const manageButton = import_css49.css`
11103
10982
  min-width: auto;
11104
10983
  margin-inline-start: auto;
11105
10984
  `;
11106
- const menu = import_css50.css`
10985
+ const menu = import_css49.css`
11107
10986
  display: flex;
11108
10987
  flex-direction: column;
11109
10988
  width: 100%;
11110
10989
  `;
11111
- const menuItem = import_css50.css`
10990
+ const menuItem = import_css49.css`
11112
10991
  display: flex;
11113
10992
  align-items: center;
11114
10993
  justify-content: flex-start;
@@ -11133,11 +11012,11 @@ var useStyles24 = (theme, colorScheme) => {
11133
11012
  background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.04)"};
11134
11013
  }
11135
11014
  `;
11136
- const menuDivider = import_css50.css`
11015
+ const menuDivider = import_css49.css`
11137
11016
  margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
11138
11017
  border-bottom: 1px solid ${theme.vars.colors.border};
11139
11018
  `;
11140
- const organizationInfo = import_css50.css`
11019
+ const organizationInfo = import_css49.css`
11141
11020
  display: flex;
11142
11021
  flex-direction: column;
11143
11022
  gap: calc(${theme.vars.spacing.unit} / 4);
@@ -11145,7 +11024,7 @@ var useStyles24 = (theme, colorScheme) => {
11145
11024
  min-width: 0;
11146
11025
  overflow: hidden;
11147
11026
  `;
11148
- const organizationName = import_css50.css`
11027
+ const organizationName = import_css49.css`
11149
11028
  color: ${theme.vars.colors.text.primary};
11150
11029
  font-size: 0.875rem;
11151
11030
  font-weight: 500;
@@ -11154,7 +11033,7 @@ var useStyles24 = (theme, colorScheme) => {
11154
11033
  text-overflow: ellipsis;
11155
11034
  white-space: nowrap;
11156
11035
  `;
11157
- const organizationMeta = import_css50.css`
11036
+ const organizationMeta = import_css49.css`
11158
11037
  color: ${theme.vars.colors.text.secondary};
11159
11038
  font-size: 0.75rem;
11160
11039
  margin: 0;
@@ -11162,40 +11041,40 @@ var useStyles24 = (theme, colorScheme) => {
11162
11041
  text-overflow: ellipsis;
11163
11042
  white-space: nowrap;
11164
11043
  `;
11165
- const loadingContainer = import_css50.css`
11044
+ const loadingContainer = import_css49.css`
11166
11045
  display: flex;
11167
11046
  align-items: center;
11168
11047
  justify-content: center;
11169
11048
  min-height: 80px;
11170
11049
  gap: ${theme.vars.spacing.unit};
11171
11050
  `;
11172
- const loadingText = import_css50.css`
11051
+ const loadingText = import_css49.css`
11173
11052
  color: ${theme.vars.colors.text.secondary};
11174
11053
  font-size: 0.875rem;
11175
11054
  `;
11176
- const errorContainer = import_css50.css`
11055
+ const errorContainer = import_css49.css`
11177
11056
  display: flex;
11178
11057
  align-items: center;
11179
11058
  justify-content: center;
11180
11059
  min-height: 80px;
11181
11060
  padding: calc(${theme.vars.spacing.unit} * 2);
11182
11061
  `;
11183
- const errorText = import_css50.css`
11062
+ const errorText = import_css49.css`
11184
11063
  color: ${theme.vars.colors.text.secondary};
11185
11064
  font-size: 0.875rem;
11186
11065
  text-align: center;
11187
11066
  `;
11188
- const sectionHeader = import_css50.css`
11067
+ const sectionHeader = import_css49.css`
11189
11068
  text-transform: uppercase;
11190
11069
  letter-spacing: 0.05em;
11191
11070
  color: ${theme.vars.colors.text.secondary};
11192
11071
  `;
11193
- const sectionHeaderContainer = import_css50.css`
11072
+ const sectionHeaderContainer = import_css49.css`
11194
11073
  border-top: none;
11195
11074
  border-bottom: none;
11196
11075
  padding-bottom: calc(${theme.vars.spacing.unit} / 2);
11197
11076
  `;
11198
- const roleCapitalized = import_css50.css`
11077
+ const roleCapitalized = import_css49.css`
11199
11078
  text-transform: capitalize;
11200
11079
  `;
11201
11080
  return {
@@ -11235,7 +11114,7 @@ var useStyles24 = (theme, colorScheme) => {
11235
11114
  colorScheme
11236
11115
  ]);
11237
11116
  };
11238
- var BaseOrganizationSwitcher_styles_default = useStyles24;
11117
+ var BaseOrganizationSwitcher_styles_default = useStyles23;
11239
11118
 
11240
11119
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
11241
11120
  var import_jsx_runtime87 = require("react/jsx-runtime");
@@ -11261,21 +11140,21 @@ var BaseOrganizationSwitcher = ({
11261
11140
  }) => {
11262
11141
  const { theme, colorScheme, direction } = useTheme_default();
11263
11142
  const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
11264
- const [isOpen, setIsOpen] = (0, import_react79.useState)(false);
11265
- 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);
11266
11145
  const { t } = useTranslation_default();
11267
11146
  const isRTL = direction === "rtl";
11268
- const { refs, floatingStyles, context } = (0, import_react78.useFloating)({
11147
+ const { refs, floatingStyles, context } = (0, import_react77.useFloating)({
11269
11148
  open: isOpen,
11270
11149
  onOpenChange: setIsOpen,
11271
11150
  placement: "bottom-end",
11272
- middleware: [(0, import_react78.offset)(5), (0, import_react78.flip)({ fallbackAxisSideDirection: "end" }), (0, import_react78.shift)({ padding: 5 })],
11273
- 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
11274
11153
  });
11275
- const click = (0, import_react78.useClick)(context);
11276
- const dismiss = (0, import_react78.useDismiss)(context);
11277
- const role = (0, import_react78.useRole)(context);
11278
- 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]);
11279
11158
  if (fallback && !currentOrganization && !loading && organizations.length === 0) {
11280
11159
  return fallback;
11281
11160
  }
@@ -11303,28 +11182,28 @@ var BaseOrganizationSwitcher = ({
11303
11182
  alt: `${organization.name} avatar`
11304
11183
  }
11305
11184
  ),
11306
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.organizationInfo), children: [
11307
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { variant: "body2", fontWeight: "medium", className: (0, import_css51.cx)(styles.organizationName), children: organization.name }),
11308
- /* @__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: [
11309
11188
  showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { children: [
11310
11189
  organization.memberCount,
11311
11190
  " ",
11312
11191
  organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
11313
11192
  ] }),
11314
11193
  showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: " \u2022 " }),
11315
- 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 })
11316
11195
  ] })
11317
11196
  ] }),
11318
11197
  isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
11319
11198
  ] });
11320
- 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") }) });
11321
- 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 }) });
11322
- 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: [
11323
11202
  /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11324
11203
  Button_default,
11325
11204
  {
11326
11205
  ref: refs.setReference,
11327
- className: (0, import_css51.cx)(styles.trigger),
11206
+ className: (0, import_css50.cx)(styles.trigger),
11328
11207
  color: "tertiary",
11329
11208
  variant: "outline",
11330
11209
  size: "medium",
@@ -11341,17 +11220,17 @@ var BaseOrganizationSwitcher = ({
11341
11220
  alt: `${currentOrganization.name} avatar`
11342
11221
  }
11343
11222
  ),
11344
- 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 })
11345
11224
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11346
11225
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Building_default, { width: avatarSize, height: avatarSize }),
11347
- 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") })
11348
11227
  ] }),
11349
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" }) })
11350
11229
  ]
11351
11230
  }
11352
11231
  ),
11353
- 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: [
11354
- 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: [
11355
11234
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11356
11235
  Avatar,
11357
11236
  {
@@ -11362,9 +11241,9 @@ var BaseOrganizationSwitcher = ({
11362
11241
  alt: `${currentOrganization.name} avatar`
11363
11242
  }
11364
11243
  ),
11365
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_css51.cx)(styles.headerInfo), children: [
11366
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Typography_default, { noWrap: true, className: (0, import_css51.cx)(styles.headerName), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
11367
- /* @__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: [
11368
11247
  showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11369
11248
  Typography_default,
11370
11249
  {
@@ -11382,7 +11261,7 @@ var BaseOrganizationSwitcher = ({
11382
11261
  ]
11383
11262
  }
11384
11263
  ),
11385
- 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 })
11386
11265
  ] })
11387
11266
  ] }),
11388
11267
  onManageProfile && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
@@ -11393,7 +11272,7 @@ var BaseOrganizationSwitcher = ({
11393
11272
  variant: "outline",
11394
11273
  size: "small",
11395
11274
  "aria-label": "Manage Organization Profile",
11396
- className: (0, import_css51.cx)(styles.manageButton),
11275
+ className: (0, import_css50.cx)(styles.manageButton),
11397
11276
  endIcon: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11398
11277
  "svg",
11399
11278
  {
@@ -11418,21 +11297,21 @@ var BaseOrganizationSwitcher = ({
11418
11297
  organizations.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11419
11298
  "div",
11420
11299
  {
11421
- className: (0, import_css51.cx)(styles.header, styles.sectionHeaderContainer),
11300
+ className: (0, import_css50.cx)(styles.header, styles.sectionHeaderContainer),
11422
11301
  style: {
11423
11302
  borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
11424
11303
  },
11425
- 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") })
11426
11305
  }
11427
11306
  ),
11428
- /* @__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: [
11429
11308
  switchableOrganizations.map((organization) => {
11430
11309
  const isSelected = false;
11431
11310
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
11432
11311
  Button_default,
11433
11312
  {
11434
11313
  onClick: () => handleOrganizationSwitch(organization),
11435
- className: (0, import_css51.cx)(styles.menuItem),
11314
+ className: (0, import_css50.cx)(styles.menuItem),
11436
11315
  color: "tertiary",
11437
11316
  variant: "text",
11438
11317
  size: "small",
@@ -11447,7 +11326,7 @@ var BaseOrganizationSwitcher = ({
11447
11326
  );
11448
11327
  }),
11449
11328
  menuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
11450
- /* @__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) }),
11451
11330
  menuItems.map(
11452
11331
  (item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: item.href ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
11453
11332
  "a",
@@ -11456,7 +11335,7 @@ var BaseOrganizationSwitcher = ({
11456
11335
  style: {
11457
11336
  backgroundColor: hoveredItemIndex === switchableOrganizations.length + index ? theme.vars.colors.action?.hover : "transparent"
11458
11337
  },
11459
- className: (0, import_css51.cx)(styles.menuItem),
11338
+ className: (0, import_css50.cx)(styles.menuItem),
11460
11339
  onMouseEnter: () => setHoveredItemIndex(switchableOrganizations.length + index),
11461
11340
  onMouseLeave: () => setHoveredItemIndex(null),
11462
11341
  onFocus: () => setHoveredItemIndex(switchableOrganizations.length + index),
@@ -11473,7 +11352,7 @@ var BaseOrganizationSwitcher = ({
11473
11352
  style: {
11474
11353
  backgroundColor: hoveredItemIndex === switchableOrganizations.length + index ? theme.vars.colors.action?.hover : "transparent"
11475
11354
  },
11476
- className: (0, import_css51.cx)(styles.menuItem),
11355
+ className: (0, import_css50.cx)(styles.menuItem),
11477
11356
  color: "tertiary",
11478
11357
  variant: "text",
11479
11358
  size: "small",
@@ -11492,60 +11371,60 @@ var BaseOrganizationSwitcher = ({
11492
11371
  var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
11493
11372
 
11494
11373
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
11495
- var import_react92 = require("react");
11374
+ var import_react91 = require("react");
11496
11375
 
11497
11376
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
11498
- var import_react82 = require("react");
11499
-
11500
- // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11501
- var import_css53 = require("@emotion/css");
11502
11377
  var import_react81 = require("react");
11503
11378
 
11504
- // src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
11379
+ // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11505
11380
  var import_css52 = require("@emotion/css");
11506
11381
  var import_react80 = require("react");
11507
- var useStyles25 = (theme, colorScheme) => {
11508
- return (0, import_react80.useMemo)(() => {
11509
- 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`
11510
11389
  padding: calc(${theme.vars.spacing.unit} * 4);
11511
11390
  min-width: 600px;
11512
11391
  margin: 0 auto;
11513
11392
  `;
11514
- const card = import_css52.css`
11393
+ const card = import_css51.css`
11515
11394
  background: ${theme.vars.colors.background.surface};
11516
11395
  border-radius: ${theme.vars.borderRadius.large};
11517
11396
  padding: calc(${theme.vars.spacing.unit} * 4);
11518
11397
  `;
11519
- const content = import_css52.css`
11398
+ const content = import_css51.css`
11520
11399
  display: flex;
11521
11400
  flex-direction: column;
11522
11401
  gap: calc(${theme.vars.spacing.unit} * 2);
11523
11402
  `;
11524
- const form = import_css52.css`
11403
+ const form = import_css51.css`
11525
11404
  display: flex;
11526
11405
  flex-direction: column;
11527
11406
  gap: calc(${theme.vars.spacing.unit} * 2);
11528
11407
  width: 100%;
11529
11408
  `;
11530
- const header = import_css52.css`
11409
+ const header = import_css51.css`
11531
11410
  display: flex;
11532
11411
  align-items: center;
11533
11412
  gap: calc(${theme.vars.spacing.unit} * 1.5);
11534
11413
  margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
11535
11414
  `;
11536
- const field = import_css52.css`
11415
+ const field = import_css51.css`
11537
11416
  display: flex;
11538
11417
  align-items: center;
11539
11418
  padding: ${theme.vars.spacing.unit} 0;
11540
11419
  border-bottom: 1px solid ${theme.vars.colors.border};
11541
11420
  min-height: 32px;
11542
11421
  `;
11543
- const fieldGroup = import_css52.css`
11422
+ const fieldGroup = import_css51.css`
11544
11423
  display: flex;
11545
11424
  flex-direction: column;
11546
11425
  gap: calc(${theme.vars.spacing.unit} * 0.5);
11547
11426
  `;
11548
- const textarea = import_css52.css`
11427
+ const textarea = import_css51.css`
11549
11428
  width: 100%;
11550
11429
  padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 1.5);
11551
11430
  border: 1px solid ${theme.vars.colors.border};
@@ -11567,28 +11446,28 @@ var useStyles25 = (theme, colorScheme) => {
11567
11446
  cursor: not-allowed;
11568
11447
  }
11569
11448
  `;
11570
- const textareaError = import_css52.css`
11449
+ const textareaError = import_css51.css`
11571
11450
  border-color: ${theme.vars.colors.error.main};
11572
11451
  `;
11573
- const input = import_css52.css``;
11574
- const avatarContainer = import_css52.css`
11452
+ const input = import_css51.css``;
11453
+ const avatarContainer = import_css51.css`
11575
11454
  align-items: flex-start;
11576
11455
  display: flex;
11577
11456
  gap: calc(${theme.vars.spacing.unit} * 2);
11578
11457
  margin-bottom: ${theme.vars.spacing.unit};
11579
11458
  `;
11580
- const actions = import_css52.css`
11459
+ const actions = import_css51.css`
11581
11460
  display: flex;
11582
11461
  gap: ${theme.vars.spacing.unit};
11583
11462
  justify-content: flex-end;
11584
11463
  padding-top: calc(${theme.vars.spacing.unit} * 2);
11585
11464
  `;
11586
- const infoContainer = import_css52.css`
11465
+ const infoContainer = import_css51.css`
11587
11466
  display: flex;
11588
11467
  flex-direction: column;
11589
11468
  gap: ${theme.vars.spacing.unit};
11590
11469
  `;
11591
- const value = import_css52.css`
11470
+ const value = import_css51.css`
11592
11471
  color: ${theme.vars.colors.text.primary};
11593
11472
  flex: 1;
11594
11473
  display: flex;
@@ -11598,10 +11477,10 @@ var useStyles25 = (theme, colorScheme) => {
11598
11477
  min-height: 32px;
11599
11478
  line-height: 32px;
11600
11479
  `;
11601
- const popup = import_css52.css`
11480
+ const popup = import_css51.css`
11602
11481
  padding: calc(${theme.vars.spacing.unit} * 2);
11603
11482
  `;
11604
- const errorAlert = import_css52.css`
11483
+ const errorAlert = import_css51.css`
11605
11484
  margin-bottom: calc(${theme.vars.spacing.unit} * 2);
11606
11485
  `;
11607
11486
  return {
@@ -11637,7 +11516,7 @@ var useStyles25 = (theme, colorScheme) => {
11637
11516
  colorScheme
11638
11517
  ]);
11639
11518
  };
11640
- var BaseCreateOrganization_styles_default = useStyles25;
11519
+ var BaseCreateOrganization_styles_default = useStyles24;
11641
11520
 
11642
11521
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
11643
11522
  var import_jsx_runtime88 = require("react/jsx-runtime");
@@ -11661,13 +11540,13 @@ var BaseCreateOrganization = ({
11661
11540
  const { theme, colorScheme } = useTheme_default();
11662
11541
  const styles = BaseCreateOrganization_styles_default(theme, colorScheme);
11663
11542
  const { t } = useTranslation_default();
11664
- const [formData, setFormData] = (0, import_react81.useState)({
11543
+ const [formData, setFormData] = (0, import_react80.useState)({
11665
11544
  description: "",
11666
11545
  handle: "",
11667
11546
  name: "",
11668
11547
  ...initialValues
11669
11548
  });
11670
- const [formErrors, setFormErrors] = (0, import_react81.useState)({});
11549
+ const [formErrors, setFormErrors] = (0, import_react80.useState)({});
11671
11550
  const validateForm = () => {
11672
11551
  const errors = {};
11673
11552
  if (!formData.name.trim()) {
@@ -11727,13 +11606,13 @@ var BaseCreateOrganization = ({
11727
11606
  console.error("Form submission error:", submitError);
11728
11607
  }
11729
11608
  };
11730
- 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: [
11731
- /* @__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: [
11732
11611
  error && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Alert_default, { variant: "error", className: styles.errorAlert, children: [
11733
11612
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Title, { children: "Error" }),
11734
11613
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Alert_default.Description, { children: error })
11735
11614
  ] }),
11736
- /* @__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)(
11737
11616
  TextField_default,
11738
11617
  {
11739
11618
  label: `${t("organization.create.name.label")}`,
@@ -11743,10 +11622,10 @@ var BaseCreateOrganization = ({
11743
11622
  disabled: loading,
11744
11623
  required: true,
11745
11624
  error: formErrors.name,
11746
- className: (0, import_css53.cx)(styles.input)
11625
+ className: (0, import_css52.cx)(styles.input)
11747
11626
  }
11748
11627
  ) }),
11749
- /* @__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)(
11750
11629
  TextField_default,
11751
11630
  {
11752
11631
  label: `${t("organization.create.handle.label") || "Organization Handle"}`,
@@ -11757,15 +11636,15 @@ var BaseCreateOrganization = ({
11757
11636
  required: true,
11758
11637
  error: formErrors.handle,
11759
11638
  helperText: "This will be your organization's unique identifier. Only lowercase letters, numbers, and hyphens are allowed.",
11760
- className: (0, import_css53.cx)(styles.input)
11639
+ className: (0, import_css52.cx)(styles.input)
11761
11640
  }
11762
11641
  ) }),
11763
- /* @__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: [
11764
11643
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(InputLabel_default, { required: true, children: t("organization.create.description.label") }),
11765
11644
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
11766
11645
  "textarea",
11767
11646
  {
11768
- className: (0, import_css53.cx)(styles.textarea, formErrors.description && styles.textareaError),
11647
+ className: (0, import_css52.cx)(styles.textarea, formErrors.description && styles.textareaError),
11769
11648
  placeholder: t("organization.create.description.placeholder"),
11770
11649
  value: formData.description,
11771
11650
  onChange: (e) => handleInputChange("description", e.target.value),
@@ -11776,7 +11655,7 @@ var BaseCreateOrganization = ({
11776
11655
  ] }) }),
11777
11656
  renderAdditionalFields && renderAdditionalFields()
11778
11657
  ] }),
11779
- /* @__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: [
11780
11659
  onCancel && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.cancel") }),
11781
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") })
11782
11661
  ] })
@@ -11827,8 +11706,8 @@ var CreateOrganization = ({
11827
11706
  }) => {
11828
11707
  const { isSignedIn, baseUrl } = useAsgardeo_default();
11829
11708
  const { currentOrganization, revalidateMyOrganizations } = useOrganization_default();
11830
- const [loading, setLoading] = (0, import_react82.useState)(false);
11831
- 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);
11832
11711
  if (!isSignedIn && fallback) {
11833
11712
  return fallback;
11834
11713
  }
@@ -11881,43 +11760,43 @@ var CreateOrganization = ({
11881
11760
  };
11882
11761
 
11883
11762
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
11884
- var import_react87 = require("react");
11763
+ var import_react86 = require("react");
11885
11764
 
11886
11765
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
11887
11766
  var import_browser73 = require("@asgardeo/browser");
11888
- var import_css57 = require("@emotion/css");
11889
- var import_react86 = require("react");
11767
+ var import_css56 = require("@emotion/css");
11768
+ var import_react85 = require("react");
11890
11769
 
11891
11770
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
11892
11771
  var import_browser72 = require("@asgardeo/browser");
11893
- var import_css55 = require("@emotion/css");
11894
- var import_react84 = require("react");
11895
-
11896
- // src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
11897
11772
  var import_css54 = require("@emotion/css");
11898
11773
  var import_react83 = require("react");
11899
- var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11900
- return (0, import_react83.useMemo)(() => {
11901
- 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`
11902
11781
  display: flex;
11903
11782
  flex-direction: column;
11904
11783
  gap: calc(${theme.vars.spacing.unit} / 2);
11905
11784
  `;
11906
- const label = import_css54.css`
11785
+ const label = import_css53.css`
11907
11786
  font-size: 0.875rem;
11908
11787
  font-weight: 500;
11909
11788
  color: ${theme.vars.colors.text.primary};
11910
11789
  margin-bottom: calc(${theme.vars.spacing.unit} / 2);
11911
11790
  `;
11912
- const requiredIndicator = import_css54.css`
11791
+ const requiredIndicator = import_css53.css`
11913
11792
  color: ${theme.vars.colors.error.main};
11914
11793
  `;
11915
- const pairsList = import_css54.css`
11794
+ const pairsList = import_css53.css`
11916
11795
  display: flex;
11917
11796
  flex-direction: column;
11918
11797
  gap: calc(${theme.vars.spacing.unit} / 4);
11919
11798
  `;
11920
- const pairRow = import_css54.css`
11799
+ const pairRow = import_css53.css`
11921
11800
  display: flex;
11922
11801
  align-items: center;
11923
11802
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -11930,11 +11809,11 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11930
11809
  background-color: ${theme.vars.colors.action.hover};
11931
11810
  }
11932
11811
  `;
11933
- const pairInput = import_css54.css`
11812
+ const pairInput = import_css53.css`
11934
11813
  flex: 1;
11935
11814
  min-width: 0;
11936
11815
  `;
11937
- const addRow = import_css54.css`
11816
+ const addRow = import_css53.css`
11938
11817
  display: flex;
11939
11818
  align-items: center;
11940
11819
  gap: calc(${theme.vars.spacing.unit} / 2);
@@ -11944,7 +11823,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11944
11823
  background-color: transparent;
11945
11824
  margin-top: calc(${theme.vars.spacing.unit} / 2);
11946
11825
  `;
11947
- const removeButton = import_css54.css`
11826
+ const removeButton = import_css53.css`
11948
11827
  min-width: auto;
11949
11828
  width: 24px;
11950
11829
  height: 24px;
@@ -11967,7 +11846,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11967
11846
  opacity: 0.6;
11968
11847
  }
11969
11848
  `;
11970
- const addButton = import_css54.css`
11849
+ const addButton = import_css53.css`
11971
11850
  min-width: auto;
11972
11851
  width: 24px;
11973
11852
  height: 24px;
@@ -11990,39 +11869,39 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
11990
11869
  opacity: 0.6;
11991
11870
  }
11992
11871
  `;
11993
- const helperText = import_css54.css`
11872
+ const helperText = import_css53.css`
11994
11873
  font-size: 0.75rem;
11995
11874
  color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
11996
11875
  margin-top: calc(${theme.vars.spacing.unit} / 2);
11997
11876
  `;
11998
- const emptyState = import_css54.css`
11877
+ const emptyState = import_css53.css`
11999
11878
  padding: ${theme.vars.spacing.unit};
12000
11879
  text-align: center;
12001
11880
  color: ${theme.vars.colors.text.secondary};
12002
11881
  font-style: italic;
12003
11882
  font-size: 0.75rem;
12004
11883
  `;
12005
- const readOnlyPair = import_css54.css`
11884
+ const readOnlyPair = import_css53.css`
12006
11885
  display: flex;
12007
11886
  align-items: center;
12008
11887
  gap: calc(${theme.vars.spacing.unit} / 2);
12009
11888
  padding: calc(${theme.vars.spacing.unit} / 4) 0;
12010
11889
  min-height: 20px;
12011
11890
  `;
12012
- const readOnlyKey = import_css54.css`
11891
+ const readOnlyKey = import_css53.css`
12013
11892
  font-size: 0.75rem;
12014
11893
  font-weight: 500;
12015
11894
  color: ${theme.vars.colors.text.secondary};
12016
11895
  min-width: 80px;
12017
11896
  flex-shrink: 0;
12018
11897
  `;
12019
- const readOnlyValue = import_css54.css`
11898
+ const readOnlyValue = import_css53.css`
12020
11899
  font-size: 0.75rem;
12021
11900
  color: ${theme.vars.colors.text.primary};
12022
11901
  word-break: break-word;
12023
11902
  flex: 1;
12024
11903
  `;
12025
- const counterText = import_css54.css`
11904
+ const counterText = import_css53.css`
12026
11905
  font-size: 0.75rem;
12027
11906
  color: ${theme.vars.colors.text.secondary};
12028
11907
  margin-top: calc(${theme.vars.spacing.unit} / 2);
@@ -12046,7 +11925,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
12046
11925
  };
12047
11926
  }, [theme, colorScheme, disabled, readOnly, hasError]);
12048
11927
  };
12049
- var KeyValueInput_styles_default = useStyles26;
11928
+ var KeyValueInput_styles_default = useStyles25;
12050
11929
 
12051
11930
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
12052
11931
  var import_jsx_runtime90 = require("react/jsx-runtime");
@@ -12072,10 +11951,10 @@ var KeyValueInput = ({
12072
11951
  const { theme, colorScheme } = useTheme_default();
12073
11952
  const styles = KeyValueInput_styles_default(theme, colorScheme, disabled, readOnly, !!error);
12074
11953
  const initialPairs = Array.isArray(value) ? value : Object.entries(value).map(([key, val]) => ({ key, value: String(val) }));
12075
- const [pairs, setPairs] = (0, import_react84.useState)(initialPairs);
12076
- const [newKey, setNewKey] = (0, import_react84.useState)("");
12077
- const [newValue, setNewValue] = (0, import_react84.useState)("");
12078
- 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)(() => {
12079
11958
  if (!newKey.trim() || !newValue.trim()) return;
12080
11959
  if (maxPairs && pairs.length >= maxPairs) return;
12081
11960
  const newPair = {
@@ -12093,7 +11972,7 @@ var KeyValueInput = ({
12093
11972
  onAdd(newPair);
12094
11973
  }
12095
11974
  }, [newKey, newValue, pairs, maxPairs, onChange, onAdd]);
12096
- const handleRemovePair = (0, import_react84.useCallback)(
11975
+ const handleRemovePair = (0, import_react83.useCallback)(
12097
11976
  (index) => {
12098
11977
  const pairToRemove = pairs[index];
12099
11978
  const updatedPairs = pairs.filter((_, i) => i !== index);
@@ -12107,7 +11986,7 @@ var KeyValueInput = ({
12107
11986
  },
12108
11987
  [pairs, onChange, onRemove]
12109
11988
  );
12110
- const handleUpdatePair = (0, import_react84.useCallback)(
11989
+ const handleUpdatePair = (0, import_react83.useCallback)(
12111
11990
  (index, field, newVal) => {
12112
11991
  const updatedPairs = pairs.map((pair, i) => {
12113
11992
  if (i === index) {
@@ -12124,27 +12003,27 @@ var KeyValueInput = ({
12124
12003
  );
12125
12004
  const canAddMore = !maxPairs || pairs.length < maxPairs;
12126
12005
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
12127
- 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: [
12128
- 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: [
12129
12008
  label,
12130
12009
  required && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12131
12010
  "span",
12132
12011
  {
12133
- 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),
12134
12013
  children: " *"
12135
12014
  }
12136
12015
  )
12137
12016
  ] }),
12138
- /* @__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: [
12139
- 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)(
12140
12019
  "div",
12141
12020
  {
12142
- 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),
12143
12022
  children: [
12144
12023
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12145
12024
  "span",
12146
12025
  {
12147
- 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),
12148
12027
  children: [
12149
12028
  pair.key,
12150
12029
  ":"
@@ -12154,7 +12033,7 @@ var KeyValueInput = ({
12154
12033
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12155
12034
  "span",
12156
12035
  {
12157
- 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),
12158
12037
  children: pair.value
12159
12038
  }
12160
12039
  )
@@ -12164,7 +12043,7 @@ var KeyValueInput = ({
12164
12043
  )) : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
12165
12044
  "div",
12166
12045
  {
12167
- 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),
12168
12047
  children: [
12169
12048
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12170
12049
  TextField_default,
@@ -12173,7 +12052,7 @@ var KeyValueInput = ({
12173
12052
  value: pair.key,
12174
12053
  onChange: (e) => handleUpdatePair(index, "key", e.target.value),
12175
12054
  disabled: disabled || readOnly,
12176
- 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),
12177
12056
  "aria-label": `${keyLabel} ${index + 1}`
12178
12057
  }
12179
12058
  ),
@@ -12184,7 +12063,7 @@ var KeyValueInput = ({
12184
12063
  value: pair.value,
12185
12064
  onChange: (e) => handleUpdatePair(index, "value", e.target.value),
12186
12065
  disabled: disabled || readOnly,
12187
- 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),
12188
12067
  "aria-label": `${valueLabel} ${index + 1}`
12189
12068
  }
12190
12069
  ),
@@ -12194,7 +12073,7 @@ var KeyValueInput = ({
12194
12073
  type: "button",
12195
12074
  onClick: () => handleRemovePair(index),
12196
12075
  disabled,
12197
- 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),
12198
12077
  "aria-label": `${removeButtonText} ${pair.key}`,
12199
12078
  children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(X_default, { width: 16, height: 16 })
12200
12079
  }
@@ -12203,7 +12082,7 @@ var KeyValueInput = ({
12203
12082
  },
12204
12083
  `${pair.key}-${index}`
12205
12084
  )),
12206
- !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: [
12207
12086
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
12208
12087
  TextField_default,
12209
12088
  {
@@ -12211,7 +12090,7 @@ var KeyValueInput = ({
12211
12090
  value: newKey,
12212
12091
  onChange: (e) => setNewKey(e.target.value),
12213
12092
  disabled,
12214
- 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),
12215
12094
  "aria-label": "New key"
12216
12095
  }
12217
12096
  ),
@@ -12222,7 +12101,7 @@ var KeyValueInput = ({
12222
12101
  value: newValue,
12223
12102
  onChange: (e) => setNewValue(e.target.value),
12224
12103
  disabled,
12225
- 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),
12226
12105
  "aria-label": "New value",
12227
12106
  onKeyPress: (e) => {
12228
12107
  if (e.key === "Enter" && !isAddDisabled) {
@@ -12237,15 +12116,15 @@ var KeyValueInput = ({
12237
12116
  type: "button",
12238
12117
  onClick: handleAddPair,
12239
12118
  disabled: isAddDisabled,
12240
- 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),
12241
12120
  "aria-label": "Add new key-value pair",
12242
12121
  children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Plus_default, { width: 16, height: 16 })
12243
12122
  }
12244
12123
  )
12245
12124
  ] })
12246
12125
  ] }),
12247
- (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 }),
12248
- 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: [
12249
12128
  pairs.length,
12250
12129
  " of ",
12251
12130
  maxPairs,
@@ -12256,48 +12135,48 @@ var KeyValueInput = ({
12256
12135
  var KeyValueInput_default = KeyValueInput;
12257
12136
 
12258
12137
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.ts
12259
- var import_css56 = require("@emotion/css");
12260
- var import_react85 = require("react");
12261
- var useStyles27 = (theme, colorScheme) => {
12262
- 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)(() => {
12263
12142
  return {
12264
- root: import_css56.css`
12143
+ root: import_css55.css`
12265
12144
  padding: calc(${theme.vars.spacing.unit} * 4);
12266
12145
  min-width: 600px;
12267
12146
  margin: 0 auto;
12268
12147
  `,
12269
- card: import_css56.css`
12148
+ card: import_css55.css`
12270
12149
  background: ${theme.vars.colors.background.surface};
12271
12150
  border-radius: ${theme.vars.borderRadius.large};
12272
12151
  `,
12273
- header: import_css56.css`
12152
+ header: import_css55.css`
12274
12153
  display: flex;
12275
12154
  align-items: center;
12276
12155
  gap: calc(${theme.vars.spacing.unit} * 2);
12277
12156
  margin-bottom: calc(${theme.vars.spacing.unit} * 3);
12278
12157
  padding-bottom: calc(${theme.vars.spacing.unit} * 2);
12279
12158
  `,
12280
- orgInfo: import_css56.css`
12159
+ orgInfo: import_css55.css`
12281
12160
  flex: 1;
12282
12161
  `,
12283
- name: import_css56.css`
12162
+ name: import_css55.css`
12284
12163
  font-size: 1.5rem;
12285
12164
  font-weight: 600;
12286
12165
  margin: 0 0 8px 0;
12287
12166
  color: ${theme.vars.colors.text.primary};
12288
12167
  `,
12289
- handle: import_css56.css`
12168
+ handle: import_css55.css`
12290
12169
  font-size: 1rem;
12291
12170
  color: ${theme.vars.colors.text.secondary};
12292
12171
  margin: 0;
12293
12172
  font-family: monospace;
12294
12173
  `,
12295
- infoContainer: import_css56.css`
12174
+ infoContainer: import_css55.css`
12296
12175
  display: flex;
12297
12176
  flex-direction: column;
12298
12177
  gap: ${theme.vars.spacing.unit};
12299
12178
  `,
12300
- field: import_css56.css`
12179
+ field: import_css55.css`
12301
12180
  display: flex;
12302
12181
  align-items: flex-start;
12303
12182
  padding: calc(${theme.vars.spacing.unit} / 2) 0;
@@ -12305,21 +12184,21 @@ var useStyles27 = (theme, colorScheme) => {
12305
12184
  min-height: 28px;
12306
12185
  gap: ${theme.vars.spacing.unit};
12307
12186
  `,
12308
- fieldLast: import_css56.css`
12187
+ fieldLast: import_css55.css`
12309
12188
  border-bottom: none;
12310
12189
  `,
12311
- fieldContent: import_css56.css`
12190
+ fieldContent: import_css55.css`
12312
12191
  flex: 1;
12313
12192
  display: flex;
12314
12193
  align-items: center;
12315
12194
  gap: ${theme.vars.spacing.unit};
12316
12195
  `,
12317
- fieldActions: import_css56.css`
12196
+ fieldActions: import_css55.css`
12318
12197
  display: flex;
12319
12198
  align-items: center;
12320
12199
  gap: calc(${theme.vars.spacing.unit} / 2);
12321
12200
  `,
12322
- label: import_css56.css`
12201
+ label: import_css55.css`
12323
12202
  font-size: 0.875rem;
12324
12203
  font-weight: 500;
12325
12204
  color: ${theme.vars.colors.text.secondary};
@@ -12327,7 +12206,7 @@ var useStyles27 = (theme, colorScheme) => {
12327
12206
  flex-shrink: 0;
12328
12207
  line-height: 28px;
12329
12208
  `,
12330
- value: import_css56.css`
12209
+ value: import_css55.css`
12331
12210
  color: ${theme.vars.colors.text.primary};
12332
12211
  flex: 1;
12333
12212
  display: flex;
@@ -12338,11 +12217,11 @@ var useStyles27 = (theme, colorScheme) => {
12338
12217
  line-height: 28px;
12339
12218
  word-break: break-word;
12340
12219
  `,
12341
- valueEmpty: import_css56.css`
12220
+ valueEmpty: import_css55.css`
12342
12221
  font-style: italic;
12343
12222
  opacity: 0.7;
12344
12223
  `,
12345
- statusBadge: import_css56.css`
12224
+ statusBadge: import_css55.css`
12346
12225
  padding: calc(${theme.vars.spacing.unit} / 2) ${theme.vars.spacing.unit};
12347
12226
  border-radius: ${theme.vars.borderRadius.small};
12348
12227
  font-size: 0.75rem;
@@ -12351,12 +12230,12 @@ var useStyles27 = (theme, colorScheme) => {
12351
12230
  text-transform: uppercase;
12352
12231
  letter-spacing: 0.5px;
12353
12232
  `,
12354
- permissionsList: import_css56.css`
12233
+ permissionsList: import_css55.css`
12355
12234
  display: flex;
12356
12235
  flex-wrap: wrap;
12357
12236
  gap: calc(${theme.vars.spacing.unit} / 2);
12358
12237
  `,
12359
- permissionBadge: import_css56.css`
12238
+ permissionBadge: import_css55.css`
12360
12239
  padding: calc(${theme.vars.spacing.unit} / 4) ${theme.vars.spacing.unit};
12361
12240
  border-radius: ${theme.vars.borderRadius.small};
12362
12241
  font-size: 0.75rem;
@@ -12364,52 +12243,52 @@ var useStyles27 = (theme, colorScheme) => {
12364
12243
  color: ${theme.vars.colors.primary.contrastText};
12365
12244
  border: 1px solid ${theme.vars.colors.border};
12366
12245
  `,
12367
- attributesList: import_css56.css`
12246
+ attributesList: import_css55.css`
12368
12247
  display: flex;
12369
12248
  flex-direction: column;
12370
12249
  gap: calc(${theme.vars.spacing.unit} / 4);
12371
12250
  `,
12372
- attributeItem: import_css56.css`
12251
+ attributeItem: import_css55.css`
12373
12252
  display: flex;
12374
12253
  gap: ${theme.vars.spacing.unit};
12375
12254
  padding: calc(${theme.vars.spacing.unit} / 4) 0;
12376
12255
  align-items: center;
12377
12256
  `,
12378
- attributeKey: import_css56.css`
12257
+ attributeKey: import_css55.css`
12379
12258
  font-size: 0.75rem;
12380
12259
  font-weight: 500;
12381
12260
  color: ${theme.vars.colors.text.secondary};
12382
12261
  min-width: 80px;
12383
12262
  flex-shrink: 0;
12384
12263
  `,
12385
- attributeValue: import_css56.css`
12264
+ attributeValue: import_css55.css`
12386
12265
  font-size: 0.75rem;
12387
12266
  color: ${theme.vars.colors.text.primary};
12388
12267
  word-break: break-word;
12389
12268
  flex: 1;
12390
12269
  `,
12391
- popup: import_css56.css`
12270
+ popup: import_css55.css`
12392
12271
  padding: calc(${theme.vars.spacing.unit} * 2);
12393
12272
  `,
12394
- editButton: import_css56.css`
12273
+ editButton: import_css55.css`
12395
12274
  min-width: auto;
12396
12275
  padding: calc(${theme.vars.spacing.unit} / 2);
12397
12276
  min-height: auto;
12398
12277
  `,
12399
- placeholderButton: import_css56.css`
12278
+ placeholderButton: import_css55.css`
12400
12279
  font-style: italic;
12401
12280
  text-decoration: underline;
12402
12281
  opacity: 0.7;
12403
12282
  padding: 0;
12404
12283
  min-height: auto;
12405
12284
  `,
12406
- fieldInput: import_css56.css`
12285
+ fieldInput: import_css55.css`
12407
12286
  margin-bottom: 0;
12408
12287
  `
12409
12288
  };
12410
12289
  }, [theme, colorScheme]);
12411
12290
  };
12412
- var BaseOrganizationProfile_styles_default = useStyles27;
12291
+ var BaseOrganizationProfile_styles_default = useStyles26;
12413
12292
 
12414
12293
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
12415
12294
  var import_jsx_runtime91 = require("react/jsx-runtime");
@@ -12461,8 +12340,8 @@ var BaseOrganizationProfile = ({
12461
12340
  }) => {
12462
12341
  const { theme, colorScheme } = useTheme_default();
12463
12342
  const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
12464
- const [editedOrganization, setEditedOrganization] = (0, import_react86.useState)(organization);
12465
- const [editingFields, setEditingFields] = (0, import_react86.useState)({});
12343
+ const [editedOrganization, setEditedOrganization] = (0, import_react85.useState)(organization);
12344
+ const [editingFields, setEditingFields] = (0, import_react85.useState)({});
12466
12345
  const PencilIcon = () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12467
12346
  "svg",
12468
12347
  {
@@ -12477,13 +12356,13 @@ var BaseOrganizationProfile = ({
12477
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" })
12478
12357
  }
12479
12358
  );
12480
- const toggleFieldEdit = (0, import_react86.useCallback)((fieldName) => {
12359
+ const toggleFieldEdit = (0, import_react85.useCallback)((fieldName) => {
12481
12360
  setEditingFields((prev) => ({
12482
12361
  ...prev,
12483
12362
  [fieldName]: !prev[fieldName]
12484
12363
  }));
12485
12364
  }, []);
12486
- const getFieldPlaceholder = (0, import_react86.useCallback)((fieldKey) => {
12365
+ const getFieldPlaceholder = (0, import_react85.useCallback)((fieldKey) => {
12487
12366
  const fieldLabels = {
12488
12367
  name: "organization name",
12489
12368
  description: "organization description",
@@ -12494,7 +12373,7 @@ var BaseOrganizationProfile = ({
12494
12373
  const fieldLabel = fieldLabels[fieldKey] || fieldKey.toLowerCase();
12495
12374
  return `Enter ${fieldLabel}`;
12496
12375
  }, []);
12497
- const handleFieldSave = (0, import_react86.useCallback)(
12376
+ const handleFieldSave = (0, import_react85.useCallback)(
12498
12377
  (fieldKey) => {
12499
12378
  if (!onUpdate || !fieldKey) return;
12500
12379
  const fieldValue = editedOrganization && fieldKey && editedOrganization[fieldKey] !== void 0 ? editedOrganization[fieldKey] : organization && organization[fieldKey] !== void 0 ? organization[fieldKey] : "";
@@ -12506,7 +12385,7 @@ var BaseOrganizationProfile = ({
12506
12385
  },
12507
12386
  [editedOrganization, organization, onUpdate, toggleFieldEdit]
12508
12387
  );
12509
- const handleFieldCancel = (0, import_react86.useCallback)(
12388
+ const handleFieldCancel = (0, import_react85.useCallback)(
12510
12389
  (fieldKey) => {
12511
12390
  setEditedOrganization((prev) => ({
12512
12391
  ...prev,
@@ -12532,7 +12411,7 @@ var BaseOrganizationProfile = ({
12532
12411
  value: typeof fieldValue === "object" ? JSON.stringify(fieldValue) : String(fieldValue || ""),
12533
12412
  onChange: (e) => onEditValue(e.target ? e.target.value : e),
12534
12413
  placeholder: getFieldPlaceholder(key),
12535
- className: (0, import_css57.cx)(styles.fieldInput)
12414
+ className: (0, import_css56.cx)(styles.fieldInput)
12536
12415
  };
12537
12416
  let fieldInput;
12538
12417
  if (key === "attributes") {
@@ -12578,8 +12457,8 @@ var BaseOrganizationProfile = ({
12578
12457
  fieldInput = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TextField_default, { ...commonProps });
12579
12458
  }
12580
12459
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12581
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css57.cx)(styles.label), children: label }),
12582
- /* @__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 })
12583
12462
  ] });
12584
12463
  }
12585
12464
  const hasValue = value !== void 0 && value !== null && value !== "";
@@ -12593,8 +12472,8 @@ var BaseOrganizationProfile = ({
12593
12472
  displayValue = "-";
12594
12473
  }
12595
12474
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
12596
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: (0, import_css57.cx)(styles.label), children: label }),
12597
- /* @__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)(
12598
12477
  Button_default,
12599
12478
  {
12600
12479
  onClick: onStartEdit,
@@ -12602,7 +12481,7 @@ var BaseOrganizationProfile = ({
12602
12481
  color: "secondary",
12603
12482
  size: "small",
12604
12483
  title: "Click to edit",
12605
- className: (0, import_css57.cx)(styles.placeholderButton),
12484
+ className: (0, import_css56.cx)(styles.placeholderButton),
12606
12485
  children: displayValue
12607
12486
  }
12608
12487
  ) : displayValue })
@@ -12617,8 +12496,8 @@ var BaseOrganizationProfile = ({
12617
12496
  if (!shouldShow) {
12618
12497
  return null;
12619
12498
  }
12620
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css57.cx)(styles.field), children: [
12621
- /* @__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(
12622
12501
  field,
12623
12502
  isFieldEditing,
12624
12503
  (value) => {
@@ -12628,7 +12507,7 @@ var BaseOrganizationProfile = ({
12628
12507
  },
12629
12508
  () => toggleFieldEdit(field.key)
12630
12509
  ) }),
12631
- 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: [
12632
12511
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
12633
12512
  Button_default,
12634
12513
  {
@@ -12659,7 +12538,7 @@ var BaseOrganizationProfile = ({
12659
12538
  color: "secondary",
12660
12539
  size: "small",
12661
12540
  title: "Edit field",
12662
- className: (0, import_css57.cx)(styles.editButton),
12541
+ className: (0, import_css56.cx)(styles.editButton),
12663
12542
  children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PencilIcon, {})
12664
12543
  }
12665
12544
  ) })
@@ -12668,23 +12547,23 @@ var BaseOrganizationProfile = ({
12668
12547
  if (!organization) {
12669
12548
  return fallback;
12670
12549
  }
12671
- const profileContent = /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Card_default, { className: (0, import_css57.cx)(styles.root, cardLayout && styles.card, className), children: [
12672
- /* @__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: [
12673
12552
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
12674
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_css57.cx)(styles.orgInfo), children: [
12675
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { className: (0, import_css57.cx)(styles.name), children: organization.name }),
12676
- 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: [
12677
12556
  "@",
12678
12557
  organization.orgHandle
12679
12558
  ] })
12680
12559
  ] })
12681
12560
  ] }),
12682
- /* @__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)) })
12683
12562
  ] });
12684
12563
  if (mode === "popup") {
12685
12564
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Dialog_default.Content, { children: [
12686
12565
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Dialog_default.Heading, { children: title }),
12687
- /* @__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 })
12688
12567
  ] }) });
12689
12568
  }
12690
12569
  return profileContent;
@@ -12760,9 +12639,9 @@ var OrganizationProfile = ({
12760
12639
  }) => {
12761
12640
  const { baseUrl } = useAsgardeo_default();
12762
12641
  const { t } = useTranslation_default();
12763
- const [organization, setOrganization] = (0, import_react87.useState)(null);
12764
- const [loading, setLoading] = (0, import_react87.useState)(true);
12765
- 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);
12766
12645
  const fetchOrganization = async () => {
12767
12646
  if (!baseUrl || !organizationId) {
12768
12647
  setLoading(false);
@@ -12785,7 +12664,7 @@ var OrganizationProfile = ({
12785
12664
  setLoading(false);
12786
12665
  }
12787
12666
  };
12788
- (0, import_react87.useEffect)(() => {
12667
+ (0, import_react86.useEffect)(() => {
12789
12668
  fetchOrganization();
12790
12669
  }, [baseUrl, organizationId]);
12791
12670
  const handleOrganizationUpdate = async (payload) => {
@@ -12822,26 +12701,26 @@ var OrganizationProfile = ({
12822
12701
  var OrganizationProfile_default = OrganizationProfile;
12823
12702
 
12824
12703
  // src/components/presentation/OrganizationList/OrganizationList.tsx
12825
- var import_css61 = require("@emotion/css");
12826
- var import_react91 = require("react");
12704
+ var import_css60 = require("@emotion/css");
12705
+ var import_react90 = require("react");
12827
12706
 
12828
12707
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
12829
- var import_css59 = require("@emotion/css");
12830
- var import_react89 = require("react");
12831
-
12832
- // src/components/presentation/OrganizationList/BaseOrganizationList.styles.ts
12833
12708
  var import_css58 = require("@emotion/css");
12834
12709
  var import_react88 = require("react");
12835
- var useStyles28 = (theme, colorScheme) => {
12836
- return (0, import_react88.useMemo)(() => {
12837
- 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`
12838
12717
  padding: calc(${theme.vars.spacing.unit} * 4);
12839
12718
  min-width: 600px;
12840
12719
  margin: 0 auto;
12841
12720
  background: ${theme.vars.colors.background.surface};
12842
12721
  border-radius: ${theme.vars.borderRadius.large};
12843
12722
  `;
12844
- const header = import_css58.css`
12723
+ const header = import_css57.css`
12845
12724
  display: flex;
12846
12725
  align-items: center;
12847
12726
  justify-content: space-between;
@@ -12849,21 +12728,21 @@ var useStyles28 = (theme, colorScheme) => {
12849
12728
  padding-bottom: calc(${theme.vars.spacing.unit} * 2);
12850
12729
  border-bottom: 1px solid ${theme.vars.colors.border};
12851
12730
  `;
12852
- const headerInfo = import_css58.css`
12731
+ const headerInfo = import_css57.css`
12853
12732
  flex: 1;
12854
12733
  `;
12855
- const title = import_css58.css`
12734
+ const title = import_css57.css`
12856
12735
  font-size: 1.5rem;
12857
12736
  font-weight: 600;
12858
12737
  margin: 0 0 8px 0;
12859
12738
  color: ${theme.vars.colors.text.primary};
12860
12739
  `;
12861
- const subtitle = import_css58.css`
12740
+ const subtitle = import_css57.css`
12862
12741
  color: ${theme.vars.colors.text.secondary};
12863
12742
  font-size: 0.875rem;
12864
12743
  margin: 0;
12865
12744
  `;
12866
- const refreshButton = import_css58.css`
12745
+ const refreshButton = import_css57.css`
12867
12746
  background-color: ${theme.vars.colors.background.surface};
12868
12747
  border: 1px solid ${theme.vars.colors.border};
12869
12748
  border-radius: ${theme.vars.borderRadius.small};
@@ -12877,12 +12756,12 @@ var useStyles28 = (theme, colorScheme) => {
12877
12756
  border-color: ${theme.vars.colors.primary.main};
12878
12757
  }
12879
12758
  `;
12880
- const listContainer = import_css58.css`
12759
+ const listContainer = import_css57.css`
12881
12760
  display: flex;
12882
12761
  flex-direction: column;
12883
12762
  gap: calc(${theme.vars.spacing.unit} * 1.5);
12884
12763
  `;
12885
- const organizationItem = import_css58.css`
12764
+ const organizationItem = import_css57.css`
12886
12765
  border: 1px solid ${theme.vars.colors.border};
12887
12766
  border-radius: ${theme.vars.borderRadius.medium};
12888
12767
  display: flex;
@@ -12895,46 +12774,46 @@ var useStyles28 = (theme, colorScheme) => {
12895
12774
  box-shadow: 0 2px 8px ${theme.vars.colors.primary.main}20;
12896
12775
  }
12897
12776
  `;
12898
- const organizationContent = import_css58.css`
12777
+ const organizationContent = import_css57.css`
12899
12778
  display: flex;
12900
12779
  align-items: center;
12901
12780
  gap: calc(${theme.vars.spacing.unit} * 2);
12902
12781
  flex: 1;
12903
12782
  `;
12904
- const organizationInfo = import_css58.css`
12783
+ const organizationInfo = import_css57.css`
12905
12784
  flex: 1;
12906
12785
  `;
12907
- const organizationName = import_css58.css`
12786
+ const organizationName = import_css57.css`
12908
12787
  font-size: 1.125rem;
12909
12788
  font-weight: 600;
12910
12789
  margin: 0 0 4px 0;
12911
12790
  color: ${theme.vars.colors.text.primary};
12912
12791
  `;
12913
- const organizationHandle = import_css58.css`
12792
+ const organizationHandle = import_css57.css`
12914
12793
  color: ${theme.vars.colors.text.secondary};
12915
12794
  font-size: 0.875rem;
12916
12795
  margin: 0 0 4px 0;
12917
12796
  font-family: monospace;
12918
12797
  `;
12919
- const organizationStatus = import_css58.css`
12798
+ const organizationStatus = import_css57.css`
12920
12799
  color: ${theme.vars.colors.text.secondary};
12921
12800
  font-size: 0.875rem;
12922
12801
  margin: 0;
12923
12802
  `;
12924
- const statusText = import_css58.css`
12803
+ const statusText = import_css57.css`
12925
12804
  font-weight: 500;
12926
12805
  `;
12927
- const statusTextActive = import_css58.css`
12806
+ const statusTextActive = import_css57.css`
12928
12807
  color: ${theme.vars.colors.success.main};
12929
12808
  `;
12930
- const statusTextInactive = import_css58.css`
12809
+ const statusTextInactive = import_css57.css`
12931
12810
  color: ${theme.vars.colors.error.main};
12932
12811
  `;
12933
- const organizationActions = import_css58.css`
12812
+ const organizationActions = import_css57.css`
12934
12813
  display: flex;
12935
12814
  align-items: center;
12936
12815
  `;
12937
- const badge = import_css58.css`
12816
+ const badge = import_css57.css`
12938
12817
  border-radius: ${theme.vars.borderRadius.large};
12939
12818
  font-size: 0.75rem;
12940
12819
  font-weight: 500;
@@ -12942,15 +12821,15 @@ var useStyles28 = (theme, colorScheme) => {
12942
12821
  text-transform: uppercase;
12943
12822
  letter-spacing: 0.5px;
12944
12823
  `;
12945
- const badgeSuccess = import_css58.css`
12824
+ const badgeSuccess = import_css57.css`
12946
12825
  background-color: color-mix(in srgb, ${theme.vars.colors.success.main} 20%, transparent);
12947
12826
  color: ${theme.vars.colors.success.main};
12948
12827
  `;
12949
- const badgeError = import_css58.css`
12828
+ const badgeError = import_css57.css`
12950
12829
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
12951
12830
  color: ${theme.vars.colors.error.main};
12952
12831
  `;
12953
- const loadingContainer = import_css58.css`
12832
+ const loadingContainer = import_css57.css`
12954
12833
  padding: calc(${theme.vars.spacing.unit} * 4);
12955
12834
  text-align: center;
12956
12835
  display: flex;
@@ -12958,25 +12837,25 @@ var useStyles28 = (theme, colorScheme) => {
12958
12837
  align-items: center;
12959
12838
  gap: calc(${theme.vars.spacing.unit} * 2);
12960
12839
  `;
12961
- const loadingText = import_css58.css`
12840
+ const loadingText = import_css57.css`
12962
12841
  margin-top: ${theme.vars.spacing.unit};
12963
12842
  `;
12964
- const errorContainer = import_css58.css`
12843
+ const errorContainer = import_css57.css`
12965
12844
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
12966
12845
  border: 1px solid ${theme.vars.colors.error.main};
12967
12846
  border-radius: ${theme.vars.borderRadius.medium};
12968
12847
  color: ${theme.vars.colors.error.main};
12969
12848
  padding: calc(${theme.vars.spacing.unit} * 2);
12970
12849
  `;
12971
- const emptyContainer = import_css58.css`
12850
+ const emptyContainer = import_css57.css`
12972
12851
  padding: calc(${theme.vars.spacing.unit} * 4);
12973
12852
  text-align: center;
12974
12853
  `;
12975
- const emptyText = import_css58.css`
12854
+ const emptyText = import_css57.css`
12976
12855
  color: ${theme.vars.colors.text.secondary};
12977
12856
  font-size: 1rem;
12978
12857
  `;
12979
- const loadMoreButton = import_css58.css`
12858
+ const loadMoreButton = import_css57.css`
12980
12859
  background-color: ${theme.vars.colors.primary.main};
12981
12860
  border: none;
12982
12861
  border-radius: ${theme.vars.borderRadius.medium};
@@ -12997,13 +12876,13 @@ var useStyles28 = (theme, colorScheme) => {
12997
12876
  opacity: 0.6;
12998
12877
  }
12999
12878
  `;
13000
- const errorMargin = import_css58.css`
12879
+ const errorMargin = import_css57.css`
13001
12880
  margin-top: calc(${theme.vars.spacing.unit} * 2);
13002
12881
  `;
13003
- const loadMoreMargin = import_css58.css`
12882
+ const loadMoreMargin = import_css57.css`
13004
12883
  margin-top: calc(${theme.vars.spacing.unit} * 3);
13005
12884
  `;
13006
- const popupContent = import_css58.css`
12885
+ const popupContent = import_css57.css`
13007
12886
  padding: ${theme.vars.spacing.unit};
13008
12887
  `;
13009
12888
  return {
@@ -13053,27 +12932,27 @@ var useStyles28 = (theme, colorScheme) => {
13053
12932
  colorScheme
13054
12933
  ]);
13055
12934
  };
13056
- var BaseOrganizationList_styles_default = useStyles28;
12935
+ var BaseOrganizationList_styles_default = useStyles27;
13057
12936
 
13058
12937
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
13059
12938
  var import_jsx_runtime93 = require("react/jsx-runtime");
13060
12939
  var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => {
13061
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.organizationItem), children: [
13062
- /* @__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: [
13063
12942
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Avatar_default, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
13064
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.organizationInfo), children: [
13065
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Typography_default, { variant: "h6", className: (0, import_css59.cx)(styles.organizationName), children: organization.name }),
13066
- /* @__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: [
13067
12946
  "@",
13068
12947
  organization.orgHandle
13069
12948
  ] }),
13070
- 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: [
13071
12950
  t("organization.switcher.status.label"),
13072
12951
  " ",
13073
12952
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
13074
12953
  "span",
13075
12954
  {
13076
- className: (0, import_css59.cx)(
12955
+ className: (0, import_css58.cx)(
13077
12956
  styles.statusText,
13078
12957
  organization.status === "ACTIVE" ? styles.statusTextActive : styles.statusTextInactive
13079
12958
  ),
@@ -13083,7 +12962,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
13083
12962
  ] })
13084
12963
  ] })
13085
12964
  ] }),
13086
- 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)(
13087
12966
  Button_default,
13088
12967
  {
13089
12968
  onClick: (e) => {
@@ -13097,17 +12976,17 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
13097
12976
  ) })
13098
12977
  ] }, organization.id);
13099
12978
  };
13100
- 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: [
13101
12980
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Spinner_default, { size: "medium" }),
13102
- /* @__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") })
13103
12982
  ] });
13104
- 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: [
13105
12984
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("strong", { children: t("organization.switcher.error.prefix") }),
13106
12985
  " ",
13107
12986
  error
13108
12987
  ] }) });
13109
- 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") });
13110
- 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") }) });
13111
12990
  var BaseOrganizationList = ({
13112
12991
  className = "",
13113
12992
  allOrganizations,
@@ -13134,7 +13013,7 @@ var BaseOrganizationList = ({
13134
13013
  const { theme, colorScheme } = useTheme_default();
13135
13014
  const styles = BaseOrganizationList_styles_default(theme, colorScheme);
13136
13015
  const { t } = useTranslation_default();
13137
- const organizationsWithSwitchAccess = (0, import_react89.useMemo)(() => {
13016
+ const organizationsWithSwitchAccess = (0, import_react88.useMemo)(() => {
13138
13017
  if (!allOrganizations?.organizations) {
13139
13018
  return [];
13140
13019
  }
@@ -13150,53 +13029,53 @@ var BaseOrganizationList = ({
13150
13029
  const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, isLoading2) => defaultRenderLoadMore(onLoadMore, isLoading2, t, styles));
13151
13030
  const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
13152
13031
  if (isLoading && organizationsWithSwitchAccess?.length === 0) {
13153
- 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() });
13154
13033
  if (mode === "popup") {
13155
13034
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13156
13035
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13157
- /* @__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 })
13158
13037
  ] }) });
13159
13038
  }
13160
13039
  return loadingContent;
13161
13040
  }
13162
13041
  if (error && organizationsWithSwitchAccess?.length === 0) {
13163
- 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) });
13164
13043
  if (mode === "popup") {
13165
13044
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13166
13045
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13167
- /* @__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 })
13168
13047
  ] }) });
13169
13048
  }
13170
13049
  return errorContent;
13171
13050
  }
13172
13051
  if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
13173
- 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() });
13174
13053
  if (mode === "popup") {
13175
13054
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13176
13055
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13177
- /* @__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 })
13178
13057
  ] }) });
13179
13058
  }
13180
13059
  return emptyContent;
13181
13060
  }
13182
- const organizationListContent = /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.root, className), style, children: [
13183
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_css59.cx)(styles.header), children: [
13184
- /* @__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", {
13185
13064
  showing: organizationsWithSwitchAccess?.length,
13186
13065
  total: allOrganizations?.organizations?.length || 0
13187
13066
  }) }) }),
13188
- 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") })
13189
13068
  ] }),
13190
- /* @__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(
13191
13070
  (organization, index) => renderOrganizationWithStyles(organization, index)
13192
13071
  ) }),
13193
- error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_css59.cx)(styles.errorMargin), children: renderErrorWithStyles(error) }),
13194
- 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) })
13195
13074
  ] });
13196
13075
  if (mode === "popup") {
13197
13076
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Dialog_default.Content, { children: [
13198
13077
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Dialog_default.Heading, { children: title }),
13199
- /* @__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 })
13200
13079
  ] }) });
13201
13080
  }
13202
13081
  return organizationListContent;
@@ -13204,11 +13083,11 @@ var BaseOrganizationList = ({
13204
13083
  var BaseOrganizationList_default = BaseOrganizationList;
13205
13084
 
13206
13085
  // src/components/presentation/OrganizationList/OrganizationList.styles.ts
13207
- var import_css60 = require("@emotion/css");
13208
- var import_react90 = require("react");
13209
- var useStyles29 = (theme, colorScheme) => {
13210
- return (0, import_react90.useMemo)(() => {
13211
- 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`
13212
13091
  /* Container wrapper styles for OrganizationList component */
13213
13092
  width: 100%;
13214
13093
 
@@ -13239,11 +13118,11 @@ var useStyles29 = (theme, colorScheme) => {
13239
13118
  `;
13240
13119
  return {
13241
13120
  root: cssOrganizationListWrapper,
13242
- container: import_css60.css`
13121
+ container: import_css59.css`
13243
13122
  position: relative;
13244
13123
  width: 100%;
13245
13124
  `,
13246
- errorState: import_css60.css`
13125
+ errorState: import_css59.css`
13247
13126
  padding: calc(${theme.vars.spacing.unit} * 2);
13248
13127
  background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 10%, transparent);
13249
13128
  border: 1px solid ${theme.vars.colors.error.main};
@@ -13251,7 +13130,7 @@ var useStyles29 = (theme, colorScheme) => {
13251
13130
  color: ${theme.vars.colors.error.main};
13252
13131
  text-align: center;
13253
13132
  `,
13254
- loadingOverlay: import_css60.css`
13133
+ loadingOverlay: import_css59.css`
13255
13134
  position: absolute;
13256
13135
  inset: 0;
13257
13136
  background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
@@ -13264,7 +13143,7 @@ var useStyles29 = (theme, colorScheme) => {
13264
13143
  };
13265
13144
  }, [theme, colorScheme]);
13266
13145
  };
13267
- var OrganizationList_styles_default = useStyles29;
13146
+ var OrganizationList_styles_default = useStyles28;
13268
13147
 
13269
13148
  // src/components/presentation/OrganizationList/OrganizationList.tsx
13270
13149
  var import_jsx_runtime94 = require("react/jsx-runtime");
@@ -13281,15 +13160,15 @@ var OrganizationList = ({
13281
13160
  const { theme, colorScheme } = useTheme_default();
13282
13161
  const styles = OrganizationList_styles_default(theme, colorScheme);
13283
13162
  const { getAllOrganizations: getAllOrganizations2, error, isLoading, myOrganizations } = useOrganization_default();
13284
- const [allOrganizations, setAllOrganizations] = (0, import_react91.useState)({
13163
+ const [allOrganizations, setAllOrganizations] = (0, import_react90.useState)({
13285
13164
  organizations: []
13286
13165
  });
13287
- (0, import_react91.useEffect)(() => {
13166
+ (0, import_react90.useEffect)(() => {
13288
13167
  (async () => {
13289
13168
  setAllOrganizations(await getAllOrganizations2());
13290
13169
  })();
13291
13170
  }, []);
13292
- 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)(
13293
13172
  BaseOrganizationList_default,
13294
13173
  {
13295
13174
  allOrganizations,
@@ -13348,9 +13227,9 @@ var OrganizationSwitcher = ({
13348
13227
  isLoading,
13349
13228
  error
13350
13229
  } = useOrganization_default();
13351
- const [isCreateOrgOpen, setIsCreateOrgOpen] = (0, import_react92.useState)(false);
13352
- const [isProfileOpen, setIsProfileOpen] = (0, import_react92.useState)(false);
13353
- 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);
13354
13233
  const { t } = useTranslation_default();
13355
13234
  if (!isSignedIn && fallback) {
13356
13235
  return fallback;