@ory/elements-react 1.0.0-next.33 → 1.0.0-next.34

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.
@@ -105,13 +105,6 @@ var ComponentContext = createContext({
105
105
  nodeSorter: () => 0,
106
106
  groupSorter: () => 0
107
107
  });
108
- function useComponents() {
109
- const ctx = useContext(ComponentContext);
110
- if (!ctx) {
111
- throw new Error("useComponents must be used within a ComponentProvider");
112
- }
113
- return ctx.components;
114
- }
115
108
  var defaultGroupOrder = [
116
109
  UiNodeGroupEnum.Default,
117
110
  UiNodeGroupEnum.Profile,
@@ -125,54 +118,6 @@ var defaultGroupOrder = [
125
118
  ];
126
119
 
127
120
  // src/util/ui/index.ts
128
- function triggerToWindowCall(trigger) {
129
- if (!trigger) {
130
- return;
131
- }
132
- const fn = triggerToFunction(trigger);
133
- if (fn) {
134
- fn();
135
- return;
136
- }
137
- let i = 0;
138
- const ms = 100;
139
- const interval = setInterval(() => {
140
- i++;
141
- if (i > 100) {
142
- clearInterval(interval);
143
- throw new Error(
144
- "Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
145
- );
146
- }
147
- const fn2 = triggerToFunction(trigger);
148
- if (fn2) {
149
- clearInterval(interval);
150
- return fn2();
151
- }
152
- }, ms);
153
- return;
154
- }
155
- function triggerToFunction(trigger) {
156
- if (typeof window === "undefined") {
157
- console.debug(
158
- "The Ory SDK is missing a required function: window is undefined."
159
- );
160
- return void 0;
161
- }
162
- const typedWindow = window;
163
- if (!(trigger in typedWindow) || !typedWindow[trigger]) {
164
- console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
165
- return void 0;
166
- }
167
- const triggerFn = typedWindow[trigger];
168
- if (typeof triggerFn !== "function") {
169
- console.debug(
170
- `The Ory SDK is missing a required function: ${trigger}. It is not a function.`
171
- );
172
- return void 0;
173
- }
174
- return triggerFn;
175
- }
176
121
  function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
177
122
  var _a;
178
123
  const groups = {};
@@ -352,7 +297,7 @@ function VerificationCardFooter() {
352
297
  }
353
298
 
354
299
  // src/theme/default/components/card/header.tsx
355
- import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
300
+ import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
356
301
 
357
302
  // src/theme/default/utils/constructCardHeader.ts
358
303
  import {
@@ -668,7 +613,7 @@ function guessRegistrationBackButton(uiNodes) {
668
613
  // src/theme/default/components/card/header.tsx
669
614
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
670
615
  function InnerCardHeader({ title, text }) {
671
- const { Card } = useComponents2();
616
+ const { Card } = useComponents();
672
617
  return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
673
618
  /* @__PURE__ */ jsx8(Card.Logo, {}),
674
619
  /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
@@ -1660,7 +1605,7 @@ import {
1660
1605
  import {
1661
1606
  messageTestId as messageTestId3,
1662
1607
  uiTextToFormattedMessage as uiTextToFormattedMessage7,
1663
- useComponents as useComponents3,
1608
+ useComponents as useComponents2,
1664
1609
  useOryFlow as useOryFlow8
1665
1610
  } from "@ory/elements-react";
1666
1611
  import { useFormContext as useFormContext5 } from "react-hook-form";
@@ -1679,7 +1624,7 @@ function DefaultLabel({
1679
1624
  }) {
1680
1625
  const intl = useIntl10();
1681
1626
  const label = getNodeLabel4(node);
1682
- const { Message } = useComponents3();
1627
+ const { Message } = useComponents2();
1683
1628
  const { config, flowType, flow } = useOryFlow8();
1684
1629
  const { setValue, formState } = useFormContext5();
1685
1630
  const isPassword = attributes.type === "password";
@@ -1922,7 +1867,7 @@ function DefaultText({ node, attributes }) {
1922
1867
  }
1923
1868
 
1924
1869
  // src/theme/default/components/generic/page-header.tsx
1925
- import { useComponents as useComponents4 } from "@ory/elements-react";
1870
+ import { useComponents as useComponents3 } from "@ory/elements-react";
1926
1871
 
1927
1872
  // src/theme/default/components/ui/user-menu.tsx
1928
1873
  import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
@@ -2140,7 +2085,7 @@ var UserMenu = ({ session }) => {
2140
2085
  import { useSession } from "@ory/elements-react/client";
2141
2086
  import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
2142
2087
  var DefaultPageHeader = (_props) => {
2143
- const { Card } = useComponents4();
2088
+ const { Card } = useComponents3();
2144
2089
  const { session } = useSession();
2145
2090
  return /* @__PURE__ */ jsx57("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
2146
2091
  /* @__PURE__ */ jsx57("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx57(Card.Logo, {}) }),
@@ -2238,7 +2183,7 @@ function UnlinkRow({ button }) {
2238
2183
  }
2239
2184
 
2240
2185
  // src/theme/default/components/settings/settings-passkey.tsx
2241
- import { useComponents as useComponents5 } from "@ory/elements-react";
2186
+ import { useComponents as useComponents4 } from "@ory/elements-react";
2242
2187
  import { useFormContext as useFormContext8 } from "react-hook-form";
2243
2188
  import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
2244
2189
  function DefaultSettingsPasskey({
@@ -2248,11 +2193,11 @@ function DefaultSettingsPasskey({
2248
2193
  const {
2249
2194
  formState: { isSubmitting }
2250
2195
  } = useFormContext8();
2251
- const { Node: Node2 } = useComponents5();
2196
+ const { Node } = useComponents4();
2252
2197
  const hasRemoveButtons = removeButtons.length > 0;
2253
2198
  return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
2254
2199
  /* @__PURE__ */ jsx60("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx60(
2255
- Node2.Button,
2200
+ Node.Button,
2256
2201
  {
2257
2202
  node: triggerButton,
2258
2203
  attributes: triggerButton.attributes,
@@ -2429,7 +2374,7 @@ function DefaultSettingsRecoveryCodes({
2429
2374
  }
2430
2375
 
2431
2376
  // src/theme/default/components/settings/settings-totp.tsx
2432
- import { useComponents as useComponents6 } from "@ory/elements-react";
2377
+ import { useComponents as useComponents5 } from "@ory/elements-react";
2433
2378
 
2434
2379
  // src/theme/default/assets/icons/qrcode.svg
2435
2380
  import * as React33 from "react";
@@ -2450,7 +2395,7 @@ function DefaultSettingsTotp({
2450
2395
  totpUnlink,
2451
2396
  onUnlink
2452
2397
  }) {
2453
- const { Node: Node2, Card } = useComponents6();
2398
+ const { Node, Card } = useComponents5();
2454
2399
  const {
2455
2400
  formState: { isSubmitting }
2456
2401
  } = useFormContext10();
@@ -2490,7 +2435,7 @@ function DefaultSettingsTotp({
2490
2435
  return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2491
2436
  /* @__PURE__ */ jsx65("div", { className: "col-span-full", children: /* @__PURE__ */ jsx65(DefaultHorizontalDivider, {}) }),
2492
2437
  /* @__PURE__ */ jsx65("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx65("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx65("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx65(
2493
- Node2.Image,
2438
+ Node.Image,
2494
2439
  {
2495
2440
  node: totpImage,
2496
2441
  attributes: {
@@ -2500,12 +2445,12 @@ function DefaultSettingsTotp({
2500
2445
  ) }) }) }),
2501
2446
  /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-6", children: [
2502
2447
  /* @__PURE__ */ jsx65(
2503
- Node2.Label,
2448
+ Node.Label,
2504
2449
  {
2505
2450
  node: totpSecret,
2506
2451
  attributes: totpSecret.attributes,
2507
2452
  children: /* @__PURE__ */ jsx65(
2508
- Node2.Input,
2453
+ Node.Input,
2509
2454
  {
2510
2455
  node: totpSecret,
2511
2456
  attributes: {
@@ -2520,12 +2465,12 @@ function DefaultSettingsTotp({
2520
2465
  }
2521
2466
  ),
2522
2467
  /* @__PURE__ */ jsx65(
2523
- Node2.Label,
2468
+ Node.Label,
2524
2469
  {
2525
2470
  attributes: totpInput.attributes,
2526
2471
  node: totpInput,
2527
2472
  children: /* @__PURE__ */ jsx65(
2528
- Node2.CodeInput,
2473
+ Node.CodeInput,
2529
2474
  {
2530
2475
  node: totpInput,
2531
2476
  attributes: totpInput.attributes
@@ -2539,7 +2484,7 @@ function DefaultSettingsTotp({
2539
2484
  }
2540
2485
 
2541
2486
  // src/theme/default/components/settings/settings-webauthn.tsx
2542
- import { useComponents as useComponents7 } from "@ory/elements-react";
2487
+ import { useComponents as useComponents6 } from "@ory/elements-react";
2543
2488
 
2544
2489
  // src/theme/default/assets/icons/key.svg
2545
2490
  import * as React34 from "react";
@@ -2561,17 +2506,17 @@ function DefaultSettingsWebauthn({
2561
2506
  const {
2562
2507
  formState: { isSubmitting }
2563
2508
  } = useFormContext11();
2564
- const { Node: Node2, Card } = useComponents7();
2509
+ const { Node, Card } = useComponents6();
2565
2510
  const hasRemoveButtons = removeButtons.length > 0;
2566
2511
  return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
2567
2512
  /* @__PURE__ */ jsxs36("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2568
2513
  /* @__PURE__ */ jsx67("div", { className: "flex-1", children: /* @__PURE__ */ jsx67(
2569
- Node2.Label,
2514
+ Node.Label,
2570
2515
  {
2571
2516
  node: nameInput,
2572
2517
  attributes: nameInput.attributes,
2573
2518
  children: /* @__PURE__ */ jsx67(
2574
- Node2.Input,
2519
+ Node.Input,
2575
2520
  {
2576
2521
  node: nameInput,
2577
2522
  attributes: nameInput.attributes
@@ -2580,7 +2525,7 @@ function DefaultSettingsWebauthn({
2580
2525
  }
2581
2526
  ) }),
2582
2527
  triggerButton ? /* @__PURE__ */ jsx67(
2583
- Node2.Button,
2528
+ Node.Button,
2584
2529
  {
2585
2530
  node: triggerButton,
2586
2531
  attributes: triggerButton.attributes,
@@ -2654,305 +2599,26 @@ function DefaultAuthMethodListContainer({
2654
2599
  }
2655
2600
 
2656
2601
  // src/theme/default/components/form/captcha.tsx
2657
- import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
2658
- import { Turnstile } from "@marsidev/react-turnstile";
2659
- import { useRef as useRef3 } from "react";
2660
- import { useFormContext as useFormContext23 } from "react-hook-form";
2661
-
2662
- // src/context/flow-context.tsx
2663
- import {
2664
- createContext as createContext2,
2665
- useContext as useContext3,
2666
- useState as useState4
2667
- } from "react";
2668
-
2669
- // src/context/form-state.ts
2670
- import { FlowType as FlowType9 } from "@ory/client-fetch";
2671
- import { useReducer } from "react";
2672
-
2673
- // src/components/card/card-two-step.utils.ts
2674
- import { FlowType as FlowType8, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
2675
-
2676
- // src/context/flow-context.tsx
2677
- import { jsx as jsx69 } from "react/jsx-runtime";
2678
- var OryFlowContext = createContext2(null);
2679
-
2680
- // src/context/intl-context.tsx
2681
- import { IntlProvider as OriginalIntlProvider } from "react-intl";
2682
-
2683
- // src/components/card/header.tsx
2684
- import { jsx as jsx70 } from "react/jsx-runtime";
2685
-
2686
- // src/components/form/form-provider.tsx
2687
- import { UiNodeGroupEnum as UiNodeGroupEnum5 } from "@ory/client-fetch";
2688
- import { FormProvider, useForm as useForm2 } from "react-hook-form";
2689
-
2690
- // src/components/form/form-helpers.ts
2691
2602
  import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
2692
-
2693
- // src/components/form/form-resolver.ts
2694
- import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
2695
-
2696
- // src/components/form/form-provider.tsx
2697
- import { jsx as jsx71 } from "react/jsx-runtime";
2698
-
2699
- // src/components/card/card.tsx
2700
- import { jsx as jsx72 } from "react/jsx-runtime";
2701
-
2702
- // src/components/card/footer.tsx
2703
- import { jsx as jsx73 } from "react/jsx-runtime";
2704
-
2705
- // src/components/card/content.tsx
2706
- import { jsx as jsx74 } from "react/jsx-runtime";
2707
-
2708
- // src/components/card/card-two-step.tsx
2709
- import { UiNodeGroupEnum as UiNodeGroupEnum7 } from "@ory/client-fetch";
2710
- import { useFormContext as useFormContext15 } from "react-hook-form";
2711
-
2712
- // src/components/form/form.tsx
2713
- import {
2714
- FlowType as FlowType16,
2715
- isUiNodeAnchorAttributes,
2716
- isUiNodeImageAttributes,
2717
- isUiNodeInputAttributes as isUiNodeInputAttributes5,
2718
- isUiNodeScriptAttributes
2719
- } from "@ory/client-fetch";
2720
- import { useFormContext as useFormContext13 } from "react-hook-form";
2721
- import { useIntl as useIntl13 } from "react-intl";
2722
-
2723
- // src/components/form/useOryFormSubmit.ts
2724
- import {
2725
- FlowType as FlowType15
2726
- } from "@ory/client-fetch";
2603
+ import { Turnstile } from "@marsidev/react-turnstile";
2604
+ import { useRef as useRef2 } from "react";
2727
2605
  import { useFormContext as useFormContext12 } from "react-hook-form";
2728
-
2729
- // src/util/onSubmitLogin.ts
2730
- import {
2731
- FlowType as FlowType10,
2732
- handleFlowError,
2733
- loginUrl
2734
- } from "@ory/client-fetch";
2735
-
2736
- // src/util/onSubmitRecovery.ts
2737
- import {
2738
- FlowType as FlowType11,
2739
- handleContinueWith,
2740
- handleFlowError as handleFlowError2,
2741
- instanceOfContinueWithRecoveryUi,
2742
- recoveryUrl
2743
- } from "@ory/client-fetch";
2744
-
2745
- // src/util/onSubmitRegistration.ts
2746
- import {
2747
- FlowType as FlowType12,
2748
- handleContinueWith as handleContinueWith2,
2749
- handleFlowError as handleFlowError3,
2750
- registrationUrl
2751
- } from "@ory/client-fetch";
2752
-
2753
- // src/util/onSubmitSettings.ts
2754
- import {
2755
- FlowType as FlowType13,
2756
- handleContinueWith as handleContinueWith3,
2757
- handleFlowError as handleFlowError4,
2758
- isResponseError,
2759
- loginUrl as loginUrl2,
2760
- settingsUrl
2761
- } from "@ory/client-fetch";
2762
-
2763
- // src/util/onSubmitVerification.ts
2764
- import {
2765
- FlowType as FlowType14,
2766
- handleFlowError as handleFlowError5,
2767
- verificationUrl
2768
- } from "@ory/client-fetch";
2769
-
2770
- // src/components/form/form.tsx
2771
- import { Fragment as Fragment6, jsx as jsx75, jsxs as jsxs37 } from "react/jsx-runtime";
2772
-
2773
- // src/components/form/messages.tsx
2774
- import { jsx as jsx76 } from "react/jsx-runtime";
2775
-
2776
- // src/components/form/nodes/node.tsx
2777
- import {
2778
- isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
2779
- isUiNodeImageAttributes as isUiNodeImageAttributes2,
2780
- isUiNodeInputAttributes as isUiNodeInputAttributes6,
2781
- isUiNodeScriptAttributes as isUiNodeScriptAttributes2,
2782
- isUiNodeTextAttributes,
2783
- UiNodeGroupEnum as UiNodeGroupEnum6
2784
- } from "@ory/client-fetch";
2785
- import { jsx as jsx77 } from "react/jsx-runtime";
2786
-
2787
- // src/components/form/social.tsx
2788
- import { useFormContext as useFormContext14 } from "react-hook-form";
2789
- import { jsx as jsx78 } from "react/jsx-runtime";
2790
-
2791
- // src/components/card/card-two-step.tsx
2792
- import { Fragment as Fragment7, jsx as jsx79, jsxs as jsxs38 } from "react/jsx-runtime";
2793
-
2794
- // src/components/form/groups.tsx
2795
- import { jsx as jsx80 } from "react/jsx-runtime";
2796
-
2797
- // src/components/form/section.tsx
2798
- import { useFormContext as useFormContext16 } from "react-hook-form";
2799
- import { jsx as jsx81 } from "react/jsx-runtime";
2800
-
2801
- // src/components/generic/divider.tsx
2802
- import { jsx as jsx82 } from "react/jsx-runtime";
2803
-
2804
- // src/components/generic/page-header.tsx
2805
- import { jsx as jsx83 } from "react/jsx-runtime";
2806
-
2807
- // src/components/settings/settings-card.tsx
2808
- import { UiNodeGroupEnum as UiNodeGroupEnum8 } from "@ory/client-fetch";
2809
- import { useIntl as useIntl19 } from "react-intl";
2810
-
2811
- // src/components/settings/oidc-settings.tsx
2812
- import { useIntl as useIntl14 } from "react-intl";
2813
- import { useFormContext as useFormContext17 } from "react-hook-form";
2814
- import { Fragment as Fragment8, jsx as jsx84, jsxs as jsxs39 } from "react/jsx-runtime";
2815
-
2816
- // src/components/settings/passkey-settings.tsx
2817
- import { useFormContext as useFormContext18 } from "react-hook-form";
2818
- import { useIntl as useIntl15 } from "react-intl";
2819
- import { Fragment as Fragment9, jsx as jsx85, jsxs as jsxs40 } from "react/jsx-runtime";
2820
-
2821
- // src/components/settings/recovery-codes-settings.tsx
2822
- import { useIntl as useIntl16 } from "react-intl";
2823
- import { useFormContext as useFormContext19 } from "react-hook-form";
2824
- import { Fragment as Fragment10, jsx as jsx86, jsxs as jsxs41 } from "react/jsx-runtime";
2825
-
2826
- // src/components/settings/totp-settings.tsx
2827
- import { useFormContext as useFormContext20 } from "react-hook-form";
2828
- import { useIntl as useIntl17 } from "react-intl";
2829
- import { Fragment as Fragment11, jsx as jsx87, jsxs as jsxs42 } from "react/jsx-runtime";
2830
-
2831
- // src/components/settings/webauthn-settings.tsx
2832
- import { useFormContext as useFormContext21 } from "react-hook-form";
2833
- import { useIntl as useIntl18 } from "react-intl";
2834
- import { Fragment as Fragment12, jsx as jsx88, jsxs as jsxs43 } from "react/jsx-runtime";
2835
-
2836
- // src/components/settings/settings-card.tsx
2837
- import { Fragment as Fragment13, jsx as jsx89, jsxs as jsxs44 } from "react/jsx-runtime";
2838
-
2839
- // src/context/intl-context.tsx
2840
- import { jsx as jsx90 } from "react/jsx-runtime";
2841
-
2842
- // src/context/provider.tsx
2843
- import { jsx as jsx91 } from "react/jsx-runtime";
2844
-
2845
- // src/components/form/nodes/input.tsx
2846
- import {
2847
- UiNodeInputAttributesTypeEnum
2848
- } from "@ory/client-fetch";
2849
- import { useEffect as useEffect5, useRef as useRef2 } from "react";
2850
- import { useFormContext as useFormContext22 } from "react-hook-form";
2851
- import { jsx as jsx92 } from "react/jsx-runtime";
2852
- var NodeInput = ({
2853
- node,
2854
- attributes
2855
- }) => {
2856
- var _a;
2857
- const { Node: Node2 } = useComponents();
2858
- const { setValue } = useFormContext22();
2859
- const {
2860
- onloadTrigger,
2861
- onclickTrigger,
2862
- // These properties do not exist on input fields so we remove them (as we already have handled them).
2863
- onclick: _ignoredOnclick,
2864
- onload: _ignoredOnload,
2865
- //
2866
- ...attrs
2867
- } = attributes;
2868
- const isResendNode = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
2869
- const isScreenSelectionNode = "name" in node.attributes && node.attributes.name === "screen";
2870
- const setFormValue = () => {
2871
- if (attrs.value && !(isResendNode || isScreenSelectionNode)) {
2872
- setValue(attrs.name, attrs.value);
2873
- }
2874
- };
2875
- const hasRun = useRef2(false);
2876
- useEffect5(
2877
- () => {
2878
- setFormValue();
2879
- if (!hasRun.current && onloadTrigger) {
2880
- hasRun.current = true;
2881
- triggerToWindowCall(onloadTrigger);
2882
- }
2883
- },
2884
- // TODO(jonas): make sure onloadTrigger is stable
2885
- // eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
2886
- []
2887
- );
2888
- const handleClick = () => {
2889
- setFormValue();
2890
- if (onclickTrigger) {
2891
- triggerToWindowCall(onclickTrigger);
2892
- }
2893
- };
2894
- const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
2895
- const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
2896
- switch (attributes.type) {
2897
- case UiNodeInputAttributesTypeEnum.Submit:
2898
- case UiNodeInputAttributesTypeEnum.Button:
2899
- if (isSocial) {
2900
- return null;
2901
- }
2902
- if (isResendNode || isScreenSelectionNode) {
2903
- return null;
2904
- }
2905
- return /* @__PURE__ */ jsx92(
2906
- Node2.Label,
2907
- {
2908
- attributes: { ...attrs, label: void 0 },
2909
- node: { ...node, meta: { ...node.meta, label: void 0 } },
2910
- children: /* @__PURE__ */ jsx92(Node2.Button, { attributes: attrs, node, onClick: handleClick })
2911
- }
2912
- );
2913
- case UiNodeInputAttributesTypeEnum.DatetimeLocal:
2914
- throw new Error("Not implemented");
2915
- case UiNodeInputAttributesTypeEnum.Checkbox:
2916
- return /* @__PURE__ */ jsx92(
2917
- Node2.Label,
2918
- {
2919
- attributes: { ...attrs, label: void 0 },
2920
- node: { ...node, meta: { ...node.meta, label: void 0 } },
2921
- children: /* @__PURE__ */ jsx92(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
2922
- }
2923
- );
2924
- case UiNodeInputAttributesTypeEnum.Hidden:
2925
- return /* @__PURE__ */ jsx92(Node2.Input, { attributes: attrs, node, onClick: handleClick });
2926
- default:
2927
- if (isPinCodeInput) {
2928
- return /* @__PURE__ */ jsx92(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx92(
2929
- Node2.CodeInput,
2930
- {
2931
- attributes: attrs,
2932
- node,
2933
- onClick: handleClick
2934
- }
2935
- ) });
2936
- }
2937
- return /* @__PURE__ */ jsx92(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx92(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
2938
- }
2939
- };
2940
-
2941
- // src/theme/default/components/form/captcha.tsx
2942
- import { jsx as jsx93 } from "react/jsx-runtime";
2606
+ import { jsx as jsx69 } from "react/jsx-runtime";
2943
2607
  var DefaultCaptcha = ({ node }) => {
2944
- const { setValue } = useFormContext23();
2945
- const ref = useRef3();
2608
+ const { setValue } = useFormContext12();
2609
+ const ref = useRef2();
2946
2610
  const nodes = [];
2947
- if (isUiNodeInputAttributes7(node.attributes)) {
2611
+ if (isUiNodeInputAttributes3(node.attributes)) {
2948
2612
  if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2949
- nodes.push(/* @__PURE__ */ jsx93(NodeInput, { node, attributes: node.attributes }, 1));
2613
+ nodes.push(
2614
+ /* @__PURE__ */ jsx69(DefaultInput, { node, attributes: node.attributes }, 1)
2615
+ );
2950
2616
  }
2951
2617
  }
2952
- if (isUiNodeInputAttributes7(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2618
+ if (isUiNodeInputAttributes3(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2953
2619
  const options = JSON.parse(node.attributes.value);
2954
2620
  nodes.push(
2955
- /* @__PURE__ */ jsx93(
2621
+ /* @__PURE__ */ jsx69(
2956
2622
  Turnstile,
2957
2623
  {
2958
2624
  ref,
@@ -3029,21 +2695,21 @@ function getOryComponents(overrides) {
3029
2695
  }
3030
2696
 
3031
2697
  // src/theme/default/flows/error.tsx
3032
- import { jsx as jsx94 } from "react/jsx-runtime";
2698
+ import { jsx as jsx70 } from "react/jsx-runtime";
3033
2699
  function Error2({
3034
2700
  error,
3035
2701
  children
3036
2702
  }) {
3037
- return /* @__PURE__ */ jsx94("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
2703
+ return /* @__PURE__ */ jsx70("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
3038
2704
  }
3039
2705
 
3040
2706
  // src/theme/default/flows/login.tsx
3041
- import { FlowType as FlowType17 } from "@ory/client-fetch";
2707
+ import { FlowType as FlowType8 } from "@ory/client-fetch";
3042
2708
  import {
3043
2709
  OryProvider,
3044
- OryTwoStepCard as OryTwoStepCard2
2710
+ OryTwoStepCard
3045
2711
  } from "@ory/elements-react";
3046
- import { jsx as jsx95 } from "react/jsx-runtime";
2712
+ import { jsx as jsx71 } from "react/jsx-runtime";
3047
2713
  function Login({
3048
2714
  flow,
3049
2715
  config,
@@ -3051,25 +2717,25 @@ function Login({
3051
2717
  components: flowOverrideComponents
3052
2718
  }) {
3053
2719
  const components = getOryComponents(flowOverrideComponents);
3054
- return /* @__PURE__ */ jsx95(
2720
+ return /* @__PURE__ */ jsx71(
3055
2721
  OryProvider,
3056
2722
  {
3057
2723
  config,
3058
2724
  flow,
3059
- flowType: FlowType17.Login,
2725
+ flowType: FlowType8.Login,
3060
2726
  components,
3061
- children: children != null ? children : /* @__PURE__ */ jsx95(OryTwoStepCard2, {})
2727
+ children: children != null ? children : /* @__PURE__ */ jsx71(OryTwoStepCard, {})
3062
2728
  }
3063
2729
  );
3064
2730
  }
3065
2731
 
3066
2732
  // src/theme/default/flows/recovery.tsx
3067
- import { FlowType as FlowType18 } from "@ory/client-fetch";
2733
+ import { FlowType as FlowType9 } from "@ory/client-fetch";
3068
2734
  import {
3069
2735
  OryProvider as OryProvider2,
3070
- OryTwoStepCard as OryTwoStepCard3
2736
+ OryTwoStepCard as OryTwoStepCard2
3071
2737
  } from "@ory/elements-react";
3072
- import { jsx as jsx96 } from "react/jsx-runtime";
2738
+ import { jsx as jsx72 } from "react/jsx-runtime";
3073
2739
  function Recovery({
3074
2740
  flow,
3075
2741
  config,
@@ -3077,25 +2743,25 @@ function Recovery({
3077
2743
  components: flowOverrideComponents
3078
2744
  }) {
3079
2745
  const components = getOryComponents(flowOverrideComponents);
3080
- return /* @__PURE__ */ jsx96(
2746
+ return /* @__PURE__ */ jsx72(
3081
2747
  OryProvider2,
3082
2748
  {
3083
2749
  config,
3084
2750
  flow,
3085
- flowType: FlowType18.Recovery,
2751
+ flowType: FlowType9.Recovery,
3086
2752
  components,
3087
- children: children != null ? children : /* @__PURE__ */ jsx96(OryTwoStepCard3, {})
2753
+ children: children != null ? children : /* @__PURE__ */ jsx72(OryTwoStepCard2, {})
3088
2754
  }
3089
2755
  );
3090
2756
  }
3091
2757
 
3092
2758
  // src/theme/default/flows/registration.tsx
3093
- import { FlowType as FlowType19 } from "@ory/client-fetch";
2759
+ import { FlowType as FlowType10 } from "@ory/client-fetch";
3094
2760
  import {
3095
2761
  OryProvider as OryProvider3,
3096
- OryTwoStepCard as OryTwoStepCard4
2762
+ OryTwoStepCard as OryTwoStepCard3
3097
2763
  } from "@ory/elements-react";
3098
- import { jsx as jsx97 } from "react/jsx-runtime";
2764
+ import { jsx as jsx73 } from "react/jsx-runtime";
3099
2765
  function Registration({
3100
2766
  flow,
3101
2767
  children,
@@ -3103,26 +2769,26 @@ function Registration({
3103
2769
  config
3104
2770
  }) {
3105
2771
  const components = getOryComponents(flowOverrideComponents);
3106
- return /* @__PURE__ */ jsx97(
2772
+ return /* @__PURE__ */ jsx73(
3107
2773
  OryProvider3,
3108
2774
  {
3109
2775
  config,
3110
2776
  flow,
3111
- flowType: FlowType19.Registration,
2777
+ flowType: FlowType10.Registration,
3112
2778
  components,
3113
- children: children != null ? children : /* @__PURE__ */ jsx97(OryTwoStepCard4, {})
2779
+ children: children != null ? children : /* @__PURE__ */ jsx73(OryTwoStepCard3, {})
3114
2780
  }
3115
2781
  );
3116
2782
  }
3117
2783
 
3118
2784
  // src/theme/default/flows/settings.tsx
3119
- import { FlowType as FlowType20 } from "@ory/client-fetch";
2785
+ import { FlowType as FlowType11 } from "@ory/client-fetch";
3120
2786
  import {
3121
2787
  HeadlessPageHeader,
3122
2788
  OryProvider as OryProvider4,
3123
2789
  OrySettingsCard
3124
2790
  } from "@ory/elements-react";
3125
- import { Fragment as Fragment14, jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
2791
+ import { Fragment as Fragment6, jsx as jsx74, jsxs as jsxs37 } from "react/jsx-runtime";
3126
2792
  function Settings({
3127
2793
  flow,
3128
2794
  config,
@@ -3130,28 +2796,28 @@ function Settings({
3130
2796
  components: flowOverrideComponents
3131
2797
  }) {
3132
2798
  const components = getOryComponents(flowOverrideComponents);
3133
- return /* @__PURE__ */ jsx98(
2799
+ return /* @__PURE__ */ jsx74(
3134
2800
  OryProvider4,
3135
2801
  {
3136
2802
  config,
3137
2803
  flow,
3138
- flowType: FlowType20.Settings,
2804
+ flowType: FlowType11.Settings,
3139
2805
  components,
3140
- children: children != null ? children : /* @__PURE__ */ jsxs45(Fragment14, { children: [
3141
- /* @__PURE__ */ jsx98(HeadlessPageHeader, {}),
3142
- /* @__PURE__ */ jsx98(OrySettingsCard, {})
2806
+ children: children != null ? children : /* @__PURE__ */ jsxs37(Fragment6, { children: [
2807
+ /* @__PURE__ */ jsx74(HeadlessPageHeader, {}),
2808
+ /* @__PURE__ */ jsx74(OrySettingsCard, {})
3143
2809
  ] })
3144
2810
  }
3145
2811
  );
3146
2812
  }
3147
2813
 
3148
2814
  // src/theme/default/flows/verification.tsx
3149
- import { FlowType as FlowType21 } from "@ory/client-fetch";
2815
+ import { FlowType as FlowType12 } from "@ory/client-fetch";
3150
2816
  import {
3151
2817
  OryProvider as OryProvider5,
3152
- OryTwoStepCard as OryTwoStepCard5
2818
+ OryTwoStepCard as OryTwoStepCard4
3153
2819
  } from "@ory/elements-react";
3154
- import { jsx as jsx99 } from "react/jsx-runtime";
2820
+ import { jsx as jsx75 } from "react/jsx-runtime";
3155
2821
  function Verification({
3156
2822
  flow,
3157
2823
  config,
@@ -3159,14 +2825,14 @@ function Verification({
3159
2825
  components: flowOverrideComponents
3160
2826
  }) {
3161
2827
  const components = getOryComponents(flowOverrideComponents);
3162
- return /* @__PURE__ */ jsx99(
2828
+ return /* @__PURE__ */ jsx75(
3163
2829
  OryProvider5,
3164
2830
  {
3165
2831
  config,
3166
2832
  flow,
3167
- flowType: FlowType21.Verification,
2833
+ flowType: FlowType12.Verification,
3168
2834
  components,
3169
- children: children != null ? children : /* @__PURE__ */ jsx99(OryTwoStepCard5, {})
2835
+ children: children != null ? children : /* @__PURE__ */ jsx75(OryTwoStepCard4, {})
3170
2836
  }
3171
2837
  );
3172
2838
  }