@asgardeo/react 0.5.33 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +319 -156
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/presentation/SignUp/BaseSignUp.d.ts +95 -6
- package/dist/components/presentation/SignUp/SignUp.d.ts +52 -3
- package/dist/components/presentation/SignUp/transformer.d.ts +30 -0
- package/dist/contexts/Theme/ThemeContext.d.ts +4 -0
- package/dist/contexts/Theme/types.d.ts +5 -0
- package/dist/index.js +210 -45
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -63,7 +63,8 @@ import {
|
|
|
63
63
|
navigate,
|
|
64
64
|
getRedirectBasedSignUpUrl,
|
|
65
65
|
Platform,
|
|
66
|
-
isEmpty
|
|
66
|
+
isEmpty,
|
|
67
|
+
executeEmbeddedSignUpFlowV2
|
|
67
68
|
} from "@asgardeo/browser";
|
|
68
69
|
|
|
69
70
|
// src/__temp__/api.ts
|
|
@@ -778,16 +779,22 @@ var AsgardeoReactClient = class extends AsgardeoBrowserClient {
|
|
|
778
779
|
return Promise.resolve(String(response));
|
|
779
780
|
}
|
|
780
781
|
async signUp(...args) {
|
|
781
|
-
const
|
|
782
|
+
const config = await this.asgardeo.getConfigData();
|
|
782
783
|
const firstArg = args[0];
|
|
784
|
+
const baseUrl = config?.baseUrl;
|
|
785
|
+
if (config.platform === Platform.AsgardeoV2) {
|
|
786
|
+
return executeEmbeddedSignUpFlowV2({
|
|
787
|
+
baseUrl,
|
|
788
|
+
payload: firstArg
|
|
789
|
+
});
|
|
790
|
+
}
|
|
783
791
|
if (typeof firstArg === "object" && "flowType" in firstArg) {
|
|
784
|
-
const baseUrl = configData?.baseUrl;
|
|
785
792
|
return executeEmbeddedSignUpFlow({
|
|
786
793
|
baseUrl,
|
|
787
794
|
payload: firstArg
|
|
788
795
|
});
|
|
789
796
|
}
|
|
790
|
-
navigate(getRedirectBasedSignUpUrl(
|
|
797
|
+
navigate(getRedirectBasedSignUpUrl(config));
|
|
791
798
|
}
|
|
792
799
|
async request(requestConfig) {
|
|
793
800
|
return this.asgardeo.httpRequest(requestConfig);
|
|
@@ -1283,6 +1290,7 @@ var ThemeProvider = ({
|
|
|
1283
1290
|
};
|
|
1284
1291
|
}, [inheritFromBranding, brandingTheme, themeConfig]);
|
|
1285
1292
|
const theme = useMemo4(() => createTheme(finalThemeConfig, colorScheme === "dark"), [finalThemeConfig, colorScheme]);
|
|
1293
|
+
const direction = finalThemeConfig?.direction || "ltr";
|
|
1286
1294
|
const handleThemeChange = useCallback4((isDark) => {
|
|
1287
1295
|
setColorScheme(isDark ? "dark" : "light");
|
|
1288
1296
|
}, []);
|
|
@@ -1321,9 +1329,15 @@ var ThemeProvider = ({
|
|
|
1321
1329
|
useEffect2(() => {
|
|
1322
1330
|
applyThemeToDOM(theme);
|
|
1323
1331
|
}, [theme]);
|
|
1332
|
+
useEffect2(() => {
|
|
1333
|
+
if (typeof document !== "undefined") {
|
|
1334
|
+
document.documentElement.dir = direction;
|
|
1335
|
+
}
|
|
1336
|
+
}, [direction]);
|
|
1324
1337
|
const value = {
|
|
1325
1338
|
theme,
|
|
1326
1339
|
colorScheme,
|
|
1340
|
+
direction,
|
|
1327
1341
|
toggleTheme,
|
|
1328
1342
|
isBrandingLoading,
|
|
1329
1343
|
brandingError,
|
|
@@ -1785,7 +1799,10 @@ var AsgardeoProvider = ({
|
|
|
1785
1799
|
ThemeProvider_default,
|
|
1786
1800
|
{
|
|
1787
1801
|
inheritFromBranding: preferences?.theme?.inheritFromBranding,
|
|
1788
|
-
theme:
|
|
1802
|
+
theme: {
|
|
1803
|
+
...preferences?.theme?.overrides,
|
|
1804
|
+
direction: preferences?.theme?.direction
|
|
1805
|
+
},
|
|
1789
1806
|
mode: getActiveTheme(preferences?.theme?.mode),
|
|
1790
1807
|
children: /* @__PURE__ */ jsx7(FlowProvider_default, { children: /* @__PURE__ */ jsx7(UserProvider_default, { profile: userProfile, onUpdateProfile: handleProfileUpdate, children: /* @__PURE__ */ jsx7(
|
|
1791
1808
|
OrganizationProvider_default,
|
|
@@ -3288,13 +3305,13 @@ import { useMemo as useMemo11 } from "react";
|
|
|
3288
3305
|
var useStyles4 = (theme, colorScheme, helperTextAlign, helperTextMarginLeft, hasError) => {
|
|
3289
3306
|
return useMemo11(() => {
|
|
3290
3307
|
const formControl = css4`
|
|
3291
|
-
text-align:
|
|
3308
|
+
text-align: start;
|
|
3292
3309
|
margin-bottom: calc(${theme.vars.spacing.unit} * 2);
|
|
3293
3310
|
`;
|
|
3294
3311
|
const helperText = css4`
|
|
3295
3312
|
margin-top: calc(${theme.vars.spacing.unit} / 2);
|
|
3296
|
-
text-align: ${helperTextAlign};
|
|
3297
|
-
${helperTextMarginLeft && `margin-
|
|
3313
|
+
text-align: ${helperTextAlign === "left" ? "start" : helperTextAlign};
|
|
3314
|
+
${helperTextMarginLeft && `margin-inline-start: ${helperTextMarginLeft};`}
|
|
3298
3315
|
`;
|
|
3299
3316
|
const helperTextError = css4`
|
|
3300
3317
|
color: ${theme.vars.colors.error.main};
|
|
@@ -3428,8 +3445,8 @@ import { css as css6 } from "@emotion/css";
|
|
|
3428
3445
|
import { useMemo as useMemo13 } from "react";
|
|
3429
3446
|
var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIcon) => {
|
|
3430
3447
|
return useMemo13(() => {
|
|
3431
|
-
const
|
|
3432
|
-
const
|
|
3448
|
+
const inlineStartPadding = hasStartIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
|
|
3449
|
+
const inlineEndPadding = hasEndIcon ? `calc(${theme.vars.spacing.unit} * 5)` : `calc(${theme.vars.spacing.unit} * 1.5)`;
|
|
3433
3450
|
const inputContainer = css6`
|
|
3434
3451
|
position: relative;
|
|
3435
3452
|
display: flex;
|
|
@@ -3437,7 +3454,9 @@ var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIc
|
|
|
3437
3454
|
`;
|
|
3438
3455
|
const input = css6`
|
|
3439
3456
|
width: 100%;
|
|
3440
|
-
padding: ${theme.vars.spacing.unit}
|
|
3457
|
+
padding-block: ${theme.vars.spacing.unit};
|
|
3458
|
+
padding-inline-start: ${inlineStartPadding};
|
|
3459
|
+
padding-inline-end: ${inlineEndPadding};
|
|
3441
3460
|
border: 1px solid ${hasError ? theme.vars.colors.error.main : theme.vars.colors.border};
|
|
3442
3461
|
border-radius: ${theme.vars.components?.Field?.root?.borderRadius || theme.vars.borderRadius.medium};
|
|
3443
3462
|
font-size: ${theme.vars.typography.fontSizes.md};
|
|
@@ -3508,11 +3527,11 @@ var useStyles6 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIc
|
|
|
3508
3527
|
`;
|
|
3509
3528
|
const startIcon = css6`
|
|
3510
3529
|
${icon};
|
|
3511
|
-
|
|
3530
|
+
inset-inline-start: ${theme.vars.spacing.unit};
|
|
3512
3531
|
`;
|
|
3513
3532
|
const endIcon = css6`
|
|
3514
3533
|
${icon};
|
|
3515
|
-
|
|
3534
|
+
inset-inline-end: ${theme.vars.spacing.unit};
|
|
3516
3535
|
`;
|
|
3517
3536
|
return {
|
|
3518
3537
|
inputContainer,
|
|
@@ -4227,7 +4246,7 @@ var useStyles11 = (theme, colorScheme, hasError, required) => {
|
|
|
4227
4246
|
const inputStyles = css11`
|
|
4228
4247
|
width: calc(${theme.vars.spacing.unit} * 2.5);
|
|
4229
4248
|
height: calc(${theme.vars.spacing.unit} * 2.5);
|
|
4230
|
-
margin-
|
|
4249
|
+
margin-inline-end: ${theme.vars.spacing.unit};
|
|
4231
4250
|
accent-color: ${theme.vars.colors.primary.main};
|
|
4232
4251
|
cursor: pointer;
|
|
4233
4252
|
|
|
@@ -5748,8 +5767,9 @@ var useStyles14 = (theme, colorScheme, orientation, variant, color, hasChildren)
|
|
|
5748
5767
|
height: 100%;
|
|
5749
5768
|
min-height: calc(${theme.vars.spacing.unit} * 2);
|
|
5750
5769
|
width: 1px;
|
|
5751
|
-
border-
|
|
5752
|
-
margin: 0
|
|
5770
|
+
border-inline-start: 1px ${borderStyle} ${baseColor};
|
|
5771
|
+
margin-block: 0;
|
|
5772
|
+
margin-inline: calc(${theme.vars.spacing.unit} * 1);
|
|
5753
5773
|
`;
|
|
5754
5774
|
const horizontalDivider = css14`
|
|
5755
5775
|
display: flex;
|
|
@@ -7638,7 +7658,7 @@ var SignIn_default2 = SignIn2;
|
|
|
7638
7658
|
// src/components/presentation/SignUp/BaseSignUp.tsx
|
|
7639
7659
|
import {
|
|
7640
7660
|
EmbeddedFlowStatus,
|
|
7641
|
-
EmbeddedFlowComponentType as
|
|
7661
|
+
EmbeddedFlowComponentType as EmbeddedFlowComponentType5,
|
|
7642
7662
|
EmbeddedFlowResponseType,
|
|
7643
7663
|
withVendorCSSClassPrefix as withVendorCSSClassPrefix21,
|
|
7644
7664
|
AsgardeoAPIError as AsgardeoAPIError3
|
|
@@ -8154,6 +8174,110 @@ var renderSignUpComponents = (components, formValues, touchedFields, formErrors,
|
|
|
8154
8174
|
)
|
|
8155
8175
|
).filter(Boolean);
|
|
8156
8176
|
|
|
8177
|
+
// src/components/presentation/SignUp/transformer.ts
|
|
8178
|
+
import { EmbeddedFlowComponentType as EmbeddedFlowComponentType4 } from "@asgardeo/browser";
|
|
8179
|
+
var generateId2 = (prefix) => {
|
|
8180
|
+
const suffix = Math.random().toString(36).substring(2, 6);
|
|
8181
|
+
return `${prefix}_${suffix}`;
|
|
8182
|
+
};
|
|
8183
|
+
var getInputVariant2 = (type) => {
|
|
8184
|
+
switch (type.toLowerCase()) {
|
|
8185
|
+
case "email":
|
|
8186
|
+
return "EMAIL";
|
|
8187
|
+
case "password":
|
|
8188
|
+
return "PASSWORD";
|
|
8189
|
+
default:
|
|
8190
|
+
return "TEXT";
|
|
8191
|
+
}
|
|
8192
|
+
};
|
|
8193
|
+
var getInputLabel2 = (name, type, t) => {
|
|
8194
|
+
const i18nKey = `elements.fields.${name}`;
|
|
8195
|
+
const label = t(i18nKey);
|
|
8196
|
+
if (label === i18nKey || !label) {
|
|
8197
|
+
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
8198
|
+
}
|
|
8199
|
+
return label;
|
|
8200
|
+
};
|
|
8201
|
+
var getInputPlaceholder2 = (name, type, t) => {
|
|
8202
|
+
const label = getInputLabel2(name, type, t);
|
|
8203
|
+
const placeholder = t("elements.fields.placeholder", { field: label });
|
|
8204
|
+
if (!placeholder || placeholder === "elements.fields.placeholder") {
|
|
8205
|
+
return `Enter your ${label}`;
|
|
8206
|
+
}
|
|
8207
|
+
return placeholder;
|
|
8208
|
+
};
|
|
8209
|
+
var convertSimpleInputToComponent2 = (input, t) => {
|
|
8210
|
+
const variant = getInputVariant2(input.type);
|
|
8211
|
+
const label = getInputLabel2(input.name, input.type, t);
|
|
8212
|
+
const placeholder = getInputPlaceholder2(input.name, input.type, t);
|
|
8213
|
+
return {
|
|
8214
|
+
id: generateId2("input"),
|
|
8215
|
+
type: EmbeddedFlowComponentType4.Input,
|
|
8216
|
+
variant,
|
|
8217
|
+
config: {
|
|
8218
|
+
type: input.type === "string" ? "text" : input.type,
|
|
8219
|
+
label,
|
|
8220
|
+
placeholder,
|
|
8221
|
+
required: input.required,
|
|
8222
|
+
identifier: input.name,
|
|
8223
|
+
hint: ""
|
|
8224
|
+
},
|
|
8225
|
+
components: []
|
|
8226
|
+
};
|
|
8227
|
+
};
|
|
8228
|
+
var convertActionToComponent2 = (action, t) => {
|
|
8229
|
+
const i18nKey = `elements.buttons.${action.id}`;
|
|
8230
|
+
let text = t(i18nKey);
|
|
8231
|
+
if (!text || text === i18nKey) {
|
|
8232
|
+
text = action.id.replace(/_/g, " ");
|
|
8233
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
8234
|
+
}
|
|
8235
|
+
return {
|
|
8236
|
+
id: generateId2("action"),
|
|
8237
|
+
type: EmbeddedFlowComponentType4.Button,
|
|
8238
|
+
variant: "SECONDARY",
|
|
8239
|
+
config: {
|
|
8240
|
+
type: "button",
|
|
8241
|
+
text,
|
|
8242
|
+
actionId: action.id,
|
|
8243
|
+
actionType: action.type
|
|
8244
|
+
},
|
|
8245
|
+
components: []
|
|
8246
|
+
};
|
|
8247
|
+
};
|
|
8248
|
+
var transformSimpleToComponentDriven2 = (response, t) => {
|
|
8249
|
+
const inputComponents = response?.data?.inputs?.map((input) => convertSimpleInputToComponent2(input, t)) || [];
|
|
8250
|
+
const actionComponents = response?.data?.actions?.map((action) => convertActionToComponent2(action, t)) || [];
|
|
8251
|
+
const submitButton = inputComponents.length > 0 ? {
|
|
8252
|
+
id: generateId2("button"),
|
|
8253
|
+
type: EmbeddedFlowComponentType4.Button,
|
|
8254
|
+
variant: "PRIMARY",
|
|
8255
|
+
config: {
|
|
8256
|
+
type: "submit",
|
|
8257
|
+
text: t("elements.buttons.signUp")
|
|
8258
|
+
},
|
|
8259
|
+
components: []
|
|
8260
|
+
} : null;
|
|
8261
|
+
const formComponents = [];
|
|
8262
|
+
if (inputComponents.length > 0) {
|
|
8263
|
+
formComponents.push(...inputComponents);
|
|
8264
|
+
if (submitButton) formComponents.push(submitButton);
|
|
8265
|
+
}
|
|
8266
|
+
const result = [];
|
|
8267
|
+
if (formComponents.length > 0) {
|
|
8268
|
+
result.push({
|
|
8269
|
+
id: generateId2("form"),
|
|
8270
|
+
type: EmbeddedFlowComponentType4.Form,
|
|
8271
|
+
config: {},
|
|
8272
|
+
components: formComponents
|
|
8273
|
+
});
|
|
8274
|
+
}
|
|
8275
|
+
if (actionComponents.length > 0) {
|
|
8276
|
+
result.push(...actionComponents);
|
|
8277
|
+
}
|
|
8278
|
+
return result;
|
|
8279
|
+
};
|
|
8280
|
+
|
|
8157
8281
|
// src/components/presentation/SignUp/BaseSignUp.styles.ts
|
|
8158
8282
|
import { css as css18 } from "@emotion/css";
|
|
8159
8283
|
import { useMemo as useMemo25 } from "react";
|
|
@@ -8319,7 +8443,8 @@ var BaseSignUpContent = ({
|
|
|
8319
8443
|
messageClassName = "",
|
|
8320
8444
|
size = "medium",
|
|
8321
8445
|
variant = "outlined",
|
|
8322
|
-
isInitialized
|
|
8446
|
+
isInitialized,
|
|
8447
|
+
children
|
|
8323
8448
|
}) => {
|
|
8324
8449
|
const { theme, colorScheme } = useTheme_default();
|
|
8325
8450
|
const { t } = useTranslation_default();
|
|
@@ -8331,12 +8456,31 @@ var BaseSignUpContent = ({
|
|
|
8331
8456
|
const [error, setError] = useState17(null);
|
|
8332
8457
|
const [formData, setFormData] = useState17({});
|
|
8333
8458
|
const initializationAttemptedRef = useRef5(false);
|
|
8459
|
+
const normalizeFlowResponse2 = useCallback11(
|
|
8460
|
+
(response) => {
|
|
8461
|
+
if (response?.data?.components && Array.isArray(response.data.components)) {
|
|
8462
|
+
return response;
|
|
8463
|
+
}
|
|
8464
|
+
if (response?.data && (response.data.inputs || response.data.actions)) {
|
|
8465
|
+
const transformedComponents = transformSimpleToComponentDriven2(response, t);
|
|
8466
|
+
return {
|
|
8467
|
+
...response,
|
|
8468
|
+
data: {
|
|
8469
|
+
...response.data,
|
|
8470
|
+
components: transformedComponents
|
|
8471
|
+
}
|
|
8472
|
+
};
|
|
8473
|
+
}
|
|
8474
|
+
return response;
|
|
8475
|
+
},
|
|
8476
|
+
[t]
|
|
8477
|
+
);
|
|
8334
8478
|
const extractFormFields = useCallback11(
|
|
8335
8479
|
(components) => {
|
|
8336
8480
|
const fields = [];
|
|
8337
8481
|
const processComponents = (comps) => {
|
|
8338
8482
|
comps.forEach((component) => {
|
|
8339
|
-
if (component.type ===
|
|
8483
|
+
if (component.type === EmbeddedFlowComponentType5.Input) {
|
|
8340
8484
|
const config = component.config || {};
|
|
8341
8485
|
fields.push({
|
|
8342
8486
|
name: config.name || component.id,
|
|
@@ -8426,7 +8570,8 @@ var BaseSignUpContent = ({
|
|
|
8426
8570
|
inputs: filteredInputs,
|
|
8427
8571
|
actionId: component.id
|
|
8428
8572
|
};
|
|
8429
|
-
const
|
|
8573
|
+
const rawResponse = await onSubmit(payload);
|
|
8574
|
+
const response = normalizeFlowResponse2(rawResponse);
|
|
8430
8575
|
onFlowChange?.(response);
|
|
8431
8576
|
if (response.flowStatus === EmbeddedFlowStatus.Complete) {
|
|
8432
8577
|
onComplete?.(response);
|
|
@@ -8628,7 +8773,8 @@ var BaseSignUpContent = ({
|
|
|
8628
8773
|
setIsLoading(true);
|
|
8629
8774
|
setError(null);
|
|
8630
8775
|
try {
|
|
8631
|
-
const
|
|
8776
|
+
const rawResponse = await onInitialize();
|
|
8777
|
+
const response = normalizeFlowResponse2(rawResponse);
|
|
8632
8778
|
setCurrentFlow(response);
|
|
8633
8779
|
setIsFlowInitialized(true);
|
|
8634
8780
|
onFlowChange?.(response);
|
|
@@ -8656,9 +8802,28 @@ var BaseSignUpContent = ({
|
|
|
8656
8802
|
onError,
|
|
8657
8803
|
onFlowChange,
|
|
8658
8804
|
setupFormFields,
|
|
8805
|
+
normalizeFlowResponse2,
|
|
8659
8806
|
afterSignUpUrl,
|
|
8660
8807
|
t
|
|
8661
8808
|
]);
|
|
8809
|
+
if (children) {
|
|
8810
|
+
const renderProps = {
|
|
8811
|
+
values: formValues,
|
|
8812
|
+
errors: formErrors,
|
|
8813
|
+
touched: touchedFields,
|
|
8814
|
+
isValid: isFormValid,
|
|
8815
|
+
isLoading,
|
|
8816
|
+
error,
|
|
8817
|
+
components: currentFlow?.data?.components || [],
|
|
8818
|
+
handleInputChange,
|
|
8819
|
+
handleSubmit,
|
|
8820
|
+
validateForm,
|
|
8821
|
+
title: flowTitle || t("signup.title"),
|
|
8822
|
+
subtitle: flowSubtitle || t("signup.subtitle"),
|
|
8823
|
+
messages: flowMessages || []
|
|
8824
|
+
};
|
|
8825
|
+
return /* @__PURE__ */ jsx66("div", { className: containerClasses, children: children(renderProps) });
|
|
8826
|
+
}
|
|
8662
8827
|
if (!isFlowInitialized && isLoading) {
|
|
8663
8828
|
return /* @__PURE__ */ jsx66(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx66(Card_default.Content, { children: /* @__PURE__ */ jsx66("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx66(Spinner_default, { size: "medium" }) }) }) });
|
|
8664
8829
|
}
|
|
@@ -8692,7 +8857,8 @@ var BaseSignUp_default = BaseSignUp;
|
|
|
8692
8857
|
// src/components/presentation/SignUp/SignUp.tsx
|
|
8693
8858
|
import {
|
|
8694
8859
|
EmbeddedFlowResponseType as EmbeddedFlowResponseType2,
|
|
8695
|
-
EmbeddedFlowType as EmbeddedFlowType2
|
|
8860
|
+
EmbeddedFlowType as EmbeddedFlowType2,
|
|
8861
|
+
Platform as Platform4
|
|
8696
8862
|
} from "@asgardeo/browser";
|
|
8697
8863
|
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
8698
8864
|
var SignUp = ({
|
|
@@ -8702,14 +8868,17 @@ var SignUp = ({
|
|
|
8702
8868
|
onError,
|
|
8703
8869
|
onComplete,
|
|
8704
8870
|
shouldRedirectAfterSignUp = true,
|
|
8871
|
+
children,
|
|
8705
8872
|
...rest
|
|
8706
8873
|
}) => {
|
|
8707
|
-
const { signUp, isInitialized } = useAsgardeo_default();
|
|
8708
|
-
const handleInitialize = async (payload) =>
|
|
8709
|
-
payload || {
|
|
8710
|
-
flowType: EmbeddedFlowType2.Registration
|
|
8711
|
-
|
|
8712
|
-
|
|
8874
|
+
const { signUp, isInitialized, applicationId, platform } = useAsgardeo_default();
|
|
8875
|
+
const handleInitialize = async (payload) => {
|
|
8876
|
+
const initialPayload = payload || {
|
|
8877
|
+
flowType: EmbeddedFlowType2.Registration,
|
|
8878
|
+
...platform === Platform4.AsgardeoV2 && applicationId && { applicationId }
|
|
8879
|
+
};
|
|
8880
|
+
return await signUp(initialPayload);
|
|
8881
|
+
};
|
|
8713
8882
|
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
8714
8883
|
const handleComplete = (response) => {
|
|
8715
8884
|
onComplete?.(response);
|
|
@@ -8732,6 +8901,7 @@ var SignUp = ({
|
|
|
8732
8901
|
className,
|
|
8733
8902
|
size,
|
|
8734
8903
|
isInitialized,
|
|
8904
|
+
children,
|
|
8735
8905
|
...rest
|
|
8736
8906
|
}
|
|
8737
8907
|
);
|
|
@@ -9592,7 +9762,7 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9592
9762
|
display: flex;
|
|
9593
9763
|
gap: calc(${theme.vars.spacing.unit} / 2);
|
|
9594
9764
|
align-items: center;
|
|
9595
|
-
margin-
|
|
9765
|
+
margin-inline-start: calc(${theme.vars.spacing.unit} * 4);
|
|
9596
9766
|
`;
|
|
9597
9767
|
const complexTextarea = css22`
|
|
9598
9768
|
min-height: 60px;
|
|
@@ -9659,7 +9829,7 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9659
9829
|
width: 120px;
|
|
9660
9830
|
flex-shrink: 0;
|
|
9661
9831
|
line-height: 28px;
|
|
9662
|
-
text-align:
|
|
9832
|
+
text-align: start;
|
|
9663
9833
|
`;
|
|
9664
9834
|
const value = css22`
|
|
9665
9835
|
color: ${theme.vars.colors.text.primary};
|
|
@@ -9674,7 +9844,7 @@ var useStyles22 = (theme, colorScheme) => {
|
|
|
9674
9844
|
text-overflow: ellipsis;
|
|
9675
9845
|
white-space: nowrap;
|
|
9676
9846
|
max-width: 350px;
|
|
9677
|
-
text-align:
|
|
9847
|
+
text-align: start;
|
|
9678
9848
|
|
|
9679
9849
|
.${withVendorCSSClassPrefix25("form-control")} {
|
|
9680
9850
|
margin-bottom: 0;
|
|
@@ -10324,7 +10494,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10324
10494
|
border: none;
|
|
10325
10495
|
cursor: pointer;
|
|
10326
10496
|
font-size: 0.875rem;
|
|
10327
|
-
text-align:
|
|
10497
|
+
text-align: start;
|
|
10328
10498
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
10329
10499
|
transition: none;
|
|
10330
10500
|
box-shadow: none;
|
|
@@ -10353,7 +10523,7 @@ var useStyles23 = (theme, colorScheme) => {
|
|
|
10353
10523
|
background: none;
|
|
10354
10524
|
cursor: pointer;
|
|
10355
10525
|
font-size: 0.875rem;
|
|
10356
|
-
text-align:
|
|
10526
|
+
text-align: start;
|
|
10357
10527
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
10358
10528
|
transition: background-color 0.15s ease-in-out;
|
|
10359
10529
|
|
|
@@ -10838,7 +11008,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
10838
11008
|
`;
|
|
10839
11009
|
const manageButton = css24`
|
|
10840
11010
|
min-width: auto;
|
|
10841
|
-
margin-
|
|
11011
|
+
margin-inline-start: auto;
|
|
10842
11012
|
`;
|
|
10843
11013
|
const menu = css24`
|
|
10844
11014
|
display: flex;
|
|
@@ -10858,7 +11028,7 @@ var useStyles24 = (theme, colorScheme) => {
|
|
|
10858
11028
|
background-color: transparent;
|
|
10859
11029
|
cursor: pointer;
|
|
10860
11030
|
font-size: 0.875rem;
|
|
10861
|
-
text-align:
|
|
11031
|
+
text-align: start;
|
|
10862
11032
|
border-radius: ${theme.vars.borderRadius.medium};
|
|
10863
11033
|
transition: background-color 0.15s ease-in-out;
|
|
10864
11034
|
|
|
@@ -10996,11 +11166,12 @@ var BaseOrganizationSwitcher = ({
|
|
|
10996
11166
|
avatarSize = 24,
|
|
10997
11167
|
fallback = null
|
|
10998
11168
|
}) => {
|
|
10999
|
-
const { theme, colorScheme } = useTheme_default();
|
|
11169
|
+
const { theme, colorScheme, direction } = useTheme_default();
|
|
11000
11170
|
const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
|
|
11001
11171
|
const [isOpen, setIsOpen] = useState23(false);
|
|
11002
11172
|
const [hoveredItemIndex, setHoveredItemIndex] = useState23(null);
|
|
11003
11173
|
const { t } = useTranslation_default();
|
|
11174
|
+
const isRTL = direction === "rtl";
|
|
11004
11175
|
const { refs, floatingStyles, context } = useFloating3({
|
|
11005
11176
|
open: isOpen,
|
|
11006
11177
|
onOpenChange: setIsOpen,
|
|
@@ -11082,7 +11253,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
11082
11253
|
/* @__PURE__ */ jsx86(Building_default, { width: avatarSize, height: avatarSize }),
|
|
11083
11254
|
showTriggerLabel && /* @__PURE__ */ jsx86(Typography_default, { variant: "body2", className: cx27(styles.triggerLabel), children: t("organization.switcher.select.organization") })
|
|
11084
11255
|
] }),
|
|
11085
|
-
/* @__PURE__ */ jsx86(ChevronDown_default, { width: "16", height: "16" })
|
|
11256
|
+
/* @__PURE__ */ jsx86("span", { style: { transform: isRTL ? "scaleX(-1)" : "none", display: "inline-flex" }, children: /* @__PURE__ */ jsx86(ChevronDown_default, { width: "16", height: "16" }) })
|
|
11086
11257
|
]
|
|
11087
11258
|
}
|
|
11088
11259
|
),
|
|
@@ -12974,10 +13145,7 @@ var useStyles29 = (theme, colorScheme) => {
|
|
|
12974
13145
|
|
|
12975
13146
|
&__loading-overlay {
|
|
12976
13147
|
position: absolute;
|
|
12977
|
-
|
|
12978
|
-
left: 0;
|
|
12979
|
-
right: 0;
|
|
12980
|
-
bottom: 0;
|
|
13148
|
+
inset: 0;
|
|
12981
13149
|
background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
|
|
12982
13150
|
display: flex;
|
|
12983
13151
|
align-items: center;
|
|
@@ -13002,10 +13170,7 @@ var useStyles29 = (theme, colorScheme) => {
|
|
|
13002
13170
|
`,
|
|
13003
13171
|
loadingOverlay: css29`
|
|
13004
13172
|
position: absolute;
|
|
13005
|
-
|
|
13006
|
-
left: 0;
|
|
13007
|
-
right: 0;
|
|
13008
|
-
bottom: 0;
|
|
13173
|
+
inset: 0;
|
|
13009
13174
|
background-color: color-mix(in srgb, ${theme.vars.colors.background.surface} 80%, transparent);
|
|
13010
13175
|
display: flex;
|
|
13011
13176
|
align-items: center;
|