@ory/elements-react 1.0.0-next.17 → 1.0.0-next.19
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 +33 -0
- package/api-report/elements-react-client.api.json +144 -16
- package/api-report/elements-react-client.api.md +19 -8
- package/api-report/elements-react-theme.api.json +47 -0
- package/api-report/elements-react-theme.api.md +5 -2
- package/api-report/elements-react.api.json +85 -23
- package/api-report/elements-react.api.md +37 -16
- package/api-report/temp/elements-react-client.api.md +19 -8
- package/api-report/temp/elements-react-theme.api.md +5 -2
- package/api-report/temp/elements-react.api.md +37 -16
- package/dist/client/config.d.mts +21 -0
- package/dist/client/config.d.ts +21 -0
- package/dist/client/config.js +77 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/config.mjs +51 -0
- package/dist/client/config.mjs.map +1 -0
- package/dist/client/frontendClient.d.mts +3 -1
- package/dist/client/frontendClient.d.ts +3 -1
- package/dist/client/frontendClient.js +14 -2
- package/dist/client/frontendClient.js.map +1 -1
- package/dist/client/frontendClient.mjs +14 -2
- package/dist/client/frontendClient.mjs.map +1 -1
- package/dist/client/index.d.mts +3 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +4 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +5 -0
- package/dist/client/index.mjs.map +1 -1
- package/dist/client/session-provider.d.mts +62 -0
- package/dist/client/session-provider.d.ts +62 -0
- package/dist/client/session-provider.js +96 -0
- package/dist/client/session-provider.js.map +1 -0
- package/dist/client/session-provider.mjs +71 -0
- package/dist/client/session-provider.mjs.map +1 -0
- package/dist/client/useSession.d.mts +22 -31
- package/dist/client/useSession.d.ts +22 -31
- package/dist/client/useSession.js +7 -49
- package/dist/client/useSession.js.map +1 -1
- package/dist/client/useSession.mjs +8 -49
- package/dist/client/useSession.mjs.map +1 -1
- package/dist/index.d.mts +36 -19
- package/dist/index.d.ts +36 -19
- package/dist/index.js +583 -402
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +586 -405
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +393 -259
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +4 -2
- package/dist/theme/default/index.d.ts +4 -2
- package/dist/theme/default/index.js +728 -588
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +665 -526
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +1 -1
- package/package.json +2 -1
- package/postcss.config.ts +1 -0
- package/tailwind.config.ts +14 -13
- package/tsconfig.json +4 -3
- package/variables-processed.json +385 -187
- package/.eslintrc.js +0 -63
|
@@ -36,6 +36,7 @@ __export(default_exports, {
|
|
|
36
36
|
DefaultCardContent: () => DefaultCardContent,
|
|
37
37
|
DefaultCardFooter: () => DefaultCardFooter,
|
|
38
38
|
DefaultCardHeader: () => DefaultCardHeader,
|
|
39
|
+
DefaultCardLayout: () => DefaultCardLayout,
|
|
39
40
|
DefaultCardLogo: () => DefaultCardLogo,
|
|
40
41
|
DefaultCurrentIdentifierButton: () => DefaultCurrentIdentifierButton,
|
|
41
42
|
DefaultFormContainer: () => DefaultFormContainer,
|
|
@@ -57,8 +58,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
57
58
|
var SvgOryBadgeHorizontal = (props) => {
|
|
58
59
|
var _a, _b;
|
|
59
60
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: [
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "#
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "#
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "#0F172A", d: "M18.007 8h-1.71l2.007-3.996L16.296 0h1.711l1.145 2.301L20.327 0H22z" }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "#0F172A", fillRule: "evenodd", d: "M12.902 4.86a2.47 2.47 0 0 0 1.796-2.365v-.038C14.687 1.097 13.592 0 12.245 0H9.037v1.44l1.208 1.985H9.04V8h1.51V4.949h.633L13.04 8h1.775zm-.876-1.431h.223c.52 0 .943-.427.943-.953a.95.95 0 0 0-.943-.952h-1.39zM4 0a4 4 0 1 0-.001 7.999A4 4 0 0 0 4 0M1.524 4a2.476 2.476 0 1 0 4.952 0 2.476 2.476 0 0 0-4.952 0", clipRule: "evenodd" })
|
|
62
63
|
] });
|
|
63
64
|
};
|
|
64
65
|
var ory_badge_horizontal_default = SvgOryBadgeHorizontal;
|
|
@@ -69,8 +70,8 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
|
69
70
|
var SvgOryBadgeVertical = (props) => {
|
|
70
71
|
var _a, _b;
|
|
71
72
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: [
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "#
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "#
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "#0F172A", d: "M8 3.993v1.71L4.004 3.697 0 5.704V3.993l2.301-1.145L0 1.673V0z" }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "#0F172A", fillRule: "evenodd", d: "M4.86 9.099a2.47 2.47 0 0 0-2.365-1.797h-.038C1.097 7.313 0 8.408 0 9.755v3.208h1.44l1.985-1.208v1.204H8v-1.51H4.949v-.633L8 8.96V7.185zm-1.431.875v-.223a.95.95 0 0 0-.953-.943.95.95 0 0 0-.952.943v1.39zM0 18a4 4 0 1 0 8 0 4 4 0 0 0-8 0m4 2.476a2.476 2.476 0 1 0 0-4.952 2.476 2.476 0 0 0 0 4.952", clipRule: "evenodd" })
|
|
74
75
|
] });
|
|
75
76
|
};
|
|
76
77
|
var ory_badge_vertical_default = SvgOryBadgeVertical;
|
|
@@ -78,9 +79,9 @@ var ory_badge_vertical_default = SvgOryBadgeVertical;
|
|
|
78
79
|
// src/theme/default/components/card/badge.tsx
|
|
79
80
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
80
81
|
function Badge() {
|
|
81
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "
|
|
82
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ory_badge_horizontal_default, { width: 22, height: 8, className: "
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ory_badge_vertical_default, { width: 8, height: 22, className: "max-
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "absolute bg-ory-background-default p-2 font-bold max-sm:bottom-0 max-sm:left-8 max-sm:translate-y-full max-sm:rounded-b-md sm:right-0 sm:top-8 sm:translate-x-full sm:rounded-r-lg border-ory-border-default border max-sm:py-[7px] sm:pl-[7px]", children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ory_badge_horizontal_default, { width: 22, height: 8, className: "sm:hidden" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ory_badge_vertical_default, { width: 8, height: 22, className: "max-sm:hidden" })
|
|
84
85
|
] });
|
|
85
86
|
}
|
|
86
87
|
|
|
@@ -127,7 +128,7 @@ function LoginCardFooter() {
|
|
|
127
128
|
if (returnTo) {
|
|
128
129
|
registrationLink += `?return_to=${returnTo}`;
|
|
129
130
|
}
|
|
130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
131
132
|
intl.formatMessage({
|
|
132
133
|
id: "login.registration-label",
|
|
133
134
|
defaultMessage: "No account?"
|
|
@@ -136,7 +137,7 @@ function LoginCardFooter() {
|
|
|
136
137
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
137
138
|
"a",
|
|
138
139
|
{
|
|
139
|
-
className: "text-
|
|
140
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
140
141
|
href: registrationLink,
|
|
141
142
|
children: intl.formatMessage({
|
|
142
143
|
id: "login.registration-button",
|
|
@@ -170,10 +171,10 @@ function RegistrationCardFooter() {
|
|
|
170
171
|
if (returnTo) {
|
|
171
172
|
loginLink += `?return_to=${returnTo}`;
|
|
172
173
|
}
|
|
173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
174
175
|
"button",
|
|
175
176
|
{
|
|
176
|
-
className: "font-medium text-
|
|
177
|
+
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
177
178
|
type: "submit",
|
|
178
179
|
onClick: handleScreenSelection,
|
|
179
180
|
children: intl.formatMessage({
|
|
@@ -190,7 +191,7 @@ function RegistrationCardFooter() {
|
|
|
190
191
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
191
192
|
"a",
|
|
192
193
|
{
|
|
193
|
-
className: "text-
|
|
194
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
194
195
|
href: loginLink,
|
|
195
196
|
children: intl.formatMessage({
|
|
196
197
|
id: "registration.login-button",
|
|
@@ -453,23 +454,24 @@ function DefaultCurrentIdentifierButton() {
|
|
|
453
454
|
"autocomplete",
|
|
454
455
|
"node_type"
|
|
455
456
|
]);
|
|
456
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
457
458
|
"a",
|
|
458
459
|
{
|
|
459
|
-
className: "cursor-pointer
|
|
460
|
+
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-full 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",
|
|
460
461
|
...attributes,
|
|
461
462
|
href: initFlowUrl,
|
|
462
463
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
463
|
-
children: [
|
|
464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
464
465
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
465
466
|
arrow_left_default,
|
|
466
467
|
{
|
|
467
468
|
size: 16,
|
|
468
|
-
|
|
469
|
+
stroke: "1",
|
|
470
|
+
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
469
471
|
}
|
|
470
472
|
),
|
|
471
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm font-medium text-button-identifier-
|
|
472
|
-
]
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.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.attributes.value })
|
|
474
|
+
] })
|
|
473
475
|
}
|
|
474
476
|
);
|
|
475
477
|
}
|
|
@@ -511,8 +513,8 @@ function InnerCardHeader({ title, text }) {
|
|
|
511
513
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
512
514
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Card.Logo, {}),
|
|
513
515
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
514
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "font-semibold
|
|
515
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: text }),
|
|
516
518
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DefaultCurrentIdentifierButton, {})
|
|
517
519
|
] })
|
|
518
520
|
] });
|
|
@@ -531,15 +533,21 @@ function DefaultCardLogo() {
|
|
|
531
533
|
if (flow.config.logoUrl) {
|
|
532
534
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
533
535
|
}
|
|
534
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "text-xl font-semibold leading-normal text-
|
|
536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: flow.config.name });
|
|
535
537
|
}
|
|
536
538
|
|
|
537
|
-
// src/theme/default/components/card/
|
|
539
|
+
// src/theme/default/components/card/layout.tsx
|
|
538
540
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
541
|
+
function DefaultCardLayout({ children }) {
|
|
542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// src/theme/default/components/card/index.tsx
|
|
546
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
539
547
|
function DefaultCard({ children }) {
|
|
540
|
-
return /* @__PURE__ */ (0,
|
|
548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
|
|
541
549
|
children,
|
|
542
|
-
/* @__PURE__ */ (0,
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Badge, {})
|
|
543
551
|
] }) });
|
|
544
552
|
}
|
|
545
553
|
|
|
@@ -560,159 +568,160 @@ var import_elements_react5 = require("@ory/elements-react");
|
|
|
560
568
|
|
|
561
569
|
// src/theme/default/provider-logos/apple.svg
|
|
562
570
|
var React4 = __toESM(require("react"));
|
|
563
|
-
var
|
|
571
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
564
572
|
var SvgApple = (props) => {
|
|
565
573
|
var _a, _b;
|
|
566
|
-
return /* @__PURE__ */ (0,
|
|
574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.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_runtime11.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
575
|
};
|
|
568
576
|
var apple_default = SvgApple;
|
|
569
577
|
|
|
570
578
|
// src/theme/default/provider-logos/auth0.svg
|
|
571
579
|
var React5 = __toESM(require("react"));
|
|
572
|
-
var
|
|
580
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
573
581
|
var SvgAuth0 = (props) => {
|
|
574
582
|
var _a, _b;
|
|
575
|
-
return /* @__PURE__ */ (0,
|
|
583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.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_runtime12.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
584
|
};
|
|
577
585
|
var auth0_default = SvgAuth0;
|
|
578
586
|
|
|
579
587
|
// src/theme/default/provider-logos/discord.svg
|
|
580
588
|
var React6 = __toESM(require("react"));
|
|
581
|
-
var
|
|
589
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
582
590
|
var SvgDiscord = (props) => {
|
|
583
591
|
var _a, _b;
|
|
584
|
-
return /* @__PURE__ */ (0,
|
|
585
|
-
/* @__PURE__ */ (0,
|
|
586
|
-
/* @__PURE__ */ (0,
|
|
592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.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: [
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.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" }),
|
|
594
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.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
595
|
] });
|
|
588
596
|
};
|
|
589
597
|
var discord_default = SvgDiscord;
|
|
590
598
|
|
|
591
599
|
// src/theme/default/provider-logos/facebook.svg
|
|
592
600
|
var React7 = __toESM(require("react"));
|
|
593
|
-
var
|
|
601
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
594
602
|
var SvgFacebook = (props) => {
|
|
595
603
|
var _a, _b;
|
|
596
|
-
return /* @__PURE__ */ (0,
|
|
597
|
-
/* @__PURE__ */ (0,
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.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: [
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
606
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { stopColor: "#18ACFE" }),
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("stop", { offset: 1, stopColor: "#0163E0" })
|
|
610
|
+
] }) })
|
|
602
611
|
] });
|
|
603
612
|
};
|
|
604
613
|
var facebook_default = SvgFacebook;
|
|
605
614
|
|
|
606
615
|
// src/theme/default/provider-logos/generic.svg
|
|
607
616
|
var React8 = __toESM(require("react"));
|
|
608
|
-
var
|
|
617
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
609
618
|
var SvgGeneric = (props) => {
|
|
610
619
|
var _a, _b;
|
|
611
|
-
return /* @__PURE__ */ (0,
|
|
612
|
-
/* @__PURE__ */ (0,
|
|
613
|
-
/* @__PURE__ */ (0,
|
|
614
|
-
/* @__PURE__ */ (0,
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.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: [
|
|
621
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
622
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.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
624
|
] });
|
|
616
625
|
};
|
|
617
626
|
var generic_default = SvgGeneric;
|
|
618
627
|
|
|
619
628
|
// src/theme/default/provider-logos/github.svg
|
|
620
629
|
var React9 = __toESM(require("react"));
|
|
621
|
-
var
|
|
630
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
622
631
|
var SvgGithub = (props) => {
|
|
623
632
|
var _a, _b;
|
|
624
|
-
return /* @__PURE__ */ (0,
|
|
633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.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_runtime16.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
634
|
};
|
|
626
635
|
var github_default = SvgGithub;
|
|
627
636
|
|
|
628
637
|
// src/theme/default/provider-logos/gitlab.svg
|
|
629
638
|
var React10 = __toESM(require("react"));
|
|
630
|
-
var
|
|
639
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
631
640
|
var SvgGitlab = (props) => {
|
|
632
641
|
var _a, _b;
|
|
633
|
-
return /* @__PURE__ */ (0,
|
|
634
|
-
/* @__PURE__ */ (0,
|
|
635
|
-
/* @__PURE__ */ (0,
|
|
636
|
-
/* @__PURE__ */ (0,
|
|
637
|
-
/* @__PURE__ */ (0,
|
|
642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.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: [
|
|
643
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.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" }),
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.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" }),
|
|
645
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.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" }),
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.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
647
|
] });
|
|
639
648
|
};
|
|
640
649
|
var gitlab_default = SvgGitlab;
|
|
641
650
|
|
|
642
651
|
// src/theme/default/provider-logos/google.svg
|
|
643
652
|
var React11 = __toESM(require("react"));
|
|
644
|
-
var
|
|
653
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
645
654
|
var SvgGoogle = (props) => {
|
|
646
655
|
var _a, _b;
|
|
647
|
-
return /* @__PURE__ */ (0,
|
|
648
|
-
/* @__PURE__ */ (0,
|
|
649
|
-
/* @__PURE__ */ (0,
|
|
650
|
-
/* @__PURE__ */ (0,
|
|
651
|
-
/* @__PURE__ */ (0,
|
|
656
|
+
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: [
|
|
657
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.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" }),
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.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" }),
|
|
659
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.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" }),
|
|
660
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.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
661
|
] });
|
|
653
662
|
};
|
|
654
663
|
var google_default = SvgGoogle;
|
|
655
664
|
|
|
656
665
|
// src/theme/default/provider-logos/linkedin.svg
|
|
657
666
|
var React12 = __toESM(require("react"));
|
|
658
|
-
var
|
|
667
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
659
668
|
var SvgLinkedin = (props) => {
|
|
660
669
|
var _a, _b;
|
|
661
|
-
return /* @__PURE__ */ (0,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
663
|
-
/* @__PURE__ */ (0,
|
|
670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.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: [
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.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
673
|
] });
|
|
665
674
|
};
|
|
666
675
|
var linkedin_default = SvgLinkedin;
|
|
667
676
|
|
|
668
677
|
// src/theme/default/provider-logos/microsoft.svg
|
|
669
678
|
var React13 = __toESM(require("react"));
|
|
670
|
-
var
|
|
679
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
671
680
|
var SvgMicrosoft = (props) => {
|
|
672
681
|
var _a, _b;
|
|
673
|
-
return /* @__PURE__ */ (0,
|
|
674
|
-
/* @__PURE__ */ (0,
|
|
675
|
-
/* @__PURE__ */ (0,
|
|
676
|
-
/* @__PURE__ */ (0,
|
|
677
|
-
/* @__PURE__ */ (0,
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.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: [
|
|
683
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
684
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
685
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
678
687
|
] });
|
|
679
688
|
};
|
|
680
689
|
var microsoft_default = SvgMicrosoft;
|
|
681
690
|
|
|
682
691
|
// src/theme/default/provider-logos/slack.svg
|
|
683
692
|
var React14 = __toESM(require("react"));
|
|
684
|
-
var
|
|
693
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
685
694
|
var SvgSlack = (props) => {
|
|
686
695
|
var _a, _b;
|
|
687
|
-
return /* @__PURE__ */ (0,
|
|
688
|
-
/* @__PURE__ */ (0,
|
|
689
|
-
/* @__PURE__ */ (0,
|
|
690
|
-
/* @__PURE__ */ (0,
|
|
691
|
-
/* @__PURE__ */ (0,
|
|
696
|
+
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: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.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" }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.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" }),
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.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" }),
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.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
701
|
] });
|
|
693
702
|
};
|
|
694
703
|
var slack_default = SvgSlack;
|
|
695
704
|
|
|
696
705
|
// src/theme/default/provider-logos/spotify.svg
|
|
697
706
|
var React15 = __toESM(require("react"));
|
|
698
|
-
var
|
|
707
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
699
708
|
var SvgSpotify = (props) => {
|
|
700
709
|
var _a, _b;
|
|
701
|
-
return /* @__PURE__ */ (0,
|
|
702
|
-
/* @__PURE__ */ (0,
|
|
703
|
-
/* @__PURE__ */ (0,
|
|
710
|
+
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: [
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.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
713
|
] });
|
|
705
714
|
};
|
|
706
715
|
var spotify_default = SvgSpotify;
|
|
707
716
|
|
|
708
717
|
// src/theme/default/provider-logos/yandex.svg
|
|
709
718
|
var React16 = __toESM(require("react"));
|
|
710
|
-
var
|
|
719
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
711
720
|
var SvgYandex = (props) => {
|
|
712
721
|
var _a, _b;
|
|
713
|
-
return /* @__PURE__ */ (0,
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
715
|
-
/* @__PURE__ */ (0,
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.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: [
|
|
723
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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
725
|
] });
|
|
717
726
|
};
|
|
718
727
|
var yandex_default = SvgYandex;
|
|
@@ -737,7 +746,49 @@ var provider_logos_default = logos;
|
|
|
737
746
|
|
|
738
747
|
// src/theme/default/components/form/social.tsx
|
|
739
748
|
var import_react_intl3 = require("react-intl");
|
|
740
|
-
var
|
|
749
|
+
var import_react_hook_form2 = require("react-hook-form");
|
|
750
|
+
|
|
751
|
+
// src/theme/default/components/form/spinner.tsx
|
|
752
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
753
|
+
function Spinner({ className }) {
|
|
754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
755
|
+
"svg",
|
|
756
|
+
{
|
|
757
|
+
"aria-hidden": "true",
|
|
758
|
+
role: "status",
|
|
759
|
+
className: cn(
|
|
760
|
+
"absolute pointer-events-none inset-0 m-auto size-8 animate-spin",
|
|
761
|
+
className
|
|
762
|
+
),
|
|
763
|
+
viewBox: "0 0 34 34",
|
|
764
|
+
fill: "none",
|
|
765
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
766
|
+
children: [
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
768
|
+
"path",
|
|
769
|
+
{
|
|
770
|
+
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",
|
|
771
|
+
stroke: "currentColor",
|
|
772
|
+
strokeLinecap: "round",
|
|
773
|
+
strokeLinejoin: "round"
|
|
774
|
+
}
|
|
775
|
+
) }),
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
777
|
+
"rect",
|
|
778
|
+
{
|
|
779
|
+
width: "24",
|
|
780
|
+
height: "24",
|
|
781
|
+
fill: "currentColor",
|
|
782
|
+
transform: "translate(17 0.029541) rotate(45)"
|
|
783
|
+
}
|
|
784
|
+
) }) })
|
|
785
|
+
]
|
|
786
|
+
}
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// src/theme/default/components/form/social.tsx
|
|
791
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
741
792
|
function extractProvider(context) {
|
|
742
793
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
743
794
|
return context.provider;
|
|
@@ -763,40 +814,36 @@ function DefaultButtonSocial({
|
|
|
763
814
|
flow: { ui }
|
|
764
815
|
} = (0, import_elements_react5.useOryFlow)();
|
|
765
816
|
const intl = (0, import_react_intl3.useIntl)();
|
|
817
|
+
const {
|
|
818
|
+
formState: { isSubmitting }
|
|
819
|
+
} = (0, import_react_hook_form2.useFormContext)();
|
|
766
820
|
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
767
821
|
const Logo = logos2[attributes.value];
|
|
768
822
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
769
823
|
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
770
|
-
return /* @__PURE__ */ (0,
|
|
824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
771
825
|
"button",
|
|
772
826
|
{
|
|
773
|
-
className:
|
|
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
|
-
),
|
|
827
|
+
className: "gap-3 border border-button-social-border-default bg-button-social-background-default hover:bg-button-social-background-hover transition-colors rounded flex items-center justify-center px-4 py-[13px] disabled:bg-button-social-background-disabled disabled:border-button-social-border-disabled disabled:text-button-social-foreground-disabled hover:text-button-social-foreground-disabled",
|
|
777
828
|
value: attributes.value,
|
|
778
829
|
type: "submit",
|
|
779
830
|
name: "provider",
|
|
780
831
|
...props,
|
|
781
832
|
onClick,
|
|
833
|
+
disabled: isSubmitting,
|
|
782
834
|
children: [
|
|
783
|
-
/* @__PURE__ */ (0,
|
|
784
|
-
|
|
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
|
|
835
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "size-5 relative", children: !isSubmitting ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex aspect-square items-center justify-center rounded-full border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Spinner, { className: "size-5" }) }),
|
|
836
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "grow text-left font-medium leading-none text-button-social-foreground-default", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
|
|
790
837
|
]
|
|
791
838
|
}
|
|
792
839
|
);
|
|
793
840
|
}
|
|
794
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0,
|
|
841
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
795
842
|
function DefaultSocialButtonContainer({
|
|
796
843
|
children,
|
|
797
844
|
nodes
|
|
798
845
|
}) {
|
|
799
|
-
return /* @__PURE__ */ (0,
|
|
846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
800
847
|
"div",
|
|
801
848
|
{
|
|
802
849
|
className: cn("grid gap-3", {
|
|
@@ -811,14 +858,14 @@ function DefaultSocialButtonContainer({
|
|
|
811
858
|
}
|
|
812
859
|
|
|
813
860
|
// src/theme/default/components/form/index.tsx
|
|
814
|
-
var
|
|
861
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
815
862
|
function DefaultFormContainer({
|
|
816
863
|
children,
|
|
817
864
|
onSubmit,
|
|
818
865
|
action,
|
|
819
866
|
method
|
|
820
867
|
}) {
|
|
821
|
-
return /* @__PURE__ */ (0,
|
|
868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
822
869
|
"form",
|
|
823
870
|
{
|
|
824
871
|
onSubmit,
|
|
@@ -835,7 +882,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
835
882
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
836
883
|
return null;
|
|
837
884
|
}
|
|
838
|
-
return /* @__PURE__ */ (0,
|
|
885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
839
886
|
"section",
|
|
840
887
|
{
|
|
841
888
|
className: cn(
|
|
@@ -847,14 +894,15 @@ function DefaultMessageContainer({ children }) {
|
|
|
847
894
|
}
|
|
848
895
|
function DefaultMessage({ message }) {
|
|
849
896
|
const intl = (0, import_react_intl4.useIntl)();
|
|
850
|
-
return /* @__PURE__ */ (0,
|
|
897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
851
898
|
"span",
|
|
852
899
|
{
|
|
853
|
-
className: cn(
|
|
854
|
-
"
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
900
|
+
className: cn(
|
|
901
|
+
"leading-normal",
|
|
902
|
+
message.type === "error" && "text-interface-foreground-validation-danger",
|
|
903
|
+
message.type === "info" && "text-interface-foreground-default-secondary",
|
|
904
|
+
message.type === "success" && "text-interface-foreground-validation-success"
|
|
905
|
+
),
|
|
858
906
|
...(0, import_elements_react6.messageTestId)(message),
|
|
859
907
|
children: (0, import_elements_react6.uiTextToFormattedMessage)(message, intl)
|
|
860
908
|
}
|
|
@@ -866,37 +914,37 @@ var import_react_intl5 = require("react-intl");
|
|
|
866
914
|
|
|
867
915
|
// src/theme/default/assets/icons/code.svg
|
|
868
916
|
var React17 = __toESM(require("react"));
|
|
869
|
-
var
|
|
917
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
870
918
|
var SvgCode = (props) => {
|
|
871
919
|
var _a, _b;
|
|
872
|
-
return /* @__PURE__ */ (0,
|
|
920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.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_runtime27.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" }) });
|
|
873
921
|
};
|
|
874
922
|
var code_default = SvgCode;
|
|
875
923
|
|
|
876
924
|
// src/theme/default/assets/icons/passkey.svg
|
|
877
925
|
var React18 = __toESM(require("react"));
|
|
878
|
-
var
|
|
926
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
879
927
|
var SvgPasskey = (props) => {
|
|
880
928
|
var _a, _b;
|
|
881
|
-
return /* @__PURE__ */ (0,
|
|
929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.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_runtime28.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" }) });
|
|
882
930
|
};
|
|
883
931
|
var passkey_default = SvgPasskey;
|
|
884
932
|
|
|
885
933
|
// src/theme/default/assets/icons/password.svg
|
|
886
934
|
var React19 = __toESM(require("react"));
|
|
887
|
-
var
|
|
935
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
888
936
|
var SvgPassword = (props) => {
|
|
889
937
|
var _a, _b;
|
|
890
|
-
return /* @__PURE__ */ (0,
|
|
938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.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_runtime29.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" }) });
|
|
891
939
|
};
|
|
892
940
|
var password_default = SvgPassword;
|
|
893
941
|
|
|
894
942
|
// src/theme/default/assets/icons/webauthn.svg
|
|
895
943
|
var React20 = __toESM(require("react"));
|
|
896
|
-
var
|
|
944
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
897
945
|
var SvgWebauthn = (props) => {
|
|
898
946
|
var _a, _b;
|
|
899
|
-
return /* @__PURE__ */ (0,
|
|
947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.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_runtime30.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" }) });
|
|
900
948
|
};
|
|
901
949
|
var webauthn_default = SvgWebauthn;
|
|
902
950
|
|
|
@@ -906,7 +954,7 @@ function isGroupImmediateSubmit(group) {
|
|
|
906
954
|
}
|
|
907
955
|
|
|
908
956
|
// src/theme/default/components/card/auth-methods.tsx
|
|
909
|
-
var
|
|
957
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
910
958
|
var iconsMap = {
|
|
911
959
|
code: code_default,
|
|
912
960
|
passkey: passkey_default,
|
|
@@ -919,20 +967,26 @@ function DefaultAuthMethodListItem({
|
|
|
919
967
|
}) {
|
|
920
968
|
const intl = (0, import_react_intl5.useIntl)();
|
|
921
969
|
const Icon = iconsMap[group] || null;
|
|
922
|
-
return /* @__PURE__ */ (0,
|
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-full rounded px-2 py-1 hover:bg-interface-background-default-primary-hover", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
923
971
|
"button",
|
|
924
972
|
{
|
|
925
|
-
className: "flex
|
|
973
|
+
className: "flex cursor-pointer gap-3 py-2 text-left items-start",
|
|
926
974
|
onClick,
|
|
927
975
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
928
976
|
id: `auth-method-list-item-${group}`,
|
|
929
977
|
"data-testid": "auth-method-list-item",
|
|
930
978
|
"aria-label": `Authenticate with ${group}`,
|
|
931
979
|
children: [
|
|
932
|
-
/* @__PURE__ */ (0,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
980
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
981
|
+
Icon,
|
|
982
|
+
{
|
|
983
|
+
size: 16,
|
|
984
|
+
className: "text-interface-foreground-brand-primary"
|
|
985
|
+
}
|
|
986
|
+
) }),
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col", children: [
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-interface-foreground-default-primary", children: intl.formatMessage({ id: `two-step.${group}.title` }) }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({ id: `two-step.${group}.description` }) })
|
|
936
990
|
] })
|
|
937
991
|
]
|
|
938
992
|
}
|
|
@@ -942,83 +996,38 @@ function DefaultAuthMethodListItem({
|
|
|
942
996
|
// src/theme/default/components/form/button.tsx
|
|
943
997
|
var import_client_fetch5 = require("@ory/client-fetch");
|
|
944
998
|
var import_elements_react7 = require("@ory/elements-react");
|
|
945
|
-
var import_react_hook_form2 = require("react-hook-form");
|
|
946
|
-
var import_react_intl6 = require("react-intl");
|
|
947
|
-
|
|
948
|
-
// src/theme/default/components/form/spinner.tsx
|
|
949
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
950
|
-
function Spinner({ className }) {
|
|
951
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
952
|
-
"svg",
|
|
953
|
-
{
|
|
954
|
-
"aria-hidden": "true",
|
|
955
|
-
role: "status",
|
|
956
|
-
className: cn(
|
|
957
|
-
"absolute pointer-events-none inset-0 mx-auto my-auto w-8 h-8 animate-spin",
|
|
958
|
-
className
|
|
959
|
-
),
|
|
960
|
-
viewBox: "0 0 34 34",
|
|
961
|
-
fill: "none",
|
|
962
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
963
|
-
children: [
|
|
964
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
965
|
-
"path",
|
|
966
|
-
{
|
|
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",
|
|
968
|
-
stroke: "currentColor",
|
|
969
|
-
strokeLinecap: "round",
|
|
970
|
-
strokeLinejoin: "round"
|
|
971
|
-
}
|
|
972
|
-
) }),
|
|
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)(
|
|
974
|
-
"rect",
|
|
975
|
-
{
|
|
976
|
-
width: "24",
|
|
977
|
-
height: "24",
|
|
978
|
-
fill: "currentColor",
|
|
979
|
-
transform: "translate(17 0.029541) rotate(45)"
|
|
980
|
-
}
|
|
981
|
-
) }) })
|
|
982
|
-
]
|
|
983
|
-
}
|
|
984
|
-
);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
// src/theme/default/components/form/button.tsx
|
|
988
|
-
var import_elements_react8 = require("@ory/elements-react");
|
|
989
999
|
var import_class_variance_authority = require("class-variance-authority");
|
|
990
|
-
var
|
|
1000
|
+
var import_react_hook_form3 = require("react-hook-form");
|
|
1001
|
+
var import_react_intl6 = require("react-intl");
|
|
1002
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
991
1003
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
992
1004
|
[
|
|
993
|
-
"
|
|
994
|
-
"disabled:cursor-not-allowed loading:before:pointer-events-none
|
|
995
|
-
"transition-colors ease-linear
|
|
1005
|
+
"relative flex justify-center gap-3 overflow-hidden rounded leading-none ring-1 ring-inset font-medium",
|
|
1006
|
+
"disabled:cursor-not-allowed loading:cursor-wait loading:before:pointer-events-none",
|
|
1007
|
+
"transition-colors duration-100 ease-linear",
|
|
1008
|
+
"p-4 max-w-[488px]"
|
|
996
1009
|
],
|
|
997
1010
|
{
|
|
998
1011
|
variants: {
|
|
999
1012
|
intent: {
|
|
1000
1013
|
primary: [
|
|
1001
|
-
"bg-button-primary-
|
|
1002
|
-
"hover:bg-button-primary-
|
|
1003
|
-
"disabled:bg-button-primary-
|
|
1004
|
-
"loading:bg-button-primary-
|
|
1005
|
-
"loading:before:absolute loading:before:
|
|
1014
|
+
"bg-button-primary-background-default text-button-primary-foreground-default ring-button-primary-border-default",
|
|
1015
|
+
"hover:bg-button-primary-background-hover hover:text-button-primary-foreground-hover hover:ring-button-primary-border-hover",
|
|
1016
|
+
"disabled:bg-button-primary-background-disabled disabled:text-button-primary-foreground-disabled disabled:ring-button-primary-border-disabled",
|
|
1017
|
+
"loading:bg-button-primary-background-default loading:text-button-primary-foreground-default loading:ring-button-primary-border-default",
|
|
1018
|
+
"loading:before:absolute loading:before:inset-0 loading:before:bg-button-primary-background-default loading:before:opacity-80 loading:before:content-['']",
|
|
1019
|
+
"disabled:bg-button-primary-background-disabled disabled:text-button-primary-foreground-disabled disabled:ring-button-primary-border-disabled"
|
|
1006
1020
|
],
|
|
1007
1021
|
secondary: [
|
|
1008
|
-
"bg-button-secondary-
|
|
1009
|
-
"hover:bg-button-secondary-
|
|
1010
|
-
"disabled:bg-button-secondary-
|
|
1011
|
-
"loading:bg-button-secondary-
|
|
1012
|
-
"loading:before:absolute loading:before:
|
|
1022
|
+
"bg-button-secondary-background-default text-button-secondary-foreground-default ring-button-secondary-border-default",
|
|
1023
|
+
"hover:bg-button-secondary-background-hover hover:text-button-secondary-foreground-hover hover:ring-button-secondary-border-hover",
|
|
1024
|
+
"disabled:bg-button-secondary-background-disabled disabled:text-button-secondary-foreground-disabled disabled:ring-button-secondary-border-disabled",
|
|
1025
|
+
"loading:bg-button-secondary-background-default loading:text-button-secondary-foreground-default loading:ring-button-secondary-border-default",
|
|
1026
|
+
"loading:before:absolute loading:before:inset-0 loading:before:bg-button-secondary-background-default loading:before:opacity-80 loading:before:content-['']"
|
|
1013
1027
|
]
|
|
1014
1028
|
},
|
|
1015
|
-
size: {
|
|
1016
|
-
default: ["px-4 py-3"],
|
|
1017
|
-
large: ["px-4 py-4.5 max-md:py-3"]
|
|
1018
|
-
},
|
|
1019
1029
|
defaultVariants: {
|
|
1020
|
-
intent: "primary"
|
|
1021
|
-
size: "default"
|
|
1030
|
+
intent: "primary"
|
|
1022
1031
|
}
|
|
1023
1032
|
}
|
|
1024
1033
|
}
|
|
@@ -1042,14 +1051,12 @@ var DefaultButton = ({
|
|
|
1042
1051
|
} = attributes;
|
|
1043
1052
|
const intl = (0, import_react_intl6.useIntl)();
|
|
1044
1053
|
const label = (0, import_client_fetch5.getNodeLabel)(node);
|
|
1045
|
-
const { flowType } = (0, import_elements_react8.useOryFlow)();
|
|
1046
1054
|
const {
|
|
1047
1055
|
formState: { isSubmitting },
|
|
1048
1056
|
setValue
|
|
1049
|
-
} = (0,
|
|
1057
|
+
} = (0, import_react_hook_form3.useFormContext)();
|
|
1050
1058
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
1051
|
-
|
|
1052
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1053
1060
|
"button",
|
|
1054
1061
|
{
|
|
1055
1062
|
...rest,
|
|
@@ -1066,14 +1073,13 @@ var DefaultButton = ({
|
|
|
1066
1073
|
}
|
|
1067
1074
|
},
|
|
1068
1075
|
className: buttonStyles({
|
|
1069
|
-
intent: isPrimary ? "primary" : "secondary"
|
|
1070
|
-
size: isSmall ? "default" : "large"
|
|
1076
|
+
intent: isPrimary ? "primary" : "secondary"
|
|
1071
1077
|
}),
|
|
1072
1078
|
disabled: (_a = rest.disabled) != null ? _a : true,
|
|
1073
1079
|
"data-loading": isSubmitting,
|
|
1074
1080
|
children: [
|
|
1075
|
-
isSubmitting ? /* @__PURE__ */ (0,
|
|
1076
|
-
label ? (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) : ""
|
|
1081
|
+
isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner, {}) : null,
|
|
1082
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) }) : ""
|
|
1077
1083
|
]
|
|
1078
1084
|
}
|
|
1079
1085
|
);
|
|
@@ -1082,9 +1088,8 @@ DefaultButton.displayName = "DefaultButton";
|
|
|
1082
1088
|
|
|
1083
1089
|
// src/theme/default/components/form/checkbox.tsx
|
|
1084
1090
|
var import_client_fetch6 = require("@ory/client-fetch");
|
|
1085
|
-
var
|
|
1086
|
-
var
|
|
1087
|
-
var import_react_hook_form3 = require("react-hook-form");
|
|
1091
|
+
var import_elements_react8 = require("@ory/elements-react");
|
|
1092
|
+
var import_react_hook_form4 = require("react-hook-form");
|
|
1088
1093
|
var import_react_intl8 = require("react-intl");
|
|
1089
1094
|
|
|
1090
1095
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
@@ -1139,7 +1144,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1139
1144
|
};
|
|
1140
1145
|
|
|
1141
1146
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1142
|
-
var
|
|
1147
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1143
1148
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1144
1149
|
function computeLabelElements(labelText) {
|
|
1145
1150
|
const elements = [];
|
|
@@ -1155,13 +1160,13 @@ function computeLabelElements(labelText) {
|
|
|
1155
1160
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1156
1161
|
}
|
|
1157
1162
|
elements.push(
|
|
1158
|
-
/* @__PURE__ */ (0,
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1159
1164
|
"a",
|
|
1160
1165
|
{
|
|
1161
1166
|
href: url,
|
|
1162
1167
|
target: "_blank",
|
|
1163
1168
|
rel: "noopener noreferrer",
|
|
1164
|
-
className: "text-
|
|
1169
|
+
className: "text-button-link-brand-brand hover:text-button-link-brand-brand-hover underline",
|
|
1165
1170
|
children: linkText
|
|
1166
1171
|
},
|
|
1167
1172
|
matchStart
|
|
@@ -1180,39 +1185,29 @@ function CheckboxLabel({ label }) {
|
|
|
1180
1185
|
return null;
|
|
1181
1186
|
}
|
|
1182
1187
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1183
|
-
return /* @__PURE__ */ (0,
|
|
1188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: computeLabelElements(labelText) });
|
|
1184
1189
|
}
|
|
1185
1190
|
|
|
1186
1191
|
// src/theme/default/components/form/checkbox.tsx
|
|
1187
|
-
var
|
|
1192
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1188
1193
|
function CheckboxSVG() {
|
|
1189
|
-
return /* @__PURE__ */ (0,
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1190
1195
|
"svg",
|
|
1191
1196
|
{
|
|
1192
|
-
className: "absolute
|
|
1197
|
+
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
1193
1198
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1194
1199
|
width: "16",
|
|
1195
1200
|
height: "16",
|
|
1196
1201
|
viewBox: "0 0 16 16",
|
|
1197
1202
|
fill: "none",
|
|
1198
|
-
children:
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1207
|
-
"path",
|
|
1208
|
-
{
|
|
1209
|
-
fillRule: "evenodd",
|
|
1210
|
-
clipRule: "evenodd",
|
|
1211
|
-
d: "M11.6464 5.14645C11.8417 4.95118 12.1583 4.95118 12.3536 5.14645C12.5338 5.32669 12.5477 5.6103 12.3951 5.80645L12.3536 5.85355L7.35355 10.8536C7.17331 11.0338 6.8897 11.0477 6.69355 10.8951L6.64645 10.8536L4.14645 8.35355C3.95118 8.15829 3.95118 7.84171 4.14645 7.64645C4.32669 7.4662 4.6103 7.45234 4.80645 7.60485L4.85355 7.64645L7 9.7925L11.6464 5.14645Z",
|
|
1212
|
-
fill: "white"
|
|
1213
|
-
}
|
|
1214
|
-
)
|
|
1215
|
-
]
|
|
1203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1204
|
+
"path",
|
|
1205
|
+
{
|
|
1206
|
+
fillRule: "evenodd",
|
|
1207
|
+
clipRule: "evenodd",
|
|
1208
|
+
d: "M11.6464 5.14645C11.8417 4.95118 12.1583 4.95118 12.3536 5.14645C12.5338 5.32669 12.5477 5.6103 12.3951 5.80645L12.3536 5.85355L7.35355 10.8536C7.17331 11.0338 6.8897 11.0477 6.69355 10.8951L6.64645 10.8536L4.14645 8.35355C3.95118 8.15829 3.95118 7.84171 4.14645 7.64645C4.32669 7.4662 4.6103 7.45234 4.80645 7.60485L4.85355 7.64645L7 9.7925L11.6464 5.14645Z"
|
|
1209
|
+
}
|
|
1210
|
+
)
|
|
1216
1211
|
}
|
|
1217
1212
|
);
|
|
1218
1213
|
}
|
|
@@ -1232,82 +1227,75 @@ var DefaultCheckbox = ({
|
|
|
1232
1227
|
} = initialAttributes;
|
|
1233
1228
|
const intl = (0, import_react_intl8.useIntl)();
|
|
1234
1229
|
const label = (0, import_client_fetch6.getNodeLabel)(node);
|
|
1235
|
-
const
|
|
1236
|
-
const
|
|
1237
|
-
return /* @__PURE__ */ (0,
|
|
1238
|
-
"
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
"
|
|
1248
|
-
|
|
1249
|
-
...attributes,
|
|
1250
|
-
checked,
|
|
1251
|
-
value: 1,
|
|
1252
|
-
type: "checkbox",
|
|
1253
|
-
className: cn(
|
|
1254
|
-
"peer w-4 h-4 border appearance-none rounded-border-radius-buttons",
|
|
1255
|
-
!checked && "bg-forms-checkbox-bg-default border-forms-checkbox-border-default",
|
|
1256
|
-
checked && "bg-forms-checkbox-bg-checked border-forms-checkbox-border-checked"
|
|
1257
|
-
),
|
|
1258
|
-
...register(name, { value })
|
|
1259
|
-
}
|
|
1230
|
+
const { register } = (0, import_react_hook_form4.useForm)();
|
|
1231
|
+
const hasError = node.messages.some((m) => m.type === "error");
|
|
1232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "flex h-5 items-center", children: [
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1235
|
+
"input",
|
|
1236
|
+
{
|
|
1237
|
+
...attributes,
|
|
1238
|
+
value: 1,
|
|
1239
|
+
defaultChecked: Boolean(value),
|
|
1240
|
+
type: "checkbox",
|
|
1241
|
+
className: cn(
|
|
1242
|
+
"peer size-4 border appearance-none rounded-forms bg-checkbox-background-default border-checkbox-border-checkbox-border-default checked:bg-checkbox-background-checked checked:border-checkbox-border-checkbox-border-checked",
|
|
1243
|
+
hasError && "border-interface-border-validation-danger"
|
|
1260
1244
|
),
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1245
|
+
...register(name, { value })
|
|
1246
|
+
}
|
|
1247
|
+
),
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CheckboxSVG, {})
|
|
1249
|
+
] }),
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "flex flex-col", children: [
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CheckboxLabel, { label }) }),
|
|
1252
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1253
|
+
"span",
|
|
1254
|
+
{
|
|
1255
|
+
className: cn(
|
|
1256
|
+
"mt-1",
|
|
1257
|
+
message.type === "error" ? "text-interface-foreground-validation-danger" : "text-interface-foreground-default-secondary"
|
|
1258
|
+
),
|
|
1259
|
+
...(0, import_elements_react8.messageTestId)(message),
|
|
1260
|
+
children: (0, import_elements_react8.uiTextToFormattedMessage)(message, intl)
|
|
1261
|
+
},
|
|
1262
|
+
message.id
|
|
1263
|
+
))
|
|
1264
|
+
] })
|
|
1265
|
+
] });
|
|
1278
1266
|
};
|
|
1279
1267
|
|
|
1280
1268
|
// src/theme/default/components/form/group-container.tsx
|
|
1281
|
-
var
|
|
1269
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1282
1270
|
function DefaultGroupContainer({ children }) {
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-1 gap-8", children });
|
|
1284
1272
|
}
|
|
1285
1273
|
|
|
1286
1274
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1287
|
-
var
|
|
1275
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1288
1276
|
function DefaultHorizontalDivider() {
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("hr", { className: "border-interface-border-default-primary" });
|
|
1290
1278
|
}
|
|
1291
1279
|
|
|
1292
1280
|
// src/theme/default/components/form/image.tsx
|
|
1293
|
-
var
|
|
1281
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1294
1282
|
function DefaultImage({ attributes }) {
|
|
1295
|
-
return /* @__PURE__ */ (0,
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { ...attributes }) });
|
|
1296
1284
|
}
|
|
1297
1285
|
|
|
1298
1286
|
// src/theme/default/components/form/input.tsx
|
|
1299
1287
|
var import_client_fetch7 = require("@ory/client-fetch");
|
|
1300
|
-
var
|
|
1301
|
-
var
|
|
1288
|
+
var import_elements_react9 = require("@ory/elements-react");
|
|
1289
|
+
var import_react_hook_form5 = require("react-hook-form");
|
|
1302
1290
|
var import_react_intl9 = require("react-intl");
|
|
1303
|
-
var
|
|
1291
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1304
1292
|
var DefaultInput = ({
|
|
1305
1293
|
node,
|
|
1306
1294
|
attributes,
|
|
1307
1295
|
onClick
|
|
1308
1296
|
}) => {
|
|
1309
1297
|
const label = (0, import_client_fetch7.getNodeLabel)(node);
|
|
1310
|
-
const { register } = (0,
|
|
1298
|
+
const { register } = (0, import_react_hook_form5.useFormContext)();
|
|
1311
1299
|
const {
|
|
1312
1300
|
value,
|
|
1313
1301
|
autocomplete,
|
|
@@ -1317,17 +1305,17 @@ var DefaultInput = ({
|
|
|
1317
1305
|
...rest
|
|
1318
1306
|
} = attributes;
|
|
1319
1307
|
const intl = (0, import_react_intl9.useIntl)();
|
|
1320
|
-
const { flowType } = (0,
|
|
1308
|
+
const { flowType } = (0, import_elements_react9.useOryFlow)();
|
|
1321
1309
|
const formattedLabel = label ? intl.formatMessage(
|
|
1322
1310
|
{
|
|
1323
1311
|
id: "input.placeholder",
|
|
1324
1312
|
defaultMessage: "Enter your {placeholder}"
|
|
1325
1313
|
},
|
|
1326
1314
|
{
|
|
1327
|
-
placeholder: (0,
|
|
1315
|
+
placeholder: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl)
|
|
1328
1316
|
}
|
|
1329
1317
|
) : "";
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1331
1319
|
"input",
|
|
1332
1320
|
{
|
|
1333
1321
|
...rest,
|
|
@@ -1336,10 +1324,14 @@ var DefaultInput = ({
|
|
|
1336
1324
|
autoComplete: autocomplete,
|
|
1337
1325
|
placeholder: formattedLabel,
|
|
1338
1326
|
className: cn(
|
|
1339
|
-
"antialiased
|
|
1340
|
-
"
|
|
1327
|
+
"antialiased rounded-forms border leading-tight transition-colors placeholder:h-[20px] placeholder:text-input-foreground-tertiary focus-visible:outline-none focus:ring-0",
|
|
1328
|
+
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
1329
|
+
"disabled:bg-input-background-disabled disabled:border-input-border-disabled disabled:text-input-foreground-disabled",
|
|
1330
|
+
"focus:border-input-border-focus focus-visible:border-input-border-focus",
|
|
1331
|
+
"hover:bg-input-background-hover hover:border-input-border-hover",
|
|
1332
|
+
"px-4 py-[13px]",
|
|
1341
1333
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1342
|
-
flowType === import_client_fetch7.FlowType.Settings
|
|
1334
|
+
flowType === import_client_fetch7.FlowType.Settings && "max-w-[488px]"
|
|
1343
1335
|
),
|
|
1344
1336
|
...register(name, { value })
|
|
1345
1337
|
}
|
|
@@ -1348,10 +1340,10 @@ var DefaultInput = ({
|
|
|
1348
1340
|
|
|
1349
1341
|
// src/theme/default/components/form/label.tsx
|
|
1350
1342
|
var import_client_fetch8 = require("@ory/client-fetch");
|
|
1351
|
-
var
|
|
1352
|
-
var
|
|
1343
|
+
var import_elements_react10 = require("@ory/elements-react");
|
|
1344
|
+
var import_react_hook_form6 = require("react-hook-form");
|
|
1353
1345
|
var import_react_intl10 = require("react-intl");
|
|
1354
|
-
var
|
|
1346
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1355
1347
|
function findResendNode(nodes) {
|
|
1356
1348
|
return nodes.find(
|
|
1357
1349
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1365,9 +1357,9 @@ function DefaultLabel({
|
|
|
1365
1357
|
}) {
|
|
1366
1358
|
const intl = (0, import_react_intl10.useIntl)();
|
|
1367
1359
|
const label = (0, import_client_fetch8.getNodeLabel)(node);
|
|
1368
|
-
const { Message } = (0,
|
|
1369
|
-
const { config, flowType, flow } = (0,
|
|
1370
|
-
const { setValue, formState } = (0,
|
|
1360
|
+
const { Message } = (0, import_elements_react10.useComponents)();
|
|
1361
|
+
const { config, flowType, flow } = (0, import_elements_react10.useOryFlow)();
|
|
1362
|
+
const { setValue, formState } = (0, import_react_hook_form6.useFormContext)();
|
|
1371
1363
|
const isPassword = attributes.type === "password";
|
|
1372
1364
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
1373
1365
|
const handleResend = () => {
|
|
@@ -1376,80 +1368,80 @@ function DefaultLabel({
|
|
|
1376
1368
|
}
|
|
1377
1369
|
};
|
|
1378
1370
|
const fieldError = formState.errors[attributes.name];
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1380
|
-
label && /* @__PURE__ */ (0,
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
1371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1372
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1382
1374
|
"label",
|
|
1383
1375
|
{
|
|
1384
|
-
...(0,
|
|
1385
|
-
className: "
|
|
1376
|
+
...(0, import_elements_react10.messageTestId)(label),
|
|
1377
|
+
className: "leading-normal text-input-foreground-primary",
|
|
1386
1378
|
htmlFor: attributes.name,
|
|
1387
1379
|
...rest,
|
|
1388
|
-
children: (0,
|
|
1380
|
+
children: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
|
|
1389
1381
|
}
|
|
1390
1382
|
),
|
|
1391
1383
|
isPassword && config.project.recovery_enabled && flowType === import_client_fetch8.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1393
1385
|
"a",
|
|
1394
1386
|
{
|
|
1395
1387
|
href: config.project.recovery_ui_url,
|
|
1396
|
-
className: "text-
|
|
1388
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
1397
1389
|
children: intl.formatMessage({
|
|
1398
1390
|
id: "forms.label.forgot-password",
|
|
1399
1391
|
defaultMessage: "Forgot password?"
|
|
1400
1392
|
})
|
|
1401
1393
|
}
|
|
1402
1394
|
),
|
|
1403
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0,
|
|
1395
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1404
1396
|
"button",
|
|
1405
1397
|
{
|
|
1406
1398
|
type: "submit",
|
|
1407
1399
|
name: resendNode.attributes.name,
|
|
1408
1400
|
value: resendNode.attributes.value,
|
|
1409
1401
|
onClick: handleResend,
|
|
1410
|
-
className: "text-
|
|
1402
|
+
className: "cursor-pointer text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
1411
1403
|
children: intl.formatMessage({ id: "identities.messages.1070008" })
|
|
1412
1404
|
}
|
|
1413
1405
|
)
|
|
1414
1406
|
] }),
|
|
1415
1407
|
children,
|
|
1416
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
1417
|
-
fieldError && (0, import_client_fetch8.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0,
|
|
1408
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message.Content, { message }, message.id)),
|
|
1409
|
+
fieldError && (0, import_client_fetch8.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message.Content, { message: fieldError })
|
|
1418
1410
|
] });
|
|
1419
1411
|
}
|
|
1420
1412
|
|
|
1421
1413
|
// src/theme/default/components/form/link-button.tsx
|
|
1422
1414
|
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1415
|
+
var import_elements_react11 = require("@ory/elements-react");
|
|
1416
|
+
var import_react = require("react");
|
|
1425
1417
|
var import_react_intl11 = require("react-intl");
|
|
1426
|
-
var
|
|
1427
|
-
var DefaultLinkButton = (0,
|
|
1418
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1419
|
+
var DefaultLinkButton = (0, import_react.forwardRef)(({ attributes, node }, ref) => {
|
|
1428
1420
|
const intl = (0, import_react_intl11.useIntl)();
|
|
1429
1421
|
const label = (0, import_client_fetch9.getNodeLabel)(node);
|
|
1430
|
-
return /* @__PURE__ */ (0,
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1431
1423
|
"a",
|
|
1432
1424
|
{
|
|
1433
1425
|
...attributes,
|
|
1434
1426
|
ref,
|
|
1435
|
-
title: label ? (0,
|
|
1427
|
+
title: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : "",
|
|
1436
1428
|
className: cn(
|
|
1437
|
-
"antialiased rounded cursor-pointer text-center border
|
|
1429
|
+
"antialiased rounded cursor-pointer text-center border gap-3 leading-none bg-button-primary-background-default hover:bg-button-primary-background-hover transition-colors text-button-primary-foreground-default hover:text-button-primary-foreground-hover p-4 font-medium"
|
|
1438
1430
|
),
|
|
1439
|
-
children: label ? (0,
|
|
1431
|
+
children: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : ""
|
|
1440
1432
|
}
|
|
1441
1433
|
);
|
|
1442
1434
|
});
|
|
1443
1435
|
DefaultLinkButton.displayName = "DefaultLinkButton";
|
|
1444
1436
|
|
|
1445
1437
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1446
|
-
var
|
|
1438
|
+
var import_react_hook_form7 = require("react-hook-form");
|
|
1447
1439
|
|
|
1448
1440
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1449
1441
|
var import_input_otp = require("input-otp");
|
|
1450
1442
|
var React21 = __toESM(require("react"));
|
|
1451
|
-
var
|
|
1452
|
-
var InputOTP = React21.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1443
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1444
|
+
var InputOTP = React21.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1453
1445
|
import_input_otp.OTPInput,
|
|
1454
1446
|
{
|
|
1455
1447
|
ref,
|
|
@@ -1462,24 +1454,25 @@ var InputOTP = React21.forwardRef(({ className, containerClassName, ...props },
|
|
|
1462
1454
|
}
|
|
1463
1455
|
));
|
|
1464
1456
|
InputOTP.displayName = "InputOTP";
|
|
1465
|
-
var InputOTPGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1457
|
+
var InputOTPGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1466
1458
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1467
1459
|
var InputOTPSlot = React21.forwardRef(({ index, className, ...props }, ref) => {
|
|
1468
1460
|
const inputOTPContext = React21.useContext(import_input_otp.OTPInputContext);
|
|
1469
1461
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1471
1463
|
"div",
|
|
1472
1464
|
{
|
|
1473
1465
|
ref,
|
|
1474
1466
|
className: cn(
|
|
1475
|
-
"
|
|
1476
|
-
|
|
1467
|
+
"rounded-forms border border-solid bg-input-background-default py-[15px] text-center focus-visible:outline-none w-full",
|
|
1468
|
+
"relative flex items-center justify-center transition-all leading-none",
|
|
1469
|
+
isActive ? "border-input-border-focus" : "border-input-border-default",
|
|
1477
1470
|
className
|
|
1478
1471
|
),
|
|
1479
1472
|
...props,
|
|
1480
1473
|
children: [
|
|
1481
|
-
char,
|
|
1482
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "inline-block size-4", children: char }),
|
|
1475
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
1483
1476
|
]
|
|
1484
1477
|
}
|
|
1485
1478
|
);
|
|
@@ -1487,66 +1480,97 @@ var InputOTPSlot = React21.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1487
1480
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1488
1481
|
|
|
1489
1482
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1490
|
-
var
|
|
1483
|
+
var import_elements_react12 = require("@ory/elements-react");
|
|
1484
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
1485
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1491
1486
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1492
|
-
const { setValue, watch } = (0,
|
|
1487
|
+
const { setValue, watch } = (0, import_react_hook_form7.useFormContext)();
|
|
1493
1488
|
const { maxlength, name } = attributes;
|
|
1494
1489
|
const elements = maxlength != null ? maxlength : 6;
|
|
1490
|
+
const { flowType } = (0, import_elements_react12.useOryFlow)();
|
|
1495
1491
|
const handleInputChange = (v) => {
|
|
1496
1492
|
setValue(name, v);
|
|
1497
1493
|
};
|
|
1498
1494
|
const value = watch(name);
|
|
1499
|
-
return /* @__PURE__ */ (0,
|
|
1495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1500
1496
|
InputOTP,
|
|
1501
1497
|
{
|
|
1502
1498
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1503
1499
|
onChange: handleInputChange,
|
|
1504
1500
|
name,
|
|
1505
1501
|
value,
|
|
1506
|
-
children: /* @__PURE__ */ (0,
|
|
1507
|
-
|
|
1502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1503
|
+
InputOTPGroup,
|
|
1508
1504
|
{
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1505
|
+
className: cn(
|
|
1506
|
+
"w-full flex gap-2 justify-stretch",
|
|
1507
|
+
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1508
|
+
flowType === import_client_fetch10.FlowType.Settings && "max-w-[488px]"
|
|
1509
|
+
),
|
|
1510
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(InputOTPSlot, { index }, index))
|
|
1511
|
+
}
|
|
1512
|
+
)
|
|
1514
1513
|
}
|
|
1515
1514
|
);
|
|
1516
1515
|
};
|
|
1517
1516
|
|
|
1518
1517
|
// src/theme/default/components/form/section.tsx
|
|
1519
|
-
var
|
|
1520
|
-
var DefaultFormSection = ({
|
|
1521
|
-
|
|
1518
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1519
|
+
var DefaultFormSection = ({
|
|
1520
|
+
children,
|
|
1521
|
+
nodes: _nodes,
|
|
1522
|
+
...rest
|
|
1523
|
+
}) => {
|
|
1524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1525
|
+
"form",
|
|
1526
|
+
{
|
|
1527
|
+
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
1528
|
+
...rest,
|
|
1529
|
+
children
|
|
1530
|
+
}
|
|
1531
|
+
);
|
|
1522
1532
|
};
|
|
1523
1533
|
var DefaultFormSectionContent = ({
|
|
1524
1534
|
title,
|
|
1525
1535
|
description,
|
|
1526
1536
|
children
|
|
1527
1537
|
}) => {
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1530
|
-
/* @__PURE__ */ (0,
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-8 rounded-t-xl border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1532
1542
|
] }),
|
|
1533
1543
|
children
|
|
1534
1544
|
] });
|
|
1535
1545
|
};
|
|
1536
|
-
var DefaultFormSectionFooter = ({
|
|
1537
|
-
|
|
1546
|
+
var DefaultFormSectionFooter = ({
|
|
1547
|
+
children,
|
|
1548
|
+
text
|
|
1549
|
+
}) => {
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
1551
|
+
"div",
|
|
1552
|
+
{
|
|
1553
|
+
className: cn(
|
|
1554
|
+
"flex min-h-[72px] items-center justify-between gap-2 rounded-b-xl border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
|
|
1555
|
+
),
|
|
1556
|
+
children: [
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: text }),
|
|
1558
|
+
children
|
|
1559
|
+
]
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1538
1562
|
};
|
|
1539
1563
|
|
|
1540
1564
|
// src/theme/default/components/form/text.tsx
|
|
1541
1565
|
var import_elements_react13 = require("@ory/elements-react");
|
|
1542
1566
|
var import_react_intl12 = require("react-intl");
|
|
1543
|
-
var
|
|
1567
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1544
1568
|
function DefaultText({ node, attributes }) {
|
|
1545
1569
|
var _a;
|
|
1546
1570
|
const intl = (0, import_react_intl12.useIntl)();
|
|
1547
|
-
return /* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1549
|
-
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0,
|
|
1571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { "data-testid": `node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
1573
|
+
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" }) }, index))
|
|
1550
1574
|
] });
|
|
1551
1575
|
}
|
|
1552
1576
|
|
|
@@ -1555,13 +1579,13 @@ var import_elements_react15 = require("@ory/elements-react");
|
|
|
1555
1579
|
|
|
1556
1580
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1557
1581
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
1558
|
-
var
|
|
1582
|
+
var import_react4 = require("react");
|
|
1559
1583
|
var import_elements_react14 = require("@ory/elements-react");
|
|
1560
1584
|
|
|
1561
1585
|
// src/util/client.ts
|
|
1562
|
-
var
|
|
1586
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
1563
1587
|
function frontendClient(sdkUrl, opts = {}) {
|
|
1564
|
-
const config = new
|
|
1588
|
+
const config = new import_client_fetch11.Configuration({
|
|
1565
1589
|
...opts,
|
|
1566
1590
|
basePath: sdkUrl,
|
|
1567
1591
|
headers: {
|
|
@@ -1569,37 +1593,40 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
1569
1593
|
...opts.headers
|
|
1570
1594
|
}
|
|
1571
1595
|
});
|
|
1572
|
-
return new
|
|
1596
|
+
return new import_client_fetch11.FrontendApi(config);
|
|
1573
1597
|
}
|
|
1574
1598
|
|
|
1575
1599
|
// src/theme/default/assets/icons/logout.svg
|
|
1576
1600
|
var React22 = __toESM(require("react"));
|
|
1577
|
-
var
|
|
1601
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1578
1602
|
var SvgLogout = (props) => {
|
|
1579
1603
|
var _a, _b;
|
|
1580
|
-
return /* @__PURE__ */ (0,
|
|
1604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", 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_runtime45.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
1581
1605
|
};
|
|
1582
1606
|
var logout_default = SvgLogout;
|
|
1583
1607
|
|
|
1584
1608
|
// src/theme/default/assets/icons/settings.svg
|
|
1585
1609
|
var React23 = __toESM(require("react"));
|
|
1586
|
-
var
|
|
1610
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1587
1611
|
var SvgSettings = (props) => {
|
|
1588
1612
|
var _a, _b;
|
|
1589
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
-
/* @__PURE__ */ (0,
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", 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_runtime46.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1592
1616
|
] }) });
|
|
1593
1617
|
};
|
|
1594
1618
|
var settings_default = SvgSettings;
|
|
1595
1619
|
|
|
1596
1620
|
// src/theme/default/utils/user.ts
|
|
1621
|
+
function isTraitsIndexable(traits) {
|
|
1622
|
+
return typeof traits === "object" && traits !== null;
|
|
1623
|
+
}
|
|
1597
1624
|
var getUserInitials = (session) => {
|
|
1598
1625
|
var _a, _b;
|
|
1599
1626
|
const avatar = "";
|
|
1600
1627
|
let primary = "";
|
|
1601
1628
|
let secondary = "";
|
|
1602
|
-
if (!((_a = session == null ? void 0 : session.identity) == null ? void 0 : _a.traits)) {
|
|
1629
|
+
if (!((_a = session == null ? void 0 : session.identity) == null ? void 0 : _a.traits) || !isTraitsIndexable(session.identity.traits)) {
|
|
1603
1630
|
return {
|
|
1604
1631
|
primary,
|
|
1605
1632
|
secondary,
|
|
@@ -1607,14 +1634,14 @@ var getUserInitials = (session) => {
|
|
|
1607
1634
|
};
|
|
1608
1635
|
}
|
|
1609
1636
|
const traits = (_b = session.identity) == null ? void 0 : _b.traits;
|
|
1610
|
-
if (traits.email) {
|
|
1637
|
+
if (traits.email && typeof traits.email === "string") {
|
|
1611
1638
|
secondary = traits.email;
|
|
1612
1639
|
}
|
|
1613
1640
|
if (traits.name) {
|
|
1614
1641
|
if (typeof traits.name === "string") {
|
|
1615
1642
|
primary = traits.name;
|
|
1616
1643
|
}
|
|
1617
|
-
if (traits.name.first && traits.name.last) {
|
|
1644
|
+
if (typeof traits.name === "object" && traits.name && traits.name.first && traits.name.last) {
|
|
1618
1645
|
primary = traits.name.first + " " + traits.name.last;
|
|
1619
1646
|
}
|
|
1620
1647
|
}
|
|
@@ -1630,12 +1657,12 @@ var getUserInitials = (session) => {
|
|
|
1630
1657
|
};
|
|
1631
1658
|
|
|
1632
1659
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1633
|
-
var
|
|
1660
|
+
var import_react2 = require("react");
|
|
1634
1661
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1635
|
-
var
|
|
1662
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1636
1663
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1637
1664
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1638
|
-
var DropdownMenuContent = (0,
|
|
1665
|
+
var DropdownMenuContent = (0, import_react2.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1639
1666
|
DropdownMenuPrimitive.Content,
|
|
1640
1667
|
{
|
|
1641
1668
|
ref,
|
|
@@ -1643,24 +1670,24 @@ var DropdownMenuContent = (0, import_react3.forwardRef)(({ className, sideOffset
|
|
|
1643
1670
|
align: "end",
|
|
1644
1671
|
className: cn(
|
|
1645
1672
|
"z-50 min-w-[19rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1646
|
-
"border border-
|
|
1673
|
+
"border border-interface-border-default-primary bg-interface-background-default-primary rounded-cards",
|
|
1647
1674
|
className
|
|
1648
1675
|
),
|
|
1649
1676
|
...props
|
|
1650
1677
|
}
|
|
1651
1678
|
) }));
|
|
1652
1679
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1653
|
-
var DropdownMenuItem = (0,
|
|
1680
|
+
var DropdownMenuItem = (0, import_react2.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1654
1681
|
DropdownMenuPrimitive.Item,
|
|
1655
1682
|
{
|
|
1656
1683
|
ref,
|
|
1657
1684
|
className: cn(
|
|
1658
1685
|
"relative flex cursor-pointer select-none items-center outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
1659
1686
|
"px-8 py-3 lg:py-4.5 text-sm gap-6",
|
|
1660
|
-
"first:border-0 border-t border-button-secondary-border-default hover:border-button-social-border-hover
|
|
1661
|
-
"text-button-secondary-
|
|
1662
|
-
"hover:text-button-secondary-
|
|
1663
|
-
"data-[disabled]:text-button-secondary-
|
|
1687
|
+
"first:border-0 border-t border-button-secondary-border-default hover:border-button-social-border-hover",
|
|
1688
|
+
"text-button-secondary-foreground-default bg-button-secondary-background-default",
|
|
1689
|
+
"hover:text-button-secondary-foreground-hover hover:bg-button-secondary-background-hover",
|
|
1690
|
+
"data-[disabled]:text-button-secondary-foreground-disabled data-[disabled]:bg-button-secondary-background-disabled",
|
|
1664
1691
|
inset && "pl-8",
|
|
1665
1692
|
className
|
|
1666
1693
|
),
|
|
@@ -1668,7 +1695,7 @@ var DropdownMenuItem = (0, import_react3.forwardRef)(({ className, inset, ...pro
|
|
|
1668
1695
|
}
|
|
1669
1696
|
));
|
|
1670
1697
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1671
|
-
var DropdownMenuLabel = (0,
|
|
1698
|
+
var DropdownMenuLabel = (0, import_react2.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1672
1699
|
DropdownMenuPrimitive.Label,
|
|
1673
1700
|
{
|
|
1674
1701
|
ref,
|
|
@@ -1683,35 +1710,41 @@ var DropdownMenuLabel = (0, import_react3.forwardRef)(({ className, inset, ...pr
|
|
|
1683
1710
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1684
1711
|
|
|
1685
1712
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1686
|
-
var
|
|
1713
|
+
var import_react3 = require("react");
|
|
1687
1714
|
|
|
1688
1715
|
// src/theme/default/assets/icons/user.svg
|
|
1689
1716
|
var React24 = __toESM(require("react"));
|
|
1690
|
-
var
|
|
1717
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1691
1718
|
var SvgUser = (props) => {
|
|
1692
1719
|
var _a, _b;
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
1720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("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: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
1694
1721
|
};
|
|
1695
1722
|
var user_default = SvgUser;
|
|
1696
1723
|
|
|
1697
1724
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1698
|
-
var
|
|
1699
|
-
var UserAvatar = (0,
|
|
1725
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1726
|
+
var UserAvatar = (0, import_react3.forwardRef)(
|
|
1700
1727
|
({ initials, ...rest }, ref) => {
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1702
1729
|
"button",
|
|
1703
1730
|
{
|
|
1704
1731
|
ref,
|
|
1705
|
-
className: "
|
|
1732
|
+
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-full bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
1706
1733
|
...rest,
|
|
1707
|
-
children: /* @__PURE__ */ (0,
|
|
1734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1708
1735
|
"img",
|
|
1709
1736
|
{
|
|
1710
1737
|
src: initials.avatar,
|
|
1711
1738
|
alt: initials.primary,
|
|
1712
1739
|
className: "w-full object-contain"
|
|
1713
1740
|
}
|
|
1714
|
-
) : /* @__PURE__ */ (0,
|
|
1741
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1742
|
+
user_default,
|
|
1743
|
+
{
|
|
1744
|
+
size: 24,
|
|
1745
|
+
className: "text-button-primary-foreground-default"
|
|
1746
|
+
}
|
|
1747
|
+
) })
|
|
1715
1748
|
}
|
|
1716
1749
|
);
|
|
1717
1750
|
}
|
|
@@ -1719,34 +1752,34 @@ var UserAvatar = (0, import_react4.forwardRef)(
|
|
|
1719
1752
|
UserAvatar.displayName = "UserAvatar";
|
|
1720
1753
|
|
|
1721
1754
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1722
|
-
var
|
|
1755
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1723
1756
|
var UserMenu = ({ session }) => {
|
|
1724
1757
|
const { config } = (0, import_elements_react14.useOryFlow)();
|
|
1725
1758
|
const initials = getUserInitials(session);
|
|
1726
|
-
const [logoutFlow, setLogoutFlow] = (0,
|
|
1727
|
-
const fetchLogoutFlow = (0,
|
|
1759
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react4.useState)();
|
|
1760
|
+
const fetchLogoutFlow = (0, import_react4.useCallback)(async () => {
|
|
1728
1761
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1729
1762
|
setLogoutFlow(flow);
|
|
1730
1763
|
}, [config.sdk.url]);
|
|
1731
|
-
(0,
|
|
1764
|
+
(0, import_react4.useEffect)(() => {
|
|
1732
1765
|
void fetchLogoutFlow();
|
|
1733
1766
|
}, [fetchLogoutFlow]);
|
|
1734
|
-
return /* @__PURE__ */ (0,
|
|
1735
|
-
/* @__PURE__ */ (0,
|
|
1736
|
-
/* @__PURE__ */ (0,
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
1738
|
-
/* @__PURE__ */ (0,
|
|
1739
|
-
/* @__PURE__ */ (0,
|
|
1740
|
-
/* @__PURE__ */ (0,
|
|
1741
|
-
initials.secondary && /* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(DropdownMenu, { children: [
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserAvatar, { initials }) }),
|
|
1769
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(DropdownMenuContent, { children: [
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserAvatar, { disabled: true, initials }),
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
1774
|
+
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
1742
1775
|
] })
|
|
1743
1776
|
] }),
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("a", { href: "/settings", children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(settings_default, { size: 16 }),
|
|
1746
1779
|
" User settings"
|
|
1747
1780
|
] }) }),
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(logout_default, { size: 16 }),
|
|
1750
1783
|
" Logout"
|
|
1751
1784
|
] }) })
|
|
1752
1785
|
] })
|
|
@@ -1755,73 +1788,78 @@ var UserMenu = ({ session }) => {
|
|
|
1755
1788
|
|
|
1756
1789
|
// src/theme/default/components/generic/page-header.tsx
|
|
1757
1790
|
var import_client2 = require("@ory/elements-react/client");
|
|
1758
|
-
var
|
|
1791
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1759
1792
|
var DefaultPageHeader = (_props) => {
|
|
1760
1793
|
const { Card } = (0, import_elements_react15.useComponents)();
|
|
1761
1794
|
const { session } = (0, import_client2.useSession)();
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1763
|
-
/* @__PURE__ */ (0,
|
|
1764
|
-
/* @__PURE__ */ (0,
|
|
1795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mt-16 flex w-full max-w-[896px] flex-col gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
|
|
1796
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Card.Logo, {}) }),
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(UserMenu, { session })
|
|
1765
1798
|
] }) }) });
|
|
1766
1799
|
};
|
|
1767
1800
|
|
|
1768
1801
|
// src/theme/default/assets/icons/trash.svg
|
|
1769
1802
|
var React25 = __toESM(require("react"));
|
|
1770
|
-
var
|
|
1803
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1771
1804
|
var SvgTrash = (props) => {
|
|
1772
1805
|
var _a, _b;
|
|
1773
|
-
return /* @__PURE__ */ (0,
|
|
1806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("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: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
1774
1807
|
};
|
|
1775
1808
|
var trash_default = SvgTrash;
|
|
1776
1809
|
|
|
1777
1810
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1778
|
-
var
|
|
1779
|
-
var
|
|
1811
|
+
var import_react_hook_form8 = require("react-hook-form");
|
|
1812
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1780
1813
|
function DefaultSettingsOidc({
|
|
1781
1814
|
linkButtons,
|
|
1782
1815
|
unlinkButtons
|
|
1783
1816
|
}) {
|
|
1784
1817
|
const hasLinkButtons = linkButtons.length > 0;
|
|
1785
1818
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1786
|
-
const {
|
|
1787
|
-
|
|
1788
|
-
|
|
1819
|
+
const {
|
|
1820
|
+
formState: { isSubmitting }
|
|
1821
|
+
} = (0, import_react_hook_form8.useFormContext)();
|
|
1822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1823
|
+
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
1789
1824
|
const attrs = button.attributes;
|
|
1790
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1791
1826
|
DefaultButtonSocial,
|
|
1792
1827
|
{
|
|
1793
|
-
showLabel:
|
|
1828
|
+
showLabel: true,
|
|
1794
1829
|
node: button,
|
|
1795
1830
|
attributes: attrs,
|
|
1796
|
-
onClick:
|
|
1797
|
-
setValue("link", attrs.value);
|
|
1798
|
-
setValue("method", "oidc");
|
|
1799
|
-
}
|
|
1831
|
+
onClick: button.onClick
|
|
1800
1832
|
},
|
|
1801
1833
|
attrs.value
|
|
1802
1834
|
);
|
|
1803
1835
|
}) }),
|
|
1804
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0,
|
|
1836
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
1805
1837
|
unlinkButtons.map((button) => {
|
|
1806
1838
|
var _a, _b;
|
|
1807
1839
|
const attrs = button.attributes;
|
|
1808
1840
|
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1809
1841
|
const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
|
|
1810
|
-
return /* @__PURE__ */ (0,
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-between", children: [
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Logo, { size: 32 }),
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
1814
1846
|
] }),
|
|
1815
|
-
/* @__PURE__ */ (0,
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1816
1848
|
"button",
|
|
1817
1849
|
{
|
|
1818
1850
|
...attrs,
|
|
1819
1851
|
type: "submit",
|
|
1820
|
-
onClick:
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
}
|
|
1824
|
-
children: /* @__PURE__ */ (0,
|
|
1852
|
+
onClick: button.onClick,
|
|
1853
|
+
disabled: isSubmitting,
|
|
1854
|
+
className: "relative",
|
|
1855
|
+
title: `Unlink ${provider}`,
|
|
1856
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1857
|
+
trash_default,
|
|
1858
|
+
{
|
|
1859
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
1860
|
+
size: 24
|
|
1861
|
+
}
|
|
1862
|
+
)
|
|
1825
1863
|
}
|
|
1826
1864
|
)
|
|
1827
1865
|
] }, attrs.value);
|
|
@@ -1830,52 +1868,78 @@ function DefaultSettingsOidc({
|
|
|
1830
1868
|
}
|
|
1831
1869
|
|
|
1832
1870
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1833
|
-
var
|
|
1871
|
+
var import_elements_react16 = require("@ory/elements-react");
|
|
1872
|
+
var import_react_hook_form9 = require("react-hook-form");
|
|
1873
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1834
1874
|
function DefaultSettingsPasskey({
|
|
1835
1875
|
triggerButton,
|
|
1836
1876
|
removeButtons
|
|
1837
1877
|
}) {
|
|
1878
|
+
const {
|
|
1879
|
+
formState: { isSubmitting }
|
|
1880
|
+
} = (0, import_react_hook_form9.useFormContext)();
|
|
1881
|
+
const { Node } = (0, import_elements_react16.useComponents)();
|
|
1838
1882
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
1839
|
-
return /* @__PURE__ */ (0,
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1841
|
-
|
|
1883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1885
|
+
Node.Button,
|
|
1842
1886
|
{
|
|
1843
1887
|
node: triggerButton,
|
|
1844
1888
|
attributes: triggerButton.attributes,
|
|
1845
1889
|
onClick: triggerButton.onClick
|
|
1846
1890
|
}
|
|
1847
|
-
)
|
|
1848
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1891
|
+
) }),
|
|
1892
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DefaultHorizontalDivider, {}),
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1851
1895
|
var _a, _b;
|
|
1852
1896
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1853
1897
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
1854
|
-
const
|
|
1898
|
+
const displayName = "display_name" in context ? context.display_name : null;
|
|
1855
1899
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
1856
|
-
return /* @__PURE__ */ (0,
|
|
1900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
1857
1901
|
"div",
|
|
1858
1902
|
{
|
|
1859
|
-
className: "flex justify-between gap-6",
|
|
1903
|
+
className: "flex justify-between gap-6 md:items-center",
|
|
1860
1904
|
children: [
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
1906
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1907
|
+
passkey_default,
|
|
1908
|
+
{
|
|
1909
|
+
size: 32,
|
|
1910
|
+
className: "text-interface-foreground-default-primary"
|
|
1911
|
+
}
|
|
1912
|
+
),
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex-1 flex-col", children: [
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: displayName }),
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block", children: keyId })
|
|
1917
|
+
] }),
|
|
1918
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
1919
|
+
dateStyle: "long"
|
|
1920
|
+
}).format(new Date(addedAt)) })
|
|
1921
|
+
] })
|
|
1865
1922
|
] }),
|
|
1866
|
-
|
|
1867
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1868
1924
|
"button",
|
|
1869
1925
|
{
|
|
1870
1926
|
...node.attributes,
|
|
1871
1927
|
type: "submit",
|
|
1872
|
-
|
|
1873
|
-
|
|
1928
|
+
onClick: node.onClick,
|
|
1929
|
+
disabled: isSubmitting,
|
|
1930
|
+
className: "relative",
|
|
1931
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1932
|
+
trash_default,
|
|
1933
|
+
{
|
|
1934
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
1935
|
+
size: 24
|
|
1936
|
+
}
|
|
1937
|
+
)
|
|
1874
1938
|
}
|
|
1875
1939
|
)
|
|
1876
1940
|
]
|
|
1877
1941
|
},
|
|
1878
|
-
`
|
|
1942
|
+
`passkey-remove-button-${i}`
|
|
1879
1943
|
);
|
|
1880
1944
|
}) })
|
|
1881
1945
|
] }) : null
|
|
@@ -1884,41 +1948,47 @@ function DefaultSettingsPasskey({
|
|
|
1884
1948
|
|
|
1885
1949
|
// src/theme/default/assets/icons/download.svg
|
|
1886
1950
|
var React26 = __toESM(require("react"));
|
|
1887
|
-
var
|
|
1951
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1888
1952
|
var SvgDownload = (props) => {
|
|
1889
1953
|
var _a, _b;
|
|
1890
|
-
return /* @__PURE__ */ (0,
|
|
1954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
1891
1955
|
};
|
|
1892
1956
|
var download_default = SvgDownload;
|
|
1893
1957
|
|
|
1894
1958
|
// src/theme/default/assets/icons/eye.svg
|
|
1895
1959
|
var React27 = __toESM(require("react"));
|
|
1896
|
-
var
|
|
1960
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1897
1961
|
var SvgEye = (props) => {
|
|
1898
1962
|
var _a, _b;
|
|
1899
|
-
return /* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1902
1966
|
] }) });
|
|
1903
1967
|
};
|
|
1904
1968
|
var eye_default = SvgEye;
|
|
1905
1969
|
|
|
1906
1970
|
// src/theme/default/assets/icons/refresh.svg
|
|
1907
1971
|
var React28 = __toESM(require("react"));
|
|
1908
|
-
var
|
|
1972
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1909
1973
|
var SvgRefresh = (props) => {
|
|
1910
1974
|
var _a, _b;
|
|
1911
|
-
return /* @__PURE__ */ (0,
|
|
1975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
1912
1976
|
};
|
|
1913
1977
|
var refresh_default = SvgRefresh;
|
|
1914
1978
|
|
|
1915
1979
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
1916
|
-
var
|
|
1980
|
+
var import_react_hook_form10 = require("react-hook-form");
|
|
1981
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1917
1982
|
function DefaultSettingsRecoveryCodes({
|
|
1918
1983
|
codes,
|
|
1919
1984
|
regnerateButton,
|
|
1920
|
-
revealButton
|
|
1985
|
+
revealButton,
|
|
1986
|
+
onRegenerate,
|
|
1987
|
+
onReveal
|
|
1921
1988
|
}) {
|
|
1989
|
+
const {
|
|
1990
|
+
formState: { isSubmitting }
|
|
1991
|
+
} = (0, import_react_hook_form10.useFormContext)();
|
|
1922
1992
|
const onDownload = () => {
|
|
1923
1993
|
const element = document.createElement("a");
|
|
1924
1994
|
const file = new Blob([codes.join("\n")], {
|
|
@@ -1930,86 +2000,127 @@ function DefaultSettingsRecoveryCodes({
|
|
|
1930
2000
|
element.click();
|
|
1931
2001
|
};
|
|
1932
2002
|
const hasCodes = codes.length >= 1;
|
|
1933
|
-
return /* @__PURE__ */ (0,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
1935
|
-
/* @__PURE__ */ (0,
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2004
|
+
codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DefaultHorizontalDivider, {}),
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex gap-4 justify-between", children: [
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex gap-2", children: [
|
|
2008
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2009
|
+
"button",
|
|
2010
|
+
{
|
|
2011
|
+
...regnerateButton.attributes,
|
|
2012
|
+
type: "submit",
|
|
2013
|
+
className: "ml-auto",
|
|
2014
|
+
onClick: onRegenerate,
|
|
2015
|
+
disabled: isSubmitting,
|
|
2016
|
+
"data-loading": isSubmitting,
|
|
2017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2018
|
+
refresh_default,
|
|
2019
|
+
{
|
|
2020
|
+
size: 24,
|
|
2021
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
|
|
2022
|
+
}
|
|
2023
|
+
)
|
|
2024
|
+
}
|
|
2025
|
+
),
|
|
2026
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2027
|
+
"button",
|
|
2028
|
+
{
|
|
2029
|
+
...revealButton.attributes,
|
|
2030
|
+
type: "submit",
|
|
2031
|
+
className: "ml-auto",
|
|
2032
|
+
onClick: onReveal,
|
|
2033
|
+
title: "Reveal recovery codes",
|
|
2034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2035
|
+
eye_default,
|
|
2036
|
+
{
|
|
2037
|
+
size: 24,
|
|
2038
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
|
|
2039
|
+
}
|
|
2040
|
+
)
|
|
2041
|
+
}
|
|
2042
|
+
) }),
|
|
2043
|
+
hasCodes && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2044
|
+
"button",
|
|
2045
|
+
{
|
|
2046
|
+
onClick: onDownload,
|
|
2047
|
+
type: "button",
|
|
2048
|
+
className: "ml-auto",
|
|
2049
|
+
"data-testid": "recovery-codes-download-button",
|
|
2050
|
+
title: "Download recovery codes",
|
|
2051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2052
|
+
download_default,
|
|
2053
|
+
{
|
|
2054
|
+
size: 24,
|
|
2055
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover"
|
|
2056
|
+
}
|
|
2057
|
+
)
|
|
2058
|
+
}
|
|
2059
|
+
)
|
|
2060
|
+
] })
|
|
1972
2061
|
] }),
|
|
1973
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
2062
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2063
|
+
"div",
|
|
2064
|
+
{
|
|
2065
|
+
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
2066
|
+
"data-testid": "recovery-codes-codes",
|
|
2067
|
+
children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { children: code }, code))
|
|
2068
|
+
}
|
|
2069
|
+
) }) : null
|
|
1974
2070
|
] });
|
|
1975
2071
|
}
|
|
1976
2072
|
|
|
2073
|
+
// src/theme/default/components/settings/settings-totp.tsx
|
|
2074
|
+
var import_elements_react17 = require("@ory/elements-react");
|
|
2075
|
+
|
|
1977
2076
|
// src/theme/default/assets/icons/qrcode.svg
|
|
1978
2077
|
var React29 = __toESM(require("react"));
|
|
1979
|
-
var
|
|
2078
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1980
2079
|
var SvgQrcode = (props) => {
|
|
1981
2080
|
var _a, _b;
|
|
1982
|
-
return /* @__PURE__ */ (0,
|
|
2081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", 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, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
1983
2082
|
};
|
|
1984
2083
|
var qrcode_default = SvgQrcode;
|
|
1985
2084
|
|
|
1986
|
-
// src/theme/default/components/settings/settings-
|
|
1987
|
-
var
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
2085
|
+
// src/theme/default/components/settings/settings-totp.tsx
|
|
2086
|
+
var import_react_hook_form11 = require("react-hook-form");
|
|
2087
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2088
|
+
function DefaultSettingsTotp({
|
|
2089
|
+
totpImage,
|
|
2090
|
+
totpInput,
|
|
2091
|
+
totpSecret,
|
|
2092
|
+
totpUnlink,
|
|
2093
|
+
onUnlink
|
|
2094
|
+
}) {
|
|
2095
|
+
const { Node, Card } = (0, import_elements_react17.useComponents)();
|
|
2096
|
+
const {
|
|
2097
|
+
formState: { isSubmitting }
|
|
2098
|
+
} = (0, import_react_hook_form11.useFormContext)();
|
|
2099
|
+
if (totpUnlink) {
|
|
1991
2100
|
const {
|
|
1992
2101
|
type,
|
|
1993
2102
|
autocomplete: _ignoredAutocomplete,
|
|
1994
2103
|
label: _ignoredLabel,
|
|
1995
2104
|
node_type: _ignoredNodeType,
|
|
1996
2105
|
...buttonAttrs
|
|
1997
|
-
} =
|
|
1998
|
-
return /* @__PURE__ */ (0,
|
|
1999
|
-
/* @__PURE__ */ (0,
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2106
|
+
} = totpUnlink.attributes;
|
|
2107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Card.Divider, {}) }),
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(qrcode_default, { size: 32 }) }),
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2004
2113
|
"button",
|
|
2005
2114
|
{
|
|
2006
2115
|
type: type === "button" ? "button" : "submit",
|
|
2007
2116
|
...buttonAttrs,
|
|
2008
|
-
|
|
2117
|
+
onClick: onUnlink,
|
|
2118
|
+
disabled: isSubmitting,
|
|
2119
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2009
2120
|
trash_default,
|
|
2010
2121
|
{
|
|
2011
|
-
|
|
2012
|
-
|
|
2122
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
2123
|
+
size: 24
|
|
2013
2124
|
}
|
|
2014
2125
|
)
|
|
2015
2126
|
}
|
|
@@ -2017,49 +2128,49 @@ function DefaultSettingsTotp(props) {
|
|
|
2017
2128
|
] })
|
|
2018
2129
|
] });
|
|
2019
2130
|
}
|
|
2020
|
-
if (
|
|
2021
|
-
return /* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
|
|
2131
|
+
if (totpImage && totpSecret && totpInput) {
|
|
2132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2133
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DefaultHorizontalDivider, {}) }),
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2135
|
+
Node.Image,
|
|
2025
2136
|
{
|
|
2026
|
-
node:
|
|
2137
|
+
node: totpImage,
|
|
2027
2138
|
attributes: {
|
|
2028
|
-
...
|
|
2139
|
+
...totpImage.attributes
|
|
2029
2140
|
}
|
|
2030
2141
|
}
|
|
2031
2142
|
) }) }) }),
|
|
2032
|
-
/* @__PURE__ */ (0,
|
|
2033
|
-
/* @__PURE__ */ (0,
|
|
2034
|
-
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2145
|
+
Node.Label,
|
|
2035
2146
|
{
|
|
2036
|
-
node:
|
|
2037
|
-
attributes:
|
|
2038
|
-
children: /* @__PURE__ */ (0,
|
|
2039
|
-
|
|
2147
|
+
node: totpSecret,
|
|
2148
|
+
attributes: totpSecret.attributes,
|
|
2149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2150
|
+
Node.Input,
|
|
2040
2151
|
{
|
|
2041
|
-
node:
|
|
2152
|
+
node: totpSecret,
|
|
2042
2153
|
attributes: {
|
|
2043
2154
|
disabled: true,
|
|
2044
2155
|
name: "totp_secret_key",
|
|
2045
2156
|
node_type: "input",
|
|
2046
2157
|
type: "text",
|
|
2047
|
-
value:
|
|
2158
|
+
value: totpSecret.attributes.text.text
|
|
2048
2159
|
}
|
|
2049
2160
|
}
|
|
2050
2161
|
)
|
|
2051
2162
|
}
|
|
2052
2163
|
),
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
2054
|
-
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2165
|
+
Node.Label,
|
|
2055
2166
|
{
|
|
2056
|
-
attributes:
|
|
2057
|
-
node:
|
|
2058
|
-
children: /* @__PURE__ */ (0,
|
|
2059
|
-
|
|
2167
|
+
attributes: totpInput.attributes,
|
|
2168
|
+
node: totpInput,
|
|
2169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2170
|
+
Node.CodeInput,
|
|
2060
2171
|
{
|
|
2061
|
-
node:
|
|
2062
|
-
attributes:
|
|
2172
|
+
node: totpInput,
|
|
2173
|
+
attributes: totpInput.attributes
|
|
2063
2174
|
}
|
|
2064
2175
|
)
|
|
2065
2176
|
}
|
|
@@ -2069,32 +2180,40 @@ function DefaultSettingsTotp(props) {
|
|
|
2069
2180
|
}
|
|
2070
2181
|
}
|
|
2071
2182
|
|
|
2183
|
+
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2184
|
+
var import_elements_react18 = require("@ory/elements-react");
|
|
2185
|
+
|
|
2072
2186
|
// src/theme/default/assets/icons/key.svg
|
|
2073
2187
|
var React30 = __toESM(require("react"));
|
|
2074
|
-
var
|
|
2188
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2075
2189
|
var SvgKey = (props) => {
|
|
2076
2190
|
var _a, _b;
|
|
2077
|
-
return /* @__PURE__ */ (0,
|
|
2191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.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_runtime61.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
2078
2192
|
};
|
|
2079
2193
|
var key_default = SvgKey;
|
|
2080
2194
|
|
|
2081
2195
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2082
|
-
var
|
|
2196
|
+
var import_react_hook_form12 = require("react-hook-form");
|
|
2197
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2083
2198
|
function DefaultSettingsWebauthn({
|
|
2084
2199
|
nameInput,
|
|
2085
2200
|
triggerButton,
|
|
2086
2201
|
removeButtons
|
|
2087
2202
|
}) {
|
|
2203
|
+
const {
|
|
2204
|
+
formState: { isSubmitting }
|
|
2205
|
+
} = (0, import_react_hook_form12.useFormContext)();
|
|
2206
|
+
const { Node, Card } = (0, import_elements_react18.useComponents)();
|
|
2088
2207
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2089
|
-
return /* @__PURE__ */ (0,
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2092
|
-
|
|
2208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2211
|
+
Node.Label,
|
|
2093
2212
|
{
|
|
2094
2213
|
node: nameInput,
|
|
2095
2214
|
attributes: nameInput.attributes,
|
|
2096
|
-
children: /* @__PURE__ */ (0,
|
|
2097
|
-
|
|
2215
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2216
|
+
Node.Input,
|
|
2098
2217
|
{
|
|
2099
2218
|
node: nameInput,
|
|
2100
2219
|
attributes: nameInput.attributes
|
|
@@ -2102,8 +2221,8 @@ function DefaultSettingsWebauthn({
|
|
|
2102
2221
|
)
|
|
2103
2222
|
}
|
|
2104
2223
|
) }),
|
|
2105
|
-
triggerButton ? /* @__PURE__ */ (0,
|
|
2106
|
-
|
|
2224
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2225
|
+
Node.Button,
|
|
2107
2226
|
{
|
|
2108
2227
|
node: triggerButton,
|
|
2109
2228
|
attributes: triggerButton.attributes,
|
|
@@ -2111,32 +2230,52 @@ function DefaultSettingsWebauthn({
|
|
|
2111
2230
|
}
|
|
2112
2231
|
) : null
|
|
2113
2232
|
] }),
|
|
2114
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
2115
|
-
/* @__PURE__ */ (0,
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2233
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Card.Divider, {}),
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2117
2236
|
var _a, _b;
|
|
2118
2237
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2119
2238
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
2120
|
-
const
|
|
2239
|
+
const displayName = "display_name" in context ? context.display_name : null;
|
|
2121
2240
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2123
2242
|
"div",
|
|
2124
2243
|
{
|
|
2125
|
-
className: "flex justify-between gap-6",
|
|
2244
|
+
className: "flex justify-between gap-6 md:items-center",
|
|
2126
2245
|
children: [
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2246
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
2247
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2248
|
+
key_default,
|
|
2249
|
+
{
|
|
2250
|
+
size: 32,
|
|
2251
|
+
className: "text-interface-foreground-default-primary"
|
|
2252
|
+
}
|
|
2253
|
+
),
|
|
2254
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-1 flex-col", children: [
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: displayName }),
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block", children: keyId })
|
|
2258
|
+
] }),
|
|
2259
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2260
|
+
dateStyle: "long"
|
|
2261
|
+
}).format(new Date(addedAt)) })
|
|
2262
|
+
] })
|
|
2131
2263
|
] }),
|
|
2132
|
-
|
|
2133
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2264
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2134
2265
|
"button",
|
|
2135
2266
|
{
|
|
2136
2267
|
...node.attributes,
|
|
2137
2268
|
type: "submit",
|
|
2138
|
-
|
|
2139
|
-
|
|
2269
|
+
onClick: node.onClick,
|
|
2270
|
+
disabled: isSubmitting,
|
|
2271
|
+
className: "relative",
|
|
2272
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2273
|
+
trash_default,
|
|
2274
|
+
{
|
|
2275
|
+
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
2276
|
+
size: 24
|
|
2277
|
+
}
|
|
2278
|
+
)
|
|
2140
2279
|
}
|
|
2141
2280
|
)
|
|
2142
2281
|
]
|
|
@@ -2196,18 +2335,18 @@ function getOryComponents(overrides) {
|
|
|
2196
2335
|
}
|
|
2197
2336
|
|
|
2198
2337
|
// src/theme/default/flows/error.tsx
|
|
2199
|
-
var
|
|
2338
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2200
2339
|
function Error2({
|
|
2201
2340
|
error,
|
|
2202
2341
|
children
|
|
2203
2342
|
}) {
|
|
2204
|
-
return /* @__PURE__ */ (0,
|
|
2343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { children: JSON.stringify(error) || children });
|
|
2205
2344
|
}
|
|
2206
2345
|
|
|
2207
2346
|
// src/theme/default/flows/login.tsx
|
|
2208
|
-
var
|
|
2209
|
-
var
|
|
2210
|
-
var
|
|
2347
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
2348
|
+
var import_elements_react19 = require("@ory/elements-react");
|
|
2349
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2211
2350
|
function Login({
|
|
2212
2351
|
flow,
|
|
2213
2352
|
config,
|
|
@@ -2215,22 +2354,22 @@ function Login({
|
|
|
2215
2354
|
components: flowOverrideComponents
|
|
2216
2355
|
}) {
|
|
2217
2356
|
const components = getOryComponents(flowOverrideComponents);
|
|
2218
|
-
return /* @__PURE__ */ (0,
|
|
2219
|
-
|
|
2357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2358
|
+
import_elements_react19.OryProvider,
|
|
2220
2359
|
{
|
|
2221
2360
|
config,
|
|
2222
2361
|
flow,
|
|
2223
|
-
flowType:
|
|
2362
|
+
flowType: import_client_fetch12.FlowType.Login,
|
|
2224
2363
|
components,
|
|
2225
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2364
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_elements_react19.OryTwoStepCard, {})
|
|
2226
2365
|
}
|
|
2227
2366
|
);
|
|
2228
2367
|
}
|
|
2229
2368
|
|
|
2230
2369
|
// src/theme/default/flows/recovery.tsx
|
|
2231
|
-
var
|
|
2232
|
-
var
|
|
2233
|
-
var
|
|
2370
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
2371
|
+
var import_elements_react20 = require("@ory/elements-react");
|
|
2372
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2234
2373
|
function Recovery({
|
|
2235
2374
|
flow,
|
|
2236
2375
|
config,
|
|
@@ -2238,22 +2377,22 @@ function Recovery({
|
|
|
2238
2377
|
components: flowOverrideComponents
|
|
2239
2378
|
}) {
|
|
2240
2379
|
const components = getOryComponents(flowOverrideComponents);
|
|
2241
|
-
return /* @__PURE__ */ (0,
|
|
2242
|
-
|
|
2380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2381
|
+
import_elements_react20.OryProvider,
|
|
2243
2382
|
{
|
|
2244
2383
|
config,
|
|
2245
2384
|
flow,
|
|
2246
|
-
flowType:
|
|
2385
|
+
flowType: import_client_fetch13.FlowType.Recovery,
|
|
2247
2386
|
components,
|
|
2248
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2387
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_elements_react20.OryTwoStepCard, {})
|
|
2249
2388
|
}
|
|
2250
2389
|
);
|
|
2251
2390
|
}
|
|
2252
2391
|
|
|
2253
2392
|
// src/theme/default/flows/registration.tsx
|
|
2254
|
-
var
|
|
2255
|
-
var
|
|
2256
|
-
var
|
|
2393
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
2394
|
+
var import_elements_react21 = require("@ory/elements-react");
|
|
2395
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2257
2396
|
function Registration({
|
|
2258
2397
|
flow,
|
|
2259
2398
|
children,
|
|
@@ -2261,22 +2400,22 @@ function Registration({
|
|
|
2261
2400
|
config
|
|
2262
2401
|
}) {
|
|
2263
2402
|
const components = getOryComponents(flowOverrideComponents);
|
|
2264
|
-
return /* @__PURE__ */ (0,
|
|
2265
|
-
|
|
2403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2404
|
+
import_elements_react21.OryProvider,
|
|
2266
2405
|
{
|
|
2267
2406
|
config,
|
|
2268
2407
|
flow,
|
|
2269
|
-
flowType:
|
|
2408
|
+
flowType: import_client_fetch14.FlowType.Registration,
|
|
2270
2409
|
components,
|
|
2271
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2410
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_elements_react21.OryTwoStepCard, {})
|
|
2272
2411
|
}
|
|
2273
2412
|
);
|
|
2274
2413
|
}
|
|
2275
2414
|
|
|
2276
2415
|
// src/theme/default/flows/settings.tsx
|
|
2277
|
-
var
|
|
2278
|
-
var
|
|
2279
|
-
var
|
|
2416
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
2417
|
+
var import_elements_react22 = require("@ory/elements-react");
|
|
2418
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2280
2419
|
function Settings({
|
|
2281
2420
|
flow,
|
|
2282
2421
|
config,
|
|
@@ -2284,25 +2423,25 @@ function Settings({
|
|
|
2284
2423
|
components: flowOverrideComponents
|
|
2285
2424
|
}) {
|
|
2286
2425
|
const components = getOryComponents(flowOverrideComponents);
|
|
2287
|
-
return /* @__PURE__ */ (0,
|
|
2288
|
-
|
|
2426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2427
|
+
import_elements_react22.OryProvider,
|
|
2289
2428
|
{
|
|
2290
2429
|
config,
|
|
2291
2430
|
flow,
|
|
2292
|
-
flowType:
|
|
2431
|
+
flowType: import_client_fetch15.FlowType.Settings,
|
|
2293
2432
|
components,
|
|
2294
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2295
|
-
/* @__PURE__ */ (0,
|
|
2296
|
-
/* @__PURE__ */ (0,
|
|
2433
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_elements_react22.HeadlessPageHeader, {}),
|
|
2435
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_elements_react22.OrySettingsCard, {})
|
|
2297
2436
|
] })
|
|
2298
2437
|
}
|
|
2299
2438
|
);
|
|
2300
2439
|
}
|
|
2301
2440
|
|
|
2302
2441
|
// src/theme/default/flows/verification.tsx
|
|
2303
|
-
var
|
|
2304
|
-
var
|
|
2305
|
-
var
|
|
2442
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
2443
|
+
var import_elements_react23 = require("@ory/elements-react");
|
|
2444
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2306
2445
|
function Verification({
|
|
2307
2446
|
flow,
|
|
2308
2447
|
config,
|
|
@@ -2310,14 +2449,14 @@ function Verification({
|
|
|
2310
2449
|
components: flowOverrideComponents
|
|
2311
2450
|
}) {
|
|
2312
2451
|
const components = getOryComponents(flowOverrideComponents);
|
|
2313
|
-
return /* @__PURE__ */ (0,
|
|
2314
|
-
|
|
2452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
2453
|
+
import_elements_react23.OryProvider,
|
|
2315
2454
|
{
|
|
2316
2455
|
config,
|
|
2317
2456
|
flow,
|
|
2318
|
-
flowType:
|
|
2457
|
+
flowType: import_client_fetch16.FlowType.Verification,
|
|
2319
2458
|
components,
|
|
2320
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2459
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
2321
2460
|
}
|
|
2322
2461
|
);
|
|
2323
2462
|
}
|
|
@@ -2328,6 +2467,7 @@ function Verification({
|
|
|
2328
2467
|
DefaultCardContent,
|
|
2329
2468
|
DefaultCardFooter,
|
|
2330
2469
|
DefaultCardHeader,
|
|
2470
|
+
DefaultCardLayout,
|
|
2331
2471
|
DefaultCardLogo,
|
|
2332
2472
|
DefaultCurrentIdentifierButton,
|
|
2333
2473
|
DefaultFormContainer,
|