@ory/elements-react 1.0.0-next.1 → 1.0.0-next.3

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.
@@ -211,7 +211,7 @@ var require_react_is_development = __commonJS({
211
211
  var ContextProvider = REACT_PROVIDER_TYPE;
212
212
  var Element = REACT_ELEMENT_TYPE;
213
213
  var ForwardRef = REACT_FORWARD_REF_TYPE;
214
- var Fragment6 = REACT_FRAGMENT_TYPE;
214
+ var Fragment7 = REACT_FRAGMENT_TYPE;
215
215
  var Lazy = REACT_LAZY_TYPE;
216
216
  var Memo = REACT_MEMO_TYPE;
217
217
  var Portal = REACT_PORTAL_TYPE;
@@ -270,7 +270,7 @@ var require_react_is_development = __commonJS({
270
270
  exports.ContextProvider = ContextProvider;
271
271
  exports.Element = Element;
272
272
  exports.ForwardRef = ForwardRef;
273
- exports.Fragment = Fragment6;
273
+ exports.Fragment = Fragment7;
274
274
  exports.Lazy = Lazy;
275
275
  exports.Memo = Memo;
276
276
  exports.Portal = Portal;
@@ -8825,7 +8825,7 @@ function LoginCardFooter() {
8825
8825
  if (!config.project.registration_enabled) {
8826
8826
  return null;
8827
8827
  }
8828
- let registrationLink = `/self-service/registration/browser`;
8828
+ let registrationLink = `${config.sdk.url}/self-service/registration/browser`;
8829
8829
  const returnTo = getReturnToQueryParam();
8830
8830
  if (returnTo) {
8831
8831
  registrationLink += `?return_to=${returnTo}`;
@@ -8851,7 +8851,8 @@ function LoginCardFooter() {
8851
8851
  }
8852
8852
  function RegistrationCardFooter() {
8853
8853
  const intl = useIntl();
8854
- let loginLink = `/self-service/login/browser`;
8854
+ const { config } = useOryFlow();
8855
+ let loginLink = `${config.sdk.url}/self-service/login/browser`;
8855
8856
  const returnTo = getReturnToQueryParam();
8856
8857
  if (returnTo) {
8857
8858
  loginLink += `?return_to=${returnTo}`;
@@ -10045,11 +10046,16 @@ function DefaultText({ node, attributes }) {
10045
10046
  }
10046
10047
 
10047
10048
  // src/theme/default/components/card/current-identifier-button.tsx
10048
- import { jsx as jsx44 } from "react/jsx-runtime";
10049
+ import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
10049
10050
  function DefaultCurrentIdentifierButton({
10050
- attributes
10051
+ attributes,
10052
+ node
10051
10053
  }) {
10052
- return /* @__PURE__ */ jsx44("div", { children: /* @__PURE__ */ jsx44("span", { className: "py-1 px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default", children: /* @__PURE__ */ jsx44("span", { className: "text-sm font-medium leading-none", children: attributes.value }) }) });
10054
+ return /* @__PURE__ */ jsxs26("div", { children: [
10055
+ /* @__PURE__ */ jsx44("span", { className: "py-1 px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default", children: /* @__PURE__ */ jsx44("span", { className: "text-sm font-medium leading-none", children: attributes.value }) }),
10056
+ /* @__PURE__ */ jsx44(DefaultInput, { attributes, node, onClick: () => {
10057
+ } })
10058
+ ] });
10053
10059
  }
10054
10060
 
10055
10061
  // src/theme/default/components/default-components.tsx
@@ -10148,7 +10154,7 @@ import {
10148
10154
  UiNodeInputAttributesTypeEnum
10149
10155
  } from "@ory/client-fetch";
10150
10156
  import { useEffect, useRef } from "react";
10151
- import { jsx as jsx46 } from "react/jsx-runtime";
10157
+ import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
10152
10158
  var NodeInput = ({
10153
10159
  node,
10154
10160
  attributes
@@ -10210,17 +10216,23 @@ var NodeInput = ({
10210
10216
  }
10211
10217
  );
10212
10218
  case UiNodeInputAttributesTypeEnum.Hidden:
10213
- if (isCurrentIdentifier) {
10214
- return /* @__PURE__ */ jsx46(Components.CurrentIdentifierButton, { attributes: attrs, node });
10215
- }
10216
- return /* @__PURE__ */ jsx46(
10217
- Components.Input,
10218
- {
10219
- attributes: attrs,
10220
- node,
10221
- onClick: handleClick
10222
- }
10223
- );
10219
+ return /* @__PURE__ */ jsxs27(Fragment4, { children: [
10220
+ isCurrentIdentifier && /* @__PURE__ */ jsx46(
10221
+ Components.CurrentIdentifierButton,
10222
+ {
10223
+ attributes: attrs,
10224
+ node
10225
+ }
10226
+ ),
10227
+ /* @__PURE__ */ jsx46(
10228
+ Components.Input,
10229
+ {
10230
+ attributes: attrs,
10231
+ node,
10232
+ onClick: handleClick
10233
+ }
10234
+ )
10235
+ ] });
10224
10236
  default:
10225
10237
  if (isPinCodeInput) {
10226
10238
  return /* @__PURE__ */ jsx46(Components.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx46(
@@ -10298,7 +10310,7 @@ function OryFormGroups({ children, groups }) {
10298
10310
  }
10299
10311
 
10300
10312
  // src/components/form/social.tsx
10301
- import { Fragment as Fragment4, jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
10313
+ import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
10302
10314
  function OryFormSocialButtons({
10303
10315
  children,
10304
10316
  hideDivider
@@ -10314,7 +10326,7 @@ function OryFormSocialButtons({
10314
10326
  const otherNodes = ui.nodes.filter(
10315
10327
  (node) => node.group !== "oidc" && node.group !== "default"
10316
10328
  );
10317
- return /* @__PURE__ */ jsxs26(Fragment4, { children: [
10329
+ return /* @__PURE__ */ jsxs28(Fragment5, { children: [
10318
10330
  /* @__PURE__ */ jsx49(SocialButtonContainer, { nodes: filteredNodes, children: children != null ? children : filteredNodes.map((node, k) => {
10319
10331
  return /* @__PURE__ */ jsx49(Node, { node }, k);
10320
10332
  }) }),
@@ -10330,7 +10342,7 @@ import {
10330
10342
  isUiNodeInputAttributes as isUiNodeInputAttributes3,
10331
10343
  isUiNodeScriptAttributes as isUiNodeScriptAttributes2
10332
10344
  } from "@ory/client-fetch";
10333
- import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
10345
+ import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
10334
10346
  function OryForm({ children }) {
10335
10347
  var _a3;
10336
10348
  const { FormContainer } = useComponents();
@@ -10435,7 +10447,7 @@ function OryForm({ children }) {
10435
10447
  action: flowContainer.flow.ui.action,
10436
10448
  method: flowContainer.flow.ui.method,
10437
10449
  onSubmit: () => void methods.handleSubmit(onSubmit),
10438
- children: children != null ? children : /* @__PURE__ */ jsxs27(Fragment5, { children: [
10450
+ children: children != null ? children : /* @__PURE__ */ jsxs29(Fragment6, { children: [
10439
10451
  /* @__PURE__ */ jsx50(OryFormSocialButtons, {}),
10440
10452
  /* @__PURE__ */ jsx50(
10441
10453
  OryFormGroups,
@@ -10479,15 +10491,15 @@ function OryCardHeader() {
10479
10491
  }
10480
10492
 
10481
10493
  // src/components/card/index.tsx
10482
- import { jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
10494
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
10483
10495
  function OryCardContent({ children }) {
10484
10496
  const { CardContent } = useComponents();
10485
10497
  if (children) {
10486
10498
  return /* @__PURE__ */ jsx53(CardContent, { children });
10487
10499
  }
10488
- return /* @__PURE__ */ jsxs28(CardContent, { children: [
10500
+ return /* @__PURE__ */ jsxs30(CardContent, { children: [
10489
10501
  /* @__PURE__ */ jsx53(OryCardValidationMessages, {}),
10490
- /* @__PURE__ */ jsxs28(OryForm, { children: [
10502
+ /* @__PURE__ */ jsxs30(OryForm, { children: [
10491
10503
  /* @__PURE__ */ jsx53(OryFormSocialButtons, {}),
10492
10504
  /* @__PURE__ */ jsx53(
10493
10505
  OryFormGroups,
@@ -10516,7 +10528,7 @@ function OryCard({ children }) {
10516
10528
  if (children) {
10517
10529
  return /* @__PURE__ */ jsx53(Card, { children });
10518
10530
  }
10519
- return /* @__PURE__ */ jsxs28(Card, { children: [
10531
+ return /* @__PURE__ */ jsxs30(Card, { children: [
10520
10532
  /* @__PURE__ */ jsx53(OryCardHeader, {}),
10521
10533
  /* @__PURE__ */ jsx53(OryCardContent, {}),
10522
10534
  /* @__PURE__ */ jsx53(OryCardFooter, {})