@ory/elements-react 1.0.0-next.28 → 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
@@ -2344,9 +2340,17 @@ function DefaultSettingsWebauthn({
2344
2340
  ] });
2345
2341
  }
2346
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
+
2347
2351
  // src/theme/default/components/default-components.tsx
2348
2352
  function getOryComponents(overrides) {
2349
- 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;
2350
2354
  return {
2351
2355
  Card: {
2352
2356
  Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
@@ -2355,49 +2359,50 @@ function getOryComponents(overrides) {
2355
2359
  Content: (_h = (_g = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _g.Content) != null ? _h : DefaultCardContent,
2356
2360
  Logo: (_j = (_i = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _i.Logo) != null ? _j : DefaultCardLogo,
2357
2361
  Divider: (_l = (_k = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _k.Divider) != null ? _l : DefaultHorizontalDivider,
2358
- AuthMethodListItem: (_n = (_m = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _m.AuthMethodListItem) != null ? _n : DefaultAuthMethodListItem,
2359
- SettingsSection: (_p = (_o = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _o.SettingsSection) != null ? _p : DefaultFormSection,
2360
- SettingsSectionContent: (_r = (_q = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _q.SettingsSectionContent) != null ? _r : DefaultFormSectionContent,
2361
- 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
2362
2367
  },
2363
2368
  Node: {
2364
- Button: (_v = (_u = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _u.Button) != null ? _v : DefaultButton,
2365
- OidcButton: (_x = (_w = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _w.OidcButton) != null ? _x : DefaultButtonSocial,
2366
- Input: (_z = (_y = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _y.Input) != null ? _z : DefaultInput,
2367
- CodeInput: (_B = (_A = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _A.CodeInput) != null ? _B : DefaultPinCodeInput,
2368
- Image: (_D = (_C = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _C.Image) != null ? _D : DefaultImage,
2369
- Label: (_F = (_E = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _E.Label) != null ? _F : DefaultLabel,
2370
- Checkbox: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Checkbox) != null ? _H : DefaultCheckbox,
2371
- Text: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Text) != null ? _J : DefaultText,
2372
- 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
2373
2378
  },
2374
2379
  Form: {
2375
- Root: (_N = (_M = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _M.Root) != null ? _N : DefaultFormContainer,
2376
- Group: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Group) != null ? _P : DefaultGroupContainer,
2377
- OidcRoot: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.OidcRoot) != null ? _R : DefaultSocialButtonContainer,
2378
- RecoveryCodesSettings: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.RecoveryCodesSettings) != null ? _T : DefaultSettingsRecoveryCodes,
2379
- TotpSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.TotpSettings) != null ? _V : DefaultSettingsTotp,
2380
- OidcSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcSettings) != null ? _X : DefaultSettingsOidc,
2381
- WebauthnSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.WebauthnSettings) != null ? _Z : DefaultSettingsWebauthn,
2382
- 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
2383
2388
  },
2384
2389
  Message: {
2385
- Root: (_ba = (_aa = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _aa.Root) != null ? _ba : DefaultMessageContainer,
2386
- 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
2387
2392
  },
2388
2393
  Page: {
2389
- 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
2390
2395
  }
2391
2396
  };
2392
2397
  }
2393
2398
 
2394
2399
  // src/theme/default/flows/error.tsx
2395
- import { jsx as jsx63 } from "react/jsx-runtime";
2400
+ import { jsx as jsx64 } from "react/jsx-runtime";
2396
2401
  function Error({
2397
2402
  error,
2398
2403
  children
2399
2404
  }) {
2400
- 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 });
2401
2406
  }
2402
2407
 
2403
2408
  // src/theme/default/flows/login.tsx
@@ -2406,7 +2411,7 @@ import {
2406
2411
  OryProvider,
2407
2412
  OryTwoStepCard
2408
2413
  } from "@ory/elements-react";
2409
- import { jsx as jsx64 } from "react/jsx-runtime";
2414
+ import { jsx as jsx65 } from "react/jsx-runtime";
2410
2415
  function Login({
2411
2416
  flow,
2412
2417
  config,
@@ -2414,14 +2419,14 @@ function Login({
2414
2419
  components: flowOverrideComponents
2415
2420
  }) {
2416
2421
  const components = getOryComponents(flowOverrideComponents);
2417
- return /* @__PURE__ */ jsx64(
2422
+ return /* @__PURE__ */ jsx65(
2418
2423
  OryProvider,
2419
2424
  {
2420
2425
  config,
2421
2426
  flow,
2422
2427
  flowType: FlowType8.Login,
2423
2428
  components,
2424
- children: children != null ? children : /* @__PURE__ */ jsx64(OryTwoStepCard, {})
2429
+ children: children != null ? children : /* @__PURE__ */ jsx65(OryTwoStepCard, {})
2425
2430
  }
2426
2431
  );
2427
2432
  }
@@ -2432,7 +2437,7 @@ import {
2432
2437
  OryProvider as OryProvider2,
2433
2438
  OryTwoStepCard as OryTwoStepCard2
2434
2439
  } from "@ory/elements-react";
2435
- import { jsx as jsx65 } from "react/jsx-runtime";
2440
+ import { jsx as jsx66 } from "react/jsx-runtime";
2436
2441
  function Recovery({
2437
2442
  flow,
2438
2443
  config,
@@ -2440,14 +2445,14 @@ function Recovery({
2440
2445
  components: flowOverrideComponents
2441
2446
  }) {
2442
2447
  const components = getOryComponents(flowOverrideComponents);
2443
- return /* @__PURE__ */ jsx65(
2448
+ return /* @__PURE__ */ jsx66(
2444
2449
  OryProvider2,
2445
2450
  {
2446
2451
  config,
2447
2452
  flow,
2448
2453
  flowType: FlowType9.Recovery,
2449
2454
  components,
2450
- children: children != null ? children : /* @__PURE__ */ jsx65(OryTwoStepCard2, {})
2455
+ children: children != null ? children : /* @__PURE__ */ jsx66(OryTwoStepCard2, {})
2451
2456
  }
2452
2457
  );
2453
2458
  }
@@ -2458,7 +2463,7 @@ import {
2458
2463
  OryProvider as OryProvider3,
2459
2464
  OryTwoStepCard as OryTwoStepCard3
2460
2465
  } from "@ory/elements-react";
2461
- import { jsx as jsx66 } from "react/jsx-runtime";
2466
+ import { jsx as jsx67 } from "react/jsx-runtime";
2462
2467
  function Registration({
2463
2468
  flow,
2464
2469
  children,
@@ -2466,14 +2471,14 @@ function Registration({
2466
2471
  config
2467
2472
  }) {
2468
2473
  const components = getOryComponents(flowOverrideComponents);
2469
- return /* @__PURE__ */ jsx66(
2474
+ return /* @__PURE__ */ jsx67(
2470
2475
  OryProvider3,
2471
2476
  {
2472
2477
  config,
2473
2478
  flow,
2474
2479
  flowType: FlowType10.Registration,
2475
2480
  components,
2476
- children: children != null ? children : /* @__PURE__ */ jsx66(OryTwoStepCard3, {})
2481
+ children: children != null ? children : /* @__PURE__ */ jsx67(OryTwoStepCard3, {})
2477
2482
  }
2478
2483
  );
2479
2484
  }
@@ -2485,7 +2490,7 @@ import {
2485
2490
  OryProvider as OryProvider4,
2486
2491
  OrySettingsCard
2487
2492
  } from "@ory/elements-react";
2488
- 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";
2489
2494
  function Settings({
2490
2495
  flow,
2491
2496
  config,
@@ -2493,7 +2498,7 @@ function Settings({
2493
2498
  components: flowOverrideComponents
2494
2499
  }) {
2495
2500
  const components = getOryComponents(flowOverrideComponents);
2496
- return /* @__PURE__ */ jsx67(
2501
+ return /* @__PURE__ */ jsx68(
2497
2502
  OryProvider4,
2498
2503
  {
2499
2504
  config,
@@ -2501,8 +2506,8 @@ function Settings({
2501
2506
  flowType: FlowType11.Settings,
2502
2507
  components,
2503
2508
  children: children != null ? children : /* @__PURE__ */ jsxs36(Fragment5, { children: [
2504
- /* @__PURE__ */ jsx67(HeadlessPageHeader, {}),
2505
- /* @__PURE__ */ jsx67(OrySettingsCard, {})
2509
+ /* @__PURE__ */ jsx68(HeadlessPageHeader, {}),
2510
+ /* @__PURE__ */ jsx68(OrySettingsCard, {})
2506
2511
  ] })
2507
2512
  }
2508
2513
  );
@@ -2514,7 +2519,7 @@ import {
2514
2519
  OryProvider as OryProvider5,
2515
2520
  OryTwoStepCard as OryTwoStepCard4
2516
2521
  } from "@ory/elements-react";
2517
- import { jsx as jsx68 } from "react/jsx-runtime";
2522
+ import { jsx as jsx69 } from "react/jsx-runtime";
2518
2523
  function Verification({
2519
2524
  flow,
2520
2525
  config,
@@ -2522,14 +2527,14 @@ function Verification({
2522
2527
  components: flowOverrideComponents
2523
2528
  }) {
2524
2529
  const components = getOryComponents(flowOverrideComponents);
2525
- return /* @__PURE__ */ jsx68(
2530
+ return /* @__PURE__ */ jsx69(
2526
2531
  OryProvider5,
2527
2532
  {
2528
2533
  config,
2529
2534
  flow,
2530
2535
  flowType: FlowType12.Verification,
2531
2536
  components,
2532
- children: children != null ? children : /* @__PURE__ */ jsx68(OryTwoStepCard4, {})
2537
+ children: children != null ? children : /* @__PURE__ */ jsx69(OryTwoStepCard4, {})
2533
2538
  }
2534
2539
  );
2535
2540
  }