@ory/elements-react 1.0.0-next.27 → 1.0.0-next.29
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/CHANGELOG.md +21 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -8
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +0 -8
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +71 -62
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +70 -61
- package/dist/theme/default/index.mjs.map +1 -1
- package/dist/theme/default/tailwind/defaults.d.mts +737 -0
- package/dist/theme/default/tailwind/defaults.d.ts +737 -0
- package/package.json +1 -1
|
@@ -901,7 +901,7 @@ function DefaultMessage({ message }) {
|
|
|
901
901
|
);
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
-
// src/theme/default/components/card/auth-
|
|
904
|
+
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
905
905
|
import { useIntl as useIntl5 } from "react-intl";
|
|
906
906
|
|
|
907
907
|
// src/theme/default/assets/icons/code.svg
|
|
@@ -945,13 +945,14 @@ function isGroupImmediateSubmit(group) {
|
|
|
945
945
|
return group === "code";
|
|
946
946
|
}
|
|
947
947
|
|
|
948
|
-
// src/theme/default/components/card/auth-
|
|
948
|
+
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
949
949
|
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
950
950
|
var iconsMap = {
|
|
951
951
|
code: code_default,
|
|
952
952
|
passkey: passkey_default,
|
|
953
953
|
password: password_default,
|
|
954
|
-
webauthn: webauthn_default
|
|
954
|
+
webauthn: webauthn_default,
|
|
955
|
+
...provider_logos_default
|
|
955
956
|
};
|
|
956
957
|
function DefaultAuthMethodListItem({
|
|
957
958
|
onClick,
|
|
@@ -959,29 +960,24 @@ function DefaultAuthMethodListItem({
|
|
|
959
960
|
}) {
|
|
960
961
|
const intl = useIntl5();
|
|
961
962
|
const Icon = iconsMap[group] || null;
|
|
962
|
-
return /* @__PURE__ */
|
|
963
|
+
return /* @__PURE__ */ jsxs20(
|
|
963
964
|
"button",
|
|
964
965
|
{
|
|
965
|
-
className: "flex cursor-pointer gap-3
|
|
966
|
+
className: "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
|
|
966
967
|
onClick,
|
|
967
968
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
968
969
|
"data-testid": `ory/form/auth-picker/${group}`,
|
|
969
|
-
"aria-label": `Authenticate with ${group}`,
|
|
970
970
|
children: [
|
|
971
|
-
/* @__PURE__ */ jsx31("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx31(
|
|
972
|
-
Icon,
|
|
973
|
-
{
|
|
974
|
-
size: 16,
|
|
975
|
-
className: "text-interface-foreground-brand-primary"
|
|
976
|
-
}
|
|
977
|
-
) }),
|
|
971
|
+
/* @__PURE__ */ jsx31("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx31(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
978
972
|
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col", children: [
|
|
979
973
|
/* @__PURE__ */ jsx31("span", { className: "text-interface-foreground-default-primary", children: intl.formatMessage({ id: `two-step.${group}.title` }) }),
|
|
980
|
-
/* @__PURE__ */ jsx31("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
|
|
974
|
+
/* @__PURE__ */ jsx31("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
|
|
975
|
+
id: `two-step.${group}.description`
|
|
976
|
+
}) })
|
|
981
977
|
] })
|
|
982
978
|
]
|
|
983
979
|
}
|
|
984
|
-
)
|
|
980
|
+
);
|
|
985
981
|
}
|
|
986
982
|
|
|
987
983
|
// src/theme/default/components/form/button.tsx
|
|
@@ -1834,6 +1830,10 @@ var DefaultPageHeader = (_props) => {
|
|
|
1834
1830
|
] }) }) });
|
|
1835
1831
|
};
|
|
1836
1832
|
|
|
1833
|
+
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1834
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
1835
|
+
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
1836
|
+
|
|
1837
1837
|
// src/theme/default/assets/icons/trash.svg
|
|
1838
1838
|
import * as React25 from "react";
|
|
1839
1839
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
@@ -1844,8 +1844,6 @@ var SvgTrash = (props) => {
|
|
|
1844
1844
|
var trash_default = SvgTrash;
|
|
1845
1845
|
|
|
1846
1846
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1847
|
-
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
1848
|
-
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
1849
1847
|
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1850
1848
|
function DefaultSettingsOidc({
|
|
1851
1849
|
linkButtons,
|
|
@@ -1886,8 +1884,10 @@ function UnlinkRow({ button }) {
|
|
|
1886
1884
|
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1887
1885
|
const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
|
|
1888
1886
|
const localOnClick = () => {
|
|
1889
|
-
setClicked(true);
|
|
1890
1887
|
button.onClick();
|
|
1888
|
+
setTimeout(() => {
|
|
1889
|
+
setClicked(true);
|
|
1890
|
+
}, 100);
|
|
1891
1891
|
};
|
|
1892
1892
|
useEffect4(() => {
|
|
1893
1893
|
if (!isSubmitting) {
|
|
@@ -2340,9 +2340,17 @@ function DefaultSettingsWebauthn({
|
|
|
2340
2340
|
] });
|
|
2341
2341
|
}
|
|
2342
2342
|
|
|
2343
|
+
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2344
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2345
|
+
function DefaultAuthMethodListContainer({
|
|
2346
|
+
children
|
|
2347
|
+
}) {
|
|
2348
|
+
return /* @__PURE__ */ jsx63("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2343
2351
|
// src/theme/default/components/default-components.tsx
|
|
2344
2352
|
function getOryComponents(overrides) {
|
|
2345
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa;
|
|
2353
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha;
|
|
2346
2354
|
return {
|
|
2347
2355
|
Card: {
|
|
2348
2356
|
Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
|
|
@@ -2351,49 +2359,50 @@ function getOryComponents(overrides) {
|
|
|
2351
2359
|
Content: (_h = (_g = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _g.Content) != null ? _h : DefaultCardContent,
|
|
2352
2360
|
Logo: (_j = (_i = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _i.Logo) != null ? _j : DefaultCardLogo,
|
|
2353
2361
|
Divider: (_l = (_k = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _k.Divider) != null ? _l : DefaultHorizontalDivider,
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2362
|
+
AuthMethodListContainer: (_n = (_m = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _m.AuthMethodListContainer) != null ? _n : DefaultAuthMethodListContainer,
|
|
2363
|
+
AuthMethodListItem: (_p = (_o = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _o.AuthMethodListItem) != null ? _p : DefaultAuthMethodListItem,
|
|
2364
|
+
SettingsSection: (_r = (_q = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _q.SettingsSection) != null ? _r : DefaultFormSection,
|
|
2365
|
+
SettingsSectionContent: (_t = (_s = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _s.SettingsSectionContent) != null ? _t : DefaultFormSectionContent,
|
|
2366
|
+
SettingsSectionFooter: (_v = (_u = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _u.SettingsSectionFooter) != null ? _v : DefaultFormSectionFooter
|
|
2358
2367
|
},
|
|
2359
2368
|
Node: {
|
|
2360
|
-
Button: (
|
|
2361
|
-
OidcButton: (
|
|
2362
|
-
Input: (
|
|
2363
|
-
CodeInput: (
|
|
2364
|
-
Image: (
|
|
2365
|
-
Label: (
|
|
2366
|
-
Checkbox: (
|
|
2367
|
-
Text: (
|
|
2368
|
-
Anchor: (
|
|
2369
|
+
Button: (_x = (_w = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _w.Button) != null ? _x : DefaultButton,
|
|
2370
|
+
OidcButton: (_z = (_y = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _y.OidcButton) != null ? _z : DefaultButtonSocial,
|
|
2371
|
+
Input: (_B = (_A = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _A.Input) != null ? _B : DefaultInput,
|
|
2372
|
+
CodeInput: (_D = (_C = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _C.CodeInput) != null ? _D : DefaultPinCodeInput,
|
|
2373
|
+
Image: (_F = (_E = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _E.Image) != null ? _F : DefaultImage,
|
|
2374
|
+
Label: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Label) != null ? _H : DefaultLabel,
|
|
2375
|
+
Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
|
|
2376
|
+
Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
|
|
2377
|
+
Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton
|
|
2369
2378
|
},
|
|
2370
2379
|
Form: {
|
|
2371
|
-
Root: (
|
|
2372
|
-
Group: (
|
|
2373
|
-
OidcRoot: (
|
|
2374
|
-
RecoveryCodesSettings: (
|
|
2375
|
-
TotpSettings: (
|
|
2376
|
-
OidcSettings: (
|
|
2377
|
-
WebauthnSettings: (
|
|
2378
|
-
PasskeySettings: (
|
|
2380
|
+
Root: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Root) != null ? _P : DefaultFormContainer,
|
|
2381
|
+
Group: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Group) != null ? _R : DefaultGroupContainer,
|
|
2382
|
+
OidcRoot: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.OidcRoot) != null ? _T : DefaultSocialButtonContainer,
|
|
2383
|
+
RecoveryCodesSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.RecoveryCodesSettings) != null ? _V : DefaultSettingsRecoveryCodes,
|
|
2384
|
+
TotpSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.TotpSettings) != null ? _X : DefaultSettingsTotp,
|
|
2385
|
+
OidcSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.OidcSettings) != null ? _Z : DefaultSettingsOidc,
|
|
2386
|
+
WebauthnSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.WebauthnSettings) != null ? _$ : DefaultSettingsWebauthn,
|
|
2387
|
+
PasskeySettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.PasskeySettings) != null ? _ba : DefaultSettingsPasskey
|
|
2379
2388
|
},
|
|
2380
2389
|
Message: {
|
|
2381
|
-
Root: (
|
|
2382
|
-
Content: (
|
|
2390
|
+
Root: (_da = (_ca = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ca.Root) != null ? _da : DefaultMessageContainer,
|
|
2391
|
+
Content: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Content) != null ? _fa : DefaultMessage
|
|
2383
2392
|
},
|
|
2384
2393
|
Page: {
|
|
2385
|
-
Header: (
|
|
2394
|
+
Header: (_ha = (_ga = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ga.Header) != null ? _ha : DefaultPageHeader
|
|
2386
2395
|
}
|
|
2387
2396
|
};
|
|
2388
2397
|
}
|
|
2389
2398
|
|
|
2390
2399
|
// src/theme/default/flows/error.tsx
|
|
2391
|
-
import { jsx as
|
|
2400
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2392
2401
|
function Error({
|
|
2393
2402
|
error,
|
|
2394
2403
|
children
|
|
2395
2404
|
}) {
|
|
2396
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ jsx64("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
|
|
2397
2406
|
}
|
|
2398
2407
|
|
|
2399
2408
|
// src/theme/default/flows/login.tsx
|
|
@@ -2402,7 +2411,7 @@ import {
|
|
|
2402
2411
|
OryProvider,
|
|
2403
2412
|
OryTwoStepCard
|
|
2404
2413
|
} from "@ory/elements-react";
|
|
2405
|
-
import { jsx as
|
|
2414
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2406
2415
|
function Login({
|
|
2407
2416
|
flow,
|
|
2408
2417
|
config,
|
|
@@ -2410,14 +2419,14 @@ function Login({
|
|
|
2410
2419
|
components: flowOverrideComponents
|
|
2411
2420
|
}) {
|
|
2412
2421
|
const components = getOryComponents(flowOverrideComponents);
|
|
2413
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ jsx65(
|
|
2414
2423
|
OryProvider,
|
|
2415
2424
|
{
|
|
2416
2425
|
config,
|
|
2417
2426
|
flow,
|
|
2418
2427
|
flowType: FlowType8.Login,
|
|
2419
2428
|
components,
|
|
2420
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2429
|
+
children: children != null ? children : /* @__PURE__ */ jsx65(OryTwoStepCard, {})
|
|
2421
2430
|
}
|
|
2422
2431
|
);
|
|
2423
2432
|
}
|
|
@@ -2428,7 +2437,7 @@ import {
|
|
|
2428
2437
|
OryProvider as OryProvider2,
|
|
2429
2438
|
OryTwoStepCard as OryTwoStepCard2
|
|
2430
2439
|
} from "@ory/elements-react";
|
|
2431
|
-
import { jsx as
|
|
2440
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2432
2441
|
function Recovery({
|
|
2433
2442
|
flow,
|
|
2434
2443
|
config,
|
|
@@ -2436,14 +2445,14 @@ function Recovery({
|
|
|
2436
2445
|
components: flowOverrideComponents
|
|
2437
2446
|
}) {
|
|
2438
2447
|
const components = getOryComponents(flowOverrideComponents);
|
|
2439
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ jsx66(
|
|
2440
2449
|
OryProvider2,
|
|
2441
2450
|
{
|
|
2442
2451
|
config,
|
|
2443
2452
|
flow,
|
|
2444
2453
|
flowType: FlowType9.Recovery,
|
|
2445
2454
|
components,
|
|
2446
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2455
|
+
children: children != null ? children : /* @__PURE__ */ jsx66(OryTwoStepCard2, {})
|
|
2447
2456
|
}
|
|
2448
2457
|
);
|
|
2449
2458
|
}
|
|
@@ -2454,7 +2463,7 @@ import {
|
|
|
2454
2463
|
OryProvider as OryProvider3,
|
|
2455
2464
|
OryTwoStepCard as OryTwoStepCard3
|
|
2456
2465
|
} from "@ory/elements-react";
|
|
2457
|
-
import { jsx as
|
|
2466
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2458
2467
|
function Registration({
|
|
2459
2468
|
flow,
|
|
2460
2469
|
children,
|
|
@@ -2462,14 +2471,14 @@ function Registration({
|
|
|
2462
2471
|
config
|
|
2463
2472
|
}) {
|
|
2464
2473
|
const components = getOryComponents(flowOverrideComponents);
|
|
2465
|
-
return /* @__PURE__ */
|
|
2474
|
+
return /* @__PURE__ */ jsx67(
|
|
2466
2475
|
OryProvider3,
|
|
2467
2476
|
{
|
|
2468
2477
|
config,
|
|
2469
2478
|
flow,
|
|
2470
2479
|
flowType: FlowType10.Registration,
|
|
2471
2480
|
components,
|
|
2472
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2481
|
+
children: children != null ? children : /* @__PURE__ */ jsx67(OryTwoStepCard3, {})
|
|
2473
2482
|
}
|
|
2474
2483
|
);
|
|
2475
2484
|
}
|
|
@@ -2481,7 +2490,7 @@ import {
|
|
|
2481
2490
|
OryProvider as OryProvider4,
|
|
2482
2491
|
OrySettingsCard
|
|
2483
2492
|
} from "@ory/elements-react";
|
|
2484
|
-
import { Fragment as Fragment5, jsx as
|
|
2493
|
+
import { Fragment as Fragment5, jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2485
2494
|
function Settings({
|
|
2486
2495
|
flow,
|
|
2487
2496
|
config,
|
|
@@ -2489,7 +2498,7 @@ function Settings({
|
|
|
2489
2498
|
components: flowOverrideComponents
|
|
2490
2499
|
}) {
|
|
2491
2500
|
const components = getOryComponents(flowOverrideComponents);
|
|
2492
|
-
return /* @__PURE__ */
|
|
2501
|
+
return /* @__PURE__ */ jsx68(
|
|
2493
2502
|
OryProvider4,
|
|
2494
2503
|
{
|
|
2495
2504
|
config,
|
|
@@ -2497,8 +2506,8 @@ function Settings({
|
|
|
2497
2506
|
flowType: FlowType11.Settings,
|
|
2498
2507
|
components,
|
|
2499
2508
|
children: children != null ? children : /* @__PURE__ */ jsxs36(Fragment5, { children: [
|
|
2500
|
-
/* @__PURE__ */
|
|
2501
|
-
/* @__PURE__ */
|
|
2509
|
+
/* @__PURE__ */ jsx68(HeadlessPageHeader, {}),
|
|
2510
|
+
/* @__PURE__ */ jsx68(OrySettingsCard, {})
|
|
2502
2511
|
] })
|
|
2503
2512
|
}
|
|
2504
2513
|
);
|
|
@@ -2510,7 +2519,7 @@ import {
|
|
|
2510
2519
|
OryProvider as OryProvider5,
|
|
2511
2520
|
OryTwoStepCard as OryTwoStepCard4
|
|
2512
2521
|
} from "@ory/elements-react";
|
|
2513
|
-
import { jsx as
|
|
2522
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2514
2523
|
function Verification({
|
|
2515
2524
|
flow,
|
|
2516
2525
|
config,
|
|
@@ -2518,14 +2527,14 @@ function Verification({
|
|
|
2518
2527
|
components: flowOverrideComponents
|
|
2519
2528
|
}) {
|
|
2520
2529
|
const components = getOryComponents(flowOverrideComponents);
|
|
2521
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsx69(
|
|
2522
2531
|
OryProvider5,
|
|
2523
2532
|
{
|
|
2524
2533
|
config,
|
|
2525
2534
|
flow,
|
|
2526
2535
|
flowType: FlowType12.Verification,
|
|
2527
2536
|
components,
|
|
2528
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2537
|
+
children: children != null ? children : /* @__PURE__ */ jsx69(OryTwoStepCard4, {})
|
|
2529
2538
|
}
|
|
2530
2539
|
);
|
|
2531
2540
|
}
|