@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.
@@ -901,7 +901,7 @@ function DefaultMessage({ message }) {
901
901
  );
902
902
  }
903
903
 
904
- // src/theme/default/components/card/auth-methods.tsx
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-methods.tsx
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__ */ jsx31("div", { className: "w-full rounded px-2 py-1 hover:bg-interface-background-default-primary-hover", children: /* @__PURE__ */ jsxs20(
963
+ return /* @__PURE__ */ jsxs20(
963
964
  "button",
964
965
  {
965
- className: "flex cursor-pointer gap-3 py-2 text-left items-start",
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({ id: `two-step.${group}.description` }) })
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
- AuthMethodListItem: (_n = (_m = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _m.AuthMethodListItem) != null ? _n : DefaultAuthMethodListItem,
2355
- SettingsSection: (_p = (_o = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _o.SettingsSection) != null ? _p : DefaultFormSection,
2356
- SettingsSectionContent: (_r = (_q = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _q.SettingsSectionContent) != null ? _r : DefaultFormSectionContent,
2357
- SettingsSectionFooter: (_t = (_s = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _s.SettingsSectionFooter) != null ? _t : DefaultFormSectionFooter
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: (_v = (_u = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _u.Button) != null ? _v : DefaultButton,
2361
- OidcButton: (_x = (_w = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _w.OidcButton) != null ? _x : DefaultButtonSocial,
2362
- Input: (_z = (_y = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _y.Input) != null ? _z : DefaultInput,
2363
- CodeInput: (_B = (_A = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _A.CodeInput) != null ? _B : DefaultPinCodeInput,
2364
- Image: (_D = (_C = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _C.Image) != null ? _D : DefaultImage,
2365
- Label: (_F = (_E = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _E.Label) != null ? _F : DefaultLabel,
2366
- Checkbox: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Checkbox) != null ? _H : DefaultCheckbox,
2367
- Text: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Text) != null ? _J : DefaultText,
2368
- Anchor: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Anchor) != null ? _L : DefaultLinkButton
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: (_N = (_M = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _M.Root) != null ? _N : DefaultFormContainer,
2372
- Group: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Group) != null ? _P : DefaultGroupContainer,
2373
- OidcRoot: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.OidcRoot) != null ? _R : DefaultSocialButtonContainer,
2374
- RecoveryCodesSettings: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.RecoveryCodesSettings) != null ? _T : DefaultSettingsRecoveryCodes,
2375
- TotpSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.TotpSettings) != null ? _V : DefaultSettingsTotp,
2376
- OidcSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcSettings) != null ? _X : DefaultSettingsOidc,
2377
- WebauthnSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.WebauthnSettings) != null ? _Z : DefaultSettingsWebauthn,
2378
- PasskeySettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.PasskeySettings) != null ? _$ : DefaultSettingsPasskey
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: (_ba = (_aa = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _aa.Root) != null ? _ba : DefaultMessageContainer,
2382
- Content: (_da = (_ca = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ca.Content) != null ? _da : DefaultMessage
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: (_fa = (_ea = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ea.Header) != null ? _fa : DefaultPageHeader
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 jsx63 } from "react/jsx-runtime";
2400
+ import { jsx as jsx64 } from "react/jsx-runtime";
2392
2401
  function Error({
2393
2402
  error,
2394
2403
  children
2395
2404
  }) {
2396
- return /* @__PURE__ */ jsx63("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
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 jsx64 } from "react/jsx-runtime";
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__ */ jsx64(
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__ */ jsx64(OryTwoStepCard, {})
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 jsx65 } from "react/jsx-runtime";
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__ */ jsx65(
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__ */ jsx65(OryTwoStepCard2, {})
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 jsx66 } from "react/jsx-runtime";
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__ */ jsx66(
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__ */ jsx66(OryTwoStepCard3, {})
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 jsx67, jsxs as jsxs36 } from "react/jsx-runtime";
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__ */ jsx67(
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__ */ jsx67(HeadlessPageHeader, {}),
2501
- /* @__PURE__ */ jsx67(OrySettingsCard, {})
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 jsx68 } from "react/jsx-runtime";
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__ */ jsx68(
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__ */ jsx68(OryTwoStepCard4, {})
2537
+ children: children != null ? children : /* @__PURE__ */ jsx69(OryTwoStepCard4, {})
2529
2538
  }
2530
2539
  );
2531
2540
  }