@ory/elements-react 1.0.0-next.15 → 1.0.0-next.17
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 +48 -0
- package/api-report/elements-react-theme.api.json +150 -0
- package/api-report/elements-react-theme.api.md +14 -2
- package/api-report/temp/elements-react-theme.api.md +14 -2
- package/dist/index.js +121 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -43
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +9 -0
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +12 -3
- package/dist/theme/default/index.d.ts +12 -3
- package/dist/theme/default/index.js +436 -405
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +495 -456
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +6 -0
- package/package.json +2 -2
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/theme/default/index.ts
|
|
32
32
|
var default_exports = {};
|
|
33
33
|
__export(default_exports, {
|
|
34
|
+
DefaultButtonSocial: () => DefaultButtonSocial,
|
|
34
35
|
DefaultCard: () => DefaultCard,
|
|
35
36
|
DefaultCardContent: () => DefaultCardContent,
|
|
36
37
|
DefaultCardFooter: () => DefaultCardFooter,
|
|
@@ -222,8 +223,9 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
222
223
|
return `${list.join(", ")} ${orText} ${last}`;
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
|
-
function useCardHeaderText(
|
|
226
|
-
var _a;
|
|
226
|
+
function useCardHeaderText(container, opts) {
|
|
227
|
+
var _a, _b;
|
|
228
|
+
const nodes = container.nodes;
|
|
227
229
|
const intl = (0, import_react_intl2.useIntl)();
|
|
228
230
|
switch (opts.flowType) {
|
|
229
231
|
case import_client_fetch2.FlowType.Recovery:
|
|
@@ -277,6 +279,24 @@ function useCardHeaderText(nodes, opts) {
|
|
|
277
279
|
id: "verification.subtitle"
|
|
278
280
|
})
|
|
279
281
|
};
|
|
282
|
+
case import_client_fetch2.FlowType.Login: {
|
|
283
|
+
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
284
|
+
(m) => m.id === 1010016
|
|
285
|
+
);
|
|
286
|
+
if (accountLinkingMessage) {
|
|
287
|
+
return {
|
|
288
|
+
title: intl.formatMessage({
|
|
289
|
+
id: "account-linking.title"
|
|
290
|
+
}),
|
|
291
|
+
description: intl.formatMessage(
|
|
292
|
+
{
|
|
293
|
+
id: "identities.messages.1010016"
|
|
294
|
+
},
|
|
295
|
+
accountLinkingMessage.context
|
|
296
|
+
)
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}
|
|
280
300
|
}
|
|
281
301
|
const parts = [];
|
|
282
302
|
if (nodes.find((node) => node.group === "password")) {
|
|
@@ -327,7 +347,7 @@ function useCardHeaderText(nodes, opts) {
|
|
|
327
347
|
id: "card.header.parts.identifier-first"
|
|
328
348
|
},
|
|
329
349
|
{
|
|
330
|
-
identifierLabel: (
|
|
350
|
+
identifierLabel: (_b = identifier.meta.label) == null ? void 0 : _b.text
|
|
331
351
|
}
|
|
332
352
|
)
|
|
333
353
|
);
|
|
@@ -433,26 +453,32 @@ function DefaultCurrentIdentifierButton() {
|
|
|
433
453
|
"autocomplete",
|
|
434
454
|
"node_type"
|
|
435
455
|
]);
|
|
436
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
437
457
|
"a",
|
|
438
458
|
{
|
|
439
|
-
className: "cursor-pointer py-[5px] px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default hover:border-button-identifier-border-hover hover:bg-button-identifier-bg-hover transition-colors inline-flex gap-1 items-center",
|
|
459
|
+
className: "cursor-pointer py-[5px] px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default hover:border-button-identifier-border-hover hover:bg-button-identifier-bg-hover transition-colors inline-flex gap-1 items-center self-start max-w-full",
|
|
440
460
|
...attributes,
|
|
441
461
|
href: initFlowUrl,
|
|
442
462
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
443
463
|
children: [
|
|
444
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
465
|
+
arrow_left_default,
|
|
466
|
+
{
|
|
467
|
+
size: 16,
|
|
468
|
+
className: "text-button-identifier-fg-subtle shrink-0"
|
|
469
|
+
}
|
|
470
|
+
),
|
|
445
471
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm font-medium text-button-identifier-fg-default text-ellipsis overflow-hidden text-nowrap", children: nodeBackButton == null ? void 0 : nodeBackButton.attributes.value })
|
|
446
472
|
]
|
|
447
473
|
}
|
|
448
|
-
)
|
|
474
|
+
);
|
|
449
475
|
}
|
|
450
476
|
function getBackButtonNode(flowType, nodes) {
|
|
451
477
|
let nodeBackButton;
|
|
452
478
|
switch (flowType) {
|
|
453
479
|
case import_client_fetch3.FlowType.Login:
|
|
454
480
|
nodeBackButton = nodes.find(
|
|
455
|
-
(node) => "name" in node.attributes && node.attributes.name === "identifier" &&
|
|
481
|
+
(node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
456
482
|
);
|
|
457
483
|
break;
|
|
458
484
|
case import_client_fetch3.FlowType.Registration:
|
|
@@ -493,10 +519,7 @@ function InnerCardHeader({ title, text }) {
|
|
|
493
519
|
}
|
|
494
520
|
function DefaultCardHeader() {
|
|
495
521
|
const context = (0, import_elements_react3.useOryFlow)();
|
|
496
|
-
const { title, description } = useCardHeaderText(
|
|
497
|
-
context.flow.ui.nodes,
|
|
498
|
-
context
|
|
499
|
-
);
|
|
522
|
+
const { title, description } = useCardHeaderText(context.flow.ui, context);
|
|
500
523
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InnerCardHeader, { title, text: description });
|
|
501
524
|
}
|
|
502
525
|
|
|
@@ -528,17 +551,274 @@ function cn(...inputs) {
|
|
|
528
551
|
}
|
|
529
552
|
|
|
530
553
|
// src/theme/default/components/form/index.tsx
|
|
531
|
-
var
|
|
532
|
-
var
|
|
554
|
+
var import_react_intl4 = require("react-intl");
|
|
555
|
+
var import_elements_react6 = require("@ory/elements-react");
|
|
533
556
|
var import_client_fetch4 = require("@ory/client-fetch");
|
|
557
|
+
|
|
558
|
+
// src/theme/default/components/form/social.tsx
|
|
559
|
+
var import_elements_react5 = require("@ory/elements-react");
|
|
560
|
+
|
|
561
|
+
// src/theme/default/provider-logos/apple.svg
|
|
562
|
+
var React4 = __toESM(require("react"));
|
|
534
563
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
564
|
+
var SvgApple = (props) => {
|
|
565
|
+
var _a, _b;
|
|
566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
|
|
567
|
+
};
|
|
568
|
+
var apple_default = SvgApple;
|
|
569
|
+
|
|
570
|
+
// src/theme/default/provider-logos/auth0.svg
|
|
571
|
+
var React5 = __toESM(require("react"));
|
|
572
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
573
|
+
var SvgAuth0 = (props) => {
|
|
574
|
+
var _a, _b;
|
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
576
|
+
};
|
|
577
|
+
var auth0_default = SvgAuth0;
|
|
578
|
+
|
|
579
|
+
// src/theme/default/provider-logos/discord.svg
|
|
580
|
+
var React6 = __toESM(require("react"));
|
|
581
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
582
|
+
var SvgDiscord = (props) => {
|
|
583
|
+
var _a, _b;
|
|
584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
586
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
587
|
+
] });
|
|
588
|
+
};
|
|
589
|
+
var discord_default = SvgDiscord;
|
|
590
|
+
|
|
591
|
+
// src/theme/default/provider-logos/facebook.svg
|
|
592
|
+
var React7 = __toESM(require("react"));
|
|
593
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
594
|
+
var SvgFacebook = (props) => {
|
|
595
|
+
var _a, _b;
|
|
596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
597
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("g", { clipPath: "url(#facebook_svg__a)", children: [
|
|
598
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { fill: "#1877F2", d: "M24 12c0-6.627-5.373-12-12-12C5.372 0 0 5.374 0 12c0 5.99 4.388 10.954 10.125 11.854V15.47H7.078V12h3.047V9.357c0-3.008 1.791-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.385c5.736-.9 10.124-5.864 10.124-11.854" }),
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { fill: "#fff", d: "M16.67 15.469 17.204 12h-3.328V9.75c0-.95.465-1.875 1.955-1.875h1.513V4.922s-1.373-.234-2.686-.234c-2.74 0-4.532 1.661-4.532 4.669V12H7.078v3.469h3.047v8.385a12.1 12.1 0 0 0 3.75 0V15.47z" })
|
|
600
|
+
] }),
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("clipPath", { id: "facebook_svg__a", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { fill: "#fff" }) }) })
|
|
602
|
+
] });
|
|
603
|
+
};
|
|
604
|
+
var facebook_default = SvgFacebook;
|
|
605
|
+
|
|
606
|
+
// src/theme/default/provider-logos/generic.svg
|
|
607
|
+
var React8 = __toESM(require("react"));
|
|
608
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
609
|
+
var SvgGeneric = (props) => {
|
|
610
|
+
var _a, _b;
|
|
611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, className: "generic_svg__icon generic_svg__icon-tabler generic_svg__icon-tabler-brand-oauth", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
614
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M12.556 6c.65 0 1.235.373 1.508.947l2.839 7.848a1.646 1.646 0 0 1-1.01 2.108 1.673 1.673 0 0 1-2.068-.851L13.365 15h-2.73l-.398.905A1.67 1.67 0 0 1 8.26 16.95l-.153-.047a1.647 1.647 0 0 1-1.056-1.956l2.824-7.852a1.66 1.66 0 0 1 1.409-1.087z" })
|
|
615
|
+
] });
|
|
616
|
+
};
|
|
617
|
+
var generic_default = SvgGeneric;
|
|
618
|
+
|
|
619
|
+
// src/theme/default/provider-logos/github.svg
|
|
620
|
+
var React9 = __toESM(require("react"));
|
|
621
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
622
|
+
var SvgGithub = (props) => {
|
|
623
|
+
var _a, _b;
|
|
624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
625
|
+
};
|
|
626
|
+
var github_default = SvgGithub;
|
|
627
|
+
|
|
628
|
+
// src/theme/default/provider-logos/gitlab.svg
|
|
629
|
+
var React10 = __toESM(require("react"));
|
|
630
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
631
|
+
var SvgGitlab = (props) => {
|
|
632
|
+
var _a, _b;
|
|
633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
638
|
+
] });
|
|
639
|
+
};
|
|
640
|
+
var gitlab_default = SvgGitlab;
|
|
641
|
+
|
|
642
|
+
// src/theme/default/provider-logos/google.svg
|
|
643
|
+
var React11 = __toESM(require("react"));
|
|
644
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
645
|
+
var SvgGoogle = (props) => {
|
|
646
|
+
var _a, _b;
|
|
647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
|
|
649
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
|
|
650
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
652
|
+
] });
|
|
653
|
+
};
|
|
654
|
+
var google_default = SvgGoogle;
|
|
655
|
+
|
|
656
|
+
// src/theme/default/provider-logos/linkedin.svg
|
|
657
|
+
var React12 = __toESM(require("react"));
|
|
658
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
659
|
+
var SvgLinkedin = (props) => {
|
|
660
|
+
var _a, _b;
|
|
661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
664
|
+
] });
|
|
665
|
+
};
|
|
666
|
+
var linkedin_default = SvgLinkedin;
|
|
667
|
+
|
|
668
|
+
// src/theme/default/provider-logos/microsoft.svg
|
|
669
|
+
var React13 = __toESM(require("react"));
|
|
670
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
671
|
+
var SvgMicrosoft = (props) => {
|
|
672
|
+
var _a, _b;
|
|
673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
674
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
678
|
+
] });
|
|
679
|
+
};
|
|
680
|
+
var microsoft_default = SvgMicrosoft;
|
|
681
|
+
|
|
682
|
+
// src/theme/default/provider-logos/slack.svg
|
|
683
|
+
var React14 = __toESM(require("react"));
|
|
684
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
685
|
+
var SvgSlack = (props) => {
|
|
686
|
+
var _a, _b;
|
|
687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
688
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
689
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
692
|
+
] });
|
|
693
|
+
};
|
|
694
|
+
var slack_default = SvgSlack;
|
|
695
|
+
|
|
696
|
+
// src/theme/default/provider-logos/spotify.svg
|
|
697
|
+
var React15 = __toESM(require("react"));
|
|
698
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
699
|
+
var SvgSpotify = (props) => {
|
|
700
|
+
var _a, _b;
|
|
701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
704
|
+
] });
|
|
705
|
+
};
|
|
706
|
+
var spotify_default = SvgSpotify;
|
|
707
|
+
|
|
708
|
+
// src/theme/default/provider-logos/yandex.svg
|
|
709
|
+
var React16 = __toESM(require("react"));
|
|
710
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
711
|
+
var SvgYandex = (props) => {
|
|
712
|
+
var _a, _b;
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
714
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
716
|
+
] });
|
|
717
|
+
};
|
|
718
|
+
var yandex_default = SvgYandex;
|
|
719
|
+
|
|
720
|
+
// src/theme/default/provider-logos/index.ts
|
|
721
|
+
var logos = {
|
|
722
|
+
apple: apple_default,
|
|
723
|
+
auth0: auth0_default,
|
|
724
|
+
discord: discord_default,
|
|
725
|
+
facebook: facebook_default,
|
|
726
|
+
generic: generic_default,
|
|
727
|
+
github: github_default,
|
|
728
|
+
gitlab: gitlab_default,
|
|
729
|
+
google: google_default,
|
|
730
|
+
linkedin: linkedin_default,
|
|
731
|
+
microsoft: microsoft_default,
|
|
732
|
+
slack: slack_default,
|
|
733
|
+
spotify: spotify_default,
|
|
734
|
+
yandex: yandex_default
|
|
735
|
+
};
|
|
736
|
+
var provider_logos_default = logos;
|
|
737
|
+
|
|
738
|
+
// src/theme/default/components/form/social.tsx
|
|
739
|
+
var import_react_intl3 = require("react-intl");
|
|
740
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
741
|
+
function extractProvider(context) {
|
|
742
|
+
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
743
|
+
return context.provider;
|
|
744
|
+
}
|
|
745
|
+
return void 0;
|
|
746
|
+
}
|
|
747
|
+
function DefaultButtonSocial({
|
|
748
|
+
attributes,
|
|
749
|
+
node,
|
|
750
|
+
onClick,
|
|
751
|
+
showLabel: _showLabel,
|
|
752
|
+
logos: providedLogos
|
|
753
|
+
}) {
|
|
754
|
+
var _a, _b, _c;
|
|
755
|
+
const logos2 = { ...provider_logos_default, ...providedLogos };
|
|
756
|
+
const {
|
|
757
|
+
node_type: _ignoredNodeType,
|
|
758
|
+
type: _ignoredType,
|
|
759
|
+
name: _ignoredName,
|
|
760
|
+
...props
|
|
761
|
+
} = attributes;
|
|
762
|
+
const {
|
|
763
|
+
flow: { ui }
|
|
764
|
+
} = (0, import_elements_react5.useOryFlow)();
|
|
765
|
+
const intl = (0, import_react_intl3.useIntl)();
|
|
766
|
+
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
767
|
+
const Logo = logos2[attributes.value];
|
|
768
|
+
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
769
|
+
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
771
|
+
"button",
|
|
772
|
+
{
|
|
773
|
+
className: cn(
|
|
774
|
+
"gap-3 ring-1 ring-forms-border-default bg-button-secondary-bg-default hover:bg-button-secondary-bg-hover transition-colors rounded flex items-center justify-center py-2.5 px-4 md:py-4",
|
|
775
|
+
{ "py-2.5": showLabel }
|
|
776
|
+
),
|
|
777
|
+
value: attributes.value,
|
|
778
|
+
type: "submit",
|
|
779
|
+
name: "provider",
|
|
780
|
+
...props,
|
|
781
|
+
onClick,
|
|
782
|
+
children: [
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "w-5 h-5", children: Logo ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
784
|
+
Logo,
|
|
785
|
+
{
|
|
786
|
+
size: 20
|
|
787
|
+
}
|
|
788
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "rounded-full aspect-square border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
789
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
795
|
+
function DefaultSocialButtonContainer({
|
|
796
|
+
children,
|
|
797
|
+
nodes
|
|
798
|
+
}) {
|
|
799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
800
|
+
"div",
|
|
801
|
+
{
|
|
802
|
+
className: cn("grid gap-3", {
|
|
803
|
+
// needed because tailwind is not compiling dynamic classes
|
|
804
|
+
"grid-cols-1": nodes.length % 4 <= 2,
|
|
805
|
+
"grid-cols-3": nodes.length % 3 === 0,
|
|
806
|
+
"grid-cols-4": nodes.length > 1 && nodes.length % 4 === 0
|
|
807
|
+
}),
|
|
808
|
+
children
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// src/theme/default/components/form/index.tsx
|
|
814
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
535
815
|
function DefaultFormContainer({
|
|
536
816
|
children,
|
|
537
817
|
onSubmit,
|
|
538
818
|
action,
|
|
539
819
|
method
|
|
540
820
|
}) {
|
|
541
|
-
return /* @__PURE__ */ (0,
|
|
821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
542
822
|
"form",
|
|
543
823
|
{
|
|
544
824
|
onSubmit,
|
|
@@ -551,11 +831,11 @@ function DefaultFormContainer({
|
|
|
551
831
|
);
|
|
552
832
|
}
|
|
553
833
|
function DefaultMessageContainer({ children }) {
|
|
554
|
-
const { flowType } = (0,
|
|
834
|
+
const { flowType } = (0, import_elements_react6.useOryFlow)();
|
|
555
835
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
556
836
|
return null;
|
|
557
837
|
}
|
|
558
|
-
return /* @__PURE__ */ (0,
|
|
838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
559
839
|
"section",
|
|
560
840
|
{
|
|
561
841
|
className: cn(
|
|
@@ -566,56 +846,57 @@ function DefaultMessageContainer({ children }) {
|
|
|
566
846
|
);
|
|
567
847
|
}
|
|
568
848
|
function DefaultMessage({ message }) {
|
|
569
|
-
const intl = (0,
|
|
570
|
-
return /* @__PURE__ */ (0,
|
|
849
|
+
const intl = (0, import_react_intl4.useIntl)();
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
571
851
|
"span",
|
|
572
852
|
{
|
|
573
|
-
className: cn("text-sm
|
|
853
|
+
className: cn("text-sm leading-normal", {
|
|
574
854
|
"text-forms-fg-error": message.type === "error",
|
|
575
855
|
"text-forms-fg-default": message.type === "info",
|
|
576
856
|
"text-forms-fg-success": message.type === "success"
|
|
577
857
|
}),
|
|
578
|
-
|
|
858
|
+
...(0, import_elements_react6.messageTestId)(message),
|
|
859
|
+
children: (0, import_elements_react6.uiTextToFormattedMessage)(message, intl)
|
|
579
860
|
}
|
|
580
861
|
);
|
|
581
862
|
}
|
|
582
863
|
|
|
583
864
|
// src/theme/default/components/card/auth-methods.tsx
|
|
584
|
-
var
|
|
865
|
+
var import_react_intl5 = require("react-intl");
|
|
585
866
|
|
|
586
867
|
// src/theme/default/assets/icons/code.svg
|
|
587
|
-
var
|
|
588
|
-
var
|
|
868
|
+
var React17 = __toESM(require("react"));
|
|
869
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
589
870
|
var SvgCode = (props) => {
|
|
590
871
|
var _a, _b;
|
|
591
|
-
return /* @__PURE__ */ (0,
|
|
872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
592
873
|
};
|
|
593
874
|
var code_default = SvgCode;
|
|
594
875
|
|
|
595
876
|
// src/theme/default/assets/icons/passkey.svg
|
|
596
|
-
var
|
|
597
|
-
var
|
|
877
|
+
var React18 = __toESM(require("react"));
|
|
878
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
598
879
|
var SvgPasskey = (props) => {
|
|
599
880
|
var _a, _b;
|
|
600
|
-
return /* @__PURE__ */ (0,
|
|
881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
601
882
|
};
|
|
602
883
|
var passkey_default = SvgPasskey;
|
|
603
884
|
|
|
604
885
|
// src/theme/default/assets/icons/password.svg
|
|
605
|
-
var
|
|
606
|
-
var
|
|
886
|
+
var React19 = __toESM(require("react"));
|
|
887
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
607
888
|
var SvgPassword = (props) => {
|
|
608
889
|
var _a, _b;
|
|
609
|
-
return /* @__PURE__ */ (0,
|
|
890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
610
891
|
};
|
|
611
892
|
var password_default = SvgPassword;
|
|
612
893
|
|
|
613
894
|
// src/theme/default/assets/icons/webauthn.svg
|
|
614
|
-
var
|
|
615
|
-
var
|
|
895
|
+
var React20 = __toESM(require("react"));
|
|
896
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
616
897
|
var SvgWebauthn = (props) => {
|
|
617
898
|
var _a, _b;
|
|
618
|
-
return /* @__PURE__ */ (0,
|
|
899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
619
900
|
};
|
|
620
901
|
var webauthn_default = SvgWebauthn;
|
|
621
902
|
|
|
@@ -625,7 +906,7 @@ function isGroupImmediateSubmit(group) {
|
|
|
625
906
|
}
|
|
626
907
|
|
|
627
908
|
// src/theme/default/components/card/auth-methods.tsx
|
|
628
|
-
var
|
|
909
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
629
910
|
var iconsMap = {
|
|
630
911
|
code: code_default,
|
|
631
912
|
passkey: passkey_default,
|
|
@@ -636,19 +917,22 @@ function DefaultAuthMethodListItem({
|
|
|
636
917
|
onClick,
|
|
637
918
|
group
|
|
638
919
|
}) {
|
|
639
|
-
const intl = (0,
|
|
920
|
+
const intl = (0, import_react_intl5.useIntl)();
|
|
640
921
|
const Icon = iconsMap[group] || null;
|
|
641
|
-
return /* @__PURE__ */ (0,
|
|
922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full hover:bg-forms-bg-hover px-2 py-1 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
642
923
|
"button",
|
|
643
924
|
{
|
|
644
925
|
className: "flex text-left py-2 gap-3 cursor-pointer",
|
|
645
926
|
onClick,
|
|
646
927
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
928
|
+
id: `auth-method-list-item-${group}`,
|
|
929
|
+
"data-testid": "auth-method-list-item",
|
|
930
|
+
"aria-label": `Authenticate with ${group}`,
|
|
647
931
|
children: [
|
|
648
|
-
/* @__PURE__ */ (0,
|
|
649
|
-
/* @__PURE__ */ (0,
|
|
650
|
-
/* @__PURE__ */ (0,
|
|
651
|
-
/* @__PURE__ */ (0,
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-none w-4 h-4 mt-[2px]", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { size: 20, className: "text-forms-fg-default" }) }),
|
|
933
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1 text-sm leading-normal", children: [
|
|
934
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "text-forms-fg-default text-sm", children: intl.formatMessage({ id: `two-step.${group}.title` }) }),
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "text-forms-fg-mute text-sm", children: intl.formatMessage({ id: `two-step.${group}.description` }) })
|
|
652
936
|
] })
|
|
653
937
|
]
|
|
654
938
|
}
|
|
@@ -657,14 +941,14 @@ function DefaultAuthMethodListItem({
|
|
|
657
941
|
|
|
658
942
|
// src/theme/default/components/form/button.tsx
|
|
659
943
|
var import_client_fetch5 = require("@ory/client-fetch");
|
|
660
|
-
var
|
|
944
|
+
var import_elements_react7 = require("@ory/elements-react");
|
|
661
945
|
var import_react_hook_form2 = require("react-hook-form");
|
|
662
|
-
var
|
|
946
|
+
var import_react_intl6 = require("react-intl");
|
|
663
947
|
|
|
664
948
|
// src/theme/default/components/form/spinner.tsx
|
|
665
|
-
var
|
|
949
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
666
950
|
function Spinner({ className }) {
|
|
667
|
-
return /* @__PURE__ */ (0,
|
|
951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
668
952
|
"svg",
|
|
669
953
|
{
|
|
670
954
|
"aria-hidden": "true",
|
|
@@ -677,7 +961,7 @@ function Spinner({ className }) {
|
|
|
677
961
|
fill: "none",
|
|
678
962
|
xmlns: "http://www.w3.org/2000/svg",
|
|
679
963
|
children: [
|
|
680
|
-
/* @__PURE__ */ (0,
|
|
964
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
681
965
|
"path",
|
|
682
966
|
{
|
|
683
967
|
d: "M23.364 10.6362C22.1053 9.37751 20.5016 8.52034 18.7558 8.17307C17.01 7.82581 15.2004 8.00404 13.5559 8.68523C11.9113 9.36641 10.5057 10.52 9.51678 12C8.52784 13.4801 8 15.2201 8 17.0001C8 18.7802 8.52784 20.5202 9.51678 22.0003C10.5057 23.4803 11.9113 24.6339 13.5559 25.3151C15.2004 25.9962 17.01 26.1745 18.7558 25.8272C20.5016 25.4799 22.1053 24.6228 23.364 23.3641",
|
|
@@ -686,7 +970,7 @@ function Spinner({ className }) {
|
|
|
686
970
|
strokeLinejoin: "round"
|
|
687
971
|
}
|
|
688
972
|
) }),
|
|
689
|
-
/* @__PURE__ */ (0,
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
690
974
|
"rect",
|
|
691
975
|
{
|
|
692
976
|
width: "24",
|
|
@@ -701,9 +985,9 @@ function Spinner({ className }) {
|
|
|
701
985
|
}
|
|
702
986
|
|
|
703
987
|
// src/theme/default/components/form/button.tsx
|
|
704
|
-
var
|
|
988
|
+
var import_elements_react8 = require("@ory/elements-react");
|
|
705
989
|
var import_class_variance_authority = require("class-variance-authority");
|
|
706
|
-
var
|
|
990
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
707
991
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
708
992
|
[
|
|
709
993
|
"ring-1 relative overflow-hidden ring-inset rounded text-sm leading-none flex gap-3 justify-center",
|
|
@@ -756,16 +1040,16 @@ var DefaultButton = ({
|
|
|
756
1040
|
// End of skipped attributes
|
|
757
1041
|
...rest
|
|
758
1042
|
} = attributes;
|
|
759
|
-
const intl = (0,
|
|
1043
|
+
const intl = (0, import_react_intl6.useIntl)();
|
|
760
1044
|
const label = (0, import_client_fetch5.getNodeLabel)(node);
|
|
761
|
-
const { flowType } = (0,
|
|
1045
|
+
const { flowType } = (0, import_elements_react8.useOryFlow)();
|
|
762
1046
|
const {
|
|
763
1047
|
formState: { isSubmitting },
|
|
764
1048
|
setValue
|
|
765
1049
|
} = (0, import_react_hook_form2.useFormContext)();
|
|
766
1050
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
767
1051
|
const isSmall = flowType === import_client_fetch5.FlowType.Settings && attributes.name !== "webauthn_register_trigger";
|
|
768
|
-
return /* @__PURE__ */ (0,
|
|
1052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
769
1053
|
"button",
|
|
770
1054
|
{
|
|
771
1055
|
...rest,
|
|
@@ -788,8 +1072,8 @@ var DefaultButton = ({
|
|
|
788
1072
|
disabled: (_a = rest.disabled) != null ? _a : true,
|
|
789
1073
|
"data-loading": isSubmitting,
|
|
790
1074
|
children: [
|
|
791
|
-
isSubmitting ? /* @__PURE__ */ (0,
|
|
792
|
-
label ? (0,
|
|
1075
|
+
isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Spinner, {}) : null,
|
|
1076
|
+
label ? (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) : ""
|
|
793
1077
|
]
|
|
794
1078
|
}
|
|
795
1079
|
);
|
|
@@ -798,16 +1082,16 @@ DefaultButton.displayName = "DefaultButton";
|
|
|
798
1082
|
|
|
799
1083
|
// src/theme/default/components/form/checkbox.tsx
|
|
800
1084
|
var import_client_fetch6 = require("@ory/client-fetch");
|
|
801
|
-
var
|
|
1085
|
+
var import_elements_react9 = require("@ory/elements-react");
|
|
802
1086
|
var import_react = require("react");
|
|
803
1087
|
var import_react_hook_form3 = require("react-hook-form");
|
|
804
|
-
var
|
|
1088
|
+
var import_react_intl8 = require("react-intl");
|
|
805
1089
|
|
|
806
1090
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
807
|
-
var
|
|
1091
|
+
var import_react_intl7 = require("react-intl");
|
|
808
1092
|
|
|
809
1093
|
// src/util/i18n/index.ts
|
|
810
|
-
var
|
|
1094
|
+
var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
811
1095
|
const contextInjectedMessage = Object.entries(context).reduce(
|
|
812
1096
|
(accumulator, [key, value]) => {
|
|
813
1097
|
if (Array.isArray(value)) {
|
|
@@ -855,7 +1139,7 @@ var uiTextToFormattedMessage3 = ({ id, context = {}, text }, intl) => {
|
|
|
855
1139
|
};
|
|
856
1140
|
|
|
857
1141
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
858
|
-
var
|
|
1142
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
859
1143
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
860
1144
|
function computeLabelElements(labelText) {
|
|
861
1145
|
const elements = [];
|
|
@@ -871,7 +1155,7 @@ function computeLabelElements(labelText) {
|
|
|
871
1155
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
872
1156
|
}
|
|
873
1157
|
elements.push(
|
|
874
|
-
/* @__PURE__ */ (0,
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
875
1159
|
"a",
|
|
876
1160
|
{
|
|
877
1161
|
href: url,
|
|
@@ -891,18 +1175,18 @@ function computeLabelElements(labelText) {
|
|
|
891
1175
|
return elements;
|
|
892
1176
|
}
|
|
893
1177
|
function CheckboxLabel({ label }) {
|
|
894
|
-
const intl = (0,
|
|
1178
|
+
const intl = (0, import_react_intl7.useIntl)();
|
|
895
1179
|
if (!label) {
|
|
896
1180
|
return null;
|
|
897
1181
|
}
|
|
898
|
-
const labelText =
|
|
899
|
-
return /* @__PURE__ */ (0,
|
|
1182
|
+
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: computeLabelElements(labelText) });
|
|
900
1184
|
}
|
|
901
1185
|
|
|
902
1186
|
// src/theme/default/components/form/checkbox.tsx
|
|
903
|
-
var
|
|
1187
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
904
1188
|
function CheckboxSVG() {
|
|
905
|
-
return /* @__PURE__ */ (0,
|
|
1189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
906
1190
|
"svg",
|
|
907
1191
|
{
|
|
908
1192
|
className: "absolute w-4 h-4 hidden peer-checked:block",
|
|
@@ -912,14 +1196,14 @@ function CheckboxSVG() {
|
|
|
912
1196
|
viewBox: "0 0 16 16",
|
|
913
1197
|
fill: "none",
|
|
914
1198
|
children: [
|
|
915
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
916
1200
|
"path",
|
|
917
1201
|
{
|
|
918
1202
|
d: "M0 4C0 1.79086 1.79086 0 4 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H4C1.79086 16 0 14.2091 0 12V4Z",
|
|
919
1203
|
fill: "#0F172A"
|
|
920
1204
|
}
|
|
921
1205
|
),
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
923
1207
|
"path",
|
|
924
1208
|
{
|
|
925
1209
|
fillRule: "evenodd",
|
|
@@ -946,11 +1230,11 @@ var DefaultCheckbox = ({
|
|
|
946
1230
|
// End of skipped attributes
|
|
947
1231
|
...attributes
|
|
948
1232
|
} = initialAttributes;
|
|
949
|
-
const intl = (0,
|
|
1233
|
+
const intl = (0, import_react_intl8.useIntl)();
|
|
950
1234
|
const label = (0, import_client_fetch6.getNodeLabel)(node);
|
|
951
1235
|
const [checked, setChecked] = (0, import_react.useState)(Boolean(value));
|
|
952
1236
|
const { register } = (0, import_react_hook_form3.useForm)();
|
|
953
|
-
return /* @__PURE__ */ (0,
|
|
1237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
954
1238
|
"div",
|
|
955
1239
|
{
|
|
956
1240
|
className: "flex antialiased gap-3 self-stretch item-start",
|
|
@@ -958,8 +1242,8 @@ var DefaultCheckbox = ({
|
|
|
958
1242
|
setChecked(!checked);
|
|
959
1243
|
},
|
|
960
1244
|
children: [
|
|
961
|
-
/* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex h-5 items-center", children: [
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
963
1247
|
"input",
|
|
964
1248
|
{
|
|
965
1249
|
...attributes,
|
|
@@ -974,16 +1258,16 @@ var DefaultCheckbox = ({
|
|
|
974
1258
|
...register(name, { value })
|
|
975
1259
|
}
|
|
976
1260
|
),
|
|
977
|
-
/* @__PURE__ */ (0,
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CheckboxSVG, {})
|
|
978
1262
|
] }),
|
|
979
|
-
/* @__PURE__ */ (0,
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
981
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-sm items-center", children: [
|
|
1264
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { className: "text-sm font-normal leading-normal text-forms-fg-default", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CheckboxLabel, { label }) }),
|
|
1265
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
982
1266
|
"span",
|
|
983
1267
|
{
|
|
984
1268
|
className: "text-sm text-red-900 mt-1",
|
|
985
|
-
...(0,
|
|
986
|
-
children: (0,
|
|
1269
|
+
...(0, import_elements_react9.messageTestId)(message),
|
|
1270
|
+
children: (0, import_elements_react9.uiTextToFormattedMessage)(message, intl)
|
|
987
1271
|
},
|
|
988
1272
|
message.id
|
|
989
1273
|
))
|
|
@@ -994,29 +1278,29 @@ var DefaultCheckbox = ({
|
|
|
994
1278
|
};
|
|
995
1279
|
|
|
996
1280
|
// src/theme/default/components/form/group-container.tsx
|
|
997
|
-
var
|
|
1281
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
998
1282
|
function DefaultGroupContainer({ children }) {
|
|
999
|
-
return /* @__PURE__ */ (0,
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "grid grid-cols-1 gap-6", children });
|
|
1000
1284
|
}
|
|
1001
1285
|
|
|
1002
1286
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1003
|
-
var
|
|
1287
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1004
1288
|
function DefaultHorizontalDivider() {
|
|
1005
|
-
return /* @__PURE__ */ (0,
|
|
1289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("hr", { className: "border-dialog-border-default" });
|
|
1006
1290
|
}
|
|
1007
1291
|
|
|
1008
1292
|
// src/theme/default/components/form/image.tsx
|
|
1009
|
-
var
|
|
1293
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1010
1294
|
function DefaultImage({ attributes }) {
|
|
1011
|
-
return /* @__PURE__ */ (0,
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { ...attributes }) });
|
|
1012
1296
|
}
|
|
1013
1297
|
|
|
1014
1298
|
// src/theme/default/components/form/input.tsx
|
|
1015
1299
|
var import_client_fetch7 = require("@ory/client-fetch");
|
|
1016
|
-
var
|
|
1300
|
+
var import_elements_react10 = require("@ory/elements-react");
|
|
1017
1301
|
var import_react_hook_form4 = require("react-hook-form");
|
|
1018
|
-
var
|
|
1019
|
-
var
|
|
1302
|
+
var import_react_intl9 = require("react-intl");
|
|
1303
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1020
1304
|
var DefaultInput = ({
|
|
1021
1305
|
node,
|
|
1022
1306
|
attributes,
|
|
@@ -1032,18 +1316,18 @@ var DefaultInput = ({
|
|
|
1032
1316
|
node_type: _,
|
|
1033
1317
|
...rest
|
|
1034
1318
|
} = attributes;
|
|
1035
|
-
const intl = (0,
|
|
1036
|
-
const { flowType } = (0,
|
|
1319
|
+
const intl = (0, import_react_intl9.useIntl)();
|
|
1320
|
+
const { flowType } = (0, import_elements_react10.useOryFlow)();
|
|
1037
1321
|
const formattedLabel = label ? intl.formatMessage(
|
|
1038
1322
|
{
|
|
1039
1323
|
id: "input.placeholder",
|
|
1040
1324
|
defaultMessage: "Enter your {placeholder}"
|
|
1041
1325
|
},
|
|
1042
1326
|
{
|
|
1043
|
-
placeholder: (0,
|
|
1327
|
+
placeholder: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
|
|
1044
1328
|
}
|
|
1045
1329
|
) : "";
|
|
1046
|
-
return /* @__PURE__ */ (0,
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1047
1331
|
"input",
|
|
1048
1332
|
{
|
|
1049
1333
|
...rest,
|
|
@@ -1064,36 +1348,48 @@ var DefaultInput = ({
|
|
|
1064
1348
|
|
|
1065
1349
|
// src/theme/default/components/form/label.tsx
|
|
1066
1350
|
var import_client_fetch8 = require("@ory/client-fetch");
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1069
|
-
var
|
|
1351
|
+
var import_elements_react11 = require("@ory/elements-react");
|
|
1352
|
+
var import_react_hook_form5 = require("react-hook-form");
|
|
1353
|
+
var import_react_intl10 = require("react-intl");
|
|
1354
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1355
|
+
function findResendNode(nodes) {
|
|
1356
|
+
return nodes.find(
|
|
1357
|
+
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
1358
|
+
);
|
|
1359
|
+
}
|
|
1070
1360
|
function DefaultLabel({
|
|
1071
1361
|
node,
|
|
1072
1362
|
children,
|
|
1073
1363
|
attributes,
|
|
1074
1364
|
...rest
|
|
1075
1365
|
}) {
|
|
1076
|
-
const intl = (0,
|
|
1366
|
+
const intl = (0, import_react_intl10.useIntl)();
|
|
1077
1367
|
const label = (0, import_client_fetch8.getNodeLabel)(node);
|
|
1078
|
-
const {
|
|
1368
|
+
const { Message } = (0, import_elements_react11.useComponents)();
|
|
1369
|
+
const { config, flowType, flow } = (0, import_elements_react11.useOryFlow)();
|
|
1370
|
+
const { setValue, formState } = (0, import_react_hook_form5.useFormContext)();
|
|
1079
1371
|
const isPassword = attributes.type === "password";
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1372
|
+
const resendNode = findResendNode(flow.ui.nodes);
|
|
1373
|
+
const handleResend = () => {
|
|
1374
|
+
if ((resendNode == null ? void 0 : resendNode.attributes) && "name" in resendNode.attributes) {
|
|
1375
|
+
setValue(resendNode.attributes.name, resendNode.attributes.value);
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
const fieldError = formState.errors[attributes.name];
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col antialiased gap-1", children: [
|
|
1380
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1086
1382
|
"label",
|
|
1087
1383
|
{
|
|
1088
|
-
...(0,
|
|
1384
|
+
...(0, import_elements_react11.messageTestId)(label),
|
|
1089
1385
|
className: "text-sm font-medium leading-normal",
|
|
1090
1386
|
htmlFor: attributes.name,
|
|
1091
1387
|
...rest,
|
|
1092
|
-
children: (0,
|
|
1388
|
+
children: (0, import_elements_react11.uiTextToFormattedMessage)(label, intl)
|
|
1093
1389
|
}
|
|
1094
1390
|
),
|
|
1095
1391
|
isPassword && config.project.recovery_enabled && flowType === import_client_fetch8.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1097
1393
|
"a",
|
|
1098
1394
|
{
|
|
1099
1395
|
href: config.project.recovery_ui_url,
|
|
@@ -1104,66 +1400,56 @@ function DefaultLabel({
|
|
|
1104
1400
|
})
|
|
1105
1401
|
}
|
|
1106
1402
|
),
|
|
1107
|
-
|
|
1403
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1108
1404
|
"button",
|
|
1109
1405
|
{
|
|
1110
1406
|
type: "submit",
|
|
1111
|
-
name:
|
|
1112
|
-
value:
|
|
1407
|
+
name: resendNode.attributes.name,
|
|
1408
|
+
value: resendNode.attributes.value,
|
|
1409
|
+
onClick: handleResend,
|
|
1113
1410
|
className: "text-links-link-default hover:underline hover:text-link-hover transition-colors text-sm font-medium cursor-pointer",
|
|
1114
1411
|
children: intl.formatMessage({ id: "identities.messages.1070008" })
|
|
1115
1412
|
}
|
|
1116
1413
|
)
|
|
1117
1414
|
] }),
|
|
1118
1415
|
children,
|
|
1119
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
1120
|
-
|
|
1121
|
-
{
|
|
1122
|
-
className: cn("text-sm leading-normal", {
|
|
1123
|
-
"text-forms-fg-error": message.type === "error",
|
|
1124
|
-
"text-forms-fg-default": message.type === "info",
|
|
1125
|
-
"text-forms-fg-success": message.type === "success"
|
|
1126
|
-
}),
|
|
1127
|
-
...(0, import_elements_react10.messageTestId)(message),
|
|
1128
|
-
children: (0, import_elements_react10.uiTextToFormattedMessage)(message, intl)
|
|
1129
|
-
},
|
|
1130
|
-
message.id
|
|
1131
|
-
))
|
|
1416
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message.Content, { message }, message.id)),
|
|
1417
|
+
fieldError && (0, import_client_fetch8.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message.Content, { message: fieldError })
|
|
1132
1418
|
] });
|
|
1133
1419
|
}
|
|
1134
1420
|
|
|
1135
1421
|
// src/theme/default/components/form/link-button.tsx
|
|
1136
1422
|
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1137
|
-
var
|
|
1423
|
+
var import_elements_react12 = require("@ory/elements-react");
|
|
1138
1424
|
var import_react2 = require("react");
|
|
1139
|
-
var
|
|
1140
|
-
var
|
|
1425
|
+
var import_react_intl11 = require("react-intl");
|
|
1426
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1141
1427
|
var DefaultLinkButton = (0, import_react2.forwardRef)(({ attributes, node }, ref) => {
|
|
1142
|
-
const intl = (0,
|
|
1428
|
+
const intl = (0, import_react_intl11.useIntl)();
|
|
1143
1429
|
const label = (0, import_client_fetch9.getNodeLabel)(node);
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1145
1431
|
"a",
|
|
1146
1432
|
{
|
|
1147
1433
|
...attributes,
|
|
1148
1434
|
ref,
|
|
1149
|
-
title: label ? (0,
|
|
1435
|
+
title: label ? (0, import_elements_react12.uiTextToFormattedMessage)(label, intl) : "",
|
|
1150
1436
|
className: cn(
|
|
1151
1437
|
"antialiased rounded cursor-pointer text-center border border-transparent gap-3 leading-none bg-button-primary-bg-default hover:bg-button-primary-bg-hover transition-colors text-button-primary-fg-default hover:text-button-primary-fg-hover px-4 py-4.5 text-sm font-medium"
|
|
1152
1438
|
),
|
|
1153
|
-
children: label ? (0,
|
|
1439
|
+
children: label ? (0, import_elements_react12.uiTextToFormattedMessage)(label, intl) : ""
|
|
1154
1440
|
}
|
|
1155
1441
|
);
|
|
1156
1442
|
});
|
|
1157
1443
|
DefaultLinkButton.displayName = "DefaultLinkButton";
|
|
1158
1444
|
|
|
1159
1445
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1160
|
-
var
|
|
1446
|
+
var import_react_hook_form6 = require("react-hook-form");
|
|
1161
1447
|
|
|
1162
1448
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1163
1449
|
var import_input_otp = require("input-otp");
|
|
1164
|
-
var
|
|
1165
|
-
var
|
|
1166
|
-
var InputOTP =
|
|
1450
|
+
var React21 = __toESM(require("react"));
|
|
1451
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1452
|
+
var InputOTP = React21.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1167
1453
|
import_input_otp.OTPInput,
|
|
1168
1454
|
{
|
|
1169
1455
|
ref,
|
|
@@ -1176,12 +1462,12 @@ var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1176
1462
|
}
|
|
1177
1463
|
));
|
|
1178
1464
|
InputOTP.displayName = "InputOTP";
|
|
1179
|
-
var InputOTPGroup =
|
|
1465
|
+
var InputOTPGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1180
1466
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1181
|
-
var InputOTPSlot =
|
|
1182
|
-
const inputOTPContext =
|
|
1467
|
+
var InputOTPSlot = React21.forwardRef(({ index, className, ...props }, ref) => {
|
|
1468
|
+
const inputOTPContext = React21.useContext(import_input_otp.OTPInputContext);
|
|
1183
1469
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1184
|
-
return /* @__PURE__ */ (0,
|
|
1470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
1185
1471
|
"div",
|
|
1186
1472
|
{
|
|
1187
1473
|
ref,
|
|
@@ -1193,7 +1479,7 @@ var InputOTPSlot = React8.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1193
1479
|
...props,
|
|
1194
1480
|
children: [
|
|
1195
1481
|
char,
|
|
1196
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
1482
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-branding-bg-default duration-750" }) })
|
|
1197
1483
|
]
|
|
1198
1484
|
}
|
|
1199
1485
|
);
|
|
@@ -1201,23 +1487,23 @@ var InputOTPSlot = React8.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1201
1487
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1202
1488
|
|
|
1203
1489
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1204
|
-
var
|
|
1490
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1205
1491
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1206
|
-
const { setValue, watch } = (0,
|
|
1492
|
+
const { setValue, watch } = (0, import_react_hook_form6.useFormContext)();
|
|
1207
1493
|
const { maxlength, name } = attributes;
|
|
1208
1494
|
const elements = maxlength != null ? maxlength : 6;
|
|
1209
1495
|
const handleInputChange = (v) => {
|
|
1210
1496
|
setValue(name, v);
|
|
1211
1497
|
};
|
|
1212
1498
|
const value = watch(name);
|
|
1213
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1214
1500
|
InputOTP,
|
|
1215
1501
|
{
|
|
1216
1502
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1217
1503
|
onChange: handleInputChange,
|
|
1218
1504
|
name,
|
|
1219
1505
|
value,
|
|
1220
|
-
children: /* @__PURE__ */ (0,
|
|
1506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InputOTPGroup, { className: "w-full space-x-2 justify-between", children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1221
1507
|
InputOTPSlot,
|
|
1222
1508
|
{
|
|
1223
1509
|
index,
|
|
@@ -1230,282 +1516,26 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1230
1516
|
};
|
|
1231
1517
|
|
|
1232
1518
|
// src/theme/default/components/form/section.tsx
|
|
1233
|
-
var
|
|
1519
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1234
1520
|
var DefaultFormSection = ({ children }) => {
|
|
1235
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col w-80 md:w-[712px] lg:w-[802px] xl:w-[896px]", children });
|
|
1236
1522
|
};
|
|
1237
1523
|
var DefaultFormSectionContent = ({
|
|
1238
1524
|
title,
|
|
1239
1525
|
description,
|
|
1240
1526
|
children
|
|
1241
1527
|
}) => {
|
|
1242
|
-
return /* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1245
|
-
/* @__PURE__ */ (0,
|
|
1528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "border rounded-t-xl border-b-0 border-dialog-border-default bg-forms-bg-default px-6 py-8 flex flex-col gap-8", children: [
|
|
1529
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: "font-medium text-dialog-fg-default", children: title }),
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-dialog-fg-subtle", children: description })
|
|
1246
1532
|
] }),
|
|
1247
1533
|
children
|
|
1248
1534
|
] });
|
|
1249
1535
|
};
|
|
1250
1536
|
var DefaultFormSectionFooter = ({ children }) => {
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
-
};
|
|
1253
|
-
|
|
1254
|
-
// src/theme/default/components/form/social.tsx
|
|
1255
|
-
var import_elements_react12 = require("@ory/elements-react");
|
|
1256
|
-
|
|
1257
|
-
// src/theme/default/provider-logos/apple.svg
|
|
1258
|
-
var React9 = __toESM(require("react"));
|
|
1259
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1260
|
-
var SvgApple = (props) => {
|
|
1261
|
-
var _a, _b;
|
|
1262
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1263
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { fill: "#283544", d: "M30 16c0 7.728-6.265 14-14 14S2 23.728 2 16C2 8.265 8.265 2 16 2s14 6.265 14 14" }),
|
|
1264
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { fill: "#fff", d: "M22.562 12.457c-.076.045-1.895.986-1.895 3.07.086 2.38 2.295 3.213 2.333 3.213-.038.045-.334 1.136-1.21 2.28-.694.986-1.466 1.98-2.637 1.98-1.114 0-1.514-.657-2.8-.657-1.381 0-1.772.657-2.829.657-1.171 0-2-1.047-2.733-2.023-.952-1.278-1.761-3.284-1.79-5.21-.02-1.02.19-2.023.724-2.875.752-1.19 2.095-1.997 3.561-2.023 1.124-.036 2.124.719 2.81.719.657 0 1.885-.72 3.275-.72.6.001 2.2.17 3.191 1.59m-6.561-1.792c-.2-.932.352-1.864.866-2.458.657-.72 1.695-1.207 2.59-1.207a3.33 3.33 0 0 1-.952 2.511c-.58.72-1.58 1.26-2.504 1.154" })
|
|
1265
|
-
] });
|
|
1266
|
-
};
|
|
1267
|
-
var apple_default = SvgApple;
|
|
1268
|
-
|
|
1269
|
-
// src/theme/default/provider-logos/auth0.svg
|
|
1270
|
-
var React10 = __toESM(require("react"));
|
|
1271
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1272
|
-
var SvgAuth0 = (props) => {
|
|
1273
|
-
var _a, _b;
|
|
1274
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
1275
|
-
};
|
|
1276
|
-
var auth0_default = SvgAuth0;
|
|
1277
|
-
|
|
1278
|
-
// src/theme/default/provider-logos/discord.svg
|
|
1279
|
-
var React11 = __toESM(require("react"));
|
|
1280
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1281
|
-
var SvgDiscord = (props) => {
|
|
1282
|
-
var _a, _b;
|
|
1283
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1284
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
1285
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
1286
|
-
] });
|
|
1287
|
-
};
|
|
1288
|
-
var discord_default = SvgDiscord;
|
|
1289
|
-
|
|
1290
|
-
// src/theme/default/provider-logos/facebook.svg
|
|
1291
|
-
var React12 = __toESM(require("react"));
|
|
1292
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1293
|
-
var SvgFacebook = (props) => {
|
|
1294
|
-
var _a, _b;
|
|
1295
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1296
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("g", { clipPath: "url(#facebook_svg__a)", children: [
|
|
1297
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { fill: "#1877F2", d: "M24 12c0-6.627-5.373-12-12-12C5.372 0 0 5.374 0 12c0 5.99 4.388 10.954 10.125 11.854V15.47H7.078V12h3.047V9.357c0-3.008 1.791-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.385c5.736-.9 10.124-5.864 10.124-11.854" }),
|
|
1298
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { fill: "#fff", d: "M16.67 15.469 17.204 12h-3.328V9.75c0-.95.465-1.875 1.955-1.875h1.513V4.922s-1.373-.234-2.686-.234c-2.74 0-4.532 1.661-4.532 4.669V12H7.078v3.469h3.047v8.385a12.1 12.1 0 0 0 3.75 0V15.47z" })
|
|
1299
|
-
] }),
|
|
1300
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("clipPath", { id: "facebook_svg__a", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("rect", { fill: "#fff" }) }) })
|
|
1301
|
-
] });
|
|
1302
|
-
};
|
|
1303
|
-
var facebook_default = SvgFacebook;
|
|
1304
|
-
|
|
1305
|
-
// src/theme/default/provider-logos/generic.svg
|
|
1306
|
-
var React13 = __toESM(require("react"));
|
|
1307
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1308
|
-
var SvgGeneric = (props) => {
|
|
1309
|
-
var _a, _b;
|
|
1310
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, className: "generic_svg__icon generic_svg__icon-tabler generic_svg__icon-tabler-brand-oauth", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1311
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
1312
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
1313
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M12.556 6c.65 0 1.235.373 1.508.947l2.839 7.848a1.646 1.646 0 0 1-1.01 2.108 1.673 1.673 0 0 1-2.068-.851L13.365 15h-2.73l-.398.905A1.67 1.67 0 0 1 8.26 16.95l-.153-.047a1.647 1.647 0 0 1-1.056-1.956l2.824-7.852a1.66 1.66 0 0 1 1.409-1.087z" })
|
|
1314
|
-
] });
|
|
1315
|
-
};
|
|
1316
|
-
var generic_default = SvgGeneric;
|
|
1317
|
-
|
|
1318
|
-
// src/theme/default/provider-logos/github.svg
|
|
1319
|
-
var React14 = __toESM(require("react"));
|
|
1320
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1321
|
-
var SvgGithub = (props) => {
|
|
1322
|
-
var _a, _b;
|
|
1323
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
1324
|
-
};
|
|
1325
|
-
var github_default = SvgGithub;
|
|
1326
|
-
|
|
1327
|
-
// src/theme/default/provider-logos/gitlab.svg
|
|
1328
|
-
var React15 = __toESM(require("react"));
|
|
1329
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1330
|
-
var SvgGitlab = (props) => {
|
|
1331
|
-
var _a, _b;
|
|
1332
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1333
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
1334
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
1335
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
1336
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
1337
|
-
] });
|
|
1338
|
-
};
|
|
1339
|
-
var gitlab_default = SvgGitlab;
|
|
1340
|
-
|
|
1341
|
-
// src/theme/default/provider-logos/google.svg
|
|
1342
|
-
var React16 = __toESM(require("react"));
|
|
1343
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1344
|
-
var SvgGoogle = (props) => {
|
|
1345
|
-
var _a, _b;
|
|
1346
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1347
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#4285F4", d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82" }),
|
|
1348
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#34A853", d: "M12.255 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96h-3.98v3.09C3.515 21.3 7.565 24 12.255 24" }),
|
|
1349
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#FBBC05", d: "M5.525 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62h-3.98a11.86 11.86 0 0 0 0 10.76z" }),
|
|
1350
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#EA4335", d: "M12.255 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C18.205 1.19 15.495 0 12.255 0c-4.69 0-8.74 2.7-10.71 6.62l3.98 3.09c.95-2.85 3.6-4.96 6.73-4.96" })
|
|
1351
|
-
] });
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "rounded-b-xl gap-2 flex justify-end px-6 py-4 bg-dialog-bg-subtle border border-dialog-border-default text-sm text-dialog-fg-mute items-center [&>span]:mr-auto min-h-[72px]", children });
|
|
1352
1538
|
};
|
|
1353
|
-
var google_default = SvgGoogle;
|
|
1354
|
-
|
|
1355
|
-
// src/theme/default/provider-logos/linkedin.svg
|
|
1356
|
-
var React17 = __toESM(require("react"));
|
|
1357
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1358
|
-
var SvgLinkedin = (props) => {
|
|
1359
|
-
var _a, _b;
|
|
1360
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1361
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("rect", { x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
1362
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
1363
|
-
] });
|
|
1364
|
-
};
|
|
1365
|
-
var linkedin_default = SvgLinkedin;
|
|
1366
|
-
|
|
1367
|
-
// src/theme/default/provider-logos/microsoft.svg
|
|
1368
|
-
var React18 = __toESM(require("react"));
|
|
1369
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1370
|
-
var SvgMicrosoft = (props) => {
|
|
1371
|
-
var _a, _b;
|
|
1372
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1373
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
1374
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
1375
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
1376
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
1377
|
-
] });
|
|
1378
|
-
};
|
|
1379
|
-
var microsoft_default = SvgMicrosoft;
|
|
1380
|
-
|
|
1381
|
-
// src/theme/default/provider-logos/slack.svg
|
|
1382
|
-
var React19 = __toESM(require("react"));
|
|
1383
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1384
|
-
var SvgSlack = (props) => {
|
|
1385
|
-
var _a, _b;
|
|
1386
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1387
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
1388
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
1389
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
1390
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
1391
|
-
] });
|
|
1392
|
-
};
|
|
1393
|
-
var slack_default = SvgSlack;
|
|
1394
|
-
|
|
1395
|
-
// src/theme/default/provider-logos/spotify.svg
|
|
1396
|
-
var React20 = __toESM(require("react"));
|
|
1397
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1398
|
-
var SvgSpotify = (props) => {
|
|
1399
|
-
var _a, _b;
|
|
1400
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1401
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
1402
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
1403
|
-
] });
|
|
1404
|
-
};
|
|
1405
|
-
var spotify_default = SvgSpotify;
|
|
1406
|
-
|
|
1407
|
-
// src/theme/default/provider-logos/yandex.svg
|
|
1408
|
-
var React21 = __toESM(require("react"));
|
|
1409
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1410
|
-
var SvgYandex = (props) => {
|
|
1411
|
-
var _a, _b;
|
|
1412
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1413
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
1414
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
1415
|
-
] });
|
|
1416
|
-
};
|
|
1417
|
-
var yandex_default = SvgYandex;
|
|
1418
|
-
|
|
1419
|
-
// src/theme/default/provider-logos/index.ts
|
|
1420
|
-
var logos = {
|
|
1421
|
-
apple: apple_default,
|
|
1422
|
-
auth0: auth0_default,
|
|
1423
|
-
discord: discord_default,
|
|
1424
|
-
facebook: facebook_default,
|
|
1425
|
-
generic: generic_default,
|
|
1426
|
-
github: github_default,
|
|
1427
|
-
gitlab: gitlab_default,
|
|
1428
|
-
google: google_default,
|
|
1429
|
-
linkedin: linkedin_default,
|
|
1430
|
-
microsoft: microsoft_default,
|
|
1431
|
-
slack: slack_default,
|
|
1432
|
-
spotify: spotify_default,
|
|
1433
|
-
yandex: yandex_default
|
|
1434
|
-
};
|
|
1435
|
-
var provider_logos_default = logos;
|
|
1436
|
-
|
|
1437
|
-
// src/theme/default/components/form/social.tsx
|
|
1438
|
-
var import_react_intl11 = require("react-intl");
|
|
1439
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1440
|
-
function extractProvider(context) {
|
|
1441
|
-
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
1442
|
-
return context.provider;
|
|
1443
|
-
}
|
|
1444
|
-
return void 0;
|
|
1445
|
-
}
|
|
1446
|
-
function DefaultButtonSocial({
|
|
1447
|
-
attributes,
|
|
1448
|
-
node,
|
|
1449
|
-
onClick,
|
|
1450
|
-
showLabel: _showLabel
|
|
1451
|
-
}) {
|
|
1452
|
-
var _a, _b, _c;
|
|
1453
|
-
const {
|
|
1454
|
-
node_type: _ignoredNodeType,
|
|
1455
|
-
type: _ignoredType,
|
|
1456
|
-
name: _ignoredName,
|
|
1457
|
-
...props
|
|
1458
|
-
} = attributes;
|
|
1459
|
-
const {
|
|
1460
|
-
flow: { ui }
|
|
1461
|
-
} = (0, import_elements_react12.useOryFlow)();
|
|
1462
|
-
const intl = (0, import_react_intl11.useIntl)();
|
|
1463
|
-
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
1464
|
-
const Logo = provider_logos_default[attributes.value];
|
|
1465
|
-
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
1466
|
-
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
1467
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1468
|
-
"button",
|
|
1469
|
-
{
|
|
1470
|
-
className: cn(
|
|
1471
|
-
"gap-3 ring-1 ring-forms-border-default bg-button-secondary-bg-default hover:bg-button-secondary-bg-hover transition-colors rounded flex items-center justify-center py-2.5 px-4 md:py-4",
|
|
1472
|
-
{ "py-2.5": showLabel }
|
|
1473
|
-
),
|
|
1474
|
-
value: attributes.value,
|
|
1475
|
-
type: "submit",
|
|
1476
|
-
name: "provider",
|
|
1477
|
-
...props,
|
|
1478
|
-
onClick,
|
|
1479
|
-
children: [
|
|
1480
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "w-5 h-5", children: Logo ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1481
|
-
Logo,
|
|
1482
|
-
{
|
|
1483
|
-
size: 20,
|
|
1484
|
-
className: "object-fill w-full h-full"
|
|
1485
|
-
}
|
|
1486
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "rounded-full aspect-square border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
1487
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (0, import_elements_react12.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
|
|
1488
|
-
]
|
|
1489
|
-
}
|
|
1490
|
-
);
|
|
1491
|
-
}
|
|
1492
|
-
function DefaultSocialButtonContainer({
|
|
1493
|
-
children,
|
|
1494
|
-
nodes
|
|
1495
|
-
}) {
|
|
1496
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1497
|
-
"div",
|
|
1498
|
-
{
|
|
1499
|
-
className: cn("grid gap-3", {
|
|
1500
|
-
// needed because tailwind is not compiling dynamic classes
|
|
1501
|
-
"grid-cols-1": nodes.length % 4 <= 2,
|
|
1502
|
-
"grid-cols-3": nodes.length % 3 === 0,
|
|
1503
|
-
"grid-cols-4": nodes.length > 1 && nodes.length % 4 === 0
|
|
1504
|
-
}),
|
|
1505
|
-
children
|
|
1506
|
-
}
|
|
1507
|
-
);
|
|
1508
|
-
}
|
|
1509
1539
|
|
|
1510
1540
|
// src/theme/default/components/form/text.tsx
|
|
1511
1541
|
var import_elements_react13 = require("@ory/elements-react");
|
|
@@ -1745,7 +1775,7 @@ var SvgTrash = (props) => {
|
|
|
1745
1775
|
var trash_default = SvgTrash;
|
|
1746
1776
|
|
|
1747
1777
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1748
|
-
var
|
|
1778
|
+
var import_react_hook_form7 = require("react-hook-form");
|
|
1749
1779
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1750
1780
|
function DefaultSettingsOidc({
|
|
1751
1781
|
linkButtons,
|
|
@@ -1753,7 +1783,7 @@ function DefaultSettingsOidc({
|
|
|
1753
1783
|
}) {
|
|
1754
1784
|
const hasLinkButtons = linkButtons.length > 0;
|
|
1755
1785
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1756
|
-
const { setValue } = (0,
|
|
1786
|
+
const { setValue } = (0, import_react_hook_form7.useFormContext)();
|
|
1757
1787
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1758
1788
|
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex gap-3 items-start [&>button]:w-[79px]", children: linkButtons.map((button) => {
|
|
1759
1789
|
const attrs = button.attributes;
|
|
@@ -2293,6 +2323,7 @@ function Verification({
|
|
|
2293
2323
|
}
|
|
2294
2324
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2295
2325
|
0 && (module.exports = {
|
|
2326
|
+
DefaultButtonSocial,
|
|
2296
2327
|
DefaultCard,
|
|
2297
2328
|
DefaultCardContent,
|
|
2298
2329
|
DefaultCardFooter,
|