@ory/elements-react 1.0.0-next.40 → 1.0.0-next.43
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 +28 -0
- package/dist/client/index.js +3 -3
- package/dist/index.js +64 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -54
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +4 -1
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +267 -195
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +178 -97
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +15 -15
- package/tailwind/generated/default-variables.css +1 -1
|
@@ -29,8 +29,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
|
|
31
31
|
// src/theme/default/index.ts
|
|
32
|
-
var
|
|
33
|
-
__export(
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
34
|
Consent: () => Consent,
|
|
35
35
|
DefaultButtonSocial: () => DefaultButtonSocial,
|
|
36
36
|
DefaultCard: () => DefaultCard,
|
|
@@ -51,7 +51,7 @@ __export(default_exports, {
|
|
|
51
51
|
Verification: () => Verification,
|
|
52
52
|
getOryComponents: () => getOryComponents
|
|
53
53
|
});
|
|
54
|
-
module.exports = __toCommonJS(
|
|
54
|
+
module.exports = __toCommonJS(index_exports);
|
|
55
55
|
|
|
56
56
|
// src/theme/default/assets/ory-badge-horizontal.svg
|
|
57
57
|
var React = __toESM(require("react"));
|
|
@@ -92,9 +92,8 @@ function DefaultCardContent({ children }) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// src/theme/default/components/card/footer.tsx
|
|
95
|
-
var
|
|
95
|
+
var import_client_fetch4 = require("@ory/client-fetch");
|
|
96
96
|
var import_elements_react = require("@ory/elements-react");
|
|
97
|
-
var import_react_hook_form = require("react-hook-form");
|
|
98
97
|
var import_react_intl = require("react-intl");
|
|
99
98
|
|
|
100
99
|
// src/theme/default/utils/url.ts
|
|
@@ -143,6 +142,7 @@ function appendRefresh(url, refresh) {
|
|
|
143
142
|
|
|
144
143
|
// src/util/ui/index.ts
|
|
145
144
|
var import_client_fetch2 = require("@ory/client-fetch");
|
|
145
|
+
var import_client_fetch3 = require("@ory/client-fetch");
|
|
146
146
|
var import_react2 = require("react");
|
|
147
147
|
|
|
148
148
|
// src/context/component.tsx
|
|
@@ -179,15 +179,15 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
|
179
179
|
groupNodes.push(node);
|
|
180
180
|
groups[node.group] = groupNodes;
|
|
181
181
|
}
|
|
182
|
-
return Object.values(
|
|
182
|
+
return Object.values(import_client_fetch3.UiNodeGroupEnum).filter((group) => {
|
|
183
183
|
var _a2;
|
|
184
184
|
return (_a2 = groups[group]) == null ? void 0 : _a2.length;
|
|
185
185
|
}).filter(
|
|
186
186
|
(group) => ![
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
import_client_fetch3.UiNodeGroupEnum.Default,
|
|
188
|
+
import_client_fetch3.UiNodeGroupEnum.IdentifierFirst,
|
|
189
|
+
import_client_fetch3.UiNodeGroupEnum.Profile,
|
|
190
|
+
import_client_fetch3.UiNodeGroupEnum.Captcha,
|
|
191
191
|
...excludeAuthMethods
|
|
192
192
|
].includes(group)
|
|
193
193
|
);
|
|
@@ -196,20 +196,27 @@ var findNode = (nodes, opt) => nodes.find((n) => {
|
|
|
196
196
|
return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
+
// src/util/nodes.ts
|
|
200
|
+
function findScreenSelectionButton(nodes) {
|
|
201
|
+
return nodes.find(
|
|
202
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
199
206
|
// src/theme/default/components/card/footer.tsx
|
|
200
207
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
201
208
|
function DefaultCardFooter() {
|
|
202
209
|
const oryFlow = (0, import_elements_react.useOryFlow)();
|
|
203
210
|
switch (oryFlow.flowType) {
|
|
204
|
-
case
|
|
211
|
+
case import_client_fetch4.FlowType.Login:
|
|
205
212
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoginCardFooter, {});
|
|
206
|
-
case
|
|
213
|
+
case import_client_fetch4.FlowType.Registration:
|
|
207
214
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RegistrationCardFooter, {});
|
|
208
|
-
case
|
|
215
|
+
case import_client_fetch4.FlowType.Recovery:
|
|
209
216
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecoveryCardFooter, {});
|
|
210
|
-
case
|
|
217
|
+
case import_client_fetch4.FlowType.Verification:
|
|
211
218
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VerificationCardFooter, {});
|
|
212
|
-
case
|
|
219
|
+
case import_client_fetch4.FlowType.OAuth2Consent:
|
|
213
220
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
214
221
|
default:
|
|
215
222
|
return null;
|
|
@@ -219,7 +226,7 @@ function LoginCardFooter() {
|
|
|
219
226
|
const { config, formState, flow, flowType } = (0, import_elements_react.useOryFlow)();
|
|
220
227
|
const intl = (0, import_react_intl.useIntl)();
|
|
221
228
|
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
222
|
-
if (flowType ===
|
|
229
|
+
if (flowType === import_client_fetch4.FlowType.Login && flow.refresh) {
|
|
223
230
|
return null;
|
|
224
231
|
}
|
|
225
232
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
@@ -267,7 +274,7 @@ function LoginCardFooter() {
|
|
|
267
274
|
})
|
|
268
275
|
}
|
|
269
276
|
) }),
|
|
270
|
-
flowType ===
|
|
277
|
+
flowType === import_client_fetch4.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
271
278
|
intl.formatMessage({
|
|
272
279
|
id: "login.2fa.go-back"
|
|
273
280
|
}),
|
|
@@ -289,60 +296,45 @@ function LoginCardFooter() {
|
|
|
289
296
|
] })
|
|
290
297
|
] });
|
|
291
298
|
}
|
|
292
|
-
function findScreenSelectionButton(nodes) {
|
|
293
|
-
return nodes.find(
|
|
294
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
299
|
function RegistrationCardFooter() {
|
|
298
300
|
const intl = (0, import_react_intl.useIntl)();
|
|
299
301
|
const { config, flow, formState } = (0, import_elements_react.useOryFlow)();
|
|
300
|
-
const { setValue } = (0, import_react_hook_form.useFormContext)();
|
|
301
|
-
if (formState.current === "select_method") {
|
|
302
|
-
return null;
|
|
303
|
-
}
|
|
304
302
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
303
|
+
switch (formState.current) {
|
|
304
|
+
case "method_active":
|
|
305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
306
|
+
"a",
|
|
307
|
+
{
|
|
308
|
+
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
309
|
+
href: "",
|
|
310
|
+
children: intl.formatMessage({
|
|
311
|
+
id: "card.footer.select-another-method",
|
|
312
|
+
defaultMessage: "Select another method"
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
) });
|
|
316
|
+
case "select_method":
|
|
317
|
+
default:
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased", children: [
|
|
319
|
+
intl.formatMessage({
|
|
320
|
+
id: "registration.login-label",
|
|
321
|
+
defaultMessage: "Already have an account?"
|
|
322
|
+
}),
|
|
323
|
+
" ",
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
325
|
+
"a",
|
|
326
|
+
{
|
|
327
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
328
|
+
href: initFlowUrl(config.sdk.url, "login", flow),
|
|
329
|
+
"data-testid": "ory/screen/registration/action/login",
|
|
330
|
+
children: intl.formatMessage({
|
|
331
|
+
id: "registration.login-button",
|
|
332
|
+
defaultMessage: "Sign in"
|
|
333
|
+
})
|
|
334
|
+
}
|
|
335
|
+
)
|
|
336
|
+
] });
|
|
313
337
|
}
|
|
314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
315
|
-
"button",
|
|
316
|
-
{
|
|
317
|
-
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
318
|
-
type: "submit",
|
|
319
|
-
name: screenSelectionNode.attributes.name,
|
|
320
|
-
value: screenSelectionNode.attributes.value,
|
|
321
|
-
onClick: handleScreenSelection,
|
|
322
|
-
children: intl.formatMessage({
|
|
323
|
-
id: "card.footer.select-another-method",
|
|
324
|
-
defaultMessage: "Select another method"
|
|
325
|
-
})
|
|
326
|
-
}
|
|
327
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
328
|
-
intl.formatMessage({
|
|
329
|
-
id: "registration.login-label",
|
|
330
|
-
defaultMessage: "Already have an account?"
|
|
331
|
-
}),
|
|
332
|
-
" ",
|
|
333
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
334
|
-
"a",
|
|
335
|
-
{
|
|
336
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
337
|
-
href: initFlowUrl(config.sdk.url, "login", flow),
|
|
338
|
-
"data-testid": "ory/screen/registration/action/login",
|
|
339
|
-
children: intl.formatMessage({
|
|
340
|
-
id: "registration.login-button",
|
|
341
|
-
defaultMessage: "Sign in"
|
|
342
|
-
})
|
|
343
|
-
}
|
|
344
|
-
)
|
|
345
|
-
] }) });
|
|
346
338
|
}
|
|
347
339
|
function RecoveryCardFooter() {
|
|
348
340
|
return null;
|
|
@@ -400,7 +392,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
400
392
|
var import_elements_react3 = require("@ory/elements-react");
|
|
401
393
|
|
|
402
394
|
// src/theme/default/utils/constructCardHeader.ts
|
|
403
|
-
var
|
|
395
|
+
var import_client_fetch5 = require("@ory/client-fetch");
|
|
404
396
|
var import_react_intl2 = require("react-intl");
|
|
405
397
|
function joinWithCommaOr(list, orText = "or") {
|
|
406
398
|
if (list.length === 0) {
|
|
@@ -417,7 +409,7 @@ function useCardHeaderText(container, opts) {
|
|
|
417
409
|
const nodes = container.nodes;
|
|
418
410
|
const intl = (0, import_react_intl2.useIntl)();
|
|
419
411
|
switch (opts.flowType) {
|
|
420
|
-
case
|
|
412
|
+
case import_client_fetch5.FlowType.Recovery:
|
|
421
413
|
if (nodes.find(
|
|
422
414
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
423
415
|
)) {
|
|
@@ -438,7 +430,7 @@ function useCardHeaderText(container, opts) {
|
|
|
438
430
|
id: "recovery.subtitle"
|
|
439
431
|
})
|
|
440
432
|
};
|
|
441
|
-
case
|
|
433
|
+
case import_client_fetch5.FlowType.Settings:
|
|
442
434
|
return {
|
|
443
435
|
title: intl.formatMessage({
|
|
444
436
|
id: "settings.title"
|
|
@@ -447,7 +439,7 @@ function useCardHeaderText(container, opts) {
|
|
|
447
439
|
id: "settings.subtitle"
|
|
448
440
|
})
|
|
449
441
|
};
|
|
450
|
-
case
|
|
442
|
+
case import_client_fetch5.FlowType.Verification:
|
|
451
443
|
if (nodes.find(
|
|
452
444
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
453
445
|
)) {
|
|
@@ -468,7 +460,7 @@ function useCardHeaderText(container, opts) {
|
|
|
468
460
|
id: "verification.subtitle"
|
|
469
461
|
})
|
|
470
462
|
};
|
|
471
|
-
case
|
|
463
|
+
case import_client_fetch5.FlowType.Login: {
|
|
472
464
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
473
465
|
(m) => m.id === 1010016
|
|
474
466
|
);
|
|
@@ -490,7 +482,7 @@ function useCardHeaderText(container, opts) {
|
|
|
490
482
|
const parts = [];
|
|
491
483
|
if (nodes.find((node) => node.group === "password")) {
|
|
492
484
|
switch (opts.flowType) {
|
|
493
|
-
case
|
|
485
|
+
case import_client_fetch5.FlowType.Registration:
|
|
494
486
|
parts.push(
|
|
495
487
|
intl.formatMessage(
|
|
496
488
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -527,7 +519,7 @@ function useCardHeaderText(container, opts) {
|
|
|
527
519
|
}
|
|
528
520
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
529
521
|
const identifier = nodes.find(
|
|
530
|
-
(node) => (0,
|
|
522
|
+
(node) => (0, import_client_fetch5.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
531
523
|
);
|
|
532
524
|
if (identifier) {
|
|
533
525
|
parts.push(
|
|
@@ -543,7 +535,7 @@ function useCardHeaderText(container, opts) {
|
|
|
543
535
|
}
|
|
544
536
|
}
|
|
545
537
|
switch (opts.flowType) {
|
|
546
|
-
case
|
|
538
|
+
case import_client_fetch5.FlowType.Login:
|
|
547
539
|
if (opts.flow.refresh) {
|
|
548
540
|
return {
|
|
549
541
|
title: intl.formatMessage({
|
|
@@ -584,7 +576,7 @@ function useCardHeaderText(container, opts) {
|
|
|
584
576
|
}
|
|
585
577
|
) : ""
|
|
586
578
|
};
|
|
587
|
-
case
|
|
579
|
+
case import_client_fetch5.FlowType.Registration:
|
|
588
580
|
return {
|
|
589
581
|
title: intl.formatMessage({
|
|
590
582
|
id: "registration.title"
|
|
@@ -601,7 +593,7 @@ function useCardHeaderText(container, opts) {
|
|
|
601
593
|
}
|
|
602
594
|
) : ""
|
|
603
595
|
};
|
|
604
|
-
case
|
|
596
|
+
case import_client_fetch5.FlowType.OAuth2Consent:
|
|
605
597
|
return {
|
|
606
598
|
title: intl.formatMessage(
|
|
607
599
|
{
|
|
@@ -628,7 +620,7 @@ function useCardHeaderText(container, opts) {
|
|
|
628
620
|
}
|
|
629
621
|
|
|
630
622
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
631
|
-
var
|
|
623
|
+
var import_client_fetch6 = require("@ory/client-fetch");
|
|
632
624
|
var import_elements_react2 = require("@ory/elements-react");
|
|
633
625
|
|
|
634
626
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
@@ -650,36 +642,90 @@ function omit(obj, keys) {
|
|
|
650
642
|
}
|
|
651
643
|
|
|
652
644
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
645
|
+
var import_react_hook_form = require("react-hook-form");
|
|
653
646
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
654
647
|
function DefaultCurrentIdentifierButton() {
|
|
655
648
|
const { flow, flowType, config, formState } = (0, import_elements_react2.useOryFlow)();
|
|
649
|
+
const { setValue } = (0, import_react_hook_form.useFormContext)();
|
|
656
650
|
const ui = flow.ui;
|
|
657
651
|
if (formState.current === "provide_identifier") {
|
|
658
652
|
return null;
|
|
659
653
|
}
|
|
660
|
-
if (flowType ===
|
|
654
|
+
if (flowType === import_client_fetch6.FlowType.Login && flow.requested_aal === "aal2") {
|
|
661
655
|
return null;
|
|
662
656
|
}
|
|
663
|
-
const nodeBackButton =
|
|
664
|
-
if (
|
|
657
|
+
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
658
|
+
if (!nodeBackButton) {
|
|
665
659
|
return null;
|
|
666
660
|
}
|
|
667
661
|
const initFlowUrl2 = restartFlowUrl(
|
|
668
662
|
flow,
|
|
669
663
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
670
664
|
);
|
|
671
|
-
const attributes = omit(nodeBackButton
|
|
665
|
+
const attributes = omit(nodeBackButton, [
|
|
672
666
|
"autocomplete",
|
|
673
667
|
"node_type",
|
|
674
668
|
"maxlength"
|
|
675
669
|
]);
|
|
670
|
+
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
671
|
+
if (screenSelectionNode) {
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
673
|
+
flow.ui.nodes.filter((n) => {
|
|
674
|
+
if ((0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes)) {
|
|
675
|
+
return n.attributes.type === "hidden";
|
|
676
|
+
}
|
|
677
|
+
return false;
|
|
678
|
+
}).map((n) => {
|
|
679
|
+
const attrs = n.attributes;
|
|
680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
681
|
+
"input",
|
|
682
|
+
{
|
|
683
|
+
type: "hidden",
|
|
684
|
+
name: attrs.name,
|
|
685
|
+
value: attrs.value
|
|
686
|
+
},
|
|
687
|
+
attrs.name
|
|
688
|
+
);
|
|
689
|
+
}),
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
691
|
+
"button",
|
|
692
|
+
{
|
|
693
|
+
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
694
|
+
...attributes,
|
|
695
|
+
type: "submit",
|
|
696
|
+
onClick: () => {
|
|
697
|
+
setValue(
|
|
698
|
+
screenSelectionNode.attributes.name,
|
|
699
|
+
screenSelectionNode.attributes.value
|
|
700
|
+
);
|
|
701
|
+
setValue("method", "profile");
|
|
702
|
+
},
|
|
703
|
+
name: screenSelectionNode.attributes.name,
|
|
704
|
+
value: screenSelectionNode.attributes.value,
|
|
705
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
706
|
+
"data-testid": "ory/screen/login/action/restart",
|
|
707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
708
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
709
|
+
arrow_left_default,
|
|
710
|
+
{
|
|
711
|
+
size: 16,
|
|
712
|
+
stroke: "1",
|
|
713
|
+
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
717
|
+
] })
|
|
718
|
+
}
|
|
719
|
+
)
|
|
720
|
+
] });
|
|
721
|
+
}
|
|
676
722
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
677
723
|
"a",
|
|
678
724
|
{
|
|
679
725
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
680
726
|
...attributes,
|
|
681
727
|
href: initFlowUrl2,
|
|
682
|
-
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.
|
|
728
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
683
729
|
"data-testid": "ory/screen/login/action/restart",
|
|
684
730
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
685
731
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -690,30 +736,34 @@ function DefaultCurrentIdentifierButton() {
|
|
|
690
736
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
691
737
|
}
|
|
692
738
|
),
|
|
693
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.
|
|
739
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
694
740
|
] })
|
|
695
741
|
}
|
|
696
742
|
);
|
|
697
743
|
}
|
|
698
|
-
function
|
|
699
|
-
|
|
744
|
+
function getBackButtonNodeAttributes(flowType, nodes) {
|
|
745
|
+
var _a, _b;
|
|
746
|
+
let nodeBackButtonAttributes;
|
|
700
747
|
switch (flowType) {
|
|
701
|
-
case
|
|
702
|
-
|
|
703
|
-
(node) =>
|
|
704
|
-
);
|
|
748
|
+
case import_client_fetch6.FlowType.Login:
|
|
749
|
+
nodeBackButtonAttributes = (_a = nodes.find(
|
|
750
|
+
(node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
751
|
+
)) == null ? void 0 : _a.attributes;
|
|
705
752
|
break;
|
|
706
|
-
case
|
|
707
|
-
|
|
753
|
+
case import_client_fetch6.FlowType.Registration:
|
|
754
|
+
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
708
755
|
break;
|
|
709
|
-
case
|
|
710
|
-
case
|
|
711
|
-
|
|
712
|
-
(n) =>
|
|
713
|
-
);
|
|
756
|
+
case import_client_fetch6.FlowType.Recovery:
|
|
757
|
+
case import_client_fetch6.FlowType.Verification:
|
|
758
|
+
nodeBackButtonAttributes = (_b = nodes.find(
|
|
759
|
+
(n) => (0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
|
|
760
|
+
)) == null ? void 0 : _b.attributes;
|
|
714
761
|
break;
|
|
715
762
|
}
|
|
716
|
-
|
|
763
|
+
if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
|
|
764
|
+
return void 0;
|
|
765
|
+
}
|
|
766
|
+
return nodeBackButtonAttributes;
|
|
717
767
|
}
|
|
718
768
|
var backButtonCandiates = [
|
|
719
769
|
"traits.email",
|
|
@@ -721,9 +771,10 @@ var backButtonCandiates = [
|
|
|
721
771
|
"traits.phone_number"
|
|
722
772
|
];
|
|
723
773
|
function guessRegistrationBackButton(uiNodes) {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
774
|
+
var _a;
|
|
775
|
+
return (_a = uiNodes.find(
|
|
776
|
+
(node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
777
|
+
)) == null ? void 0 : _a.attributes;
|
|
727
778
|
}
|
|
728
779
|
|
|
729
780
|
// src/theme/default/components/card/header.tsx
|
|
@@ -781,7 +832,7 @@ function cn(...inputs) {
|
|
|
781
832
|
// src/theme/default/components/form/index.tsx
|
|
782
833
|
var import_react_intl4 = require("react-intl");
|
|
783
834
|
var import_elements_react6 = require("@ory/elements-react");
|
|
784
|
-
var
|
|
835
|
+
var import_client_fetch8 = require("@ory/client-fetch");
|
|
785
836
|
|
|
786
837
|
// src/theme/default/components/form/social.tsx
|
|
787
838
|
var import_elements_react5 = require("@ory/elements-react");
|
|
@@ -1018,7 +1069,7 @@ function Spinner({ className }) {
|
|
|
1018
1069
|
}
|
|
1019
1070
|
|
|
1020
1071
|
// src/theme/default/components/form/social.tsx
|
|
1021
|
-
var
|
|
1072
|
+
var import_client_fetch7 = require("@ory/client-fetch");
|
|
1022
1073
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1023
1074
|
function extractProvider(context) {
|
|
1024
1075
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
@@ -1050,7 +1101,7 @@ function DefaultButtonSocial({
|
|
|
1050
1101
|
formState: { isSubmitting }
|
|
1051
1102
|
} = (0, import_react_hook_form2.useFormContext)();
|
|
1052
1103
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
1053
|
-
(node2) => node2.group ===
|
|
1104
|
+
(node2) => node2.group === import_client_fetch7.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch7.UiNodeGroupEnum.Saml
|
|
1054
1105
|
).length) != null ? _a : 0;
|
|
1055
1106
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
1056
1107
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -1064,6 +1115,7 @@ function DefaultButtonSocial({
|
|
|
1064
1115
|
setClicked(false);
|
|
1065
1116
|
}
|
|
1066
1117
|
}, [isSubmitting, setClicked]);
|
|
1118
|
+
const label = node.meta.label ? (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) : "";
|
|
1067
1119
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1068
1120
|
"button",
|
|
1069
1121
|
{
|
|
@@ -1076,10 +1128,11 @@ function DefaultButtonSocial({
|
|
|
1076
1128
|
onClick: localOnClick,
|
|
1077
1129
|
"data-loading": clicked,
|
|
1078
1130
|
disabled: isSubmitting,
|
|
1131
|
+
"aria-label": label,
|
|
1079
1132
|
children: [
|
|
1080
1133
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Spinner, { className: "size-5" }) }),
|
|
1081
1134
|
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1082
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children:
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
1083
1136
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 block" })
|
|
1084
1137
|
] }) : null
|
|
1085
1138
|
]
|
|
@@ -1134,7 +1187,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
1134
1187
|
"section",
|
|
1135
1188
|
{
|
|
1136
1189
|
className: cn(
|
|
1137
|
-
flowType ===
|
|
1190
|
+
flowType === import_client_fetch8.FlowType.Settings ? "text-center" : "text-left"
|
|
1138
1191
|
),
|
|
1139
1192
|
children
|
|
1140
1193
|
}
|
|
@@ -1291,7 +1344,7 @@ function DefaultAuthMethodListItem({
|
|
|
1291
1344
|
}
|
|
1292
1345
|
|
|
1293
1346
|
// src/theme/default/components/form/button.tsx
|
|
1294
|
-
var
|
|
1347
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1295
1348
|
var import_elements_react7 = require("@ory/elements-react");
|
|
1296
1349
|
var import_class_variance_authority = require("class-variance-authority");
|
|
1297
1350
|
var import_react_hook_form3 = require("react-hook-form");
|
|
@@ -1350,7 +1403,7 @@ var DefaultButton = ({
|
|
|
1350
1403
|
} = attributes;
|
|
1351
1404
|
const [clicked, setClicked] = (0, import_react4.useState)(false);
|
|
1352
1405
|
const intl = (0, import_react_intl6.useIntl)();
|
|
1353
|
-
const label = (0,
|
|
1406
|
+
const label = (0, import_client_fetch9.getNodeLabel)(node);
|
|
1354
1407
|
const {
|
|
1355
1408
|
formState: { isSubmitting },
|
|
1356
1409
|
setValue
|
|
@@ -1390,7 +1443,7 @@ var DefaultButton = ({
|
|
|
1390
1443
|
DefaultButton.displayName = "DefaultButton";
|
|
1391
1444
|
|
|
1392
1445
|
// src/theme/default/components/form/checkbox.tsx
|
|
1393
|
-
var
|
|
1446
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
1394
1447
|
var import_elements_react8 = require("@ory/elements-react");
|
|
1395
1448
|
var import_react_hook_form4 = require("react-hook-form");
|
|
1396
1449
|
var import_react_intl8 = require("react-intl");
|
|
@@ -1537,7 +1590,7 @@ var DefaultCheckbox = ({
|
|
|
1537
1590
|
...attributes
|
|
1538
1591
|
} = initialAttributes;
|
|
1539
1592
|
const intl = (0, import_react_intl8.useIntl)();
|
|
1540
|
-
const label = (0,
|
|
1593
|
+
const label = (0, import_client_fetch10.getNodeLabel)(node);
|
|
1541
1594
|
const { register } = (0, import_react_hook_form4.useFormContext)();
|
|
1542
1595
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1543
1596
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
@@ -1577,16 +1630,33 @@ var DefaultCheckbox = ({
|
|
|
1577
1630
|
|
|
1578
1631
|
// src/theme/default/components/form/group-container.tsx
|
|
1579
1632
|
var import_elements_react9 = require("@ory/elements-react");
|
|
1580
|
-
var
|
|
1633
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
1634
|
+
|
|
1635
|
+
// src/util/childCounter.ts
|
|
1636
|
+
var import_react5 = require("react");
|
|
1637
|
+
function countRenderableChildren(children) {
|
|
1638
|
+
return import_react5.Children.toArray(children).filter((c) => {
|
|
1639
|
+
if ((0, import_react5.isValidElement)(c)) {
|
|
1640
|
+
return true;
|
|
1641
|
+
}
|
|
1642
|
+
return false;
|
|
1643
|
+
}).length;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
// src/theme/default/components/form/group-container.tsx
|
|
1581
1647
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1582
1648
|
function DefaultGroupContainer({ children }) {
|
|
1583
1649
|
const { flowType } = (0, import_elements_react9.useOryFlow)();
|
|
1650
|
+
const count = countRenderableChildren(children);
|
|
1651
|
+
if (count === 0) {
|
|
1652
|
+
return null;
|
|
1653
|
+
}
|
|
1584
1654
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1585
1655
|
"div",
|
|
1586
1656
|
{
|
|
1587
1657
|
className: cn(
|
|
1588
1658
|
"grid",
|
|
1589
|
-
flowType ===
|
|
1659
|
+
flowType === import_client_fetch11.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
1590
1660
|
),
|
|
1591
1661
|
children
|
|
1592
1662
|
}
|
|
@@ -1601,14 +1671,15 @@ function DefaultHorizontalDivider() {
|
|
|
1601
1671
|
|
|
1602
1672
|
// src/theme/default/components/form/image.tsx
|
|
1603
1673
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1604
|
-
function DefaultImage({ attributes }) {
|
|
1605
|
-
|
|
1674
|
+
function DefaultImage({ attributes, node }) {
|
|
1675
|
+
var _a;
|
|
1676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("img", { ...attributes, alt: ((_a = node.meta.label) == null ? void 0 : _a.text) || "" }) });
|
|
1606
1677
|
}
|
|
1607
1678
|
|
|
1608
1679
|
// src/theme/default/components/form/input.tsx
|
|
1609
|
-
var
|
|
1680
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
1610
1681
|
var import_elements_react10 = require("@ory/elements-react");
|
|
1611
|
-
var
|
|
1682
|
+
var import_react6 = require("react");
|
|
1612
1683
|
var import_react_hook_form5 = require("react-hook-form");
|
|
1613
1684
|
var import_react_intl9 = require("react-intl");
|
|
1614
1685
|
|
|
@@ -1640,7 +1711,7 @@ var DefaultInput = ({
|
|
|
1640
1711
|
attributes,
|
|
1641
1712
|
onClick
|
|
1642
1713
|
}) => {
|
|
1643
|
-
const label = (0,
|
|
1714
|
+
const label = (0, import_client_fetch12.getNodeLabel)(node);
|
|
1644
1715
|
const { register } = (0, import_react_hook_form5.useFormContext)();
|
|
1645
1716
|
const {
|
|
1646
1717
|
value,
|
|
@@ -1652,7 +1723,7 @@ var DefaultInput = ({
|
|
|
1652
1723
|
} = attributes;
|
|
1653
1724
|
const intl = (0, import_react_intl9.useIntl)();
|
|
1654
1725
|
const { flowType } = (0, import_elements_react10.useOryFlow)();
|
|
1655
|
-
const inputRef = (0,
|
|
1726
|
+
const inputRef = (0, import_react6.useRef)(null);
|
|
1656
1727
|
const formattedLabel = label ? intl.formatMessage(
|
|
1657
1728
|
{
|
|
1658
1729
|
id: "input.placeholder",
|
|
@@ -1683,7 +1754,7 @@ var DefaultInput = ({
|
|
|
1683
1754
|
className: cn(
|
|
1684
1755
|
"relative flex justify-stretch",
|
|
1685
1756
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1686
|
-
flowType ===
|
|
1757
|
+
flowType === import_client_fetch12.FlowType.Settings && "max-w-[488px]"
|
|
1687
1758
|
),
|
|
1688
1759
|
children: [
|
|
1689
1760
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -1718,7 +1789,7 @@ var DefaultInput = ({
|
|
|
1718
1789
|
function PasswordToggle({
|
|
1719
1790
|
inputRef
|
|
1720
1791
|
}) {
|
|
1721
|
-
const [shown, setShown] = (0,
|
|
1792
|
+
const [shown, setShown] = (0, import_react6.useState)(false);
|
|
1722
1793
|
const handleClick = () => {
|
|
1723
1794
|
setShown(!shown);
|
|
1724
1795
|
if (inputRef.current) {
|
|
@@ -1731,13 +1802,14 @@ function PasswordToggle({
|
|
|
1731
1802
|
onClick: handleClick,
|
|
1732
1803
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
1733
1804
|
type: "button",
|
|
1805
|
+
"aria-label": "Toggle password visibility",
|
|
1734
1806
|
children: shown ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(eye_default, {})
|
|
1735
1807
|
}
|
|
1736
1808
|
);
|
|
1737
1809
|
}
|
|
1738
1810
|
|
|
1739
1811
|
// src/theme/default/components/form/label.tsx
|
|
1740
|
-
var
|
|
1812
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
1741
1813
|
var import_elements_react11 = require("@ory/elements-react");
|
|
1742
1814
|
var import_react_hook_form6 = require("react-hook-form");
|
|
1743
1815
|
var import_react_intl10 = require("react-intl");
|
|
@@ -1754,7 +1826,7 @@ function DefaultLabel({
|
|
|
1754
1826
|
...rest
|
|
1755
1827
|
}) {
|
|
1756
1828
|
const intl = (0, import_react_intl10.useIntl)();
|
|
1757
|
-
const label = (0,
|
|
1829
|
+
const label = (0, import_client_fetch13.getNodeLabel)(node);
|
|
1758
1830
|
const { Message } = (0, import_elements_react11.useComponents)();
|
|
1759
1831
|
const { config, flowType, flow } = (0, import_elements_react11.useOryFlow)();
|
|
1760
1832
|
const { setValue, formState } = (0, import_react_hook_form6.useFormContext)();
|
|
@@ -1779,7 +1851,7 @@ function DefaultLabel({
|
|
|
1779
1851
|
children: (0, import_elements_react11.uiTextToFormattedMessage)(label, intl)
|
|
1780
1852
|
}
|
|
1781
1853
|
),
|
|
1782
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
1854
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch13.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
1783
1855
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1784
1856
|
"a",
|
|
1785
1857
|
{
|
|
@@ -1805,19 +1877,19 @@ function DefaultLabel({
|
|
|
1805
1877
|
] }),
|
|
1806
1878
|
children,
|
|
1807
1879
|
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message }, message.id)),
|
|
1808
|
-
fieldError && (0,
|
|
1880
|
+
fieldError && (0, import_client_fetch13.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message: fieldError })
|
|
1809
1881
|
] });
|
|
1810
1882
|
}
|
|
1811
1883
|
|
|
1812
1884
|
// src/theme/default/components/form/link-button.tsx
|
|
1813
|
-
var
|
|
1885
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
1814
1886
|
var import_elements_react12 = require("@ory/elements-react");
|
|
1815
|
-
var
|
|
1887
|
+
var import_react7 = require("react");
|
|
1816
1888
|
var import_react_intl11 = require("react-intl");
|
|
1817
1889
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1818
|
-
var DefaultLinkButton = (0,
|
|
1890
|
+
var DefaultLinkButton = (0, import_react7.forwardRef)(({ attributes, node }, ref) => {
|
|
1819
1891
|
const intl = (0, import_react_intl11.useIntl)();
|
|
1820
|
-
const label = (0,
|
|
1892
|
+
const label = (0, import_client_fetch14.getNodeLabel)(node);
|
|
1821
1893
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1822
1894
|
"a",
|
|
1823
1895
|
{
|
|
@@ -1881,7 +1953,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
1881
1953
|
|
|
1882
1954
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1883
1955
|
var import_elements_react13 = require("@ory/elements-react");
|
|
1884
|
-
var
|
|
1956
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
1885
1957
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1886
1958
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1887
1959
|
const { setValue, watch } = (0, import_react_hook_form7.useFormContext)();
|
|
@@ -1905,7 +1977,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1905
1977
|
className: cn(
|
|
1906
1978
|
"w-full flex gap-2 justify-stretch",
|
|
1907
1979
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1908
|
-
flowType ===
|
|
1980
|
+
flowType === import_client_fetch15.FlowType.Settings && "max-w-[488px]"
|
|
1909
1981
|
),
|
|
1910
1982
|
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InputOTPSlot, { index }, index))
|
|
1911
1983
|
}
|
|
@@ -2024,12 +2096,12 @@ var SvgSettings = (props) => {
|
|
|
2024
2096
|
var settings_default = SvgSettings;
|
|
2025
2097
|
|
|
2026
2098
|
// src/theme/default/utils/logout.ts
|
|
2027
|
-
var
|
|
2099
|
+
var import_react8 = require("react");
|
|
2028
2100
|
|
|
2029
2101
|
// src/util/client.ts
|
|
2030
|
-
var
|
|
2102
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
2031
2103
|
function frontendClient(sdkUrl, opts = {}) {
|
|
2032
|
-
const config = new
|
|
2104
|
+
const config = new import_client_fetch16.Configuration({
|
|
2033
2105
|
...opts,
|
|
2034
2106
|
basePath: sdkUrl,
|
|
2035
2107
|
headers: {
|
|
@@ -2037,17 +2109,17 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
2037
2109
|
...opts.headers
|
|
2038
2110
|
}
|
|
2039
2111
|
});
|
|
2040
|
-
return new
|
|
2112
|
+
return new import_client_fetch16.FrontendApi(config);
|
|
2041
2113
|
}
|
|
2042
2114
|
|
|
2043
2115
|
// src/theme/default/utils/logout.ts
|
|
2044
2116
|
function useClientLogout(config) {
|
|
2045
|
-
const [logoutFlow, setLogoutFlow] = (0,
|
|
2046
|
-
const fetchLogoutFlow = (0,
|
|
2117
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react8.useState)();
|
|
2118
|
+
const fetchLogoutFlow = (0, import_react8.useCallback)(async () => {
|
|
2047
2119
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
2048
2120
|
setLogoutFlow(flow);
|
|
2049
2121
|
}, [config.sdk.url]);
|
|
2050
|
-
(0,
|
|
2122
|
+
(0, import_react8.useEffect)(() => {
|
|
2051
2123
|
void fetchLogoutFlow();
|
|
2052
2124
|
}, [fetchLogoutFlow]);
|
|
2053
2125
|
return logoutFlow;
|
|
@@ -2093,12 +2165,12 @@ var getUserInitials = (session) => {
|
|
|
2093
2165
|
};
|
|
2094
2166
|
|
|
2095
2167
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
2096
|
-
var
|
|
2168
|
+
var import_react9 = require("react");
|
|
2097
2169
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2098
2170
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2099
2171
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2100
2172
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2101
|
-
var DropdownMenuContent = (0,
|
|
2173
|
+
var DropdownMenuContent = (0, import_react9.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2102
2174
|
DropdownMenuPrimitive.Content,
|
|
2103
2175
|
{
|
|
2104
2176
|
ref,
|
|
@@ -2113,7 +2185,7 @@ var DropdownMenuContent = (0, import_react8.forwardRef)(({ className, sideOffset
|
|
|
2113
2185
|
}
|
|
2114
2186
|
) }));
|
|
2115
2187
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2116
|
-
var DropdownMenuItem = (0,
|
|
2188
|
+
var DropdownMenuItem = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2117
2189
|
DropdownMenuPrimitive.Item,
|
|
2118
2190
|
{
|
|
2119
2191
|
ref,
|
|
@@ -2131,7 +2203,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(({ className, inset, ...pro
|
|
|
2131
2203
|
}
|
|
2132
2204
|
));
|
|
2133
2205
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2134
|
-
var DropdownMenuLabel = (0,
|
|
2206
|
+
var DropdownMenuLabel = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2135
2207
|
DropdownMenuPrimitive.Label,
|
|
2136
2208
|
{
|
|
2137
2209
|
ref,
|
|
@@ -2146,7 +2218,7 @@ var DropdownMenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...pr
|
|
|
2146
2218
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2147
2219
|
|
|
2148
2220
|
// src/theme/default/components/ui/user-avater.tsx
|
|
2149
|
-
var
|
|
2221
|
+
var import_react10 = require("react");
|
|
2150
2222
|
|
|
2151
2223
|
// src/theme/default/assets/icons/user.svg
|
|
2152
2224
|
var React29 = __toESM(require("react"));
|
|
@@ -2159,7 +2231,7 @@ var user_default = SvgUser;
|
|
|
2159
2231
|
|
|
2160
2232
|
// src/theme/default/components/ui/user-avater.tsx
|
|
2161
2233
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2162
|
-
var UserAvatar = (0,
|
|
2234
|
+
var UserAvatar = (0, import_react10.forwardRef)(
|
|
2163
2235
|
({ initials, ...rest }, ref) => {
|
|
2164
2236
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2165
2237
|
"button",
|
|
@@ -2194,7 +2266,7 @@ var UserMenu = ({ session }) => {
|
|
|
2194
2266
|
const initials = getUserInitials(session);
|
|
2195
2267
|
const logoutFlow = useClientLogout(config);
|
|
2196
2268
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DropdownMenu, { children: [
|
|
2197
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserAvatar, { initials }) }),
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserAvatar, { initials, title: "User Menu" }) }),
|
|
2198
2270
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DropdownMenuContent, { children: [
|
|
2199
2271
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
2200
2272
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserAvatar, { disabled: true, initials }),
|
|
@@ -2228,7 +2300,7 @@ var DefaultPageHeader = (_props) => {
|
|
|
2228
2300
|
};
|
|
2229
2301
|
|
|
2230
2302
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
2231
|
-
var
|
|
2303
|
+
var import_react11 = require("react");
|
|
2232
2304
|
var import_react_hook_form8 = require("react-hook-form");
|
|
2233
2305
|
var import_usehooks_ts2 = require("usehooks-ts");
|
|
2234
2306
|
|
|
@@ -2285,7 +2357,7 @@ function UnlinkRow({ button }) {
|
|
|
2285
2357
|
button.onClick();
|
|
2286
2358
|
setClicked(true);
|
|
2287
2359
|
};
|
|
2288
|
-
(0,
|
|
2360
|
+
(0, import_react11.useEffect)(() => {
|
|
2289
2361
|
if (!isSubmitting) {
|
|
2290
2362
|
setClicked(false);
|
|
2291
2363
|
}
|
|
@@ -2733,23 +2805,23 @@ function DefaultAuthMethodListContainer({
|
|
|
2733
2805
|
}
|
|
2734
2806
|
|
|
2735
2807
|
// src/theme/default/components/form/captcha.tsx
|
|
2736
|
-
var
|
|
2808
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
2737
2809
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
2738
|
-
var
|
|
2810
|
+
var import_react12 = require("react");
|
|
2739
2811
|
var import_react_hook_form13 = require("react-hook-form");
|
|
2740
2812
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2741
2813
|
var DefaultCaptcha = ({ node }) => {
|
|
2742
2814
|
const { setValue } = (0, import_react_hook_form13.useFormContext)();
|
|
2743
|
-
const ref = (0,
|
|
2815
|
+
const ref = (0, import_react12.useRef)();
|
|
2744
2816
|
const nodes = [];
|
|
2745
|
-
if ((0,
|
|
2817
|
+
if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes)) {
|
|
2746
2818
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2747
2819
|
nodes.push(
|
|
2748
2820
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
2749
2821
|
);
|
|
2750
2822
|
}
|
|
2751
2823
|
}
|
|
2752
|
-
if ((0,
|
|
2824
|
+
if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2753
2825
|
const options = JSON.parse(node.attributes.value);
|
|
2754
2826
|
nodes.push(
|
|
2755
2827
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
@@ -2904,25 +2976,25 @@ function getOryComponents(overrides) {
|
|
|
2904
2976
|
}
|
|
2905
2977
|
|
|
2906
2978
|
// src/theme/default/flows/error.tsx
|
|
2907
|
-
var
|
|
2908
|
-
var
|
|
2979
|
+
var import_client_fetch36 = require("@ory/client-fetch");
|
|
2980
|
+
var import_react16 = require("react");
|
|
2909
2981
|
|
|
2910
2982
|
// src/context/intl-context.tsx
|
|
2911
2983
|
var import_react_intl21 = require("react-intl");
|
|
2912
2984
|
|
|
2913
2985
|
// src/context/flow-context.tsx
|
|
2914
|
-
var
|
|
2986
|
+
var import_react14 = require("react");
|
|
2915
2987
|
|
|
2916
2988
|
// src/context/form-state.ts
|
|
2917
|
-
var
|
|
2918
|
-
var
|
|
2989
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
2990
|
+
var import_react13 = require("react");
|
|
2919
2991
|
|
|
2920
2992
|
// src/components/card/card-two-step.utils.ts
|
|
2921
|
-
var
|
|
2993
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
2922
2994
|
|
|
2923
2995
|
// src/context/flow-context.tsx
|
|
2924
2996
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2925
|
-
var OryFlowContext = (0,
|
|
2997
|
+
var OryFlowContext = (0, import_react14.createContext)(null);
|
|
2926
2998
|
|
|
2927
2999
|
// src/context/provider.tsx
|
|
2928
3000
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
@@ -2931,14 +3003,14 @@ var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
|
2931
3003
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2932
3004
|
|
|
2933
3005
|
// src/components/form/form-provider.tsx
|
|
2934
|
-
var
|
|
3006
|
+
var import_client_fetch22 = require("@ory/client-fetch");
|
|
2935
3007
|
var import_react_hook_form14 = require("react-hook-form");
|
|
2936
3008
|
|
|
2937
3009
|
// src/components/form/form-helpers.ts
|
|
2938
|
-
var
|
|
3010
|
+
var import_client_fetch20 = require("@ory/client-fetch");
|
|
2939
3011
|
|
|
2940
3012
|
// src/components/form/form-resolver.ts
|
|
2941
|
-
var
|
|
3013
|
+
var import_client_fetch21 = require("@ory/client-fetch");
|
|
2942
3014
|
|
|
2943
3015
|
// src/components/form/form-provider.tsx
|
|
2944
3016
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
@@ -2953,32 +3025,32 @@ var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
|
2953
3025
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
2954
3026
|
|
|
2955
3027
|
// src/components/card/card-two-step.tsx
|
|
2956
|
-
var
|
|
3028
|
+
var import_client_fetch33 = require("@ory/client-fetch");
|
|
2957
3029
|
var import_react_hook_form19 = require("react-hook-form");
|
|
2958
3030
|
|
|
2959
3031
|
// src/components/form/form.tsx
|
|
2960
|
-
var
|
|
3032
|
+
var import_client_fetch29 = require("@ory/client-fetch");
|
|
2961
3033
|
var import_react_hook_form16 = require("react-hook-form");
|
|
2962
3034
|
var import_react_intl14 = require("react-intl");
|
|
2963
3035
|
|
|
2964
3036
|
// src/components/form/useOryFormSubmit.ts
|
|
2965
|
-
var
|
|
3037
|
+
var import_client_fetch28 = require("@ory/client-fetch");
|
|
2966
3038
|
var import_react_hook_form15 = require("react-hook-form");
|
|
2967
3039
|
|
|
2968
3040
|
// src/util/onSubmitLogin.ts
|
|
2969
|
-
var
|
|
3041
|
+
var import_client_fetch23 = require("@ory/client-fetch");
|
|
2970
3042
|
|
|
2971
3043
|
// src/util/onSubmitRecovery.ts
|
|
2972
|
-
var
|
|
3044
|
+
var import_client_fetch24 = require("@ory/client-fetch");
|
|
2973
3045
|
|
|
2974
3046
|
// src/util/onSubmitRegistration.ts
|
|
2975
|
-
var
|
|
3047
|
+
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2976
3048
|
|
|
2977
3049
|
// src/util/onSubmitSettings.ts
|
|
2978
|
-
var
|
|
3050
|
+
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2979
3051
|
|
|
2980
3052
|
// src/util/onSubmitVerification.ts
|
|
2981
|
-
var
|
|
3053
|
+
var import_client_fetch27 = require("@ory/client-fetch");
|
|
2982
3054
|
|
|
2983
3055
|
// src/components/form/form.tsx
|
|
2984
3056
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
@@ -2987,17 +3059,17 @@ var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
|
2987
3059
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
2988
3060
|
|
|
2989
3061
|
// src/components/form/nodes/input.tsx
|
|
2990
|
-
var
|
|
2991
|
-
var
|
|
3062
|
+
var import_client_fetch30 = require("@ory/client-fetch");
|
|
3063
|
+
var import_react15 = require("react");
|
|
2992
3064
|
var import_react_hook_form17 = require("react-hook-form");
|
|
2993
3065
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
2994
3066
|
|
|
2995
3067
|
// src/components/form/nodes/node.tsx
|
|
2996
|
-
var
|
|
3068
|
+
var import_client_fetch31 = require("@ory/client-fetch");
|
|
2997
3069
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
2998
3070
|
|
|
2999
3071
|
// src/components/form/social.tsx
|
|
3000
|
-
var
|
|
3072
|
+
var import_client_fetch32 = require("@ory/client-fetch");
|
|
3001
3073
|
var import_react_hook_form18 = require("react-hook-form");
|
|
3002
3074
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3003
3075
|
|
|
@@ -3015,14 +3087,14 @@ var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
|
3015
3087
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
3016
3088
|
|
|
3017
3089
|
// src/components/generic/divider.tsx
|
|
3018
|
-
var
|
|
3090
|
+
var import_client_fetch34 = require("@ory/client-fetch");
|
|
3019
3091
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
3020
3092
|
|
|
3021
3093
|
// src/components/generic/page-header.tsx
|
|
3022
3094
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
3023
3095
|
|
|
3024
3096
|
// src/components/settings/settings-card.tsx
|
|
3025
|
-
var
|
|
3097
|
+
var import_client_fetch35 = require("@ory/client-fetch");
|
|
3026
3098
|
var import_react_intl20 = require("react-intl");
|
|
3027
3099
|
|
|
3028
3100
|
// src/components/settings/oidc-settings.tsx
|
|
@@ -3506,7 +3578,7 @@ var de_default = {
|
|
|
3506
3578
|
"two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
|
|
3507
3579
|
"two-step.code.title": "E-Mail-Code",
|
|
3508
3580
|
"two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
|
|
3509
|
-
"two-step.passkey.title": "
|
|
3581
|
+
"two-step.passkey.title": "Passkey (empfohlen)",
|
|
3510
3582
|
"two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
|
|
3511
3583
|
"two-step.password.title": "Passwort",
|
|
3512
3584
|
"two-step.webauthn.title": "Sicherheitsschl\xFCssel",
|
|
@@ -5385,7 +5457,7 @@ var errorDescriptions = {
|
|
|
5385
5457
|
5: "The server encountered an error and could not complete your request"
|
|
5386
5458
|
};
|
|
5387
5459
|
function useStandardize(error) {
|
|
5388
|
-
return (0,
|
|
5460
|
+
return (0, import_react16.useMemo)(() => {
|
|
5389
5461
|
var _a;
|
|
5390
5462
|
if (isOAuth2Error(error)) {
|
|
5391
5463
|
return {
|
|
@@ -5395,14 +5467,14 @@ function useStandardize(error) {
|
|
|
5395
5467
|
timestamp: /* @__PURE__ */ new Date()
|
|
5396
5468
|
};
|
|
5397
5469
|
}
|
|
5398
|
-
if ((0,
|
|
5470
|
+
if ((0, import_client_fetch36.instanceOfFlowError)(error)) {
|
|
5399
5471
|
const parsed = error.error;
|
|
5400
5472
|
return {
|
|
5401
5473
|
...parsed,
|
|
5402
5474
|
id: error.id,
|
|
5403
5475
|
timestamp: error.created_at
|
|
5404
5476
|
};
|
|
5405
|
-
} else if (error.error && (0,
|
|
5477
|
+
} else if (error.error && (0, import_client_fetch36.instanceOfGenericError)(error.error)) {
|
|
5406
5478
|
return {
|
|
5407
5479
|
code: (_a = error.error.code) != null ? _a : 500,
|
|
5408
5480
|
message: error.error.message,
|
|
@@ -5523,7 +5595,7 @@ function ErrorLogo({ config }) {
|
|
|
5523
5595
|
}
|
|
5524
5596
|
|
|
5525
5597
|
// src/theme/default/flows/login.tsx
|
|
5526
|
-
var
|
|
5598
|
+
var import_client_fetch37 = require("@ory/client-fetch");
|
|
5527
5599
|
var import_elements_react20 = require("@ory/elements-react");
|
|
5528
5600
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5529
5601
|
function Login({
|
|
@@ -5538,7 +5610,7 @@ function Login({
|
|
|
5538
5610
|
{
|
|
5539
5611
|
config,
|
|
5540
5612
|
flow,
|
|
5541
|
-
flowType:
|
|
5613
|
+
flowType: import_client_fetch37.FlowType.Login,
|
|
5542
5614
|
components,
|
|
5543
5615
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_elements_react20.OryTwoStepCard, {})
|
|
5544
5616
|
}
|
|
@@ -5546,7 +5618,7 @@ function Login({
|
|
|
5546
5618
|
}
|
|
5547
5619
|
|
|
5548
5620
|
// src/theme/default/flows/recovery.tsx
|
|
5549
|
-
var
|
|
5621
|
+
var import_client_fetch38 = require("@ory/client-fetch");
|
|
5550
5622
|
var import_elements_react21 = require("@ory/elements-react");
|
|
5551
5623
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5552
5624
|
function Recovery({
|
|
@@ -5561,7 +5633,7 @@ function Recovery({
|
|
|
5561
5633
|
{
|
|
5562
5634
|
config,
|
|
5563
5635
|
flow,
|
|
5564
|
-
flowType:
|
|
5636
|
+
flowType: import_client_fetch38.FlowType.Recovery,
|
|
5565
5637
|
components,
|
|
5566
5638
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_elements_react21.OryTwoStepCard, {})
|
|
5567
5639
|
}
|
|
@@ -5569,7 +5641,7 @@ function Recovery({
|
|
|
5569
5641
|
}
|
|
5570
5642
|
|
|
5571
5643
|
// src/theme/default/flows/registration.tsx
|
|
5572
|
-
var
|
|
5644
|
+
var import_client_fetch39 = require("@ory/client-fetch");
|
|
5573
5645
|
var import_elements_react22 = require("@ory/elements-react");
|
|
5574
5646
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5575
5647
|
function Registration({
|
|
@@ -5584,7 +5656,7 @@ function Registration({
|
|
|
5584
5656
|
{
|
|
5585
5657
|
config,
|
|
5586
5658
|
flow,
|
|
5587
|
-
flowType:
|
|
5659
|
+
flowType: import_client_fetch39.FlowType.Registration,
|
|
5588
5660
|
components,
|
|
5589
5661
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_elements_react22.OryTwoStepCard, {})
|
|
5590
5662
|
}
|
|
@@ -5592,7 +5664,7 @@ function Registration({
|
|
|
5592
5664
|
}
|
|
5593
5665
|
|
|
5594
5666
|
// src/theme/default/flows/settings.tsx
|
|
5595
|
-
var
|
|
5667
|
+
var import_client_fetch40 = require("@ory/client-fetch");
|
|
5596
5668
|
var import_elements_react23 = require("@ory/elements-react");
|
|
5597
5669
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5598
5670
|
function Settings({
|
|
@@ -5607,7 +5679,7 @@ function Settings({
|
|
|
5607
5679
|
{
|
|
5608
5680
|
config,
|
|
5609
5681
|
flow,
|
|
5610
|
-
flowType:
|
|
5682
|
+
flowType: import_client_fetch40.FlowType.Settings,
|
|
5611
5683
|
components,
|
|
5612
5684
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
5613
5685
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react23.HeadlessPageHeader, {}),
|
|
@@ -5618,7 +5690,7 @@ function Settings({
|
|
|
5618
5690
|
}
|
|
5619
5691
|
|
|
5620
5692
|
// src/theme/default/flows/verification.tsx
|
|
5621
|
-
var
|
|
5693
|
+
var import_client_fetch41 = require("@ory/client-fetch");
|
|
5622
5694
|
var import_elements_react24 = require("@ory/elements-react");
|
|
5623
5695
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5624
5696
|
function Verification({
|
|
@@ -5633,7 +5705,7 @@ function Verification({
|
|
|
5633
5705
|
{
|
|
5634
5706
|
config,
|
|
5635
5707
|
flow,
|
|
5636
|
-
flowType:
|
|
5708
|
+
flowType: import_client_fetch41.FlowType.Verification,
|
|
5637
5709
|
components,
|
|
5638
5710
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react24.OryTwoStepCard, {})
|
|
5639
5711
|
}
|
|
@@ -5641,11 +5713,11 @@ function Verification({
|
|
|
5641
5713
|
}
|
|
5642
5714
|
|
|
5643
5715
|
// src/theme/default/flows/consent.tsx
|
|
5644
|
-
var
|
|
5716
|
+
var import_client_fetch43 = require("@ory/client-fetch");
|
|
5645
5717
|
var import_elements_react25 = require("@ory/elements-react");
|
|
5646
5718
|
|
|
5647
5719
|
// src/theme/default/utils/oauth2.ts
|
|
5648
|
-
var
|
|
5720
|
+
var import_client_fetch42 = require("@ory/client-fetch");
|
|
5649
5721
|
var rememberCheckbox = {
|
|
5650
5722
|
type: "input",
|
|
5651
5723
|
group: "oauth2_consent",
|
|
@@ -5653,7 +5725,7 @@ var rememberCheckbox = {
|
|
|
5653
5725
|
label: {
|
|
5654
5726
|
id: 9999111,
|
|
5655
5727
|
text: "Remember my decision",
|
|
5656
|
-
type:
|
|
5728
|
+
type: import_client_fetch42.UiTextTypeEnum.Info
|
|
5657
5729
|
}
|
|
5658
5730
|
},
|
|
5659
5731
|
attributes: {
|
|
@@ -5672,7 +5744,7 @@ var acceptButton = {
|
|
|
5672
5744
|
label: {
|
|
5673
5745
|
id: 9999111,
|
|
5674
5746
|
text: "Accept",
|
|
5675
|
-
type:
|
|
5747
|
+
type: import_client_fetch42.UiTextTypeEnum.Info
|
|
5676
5748
|
}
|
|
5677
5749
|
},
|
|
5678
5750
|
attributes: {
|
|
@@ -5691,7 +5763,7 @@ var rejectButton = {
|
|
|
5691
5763
|
label: {
|
|
5692
5764
|
id: 9999111,
|
|
5693
5765
|
text: "Reject",
|
|
5694
|
-
type:
|
|
5766
|
+
type: import_client_fetch42.UiTextTypeEnum.Info
|
|
5695
5767
|
}
|
|
5696
5768
|
},
|
|
5697
5769
|
attributes: {
|
|
@@ -5738,7 +5810,7 @@ function scopesToUiNodes(scopes) {
|
|
|
5738
5810
|
label: {
|
|
5739
5811
|
id: 9999111,
|
|
5740
5812
|
text: scope,
|
|
5741
|
-
type:
|
|
5813
|
+
type: import_client_fetch42.UiTextTypeEnum.Info
|
|
5742
5814
|
}
|
|
5743
5815
|
},
|
|
5744
5816
|
attributes: {
|
|
@@ -5805,7 +5877,7 @@ function Consent({
|
|
|
5805
5877
|
{
|
|
5806
5878
|
config,
|
|
5807
5879
|
flow,
|
|
5808
|
-
flowType:
|
|
5880
|
+
flowType: import_client_fetch43.FlowType.OAuth2Consent,
|
|
5809
5881
|
components,
|
|
5810
5882
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react25.OryConsentCard, {})
|
|
5811
5883
|
}
|