@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 +824 -945
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/presentation/SignIn/component-driven/BaseSignIn.d.ts +12 -4
- package/dist/components/presentation/SignIn/component-driven/SignInOptionFactory.d.ts +0 -1
- package/dist/components/presentation/SignIn/non-component-driven/BaseSignIn.d.ts +12 -0
- package/dist/components/presentation/SignUp/BaseSignUp.d.ts +12 -0
- package/dist/components/presentation/SignUp/BaseSignUp.styles.d.ts +0 -1
- package/dist/index.js +647 -768
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
- package/dist/components/presentation/SignIn/non-component-driven/BaseSignIn.styles.d.ts +0 -52
package/dist/index.js
CHANGED
|
@@ -5539,7 +5539,8 @@ var useStyles13 = (theme, colorScheme, variant, clickable) => {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
`;
|
|
5541
5541
|
const headerStyles = css13`
|
|
5542
|
-
padding:
|
|
5542
|
+
padding: 0 calc(${theme.vars.spacing.unit} * 2);
|
|
5543
|
+
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
5543
5544
|
display: flex;
|
|
5544
5545
|
flex-direction: column;
|
|
5545
5546
|
gap: ${theme.vars.spacing.unit};
|
|
@@ -5558,7 +5559,8 @@ var useStyles13 = (theme, colorScheme, variant, clickable) => {
|
|
|
5558
5559
|
margin-top: ${theme.vars.spacing.unit};
|
|
5559
5560
|
`;
|
|
5560
5561
|
const contentStyles = css13`
|
|
5561
|
-
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
5562
|
+
padding: 0 calc(${theme.vars.spacing.unit} * 2);
|
|
5563
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
5562
5564
|
flex: 1;
|
|
5563
5565
|
`;
|
|
5564
5566
|
const footerStyles = css13`
|
|
@@ -5963,7 +5965,7 @@ var Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
|
5963
5965
|
};
|
|
5964
5966
|
var Logo_default = Logo;
|
|
5965
5967
|
|
|
5966
|
-
// src/components/presentation/SignIn/
|
|
5968
|
+
// src/components/presentation/SignIn/BaseSignIn.styles.ts
|
|
5967
5969
|
import { css as css16 } from "@emotion/css";
|
|
5968
5970
|
import { useMemo as useMemo23 } from "react";
|
|
5969
5971
|
var useStyles16 = (theme, colorScheme) => {
|
|
@@ -5982,17 +5984,18 @@ var useStyles16 = (theme, colorScheme) => {
|
|
|
5982
5984
|
display: flex;
|
|
5983
5985
|
flex-direction: column;
|
|
5984
5986
|
align-items: center;
|
|
5985
|
-
margin-bottom: calc(${theme.vars.spacing.unit} *
|
|
5987
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
5986
5988
|
`;
|
|
5987
5989
|
const header = css16`
|
|
5988
5990
|
gap: 0;
|
|
5991
|
+
align-items: center;
|
|
5989
5992
|
`;
|
|
5990
5993
|
const title = css16`
|
|
5991
5994
|
margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
|
|
5992
5995
|
color: ${theme.vars.colors.text.primary};
|
|
5993
5996
|
`;
|
|
5994
5997
|
const subtitle = css16`
|
|
5995
|
-
margin-
|
|
5998
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
5996
5999
|
color: ${theme.vars.colors.text.secondary};
|
|
5997
6000
|
`;
|
|
5998
6001
|
const messagesContainer = css16`
|
|
@@ -6061,7 +6064,7 @@ var useStyles16 = (theme, colorScheme) => {
|
|
|
6061
6064
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
6062
6065
|
`;
|
|
6063
6066
|
const flowMessagesContainer = css16`
|
|
6064
|
-
margin-
|
|
6067
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
6065
6068
|
`;
|
|
6066
6069
|
const flowMessageItem = css16`
|
|
6067
6070
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
@@ -6107,12 +6110,12 @@ var BaseSignIn_styles_default = useStyles16;
|
|
|
6107
6110
|
// src/components/presentation/SignIn/non-component-driven/BaseSignIn.tsx
|
|
6108
6111
|
import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6109
6112
|
var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === ApplicationNativeAuthenticationConstants3.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && authenticator.metadata?.additionalData?.challengeData;
|
|
6110
|
-
var BaseSignIn = (
|
|
6113
|
+
var BaseSignIn = ({ showLogo = true, ...rest }) => {
|
|
6111
6114
|
const { theme } = useTheme_default();
|
|
6112
6115
|
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
6113
6116
|
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
6114
|
-
/* @__PURE__ */ jsx53("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx53(Logo_default, { size: "large" }) }),
|
|
6115
|
-
/* @__PURE__ */ jsx53(FlowProvider_default, { children: /* @__PURE__ */ jsx53(BaseSignInContent, { ...
|
|
6117
|
+
showLogo && /* @__PURE__ */ jsx53("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx53(Logo_default, { size: "large" }) }),
|
|
6118
|
+
/* @__PURE__ */ jsx53(FlowProvider_default, { children: /* @__PURE__ */ jsx53(BaseSignInContent, { showLogo, ...rest }) })
|
|
6116
6119
|
] });
|
|
6117
6120
|
};
|
|
6118
6121
|
var HIDDEN_AUTHENTICATORS = ["T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08"];
|
|
@@ -6130,7 +6133,9 @@ var BaseSignInContent = ({
|
|
|
6130
6133
|
errorClassName = "",
|
|
6131
6134
|
messageClassName = "",
|
|
6132
6135
|
size = "medium",
|
|
6133
|
-
variant = "outlined"
|
|
6136
|
+
variant = "outlined",
|
|
6137
|
+
showTitle = true,
|
|
6138
|
+
showSubtitle = true
|
|
6134
6139
|
}) => {
|
|
6135
6140
|
const { theme } = useTheme_default();
|
|
6136
6141
|
const { t } = useTranslation_default();
|
|
@@ -6671,9 +6676,11 @@ var BaseSignInContent = ({
|
|
|
6671
6676
|
);
|
|
6672
6677
|
const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
|
|
6673
6678
|
return /* @__PURE__ */ jsxs26(Card_default, { className: cx19(containerClasses, styles.card), variant, children: [
|
|
6674
|
-
/* @__PURE__ */ jsxs26(Card_default.Header, { className: styles.header, children: [
|
|
6675
|
-
/* @__PURE__ */ jsx53(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
|
|
6676
|
-
|
|
6679
|
+
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs26(Card_default.Header, { className: styles.header, children: [
|
|
6680
|
+
showTitle && /* @__PURE__ */ jsx53(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
|
|
6681
|
+
showSubtitle && /* @__PURE__ */ jsx53(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") })
|
|
6682
|
+
] }),
|
|
6683
|
+
/* @__PURE__ */ jsxs26(Card_default.Content, { children: [
|
|
6677
6684
|
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx53("div", { className: styles.flowMessagesContainer, children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ jsx53(
|
|
6678
6685
|
Alert_default,
|
|
6679
6686
|
{
|
|
@@ -6686,9 +6693,7 @@ var BaseSignInContent = ({
|
|
|
6686
6693
|
messages.length > 0 && /* @__PURE__ */ jsx53("div", { className: styles.messagesContainer, children: messages.map((message, index) => {
|
|
6687
6694
|
const variant2 = message.type.toLowerCase() === "error" ? "error" : message.type.toLowerCase() === "warning" ? "warning" : message.type.toLowerCase() === "success" ? "success" : "info";
|
|
6688
6695
|
return /* @__PURE__ */ jsx53(Alert_default, { variant: variant2, className: cx19(styles.messageItem, messageClasses), children: /* @__PURE__ */ jsx53(Alert_default.Description, { children: message.message }) }, index);
|
|
6689
|
-
}) })
|
|
6690
|
-
] }),
|
|
6691
|
-
/* @__PURE__ */ jsxs26(Card_default.Content, { children: [
|
|
6696
|
+
}) }),
|
|
6692
6697
|
error && /* @__PURE__ */ jsxs26(Alert_default, { variant: "error", className: cx19(styles.errorContainer, errorClasses), children: [
|
|
6693
6698
|
/* @__PURE__ */ jsx53(Alert_default.Title, { children: "Error" }),
|
|
6694
6699
|
/* @__PURE__ */ jsx53(Alert_default.Description, { children: error })
|
|
@@ -6818,147 +6823,6 @@ import { useState as useState15, useCallback as useCallback10 } from "react";
|
|
|
6818
6823
|
import { cx as cx20 } from "@emotion/css";
|
|
6819
6824
|
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix20 } from "@asgardeo/browser";
|
|
6820
6825
|
|
|
6821
|
-
// src/components/presentation/SignIn/BaseSignIn.styles.ts
|
|
6822
|
-
import { css as css17 } from "@emotion/css";
|
|
6823
|
-
import { useMemo as useMemo24 } from "react";
|
|
6824
|
-
var useStyles17 = (theme, colorScheme) => {
|
|
6825
|
-
return useMemo24(() => {
|
|
6826
|
-
const signIn = css17`
|
|
6827
|
-
min-width: 420px;
|
|
6828
|
-
margin: 0 auto;
|
|
6829
|
-
`;
|
|
6830
|
-
const card = css17`
|
|
6831
|
-
background: ${theme.vars.colors.background.surface};
|
|
6832
|
-
border-radius: ${theme.vars.borderRadius.large};
|
|
6833
|
-
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
6834
|
-
min-width: 420px;
|
|
6835
|
-
`;
|
|
6836
|
-
const logoContainer = css17`
|
|
6837
|
-
display: flex;
|
|
6838
|
-
flex-direction: column;
|
|
6839
|
-
align-items: center;
|
|
6840
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 3);
|
|
6841
|
-
`;
|
|
6842
|
-
const header = css17`
|
|
6843
|
-
gap: 0;
|
|
6844
|
-
`;
|
|
6845
|
-
const title = css17`
|
|
6846
|
-
margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
|
|
6847
|
-
color: ${theme.vars.colors.text.primary};
|
|
6848
|
-
`;
|
|
6849
|
-
const subtitle = css17`
|
|
6850
|
-
margin-top: calc(${theme.vars.spacing.unit} * 1);
|
|
6851
|
-
color: ${theme.vars.colors.text.secondary};
|
|
6852
|
-
`;
|
|
6853
|
-
const messagesContainer = css17`
|
|
6854
|
-
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
6855
|
-
`;
|
|
6856
|
-
const messageItem = css17`
|
|
6857
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
6858
|
-
`;
|
|
6859
|
-
const errorContainer = css17`
|
|
6860
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
6861
|
-
`;
|
|
6862
|
-
const contentContainer = css17`
|
|
6863
|
-
display: flex;
|
|
6864
|
-
flex-direction: column;
|
|
6865
|
-
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
6866
|
-
`;
|
|
6867
|
-
const loadingContainer = css17`
|
|
6868
|
-
display: flex;
|
|
6869
|
-
flex-direction: column;
|
|
6870
|
-
align-items: center;
|
|
6871
|
-
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
6872
|
-
`;
|
|
6873
|
-
const loadingText = css17`
|
|
6874
|
-
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
6875
|
-
color: ${theme.vars.colors.text.secondary};
|
|
6876
|
-
`;
|
|
6877
|
-
const divider = css17`
|
|
6878
|
-
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
6879
|
-
`;
|
|
6880
|
-
const centeredContainer = css17`
|
|
6881
|
-
text-align: center;
|
|
6882
|
-
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
6883
|
-
`;
|
|
6884
|
-
const passkeyContainer = css17`
|
|
6885
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
6886
|
-
`;
|
|
6887
|
-
const passkeyText = css17`
|
|
6888
|
-
margin-top: calc(${theme.vars.spacing.unit} * 1);
|
|
6889
|
-
color: ${theme.vars.colors.text.secondary};
|
|
6890
|
-
`;
|
|
6891
|
-
const form = css17`
|
|
6892
|
-
display: flex;
|
|
6893
|
-
flex-direction: column;
|
|
6894
|
-
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
6895
|
-
`;
|
|
6896
|
-
const formDivider = css17`
|
|
6897
|
-
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
6898
|
-
`;
|
|
6899
|
-
const authenticatorSection = css17`
|
|
6900
|
-
display: flex;
|
|
6901
|
-
flex-direction: column;
|
|
6902
|
-
gap: calc(${theme.vars.spacing.unit} * 1);
|
|
6903
|
-
`;
|
|
6904
|
-
const authenticatorItem = css17`
|
|
6905
|
-
width: 100%;
|
|
6906
|
-
`;
|
|
6907
|
-
const noAuthenticatorCard = css17`
|
|
6908
|
-
background: ${theme.vars.colors.background.surface};
|
|
6909
|
-
border-radius: ${theme.vars.borderRadius.large};
|
|
6910
|
-
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
6911
|
-
`;
|
|
6912
|
-
const errorAlert = css17`
|
|
6913
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
6914
|
-
`;
|
|
6915
|
-
const messagesAlert = css17`
|
|
6916
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
6917
|
-
`;
|
|
6918
|
-
const flowMessagesContainer = css17`
|
|
6919
|
-
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
6920
|
-
`;
|
|
6921
|
-
const flowMessageItem = css17`
|
|
6922
|
-
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
6923
|
-
`;
|
|
6924
|
-
return {
|
|
6925
|
-
signIn,
|
|
6926
|
-
card,
|
|
6927
|
-
logoContainer,
|
|
6928
|
-
header,
|
|
6929
|
-
title,
|
|
6930
|
-
subtitle,
|
|
6931
|
-
messagesContainer,
|
|
6932
|
-
messageItem,
|
|
6933
|
-
errorContainer,
|
|
6934
|
-
contentContainer,
|
|
6935
|
-
loadingContainer,
|
|
6936
|
-
loadingText,
|
|
6937
|
-
divider,
|
|
6938
|
-
centeredContainer,
|
|
6939
|
-
passkeyContainer,
|
|
6940
|
-
passkeyText,
|
|
6941
|
-
form,
|
|
6942
|
-
formDivider,
|
|
6943
|
-
authenticatorSection,
|
|
6944
|
-
authenticatorItem,
|
|
6945
|
-
noAuthenticatorCard,
|
|
6946
|
-
errorAlert,
|
|
6947
|
-
messagesAlert,
|
|
6948
|
-
flowMessagesContainer,
|
|
6949
|
-
flowMessageItem
|
|
6950
|
-
};
|
|
6951
|
-
}, [
|
|
6952
|
-
theme.vars.colors.background.surface,
|
|
6953
|
-
theme.vars.colors.text.primary,
|
|
6954
|
-
theme.vars.colors.text.secondary,
|
|
6955
|
-
theme.vars.borderRadius.large,
|
|
6956
|
-
theme.vars.spacing.unit,
|
|
6957
|
-
colorScheme
|
|
6958
|
-
]);
|
|
6959
|
-
};
|
|
6960
|
-
var BaseSignIn_styles_default2 = useStyles17;
|
|
6961
|
-
|
|
6962
6826
|
// src/components/presentation/SignIn/component-driven/SignInOptionFactory.tsx
|
|
6963
6827
|
import React from "react";
|
|
6964
6828
|
import { AsgardeoRuntimeError as AsgardeoRuntimeError7, FieldType as FieldType7 } from "@asgardeo/browser";
|
|
@@ -7129,67 +6993,223 @@ var renderSignInComponents = (components, formValues, touchedFields, formErrors,
|
|
|
7129
6993
|
)
|
|
7130
6994
|
).filter(Boolean);
|
|
7131
6995
|
|
|
7132
|
-
// src/components/presentation/
|
|
7133
|
-
import {
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
/* @__PURE__ */ jsx56(FlowProvider_default, { children: /* @__PURE__ */ jsx56(BaseSignInContent2, { ...props }) })
|
|
7140
|
-
] });
|
|
6996
|
+
// src/components/presentation/SignUp/transformer.ts
|
|
6997
|
+
import {
|
|
6998
|
+
EmbeddedFlowComponentType as EmbeddedFlowComponentType2
|
|
6999
|
+
} from "@asgardeo/browser";
|
|
7000
|
+
var generateId = (prefix) => {
|
|
7001
|
+
const suffix = Math.random().toString(36).substring(2, 6);
|
|
7002
|
+
return `${prefix}_${suffix}`;
|
|
7141
7003
|
};
|
|
7142
|
-
var
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
const
|
|
7162
|
-
const
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
processComponents(components2);
|
|
7188
|
-
return fields;
|
|
7004
|
+
var getInputVariant = (type, name) => {
|
|
7005
|
+
switch (type.toLowerCase()) {
|
|
7006
|
+
case "email":
|
|
7007
|
+
return "EMAIL";
|
|
7008
|
+
case "password":
|
|
7009
|
+
return "PASSWORD";
|
|
7010
|
+
default:
|
|
7011
|
+
return "TEXT";
|
|
7012
|
+
}
|
|
7013
|
+
};
|
|
7014
|
+
var getInputLabel = (name, type, t) => {
|
|
7015
|
+
const i18nKey = `elements.fields.${name}`;
|
|
7016
|
+
const label = t(i18nKey);
|
|
7017
|
+
if (label === i18nKey || !label) {
|
|
7018
|
+
return name.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
7019
|
+
}
|
|
7020
|
+
return label;
|
|
7021
|
+
};
|
|
7022
|
+
var getInputPlaceholder = (name, type, t) => {
|
|
7023
|
+
const label = getInputLabel(name, type, t);
|
|
7024
|
+
const placeholder = t("elements.fields.placeholder", { field: label });
|
|
7025
|
+
if (!placeholder || placeholder === "elements.fields.placeholder") {
|
|
7026
|
+
return `Enter your ${label}`;
|
|
7027
|
+
}
|
|
7028
|
+
return placeholder;
|
|
7029
|
+
};
|
|
7030
|
+
var convertSimpleInputToComponent = (input, t) => {
|
|
7031
|
+
let fieldType = input.type;
|
|
7032
|
+
if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
|
|
7033
|
+
fieldType = "password";
|
|
7034
|
+
}
|
|
7035
|
+
const variant = getInputVariant(fieldType, input.name);
|
|
7036
|
+
const label = getInputLabel(input.name, fieldType, t);
|
|
7037
|
+
const placeholder = getInputPlaceholder(input.name, fieldType, t);
|
|
7038
|
+
return {
|
|
7039
|
+
id: generateId("input"),
|
|
7040
|
+
type: EmbeddedFlowComponentType2.Input,
|
|
7041
|
+
variant,
|
|
7042
|
+
config: {
|
|
7043
|
+
type: input.type,
|
|
7044
|
+
label,
|
|
7045
|
+
placeholder,
|
|
7046
|
+
required: input.required,
|
|
7047
|
+
identifier: input.name,
|
|
7048
|
+
hint: ""
|
|
7189
7049
|
},
|
|
7190
|
-
[
|
|
7191
|
-
|
|
7192
|
-
|
|
7050
|
+
components: []
|
|
7051
|
+
};
|
|
7052
|
+
};
|
|
7053
|
+
var convertActionToComponent = (action, t) => {
|
|
7054
|
+
const normalizedId = action.id.replace(/_auth$/, "");
|
|
7055
|
+
const i18nKey = `elements.buttons.${normalizedId}`;
|
|
7056
|
+
let text = t(i18nKey);
|
|
7057
|
+
if (!text || text === i18nKey) {
|
|
7058
|
+
text = action.id.replace(/_/g, " ");
|
|
7059
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
7060
|
+
}
|
|
7061
|
+
return {
|
|
7062
|
+
id: generateId("action"),
|
|
7063
|
+
type: EmbeddedFlowComponentType2.Button,
|
|
7064
|
+
variant: "SECONDARY",
|
|
7065
|
+
config: {
|
|
7066
|
+
type: "button",
|
|
7067
|
+
text,
|
|
7068
|
+
actionId: action.id,
|
|
7069
|
+
actionType: action.type
|
|
7070
|
+
},
|
|
7071
|
+
components: []
|
|
7072
|
+
};
|
|
7073
|
+
};
|
|
7074
|
+
var transformSimpleToComponentDriven = (response, t) => {
|
|
7075
|
+
const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent(input, t)) || [];
|
|
7076
|
+
const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent(action, t)) || [];
|
|
7077
|
+
const submitButton = inputComponents.length > 0 ? {
|
|
7078
|
+
id: generateId("button"),
|
|
7079
|
+
type: EmbeddedFlowComponentType2.Button,
|
|
7080
|
+
variant: "PRIMARY",
|
|
7081
|
+
config: {
|
|
7082
|
+
type: "submit",
|
|
7083
|
+
text: t("elements.buttons.signUp")
|
|
7084
|
+
},
|
|
7085
|
+
components: []
|
|
7086
|
+
} : null;
|
|
7087
|
+
const formComponents = [];
|
|
7088
|
+
if (inputComponents.length > 0) {
|
|
7089
|
+
formComponents.push(...inputComponents);
|
|
7090
|
+
if (submitButton) formComponents.push(submitButton);
|
|
7091
|
+
}
|
|
7092
|
+
const result = [];
|
|
7093
|
+
if (formComponents.length > 0) {
|
|
7094
|
+
result.push({
|
|
7095
|
+
id: generateId("form"),
|
|
7096
|
+
type: EmbeddedFlowComponentType2.Form,
|
|
7097
|
+
config: {},
|
|
7098
|
+
components: formComponents
|
|
7099
|
+
});
|
|
7100
|
+
}
|
|
7101
|
+
if (actionComponents.length > 0) {
|
|
7102
|
+
result.push(...actionComponents);
|
|
7103
|
+
}
|
|
7104
|
+
return result;
|
|
7105
|
+
};
|
|
7106
|
+
var extractErrorMessage = (error, t) => {
|
|
7107
|
+
let errorMessage = t("errors.sign.up.flow.failure");
|
|
7108
|
+
if (error && typeof error === "object") {
|
|
7109
|
+
if (error.flowStatus === "ERROR" && error.failureReason) {
|
|
7110
|
+
errorMessage = error.failureReason;
|
|
7111
|
+
} else if (error.code && (error.message || error.description)) {
|
|
7112
|
+
errorMessage = error.description || error.message;
|
|
7113
|
+
} else if (error instanceof Error && error.name === "AsgardeoAPIError") {
|
|
7114
|
+
try {
|
|
7115
|
+
const errorResponse = JSON.parse(
|
|
7116
|
+
error.message
|
|
7117
|
+
);
|
|
7118
|
+
if (errorResponse.failureReason) {
|
|
7119
|
+
errorMessage = errorResponse.failureReason;
|
|
7120
|
+
} else if (errorResponse.description) {
|
|
7121
|
+
errorMessage = errorResponse.description;
|
|
7122
|
+
} else if (errorResponse.message) {
|
|
7123
|
+
errorMessage = errorResponse.message;
|
|
7124
|
+
} else {
|
|
7125
|
+
errorMessage = error.message;
|
|
7126
|
+
}
|
|
7127
|
+
} catch {
|
|
7128
|
+
errorMessage = error.message;
|
|
7129
|
+
}
|
|
7130
|
+
} else if (error.message) {
|
|
7131
|
+
errorMessage = error.message;
|
|
7132
|
+
}
|
|
7133
|
+
} else if (typeof error === "string") {
|
|
7134
|
+
errorMessage = error;
|
|
7135
|
+
}
|
|
7136
|
+
return errorMessage;
|
|
7137
|
+
};
|
|
7138
|
+
|
|
7139
|
+
// src/components/presentation/SignIn/component-driven/BaseSignIn.tsx
|
|
7140
|
+
import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7141
|
+
var BaseSignIn2 = ({ showLogo = true, ...rest }) => {
|
|
7142
|
+
const { theme } = useTheme_default();
|
|
7143
|
+
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
7144
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
7145
|
+
showLogo && /* @__PURE__ */ jsx56("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx56(Logo_default, { size: "large" }) }),
|
|
7146
|
+
/* @__PURE__ */ jsx56(FlowProvider_default, { children: /* @__PURE__ */ jsx56(BaseSignInContent2, { showLogo, ...rest }) })
|
|
7147
|
+
] });
|
|
7148
|
+
};
|
|
7149
|
+
var BaseSignInContent2 = ({
|
|
7150
|
+
components = [],
|
|
7151
|
+
onSubmit,
|
|
7152
|
+
onError,
|
|
7153
|
+
className = "",
|
|
7154
|
+
inputClassName = "",
|
|
7155
|
+
buttonClassName = "",
|
|
7156
|
+
errorClassName = "",
|
|
7157
|
+
messageClassName = "",
|
|
7158
|
+
size = "medium",
|
|
7159
|
+
variant = "outlined",
|
|
7160
|
+
isLoading: externalIsLoading,
|
|
7161
|
+
children,
|
|
7162
|
+
showTitle = true,
|
|
7163
|
+
showSubtitle = true,
|
|
7164
|
+
showLogo = true
|
|
7165
|
+
}) => {
|
|
7166
|
+
const { theme } = useTheme_default();
|
|
7167
|
+
const { t } = useTranslation_default();
|
|
7168
|
+
const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
|
|
7169
|
+
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
7170
|
+
const [isSubmitting, setIsSubmitting] = useState15(false);
|
|
7171
|
+
const isLoading = externalIsLoading || isSubmitting;
|
|
7172
|
+
const handleError = useCallback10(
|
|
7173
|
+
(error) => {
|
|
7174
|
+
const errorMessage = extractErrorMessage(error, t);
|
|
7175
|
+
clearMessages();
|
|
7176
|
+
addMessage({
|
|
7177
|
+
type: "error",
|
|
7178
|
+
message: errorMessage
|
|
7179
|
+
});
|
|
7180
|
+
},
|
|
7181
|
+
[t, addMessage, clearMessages]
|
|
7182
|
+
);
|
|
7183
|
+
const extractFormFields = useCallback10(
|
|
7184
|
+
(components2) => {
|
|
7185
|
+
const fields = [];
|
|
7186
|
+
const processComponents = (comps) => {
|
|
7187
|
+
comps.forEach((component) => {
|
|
7188
|
+
if (component.type === "INPUT" && component.config) {
|
|
7189
|
+
const identifier = component.config["identifier"] || component.id;
|
|
7190
|
+
fields.push({
|
|
7191
|
+
name: identifier,
|
|
7192
|
+
required: component.config["required"] || false,
|
|
7193
|
+
initialValue: "",
|
|
7194
|
+
validator: (value) => {
|
|
7195
|
+
if (component.config["required"] && (!value || value.trim() === "")) {
|
|
7196
|
+
return t("field.required");
|
|
7197
|
+
}
|
|
7198
|
+
return null;
|
|
7199
|
+
}
|
|
7200
|
+
});
|
|
7201
|
+
}
|
|
7202
|
+
if (component.components) {
|
|
7203
|
+
processComponents(component.components);
|
|
7204
|
+
}
|
|
7205
|
+
});
|
|
7206
|
+
};
|
|
7207
|
+
processComponents(components2);
|
|
7208
|
+
return fields;
|
|
7209
|
+
},
|
|
7210
|
+
[t]
|
|
7211
|
+
);
|
|
7212
|
+
const formFields = components ? extractFormFields(components) : [];
|
|
7193
7213
|
const form = useForm({
|
|
7194
7214
|
initialValues: {},
|
|
7195
7215
|
fields: formFields,
|
|
@@ -7220,7 +7240,7 @@ var BaseSignInContent2 = ({
|
|
|
7220
7240
|
return;
|
|
7221
7241
|
}
|
|
7222
7242
|
setIsSubmitting(true);
|
|
7223
|
-
|
|
7243
|
+
clearMessages();
|
|
7224
7244
|
try {
|
|
7225
7245
|
const filteredInputs = {};
|
|
7226
7246
|
if (data) {
|
|
@@ -7244,8 +7264,7 @@ var BaseSignInContent2 = ({
|
|
|
7244
7264
|
}
|
|
7245
7265
|
await onSubmit?.(payload, component);
|
|
7246
7266
|
} catch (err) {
|
|
7247
|
-
|
|
7248
|
-
setError(errorMessage);
|
|
7267
|
+
handleError(err);
|
|
7249
7268
|
onError?.(err);
|
|
7250
7269
|
} finally {
|
|
7251
7270
|
setIsSubmitting(false);
|
|
@@ -7288,7 +7307,6 @@ var BaseSignInContent2 = ({
|
|
|
7288
7307
|
handleInputChange,
|
|
7289
7308
|
{
|
|
7290
7309
|
buttonClassName: buttonClasses,
|
|
7291
|
-
error,
|
|
7292
7310
|
inputClassName: inputClasses,
|
|
7293
7311
|
onInputBlur: handleInputBlur,
|
|
7294
7312
|
onSubmit: handleSubmit,
|
|
@@ -7304,7 +7322,6 @@ var BaseSignInContent2 = ({
|
|
|
7304
7322
|
isLoading,
|
|
7305
7323
|
size,
|
|
7306
7324
|
variant,
|
|
7307
|
-
error,
|
|
7308
7325
|
inputClasses,
|
|
7309
7326
|
buttonClasses,
|
|
7310
7327
|
handleInputBlur,
|
|
@@ -7318,7 +7335,6 @@ var BaseSignInContent2 = ({
|
|
|
7318
7335
|
touched: touchedFields,
|
|
7319
7336
|
isValid: isFormValid,
|
|
7320
7337
|
isLoading,
|
|
7321
|
-
error,
|
|
7322
7338
|
components,
|
|
7323
7339
|
handleInputChange,
|
|
7324
7340
|
handleSubmit,
|
|
@@ -7336,9 +7352,11 @@ var BaseSignInContent2 = ({
|
|
|
7336
7352
|
return /* @__PURE__ */ jsx56(Card_default, { className: cx20(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx56(Card_default.Content, { children: /* @__PURE__ */ jsx56(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx56(Typography_default, { variant: "body1", children: t("errors.sign.in.components.not.available") }) }) }) });
|
|
7337
7353
|
}
|
|
7338
7354
|
return /* @__PURE__ */ jsxs27(Card_default, { className: cx20(containerClasses, styles.card), variant, children: [
|
|
7339
|
-
/* @__PURE__ */ jsxs27(Card_default.Header, { className: styles.header, children: [
|
|
7340
|
-
/* @__PURE__ */ jsx56(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
|
|
7341
|
-
/* @__PURE__ */ jsx56(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") })
|
|
7355
|
+
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs27(Card_default.Header, { className: styles.header, children: [
|
|
7356
|
+
showTitle && /* @__PURE__ */ jsx56(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signin.title") }),
|
|
7357
|
+
showSubtitle && /* @__PURE__ */ jsx56(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signin.subtitle") })
|
|
7358
|
+
] }),
|
|
7359
|
+
/* @__PURE__ */ jsxs27(Card_default.Content, { children: [
|
|
7342
7360
|
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx56("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx56(
|
|
7343
7361
|
Alert_default,
|
|
7344
7362
|
{
|
|
@@ -7347,13 +7365,7 @@ var BaseSignInContent2 = ({
|
|
|
7347
7365
|
children: /* @__PURE__ */ jsx56(Alert_default.Description, { children: message.message })
|
|
7348
7366
|
},
|
|
7349
7367
|
index
|
|
7350
|
-
)) })
|
|
7351
|
-
] }),
|
|
7352
|
-
/* @__PURE__ */ jsxs27(Card_default.Content, { children: [
|
|
7353
|
-
error && /* @__PURE__ */ jsxs27(Alert_default, { variant: "error", className: cx20(styles.errorContainer, errorClasses), children: [
|
|
7354
|
-
/* @__PURE__ */ jsx56(Alert_default.Title, { children: t("errors.title") }),
|
|
7355
|
-
/* @__PURE__ */ jsx56(Alert_default.Description, { children: error })
|
|
7356
|
-
] }),
|
|
7368
|
+
)) }),
|
|
7357
7369
|
/* @__PURE__ */ jsx56("div", { className: styles.contentContainer, children: components && renderComponents(components) })
|
|
7358
7370
|
] })
|
|
7359
7371
|
] });
|
|
@@ -7385,12 +7397,12 @@ import {
|
|
|
7385
7397
|
} from "@asgardeo/browser";
|
|
7386
7398
|
|
|
7387
7399
|
// src/components/presentation/SignIn/component-driven/transformer.ts
|
|
7388
|
-
import { EmbeddedFlowComponentType as
|
|
7389
|
-
var
|
|
7400
|
+
import { EmbeddedFlowComponentType as EmbeddedFlowComponentType3 } from "@asgardeo/browser";
|
|
7401
|
+
var generateId2 = (prefix) => {
|
|
7390
7402
|
const suffix = Math.random().toString(36).substring(2, 6);
|
|
7391
7403
|
return `${prefix}_${suffix}`;
|
|
7392
7404
|
};
|
|
7393
|
-
var
|
|
7405
|
+
var getInputVariant2 = (type, name) => {
|
|
7394
7406
|
switch (type.toLowerCase()) {
|
|
7395
7407
|
case "email":
|
|
7396
7408
|
return "EMAIL";
|
|
@@ -7400,7 +7412,7 @@ var getInputVariant = (type, name) => {
|
|
|
7400
7412
|
return "TEXT";
|
|
7401
7413
|
}
|
|
7402
7414
|
};
|
|
7403
|
-
var
|
|
7415
|
+
var getInputLabel2 = (name, type, t) => {
|
|
7404
7416
|
const i18nKey = `elements.fields.${name}`;
|
|
7405
7417
|
const label = t(i18nKey);
|
|
7406
7418
|
if (label === i18nKey || !label) {
|
|
@@ -7408,25 +7420,25 @@ var getInputLabel = (name, type, t) => {
|
|
|
7408
7420
|
}
|
|
7409
7421
|
return label;
|
|
7410
7422
|
};
|
|
7411
|
-
var
|
|
7412
|
-
const label =
|
|
7423
|
+
var getInputPlaceholder2 = (name, type, t) => {
|
|
7424
|
+
const label = getInputLabel2(name, type, t);
|
|
7413
7425
|
const placeholder = t("elements.fields.placeholder", { field: label });
|
|
7414
7426
|
if (!placeholder || placeholder === "elements.fields.placeholder") {
|
|
7415
7427
|
return `Enter your ${label}`;
|
|
7416
7428
|
}
|
|
7417
7429
|
return placeholder;
|
|
7418
7430
|
};
|
|
7419
|
-
var
|
|
7431
|
+
var convertSimpleInputToComponent2 = (input, t) => {
|
|
7420
7432
|
let fieldType = input.type;
|
|
7421
7433
|
if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
|
|
7422
7434
|
fieldType = "password";
|
|
7423
7435
|
}
|
|
7424
|
-
const variant =
|
|
7425
|
-
const label =
|
|
7426
|
-
const placeholder =
|
|
7436
|
+
const variant = getInputVariant2(fieldType, input.name);
|
|
7437
|
+
const label = getInputLabel2(input.name, fieldType, t);
|
|
7438
|
+
const placeholder = getInputPlaceholder2(input.name, fieldType, t);
|
|
7427
7439
|
return {
|
|
7428
|
-
id:
|
|
7429
|
-
type:
|
|
7440
|
+
id: generateId2("input"),
|
|
7441
|
+
type: EmbeddedFlowComponentType3.Input,
|
|
7430
7442
|
variant,
|
|
7431
7443
|
config: {
|
|
7432
7444
|
type: fieldType,
|
|
@@ -7439,7 +7451,7 @@ var convertSimpleInputToComponent = (input, t) => {
|
|
|
7439
7451
|
components: []
|
|
7440
7452
|
};
|
|
7441
7453
|
};
|
|
7442
|
-
var
|
|
7454
|
+
var convertActionToComponent2 = (action, t) => {
|
|
7443
7455
|
const normalizedId = action.id.replace(/_auth$/, "");
|
|
7444
7456
|
const i18nKey = `elements.buttons.${normalizedId}`;
|
|
7445
7457
|
let text = t(i18nKey);
|
|
@@ -7448,8 +7460,8 @@ var convertActionToComponent = (action, t) => {
|
|
|
7448
7460
|
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
7449
7461
|
}
|
|
7450
7462
|
return {
|
|
7451
|
-
id:
|
|
7452
|
-
type:
|
|
7463
|
+
id: generateId2("action"),
|
|
7464
|
+
type: EmbeddedFlowComponentType3.Button,
|
|
7453
7465
|
variant: "SECONDARY",
|
|
7454
7466
|
config: {
|
|
7455
7467
|
type: "button",
|
|
@@ -7460,12 +7472,12 @@ var convertActionToComponent = (action, t) => {
|
|
|
7460
7472
|
components: []
|
|
7461
7473
|
};
|
|
7462
7474
|
};
|
|
7463
|
-
var
|
|
7464
|
-
const inputComponents = response?.data?.inputs?.map((input) =>
|
|
7465
|
-
const actionComponents = response?.data?.actions?.map((action) =>
|
|
7475
|
+
var transformSimpleToComponentDriven2 = (response, t) => {
|
|
7476
|
+
const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
|
|
7477
|
+
const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
|
|
7466
7478
|
const submitButton = inputComponents.length > 0 ? {
|
|
7467
|
-
id:
|
|
7468
|
-
type:
|
|
7479
|
+
id: generateId2("button"),
|
|
7480
|
+
type: EmbeddedFlowComponentType3.Button,
|
|
7469
7481
|
variant: "PRIMARY",
|
|
7470
7482
|
config: {
|
|
7471
7483
|
type: "submit",
|
|
@@ -7481,8 +7493,8 @@ var transformSimpleToComponentDriven = (response, t) => {
|
|
|
7481
7493
|
const result = [];
|
|
7482
7494
|
if (formComponents.length > 0) {
|
|
7483
7495
|
result.push({
|
|
7484
|
-
id:
|
|
7485
|
-
type:
|
|
7496
|
+
id: generateId2("form"),
|
|
7497
|
+
type: EmbeddedFlowComponentType3.Form,
|
|
7486
7498
|
config: {},
|
|
7487
7499
|
components: formComponents
|
|
7488
7500
|
});
|
|
@@ -7495,7 +7507,7 @@ var transformSimpleToComponentDriven = (response, t) => {
|
|
|
7495
7507
|
var normalizeFlowResponse = (response, t) => {
|
|
7496
7508
|
return {
|
|
7497
7509
|
flowId: response.flowId,
|
|
7498
|
-
components:
|
|
7510
|
+
components: transformSimpleToComponentDriven2(response, t)
|
|
7499
7511
|
};
|
|
7500
7512
|
};
|
|
7501
7513
|
|
|
@@ -7675,6 +7687,9 @@ var SignIn2 = ({ className, size = "medium", children, ...rest }) => {
|
|
|
7675
7687
|
onSuccess: handleSuccess,
|
|
7676
7688
|
className,
|
|
7677
7689
|
size,
|
|
7690
|
+
showLogo: true,
|
|
7691
|
+
showSubtitle: true,
|
|
7692
|
+
showTitle: true,
|
|
7678
7693
|
...rest
|
|
7679
7694
|
}
|
|
7680
7695
|
);
|
|
@@ -7692,7 +7707,7 @@ import { cx as cx21 } from "@emotion/css";
|
|
|
7692
7707
|
import { useEffect as useEffect14, useState as useState17, useCallback as useCallback11, useRef as useRef5 } from "react";
|
|
7693
7708
|
|
|
7694
7709
|
// src/components/presentation/SignUp/SignUpOptionFactory.tsx
|
|
7695
|
-
import { EmbeddedFlowComponentType as
|
|
7710
|
+
import { EmbeddedFlowComponentType as EmbeddedFlowComponentType4 } from "@asgardeo/browser";
|
|
7696
7711
|
|
|
7697
7712
|
// src/components/adapters/CheckboxInput.tsx
|
|
7698
7713
|
import { FieldType as FieldType8 } from "@asgardeo/browser";
|
|
@@ -8097,352 +8112,207 @@ var TypographyComponent = ({ component }) => {
|
|
|
8097
8112
|
default:
|
|
8098
8113
|
typographyVariant = "body1";
|
|
8099
8114
|
}
|
|
8100
|
-
return /* @__PURE__ */ jsx65(
|
|
8101
|
-
Typography_default,
|
|
8102
|
-
{
|
|
8103
|
-
variant: typographyVariant,
|
|
8104
|
-
style: { marginBottom: `calc(${theme.vars.spacing.unit} * 2)` },
|
|
8105
|
-
children: text
|
|
8106
|
-
},
|
|
8107
|
-
component.id
|
|
8108
|
-
);
|
|
8109
|
-
};
|
|
8110
|
-
var Typography_default2 = TypographyComponent;
|
|
8111
|
-
|
|
8112
|
-
// src/components/presentation/SignUp/SignUpOptionFactory.tsx
|
|
8113
|
-
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
8114
|
-
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
8115
|
-
switch (component.type) {
|
|
8116
|
-
case EmbeddedFlowComponentType3.Typography:
|
|
8117
|
-
return /* @__PURE__ */ jsx66(Typography_default2, { component, onSubmit, ...rest });
|
|
8118
|
-
case EmbeddedFlowComponentType3.Input:
|
|
8119
|
-
const inputVariant = component.variant?.toUpperCase();
|
|
8120
|
-
const inputType = component.config["type"]?.toLowerCase();
|
|
8121
|
-
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
8122
|
-
return /* @__PURE__ */ jsx66(EmailInput_default, { component, onSubmit, ...rest });
|
|
8123
|
-
}
|
|
8124
|
-
if (inputVariant === "PASSWORD" || inputType === "password") {
|
|
8125
|
-
return /* @__PURE__ */ jsx66(PasswordInput_default, { component, onSubmit, ...rest });
|
|
8126
|
-
}
|
|
8127
|
-
if (inputVariant === "TELEPHONE" || inputType === "tel") {
|
|
8128
|
-
return /* @__PURE__ */ jsx66(TelephoneInput_default, { component, onSubmit, ...rest });
|
|
8129
|
-
}
|
|
8130
|
-
if (inputVariant === "NUMBER" || inputType === "number") {
|
|
8131
|
-
return /* @__PURE__ */ jsx66(NumberInput_default, { component, onSubmit, ...rest });
|
|
8132
|
-
}
|
|
8133
|
-
if (inputVariant === "DATE" || inputType === "date") {
|
|
8134
|
-
return /* @__PURE__ */ jsx66(DateInput_default, { component, onSubmit, ...rest });
|
|
8135
|
-
}
|
|
8136
|
-
if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
|
|
8137
|
-
return /* @__PURE__ */ jsx66(CheckboxInput_default, { component, onSubmit, ...rest });
|
|
8138
|
-
}
|
|
8139
|
-
return /* @__PURE__ */ jsx66(TextInput_default, { component, onSubmit, ...rest });
|
|
8140
|
-
case EmbeddedFlowComponentType3.Button: {
|
|
8141
|
-
const buttonVariant = component.variant?.toUpperCase();
|
|
8142
|
-
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
8143
|
-
if (buttonVariant === "SOCIAL") {
|
|
8144
|
-
if (buttonText.toLowerCase().includes("google")) {
|
|
8145
|
-
return /* @__PURE__ */ jsx66(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8146
|
-
}
|
|
8147
|
-
if (buttonText.toLowerCase().includes("github")) {
|
|
8148
|
-
return /* @__PURE__ */ jsx66(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8149
|
-
}
|
|
8150
|
-
if (buttonText.toLowerCase().includes("microsoft")) {
|
|
8151
|
-
return /* @__PURE__ */ jsx66(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8152
|
-
}
|
|
8153
|
-
if (buttonText.toLowerCase().includes("facebook")) {
|
|
8154
|
-
return /* @__PURE__ */ jsx66(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8155
|
-
}
|
|
8156
|
-
if (buttonText.toLowerCase().includes("linkedin")) {
|
|
8157
|
-
return /* @__PURE__ */ jsx66(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8158
|
-
}
|
|
8159
|
-
if (buttonText.toLowerCase().includes("ethereum")) {
|
|
8160
|
-
return /* @__PURE__ */ jsx66(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8161
|
-
}
|
|
8162
|
-
}
|
|
8163
|
-
return /* @__PURE__ */ jsx66(SubmitButton_default, { component, onSubmit, ...rest });
|
|
8164
|
-
}
|
|
8165
|
-
case EmbeddedFlowComponentType3.Form:
|
|
8166
|
-
return /* @__PURE__ */ jsx66(FormContainer_default, { component, onSubmit, ...rest });
|
|
8167
|
-
case EmbeddedFlowComponentType3.Divider:
|
|
8168
|
-
return /* @__PURE__ */ jsx66(DividerComponent_default, { component, onSubmit, ...rest });
|
|
8169
|
-
case EmbeddedFlowComponentType3.Image:
|
|
8170
|
-
return /* @__PURE__ */ jsx66(ImageComponent_default, { component, onSubmit, ...rest });
|
|
8171
|
-
default:
|
|
8172
|
-
return /* @__PURE__ */ jsx66("div", {});
|
|
8173
|
-
}
|
|
8174
|
-
};
|
|
8175
|
-
var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
|
|
8176
|
-
component,
|
|
8177
|
-
formErrors,
|
|
8178
|
-
formValues,
|
|
8179
|
-
isFormValid,
|
|
8180
|
-
isLoading,
|
|
8181
|
-
onInputChange,
|
|
8182
|
-
touchedFields,
|
|
8183
|
-
...options
|
|
8184
|
-
});
|
|
8185
|
-
var renderSignUpComponents = (components, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => components.map(
|
|
8186
|
-
(component, index) => createSignUpOptionFromComponent(
|
|
8187
|
-
component,
|
|
8188
|
-
formValues,
|
|
8189
|
-
touchedFields,
|
|
8190
|
-
formErrors,
|
|
8191
|
-
isLoading,
|
|
8192
|
-
isFormValid,
|
|
8193
|
-
onInputChange,
|
|
8194
|
-
{
|
|
8195
|
-
...options,
|
|
8196
|
-
// Use component id as key, fallback to index
|
|
8197
|
-
key: component.id || index
|
|
8198
|
-
}
|
|
8199
|
-
)
|
|
8200
|
-
).filter(Boolean);
|
|
8201
|
-
|
|
8202
|
-
// src/components/presentation/SignUp/transformer.ts
|
|
8203
|
-
import {
|
|
8204
|
-
EmbeddedFlowComponentType as EmbeddedFlowComponentType4
|
|
8205
|
-
} from "@asgardeo/browser";
|
|
8206
|
-
var generateId2 = (prefix) => {
|
|
8207
|
-
const suffix = Math.random().toString(36).substring(2, 6);
|
|
8208
|
-
return `${prefix}_${suffix}`;
|
|
8209
|
-
};
|
|
8210
|
-
var getInputVariant2 = (type, name) => {
|
|
8211
|
-
switch (type.toLowerCase()) {
|
|
8212
|
-
case "email":
|
|
8213
|
-
return "EMAIL";
|
|
8214
|
-
case "password":
|
|
8215
|
-
return "PASSWORD";
|
|
8216
|
-
default:
|
|
8217
|
-
return "TEXT";
|
|
8218
|
-
}
|
|
8219
|
-
};
|
|
8220
|
-
var getInputLabel2 = (name, type, t) => {
|
|
8221
|
-
const i18nKey = `elements.fields.${name}`;
|
|
8222
|
-
const label = t(i18nKey);
|
|
8223
|
-
if (label === i18nKey || !label) {
|
|
8224
|
-
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
8225
|
-
}
|
|
8226
|
-
return label;
|
|
8227
|
-
};
|
|
8228
|
-
var getInputPlaceholder2 = (name, type, t) => {
|
|
8229
|
-
const label = getInputLabel2(name, type, t);
|
|
8230
|
-
const placeholder = t("elements.fields.placeholder", { field: label });
|
|
8231
|
-
if (!placeholder || placeholder === "elements.fields.placeholder") {
|
|
8232
|
-
return `Enter your ${label}`;
|
|
8233
|
-
}
|
|
8234
|
-
return placeholder;
|
|
8235
|
-
};
|
|
8236
|
-
var convertSimpleInputToComponent2 = (input, t) => {
|
|
8237
|
-
let fieldType = input.type;
|
|
8238
|
-
if (input.name.toLowerCase().includes("password") && input.type.toLowerCase() === "string") {
|
|
8239
|
-
fieldType = "password";
|
|
8240
|
-
}
|
|
8241
|
-
const variant = getInputVariant2(input.type, input.name);
|
|
8242
|
-
const label = getInputLabel2(input.name, input.type, t);
|
|
8243
|
-
const placeholder = getInputPlaceholder2(input.name, input.type, t);
|
|
8244
|
-
return {
|
|
8245
|
-
id: generateId2("input"),
|
|
8246
|
-
type: EmbeddedFlowComponentType4.Input,
|
|
8247
|
-
variant,
|
|
8248
|
-
config: {
|
|
8249
|
-
type: input.type,
|
|
8250
|
-
label,
|
|
8251
|
-
placeholder,
|
|
8252
|
-
required: input.required,
|
|
8253
|
-
identifier: input.name,
|
|
8254
|
-
hint: ""
|
|
8255
|
-
},
|
|
8256
|
-
components: []
|
|
8257
|
-
};
|
|
8258
|
-
};
|
|
8259
|
-
var convertActionToComponent2 = (action, t) => {
|
|
8260
|
-
const normalizedId = action.id.replace(/_auth$/, "");
|
|
8261
|
-
const i18nKey = `elements.buttons.${normalizedId}`;
|
|
8262
|
-
let text = t(i18nKey);
|
|
8263
|
-
if (!text || text === i18nKey) {
|
|
8264
|
-
text = action.id.replace(/_/g, " ");
|
|
8265
|
-
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
8266
|
-
}
|
|
8267
|
-
return {
|
|
8268
|
-
id: generateId2("action"),
|
|
8269
|
-
type: EmbeddedFlowComponentType4.Button,
|
|
8270
|
-
variant: "SECONDARY",
|
|
8271
|
-
config: {
|
|
8272
|
-
type: "button",
|
|
8273
|
-
text,
|
|
8274
|
-
actionId: action.id,
|
|
8275
|
-
actionType: action.type
|
|
8276
|
-
},
|
|
8277
|
-
components: []
|
|
8278
|
-
};
|
|
8279
|
-
};
|
|
8280
|
-
var transformSimpleToComponentDriven2 = (response, t) => {
|
|
8281
|
-
const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
|
|
8282
|
-
const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
|
|
8283
|
-
const submitButton = inputComponents.length > 0 ? {
|
|
8284
|
-
id: generateId2("button"),
|
|
8285
|
-
type: EmbeddedFlowComponentType4.Button,
|
|
8286
|
-
variant: "PRIMARY",
|
|
8287
|
-
config: {
|
|
8288
|
-
type: "submit",
|
|
8289
|
-
text: t("elements.buttons.signUp")
|
|
8290
|
-
},
|
|
8291
|
-
components: []
|
|
8292
|
-
} : null;
|
|
8293
|
-
const formComponents = [];
|
|
8294
|
-
if (inputComponents.length > 0) {
|
|
8295
|
-
formComponents.push(...inputComponents);
|
|
8296
|
-
if (submitButton) formComponents.push(submitButton);
|
|
8297
|
-
}
|
|
8298
|
-
const result = [];
|
|
8299
|
-
if (formComponents.length > 0) {
|
|
8300
|
-
result.push({
|
|
8301
|
-
id: generateId2("form"),
|
|
8302
|
-
type: EmbeddedFlowComponentType4.Form,
|
|
8303
|
-
config: {},
|
|
8304
|
-
components: formComponents
|
|
8305
|
-
});
|
|
8306
|
-
}
|
|
8307
|
-
if (actionComponents.length > 0) {
|
|
8308
|
-
result.push(...actionComponents);
|
|
8309
|
-
}
|
|
8310
|
-
return result;
|
|
8115
|
+
return /* @__PURE__ */ jsx65(
|
|
8116
|
+
Typography_default,
|
|
8117
|
+
{
|
|
8118
|
+
variant: typographyVariant,
|
|
8119
|
+
style: { marginBottom: `calc(${theme.vars.spacing.unit} * 2)` },
|
|
8120
|
+
children: text
|
|
8121
|
+
},
|
|
8122
|
+
component.id
|
|
8123
|
+
);
|
|
8311
8124
|
};
|
|
8312
|
-
var
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8125
|
+
var Typography_default2 = TypographyComponent;
|
|
8126
|
+
|
|
8127
|
+
// src/components/presentation/SignUp/SignUpOptionFactory.tsx
|
|
8128
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
8129
|
+
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
8130
|
+
switch (component.type) {
|
|
8131
|
+
case EmbeddedFlowComponentType4.Typography:
|
|
8132
|
+
return /* @__PURE__ */ jsx66(Typography_default2, { component, onSubmit, ...rest });
|
|
8133
|
+
case EmbeddedFlowComponentType4.Input:
|
|
8134
|
+
const inputVariant = component.variant?.toUpperCase();
|
|
8135
|
+
const inputType = component.config["type"]?.toLowerCase();
|
|
8136
|
+
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
8137
|
+
return /* @__PURE__ */ jsx66(EmailInput_default, { component, onSubmit, ...rest });
|
|
8138
|
+
}
|
|
8139
|
+
if (inputVariant === "PASSWORD" || inputType === "password") {
|
|
8140
|
+
return /* @__PURE__ */ jsx66(PasswordInput_default, { component, onSubmit, ...rest });
|
|
8141
|
+
}
|
|
8142
|
+
if (inputVariant === "TELEPHONE" || inputType === "tel") {
|
|
8143
|
+
return /* @__PURE__ */ jsx66(TelephoneInput_default, { component, onSubmit, ...rest });
|
|
8144
|
+
}
|
|
8145
|
+
if (inputVariant === "NUMBER" || inputType === "number") {
|
|
8146
|
+
return /* @__PURE__ */ jsx66(NumberInput_default, { component, onSubmit, ...rest });
|
|
8147
|
+
}
|
|
8148
|
+
if (inputVariant === "DATE" || inputType === "date") {
|
|
8149
|
+
return /* @__PURE__ */ jsx66(DateInput_default, { component, onSubmit, ...rest });
|
|
8150
|
+
}
|
|
8151
|
+
if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
|
|
8152
|
+
return /* @__PURE__ */ jsx66(CheckboxInput_default, { component, onSubmit, ...rest });
|
|
8153
|
+
}
|
|
8154
|
+
return /* @__PURE__ */ jsx66(TextInput_default, { component, onSubmit, ...rest });
|
|
8155
|
+
case EmbeddedFlowComponentType4.Button: {
|
|
8156
|
+
const buttonVariant = component.variant?.toUpperCase();
|
|
8157
|
+
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
8158
|
+
if (buttonVariant === "SOCIAL") {
|
|
8159
|
+
if (buttonText.toLowerCase().includes("google")) {
|
|
8160
|
+
return /* @__PURE__ */ jsx66(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8161
|
+
}
|
|
8162
|
+
if (buttonText.toLowerCase().includes("github")) {
|
|
8163
|
+
return /* @__PURE__ */ jsx66(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8164
|
+
}
|
|
8165
|
+
if (buttonText.toLowerCase().includes("microsoft")) {
|
|
8166
|
+
return /* @__PURE__ */ jsx66(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8167
|
+
}
|
|
8168
|
+
if (buttonText.toLowerCase().includes("facebook")) {
|
|
8169
|
+
return /* @__PURE__ */ jsx66(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8170
|
+
}
|
|
8171
|
+
if (buttonText.toLowerCase().includes("linkedin")) {
|
|
8172
|
+
return /* @__PURE__ */ jsx66(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8173
|
+
}
|
|
8174
|
+
if (buttonText.toLowerCase().includes("ethereum")) {
|
|
8175
|
+
return /* @__PURE__ */ jsx66(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
8332
8176
|
}
|
|
8333
|
-
} catch {
|
|
8334
|
-
errorMessage = error.message;
|
|
8335
8177
|
}
|
|
8336
|
-
|
|
8337
|
-
errorMessage = error.message;
|
|
8178
|
+
return /* @__PURE__ */ jsx66(SubmitButton_default, { component, onSubmit, ...rest });
|
|
8338
8179
|
}
|
|
8339
|
-
|
|
8340
|
-
|
|
8180
|
+
case EmbeddedFlowComponentType4.Form:
|
|
8181
|
+
return /* @__PURE__ */ jsx66(FormContainer_default, { component, onSubmit, ...rest });
|
|
8182
|
+
case EmbeddedFlowComponentType4.Divider:
|
|
8183
|
+
return /* @__PURE__ */ jsx66(DividerComponent_default, { component, onSubmit, ...rest });
|
|
8184
|
+
case EmbeddedFlowComponentType4.Image:
|
|
8185
|
+
return /* @__PURE__ */ jsx66(ImageComponent_default, { component, onSubmit, ...rest });
|
|
8186
|
+
default:
|
|
8187
|
+
return /* @__PURE__ */ jsx66("div", {});
|
|
8341
8188
|
}
|
|
8342
|
-
return errorMessage;
|
|
8343
8189
|
};
|
|
8190
|
+
var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
|
|
8191
|
+
component,
|
|
8192
|
+
formErrors,
|
|
8193
|
+
formValues,
|
|
8194
|
+
isFormValid,
|
|
8195
|
+
isLoading,
|
|
8196
|
+
onInputChange,
|
|
8197
|
+
touchedFields,
|
|
8198
|
+
...options
|
|
8199
|
+
});
|
|
8200
|
+
var renderSignUpComponents = (components, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => components.map(
|
|
8201
|
+
(component, index) => createSignUpOptionFromComponent(
|
|
8202
|
+
component,
|
|
8203
|
+
formValues,
|
|
8204
|
+
touchedFields,
|
|
8205
|
+
formErrors,
|
|
8206
|
+
isLoading,
|
|
8207
|
+
isFormValid,
|
|
8208
|
+
onInputChange,
|
|
8209
|
+
{
|
|
8210
|
+
...options,
|
|
8211
|
+
// Use component id as key, fallback to index
|
|
8212
|
+
key: component.id || index
|
|
8213
|
+
}
|
|
8214
|
+
)
|
|
8215
|
+
).filter(Boolean);
|
|
8344
8216
|
|
|
8345
8217
|
// src/components/presentation/SignUp/BaseSignUp.styles.ts
|
|
8346
|
-
import { css as
|
|
8347
|
-
import { useMemo as
|
|
8348
|
-
var
|
|
8349
|
-
return
|
|
8350
|
-
const signUp =
|
|
8218
|
+
import { css as css17 } from "@emotion/css";
|
|
8219
|
+
import { useMemo as useMemo24 } from "react";
|
|
8220
|
+
var useStyles17 = (theme, colorScheme) => {
|
|
8221
|
+
return useMemo24(() => {
|
|
8222
|
+
const signUp = css17`
|
|
8351
8223
|
min-width: 420px;
|
|
8352
8224
|
margin: 0 auto;
|
|
8353
8225
|
`;
|
|
8354
|
-
const card =
|
|
8226
|
+
const card = css17`
|
|
8355
8227
|
background: ${theme.vars.colors.background.surface};
|
|
8356
8228
|
border-radius: ${theme.vars.borderRadius.large};
|
|
8357
8229
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
8358
8230
|
min-width: 420px;
|
|
8359
8231
|
`;
|
|
8360
|
-
const logoContainer =
|
|
8232
|
+
const logoContainer = css17`
|
|
8361
8233
|
display: flex;
|
|
8362
8234
|
flex-direction: column;
|
|
8363
8235
|
align-items: center;
|
|
8364
|
-
margin-bottom: calc(${theme.vars.spacing.unit} *
|
|
8236
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
8365
8237
|
`;
|
|
8366
|
-
const header =
|
|
8238
|
+
const header = css17`
|
|
8367
8239
|
gap: 0;
|
|
8240
|
+
align-items: center;
|
|
8368
8241
|
`;
|
|
8369
|
-
const title =
|
|
8242
|
+
const title = css17`
|
|
8370
8243
|
margin: 0 0 calc(${theme.vars.spacing.unit} * 1) 0;
|
|
8371
8244
|
color: ${theme.vars.colors.text.primary};
|
|
8372
8245
|
`;
|
|
8373
|
-
const subtitle =
|
|
8374
|
-
margin-
|
|
8246
|
+
const subtitle = css17`
|
|
8247
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
8375
8248
|
color: ${theme.vars.colors.text.secondary};
|
|
8376
8249
|
`;
|
|
8377
|
-
const
|
|
8378
|
-
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
8379
|
-
`;
|
|
8380
|
-
const messageItem = css18`
|
|
8250
|
+
const messageItem = css17`
|
|
8381
8251
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
8382
8252
|
`;
|
|
8383
|
-
const errorContainer =
|
|
8253
|
+
const errorContainer = css17`
|
|
8384
8254
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
8385
8255
|
`;
|
|
8386
|
-
const contentContainer =
|
|
8256
|
+
const contentContainer = css17`
|
|
8387
8257
|
display: flex;
|
|
8388
8258
|
flex-direction: column;
|
|
8389
8259
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
8390
8260
|
`;
|
|
8391
|
-
const loadingContainer =
|
|
8261
|
+
const loadingContainer = css17`
|
|
8392
8262
|
display: flex;
|
|
8393
8263
|
flex-direction: column;
|
|
8394
8264
|
align-items: center;
|
|
8395
8265
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
8396
8266
|
`;
|
|
8397
|
-
const loadingText =
|
|
8267
|
+
const loadingText = css17`
|
|
8398
8268
|
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
8399
8269
|
color: ${theme.vars.colors.text.secondary};
|
|
8400
8270
|
`;
|
|
8401
|
-
const divider =
|
|
8271
|
+
const divider = css17`
|
|
8402
8272
|
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
8403
8273
|
`;
|
|
8404
|
-
const centeredContainer =
|
|
8274
|
+
const centeredContainer = css17`
|
|
8405
8275
|
text-align: center;
|
|
8406
8276
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
8407
8277
|
`;
|
|
8408
|
-
const passkeyContainer =
|
|
8278
|
+
const passkeyContainer = css17`
|
|
8409
8279
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
8410
8280
|
`;
|
|
8411
|
-
const passkeyText =
|
|
8281
|
+
const passkeyText = css17`
|
|
8412
8282
|
margin-top: calc(${theme.vars.spacing.unit} * 1);
|
|
8413
8283
|
color: ${theme.vars.colors.text.secondary};
|
|
8414
8284
|
`;
|
|
8415
|
-
const form =
|
|
8285
|
+
const form = css17`
|
|
8416
8286
|
display: flex;
|
|
8417
8287
|
flex-direction: column;
|
|
8418
8288
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
8419
8289
|
`;
|
|
8420
|
-
const formDivider =
|
|
8290
|
+
const formDivider = css17`
|
|
8421
8291
|
margin: calc(${theme.vars.spacing.unit} * 1) 0;
|
|
8422
8292
|
`;
|
|
8423
|
-
const authenticatorSection =
|
|
8293
|
+
const authenticatorSection = css17`
|
|
8424
8294
|
display: flex;
|
|
8425
8295
|
flex-direction: column;
|
|
8426
8296
|
gap: calc(${theme.vars.spacing.unit} * 1);
|
|
8427
8297
|
`;
|
|
8428
|
-
const authenticatorItem =
|
|
8298
|
+
const authenticatorItem = css17`
|
|
8429
8299
|
width: 100%;
|
|
8430
8300
|
`;
|
|
8431
|
-
const noAuthenticatorCard =
|
|
8301
|
+
const noAuthenticatorCard = css17`
|
|
8432
8302
|
background: ${theme.vars.colors.background.surface};
|
|
8433
8303
|
border-radius: ${theme.vars.borderRadius.large};
|
|
8434
8304
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
8435
8305
|
`;
|
|
8436
|
-
const errorAlert =
|
|
8306
|
+
const errorAlert = css17`
|
|
8437
8307
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
8438
8308
|
`;
|
|
8439
|
-
const messagesAlert =
|
|
8309
|
+
const messagesAlert = css17`
|
|
8440
8310
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
8441
8311
|
`;
|
|
8442
|
-
const flowMessagesContainer =
|
|
8443
|
-
margin-
|
|
8312
|
+
const flowMessagesContainer = css17`
|
|
8313
|
+
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
8444
8314
|
`;
|
|
8445
|
-
const flowMessageItem =
|
|
8315
|
+
const flowMessageItem = css17`
|
|
8446
8316
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1);
|
|
8447
8317
|
`;
|
|
8448
8318
|
return {
|
|
@@ -8452,7 +8322,6 @@ var useStyles18 = (theme, colorScheme) => {
|
|
|
8452
8322
|
header,
|
|
8453
8323
|
title,
|
|
8454
8324
|
subtitle,
|
|
8455
|
-
messagesContainer,
|
|
8456
8325
|
messageItem,
|
|
8457
8326
|
errorContainer,
|
|
8458
8327
|
contentContainer,
|
|
@@ -8481,16 +8350,16 @@ var useStyles18 = (theme, colorScheme) => {
|
|
|
8481
8350
|
colorScheme
|
|
8482
8351
|
]);
|
|
8483
8352
|
};
|
|
8484
|
-
var BaseSignUp_styles_default =
|
|
8353
|
+
var BaseSignUp_styles_default = useStyles17;
|
|
8485
8354
|
|
|
8486
8355
|
// src/components/presentation/SignUp/BaseSignUp.tsx
|
|
8487
8356
|
import { jsx as jsx67, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8488
|
-
var BaseSignUp = (
|
|
8357
|
+
var BaseSignUp = ({ showLogo = true, ...rest }) => {
|
|
8489
8358
|
const { theme, colorScheme } = useTheme_default();
|
|
8490
8359
|
const styles = BaseSignUp_styles_default(theme, colorScheme);
|
|
8491
8360
|
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
8492
|
-
/* @__PURE__ */ jsx67("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx67(Logo_default, { size: "large" }) }),
|
|
8493
|
-
/* @__PURE__ */ jsx67(FlowProvider_default, { children: /* @__PURE__ */ jsx67(BaseSignUpContent, { ...
|
|
8361
|
+
showLogo && /* @__PURE__ */ jsx67("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx67(Logo_default, { size: "large" }) }),
|
|
8362
|
+
/* @__PURE__ */ jsx67(FlowProvider_default, { children: /* @__PURE__ */ jsx67(BaseSignUpContent, { showLogo, ...rest }) })
|
|
8494
8363
|
] });
|
|
8495
8364
|
};
|
|
8496
8365
|
var BaseSignUpContent = ({
|
|
@@ -8508,7 +8377,9 @@ var BaseSignUpContent = ({
|
|
|
8508
8377
|
size = "medium",
|
|
8509
8378
|
variant = "outlined",
|
|
8510
8379
|
isInitialized,
|
|
8511
|
-
children
|
|
8380
|
+
children,
|
|
8381
|
+
showTitle = true,
|
|
8382
|
+
showSubtitle = true
|
|
8512
8383
|
}) => {
|
|
8513
8384
|
const { theme, colorScheme } = useTheme_default();
|
|
8514
8385
|
const { t } = useTranslation_default();
|
|
@@ -8536,7 +8407,7 @@ var BaseSignUpContent = ({
|
|
|
8536
8407
|
return response;
|
|
8537
8408
|
}
|
|
8538
8409
|
if (response?.data && (response.data.inputs || response.data.actions)) {
|
|
8539
|
-
const transformedComponents =
|
|
8410
|
+
const transformedComponents = transformSimpleToComponentDriven(response, t);
|
|
8540
8411
|
return {
|
|
8541
8412
|
...response,
|
|
8542
8413
|
data: {
|
|
@@ -8901,9 +8772,11 @@ var BaseSignUpContent = ({
|
|
|
8901
8772
|
] }) }) });
|
|
8902
8773
|
}
|
|
8903
8774
|
return /* @__PURE__ */ jsxs28(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
|
|
8904
|
-
/* @__PURE__ */ jsxs28(Card_default.Header, { className: styles.header, children: [
|
|
8905
|
-
/* @__PURE__ */ jsx67(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
|
|
8906
|
-
/* @__PURE__ */ jsx67(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subtitle") })
|
|
8775
|
+
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs28(Card_default.Header, { className: styles.header, children: [
|
|
8776
|
+
showTitle && /* @__PURE__ */ jsx67(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.title") }),
|
|
8777
|
+
showSubtitle && /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subtitle") })
|
|
8778
|
+
] }),
|
|
8779
|
+
/* @__PURE__ */ jsxs28(Card_default.Content, { children: [
|
|
8907
8780
|
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx67(
|
|
8908
8781
|
Alert_default,
|
|
8909
8782
|
{
|
|
@@ -8912,9 +8785,9 @@ var BaseSignUpContent = ({
|
|
|
8912
8785
|
children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: message.message })
|
|
8913
8786
|
},
|
|
8914
8787
|
message.id || index
|
|
8915
|
-
)) })
|
|
8916
|
-
|
|
8917
|
-
|
|
8788
|
+
)) }),
|
|
8789
|
+
/* @__PURE__ */ jsx67("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx67(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", children: t("errors.sign.up.components.not.available") }) }) })
|
|
8790
|
+
] })
|
|
8918
8791
|
] });
|
|
8919
8792
|
};
|
|
8920
8793
|
var BaseSignUp_default = BaseSignUp;
|
|
@@ -8938,9 +8811,12 @@ var SignUp = ({
|
|
|
8938
8811
|
}) => {
|
|
8939
8812
|
const { signUp, isInitialized, applicationId, platform } = useAsgardeo_default();
|
|
8940
8813
|
const handleInitialize = async (payload) => {
|
|
8814
|
+
const urlParams = new URL(window.location.href).searchParams;
|
|
8815
|
+
const applicationIdFromUrl = urlParams.get("applicationId");
|
|
8816
|
+
const effectiveApplicationId = applicationId || applicationIdFromUrl;
|
|
8941
8817
|
const initialPayload = payload || {
|
|
8942
8818
|
flowType: EmbeddedFlowType2.Registration,
|
|
8943
|
-
...platform === Platform5.AsgardeoV2 &&
|
|
8819
|
+
...platform === Platform5.AsgardeoV2 && effectiveApplicationId && { applicationId: effectiveApplicationId }
|
|
8944
8820
|
};
|
|
8945
8821
|
return await signUp(initialPayload);
|
|
8946
8822
|
};
|
|
@@ -8967,6 +8843,9 @@ var SignUp = ({
|
|
|
8967
8843
|
size,
|
|
8968
8844
|
isInitialized,
|
|
8969
8845
|
children,
|
|
8846
|
+
showLogo: true,
|
|
8847
|
+
showTitle: platform === Platform5.AsgardeoV2,
|
|
8848
|
+
showSubtitle: platform === Platform5.AsgardeoV2,
|
|
8970
8849
|
...rest
|
|
8971
8850
|
}
|
|
8972
8851
|
);
|
|
@@ -9044,14 +8923,14 @@ var getMappedUserProfileValue_default = getMappedUserProfileValue;
|
|
|
9044
8923
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
9045
8924
|
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix22, bem as bem16 } from "@asgardeo/browser";
|
|
9046
8925
|
import { cx as cx22 } from "@emotion/css";
|
|
9047
|
-
import { useMemo as
|
|
8926
|
+
import { useMemo as useMemo26 } from "react";
|
|
9048
8927
|
|
|
9049
8928
|
// src/components/primitives/Avatar/Avatar.styles.ts
|
|
9050
|
-
import { css as
|
|
9051
|
-
import { useMemo as
|
|
9052
|
-
var
|
|
9053
|
-
return
|
|
9054
|
-
const baseAvatar =
|
|
8929
|
+
import { css as css18 } from "@emotion/css";
|
|
8930
|
+
import { useMemo as useMemo25 } from "react";
|
|
8931
|
+
var useStyles18 = (theme, colorScheme, size, variant, backgroundColor) => {
|
|
8932
|
+
return useMemo25(() => {
|
|
8933
|
+
const baseAvatar = css18`
|
|
9055
8934
|
align-items: center;
|
|
9056
8935
|
background: ${backgroundColor || theme.vars.colors.background.surface};
|
|
9057
8936
|
border: ${backgroundColor ? "none" : `1px solid ${theme.vars.colors.border}`};
|
|
@@ -9067,19 +8946,19 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
|
|
|
9067
8946
|
width: ${size}px;
|
|
9068
8947
|
`;
|
|
9069
8948
|
const variantStyles = {
|
|
9070
|
-
circular:
|
|
8949
|
+
circular: css18`
|
|
9071
8950
|
border-radius: 50%;
|
|
9072
8951
|
`,
|
|
9073
|
-
square:
|
|
8952
|
+
square: css18`
|
|
9074
8953
|
border-radius: 8px;
|
|
9075
8954
|
`
|
|
9076
8955
|
};
|
|
9077
|
-
const imageStyles =
|
|
8956
|
+
const imageStyles = css18`
|
|
9078
8957
|
height: 100%;
|
|
9079
8958
|
object-fit: cover;
|
|
9080
8959
|
width: 100%;
|
|
9081
8960
|
`;
|
|
9082
|
-
const skeletonStyles =
|
|
8961
|
+
const skeletonStyles = css18`
|
|
9083
8962
|
width: 100%;
|
|
9084
8963
|
height: 100%;
|
|
9085
8964
|
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
@@ -9096,7 +8975,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
|
|
|
9096
8975
|
}
|
|
9097
8976
|
}
|
|
9098
8977
|
`;
|
|
9099
|
-
const iconStyles =
|
|
8978
|
+
const iconStyles = css18`
|
|
9100
8979
|
width: 60%;
|
|
9101
8980
|
height: 60%;
|
|
9102
8981
|
fill: ${backgroundColor ? "#ffffff" : theme.vars.colors.text.secondary};
|
|
@@ -9111,7 +8990,7 @@ var useStyles19 = (theme, colorScheme, size, variant, backgroundColor) => {
|
|
|
9111
8990
|
};
|
|
9112
8991
|
}, [theme, colorScheme, size, variant, backgroundColor]);
|
|
9113
8992
|
};
|
|
9114
|
-
var Avatar_styles_default =
|
|
8993
|
+
var Avatar_styles_default = useStyles18;
|
|
9115
8994
|
|
|
9116
8995
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
9117
8996
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
@@ -9144,7 +9023,7 @@ var Avatar = ({
|
|
|
9144
9023
|
const colors = generateColor(seed);
|
|
9145
9024
|
return `linear-gradient(${angle}deg, ${colors})`;
|
|
9146
9025
|
};
|
|
9147
|
-
const backgroundColor =
|
|
9026
|
+
const backgroundColor = useMemo26(() => {
|
|
9148
9027
|
if (!name || imageUrl) {
|
|
9149
9028
|
return void 0;
|
|
9150
9029
|
}
|
|
@@ -9307,18 +9186,18 @@ var X = (props) => /* @__PURE__ */ jsxs32(
|
|
|
9307
9186
|
var X_default = X;
|
|
9308
9187
|
|
|
9309
9188
|
// src/components/primitives/Dialog/Dialog.styles.ts
|
|
9310
|
-
import { css as
|
|
9311
|
-
import { useMemo as
|
|
9312
|
-
var
|
|
9313
|
-
return
|
|
9314
|
-
const overlay =
|
|
9189
|
+
import { css as css19 } from "@emotion/css";
|
|
9190
|
+
import { useMemo as useMemo27 } from "react";
|
|
9191
|
+
var useStyles19 = (theme, colorScheme) => {
|
|
9192
|
+
return useMemo27(() => {
|
|
9193
|
+
const overlay = css19`
|
|
9315
9194
|
background-color: rgba(0, 0, 0, 0.5);
|
|
9316
9195
|
display: flex;
|
|
9317
9196
|
align-items: center;
|
|
9318
9197
|
justify-content: center;
|
|
9319
9198
|
z-index: 9999;
|
|
9320
9199
|
`;
|
|
9321
|
-
const content =
|
|
9200
|
+
const content = css19`
|
|
9322
9201
|
background: ${theme.vars.colors.background.surface};
|
|
9323
9202
|
border-radius: ${theme.vars.borderRadius.large};
|
|
9324
9203
|
box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
|
|
@@ -9326,7 +9205,7 @@ var useStyles20 = (theme, colorScheme) => {
|
|
|
9326
9205
|
overflow-y: auto;
|
|
9327
9206
|
z-index: 10000;
|
|
9328
9207
|
`;
|
|
9329
|
-
const dropdownContent =
|
|
9208
|
+
const dropdownContent = css19`
|
|
9330
9209
|
background: ${theme.vars.colors.background.surface};
|
|
9331
9210
|
border-radius: ${theme.vars.borderRadius.large};
|
|
9332
9211
|
box-shadow: 0 2px 8px ${colorScheme === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.15)"};
|
|
@@ -9336,23 +9215,23 @@ var useStyles20 = (theme, colorScheme) => {
|
|
|
9336
9215
|
overflow-y: auto;
|
|
9337
9216
|
z-index: 10000;
|
|
9338
9217
|
`;
|
|
9339
|
-
const header =
|
|
9218
|
+
const header = css19`
|
|
9340
9219
|
display: flex;
|
|
9341
9220
|
justify-content: space-between;
|
|
9342
9221
|
align-items: center;
|
|
9343
9222
|
padding: calc(${theme.vars.spacing.unit} * 3) calc(${theme.vars.spacing.unit} * 4.5);
|
|
9344
9223
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
9345
9224
|
`;
|
|
9346
|
-
const headerTitle =
|
|
9225
|
+
const headerTitle = css19`
|
|
9347
9226
|
margin: 0;
|
|
9348
9227
|
font-size: 1.2rem;
|
|
9349
9228
|
font-weight: 600;
|
|
9350
9229
|
color: ${theme.vars.colors.text.primary};
|
|
9351
9230
|
`;
|
|
9352
|
-
const contentBody =
|
|
9231
|
+
const contentBody = css19`
|
|
9353
9232
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
9354
9233
|
`;
|
|
9355
|
-
const description =
|
|
9234
|
+
const description = css19`
|
|
9356
9235
|
margin: 0;
|
|
9357
9236
|
color: ${theme.vars.colors.text.secondary};
|
|
9358
9237
|
font-size: ${theme.vars.typography.fontSizes.sm};
|
|
@@ -9369,7 +9248,7 @@ var useStyles20 = (theme, colorScheme) => {
|
|
|
9369
9248
|
};
|
|
9370
9249
|
}, [theme, colorScheme]);
|
|
9371
9250
|
};
|
|
9372
|
-
var Dialog_styles_default =
|
|
9251
|
+
var Dialog_styles_default = useStyles19;
|
|
9373
9252
|
|
|
9374
9253
|
// src/components/primitives/Dialog/Dialog.tsx
|
|
9375
9254
|
import { jsx as jsx78, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
@@ -9563,36 +9442,36 @@ import { cx as cx24 } from "@emotion/css";
|
|
|
9563
9442
|
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix24, bem as bem18 } from "@asgardeo/browser";
|
|
9564
9443
|
|
|
9565
9444
|
// src/components/primitives/MultiInput/MultiInput.styles.ts
|
|
9566
|
-
import { css as
|
|
9567
|
-
import { useMemo as
|
|
9568
|
-
var
|
|
9569
|
-
return
|
|
9570
|
-
const container =
|
|
9445
|
+
import { css as css20 } from "@emotion/css";
|
|
9446
|
+
import { useMemo as useMemo28 } from "react";
|
|
9447
|
+
var useStyles20 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove) => {
|
|
9448
|
+
return useMemo28(() => {
|
|
9449
|
+
const container = css20`
|
|
9571
9450
|
display: flex;
|
|
9572
9451
|
flex-direction: column;
|
|
9573
9452
|
gap: ${theme.vars.spacing.unit};
|
|
9574
9453
|
`;
|
|
9575
|
-
const inputRow =
|
|
9454
|
+
const inputRow = css20`
|
|
9576
9455
|
display: flex;
|
|
9577
9456
|
align-items: center;
|
|
9578
9457
|
gap: ${theme.vars.spacing.unit};
|
|
9579
9458
|
position: relative;
|
|
9580
9459
|
`;
|
|
9581
|
-
const inputWrapper =
|
|
9460
|
+
const inputWrapper = css20`
|
|
9582
9461
|
flex: 1;
|
|
9583
9462
|
`;
|
|
9584
|
-
const plusIcon =
|
|
9463
|
+
const plusIcon = css20`
|
|
9585
9464
|
background: ${theme.vars.colors.secondary.main};
|
|
9586
9465
|
border-radius: 50%;
|
|
9587
9466
|
outline: 4px ${theme.vars.colors.secondary.main} auto;
|
|
9588
9467
|
color: ${theme.vars.colors.secondary.contrastText};
|
|
9589
9468
|
`;
|
|
9590
|
-
const listContainer =
|
|
9469
|
+
const listContainer = css20`
|
|
9591
9470
|
display: flex;
|
|
9592
9471
|
flex-direction: column;
|
|
9593
9472
|
gap: 0;
|
|
9594
9473
|
`;
|
|
9595
|
-
const listItem =
|
|
9474
|
+
const listItem = css20`
|
|
9596
9475
|
display: flex;
|
|
9597
9476
|
align-items: center;
|
|
9598
9477
|
justify-content: space-between;
|
|
@@ -9607,11 +9486,11 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
|
|
|
9607
9486
|
margin-bottom: 0;
|
|
9608
9487
|
}
|
|
9609
9488
|
`;
|
|
9610
|
-
const listItemText =
|
|
9489
|
+
const listItemText = css20`
|
|
9611
9490
|
flex: 1;
|
|
9612
9491
|
word-break: break-word;
|
|
9613
9492
|
`;
|
|
9614
|
-
const removeButton =
|
|
9493
|
+
const removeButton = css20`
|
|
9615
9494
|
padding: calc(${theme.vars.spacing.unit} / 2);
|
|
9616
9495
|
min-width: auto;
|
|
9617
9496
|
color: ${theme.vars.colors.error.main};
|
|
@@ -9631,7 +9510,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
|
|
|
9631
9510
|
opacity: 0.6;
|
|
9632
9511
|
}
|
|
9633
9512
|
`;
|
|
9634
|
-
const icon =
|
|
9513
|
+
const icon = css20`
|
|
9635
9514
|
width: 16px;
|
|
9636
9515
|
height: 16px;
|
|
9637
9516
|
stroke: currentColor;
|
|
@@ -9653,7 +9532,7 @@ var useStyles21 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
|
|
|
9653
9532
|
};
|
|
9654
9533
|
}, [theme, colorScheme, disabled, hasError, canAddMore, canRemove]);
|
|
9655
9534
|
};
|
|
9656
|
-
var MultiInput_styles_default =
|
|
9535
|
+
var MultiInput_styles_default = useStyles20;
|
|
9657
9536
|
|
|
9658
9537
|
// src/components/primitives/MultiInput/MultiInput.tsx
|
|
9659
9538
|
import { jsx as jsx79, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
@@ -9798,15 +9677,15 @@ var MultiInput = ({
|
|
|
9798
9677
|
var MultiInput_default = MultiInput;
|
|
9799
9678
|
|
|
9800
9679
|
// src/components/presentation/UserProfile/BaseUserProfile.styles.ts
|
|
9801
|
-
import { css as
|
|
9802
|
-
import { useMemo as
|
|
9680
|
+
import { css as css21 } from "@emotion/css";
|
|
9681
|
+
import { useMemo as useMemo29 } from "react";
|
|
9803
9682
|
import { withVendorCSSClassPrefix as withVendorCSSClassPrefix25 } from "@asgardeo/browser";
|
|
9804
|
-
var
|
|
9805
|
-
const valuePlaceholder =
|
|
9683
|
+
var useStyles21 = (theme, colorScheme) => {
|
|
9684
|
+
const valuePlaceholder = css21`
|
|
9806
9685
|
font-style: italic;
|
|
9807
9686
|
opacity: 0.7;
|
|
9808
9687
|
`;
|
|
9809
|
-
const editButton =
|
|
9688
|
+
const editButton = css21`
|
|
9810
9689
|
font-style: italic;
|
|
9811
9690
|
text-decoration: underline;
|
|
9812
9691
|
opacity: 0.7;
|
|
@@ -9817,19 +9696,19 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9817
9696
|
background-color: transparent;
|
|
9818
9697
|
}
|
|
9819
9698
|
`;
|
|
9820
|
-
const fieldInner =
|
|
9699
|
+
const fieldInner = css21`
|
|
9821
9700
|
flex: 1;
|
|
9822
9701
|
display: flex;
|
|
9823
9702
|
align-items: center;
|
|
9824
9703
|
gap: ${theme.vars.spacing.unit};
|
|
9825
9704
|
`;
|
|
9826
|
-
const fieldActions =
|
|
9705
|
+
const fieldActions = css21`
|
|
9827
9706
|
display: flex;
|
|
9828
9707
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
9829
9708
|
align-items: center;
|
|
9830
9709
|
margin-inline-start: calc(${theme.vars.spacing.unit} * 4);
|
|
9831
9710
|
`;
|
|
9832
|
-
const complexTextarea =
|
|
9711
|
+
const complexTextarea = css21`
|
|
9833
9712
|
min-height: 60px;
|
|
9834
9713
|
width: 100%;
|
|
9835
9714
|
padding: 8px;
|
|
@@ -9837,57 +9716,57 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9837
9716
|
border-radius: ${theme.vars.borderRadius.small};
|
|
9838
9717
|
resize: vertical;
|
|
9839
9718
|
`;
|
|
9840
|
-
const objectKey =
|
|
9719
|
+
const objectKey = css21`
|
|
9841
9720
|
padding: ${theme.vars.spacing.unit};
|
|
9842
9721
|
vertical-align: top;
|
|
9843
9722
|
`;
|
|
9844
|
-
const objectValue =
|
|
9723
|
+
const objectValue = css21`
|
|
9845
9724
|
padding: ${theme.vars.spacing.unit};
|
|
9846
9725
|
vertical-align: top;
|
|
9847
9726
|
`;
|
|
9848
|
-
return
|
|
9849
|
-
const root =
|
|
9727
|
+
return useMemo29(() => {
|
|
9728
|
+
const root = css21`
|
|
9850
9729
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
9851
9730
|
min-width: 600px;
|
|
9852
9731
|
margin: 0 auto;
|
|
9853
9732
|
`;
|
|
9854
|
-
const card =
|
|
9733
|
+
const card = css21`
|
|
9855
9734
|
background: ${theme.vars.colors.background.surface};
|
|
9856
9735
|
border-radius: ${theme.vars.borderRadius.large};
|
|
9857
9736
|
`;
|
|
9858
|
-
const header =
|
|
9737
|
+
const header = css21`
|
|
9859
9738
|
display: flex;
|
|
9860
9739
|
align-items: center;
|
|
9861
9740
|
gap: calc(${theme.vars.spacing.unit} * 1.5);
|
|
9862
9741
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
|
|
9863
9742
|
`;
|
|
9864
|
-
const profileInfo =
|
|
9743
|
+
const profileInfo = css21`
|
|
9865
9744
|
flex: 1;
|
|
9866
9745
|
`;
|
|
9867
|
-
const name =
|
|
9746
|
+
const name = css21`
|
|
9868
9747
|
font-size: 1.5rem;
|
|
9869
9748
|
font-weight: 600;
|
|
9870
9749
|
margin: 0;
|
|
9871
9750
|
color: ${theme.vars.colors.text.primary};
|
|
9872
9751
|
`;
|
|
9873
|
-
const infoContainer =
|
|
9752
|
+
const infoContainer = css21`
|
|
9874
9753
|
display: flex;
|
|
9875
9754
|
flex-direction: column;
|
|
9876
9755
|
`;
|
|
9877
|
-
const info =
|
|
9756
|
+
const info = css21`
|
|
9878
9757
|
padding: calc(${theme.vars.spacing.unit} * 1.5) 0;
|
|
9879
9758
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
9880
9759
|
`;
|
|
9881
|
-
const field =
|
|
9760
|
+
const field = css21`
|
|
9882
9761
|
display: flex;
|
|
9883
9762
|
align-items: center;
|
|
9884
9763
|
padding: calc(${theme.vars.spacing.unit} / 2) 0;
|
|
9885
9764
|
min-height: 28px;
|
|
9886
9765
|
`;
|
|
9887
|
-
const lastField =
|
|
9766
|
+
const lastField = css21`
|
|
9888
9767
|
border-bottom: none;
|
|
9889
9768
|
`;
|
|
9890
|
-
const label =
|
|
9769
|
+
const label = css21`
|
|
9891
9770
|
font-size: 0.875rem;
|
|
9892
9771
|
font-weight: 500;
|
|
9893
9772
|
color: ${theme.vars.colors.text.secondary};
|
|
@@ -9896,7 +9775,7 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9896
9775
|
line-height: 28px;
|
|
9897
9776
|
text-align: start;
|
|
9898
9777
|
`;
|
|
9899
|
-
const value =
|
|
9778
|
+
const value = css21`
|
|
9900
9779
|
color: ${theme.vars.colors.text.primary};
|
|
9901
9780
|
flex: 1;
|
|
9902
9781
|
display: inline-block;
|
|
@@ -9929,10 +9808,10 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9929
9808
|
border-color: ${theme.vars.colors.border};
|
|
9930
9809
|
}
|
|
9931
9810
|
`;
|
|
9932
|
-
const popup =
|
|
9811
|
+
const popup = css21`
|
|
9933
9812
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
9934
9813
|
`;
|
|
9935
|
-
const alert =
|
|
9814
|
+
const alert = css21`
|
|
9936
9815
|
margin-bottom: calc(${theme.vars.spacing.unit} * 3);
|
|
9937
9816
|
`;
|
|
9938
9817
|
return {
|
|
@@ -9968,7 +9847,7 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9968
9847
|
colorScheme
|
|
9969
9848
|
]);
|
|
9970
9849
|
};
|
|
9971
|
-
var BaseUserProfile_styles_default =
|
|
9850
|
+
var BaseUserProfile_styles_default = useStyles21;
|
|
9972
9851
|
|
|
9973
9852
|
// src/utils/getDisplayName.ts
|
|
9974
9853
|
var getDisplayName = (mergedMappings, user) => {
|
|
@@ -10492,11 +10371,11 @@ import { cx as cx26 } from "@emotion/css";
|
|
|
10492
10371
|
import { useState as useState21 } from "react";
|
|
10493
10372
|
|
|
10494
10373
|
// src/components/presentation/UserDropdown/BaseUserDropdown.styles.ts
|
|
10495
|
-
import { css as
|
|
10496
|
-
import { useMemo as
|
|
10497
|
-
var
|
|
10498
|
-
return
|
|
10499
|
-
const trigger =
|
|
10374
|
+
import { css as css22 } from "@emotion/css";
|
|
10375
|
+
import { useMemo as useMemo30 } from "react";
|
|
10376
|
+
var useStyles22 = (theme, colorScheme) => {
|
|
10377
|
+
return useMemo30(() => {
|
|
10378
|
+
const trigger = css22`
|
|
10500
10379
|
display: inline-flex;
|
|
10501
10380
|
align-items: center;
|
|
10502
10381
|
gap: calc(${theme.vars.spacing.unit} * 0.75);
|
|
@@ -10523,7 +10402,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10523
10402
|
box-shadow: none;
|
|
10524
10403
|
}
|
|
10525
10404
|
`;
|
|
10526
|
-
const userName =
|
|
10405
|
+
const userName = css22`
|
|
10527
10406
|
color: ${theme.vars.colors.text.primary};
|
|
10528
10407
|
font-size: 0.875rem;
|
|
10529
10408
|
font-weight: 500;
|
|
@@ -10532,7 +10411,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10532
10411
|
text-overflow: ellipsis;
|
|
10533
10412
|
white-space: nowrap;
|
|
10534
10413
|
`;
|
|
10535
|
-
const dropdownContent =
|
|
10414
|
+
const dropdownContent = css22`
|
|
10536
10415
|
background: ${theme.vars.colors.background.surface};
|
|
10537
10416
|
border-radius: ${theme.vars.borderRadius.large};
|
|
10538
10417
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
@@ -10542,12 +10421,12 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10542
10421
|
z-index: 1000;
|
|
10543
10422
|
overflow: hidden;
|
|
10544
10423
|
`;
|
|
10545
|
-
const dropdownMenu =
|
|
10424
|
+
const dropdownMenu = css22`
|
|
10546
10425
|
display: flex;
|
|
10547
10426
|
flex-direction: column;
|
|
10548
10427
|
width: 100%;
|
|
10549
10428
|
`;
|
|
10550
|
-
const menuItem =
|
|
10429
|
+
const menuItem = css22`
|
|
10551
10430
|
display: flex;
|
|
10552
10431
|
align-items: center;
|
|
10553
10432
|
justify-content: flex-start;
|
|
@@ -10575,7 +10454,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10575
10454
|
box-shadow: none;
|
|
10576
10455
|
}
|
|
10577
10456
|
`;
|
|
10578
|
-
const menuItemAnchor =
|
|
10457
|
+
const menuItemAnchor = css22`
|
|
10579
10458
|
display: flex;
|
|
10580
10459
|
align-items: center;
|
|
10581
10460
|
justify-content: flex-start;
|
|
@@ -10596,18 +10475,18 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10596
10475
|
background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.05)"};
|
|
10597
10476
|
}
|
|
10598
10477
|
`;
|
|
10599
|
-
const divider =
|
|
10478
|
+
const divider = css22`
|
|
10600
10479
|
margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
|
|
10601
10480
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
10602
10481
|
`;
|
|
10603
|
-
const dropdownHeader =
|
|
10482
|
+
const dropdownHeader = css22`
|
|
10604
10483
|
display: flex;
|
|
10605
10484
|
align-items: center;
|
|
10606
10485
|
gap: ${theme.vars.spacing.unit};
|
|
10607
10486
|
padding: calc(${theme.vars.spacing.unit} * 1.5);
|
|
10608
10487
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
10609
10488
|
`;
|
|
10610
|
-
const headerInfo =
|
|
10489
|
+
const headerInfo = css22`
|
|
10611
10490
|
display: flex;
|
|
10612
10491
|
flex-direction: column;
|
|
10613
10492
|
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
@@ -10617,7 +10496,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10617
10496
|
text-overflow: ellipsis;
|
|
10618
10497
|
white-space: nowrap;
|
|
10619
10498
|
`;
|
|
10620
|
-
const headerName =
|
|
10499
|
+
const headerName = css22`
|
|
10621
10500
|
color: ${theme.vars.colors.text.primary};
|
|
10622
10501
|
font-size: 1rem;
|
|
10623
10502
|
font-weight: 500;
|
|
@@ -10626,7 +10505,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10626
10505
|
text-overflow: ellipsis;
|
|
10627
10506
|
white-space: nowrap;
|
|
10628
10507
|
`;
|
|
10629
|
-
const headerEmail =
|
|
10508
|
+
const headerEmail = css22`
|
|
10630
10509
|
color: ${theme.vars.colors.text.secondary};
|
|
10631
10510
|
font-size: 0.875rem;
|
|
10632
10511
|
margin: 0;
|
|
@@ -10634,14 +10513,14 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10634
10513
|
text-overflow: ellipsis;
|
|
10635
10514
|
white-space: nowrap;
|
|
10636
10515
|
`;
|
|
10637
|
-
const loadingContainer =
|
|
10516
|
+
const loadingContainer = css22`
|
|
10638
10517
|
display: flex;
|
|
10639
10518
|
align-items: center;
|
|
10640
10519
|
justify-content: center;
|
|
10641
10520
|
min-height: 80px;
|
|
10642
10521
|
gap: ${theme.vars.spacing.unit};
|
|
10643
10522
|
`;
|
|
10644
|
-
const loadingText =
|
|
10523
|
+
const loadingText = css22`
|
|
10645
10524
|
color: ${theme.vars.colors.text.secondary};
|
|
10646
10525
|
font-size: 0.875rem;
|
|
10647
10526
|
`;
|
|
@@ -10673,7 +10552,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10673
10552
|
colorScheme
|
|
10674
10553
|
]);
|
|
10675
10554
|
};
|
|
10676
|
-
var BaseUserDropdown_styles_default =
|
|
10555
|
+
var BaseUserDropdown_styles_default = useStyles22;
|
|
10677
10556
|
|
|
10678
10557
|
// src/components/presentation/UserDropdown/BaseUserDropdown.tsx
|
|
10679
10558
|
import { jsx as jsx82, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -10985,15 +10864,15 @@ ChevronDown.displayName = "ChevronDown";
|
|
|
10985
10864
|
var ChevronDown_default = ChevronDown;
|
|
10986
10865
|
|
|
10987
10866
|
// src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.ts
|
|
10988
|
-
import { css as
|
|
10989
|
-
import { useMemo as
|
|
10990
|
-
var
|
|
10991
|
-
return
|
|
10992
|
-
const root =
|
|
10867
|
+
import { css as css23 } from "@emotion/css";
|
|
10868
|
+
import { useMemo as useMemo31 } from "react";
|
|
10869
|
+
var useStyles23 = (theme, colorScheme) => {
|
|
10870
|
+
return useMemo31(() => {
|
|
10871
|
+
const root = css23`
|
|
10993
10872
|
display: inline-block;
|
|
10994
10873
|
position: relative;
|
|
10995
10874
|
`;
|
|
10996
|
-
const trigger =
|
|
10875
|
+
const trigger = css23`
|
|
10997
10876
|
display: inline-flex;
|
|
10998
10877
|
align-items: center;
|
|
10999
10878
|
gap: ${theme.vars.spacing.unit};
|
|
@@ -11013,7 +10892,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11013
10892
|
background-color: ${theme.vars.colors.background.surface};
|
|
11014
10893
|
}
|
|
11015
10894
|
`;
|
|
11016
|
-
const triggerLabel =
|
|
10895
|
+
const triggerLabel = css23`
|
|
11017
10896
|
color: ${theme.vars.colors.text.primary};
|
|
11018
10897
|
font-weight: 500;
|
|
11019
10898
|
overflow: hidden;
|
|
@@ -11021,7 +10900,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11021
10900
|
white-space: nowrap;
|
|
11022
10901
|
flex: 1;
|
|
11023
10902
|
`;
|
|
11024
|
-
const content =
|
|
10903
|
+
const content = css23`
|
|
11025
10904
|
min-width: 280px;
|
|
11026
10905
|
max-width: 400px;
|
|
11027
10906
|
background-color: ${theme.vars.colors.background.surface};
|
|
@@ -11031,13 +10910,13 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11031
10910
|
outline: none;
|
|
11032
10911
|
z-index: 1000;
|
|
11033
10912
|
`;
|
|
11034
|
-
const header =
|
|
10913
|
+
const header = css23`
|
|
11035
10914
|
display: flex;
|
|
11036
10915
|
align-items: center;
|
|
11037
10916
|
gap: ${theme.vars.spacing.unit};
|
|
11038
10917
|
padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 2);
|
|
11039
10918
|
`;
|
|
11040
|
-
const headerInfo =
|
|
10919
|
+
const headerInfo = css23`
|
|
11041
10920
|
display: flex;
|
|
11042
10921
|
flex-direction: column;
|
|
11043
10922
|
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
@@ -11045,7 +10924,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11045
10924
|
min-width: 0;
|
|
11046
10925
|
overflow: hidden;
|
|
11047
10926
|
`;
|
|
11048
|
-
const headerName =
|
|
10927
|
+
const headerName = css23`
|
|
11049
10928
|
color: ${theme.vars.colors.text.primary};
|
|
11050
10929
|
font-size: 0.875rem;
|
|
11051
10930
|
font-weight: 500;
|
|
@@ -11054,7 +10933,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11054
10933
|
text-overflow: ellipsis;
|
|
11055
10934
|
white-space: nowrap;
|
|
11056
10935
|
`;
|
|
11057
|
-
const headerMeta =
|
|
10936
|
+
const headerMeta = css23`
|
|
11058
10937
|
color: ${theme.vars.colors.text.secondary};
|
|
11059
10938
|
font-size: 0.75rem;
|
|
11060
10939
|
margin: 0;
|
|
@@ -11062,7 +10941,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11062
10941
|
text-overflow: ellipsis;
|
|
11063
10942
|
white-space: nowrap;
|
|
11064
10943
|
`;
|
|
11065
|
-
const headerRole =
|
|
10944
|
+
const headerRole = css23`
|
|
11066
10945
|
color: ${theme.vars.colors.text.secondary};
|
|
11067
10946
|
font-size: 0.75rem;
|
|
11068
10947
|
margin: 0;
|
|
@@ -11071,16 +10950,16 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11071
10950
|
white-space: nowrap;
|
|
11072
10951
|
text-transform: capitalize;
|
|
11073
10952
|
`;
|
|
11074
|
-
const manageButton =
|
|
10953
|
+
const manageButton = css23`
|
|
11075
10954
|
min-width: auto;
|
|
11076
10955
|
margin-inline-start: auto;
|
|
11077
10956
|
`;
|
|
11078
|
-
const menu =
|
|
10957
|
+
const menu = css23`
|
|
11079
10958
|
display: flex;
|
|
11080
10959
|
flex-direction: column;
|
|
11081
10960
|
width: 100%;
|
|
11082
10961
|
`;
|
|
11083
|
-
const menuItem =
|
|
10962
|
+
const menuItem = css23`
|
|
11084
10963
|
display: flex;
|
|
11085
10964
|
align-items: center;
|
|
11086
10965
|
justify-content: flex-start;
|
|
@@ -11105,11 +10984,11 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11105
10984
|
background-color: ${theme.vars.colors.action?.hover || "rgba(0, 0, 0, 0.04)"};
|
|
11106
10985
|
}
|
|
11107
10986
|
`;
|
|
11108
|
-
const menuDivider =
|
|
10987
|
+
const menuDivider = css23`
|
|
11109
10988
|
margin: calc(${theme.vars.spacing.unit} * 0.5) 0;
|
|
11110
10989
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
11111
10990
|
`;
|
|
11112
|
-
const organizationInfo =
|
|
10991
|
+
const organizationInfo = css23`
|
|
11113
10992
|
display: flex;
|
|
11114
10993
|
flex-direction: column;
|
|
11115
10994
|
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
@@ -11117,7 +10996,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11117
10996
|
min-width: 0;
|
|
11118
10997
|
overflow: hidden;
|
|
11119
10998
|
`;
|
|
11120
|
-
const organizationName =
|
|
10999
|
+
const organizationName = css23`
|
|
11121
11000
|
color: ${theme.vars.colors.text.primary};
|
|
11122
11001
|
font-size: 0.875rem;
|
|
11123
11002
|
font-weight: 500;
|
|
@@ -11126,7 +11005,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11126
11005
|
text-overflow: ellipsis;
|
|
11127
11006
|
white-space: nowrap;
|
|
11128
11007
|
`;
|
|
11129
|
-
const organizationMeta =
|
|
11008
|
+
const organizationMeta = css23`
|
|
11130
11009
|
color: ${theme.vars.colors.text.secondary};
|
|
11131
11010
|
font-size: 0.75rem;
|
|
11132
11011
|
margin: 0;
|
|
@@ -11134,40 +11013,40 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11134
11013
|
text-overflow: ellipsis;
|
|
11135
11014
|
white-space: nowrap;
|
|
11136
11015
|
`;
|
|
11137
|
-
const loadingContainer =
|
|
11016
|
+
const loadingContainer = css23`
|
|
11138
11017
|
display: flex;
|
|
11139
11018
|
align-items: center;
|
|
11140
11019
|
justify-content: center;
|
|
11141
11020
|
min-height: 80px;
|
|
11142
11021
|
gap: ${theme.vars.spacing.unit};
|
|
11143
11022
|
`;
|
|
11144
|
-
const loadingText =
|
|
11023
|
+
const loadingText = css23`
|
|
11145
11024
|
color: ${theme.vars.colors.text.secondary};
|
|
11146
11025
|
font-size: 0.875rem;
|
|
11147
11026
|
`;
|
|
11148
|
-
const errorContainer =
|
|
11027
|
+
const errorContainer = css23`
|
|
11149
11028
|
display: flex;
|
|
11150
11029
|
align-items: center;
|
|
11151
11030
|
justify-content: center;
|
|
11152
11031
|
min-height: 80px;
|
|
11153
11032
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
11154
11033
|
`;
|
|
11155
|
-
const errorText =
|
|
11034
|
+
const errorText = css23`
|
|
11156
11035
|
color: ${theme.vars.colors.text.secondary};
|
|
11157
11036
|
font-size: 0.875rem;
|
|
11158
11037
|
text-align: center;
|
|
11159
11038
|
`;
|
|
11160
|
-
const sectionHeader =
|
|
11039
|
+
const sectionHeader = css23`
|
|
11161
11040
|
text-transform: uppercase;
|
|
11162
11041
|
letter-spacing: 0.05em;
|
|
11163
11042
|
color: ${theme.vars.colors.text.secondary};
|
|
11164
11043
|
`;
|
|
11165
|
-
const sectionHeaderContainer =
|
|
11044
|
+
const sectionHeaderContainer = css23`
|
|
11166
11045
|
border-top: none;
|
|
11167
11046
|
border-bottom: none;
|
|
11168
11047
|
padding-bottom: calc(${theme.vars.spacing.unit} / 2);
|
|
11169
11048
|
`;
|
|
11170
|
-
const roleCapitalized =
|
|
11049
|
+
const roleCapitalized = css23`
|
|
11171
11050
|
text-transform: capitalize;
|
|
11172
11051
|
`;
|
|
11173
11052
|
return {
|
|
@@ -11207,7 +11086,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
11207
11086
|
colorScheme
|
|
11208
11087
|
]);
|
|
11209
11088
|
};
|
|
11210
|
-
var BaseOrganizationSwitcher_styles_default =
|
|
11089
|
+
var BaseOrganizationSwitcher_styles_default = useStyles23;
|
|
11211
11090
|
|
|
11212
11091
|
// src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
|
|
11213
11092
|
import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
@@ -11474,50 +11353,50 @@ import { cx as cx28 } from "@emotion/css";
|
|
|
11474
11353
|
import { useState as useState24 } from "react";
|
|
11475
11354
|
|
|
11476
11355
|
// src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
|
|
11477
|
-
import { css as
|
|
11478
|
-
import { useMemo as
|
|
11479
|
-
var
|
|
11480
|
-
return
|
|
11481
|
-
const root =
|
|
11356
|
+
import { css as css24 } from "@emotion/css";
|
|
11357
|
+
import { useMemo as useMemo32 } from "react";
|
|
11358
|
+
var useStyles24 = (theme, colorScheme) => {
|
|
11359
|
+
return useMemo32(() => {
|
|
11360
|
+
const root = css24`
|
|
11482
11361
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
11483
11362
|
min-width: 600px;
|
|
11484
11363
|
margin: 0 auto;
|
|
11485
11364
|
`;
|
|
11486
|
-
const card =
|
|
11365
|
+
const card = css24`
|
|
11487
11366
|
background: ${theme.vars.colors.background.surface};
|
|
11488
11367
|
border-radius: ${theme.vars.borderRadius.large};
|
|
11489
11368
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
11490
11369
|
`;
|
|
11491
|
-
const content =
|
|
11370
|
+
const content = css24`
|
|
11492
11371
|
display: flex;
|
|
11493
11372
|
flex-direction: column;
|
|
11494
11373
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
11495
11374
|
`;
|
|
11496
|
-
const form =
|
|
11375
|
+
const form = css24`
|
|
11497
11376
|
display: flex;
|
|
11498
11377
|
flex-direction: column;
|
|
11499
11378
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
11500
11379
|
width: 100%;
|
|
11501
11380
|
`;
|
|
11502
|
-
const header =
|
|
11381
|
+
const header = css24`
|
|
11503
11382
|
display: flex;
|
|
11504
11383
|
align-items: center;
|
|
11505
11384
|
gap: calc(${theme.vars.spacing.unit} * 1.5);
|
|
11506
11385
|
margin-bottom: calc(${theme.vars.spacing.unit} * 1.5);
|
|
11507
11386
|
`;
|
|
11508
|
-
const field =
|
|
11387
|
+
const field = css24`
|
|
11509
11388
|
display: flex;
|
|
11510
11389
|
align-items: center;
|
|
11511
11390
|
padding: ${theme.vars.spacing.unit} 0;
|
|
11512
11391
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
11513
11392
|
min-height: 32px;
|
|
11514
11393
|
`;
|
|
11515
|
-
const fieldGroup =
|
|
11394
|
+
const fieldGroup = css24`
|
|
11516
11395
|
display: flex;
|
|
11517
11396
|
flex-direction: column;
|
|
11518
11397
|
gap: calc(${theme.vars.spacing.unit} * 0.5);
|
|
11519
11398
|
`;
|
|
11520
|
-
const textarea =
|
|
11399
|
+
const textarea = css24`
|
|
11521
11400
|
width: 100%;
|
|
11522
11401
|
padding: ${theme.vars.spacing.unit} calc(${theme.vars.spacing.unit} * 1.5);
|
|
11523
11402
|
border: 1px solid ${theme.vars.colors.border};
|
|
@@ -11539,28 +11418,28 @@ var useStyles25 = (theme, colorScheme) => {
|
|
|
11539
11418
|
cursor: not-allowed;
|
|
11540
11419
|
}
|
|
11541
11420
|
`;
|
|
11542
|
-
const textareaError =
|
|
11421
|
+
const textareaError = css24`
|
|
11543
11422
|
border-color: ${theme.vars.colors.error.main};
|
|
11544
11423
|
`;
|
|
11545
|
-
const input =
|
|
11546
|
-
const avatarContainer =
|
|
11424
|
+
const input = css24``;
|
|
11425
|
+
const avatarContainer = css24`
|
|
11547
11426
|
align-items: flex-start;
|
|
11548
11427
|
display: flex;
|
|
11549
11428
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
11550
11429
|
margin-bottom: ${theme.vars.spacing.unit};
|
|
11551
11430
|
`;
|
|
11552
|
-
const actions =
|
|
11431
|
+
const actions = css24`
|
|
11553
11432
|
display: flex;
|
|
11554
11433
|
gap: ${theme.vars.spacing.unit};
|
|
11555
11434
|
justify-content: flex-end;
|
|
11556
11435
|
padding-top: calc(${theme.vars.spacing.unit} * 2);
|
|
11557
11436
|
`;
|
|
11558
|
-
const infoContainer =
|
|
11437
|
+
const infoContainer = css24`
|
|
11559
11438
|
display: flex;
|
|
11560
11439
|
flex-direction: column;
|
|
11561
11440
|
gap: ${theme.vars.spacing.unit};
|
|
11562
11441
|
`;
|
|
11563
|
-
const value =
|
|
11442
|
+
const value = css24`
|
|
11564
11443
|
color: ${theme.vars.colors.text.primary};
|
|
11565
11444
|
flex: 1;
|
|
11566
11445
|
display: flex;
|
|
@@ -11570,10 +11449,10 @@ var useStyles25 = (theme, colorScheme) => {
|
|
|
11570
11449
|
min-height: 32px;
|
|
11571
11450
|
line-height: 32px;
|
|
11572
11451
|
`;
|
|
11573
|
-
const popup =
|
|
11452
|
+
const popup = css24`
|
|
11574
11453
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
11575
11454
|
`;
|
|
11576
|
-
const errorAlert =
|
|
11455
|
+
const errorAlert = css24`
|
|
11577
11456
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
11578
11457
|
`;
|
|
11579
11458
|
return {
|
|
@@ -11609,7 +11488,7 @@ var useStyles25 = (theme, colorScheme) => {
|
|
|
11609
11488
|
colorScheme
|
|
11610
11489
|
]);
|
|
11611
11490
|
};
|
|
11612
|
-
var BaseCreateOrganization_styles_default =
|
|
11491
|
+
var BaseCreateOrganization_styles_default = useStyles24;
|
|
11613
11492
|
|
|
11614
11493
|
// src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
|
|
11615
11494
|
import { jsx as jsx88, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
@@ -11869,30 +11748,30 @@ import { cx as cx29 } from "@emotion/css";
|
|
|
11869
11748
|
import { useState as useState26, useCallback as useCallback14 } from "react";
|
|
11870
11749
|
|
|
11871
11750
|
// src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
|
|
11872
|
-
import { css as
|
|
11873
|
-
import { useMemo as
|
|
11874
|
-
var
|
|
11875
|
-
return
|
|
11876
|
-
const container =
|
|
11751
|
+
import { css as css25 } from "@emotion/css";
|
|
11752
|
+
import { useMemo as useMemo33 } from "react";
|
|
11753
|
+
var useStyles25 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
11754
|
+
return useMemo33(() => {
|
|
11755
|
+
const container = css25`
|
|
11877
11756
|
display: flex;
|
|
11878
11757
|
flex-direction: column;
|
|
11879
11758
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
11880
11759
|
`;
|
|
11881
|
-
const label =
|
|
11760
|
+
const label = css25`
|
|
11882
11761
|
font-size: 0.875rem;
|
|
11883
11762
|
font-weight: 500;
|
|
11884
11763
|
color: ${theme.vars.colors.text.primary};
|
|
11885
11764
|
margin-bottom: calc(${theme.vars.spacing.unit} / 2);
|
|
11886
11765
|
`;
|
|
11887
|
-
const requiredIndicator =
|
|
11766
|
+
const requiredIndicator = css25`
|
|
11888
11767
|
color: ${theme.vars.colors.error.main};
|
|
11889
11768
|
`;
|
|
11890
|
-
const pairsList =
|
|
11769
|
+
const pairsList = css25`
|
|
11891
11770
|
display: flex;
|
|
11892
11771
|
flex-direction: column;
|
|
11893
11772
|
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
11894
11773
|
`;
|
|
11895
|
-
const pairRow =
|
|
11774
|
+
const pairRow = css25`
|
|
11896
11775
|
display: flex;
|
|
11897
11776
|
align-items: center;
|
|
11898
11777
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
@@ -11905,11 +11784,11 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
|
11905
11784
|
background-color: ${theme.vars.colors.action.hover};
|
|
11906
11785
|
}
|
|
11907
11786
|
`;
|
|
11908
|
-
const pairInput =
|
|
11787
|
+
const pairInput = css25`
|
|
11909
11788
|
flex: 1;
|
|
11910
11789
|
min-width: 0;
|
|
11911
11790
|
`;
|
|
11912
|
-
const addRow =
|
|
11791
|
+
const addRow = css25`
|
|
11913
11792
|
display: flex;
|
|
11914
11793
|
align-items: center;
|
|
11915
11794
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
@@ -11919,7 +11798,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
|
11919
11798
|
background-color: transparent;
|
|
11920
11799
|
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
11921
11800
|
`;
|
|
11922
|
-
const removeButton =
|
|
11801
|
+
const removeButton = css25`
|
|
11923
11802
|
min-width: auto;
|
|
11924
11803
|
width: 24px;
|
|
11925
11804
|
height: 24px;
|
|
@@ -11942,7 +11821,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
|
11942
11821
|
opacity: 0.6;
|
|
11943
11822
|
}
|
|
11944
11823
|
`;
|
|
11945
|
-
const addButton =
|
|
11824
|
+
const addButton = css25`
|
|
11946
11825
|
min-width: auto;
|
|
11947
11826
|
width: 24px;
|
|
11948
11827
|
height: 24px;
|
|
@@ -11965,39 +11844,39 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
|
11965
11844
|
opacity: 0.6;
|
|
11966
11845
|
}
|
|
11967
11846
|
`;
|
|
11968
|
-
const helperText =
|
|
11847
|
+
const helperText = css25`
|
|
11969
11848
|
font-size: 0.75rem;
|
|
11970
11849
|
color: ${hasError ? theme.vars.colors.error.main : theme.vars.colors.text.secondary};
|
|
11971
11850
|
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
11972
11851
|
`;
|
|
11973
|
-
const emptyState =
|
|
11852
|
+
const emptyState = css25`
|
|
11974
11853
|
padding: ${theme.vars.spacing.unit};
|
|
11975
11854
|
text-align: center;
|
|
11976
11855
|
color: ${theme.vars.colors.text.secondary};
|
|
11977
11856
|
font-style: italic;
|
|
11978
11857
|
font-size: 0.75rem;
|
|
11979
11858
|
`;
|
|
11980
|
-
const readOnlyPair =
|
|
11859
|
+
const readOnlyPair = css25`
|
|
11981
11860
|
display: flex;
|
|
11982
11861
|
align-items: center;
|
|
11983
11862
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
11984
11863
|
padding: calc(${theme.vars.spacing.unit} / 4) 0;
|
|
11985
11864
|
min-height: 20px;
|
|
11986
11865
|
`;
|
|
11987
|
-
const readOnlyKey =
|
|
11866
|
+
const readOnlyKey = css25`
|
|
11988
11867
|
font-size: 0.75rem;
|
|
11989
11868
|
font-weight: 500;
|
|
11990
11869
|
color: ${theme.vars.colors.text.secondary};
|
|
11991
11870
|
min-width: 80px;
|
|
11992
11871
|
flex-shrink: 0;
|
|
11993
11872
|
`;
|
|
11994
|
-
const readOnlyValue =
|
|
11873
|
+
const readOnlyValue = css25`
|
|
11995
11874
|
font-size: 0.75rem;
|
|
11996
11875
|
color: ${theme.vars.colors.text.primary};
|
|
11997
11876
|
word-break: break-word;
|
|
11998
11877
|
flex: 1;
|
|
11999
11878
|
`;
|
|
12000
|
-
const counterText =
|
|
11879
|
+
const counterText = css25`
|
|
12001
11880
|
font-size: 0.75rem;
|
|
12002
11881
|
color: ${theme.vars.colors.text.secondary};
|
|
12003
11882
|
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
@@ -12021,7 +11900,7 @@ var useStyles26 = (theme, colorScheme, disabled, readOnly, hasError) => {
|
|
|
12021
11900
|
};
|
|
12022
11901
|
}, [theme, colorScheme, disabled, readOnly, hasError]);
|
|
12023
11902
|
};
|
|
12024
|
-
var KeyValueInput_styles_default =
|
|
11903
|
+
var KeyValueInput_styles_default = useStyles25;
|
|
12025
11904
|
|
|
12026
11905
|
// src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
12027
11906
|
import { jsx as jsx90, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
@@ -12231,48 +12110,48 @@ var KeyValueInput = ({
|
|
|
12231
12110
|
var KeyValueInput_default = KeyValueInput;
|
|
12232
12111
|
|
|
12233
12112
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.ts
|
|
12234
|
-
import { css as
|
|
12235
|
-
import { useMemo as
|
|
12236
|
-
var
|
|
12237
|
-
return
|
|
12113
|
+
import { css as css26 } from "@emotion/css";
|
|
12114
|
+
import { useMemo as useMemo34 } from "react";
|
|
12115
|
+
var useStyles26 = (theme, colorScheme) => {
|
|
12116
|
+
return useMemo34(() => {
|
|
12238
12117
|
return {
|
|
12239
|
-
root:
|
|
12118
|
+
root: css26`
|
|
12240
12119
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
12241
12120
|
min-width: 600px;
|
|
12242
12121
|
margin: 0 auto;
|
|
12243
12122
|
`,
|
|
12244
|
-
card:
|
|
12123
|
+
card: css26`
|
|
12245
12124
|
background: ${theme.vars.colors.background.surface};
|
|
12246
12125
|
border-radius: ${theme.vars.borderRadius.large};
|
|
12247
12126
|
`,
|
|
12248
|
-
header:
|
|
12127
|
+
header: css26`
|
|
12249
12128
|
display: flex;
|
|
12250
12129
|
align-items: center;
|
|
12251
12130
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
12252
12131
|
margin-bottom: calc(${theme.vars.spacing.unit} * 3);
|
|
12253
12132
|
padding-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
12254
12133
|
`,
|
|
12255
|
-
orgInfo:
|
|
12134
|
+
orgInfo: css26`
|
|
12256
12135
|
flex: 1;
|
|
12257
12136
|
`,
|
|
12258
|
-
name:
|
|
12137
|
+
name: css26`
|
|
12259
12138
|
font-size: 1.5rem;
|
|
12260
12139
|
font-weight: 600;
|
|
12261
12140
|
margin: 0 0 8px 0;
|
|
12262
12141
|
color: ${theme.vars.colors.text.primary};
|
|
12263
12142
|
`,
|
|
12264
|
-
handle:
|
|
12143
|
+
handle: css26`
|
|
12265
12144
|
font-size: 1rem;
|
|
12266
12145
|
color: ${theme.vars.colors.text.secondary};
|
|
12267
12146
|
margin: 0;
|
|
12268
12147
|
font-family: monospace;
|
|
12269
12148
|
`,
|
|
12270
|
-
infoContainer:
|
|
12149
|
+
infoContainer: css26`
|
|
12271
12150
|
display: flex;
|
|
12272
12151
|
flex-direction: column;
|
|
12273
12152
|
gap: ${theme.vars.spacing.unit};
|
|
12274
12153
|
`,
|
|
12275
|
-
field:
|
|
12154
|
+
field: css26`
|
|
12276
12155
|
display: flex;
|
|
12277
12156
|
align-items: flex-start;
|
|
12278
12157
|
padding: calc(${theme.vars.spacing.unit} / 2) 0;
|
|
@@ -12280,21 +12159,21 @@ var useStyles27 = (theme, colorScheme) => {
|
|
|
12280
12159
|
min-height: 28px;
|
|
12281
12160
|
gap: ${theme.vars.spacing.unit};
|
|
12282
12161
|
`,
|
|
12283
|
-
fieldLast:
|
|
12162
|
+
fieldLast: css26`
|
|
12284
12163
|
border-bottom: none;
|
|
12285
12164
|
`,
|
|
12286
|
-
fieldContent:
|
|
12165
|
+
fieldContent: css26`
|
|
12287
12166
|
flex: 1;
|
|
12288
12167
|
display: flex;
|
|
12289
12168
|
align-items: center;
|
|
12290
12169
|
gap: ${theme.vars.spacing.unit};
|
|
12291
12170
|
`,
|
|
12292
|
-
fieldActions:
|
|
12171
|
+
fieldActions: css26`
|
|
12293
12172
|
display: flex;
|
|
12294
12173
|
align-items: center;
|
|
12295
12174
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
12296
12175
|
`,
|
|
12297
|
-
label:
|
|
12176
|
+
label: css26`
|
|
12298
12177
|
font-size: 0.875rem;
|
|
12299
12178
|
font-weight: 500;
|
|
12300
12179
|
color: ${theme.vars.colors.text.secondary};
|
|
@@ -12302,7 +12181,7 @@ var useStyles27 = (theme, colorScheme) => {
|
|
|
12302
12181
|
flex-shrink: 0;
|
|
12303
12182
|
line-height: 28px;
|
|
12304
12183
|
`,
|
|
12305
|
-
value:
|
|
12184
|
+
value: css26`
|
|
12306
12185
|
color: ${theme.vars.colors.text.primary};
|
|
12307
12186
|
flex: 1;
|
|
12308
12187
|
display: flex;
|
|
@@ -12313,11 +12192,11 @@ var useStyles27 = (theme, colorScheme) => {
|
|
|
12313
12192
|
line-height: 28px;
|
|
12314
12193
|
word-break: break-word;
|
|
12315
12194
|
`,
|
|
12316
|
-
valueEmpty:
|
|
12195
|
+
valueEmpty: css26`
|
|
12317
12196
|
font-style: italic;
|
|
12318
12197
|
opacity: 0.7;
|
|
12319
12198
|
`,
|
|
12320
|
-
statusBadge:
|
|
12199
|
+
statusBadge: css26`
|
|
12321
12200
|
padding: calc(${theme.vars.spacing.unit} / 2) ${theme.vars.spacing.unit};
|
|
12322
12201
|
border-radius: ${theme.vars.borderRadius.small};
|
|
12323
12202
|
font-size: 0.75rem;
|
|
@@ -12326,12 +12205,12 @@ var useStyles27 = (theme, colorScheme) => {
|
|
|
12326
12205
|
text-transform: uppercase;
|
|
12327
12206
|
letter-spacing: 0.5px;
|
|
12328
12207
|
`,
|
|
12329
|
-
permissionsList:
|
|
12208
|
+
permissionsList: css26`
|
|
12330
12209
|
display: flex;
|
|
12331
12210
|
flex-wrap: wrap;
|
|
12332
12211
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
12333
12212
|
`,
|
|
12334
|
-
permissionBadge:
|
|
12213
|
+
permissionBadge: css26`
|
|
12335
12214
|
padding: calc(${theme.vars.spacing.unit} / 4) ${theme.vars.spacing.unit};
|
|
12336
12215
|
border-radius: ${theme.vars.borderRadius.small};
|
|
12337
12216
|
font-size: 0.75rem;
|
|
@@ -12339,52 +12218,52 @@ var useStyles27 = (theme, colorScheme) => {
|
|
|
12339
12218
|
color: ${theme.vars.colors.primary.contrastText};
|
|
12340
12219
|
border: 1px solid ${theme.vars.colors.border};
|
|
12341
12220
|
`,
|
|
12342
|
-
attributesList:
|
|
12221
|
+
attributesList: css26`
|
|
12343
12222
|
display: flex;
|
|
12344
12223
|
flex-direction: column;
|
|
12345
12224
|
gap: calc(${theme.vars.spacing.unit} / 4);
|
|
12346
12225
|
`,
|
|
12347
|
-
attributeItem:
|
|
12226
|
+
attributeItem: css26`
|
|
12348
12227
|
display: flex;
|
|
12349
12228
|
gap: ${theme.vars.spacing.unit};
|
|
12350
12229
|
padding: calc(${theme.vars.spacing.unit} / 4) 0;
|
|
12351
12230
|
align-items: center;
|
|
12352
12231
|
`,
|
|
12353
|
-
attributeKey:
|
|
12232
|
+
attributeKey: css26`
|
|
12354
12233
|
font-size: 0.75rem;
|
|
12355
12234
|
font-weight: 500;
|
|
12356
12235
|
color: ${theme.vars.colors.text.secondary};
|
|
12357
12236
|
min-width: 80px;
|
|
12358
12237
|
flex-shrink: 0;
|
|
12359
12238
|
`,
|
|
12360
|
-
attributeValue:
|
|
12239
|
+
attributeValue: css26`
|
|
12361
12240
|
font-size: 0.75rem;
|
|
12362
12241
|
color: ${theme.vars.colors.text.primary};
|
|
12363
12242
|
word-break: break-word;
|
|
12364
12243
|
flex: 1;
|
|
12365
12244
|
`,
|
|
12366
|
-
popup:
|
|
12245
|
+
popup: css26`
|
|
12367
12246
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
12368
12247
|
`,
|
|
12369
|
-
editButton:
|
|
12248
|
+
editButton: css26`
|
|
12370
12249
|
min-width: auto;
|
|
12371
12250
|
padding: calc(${theme.vars.spacing.unit} / 2);
|
|
12372
12251
|
min-height: auto;
|
|
12373
12252
|
`,
|
|
12374
|
-
placeholderButton:
|
|
12253
|
+
placeholderButton: css26`
|
|
12375
12254
|
font-style: italic;
|
|
12376
12255
|
text-decoration: underline;
|
|
12377
12256
|
opacity: 0.7;
|
|
12378
12257
|
padding: 0;
|
|
12379
12258
|
min-height: auto;
|
|
12380
12259
|
`,
|
|
12381
|
-
fieldInput:
|
|
12260
|
+
fieldInput: css26`
|
|
12382
12261
|
margin-bottom: 0;
|
|
12383
12262
|
`
|
|
12384
12263
|
};
|
|
12385
12264
|
}, [theme, colorScheme]);
|
|
12386
12265
|
};
|
|
12387
|
-
var BaseOrganizationProfile_styles_default =
|
|
12266
|
+
var BaseOrganizationProfile_styles_default = useStyles26;
|
|
12388
12267
|
|
|
12389
12268
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
|
|
12390
12269
|
import { Fragment as Fragment19, jsx as jsx91, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
@@ -12809,21 +12688,21 @@ import { useEffect as useEffect16, useState as useState29 } from "react";
|
|
|
12809
12688
|
|
|
12810
12689
|
// src/components/presentation/OrganizationList/BaseOrganizationList.tsx
|
|
12811
12690
|
import { cx as cx31 } from "@emotion/css";
|
|
12812
|
-
import { useMemo as
|
|
12691
|
+
import { useMemo as useMemo36 } from "react";
|
|
12813
12692
|
|
|
12814
12693
|
// src/components/presentation/OrganizationList/BaseOrganizationList.styles.ts
|
|
12815
|
-
import { css as
|
|
12816
|
-
import { useMemo as
|
|
12817
|
-
var
|
|
12818
|
-
return
|
|
12819
|
-
const root =
|
|
12694
|
+
import { css as css27 } from "@emotion/css";
|
|
12695
|
+
import { useMemo as useMemo35 } from "react";
|
|
12696
|
+
var useStyles27 = (theme, colorScheme) => {
|
|
12697
|
+
return useMemo35(() => {
|
|
12698
|
+
const root = css27`
|
|
12820
12699
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
12821
12700
|
min-width: 600px;
|
|
12822
12701
|
margin: 0 auto;
|
|
12823
12702
|
background: ${theme.vars.colors.background.surface};
|
|
12824
12703
|
border-radius: ${theme.vars.borderRadius.large};
|
|
12825
12704
|
`;
|
|
12826
|
-
const header =
|
|
12705
|
+
const header = css27`
|
|
12827
12706
|
display: flex;
|
|
12828
12707
|
align-items: center;
|
|
12829
12708
|
justify-content: space-between;
|
|
@@ -12831,21 +12710,21 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12831
12710
|
padding-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
12832
12711
|
border-bottom: 1px solid ${theme.vars.colors.border};
|
|
12833
12712
|
`;
|
|
12834
|
-
const headerInfo =
|
|
12713
|
+
const headerInfo = css27`
|
|
12835
12714
|
flex: 1;
|
|
12836
12715
|
`;
|
|
12837
|
-
const title =
|
|
12716
|
+
const title = css27`
|
|
12838
12717
|
font-size: 1.5rem;
|
|
12839
12718
|
font-weight: 600;
|
|
12840
12719
|
margin: 0 0 8px 0;
|
|
12841
12720
|
color: ${theme.vars.colors.text.primary};
|
|
12842
12721
|
`;
|
|
12843
|
-
const subtitle =
|
|
12722
|
+
const subtitle = css27`
|
|
12844
12723
|
color: ${theme.vars.colors.text.secondary};
|
|
12845
12724
|
font-size: 0.875rem;
|
|
12846
12725
|
margin: 0;
|
|
12847
12726
|
`;
|
|
12848
|
-
const refreshButton =
|
|
12727
|
+
const refreshButton = css27`
|
|
12849
12728
|
background-color: ${theme.vars.colors.background.surface};
|
|
12850
12729
|
border: 1px solid ${theme.vars.colors.border};
|
|
12851
12730
|
border-radius: ${theme.vars.borderRadius.small};
|
|
@@ -12859,12 +12738,12 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12859
12738
|
border-color: ${theme.vars.colors.primary.main};
|
|
12860
12739
|
}
|
|
12861
12740
|
`;
|
|
12862
|
-
const listContainer =
|
|
12741
|
+
const listContainer = css27`
|
|
12863
12742
|
display: flex;
|
|
12864
12743
|
flex-direction: column;
|
|
12865
12744
|
gap: calc(${theme.vars.spacing.unit} * 1.5);
|
|
12866
12745
|
`;
|
|
12867
|
-
const organizationItem =
|
|
12746
|
+
const organizationItem = css27`
|
|
12868
12747
|
border: 1px solid ${theme.vars.colors.border};
|
|
12869
12748
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
12870
12749
|
display: flex;
|
|
@@ -12877,46 +12756,46 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12877
12756
|
box-shadow: 0 2px 8px ${theme.vars.colors.primary.main}20;
|
|
12878
12757
|
}
|
|
12879
12758
|
`;
|
|
12880
|
-
const organizationContent =
|
|
12759
|
+
const organizationContent = css27`
|
|
12881
12760
|
display: flex;
|
|
12882
12761
|
align-items: center;
|
|
12883
12762
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
12884
12763
|
flex: 1;
|
|
12885
12764
|
`;
|
|
12886
|
-
const organizationInfo =
|
|
12765
|
+
const organizationInfo = css27`
|
|
12887
12766
|
flex: 1;
|
|
12888
12767
|
`;
|
|
12889
|
-
const organizationName =
|
|
12768
|
+
const organizationName = css27`
|
|
12890
12769
|
font-size: 1.125rem;
|
|
12891
12770
|
font-weight: 600;
|
|
12892
12771
|
margin: 0 0 4px 0;
|
|
12893
12772
|
color: ${theme.vars.colors.text.primary};
|
|
12894
12773
|
`;
|
|
12895
|
-
const organizationHandle =
|
|
12774
|
+
const organizationHandle = css27`
|
|
12896
12775
|
color: ${theme.vars.colors.text.secondary};
|
|
12897
12776
|
font-size: 0.875rem;
|
|
12898
12777
|
margin: 0 0 4px 0;
|
|
12899
12778
|
font-family: monospace;
|
|
12900
12779
|
`;
|
|
12901
|
-
const organizationStatus =
|
|
12780
|
+
const organizationStatus = css27`
|
|
12902
12781
|
color: ${theme.vars.colors.text.secondary};
|
|
12903
12782
|
font-size: 0.875rem;
|
|
12904
12783
|
margin: 0;
|
|
12905
12784
|
`;
|
|
12906
|
-
const statusText =
|
|
12785
|
+
const statusText = css27`
|
|
12907
12786
|
font-weight: 500;
|
|
12908
12787
|
`;
|
|
12909
|
-
const statusTextActive =
|
|
12788
|
+
const statusTextActive = css27`
|
|
12910
12789
|
color: ${theme.vars.colors.success.main};
|
|
12911
12790
|
`;
|
|
12912
|
-
const statusTextInactive =
|
|
12791
|
+
const statusTextInactive = css27`
|
|
12913
12792
|
color: ${theme.vars.colors.error.main};
|
|
12914
12793
|
`;
|
|
12915
|
-
const organizationActions =
|
|
12794
|
+
const organizationActions = css27`
|
|
12916
12795
|
display: flex;
|
|
12917
12796
|
align-items: center;
|
|
12918
12797
|
`;
|
|
12919
|
-
const badge =
|
|
12798
|
+
const badge = css27`
|
|
12920
12799
|
border-radius: ${theme.vars.borderRadius.large};
|
|
12921
12800
|
font-size: 0.75rem;
|
|
12922
12801
|
font-weight: 500;
|
|
@@ -12924,15 +12803,15 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12924
12803
|
text-transform: uppercase;
|
|
12925
12804
|
letter-spacing: 0.5px;
|
|
12926
12805
|
`;
|
|
12927
|
-
const badgeSuccess =
|
|
12806
|
+
const badgeSuccess = css27`
|
|
12928
12807
|
background-color: color-mix(in srgb, ${theme.vars.colors.success.main} 20%, transparent);
|
|
12929
12808
|
color: ${theme.vars.colors.success.main};
|
|
12930
12809
|
`;
|
|
12931
|
-
const badgeError =
|
|
12810
|
+
const badgeError = css27`
|
|
12932
12811
|
background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
|
|
12933
12812
|
color: ${theme.vars.colors.error.main};
|
|
12934
12813
|
`;
|
|
12935
|
-
const loadingContainer =
|
|
12814
|
+
const loadingContainer = css27`
|
|
12936
12815
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
12937
12816
|
text-align: center;
|
|
12938
12817
|
display: flex;
|
|
@@ -12940,25 +12819,25 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12940
12819
|
align-items: center;
|
|
12941
12820
|
gap: calc(${theme.vars.spacing.unit} * 2);
|
|
12942
12821
|
`;
|
|
12943
|
-
const loadingText =
|
|
12822
|
+
const loadingText = css27`
|
|
12944
12823
|
margin-top: ${theme.vars.spacing.unit};
|
|
12945
12824
|
`;
|
|
12946
|
-
const errorContainer =
|
|
12825
|
+
const errorContainer = css27`
|
|
12947
12826
|
background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 20%, transparent);
|
|
12948
12827
|
border: 1px solid ${theme.vars.colors.error.main};
|
|
12949
12828
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
12950
12829
|
color: ${theme.vars.colors.error.main};
|
|
12951
12830
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
12952
12831
|
`;
|
|
12953
|
-
const emptyContainer =
|
|
12832
|
+
const emptyContainer = css27`
|
|
12954
12833
|
padding: calc(${theme.vars.spacing.unit} * 4);
|
|
12955
12834
|
text-align: center;
|
|
12956
12835
|
`;
|
|
12957
|
-
const emptyText =
|
|
12836
|
+
const emptyText = css27`
|
|
12958
12837
|
color: ${theme.vars.colors.text.secondary};
|
|
12959
12838
|
font-size: 1rem;
|
|
12960
12839
|
`;
|
|
12961
|
-
const loadMoreButton =
|
|
12840
|
+
const loadMoreButton = css27`
|
|
12962
12841
|
background-color: ${theme.vars.colors.primary.main};
|
|
12963
12842
|
border: none;
|
|
12964
12843
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
@@ -12979,13 +12858,13 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
12979
12858
|
opacity: 0.6;
|
|
12980
12859
|
}
|
|
12981
12860
|
`;
|
|
12982
|
-
const errorMargin =
|
|
12861
|
+
const errorMargin = css27`
|
|
12983
12862
|
margin-top: calc(${theme.vars.spacing.unit} * 2);
|
|
12984
12863
|
`;
|
|
12985
|
-
const loadMoreMargin =
|
|
12864
|
+
const loadMoreMargin = css27`
|
|
12986
12865
|
margin-top: calc(${theme.vars.spacing.unit} * 3);
|
|
12987
12866
|
`;
|
|
12988
|
-
const popupContent =
|
|
12867
|
+
const popupContent = css27`
|
|
12989
12868
|
padding: ${theme.vars.spacing.unit};
|
|
12990
12869
|
`;
|
|
12991
12870
|
return {
|
|
@@ -13035,7 +12914,7 @@ var useStyles28 = (theme, colorScheme) => {
|
|
|
13035
12914
|
colorScheme
|
|
13036
12915
|
]);
|
|
13037
12916
|
};
|
|
13038
|
-
var BaseOrganizationList_styles_default =
|
|
12917
|
+
var BaseOrganizationList_styles_default = useStyles27;
|
|
13039
12918
|
|
|
13040
12919
|
// src/components/presentation/OrganizationList/BaseOrganizationList.tsx
|
|
13041
12920
|
import { jsx as jsx93, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
@@ -13116,7 +12995,7 @@ var BaseOrganizationList = ({
|
|
|
13116
12995
|
const { theme, colorScheme } = useTheme_default();
|
|
13117
12996
|
const styles = BaseOrganizationList_styles_default(theme, colorScheme);
|
|
13118
12997
|
const { t } = useTranslation_default();
|
|
13119
|
-
const organizationsWithSwitchAccess =
|
|
12998
|
+
const organizationsWithSwitchAccess = useMemo36(() => {
|
|
13120
12999
|
if (!allOrganizations?.organizations) {
|
|
13121
13000
|
return [];
|
|
13122
13001
|
}
|
|
@@ -13186,11 +13065,11 @@ var BaseOrganizationList = ({
|
|
|
13186
13065
|
var BaseOrganizationList_default = BaseOrganizationList;
|
|
13187
13066
|
|
|
13188
13067
|
// src/components/presentation/OrganizationList/OrganizationList.styles.ts
|
|
13189
|
-
import { css as
|
|
13190
|
-
import { useMemo as
|
|
13191
|
-
var
|
|
13192
|
-
return
|
|
13193
|
-
const cssOrganizationListWrapper =
|
|
13068
|
+
import { css as css28 } from "@emotion/css";
|
|
13069
|
+
import { useMemo as useMemo37 } from "react";
|
|
13070
|
+
var useStyles28 = (theme, colorScheme) => {
|
|
13071
|
+
return useMemo37(() => {
|
|
13072
|
+
const cssOrganizationListWrapper = css28`
|
|
13194
13073
|
/* Container wrapper styles for OrganizationList component */
|
|
13195
13074
|
width: 100%;
|
|
13196
13075
|
|
|
@@ -13221,11 +13100,11 @@ var useStyles29 = (theme, colorScheme) => {
|
|
|
13221
13100
|
`;
|
|
13222
13101
|
return {
|
|
13223
13102
|
root: cssOrganizationListWrapper,
|
|
13224
|
-
container:
|
|
13103
|
+
container: css28`
|
|
13225
13104
|
position: relative;
|
|
13226
13105
|
width: 100%;
|
|
13227
13106
|
`,
|
|
13228
|
-
errorState:
|
|
13107
|
+
errorState: css28`
|
|
13229
13108
|
padding: calc(${theme.vars.spacing.unit} * 2);
|
|
13230
13109
|
background-color: color-mix(in srgb, ${theme.vars.colors.error.main} 10%, transparent);
|
|
13231
13110
|
border: 1px solid ${theme.vars.colors.error.main};
|
|
@@ -13233,7 +13112,7 @@ var useStyles29 = (theme, colorScheme) => {
|
|
|
13233
13112
|
color: ${theme.vars.colors.error.main};
|
|
13234
13113
|
text-align: center;
|
|
13235
13114
|
`,
|
|
13236
|
-
loadingOverlay:
|
|
13115
|
+
loadingOverlay: css28`
|
|
13237
13116
|
position: absolute;
|
|
13238
13117
|
inset: 0;
|
|
13239
13118
|
background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
|
|
@@ -13246,7 +13125,7 @@ var useStyles29 = (theme, colorScheme) => {
|
|
|
13246
13125
|
};
|
|
13247
13126
|
}, [theme, colorScheme]);
|
|
13248
13127
|
};
|
|
13249
|
-
var OrganizationList_styles_default =
|
|
13128
|
+
var OrganizationList_styles_default = useStyles28;
|
|
13250
13129
|
|
|
13251
13130
|
// src/components/presentation/OrganizationList/OrganizationList.tsx
|
|
13252
13131
|
import { jsx as jsx94 } from "react/jsx-runtime";
|