@ory/elements-react 1.0.0-next.31 → 1.0.0-next.32
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 +10 -0
- package/DEVELOPMENT.md +0 -2
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +208 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +208 -73
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +8 -0
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +651 -524
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +583 -455
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -46,6 +46,8 @@ import { useIntl } from "react-intl";
|
|
|
46
46
|
|
|
47
47
|
// src/theme/default/utils/url.ts
|
|
48
48
|
function restartFlowUrl(flow, fallback) {
|
|
49
|
+
if (flow.requested_aal === "aal2")
|
|
50
|
+
return appendRefresh(appendAal(fallback, "aal1"), true);
|
|
49
51
|
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
50
52
|
}
|
|
51
53
|
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
@@ -75,48 +77,216 @@ function appendReturnTo(url, returnTo) {
|
|
|
75
77
|
urlObj.searchParams.set("return_to", returnTo);
|
|
76
78
|
return urlObj.toString();
|
|
77
79
|
}
|
|
80
|
+
function appendAal(url, aal) {
|
|
81
|
+
const urlObj = new URL(url);
|
|
82
|
+
urlObj.searchParams.set("aal", aal);
|
|
83
|
+
return urlObj.toString();
|
|
84
|
+
}
|
|
85
|
+
function appendRefresh(url, refresh) {
|
|
86
|
+
const urlObj = new URL(url);
|
|
87
|
+
urlObj.searchParams.set("refresh", refresh ? "true" : "false");
|
|
88
|
+
return urlObj.toString();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/util/ui/index.ts
|
|
92
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
93
|
+
import { useMemo } from "react";
|
|
94
|
+
|
|
95
|
+
// src/context/component.tsx
|
|
96
|
+
import {
|
|
97
|
+
isUiNodeInputAttributes,
|
|
98
|
+
UiNodeGroupEnum
|
|
99
|
+
} from "@ory/client-fetch";
|
|
100
|
+
import { createContext, useContext } from "react";
|
|
101
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
102
|
+
var ComponentContext = createContext({
|
|
103
|
+
components: null,
|
|
104
|
+
// fine because we throw an error if it's not provided
|
|
105
|
+
nodeSorter: () => 0,
|
|
106
|
+
groupSorter: () => 0
|
|
107
|
+
});
|
|
108
|
+
function useComponents() {
|
|
109
|
+
const ctx = useContext(ComponentContext);
|
|
110
|
+
if (!ctx) {
|
|
111
|
+
throw new Error("useComponents must be used within a ComponentProvider");
|
|
112
|
+
}
|
|
113
|
+
return ctx.components;
|
|
114
|
+
}
|
|
115
|
+
var defaultGroupOrder = [
|
|
116
|
+
UiNodeGroupEnum.Default,
|
|
117
|
+
UiNodeGroupEnum.Profile,
|
|
118
|
+
UiNodeGroupEnum.Password,
|
|
119
|
+
UiNodeGroupEnum.Oidc,
|
|
120
|
+
UiNodeGroupEnum.Code,
|
|
121
|
+
UiNodeGroupEnum.LookupSecret,
|
|
122
|
+
UiNodeGroupEnum.Passkey,
|
|
123
|
+
UiNodeGroupEnum.Webauthn,
|
|
124
|
+
UiNodeGroupEnum.Totp
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
// src/util/ui/index.ts
|
|
128
|
+
function triggerToWindowCall(trigger) {
|
|
129
|
+
if (!trigger) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const fn = triggerToFunction(trigger);
|
|
133
|
+
if (fn) {
|
|
134
|
+
fn();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
let i = 0;
|
|
138
|
+
const ms = 100;
|
|
139
|
+
const interval = setInterval(() => {
|
|
140
|
+
i++;
|
|
141
|
+
if (i > 100) {
|
|
142
|
+
clearInterval(interval);
|
|
143
|
+
throw new Error(
|
|
144
|
+
"Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
const fn2 = triggerToFunction(trigger);
|
|
148
|
+
if (fn2) {
|
|
149
|
+
clearInterval(interval);
|
|
150
|
+
return fn2();
|
|
151
|
+
}
|
|
152
|
+
}, ms);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
function triggerToFunction(trigger) {
|
|
156
|
+
if (typeof window === "undefined") {
|
|
157
|
+
console.debug(
|
|
158
|
+
"The Ory SDK is missing a required function: window is undefined."
|
|
159
|
+
);
|
|
160
|
+
return void 0;
|
|
161
|
+
}
|
|
162
|
+
const typedWindow = window;
|
|
163
|
+
if (!(trigger in typedWindow) || !typedWindow[trigger]) {
|
|
164
|
+
console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
|
|
165
|
+
return void 0;
|
|
166
|
+
}
|
|
167
|
+
const triggerFn = typedWindow[trigger];
|
|
168
|
+
if (typeof triggerFn !== "function") {
|
|
169
|
+
console.debug(
|
|
170
|
+
`The Ory SDK is missing a required function: ${trigger}. It is not a function.`
|
|
171
|
+
);
|
|
172
|
+
return void 0;
|
|
173
|
+
}
|
|
174
|
+
return triggerFn;
|
|
175
|
+
}
|
|
176
|
+
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
177
|
+
var _a;
|
|
178
|
+
const groups = {};
|
|
179
|
+
for (const node of nodes) {
|
|
180
|
+
if (node.type === "script") {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const groupNodes = (_a = groups[node.group]) != null ? _a : [];
|
|
184
|
+
groupNodes.push(node);
|
|
185
|
+
groups[node.group] = groupNodes;
|
|
186
|
+
}
|
|
187
|
+
return Object.values(UiNodeGroupEnum2).filter((group) => {
|
|
188
|
+
var _a2;
|
|
189
|
+
return (_a2 = groups[group]) == null ? void 0 : _a2.length;
|
|
190
|
+
}).filter(
|
|
191
|
+
(group) => ![
|
|
192
|
+
UiNodeGroupEnum2.Default,
|
|
193
|
+
UiNodeGroupEnum2.IdentifierFirst,
|
|
194
|
+
UiNodeGroupEnum2.Profile,
|
|
195
|
+
UiNodeGroupEnum2.Captcha,
|
|
196
|
+
...excludeAuthMethods
|
|
197
|
+
].includes(group)
|
|
198
|
+
);
|
|
199
|
+
}
|
|
78
200
|
|
|
79
201
|
// src/theme/default/components/card/footer.tsx
|
|
80
|
-
import { Fragment, jsx as
|
|
202
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
81
203
|
function DefaultCardFooter() {
|
|
82
204
|
const { flowType } = useOryFlow();
|
|
83
205
|
switch (flowType) {
|
|
84
206
|
case FlowType.Login:
|
|
85
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ jsx5(LoginCardFooter, {});
|
|
86
208
|
case FlowType.Registration:
|
|
87
|
-
return /* @__PURE__ */
|
|
209
|
+
return /* @__PURE__ */ jsx5(RegistrationCardFooter, {});
|
|
88
210
|
case FlowType.Recovery:
|
|
89
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ jsx5(RecoveryCardFooter, {});
|
|
90
212
|
case FlowType.Verification:
|
|
91
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ jsx5(VerificationCardFooter, {});
|
|
92
214
|
default:
|
|
93
215
|
return null;
|
|
94
216
|
}
|
|
95
217
|
}
|
|
96
218
|
function LoginCardFooter() {
|
|
97
|
-
const { config, formState, flow } = useOryFlow();
|
|
219
|
+
const { config, formState, flow, flowType } = useOryFlow();
|
|
98
220
|
const intl = useIntl();
|
|
99
|
-
|
|
221
|
+
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
222
|
+
if (flowType === FlowType.Login && flow.refresh) {
|
|
100
223
|
return null;
|
|
101
224
|
}
|
|
102
|
-
return /* @__PURE__ */ jsxs4(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
225
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
226
|
+
formState.current === "provide_identifier" && /* @__PURE__ */ jsxs4("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
227
|
+
intl.formatMessage({
|
|
228
|
+
id: "login.registration-label",
|
|
229
|
+
defaultMessage: "No account?"
|
|
230
|
+
}),
|
|
231
|
+
" ",
|
|
232
|
+
/* @__PURE__ */ jsx5(
|
|
233
|
+
"a",
|
|
234
|
+
{
|
|
235
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
236
|
+
href: initFlowUrl(config.sdk.url, "registration", flow),
|
|
237
|
+
"data-testid": "ory/screen/registration/action/login",
|
|
238
|
+
children: intl.formatMessage({
|
|
239
|
+
id: "login.registration-button",
|
|
240
|
+
defaultMessage: "Sign up"
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
] }),
|
|
245
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx5(
|
|
109
246
|
"a",
|
|
110
247
|
{
|
|
111
248
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
112
|
-
href:
|
|
113
|
-
"data-testid": "ory/screen/
|
|
249
|
+
href: "",
|
|
250
|
+
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
114
251
|
children: intl.formatMessage({
|
|
115
|
-
id: "login.
|
|
116
|
-
defaultMessage: "Sign up"
|
|
252
|
+
id: "login.2fa.method.go-back"
|
|
117
253
|
})
|
|
118
254
|
}
|
|
119
|
-
)
|
|
255
|
+
) }),
|
|
256
|
+
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx5(
|
|
257
|
+
"a",
|
|
258
|
+
{
|
|
259
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
260
|
+
href: restartFlowUrl(
|
|
261
|
+
flow,
|
|
262
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
263
|
+
),
|
|
264
|
+
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
265
|
+
children: intl.formatMessage({
|
|
266
|
+
id: "login.2fa.go-back.link"
|
|
267
|
+
})
|
|
268
|
+
}
|
|
269
|
+
) }),
|
|
270
|
+
flowType === FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ jsxs4("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
271
|
+
intl.formatMessage({
|
|
272
|
+
id: "login.2fa.go-back"
|
|
273
|
+
}),
|
|
274
|
+
" ",
|
|
275
|
+
/* @__PURE__ */ jsx5(
|
|
276
|
+
"a",
|
|
277
|
+
{
|
|
278
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
279
|
+
href: restartFlowUrl(
|
|
280
|
+
flow,
|
|
281
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
282
|
+
),
|
|
283
|
+
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
284
|
+
children: intl.formatMessage({
|
|
285
|
+
id: "login.2fa.go-back.link"
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] })
|
|
120
290
|
] });
|
|
121
291
|
}
|
|
122
292
|
function findScreenSelectionButton(nodes) {
|
|
@@ -141,7 +311,7 @@ function RegistrationCardFooter() {
|
|
|
141
311
|
);
|
|
142
312
|
}
|
|
143
313
|
}
|
|
144
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ jsx5(Fragment, { children: screenSelectionNode && /* @__PURE__ */ jsx5(
|
|
145
315
|
"button",
|
|
146
316
|
{
|
|
147
317
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
@@ -160,7 +330,7 @@ function RegistrationCardFooter() {
|
|
|
160
330
|
defaultMessage: "Already have an account?"
|
|
161
331
|
}),
|
|
162
332
|
" ",
|
|
163
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ jsx5(
|
|
164
334
|
"a",
|
|
165
335
|
{
|
|
166
336
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -182,12 +352,12 @@ function VerificationCardFooter() {
|
|
|
182
352
|
}
|
|
183
353
|
|
|
184
354
|
// src/theme/default/components/card/header.tsx
|
|
185
|
-
import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
355
|
+
import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
186
356
|
|
|
187
357
|
// src/theme/default/utils/constructCardHeader.ts
|
|
188
358
|
import {
|
|
189
359
|
FlowType as FlowType2,
|
|
190
|
-
isUiNodeInputAttributes
|
|
360
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes2
|
|
191
361
|
} from "@ory/client-fetch";
|
|
192
362
|
import { useIntl as useIntl2 } from "react-intl";
|
|
193
363
|
function joinWithCommaOr(list, orText = "or") {
|
|
@@ -201,7 +371,7 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
201
371
|
}
|
|
202
372
|
}
|
|
203
373
|
function useCardHeaderText(container, opts) {
|
|
204
|
-
var _a, _b;
|
|
374
|
+
var _a, _b, _c;
|
|
205
375
|
const nodes = container.nodes;
|
|
206
376
|
const intl = useIntl2();
|
|
207
377
|
switch (opts.flowType) {
|
|
@@ -315,7 +485,7 @@ function useCardHeaderText(container, opts) {
|
|
|
315
485
|
}
|
|
316
486
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
317
487
|
const identifier = nodes.find(
|
|
318
|
-
(node) =>
|
|
488
|
+
(node) => isUiNodeInputAttributes2(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
319
489
|
);
|
|
320
490
|
if (identifier) {
|
|
321
491
|
parts.push(
|
|
@@ -346,6 +516,15 @@ function useCardHeaderText(container, opts) {
|
|
|
346
516
|
}
|
|
347
517
|
)
|
|
348
518
|
};
|
|
519
|
+
} else if (opts.flow.requested_aal === "aal2") {
|
|
520
|
+
return {
|
|
521
|
+
title: intl.formatMessage({
|
|
522
|
+
id: "login.title-aal2"
|
|
523
|
+
}),
|
|
524
|
+
description: intl.formatMessage({
|
|
525
|
+
id: ((_c = opts.formState) == null ? void 0 : _c.current) === "method_active" ? `login.${opts.formState.method}.subtitle` : "login.subtitle-aal2"
|
|
526
|
+
})
|
|
527
|
+
};
|
|
349
528
|
}
|
|
350
529
|
return {
|
|
351
530
|
title: intl.formatMessage({
|
|
@@ -393,10 +572,10 @@ import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
|
393
572
|
|
|
394
573
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
395
574
|
import * as React3 from "react";
|
|
396
|
-
import { jsx as
|
|
575
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
397
576
|
var SvgArrowLeft = (props) => {
|
|
398
577
|
var _a, _b;
|
|
399
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ jsx6("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", 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__ */ jsx6("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
400
579
|
};
|
|
401
580
|
var arrow_left_default = SvgArrowLeft;
|
|
402
581
|
|
|
@@ -410,13 +589,16 @@ function omit(obj, keys) {
|
|
|
410
589
|
}
|
|
411
590
|
|
|
412
591
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
413
|
-
import { jsx as
|
|
592
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
414
593
|
function DefaultCurrentIdentifierButton() {
|
|
415
594
|
const { flow, flowType, config, formState } = useOryFlow2();
|
|
416
595
|
const ui = flow.ui;
|
|
417
596
|
if (formState.current === "provide_identifier") {
|
|
418
597
|
return null;
|
|
419
598
|
}
|
|
599
|
+
if (flowType === FlowType3.Login && flow.requested_aal === "aal2") {
|
|
600
|
+
return null;
|
|
601
|
+
}
|
|
420
602
|
const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
|
|
421
603
|
if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
|
|
422
604
|
return null;
|
|
@@ -430,7 +612,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
430
612
|
"node_type",
|
|
431
613
|
"maxlength"
|
|
432
614
|
]);
|
|
433
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ jsx7(
|
|
434
616
|
"a",
|
|
435
617
|
{
|
|
436
618
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
@@ -439,7 +621,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
439
621
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
440
622
|
"data-testid": "ory/screen/login/action/restart",
|
|
441
623
|
children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
442
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ jsx7(
|
|
443
625
|
arrow_left_default,
|
|
444
626
|
{
|
|
445
627
|
size: 16,
|
|
@@ -447,7 +629,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
447
629
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
448
630
|
}
|
|
449
631
|
),
|
|
450
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ jsx7("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 })
|
|
451
633
|
] })
|
|
452
634
|
}
|
|
453
635
|
);
|
|
@@ -484,47 +666,47 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
484
666
|
}
|
|
485
667
|
|
|
486
668
|
// src/theme/default/components/card/header.tsx
|
|
487
|
-
import { jsx as
|
|
669
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
488
670
|
function InnerCardHeader({ title, text }) {
|
|
489
|
-
const { Card } =
|
|
671
|
+
const { Card } = useComponents2();
|
|
490
672
|
return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
491
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ jsx8(Card.Logo, {}),
|
|
492
674
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ jsx8("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
676
|
+
/* @__PURE__ */ jsx8("p", { className: "leading-normal text-interface-foreground-default-secondary", children: text }),
|
|
677
|
+
/* @__PURE__ */ jsx8(DefaultCurrentIdentifierButton, {})
|
|
496
678
|
] })
|
|
497
679
|
] });
|
|
498
680
|
}
|
|
499
681
|
function DefaultCardHeader() {
|
|
500
682
|
const context = useOryFlow3();
|
|
501
683
|
const { title, description } = useCardHeaderText(context.flow.ui, context);
|
|
502
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx8(InnerCardHeader, { title, text: description });
|
|
503
685
|
}
|
|
504
686
|
|
|
505
687
|
// src/theme/default/components/card/logo.tsx
|
|
506
688
|
import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
507
|
-
import { jsx as
|
|
689
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
508
690
|
function DefaultCardLogo() {
|
|
509
691
|
const flow = useOryFlow4();
|
|
510
692
|
if (flow.config.logoUrl) {
|
|
511
|
-
return /* @__PURE__ */
|
|
693
|
+
return /* @__PURE__ */ jsx9("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
512
694
|
}
|
|
513
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ jsx9("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: flow.config.name });
|
|
514
696
|
}
|
|
515
697
|
|
|
516
698
|
// src/theme/default/components/card/layout.tsx
|
|
517
|
-
import { jsx as
|
|
699
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
518
700
|
function DefaultCardLayout({ children }) {
|
|
519
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ jsx10("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
520
702
|
}
|
|
521
703
|
|
|
522
704
|
// src/theme/default/components/card/index.tsx
|
|
523
|
-
import { jsx as
|
|
705
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
524
706
|
function DefaultCard({ children }) {
|
|
525
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ jsx11("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__ */ jsxs7("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: [
|
|
526
708
|
children,
|
|
527
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ jsx11(Badge, {})
|
|
528
710
|
] }) });
|
|
529
711
|
}
|
|
530
712
|
|
|
@@ -556,45 +738,45 @@ import { useDebounceValue } from "usehooks-ts";
|
|
|
556
738
|
|
|
557
739
|
// src/theme/default/provider-logos/apple.svg
|
|
558
740
|
import * as React4 from "react";
|
|
559
|
-
import { jsx as
|
|
741
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
560
742
|
var SvgApple = (props) => {
|
|
561
743
|
var _a, _b;
|
|
562
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ jsx12("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__ */ jsx12("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" }) });
|
|
563
745
|
};
|
|
564
746
|
var apple_default = SvgApple;
|
|
565
747
|
|
|
566
748
|
// src/theme/default/provider-logos/auth0.svg
|
|
567
749
|
import * as React5 from "react";
|
|
568
|
-
import { jsx as
|
|
750
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
569
751
|
var SvgAuth0 = (props) => {
|
|
570
752
|
var _a, _b;
|
|
571
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ jsx13("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__ */ jsx13("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" }) });
|
|
572
754
|
};
|
|
573
755
|
var auth0_default = SvgAuth0;
|
|
574
756
|
|
|
575
757
|
// src/theme/default/provider-logos/discord.svg
|
|
576
758
|
import * as React6 from "react";
|
|
577
|
-
import { jsx as
|
|
759
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
578
760
|
var SvgDiscord = (props) => {
|
|
579
761
|
var _a, _b;
|
|
580
762
|
return /* @__PURE__ */ jsxs8("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: [
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ jsx14("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" }),
|
|
764
|
+
/* @__PURE__ */ jsx14("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" })
|
|
583
765
|
] });
|
|
584
766
|
};
|
|
585
767
|
var discord_default = SvgDiscord;
|
|
586
768
|
|
|
587
769
|
// src/theme/default/provider-logos/facebook.svg
|
|
588
770
|
import * as React7 from "react";
|
|
589
|
-
import { jsx as
|
|
771
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
590
772
|
var SvgFacebook = (props) => {
|
|
591
773
|
var _a, _b;
|
|
592
774
|
return /* @__PURE__ */ jsxs9("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__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ jsx15("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
776
|
+
/* @__PURE__ */ jsx15("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" }),
|
|
777
|
+
/* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsxs9("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
778
|
+
/* @__PURE__ */ jsx15("stop", { stopColor: "#18ACFE" }),
|
|
779
|
+
/* @__PURE__ */ jsx15("stop", { offset: 1, stopColor: "#0163E0" })
|
|
598
780
|
] }) })
|
|
599
781
|
] });
|
|
600
782
|
};
|
|
@@ -602,124 +784,124 @@ var facebook_default = SvgFacebook;
|
|
|
602
784
|
|
|
603
785
|
// src/theme/default/provider-logos/generic.svg
|
|
604
786
|
import * as React8 from "react";
|
|
605
|
-
import { jsx as
|
|
787
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
606
788
|
var SvgGeneric = (props) => {
|
|
607
789
|
var _a, _b;
|
|
608
790
|
return /* @__PURE__ */ jsxs10("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: [
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ jsx16("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
792
|
+
/* @__PURE__ */ jsx16("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
793
|
+
/* @__PURE__ */ jsx16("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" })
|
|
612
794
|
] });
|
|
613
795
|
};
|
|
614
796
|
var generic_default = SvgGeneric;
|
|
615
797
|
|
|
616
798
|
// src/theme/default/provider-logos/github.svg
|
|
617
799
|
import * as React9 from "react";
|
|
618
|
-
import { jsx as
|
|
800
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
619
801
|
var SvgGithub = (props) => {
|
|
620
802
|
var _a, _b;
|
|
621
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsx17("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__ */ jsx17("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" }) });
|
|
622
804
|
};
|
|
623
805
|
var github_default = SvgGithub;
|
|
624
806
|
|
|
625
807
|
// src/theme/default/provider-logos/gitlab.svg
|
|
626
808
|
import * as React10 from "react";
|
|
627
|
-
import { jsx as
|
|
809
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
628
810
|
var SvgGitlab = (props) => {
|
|
629
811
|
var _a, _b;
|
|
630
812
|
return /* @__PURE__ */ jsxs11("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: [
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ jsx18("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" }),
|
|
814
|
+
/* @__PURE__ */ jsx18("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" }),
|
|
815
|
+
/* @__PURE__ */ jsx18("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" }),
|
|
816
|
+
/* @__PURE__ */ jsx18("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" })
|
|
635
817
|
] });
|
|
636
818
|
};
|
|
637
819
|
var gitlab_default = SvgGitlab;
|
|
638
820
|
|
|
639
821
|
// src/theme/default/provider-logos/google.svg
|
|
640
822
|
import * as React11 from "react";
|
|
641
|
-
import { jsx as
|
|
823
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
642
824
|
var SvgGoogle = (props) => {
|
|
643
825
|
var _a, _b;
|
|
644
826
|
return /* @__PURE__ */ jsxs12("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: [
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ jsx19("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" }),
|
|
828
|
+
/* @__PURE__ */ jsx19("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" }),
|
|
829
|
+
/* @__PURE__ */ jsx19("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" }),
|
|
830
|
+
/* @__PURE__ */ jsx19("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" })
|
|
649
831
|
] });
|
|
650
832
|
};
|
|
651
833
|
var google_default = SvgGoogle;
|
|
652
834
|
|
|
653
835
|
// src/theme/default/provider-logos/linkedin.svg
|
|
654
836
|
import * as React12 from "react";
|
|
655
|
-
import { jsx as
|
|
837
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
656
838
|
var SvgLinkedin = (props) => {
|
|
657
839
|
var _a, _b;
|
|
658
840
|
return /* @__PURE__ */ jsxs13("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: [
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx20("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
842
|
+
/* @__PURE__ */ jsx20("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" })
|
|
661
843
|
] });
|
|
662
844
|
};
|
|
663
845
|
var linkedin_default = SvgLinkedin;
|
|
664
846
|
|
|
665
847
|
// src/theme/default/provider-logos/microsoft.svg
|
|
666
848
|
import * as React13 from "react";
|
|
667
|
-
import { jsx as
|
|
849
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
668
850
|
var SvgMicrosoft = (props) => {
|
|
669
851
|
var _a, _b;
|
|
670
852
|
return /* @__PURE__ */ jsxs14("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: [
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ jsx21("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
854
|
+
/* @__PURE__ */ jsx21("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
855
|
+
/* @__PURE__ */ jsx21("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
856
|
+
/* @__PURE__ */ jsx21("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
675
857
|
] });
|
|
676
858
|
};
|
|
677
859
|
var microsoft_default = SvgMicrosoft;
|
|
678
860
|
|
|
679
861
|
// src/theme/default/provider-logos/slack.svg
|
|
680
862
|
import * as React14 from "react";
|
|
681
|
-
import { jsx as
|
|
863
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
682
864
|
var SvgSlack = (props) => {
|
|
683
865
|
var _a, _b;
|
|
684
866
|
return /* @__PURE__ */ jsxs15("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: [
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ jsx22("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" }),
|
|
868
|
+
/* @__PURE__ */ jsx22("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" }),
|
|
869
|
+
/* @__PURE__ */ jsx22("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" }),
|
|
870
|
+
/* @__PURE__ */ jsx22("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" })
|
|
689
871
|
] });
|
|
690
872
|
};
|
|
691
873
|
var slack_default = SvgSlack;
|
|
692
874
|
|
|
693
875
|
// src/theme/default/provider-logos/spotify.svg
|
|
694
876
|
import * as React15 from "react";
|
|
695
|
-
import { jsx as
|
|
877
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
696
878
|
var SvgSpotify = (props) => {
|
|
697
879
|
var _a, _b;
|
|
698
880
|
return /* @__PURE__ */ jsxs16("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: [
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ jsx23("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
882
|
+
/* @__PURE__ */ jsx23("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" })
|
|
701
883
|
] });
|
|
702
884
|
};
|
|
703
885
|
var spotify_default = SvgSpotify;
|
|
704
886
|
|
|
705
887
|
// src/theme/default/provider-logos/yandex.svg
|
|
706
888
|
import * as React16 from "react";
|
|
707
|
-
import { jsx as
|
|
889
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
708
890
|
var SvgYandex = (props) => {
|
|
709
891
|
var _a, _b;
|
|
710
892
|
return /* @__PURE__ */ jsxs17("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__ */
|
|
712
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ jsx24("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
894
|
+
/* @__PURE__ */ jsx24("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" })
|
|
713
895
|
] });
|
|
714
896
|
};
|
|
715
897
|
var yandex_default = SvgYandex;
|
|
716
898
|
|
|
717
899
|
// src/theme/default/provider-logos/x.svg
|
|
718
900
|
import * as React17 from "react";
|
|
719
|
-
import { jsx as
|
|
901
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
720
902
|
var SvgX = (props) => {
|
|
721
903
|
var _a, _b;
|
|
722
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx25("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__ */ jsx25("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
|
|
723
905
|
};
|
|
724
906
|
var x_default = SvgX;
|
|
725
907
|
|
|
@@ -743,7 +925,7 @@ var logos = {
|
|
|
743
925
|
var provider_logos_default = logos;
|
|
744
926
|
|
|
745
927
|
// src/theme/default/components/form/spinner.tsx
|
|
746
|
-
import { jsx as
|
|
928
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
747
929
|
function Spinner({ className }) {
|
|
748
930
|
return /* @__PURE__ */ jsxs18(
|
|
749
931
|
"svg",
|
|
@@ -758,7 +940,7 @@ function Spinner({ className }) {
|
|
|
758
940
|
fill: "none",
|
|
759
941
|
xmlns: "http://www.w3.org/2000/svg",
|
|
760
942
|
children: [
|
|
761
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ jsx26("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx26(
|
|
762
944
|
"path",
|
|
763
945
|
{
|
|
764
946
|
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",
|
|
@@ -767,7 +949,7 @@ function Spinner({ className }) {
|
|
|
767
949
|
strokeLinejoin: "round"
|
|
768
950
|
}
|
|
769
951
|
) }),
|
|
770
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ jsx26("defs", { children: /* @__PURE__ */ jsx26("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx26(
|
|
771
953
|
"rect",
|
|
772
954
|
{
|
|
773
955
|
width: "24",
|
|
@@ -782,7 +964,7 @@ function Spinner({ className }) {
|
|
|
782
964
|
}
|
|
783
965
|
|
|
784
966
|
// src/theme/default/components/form/social.tsx
|
|
785
|
-
import { Fragment as Fragment2, jsx as
|
|
967
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
786
968
|
function extractProvider(context) {
|
|
787
969
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
788
970
|
return context.provider;
|
|
@@ -838,21 +1020,21 @@ function DefaultButtonSocial({
|
|
|
838
1020
|
"data-loading": clicked,
|
|
839
1021
|
disabled: isSubmitting,
|
|
840
1022
|
children: [
|
|
841
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ jsx27("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx27(Logo, { size: 20 }) : /* @__PURE__ */ jsx27("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ jsx27(Spinner, { className: "size-5" }) }),
|
|
842
1024
|
showLabel && node.meta.label ? /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ jsx27("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: uiTextToFormattedMessage(node.meta.label, intl) }),
|
|
1026
|
+
/* @__PURE__ */ jsx27("span", { className: "size-5 block" })
|
|
845
1027
|
] }) : null
|
|
846
1028
|
]
|
|
847
1029
|
}
|
|
848
1030
|
);
|
|
849
1031
|
}
|
|
850
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */
|
|
1032
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx27(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
851
1033
|
function DefaultSocialButtonContainer({
|
|
852
1034
|
children,
|
|
853
1035
|
nodes
|
|
854
1036
|
}) {
|
|
855
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx27(
|
|
856
1038
|
"div",
|
|
857
1039
|
{
|
|
858
1040
|
className: cn("grid gap-3", {
|
|
@@ -867,14 +1049,14 @@ function DefaultSocialButtonContainer({
|
|
|
867
1049
|
}
|
|
868
1050
|
|
|
869
1051
|
// src/theme/default/components/form/index.tsx
|
|
870
|
-
import { jsx as
|
|
1052
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
871
1053
|
function DefaultFormContainer({
|
|
872
1054
|
children,
|
|
873
1055
|
onSubmit,
|
|
874
1056
|
action,
|
|
875
1057
|
method
|
|
876
1058
|
}) {
|
|
877
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ jsx28(
|
|
878
1060
|
"form",
|
|
879
1061
|
{
|
|
880
1062
|
onSubmit,
|
|
@@ -891,7 +1073,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
891
1073
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
892
1074
|
return null;
|
|
893
1075
|
}
|
|
894
|
-
return /* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ jsx28(
|
|
895
1077
|
"section",
|
|
896
1078
|
{
|
|
897
1079
|
className: cn(
|
|
@@ -903,7 +1085,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
903
1085
|
}
|
|
904
1086
|
function DefaultMessage({ message }) {
|
|
905
1087
|
const intl = useIntl4();
|
|
906
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsx28(
|
|
907
1089
|
"span",
|
|
908
1090
|
{
|
|
909
1091
|
className: cn(
|
|
@@ -923,58 +1105,81 @@ import { useIntl as useIntl5 } from "react-intl";
|
|
|
923
1105
|
|
|
924
1106
|
// src/theme/default/assets/icons/code.svg
|
|
925
1107
|
import * as React18 from "react";
|
|
926
|
-
import { jsx as
|
|
1108
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
927
1109
|
var SvgCode = (props) => {
|
|
928
1110
|
var _a, _b;
|
|
929
|
-
return /* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ jsx29("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__ */ jsx29("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" }) });
|
|
930
1112
|
};
|
|
931
1113
|
var code_default = SvgCode;
|
|
932
1114
|
|
|
933
1115
|
// src/theme/default/assets/icons/passkey.svg
|
|
934
1116
|
import * as React19 from "react";
|
|
935
|
-
import { jsx as
|
|
1117
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
936
1118
|
var SvgPasskey = (props) => {
|
|
937
1119
|
var _a, _b;
|
|
938
|
-
return /* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ jsx30("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__ */ jsx30("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" }) });
|
|
939
1121
|
};
|
|
940
1122
|
var passkey_default = SvgPasskey;
|
|
941
1123
|
|
|
942
1124
|
// src/theme/default/assets/icons/password.svg
|
|
943
1125
|
import * as React20 from "react";
|
|
944
|
-
import { jsx as
|
|
1126
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
945
1127
|
var SvgPassword = (props) => {
|
|
946
1128
|
var _a, _b;
|
|
947
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ jsx31("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__ */ jsx31("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" }) });
|
|
948
1130
|
};
|
|
949
1131
|
var password_default = SvgPassword;
|
|
950
1132
|
|
|
951
1133
|
// src/theme/default/assets/icons/webauthn.svg
|
|
952
1134
|
import * as React21 from "react";
|
|
953
|
-
import { jsx as
|
|
1135
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
954
1136
|
var SvgWebauthn = (props) => {
|
|
955
1137
|
var _a, _b;
|
|
956
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ jsx32("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__ */ jsx32("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" }) });
|
|
957
1139
|
};
|
|
958
1140
|
var webauthn_default = SvgWebauthn;
|
|
959
1141
|
|
|
1142
|
+
// src/theme/default/assets/icons/totp.svg
|
|
1143
|
+
import * as React22 from "react";
|
|
1144
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1145
|
+
var SvgTotp = (props) => {
|
|
1146
|
+
var _a, _b;
|
|
1147
|
+
return /* @__PURE__ */ jsx33("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__ */ jsx33("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, 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" }) });
|
|
1148
|
+
};
|
|
1149
|
+
var totp_default = SvgTotp;
|
|
1150
|
+
|
|
1151
|
+
// src/theme/default/assets/icons/code-asterix.svg
|
|
1152
|
+
import * as React23 from "react";
|
|
1153
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1154
|
+
var SvgCodeAsterix = (props) => {
|
|
1155
|
+
var _a, _b;
|
|
1156
|
+
return /* @__PURE__ */ jsx34("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", 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__ */ jsx34("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
|
|
1157
|
+
};
|
|
1158
|
+
var code_asterix_default = SvgCodeAsterix;
|
|
1159
|
+
|
|
960
1160
|
// src/theme/default/utils/form.ts
|
|
961
1161
|
function isGroupImmediateSubmit(group) {
|
|
962
1162
|
return group === "code";
|
|
963
1163
|
}
|
|
964
1164
|
|
|
965
1165
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
966
|
-
import { jsx as
|
|
1166
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
967
1167
|
var iconsMap = {
|
|
968
1168
|
code: code_default,
|
|
969
1169
|
passkey: passkey_default,
|
|
970
1170
|
password: password_default,
|
|
971
1171
|
webauthn: webauthn_default,
|
|
1172
|
+
hardware_token: passkey_default,
|
|
1173
|
+
totp: totp_default,
|
|
1174
|
+
lookup_secret: code_asterix_default,
|
|
972
1175
|
...provider_logos_default
|
|
973
1176
|
};
|
|
974
1177
|
function DefaultAuthMethodListItem({
|
|
975
1178
|
onClick,
|
|
976
|
-
group
|
|
1179
|
+
group,
|
|
1180
|
+
title
|
|
977
1181
|
}) {
|
|
1182
|
+
var _a;
|
|
978
1183
|
const intl = useIntl5();
|
|
979
1184
|
const Icon = iconsMap[group] || null;
|
|
980
1185
|
return /* @__PURE__ */ jsxs20(
|
|
@@ -985,10 +1190,16 @@ function DefaultAuthMethodListItem({
|
|
|
985
1190
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
986
1191
|
"data-testid": `ory/form/auth-picker/${group}`,
|
|
987
1192
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col", children: [
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
|
|
1193
|
+
/* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
1194
|
+
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col w-full", children: [
|
|
1195
|
+
/* @__PURE__ */ jsxs20("span", { className: "text-interface-foreground-default-primary truncate mr-6", children: [
|
|
1196
|
+
intl.formatMessage(
|
|
1197
|
+
{ id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
|
|
1198
|
+
title == null ? void 0 : title.values
|
|
1199
|
+
),
|
|
1200
|
+
" "
|
|
1201
|
+
] }),
|
|
1202
|
+
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
|
|
992
1203
|
id: `two-step.${group}.description`
|
|
993
1204
|
}) })
|
|
994
1205
|
] })
|
|
@@ -1006,7 +1217,7 @@ import { cva } from "class-variance-authority";
|
|
|
1006
1217
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
1007
1218
|
import { useIntl as useIntl6 } from "react-intl";
|
|
1008
1219
|
import { useEffect as useEffect2, useState } from "react";
|
|
1009
|
-
import { jsx as
|
|
1220
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1010
1221
|
var buttonStyles = cva(
|
|
1011
1222
|
[
|
|
1012
1223
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -1090,8 +1301,8 @@ var DefaultButton = ({
|
|
|
1090
1301
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
1091
1302
|
"data-loading": clicked,
|
|
1092
1303
|
children: [
|
|
1093
|
-
clicked ? /* @__PURE__ */
|
|
1094
|
-
label ? /* @__PURE__ */
|
|
1304
|
+
clicked ? /* @__PURE__ */ jsx36(Spinner, {}) : null,
|
|
1305
|
+
label ? /* @__PURE__ */ jsx36("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
|
|
1095
1306
|
]
|
|
1096
1307
|
}
|
|
1097
1308
|
);
|
|
@@ -1167,7 +1378,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1167
1378
|
};
|
|
1168
1379
|
|
|
1169
1380
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1170
|
-
import { Fragment as Fragment3, jsx as
|
|
1381
|
+
import { Fragment as Fragment3, jsx as jsx37 } from "react/jsx-runtime";
|
|
1171
1382
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1172
1383
|
function computeLabelElements(labelText) {
|
|
1173
1384
|
const elements = [];
|
|
@@ -1183,7 +1394,7 @@ function computeLabelElements(labelText) {
|
|
|
1183
1394
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1184
1395
|
}
|
|
1185
1396
|
elements.push(
|
|
1186
|
-
/* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ jsx37(
|
|
1187
1398
|
"a",
|
|
1188
1399
|
{
|
|
1189
1400
|
href: url,
|
|
@@ -1208,13 +1419,13 @@ function CheckboxLabel({ label }) {
|
|
|
1208
1419
|
return null;
|
|
1209
1420
|
}
|
|
1210
1421
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ jsx37(Fragment3, { children: computeLabelElements(labelText) });
|
|
1212
1423
|
}
|
|
1213
1424
|
|
|
1214
1425
|
// src/theme/default/components/form/checkbox.tsx
|
|
1215
|
-
import { jsx as
|
|
1426
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1216
1427
|
function CheckboxSVG() {
|
|
1217
|
-
return /* @__PURE__ */
|
|
1428
|
+
return /* @__PURE__ */ jsx38(
|
|
1218
1429
|
"svg",
|
|
1219
1430
|
{
|
|
1220
1431
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -1223,7 +1434,7 @@ function CheckboxSVG() {
|
|
|
1223
1434
|
height: "16",
|
|
1224
1435
|
viewBox: "0 0 16 16",
|
|
1225
1436
|
fill: "none",
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ jsx38(
|
|
1227
1438
|
"path",
|
|
1228
1439
|
{
|
|
1229
1440
|
fillRule: "evenodd",
|
|
@@ -1254,7 +1465,7 @@ var DefaultCheckbox = ({
|
|
|
1254
1465
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1255
1466
|
return /* @__PURE__ */ jsxs22("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1256
1467
|
/* @__PURE__ */ jsxs22("span", { className: "flex h-5 items-center", children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ jsx38(
|
|
1258
1469
|
"input",
|
|
1259
1470
|
{
|
|
1260
1471
|
...attributes,
|
|
@@ -1268,11 +1479,11 @@ var DefaultCheckbox = ({
|
|
|
1268
1479
|
...register(name, { value })
|
|
1269
1480
|
}
|
|
1270
1481
|
),
|
|
1271
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ jsx38(CheckboxSVG, {})
|
|
1272
1483
|
] }),
|
|
1273
1484
|
/* @__PURE__ */ jsxs22("span", { className: "flex flex-col", children: [
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ jsx38("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx38(CheckboxLabel, { label }) }),
|
|
1486
|
+
node.messages.map((message) => /* @__PURE__ */ jsx38(
|
|
1276
1487
|
"span",
|
|
1277
1488
|
{
|
|
1278
1489
|
className: cn(
|
|
@@ -1289,21 +1500,21 @@ var DefaultCheckbox = ({
|
|
|
1289
1500
|
};
|
|
1290
1501
|
|
|
1291
1502
|
// src/theme/default/components/form/group-container.tsx
|
|
1292
|
-
import { jsx as
|
|
1503
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1293
1504
|
function DefaultGroupContainer({ children }) {
|
|
1294
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsx39("div", { className: "grid grid-cols-1 gap-8", children });
|
|
1295
1506
|
}
|
|
1296
1507
|
|
|
1297
1508
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1298
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1299
1510
|
function DefaultHorizontalDivider() {
|
|
1300
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx40("hr", { className: "border-interface-border-default-primary" });
|
|
1301
1512
|
}
|
|
1302
1513
|
|
|
1303
1514
|
// src/theme/default/components/form/image.tsx
|
|
1304
|
-
import { jsx as
|
|
1515
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1305
1516
|
function DefaultImage({ attributes }) {
|
|
1306
|
-
return /* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ jsx41("figure", { children: /* @__PURE__ */ jsx41("img", { ...attributes }) });
|
|
1307
1518
|
}
|
|
1308
1519
|
|
|
1309
1520
|
// src/theme/default/components/form/input.tsx
|
|
@@ -1314,7 +1525,7 @@ import {
|
|
|
1314
1525
|
} from "@ory/elements-react";
|
|
1315
1526
|
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
1316
1527
|
import { useIntl as useIntl9 } from "react-intl";
|
|
1317
|
-
import { jsx as
|
|
1528
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1318
1529
|
var DefaultInput = ({
|
|
1319
1530
|
node,
|
|
1320
1531
|
attributes,
|
|
@@ -1341,7 +1552,7 @@ var DefaultInput = ({
|
|
|
1341
1552
|
placeholder: uiTextToFormattedMessage6(label, intl)
|
|
1342
1553
|
}
|
|
1343
1554
|
) : "";
|
|
1344
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ jsx42(
|
|
1345
1556
|
"input",
|
|
1346
1557
|
{
|
|
1347
1558
|
...rest,
|
|
@@ -1374,12 +1585,12 @@ import {
|
|
|
1374
1585
|
import {
|
|
1375
1586
|
messageTestId as messageTestId3,
|
|
1376
1587
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
1377
|
-
useComponents as
|
|
1588
|
+
useComponents as useComponents3,
|
|
1378
1589
|
useOryFlow as useOryFlow8
|
|
1379
1590
|
} from "@ory/elements-react";
|
|
1380
1591
|
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
1381
1592
|
import { useIntl as useIntl10 } from "react-intl";
|
|
1382
|
-
import { jsx as
|
|
1593
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1383
1594
|
function findResendNode(nodes) {
|
|
1384
1595
|
return nodes.find(
|
|
1385
1596
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1393,7 +1604,7 @@ function DefaultLabel({
|
|
|
1393
1604
|
}) {
|
|
1394
1605
|
const intl = useIntl10();
|
|
1395
1606
|
const label = getNodeLabel4(node);
|
|
1396
|
-
const { Message } =
|
|
1607
|
+
const { Message } = useComponents3();
|
|
1397
1608
|
const { config, flowType, flow } = useOryFlow8();
|
|
1398
1609
|
const { setValue, formState } = useFormContext5();
|
|
1399
1610
|
const isPassword = attributes.type === "password";
|
|
@@ -1406,7 +1617,7 @@ function DefaultLabel({
|
|
|
1406
1617
|
const fieldError = formState.errors[attributes.name];
|
|
1407
1618
|
return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1408
1619
|
label && /* @__PURE__ */ jsxs23("span", { className: "inline-flex justify-between", children: [
|
|
1409
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsx43(
|
|
1410
1621
|
"label",
|
|
1411
1622
|
{
|
|
1412
1623
|
...messageTestId3(label),
|
|
@@ -1418,7 +1629,7 @@ function DefaultLabel({
|
|
|
1418
1629
|
}
|
|
1419
1630
|
),
|
|
1420
1631
|
isPassword && config.project.recovery_enabled && flowType === FlowType6.Login && // TODO: make it possible to override with a custom component
|
|
1421
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ jsx43(
|
|
1422
1633
|
"a",
|
|
1423
1634
|
{
|
|
1424
1635
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -1429,7 +1640,7 @@ function DefaultLabel({
|
|
|
1429
1640
|
})
|
|
1430
1641
|
}
|
|
1431
1642
|
),
|
|
1432
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
1643
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx43(
|
|
1433
1644
|
"button",
|
|
1434
1645
|
{
|
|
1435
1646
|
type: "submit",
|
|
@@ -1442,8 +1653,8 @@ function DefaultLabel({
|
|
|
1442
1653
|
)
|
|
1443
1654
|
] }),
|
|
1444
1655
|
children,
|
|
1445
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1446
|
-
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */
|
|
1656
|
+
node.messages.map((message) => /* @__PURE__ */ jsx43(Message.Content, { message }, message.id)),
|
|
1657
|
+
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx43(Message.Content, { message: fieldError })
|
|
1447
1658
|
] });
|
|
1448
1659
|
}
|
|
1449
1660
|
|
|
@@ -1454,11 +1665,11 @@ import {
|
|
|
1454
1665
|
} from "@ory/elements-react";
|
|
1455
1666
|
import { forwardRef } from "react";
|
|
1456
1667
|
import { useIntl as useIntl11 } from "react-intl";
|
|
1457
|
-
import { jsx as
|
|
1668
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1458
1669
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
1459
1670
|
const intl = useIntl11();
|
|
1460
1671
|
const label = getNodeLabel5(node);
|
|
1461
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsx44(
|
|
1462
1673
|
"a",
|
|
1463
1674
|
{
|
|
1464
1675
|
...attributes,
|
|
@@ -1479,9 +1690,9 @@ import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
|
1479
1690
|
|
|
1480
1691
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1481
1692
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1482
|
-
import * as
|
|
1483
|
-
import { jsx as
|
|
1484
|
-
var InputOTP =
|
|
1693
|
+
import * as React24 from "react";
|
|
1694
|
+
import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1695
|
+
var InputOTP = React24.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
1485
1696
|
OTPInput,
|
|
1486
1697
|
{
|
|
1487
1698
|
ref,
|
|
@@ -1494,10 +1705,10 @@ var InputOTP = React22.forwardRef(({ className, containerClassName, ...props },
|
|
|
1494
1705
|
}
|
|
1495
1706
|
));
|
|
1496
1707
|
InputOTP.displayName = "InputOTP";
|
|
1497
|
-
var InputOTPGroup =
|
|
1708
|
+
var InputOTPGroup = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1498
1709
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1499
|
-
var InputOTPSlot =
|
|
1500
|
-
const inputOTPContext =
|
|
1710
|
+
var InputOTPSlot = React24.forwardRef(({ index, className, ...props }, ref) => {
|
|
1711
|
+
const inputOTPContext = React24.useContext(OTPInputContext);
|
|
1501
1712
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1502
1713
|
return /* @__PURE__ */ jsxs24(
|
|
1503
1714
|
"div",
|
|
@@ -1511,8 +1722,8 @@ var InputOTPSlot = React22.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1511
1722
|
),
|
|
1512
1723
|
...props,
|
|
1513
1724
|
children: [
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ jsx45("span", { className: "inline-block size-4", children: char }),
|
|
1726
|
+
hasFakeCaret && /* @__PURE__ */ jsx45("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx45("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
1516
1727
|
]
|
|
1517
1728
|
}
|
|
1518
1729
|
);
|
|
@@ -1522,7 +1733,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
1522
1733
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1523
1734
|
import { useOryFlow as useOryFlow9 } from "@ory/elements-react";
|
|
1524
1735
|
import { FlowType as FlowType7 } from "@ory/client-fetch";
|
|
1525
|
-
import { jsx as
|
|
1736
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1526
1737
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1527
1738
|
const { setValue, watch } = useFormContext6();
|
|
1528
1739
|
const { maxlength, name } = attributes;
|
|
@@ -1532,14 +1743,14 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1532
1743
|
setValue(name, v);
|
|
1533
1744
|
};
|
|
1534
1745
|
const value = watch(name);
|
|
1535
|
-
return /* @__PURE__ */
|
|
1746
|
+
return /* @__PURE__ */ jsx46(
|
|
1536
1747
|
InputOTP,
|
|
1537
1748
|
{
|
|
1538
1749
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1539
1750
|
onChange: handleInputChange,
|
|
1540
1751
|
name,
|
|
1541
1752
|
value,
|
|
1542
|
-
children: /* @__PURE__ */
|
|
1753
|
+
children: /* @__PURE__ */ jsx46(
|
|
1543
1754
|
InputOTPGroup,
|
|
1544
1755
|
{
|
|
1545
1756
|
className: cn(
|
|
@@ -1547,7 +1758,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1547
1758
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1548
1759
|
flowType === FlowType7.Settings && "max-w-[488px]"
|
|
1549
1760
|
),
|
|
1550
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
1761
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx46(InputOTPSlot, { index }, index))
|
|
1551
1762
|
}
|
|
1552
1763
|
)
|
|
1553
1764
|
}
|
|
@@ -1555,13 +1766,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1555
1766
|
};
|
|
1556
1767
|
|
|
1557
1768
|
// src/theme/default/components/form/section.tsx
|
|
1558
|
-
import { jsx as
|
|
1769
|
+
import { jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1559
1770
|
var DefaultFormSection = ({
|
|
1560
1771
|
children,
|
|
1561
1772
|
nodes: _nodes,
|
|
1562
1773
|
...rest
|
|
1563
1774
|
}) => {
|
|
1564
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ jsx47(
|
|
1565
1776
|
"form",
|
|
1566
1777
|
{
|
|
1567
1778
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -1577,8 +1788,8 @@ var DefaultFormSectionContent = ({
|
|
|
1577
1788
|
}) => {
|
|
1578
1789
|
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
|
|
1579
1790
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-2", children: [
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1791
|
+
/* @__PURE__ */ jsx47("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
1792
|
+
/* @__PURE__ */ jsx47("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1582
1793
|
] }),
|
|
1583
1794
|
children
|
|
1584
1795
|
] });
|
|
@@ -1594,7 +1805,7 @@ var DefaultFormSectionFooter = ({
|
|
|
1594
1805
|
"flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
|
|
1595
1806
|
),
|
|
1596
1807
|
children: [
|
|
1597
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ jsx47("span", { children: text }),
|
|
1598
1809
|
children
|
|
1599
1810
|
]
|
|
1600
1811
|
}
|
|
@@ -1604,31 +1815,31 @@ var DefaultFormSectionFooter = ({
|
|
|
1604
1815
|
// src/theme/default/components/form/text.tsx
|
|
1605
1816
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
1606
1817
|
import { useIntl as useIntl12 } from "react-intl";
|
|
1607
|
-
import { Fragment as Fragment4, jsx as
|
|
1818
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1608
1819
|
function DefaultText({ node, attributes }) {
|
|
1609
1820
|
var _a;
|
|
1610
1821
|
const intl = useIntl12();
|
|
1611
1822
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
1612
1823
|
if (lookup) {
|
|
1613
1824
|
return /* @__PURE__ */ jsxs26(Fragment4, { children: [
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
lookup.map((text, index) => /* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ jsx48("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
1826
|
+
lookup.map((text, index) => /* @__PURE__ */ jsx48(
|
|
1616
1827
|
"pre",
|
|
1617
1828
|
{
|
|
1618
1829
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
1619
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ jsx48("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
1620
1831
|
},
|
|
1621
1832
|
index
|
|
1622
1833
|
))
|
|
1623
1834
|
] });
|
|
1624
1835
|
}
|
|
1625
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ jsx48(Fragment4, { children: /* @__PURE__ */ jsxs26(
|
|
1626
1837
|
"p",
|
|
1627
1838
|
{
|
|
1628
1839
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
1629
1840
|
id: attributes.id,
|
|
1630
1841
|
children: [
|
|
1631
|
-
node.meta.label ? /* @__PURE__ */
|
|
1842
|
+
node.meta.label ? /* @__PURE__ */ jsx48("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
1632
1843
|
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
1633
1844
|
]
|
|
1634
1845
|
}
|
|
@@ -1636,7 +1847,7 @@ function DefaultText({ node, attributes }) {
|
|
|
1636
1847
|
}
|
|
1637
1848
|
|
|
1638
1849
|
// src/theme/default/components/generic/page-header.tsx
|
|
1639
|
-
import { useComponents as
|
|
1850
|
+
import { useComponents as useComponents4 } from "@ory/elements-react";
|
|
1640
1851
|
|
|
1641
1852
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1642
1853
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
@@ -1661,22 +1872,22 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
1661
1872
|
}
|
|
1662
1873
|
|
|
1663
1874
|
// src/theme/default/assets/icons/logout.svg
|
|
1664
|
-
import * as
|
|
1665
|
-
import { jsx as
|
|
1875
|
+
import * as React25 from "react";
|
|
1876
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1666
1877
|
var SvgLogout = (props) => {
|
|
1667
1878
|
var _a, _b;
|
|
1668
|
-
return /* @__PURE__ */
|
|
1879
|
+
return /* @__PURE__ */ jsx49("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__ */ jsx49("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" }) });
|
|
1669
1880
|
};
|
|
1670
1881
|
var logout_default = SvgLogout;
|
|
1671
1882
|
|
|
1672
1883
|
// src/theme/default/assets/icons/settings.svg
|
|
1673
|
-
import * as
|
|
1674
|
-
import { jsx as
|
|
1884
|
+
import * as React26 from "react";
|
|
1885
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1675
1886
|
var SvgSettings = (props) => {
|
|
1676
1887
|
var _a, _b;
|
|
1677
|
-
return /* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
/* @__PURE__ */
|
|
1888
|
+
return /* @__PURE__ */ jsx50("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__ */ jsxs27("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1889
|
+
/* @__PURE__ */ jsx50("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" }),
|
|
1890
|
+
/* @__PURE__ */ jsx50("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1680
1891
|
] }) });
|
|
1681
1892
|
};
|
|
1682
1893
|
var settings_default = SvgSettings;
|
|
@@ -1723,10 +1934,10 @@ var getUserInitials = (session) => {
|
|
|
1723
1934
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1724
1935
|
import { forwardRef as forwardRef3 } from "react";
|
|
1725
1936
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1726
|
-
import { jsx as
|
|
1937
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1727
1938
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1728
1939
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1729
|
-
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */
|
|
1940
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx51(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx51(
|
|
1730
1941
|
DropdownMenuPrimitive.Content,
|
|
1731
1942
|
{
|
|
1732
1943
|
ref,
|
|
@@ -1741,7 +1952,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
1741
1952
|
}
|
|
1742
1953
|
) }));
|
|
1743
1954
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1744
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1955
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
1745
1956
|
DropdownMenuPrimitive.Item,
|
|
1746
1957
|
{
|
|
1747
1958
|
ref,
|
|
@@ -1759,7 +1970,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
1759
1970
|
}
|
|
1760
1971
|
));
|
|
1761
1972
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1762
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1973
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
1763
1974
|
DropdownMenuPrimitive.Label,
|
|
1764
1975
|
{
|
|
1765
1976
|
ref,
|
|
@@ -1777,32 +1988,32 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
|
1777
1988
|
import { forwardRef as forwardRef4 } from "react";
|
|
1778
1989
|
|
|
1779
1990
|
// src/theme/default/assets/icons/user.svg
|
|
1780
|
-
import * as
|
|
1781
|
-
import { jsx as
|
|
1991
|
+
import * as React27 from "react";
|
|
1992
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1782
1993
|
var SvgUser = (props) => {
|
|
1783
1994
|
var _a, _b;
|
|
1784
|
-
return /* @__PURE__ */
|
|
1995
|
+
return /* @__PURE__ */ jsx52("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__ */ jsx52("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" }) });
|
|
1785
1996
|
};
|
|
1786
1997
|
var user_default = SvgUser;
|
|
1787
1998
|
|
|
1788
1999
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1789
|
-
import { jsx as
|
|
2000
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1790
2001
|
var UserAvatar = forwardRef4(
|
|
1791
2002
|
({ initials, ...rest }, ref) => {
|
|
1792
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ jsx53(
|
|
1793
2004
|
"button",
|
|
1794
2005
|
{
|
|
1795
2006
|
ref,
|
|
1796
2007
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
1797
2008
|
...rest,
|
|
1798
|
-
children: /* @__PURE__ */
|
|
2009
|
+
children: /* @__PURE__ */ jsx53("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx53(
|
|
1799
2010
|
"img",
|
|
1800
2011
|
{
|
|
1801
2012
|
src: initials.avatar,
|
|
1802
2013
|
alt: initials.primary,
|
|
1803
2014
|
className: "w-full object-contain"
|
|
1804
2015
|
}
|
|
1805
|
-
) : /* @__PURE__ */
|
|
2016
|
+
) : /* @__PURE__ */ jsx53(
|
|
1806
2017
|
user_default,
|
|
1807
2018
|
{
|
|
1808
2019
|
size: 24,
|
|
@@ -1816,7 +2027,7 @@ var UserAvatar = forwardRef4(
|
|
|
1816
2027
|
UserAvatar.displayName = "UserAvatar";
|
|
1817
2028
|
|
|
1818
2029
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1819
|
-
import { jsx as
|
|
2030
|
+
import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1820
2031
|
var UserMenu = ({ session }) => {
|
|
1821
2032
|
const { config } = useOryFlow10();
|
|
1822
2033
|
const initials = getUserInitials(session);
|
|
@@ -1829,21 +2040,21 @@ var UserMenu = ({ session }) => {
|
|
|
1829
2040
|
void fetchLogoutFlow();
|
|
1830
2041
|
}, [fetchLogoutFlow]);
|
|
1831
2042
|
return /* @__PURE__ */ jsxs28(DropdownMenu, { children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ jsx54(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(UserAvatar, { initials }) }),
|
|
1833
2044
|
/* @__PURE__ */ jsxs28(DropdownMenuContent, { children: [
|
|
1834
2045
|
/* @__PURE__ */ jsxs28(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
1835
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ jsx54(UserAvatar, { disabled: true, initials }),
|
|
1836
2047
|
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
initials.secondary && /* @__PURE__ */
|
|
2048
|
+
/* @__PURE__ */ jsx54("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
2049
|
+
initials.secondary && /* @__PURE__ */ jsx54("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
1839
2050
|
] })
|
|
1840
2051
|
] }),
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ jsx54(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs28("a", { href: "/settings", children: [
|
|
2053
|
+
/* @__PURE__ */ jsx54(settings_default, { size: 16 }),
|
|
1843
2054
|
" User settings"
|
|
1844
2055
|
] }) }),
|
|
1845
|
-
/* @__PURE__ */
|
|
1846
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ jsx54(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs28("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
2057
|
+
/* @__PURE__ */ jsx54(logout_default, { size: 16 }),
|
|
1847
2058
|
" Logout"
|
|
1848
2059
|
] }) })
|
|
1849
2060
|
] })
|
|
@@ -1852,13 +2063,13 @@ var UserMenu = ({ session }) => {
|
|
|
1852
2063
|
|
|
1853
2064
|
// src/theme/default/components/generic/page-header.tsx
|
|
1854
2065
|
import { useSession } from "@ory/elements-react/client";
|
|
1855
|
-
import { jsx as
|
|
2066
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1856
2067
|
var DefaultPageHeader = (_props) => {
|
|
1857
|
-
const { Card } =
|
|
2068
|
+
const { Card } = useComponents4();
|
|
1858
2069
|
const { session } = useSession();
|
|
1859
|
-
return /* @__PURE__ */
|
|
1860
|
-
/* @__PURE__ */
|
|
1861
|
-
/* @__PURE__ */
|
|
2070
|
+
return /* @__PURE__ */ jsx55("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsx55("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs29("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
|
|
2071
|
+
/* @__PURE__ */ jsx55("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx55(Card.Logo, {}) }),
|
|
2072
|
+
/* @__PURE__ */ jsx55(UserMenu, { session })
|
|
1862
2073
|
] }) }) });
|
|
1863
2074
|
};
|
|
1864
2075
|
|
|
@@ -1868,16 +2079,16 @@ import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
|
1868
2079
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
1869
2080
|
|
|
1870
2081
|
// src/theme/default/assets/icons/trash.svg
|
|
1871
|
-
import * as
|
|
1872
|
-
import { jsx as
|
|
2082
|
+
import * as React28 from "react";
|
|
2083
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
1873
2084
|
var SvgTrash = (props) => {
|
|
1874
2085
|
var _a, _b;
|
|
1875
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ jsx56("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__ */ jsx56("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" }) });
|
|
1876
2087
|
};
|
|
1877
2088
|
var trash_default = SvgTrash;
|
|
1878
2089
|
|
|
1879
2090
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1880
|
-
import { jsx as
|
|
2091
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1881
2092
|
function DefaultSettingsOidc({
|
|
1882
2093
|
linkButtons,
|
|
1883
2094
|
unlinkButtons
|
|
@@ -1885,9 +2096,9 @@ function DefaultSettingsOidc({
|
|
|
1885
2096
|
const hasLinkButtons = linkButtons.length > 0;
|
|
1886
2097
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1887
2098
|
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-8", children: [
|
|
1888
|
-
hasLinkButtons && /* @__PURE__ */
|
|
2099
|
+
hasLinkButtons && /* @__PURE__ */ jsx57("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
1889
2100
|
const attrs = button.attributes;
|
|
1890
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ jsx57(
|
|
1891
2102
|
DefaultButtonSocial,
|
|
1892
2103
|
{
|
|
1893
2104
|
showLabel: true,
|
|
@@ -1898,12 +2109,12 @@ function DefaultSettingsOidc({
|
|
|
1898
2109
|
attrs.value
|
|
1899
2110
|
);
|
|
1900
2111
|
}) }),
|
|
1901
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
2112
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx57(DefaultHorizontalDivider, {}) : null,
|
|
1902
2113
|
unlinkButtons.map((button) => {
|
|
1903
2114
|
if (button.attributes.node_type !== "input") {
|
|
1904
2115
|
return null;
|
|
1905
2116
|
}
|
|
1906
|
-
return /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ jsx57(UnlinkRow, { button }, button.attributes.value);
|
|
1907
2118
|
})
|
|
1908
2119
|
] });
|
|
1909
2120
|
}
|
|
@@ -1927,10 +2138,10 @@ function UnlinkRow({ button }) {
|
|
|
1927
2138
|
}, [isSubmitting, setClicked]);
|
|
1928
2139
|
return /* @__PURE__ */ jsxs30("div", { className: "flex justify-between", children: [
|
|
1929
2140
|
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-6", children: [
|
|
1930
|
-
Logo ? /* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */
|
|
2141
|
+
Logo ? /* @__PURE__ */ jsx57(Logo, { size: 32 }) : /* @__PURE__ */ jsx57(provider_logos_default.generic, { size: 32 }),
|
|
2142
|
+
/* @__PURE__ */ jsx57("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
1932
2143
|
] }),
|
|
1933
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsx57(
|
|
1934
2145
|
"button",
|
|
1935
2146
|
{
|
|
1936
2147
|
...attrs,
|
|
@@ -1939,7 +2150,7 @@ function UnlinkRow({ button }) {
|
|
|
1939
2150
|
disabled: isSubmitting,
|
|
1940
2151
|
className: "relative",
|
|
1941
2152
|
title: `Unlink ${provider}`,
|
|
1942
|
-
children: clicked ? /* @__PURE__ */
|
|
2153
|
+
children: clicked ? /* @__PURE__ */ jsx57(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx57(
|
|
1943
2154
|
trash_default,
|
|
1944
2155
|
{
|
|
1945
2156
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -1952,9 +2163,9 @@ function UnlinkRow({ button }) {
|
|
|
1952
2163
|
}
|
|
1953
2164
|
|
|
1954
2165
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1955
|
-
import { useComponents as
|
|
2166
|
+
import { useComponents as useComponents5 } from "@ory/elements-react";
|
|
1956
2167
|
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
1957
|
-
import { jsx as
|
|
2168
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1958
2169
|
function DefaultSettingsPasskey({
|
|
1959
2170
|
triggerButton,
|
|
1960
2171
|
removeButtons
|
|
@@ -1962,10 +2173,10 @@ function DefaultSettingsPasskey({
|
|
|
1962
2173
|
const {
|
|
1963
2174
|
formState: { isSubmitting }
|
|
1964
2175
|
} = useFormContext8();
|
|
1965
|
-
const { Node: Node2 } =
|
|
2176
|
+
const { Node: Node2 } = useComponents5();
|
|
1966
2177
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
1967
2178
|
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
|
|
1968
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ jsx58("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx58(
|
|
1969
2180
|
Node2.Button,
|
|
1970
2181
|
{
|
|
1971
2182
|
node: triggerButton,
|
|
@@ -1974,8 +2185,8 @@ function DefaultSettingsPasskey({
|
|
|
1974
2185
|
}
|
|
1975
2186
|
) }),
|
|
1976
2187
|
hasRemoveButtons ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ jsx58(DefaultHorizontalDivider, {}),
|
|
2189
|
+
/* @__PURE__ */ jsx58("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1979
2190
|
var _a, _b;
|
|
1980
2191
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1981
2192
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -1986,25 +2197,25 @@ function DefaultSettingsPasskey({
|
|
|
1986
2197
|
{
|
|
1987
2198
|
className: "flex justify-between gap-6 md:items-center",
|
|
1988
2199
|
children: [
|
|
1989
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
1990
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2201
|
+
/* @__PURE__ */ jsx58(
|
|
1991
2202
|
passkey_default,
|
|
1992
2203
|
{
|
|
1993
2204
|
size: 32,
|
|
1994
2205
|
className: "text-interface-foreground-default-primary"
|
|
1995
2206
|
}
|
|
1996
2207
|
),
|
|
1997
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
1998
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col", children: [
|
|
1999
|
-
/* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2209
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col truncate", children: [
|
|
2210
|
+
/* @__PURE__ */ jsx58("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2211
|
+
/* @__PURE__ */ jsx58("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2001
2212
|
] }),
|
|
2002
|
-
addedAt && /* @__PURE__ */
|
|
2213
|
+
addedAt && /* @__PURE__ */ jsx58("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2003
2214
|
dateStyle: "long"
|
|
2004
2215
|
}).format(new Date(addedAt)) })
|
|
2005
2216
|
] })
|
|
2006
2217
|
] }),
|
|
2007
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ jsx58(
|
|
2008
2219
|
"button",
|
|
2009
2220
|
{
|
|
2010
2221
|
...node.attributes,
|
|
@@ -2012,7 +2223,7 @@ function DefaultSettingsPasskey({
|
|
|
2012
2223
|
onClick: node.onClick,
|
|
2013
2224
|
disabled: isSubmitting,
|
|
2014
2225
|
className: "relative",
|
|
2015
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2226
|
+
children: isSubmitting ? /* @__PURE__ */ jsx58(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx58(
|
|
2016
2227
|
trash_default,
|
|
2017
2228
|
{
|
|
2018
2229
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2031,38 +2242,38 @@ function DefaultSettingsPasskey({
|
|
|
2031
2242
|
}
|
|
2032
2243
|
|
|
2033
2244
|
// src/theme/default/assets/icons/download.svg
|
|
2034
|
-
import * as
|
|
2035
|
-
import { jsx as
|
|
2245
|
+
import * as React29 from "react";
|
|
2246
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2036
2247
|
var SvgDownload = (props) => {
|
|
2037
2248
|
var _a, _b;
|
|
2038
|
-
return /* @__PURE__ */
|
|
2249
|
+
return /* @__PURE__ */ jsx59("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__ */ jsx59("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" }) });
|
|
2039
2250
|
};
|
|
2040
2251
|
var download_default = SvgDownload;
|
|
2041
2252
|
|
|
2042
2253
|
// src/theme/default/assets/icons/eye.svg
|
|
2043
|
-
import * as
|
|
2044
|
-
import { jsx as
|
|
2254
|
+
import * as React30 from "react";
|
|
2255
|
+
import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2045
2256
|
var SvgEye = (props) => {
|
|
2046
2257
|
var _a, _b;
|
|
2047
|
-
return /* @__PURE__ */
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
/* @__PURE__ */
|
|
2258
|
+
return /* @__PURE__ */ jsx60("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__ */ jsxs32("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2259
|
+
/* @__PURE__ */ jsx60("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
2260
|
+
/* @__PURE__ */ jsx60("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
2050
2261
|
] }) });
|
|
2051
2262
|
};
|
|
2052
2263
|
var eye_default = SvgEye;
|
|
2053
2264
|
|
|
2054
2265
|
// src/theme/default/assets/icons/refresh.svg
|
|
2055
|
-
import * as
|
|
2056
|
-
import { jsx as
|
|
2266
|
+
import * as React31 from "react";
|
|
2267
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2057
2268
|
var SvgRefresh = (props) => {
|
|
2058
2269
|
var _a, _b;
|
|
2059
|
-
return /* @__PURE__ */
|
|
2270
|
+
return /* @__PURE__ */ jsx61("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__ */ jsx61("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" }) });
|
|
2060
2271
|
};
|
|
2061
2272
|
var refresh_default = SvgRefresh;
|
|
2062
2273
|
|
|
2063
2274
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
2064
2275
|
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
2065
|
-
import { Fragment as Fragment5, jsx as
|
|
2276
|
+
import { Fragment as Fragment5, jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2066
2277
|
function DefaultSettingsRecoveryCodes({
|
|
2067
2278
|
codes,
|
|
2068
2279
|
regnerateButton,
|
|
@@ -2085,11 +2296,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2085
2296
|
};
|
|
2086
2297
|
const hasCodes = codes.length >= 1;
|
|
2087
2298
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2088
|
-
codes.length > 0 && /* @__PURE__ */
|
|
2299
|
+
codes.length > 0 && /* @__PURE__ */ jsx62(DefaultHorizontalDivider, {}),
|
|
2089
2300
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-4 justify-between", children: [
|
|
2090
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ jsx62("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2091
2302
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-2", children: [
|
|
2092
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
2303
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx62(
|
|
2093
2304
|
"button",
|
|
2094
2305
|
{
|
|
2095
2306
|
...regnerateButton.attributes,
|
|
@@ -2098,7 +2309,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2098
2309
|
onClick: onRegenerate,
|
|
2099
2310
|
disabled: isSubmitting,
|
|
2100
2311
|
"data-loading": isSubmitting,
|
|
2101
|
-
children: /* @__PURE__ */
|
|
2312
|
+
children: /* @__PURE__ */ jsx62(
|
|
2102
2313
|
refresh_default,
|
|
2103
2314
|
{
|
|
2104
2315
|
size: 24,
|
|
@@ -2107,7 +2318,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2107
2318
|
)
|
|
2108
2319
|
}
|
|
2109
2320
|
),
|
|
2110
|
-
revealButton && /* @__PURE__ */
|
|
2321
|
+
revealButton && /* @__PURE__ */ jsx62(Fragment5, { children: /* @__PURE__ */ jsx62(
|
|
2111
2322
|
"button",
|
|
2112
2323
|
{
|
|
2113
2324
|
...revealButton.attributes,
|
|
@@ -2115,7 +2326,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2115
2326
|
className: "ml-auto",
|
|
2116
2327
|
onClick: onReveal,
|
|
2117
2328
|
title: "Reveal recovery codes",
|
|
2118
|
-
children: /* @__PURE__ */
|
|
2329
|
+
children: /* @__PURE__ */ jsx62(
|
|
2119
2330
|
eye_default,
|
|
2120
2331
|
{
|
|
2121
2332
|
size: 24,
|
|
@@ -2124,7 +2335,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2124
2335
|
)
|
|
2125
2336
|
}
|
|
2126
2337
|
) }),
|
|
2127
|
-
hasCodes && /* @__PURE__ */
|
|
2338
|
+
hasCodes && /* @__PURE__ */ jsx62(
|
|
2128
2339
|
"button",
|
|
2129
2340
|
{
|
|
2130
2341
|
onClick: onDownload,
|
|
@@ -2132,7 +2343,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2132
2343
|
className: "ml-auto",
|
|
2133
2344
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
2134
2345
|
title: "Download recovery codes",
|
|
2135
|
-
children: /* @__PURE__ */
|
|
2346
|
+
children: /* @__PURE__ */ jsx62(
|
|
2136
2347
|
download_default,
|
|
2137
2348
|
{
|
|
2138
2349
|
size: 24,
|
|
@@ -2143,32 +2354,32 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2143
2354
|
)
|
|
2144
2355
|
] })
|
|
2145
2356
|
] }),
|
|
2146
|
-
hasCodes ? /* @__PURE__ */
|
|
2357
|
+
hasCodes ? /* @__PURE__ */ jsx62("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx62(
|
|
2147
2358
|
"div",
|
|
2148
2359
|
{
|
|
2149
2360
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
2150
2361
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
2151
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
2362
|
+
children: codes.map((code) => /* @__PURE__ */ jsx62("p", { children: code }, code))
|
|
2152
2363
|
}
|
|
2153
2364
|
) }) : null
|
|
2154
2365
|
] });
|
|
2155
2366
|
}
|
|
2156
2367
|
|
|
2157
2368
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2158
|
-
import { useComponents as
|
|
2369
|
+
import { useComponents as useComponents6 } from "@ory/elements-react";
|
|
2159
2370
|
|
|
2160
2371
|
// src/theme/default/assets/icons/qrcode.svg
|
|
2161
|
-
import * as
|
|
2162
|
-
import { jsx as
|
|
2372
|
+
import * as React32 from "react";
|
|
2373
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2163
2374
|
var SvgQrcode = (props) => {
|
|
2164
2375
|
var _a, _b;
|
|
2165
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsx63("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__ */ jsx63("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" }) });
|
|
2166
2377
|
};
|
|
2167
2378
|
var qrcode_default = SvgQrcode;
|
|
2168
2379
|
|
|
2169
2380
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2170
2381
|
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
2171
|
-
import { jsx as
|
|
2382
|
+
import { jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2172
2383
|
function DefaultSettingsTotp({
|
|
2173
2384
|
totpImage,
|
|
2174
2385
|
totpInput,
|
|
@@ -2176,7 +2387,7 @@ function DefaultSettingsTotp({
|
|
|
2176
2387
|
totpUnlink,
|
|
2177
2388
|
onUnlink
|
|
2178
2389
|
}) {
|
|
2179
|
-
const { Node: Node2, Card } =
|
|
2390
|
+
const { Node: Node2, Card } = useComponents6();
|
|
2180
2391
|
const {
|
|
2181
2392
|
formState: { isSubmitting }
|
|
2182
2393
|
} = useFormContext10();
|
|
@@ -2189,18 +2400,18 @@ function DefaultSettingsTotp({
|
|
|
2189
2400
|
...buttonAttrs
|
|
2190
2401
|
} = totpUnlink.attributes;
|
|
2191
2402
|
return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2192
|
-
/* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ jsx64("div", { className: "col-span-full", children: /* @__PURE__ */ jsx64(Card.Divider, {}) }),
|
|
2193
2404
|
/* @__PURE__ */ jsxs34("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ jsx64("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx64(qrcode_default, { size: 32 }) }),
|
|
2406
|
+
/* @__PURE__ */ jsx64("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx64("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
2407
|
+
/* @__PURE__ */ jsx64(
|
|
2197
2408
|
"button",
|
|
2198
2409
|
{
|
|
2199
2410
|
type: type === "button" ? "button" : "submit",
|
|
2200
2411
|
...buttonAttrs,
|
|
2201
2412
|
onClick: onUnlink,
|
|
2202
2413
|
disabled: isSubmitting,
|
|
2203
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2414
|
+
children: isSubmitting ? /* @__PURE__ */ jsx64(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx64(
|
|
2204
2415
|
trash_default,
|
|
2205
2416
|
{
|
|
2206
2417
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2214,8 +2425,8 @@ function DefaultSettingsTotp({
|
|
|
2214
2425
|
}
|
|
2215
2426
|
if (totpImage && totpSecret && totpInput) {
|
|
2216
2427
|
return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ jsx64("div", { className: "col-span-full", children: /* @__PURE__ */ jsx64(DefaultHorizontalDivider, {}) }),
|
|
2429
|
+
/* @__PURE__ */ jsx64("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx64("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx64("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx64(
|
|
2219
2430
|
Node2.Image,
|
|
2220
2431
|
{
|
|
2221
2432
|
node: totpImage,
|
|
@@ -2225,12 +2436,12 @@ function DefaultSettingsTotp({
|
|
|
2225
2436
|
}
|
|
2226
2437
|
) }) }) }),
|
|
2227
2438
|
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-6", children: [
|
|
2228
|
-
/* @__PURE__ */
|
|
2439
|
+
/* @__PURE__ */ jsx64(
|
|
2229
2440
|
Node2.Label,
|
|
2230
2441
|
{
|
|
2231
2442
|
node: totpSecret,
|
|
2232
2443
|
attributes: totpSecret.attributes,
|
|
2233
|
-
children: /* @__PURE__ */
|
|
2444
|
+
children: /* @__PURE__ */ jsx64(
|
|
2234
2445
|
Node2.Input,
|
|
2235
2446
|
{
|
|
2236
2447
|
node: totpSecret,
|
|
@@ -2245,12 +2456,12 @@ function DefaultSettingsTotp({
|
|
|
2245
2456
|
)
|
|
2246
2457
|
}
|
|
2247
2458
|
),
|
|
2248
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ jsx64(
|
|
2249
2460
|
Node2.Label,
|
|
2250
2461
|
{
|
|
2251
2462
|
attributes: totpInput.attributes,
|
|
2252
2463
|
node: totpInput,
|
|
2253
|
-
children: /* @__PURE__ */
|
|
2464
|
+
children: /* @__PURE__ */ jsx64(
|
|
2254
2465
|
Node2.CodeInput,
|
|
2255
2466
|
{
|
|
2256
2467
|
node: totpInput,
|
|
@@ -2265,20 +2476,20 @@ function DefaultSettingsTotp({
|
|
|
2265
2476
|
}
|
|
2266
2477
|
|
|
2267
2478
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2268
|
-
import { useComponents as
|
|
2479
|
+
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
2269
2480
|
|
|
2270
2481
|
// src/theme/default/assets/icons/key.svg
|
|
2271
|
-
import * as
|
|
2272
|
-
import { jsx as
|
|
2482
|
+
import * as React33 from "react";
|
|
2483
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2273
2484
|
var SvgKey = (props) => {
|
|
2274
2485
|
var _a, _b;
|
|
2275
|
-
return /* @__PURE__ */
|
|
2486
|
+
return /* @__PURE__ */ jsx65("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__ */ jsx65("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" }) });
|
|
2276
2487
|
};
|
|
2277
2488
|
var key_default = SvgKey;
|
|
2278
2489
|
|
|
2279
2490
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2280
2491
|
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2281
|
-
import { jsx as
|
|
2492
|
+
import { jsx as jsx66, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2282
2493
|
function DefaultSettingsWebauthn({
|
|
2283
2494
|
nameInput,
|
|
2284
2495
|
triggerButton,
|
|
@@ -2287,16 +2498,16 @@ function DefaultSettingsWebauthn({
|
|
|
2287
2498
|
const {
|
|
2288
2499
|
formState: { isSubmitting }
|
|
2289
2500
|
} = useFormContext11();
|
|
2290
|
-
const { Node: Node2, Card } =
|
|
2501
|
+
const { Node: Node2, Card } = useComponents7();
|
|
2291
2502
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2292
2503
|
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
|
|
2293
2504
|
/* @__PURE__ */ jsxs35("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2294
|
-
/* @__PURE__ */
|
|
2505
|
+
/* @__PURE__ */ jsx66("div", { className: "flex-1", children: /* @__PURE__ */ jsx66(
|
|
2295
2506
|
Node2.Label,
|
|
2296
2507
|
{
|
|
2297
2508
|
node: nameInput,
|
|
2298
2509
|
attributes: nameInput.attributes,
|
|
2299
|
-
children: /* @__PURE__ */
|
|
2510
|
+
children: /* @__PURE__ */ jsx66(
|
|
2300
2511
|
Node2.Input,
|
|
2301
2512
|
{
|
|
2302
2513
|
node: nameInput,
|
|
@@ -2305,7 +2516,7 @@ function DefaultSettingsWebauthn({
|
|
|
2305
2516
|
)
|
|
2306
2517
|
}
|
|
2307
2518
|
) }),
|
|
2308
|
-
triggerButton ? /* @__PURE__ */
|
|
2519
|
+
triggerButton ? /* @__PURE__ */ jsx66(
|
|
2309
2520
|
Node2.Button,
|
|
2310
2521
|
{
|
|
2311
2522
|
node: triggerButton,
|
|
@@ -2315,8 +2526,8 @@ function DefaultSettingsWebauthn({
|
|
|
2315
2526
|
) : null
|
|
2316
2527
|
] }),
|
|
2317
2528
|
hasRemoveButtons ? /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2529
|
+
/* @__PURE__ */ jsx66(Card.Divider, {}),
|
|
2530
|
+
/* @__PURE__ */ jsx66("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2320
2531
|
var _a, _b;
|
|
2321
2532
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2322
2533
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2327,25 +2538,25 @@ function DefaultSettingsWebauthn({
|
|
|
2327
2538
|
{
|
|
2328
2539
|
className: "flex justify-between gap-6 md:items-center",
|
|
2329
2540
|
children: [
|
|
2330
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
2331
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2542
|
+
/* @__PURE__ */ jsx66(
|
|
2332
2543
|
key_default,
|
|
2333
2544
|
{
|
|
2334
2545
|
size: 32,
|
|
2335
2546
|
className: "text-interface-foreground-default-primary"
|
|
2336
2547
|
}
|
|
2337
2548
|
),
|
|
2338
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
2339
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col", children: [
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
/* @__PURE__ */
|
|
2549
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2550
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col truncate", children: [
|
|
2551
|
+
/* @__PURE__ */ jsx66("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2552
|
+
/* @__PURE__ */ jsx66("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2342
2553
|
] }),
|
|
2343
|
-
addedAt && /* @__PURE__ */
|
|
2554
|
+
addedAt && /* @__PURE__ */ jsx66("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2344
2555
|
dateStyle: "long"
|
|
2345
2556
|
}).format(new Date(addedAt)) })
|
|
2346
2557
|
] })
|
|
2347
2558
|
] }),
|
|
2348
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ jsx66(
|
|
2349
2560
|
"button",
|
|
2350
2561
|
{
|
|
2351
2562
|
...node.attributes,
|
|
@@ -2353,7 +2564,7 @@ function DefaultSettingsWebauthn({
|
|
|
2353
2564
|
onClick: node.onClick,
|
|
2354
2565
|
disabled: isSubmitting,
|
|
2355
2566
|
className: "relative",
|
|
2356
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2567
|
+
children: isSubmitting ? /* @__PURE__ */ jsx66(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx66(
|
|
2357
2568
|
trash_default,
|
|
2358
2569
|
{
|
|
2359
2570
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2372,11 +2583,11 @@ function DefaultSettingsWebauthn({
|
|
|
2372
2583
|
}
|
|
2373
2584
|
|
|
2374
2585
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2375
|
-
import { jsx as
|
|
2586
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2376
2587
|
function DefaultAuthMethodListContainer({
|
|
2377
2588
|
children
|
|
2378
2589
|
}) {
|
|
2379
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ jsx67("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2380
2591
|
}
|
|
2381
2592
|
|
|
2382
2593
|
// src/theme/default/components/form/captcha.tsx
|
|
@@ -2385,38 +2596,6 @@ import { Turnstile } from "@marsidev/react-turnstile";
|
|
|
2385
2596
|
import { useRef as useRef2 } from "react";
|
|
2386
2597
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
2387
2598
|
|
|
2388
|
-
// src/context/component.tsx
|
|
2389
|
-
import {
|
|
2390
|
-
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
2391
|
-
UiNodeGroupEnum
|
|
2392
|
-
} from "@ory/client-fetch";
|
|
2393
|
-
import { createContext, useContext as useContext2 } from "react";
|
|
2394
|
-
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2395
|
-
var ComponentContext = createContext({
|
|
2396
|
-
components: null,
|
|
2397
|
-
// fine because we throw an error if it's not provided
|
|
2398
|
-
nodeSorter: () => 0,
|
|
2399
|
-
groupSorter: () => 0
|
|
2400
|
-
});
|
|
2401
|
-
function useComponents7() {
|
|
2402
|
-
const ctx = useContext2(ComponentContext);
|
|
2403
|
-
if (!ctx) {
|
|
2404
|
-
throw new Error("useComponents must be used within a ComponentProvider");
|
|
2405
|
-
}
|
|
2406
|
-
return ctx.components;
|
|
2407
|
-
}
|
|
2408
|
-
var defaultGroupOrder = [
|
|
2409
|
-
UiNodeGroupEnum.Default,
|
|
2410
|
-
UiNodeGroupEnum.Profile,
|
|
2411
|
-
UiNodeGroupEnum.Password,
|
|
2412
|
-
UiNodeGroupEnum.Oidc,
|
|
2413
|
-
UiNodeGroupEnum.Code,
|
|
2414
|
-
UiNodeGroupEnum.LookupSecret,
|
|
2415
|
-
UiNodeGroupEnum.Passkey,
|
|
2416
|
-
UiNodeGroupEnum.Webauthn,
|
|
2417
|
-
UiNodeGroupEnum.Totp
|
|
2418
|
-
];
|
|
2419
|
-
|
|
2420
2599
|
// src/context/flow-context.tsx
|
|
2421
2600
|
import {
|
|
2422
2601
|
createContext as createContext2,
|
|
@@ -2425,73 +2604,21 @@ import {
|
|
|
2425
2604
|
} from "react";
|
|
2426
2605
|
|
|
2427
2606
|
// src/context/form-state.ts
|
|
2428
|
-
import { FlowType as
|
|
2607
|
+
import { FlowType as FlowType9 } from "@ory/client-fetch";
|
|
2429
2608
|
import { useReducer } from "react";
|
|
2430
2609
|
|
|
2431
2610
|
// src/components/card/card-two-step.utils.ts
|
|
2432
|
-
import { UiNodeGroupEnum as
|
|
2433
|
-
|
|
2434
|
-
// src/util/ui/index.ts
|
|
2435
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
|
|
2436
|
-
import { useMemo } from "react";
|
|
2437
|
-
function triggerToWindowCall(trigger) {
|
|
2438
|
-
if (!trigger) {
|
|
2439
|
-
return;
|
|
2440
|
-
}
|
|
2441
|
-
const fn = triggerToFunction(trigger);
|
|
2442
|
-
if (fn) {
|
|
2443
|
-
fn();
|
|
2444
|
-
return;
|
|
2445
|
-
}
|
|
2446
|
-
let i = 0;
|
|
2447
|
-
const ms = 100;
|
|
2448
|
-
const interval = setInterval(() => {
|
|
2449
|
-
i++;
|
|
2450
|
-
if (i > 100) {
|
|
2451
|
-
clearInterval(interval);
|
|
2452
|
-
throw new Error(
|
|
2453
|
-
"Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
|
|
2454
|
-
);
|
|
2455
|
-
}
|
|
2456
|
-
const fn2 = triggerToFunction(trigger);
|
|
2457
|
-
if (fn2) {
|
|
2458
|
-
clearInterval(interval);
|
|
2459
|
-
return fn2();
|
|
2460
|
-
}
|
|
2461
|
-
}, ms);
|
|
2462
|
-
return;
|
|
2463
|
-
}
|
|
2464
|
-
function triggerToFunction(trigger) {
|
|
2465
|
-
if (typeof window === "undefined") {
|
|
2466
|
-
console.debug(
|
|
2467
|
-
"The Ory SDK is missing a required function: window is undefined."
|
|
2468
|
-
);
|
|
2469
|
-
return void 0;
|
|
2470
|
-
}
|
|
2471
|
-
const typedWindow = window;
|
|
2472
|
-
if (!(trigger in typedWindow) || !typedWindow[trigger]) {
|
|
2473
|
-
console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
|
|
2474
|
-
return void 0;
|
|
2475
|
-
}
|
|
2476
|
-
const triggerFn = typedWindow[trigger];
|
|
2477
|
-
if (typeof triggerFn !== "function") {
|
|
2478
|
-
console.debug(
|
|
2479
|
-
`The Ory SDK is missing a required function: ${trigger}. It is not a function.`
|
|
2480
|
-
);
|
|
2481
|
-
return void 0;
|
|
2482
|
-
}
|
|
2483
|
-
return triggerFn;
|
|
2484
|
-
}
|
|
2611
|
+
import { FlowType as FlowType8, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
|
|
2485
2612
|
|
|
2486
2613
|
// src/context/flow-context.tsx
|
|
2487
|
-
import { jsx as
|
|
2614
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2488
2615
|
var OryFlowContext = createContext2(null);
|
|
2489
2616
|
|
|
2490
2617
|
// src/context/intl-context.tsx
|
|
2491
2618
|
import { IntlProvider as OriginalIntlProvider } from "react-intl";
|
|
2492
2619
|
|
|
2493
2620
|
// src/components/card/header.tsx
|
|
2494
|
-
import { jsx as
|
|
2621
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2495
2622
|
|
|
2496
2623
|
// src/components/form/form-provider.tsx
|
|
2497
2624
|
import { UiNodeGroupEnum as UiNodeGroupEnum5 } from "@ory/client-fetch";
|
|
@@ -2504,16 +2631,16 @@ import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client
|
|
|
2504
2631
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
|
|
2505
2632
|
|
|
2506
2633
|
// src/components/form/form-provider.tsx
|
|
2507
|
-
import { jsx as
|
|
2634
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2508
2635
|
|
|
2509
2636
|
// src/components/card/card.tsx
|
|
2510
|
-
import { jsx as
|
|
2637
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2511
2638
|
|
|
2512
2639
|
// src/components/card/footer.tsx
|
|
2513
|
-
import { jsx as
|
|
2640
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2514
2641
|
|
|
2515
2642
|
// src/components/card/content.tsx
|
|
2516
|
-
import { jsx as
|
|
2643
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2517
2644
|
|
|
2518
2645
|
// src/components/card/card-two-step.tsx
|
|
2519
2646
|
import { UiNodeGroupEnum as UiNodeGroupEnum7 } from "@ory/client-fetch";
|
|
@@ -2521,6 +2648,7 @@ import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
|
2521
2648
|
|
|
2522
2649
|
// src/components/form/form.tsx
|
|
2523
2650
|
import {
|
|
2651
|
+
FlowType as FlowType16,
|
|
2524
2652
|
isUiNodeAnchorAttributes,
|
|
2525
2653
|
isUiNodeImageAttributes,
|
|
2526
2654
|
isUiNodeInputAttributes as isUiNodeInputAttributes5,
|
|
@@ -2531,20 +2659,20 @@ import { useIntl as useIntl13 } from "react-intl";
|
|
|
2531
2659
|
|
|
2532
2660
|
// src/components/form/useOryFormSubmit.ts
|
|
2533
2661
|
import {
|
|
2534
|
-
FlowType as
|
|
2662
|
+
FlowType as FlowType15
|
|
2535
2663
|
} from "@ory/client-fetch";
|
|
2536
2664
|
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
2537
2665
|
|
|
2538
2666
|
// src/util/onSubmitLogin.ts
|
|
2539
2667
|
import {
|
|
2540
|
-
FlowType as
|
|
2668
|
+
FlowType as FlowType10,
|
|
2541
2669
|
handleFlowError,
|
|
2542
2670
|
loginUrl
|
|
2543
2671
|
} from "@ory/client-fetch";
|
|
2544
2672
|
|
|
2545
2673
|
// src/util/onSubmitRecovery.ts
|
|
2546
2674
|
import {
|
|
2547
|
-
FlowType as
|
|
2675
|
+
FlowType as FlowType11,
|
|
2548
2676
|
handleContinueWith,
|
|
2549
2677
|
handleFlowError as handleFlowError2,
|
|
2550
2678
|
instanceOfContinueWithRecoveryUi,
|
|
@@ -2553,7 +2681,7 @@ import {
|
|
|
2553
2681
|
|
|
2554
2682
|
// src/util/onSubmitRegistration.ts
|
|
2555
2683
|
import {
|
|
2556
|
-
FlowType as
|
|
2684
|
+
FlowType as FlowType12,
|
|
2557
2685
|
handleContinueWith as handleContinueWith2,
|
|
2558
2686
|
handleFlowError as handleFlowError3,
|
|
2559
2687
|
registrationUrl
|
|
@@ -2561,7 +2689,7 @@ import {
|
|
|
2561
2689
|
|
|
2562
2690
|
// src/util/onSubmitSettings.ts
|
|
2563
2691
|
import {
|
|
2564
|
-
FlowType as
|
|
2692
|
+
FlowType as FlowType13,
|
|
2565
2693
|
handleContinueWith as handleContinueWith3,
|
|
2566
2694
|
handleFlowError as handleFlowError4,
|
|
2567
2695
|
isResponseError,
|
|
@@ -2571,16 +2699,16 @@ import {
|
|
|
2571
2699
|
|
|
2572
2700
|
// src/util/onSubmitVerification.ts
|
|
2573
2701
|
import {
|
|
2574
|
-
FlowType as
|
|
2702
|
+
FlowType as FlowType14,
|
|
2575
2703
|
handleFlowError as handleFlowError5,
|
|
2576
2704
|
verificationUrl
|
|
2577
2705
|
} from "@ory/client-fetch";
|
|
2578
2706
|
|
|
2579
2707
|
// src/components/form/form.tsx
|
|
2580
|
-
import { jsx as
|
|
2708
|
+
import { Fragment as Fragment6, jsx as jsx74, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2581
2709
|
|
|
2582
2710
|
// src/components/form/messages.tsx
|
|
2583
|
-
import { jsx as
|
|
2711
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2584
2712
|
|
|
2585
2713
|
// src/components/form/nodes/node.tsx
|
|
2586
2714
|
import {
|
|
@@ -2591,27 +2719,27 @@ import {
|
|
|
2591
2719
|
isUiNodeTextAttributes,
|
|
2592
2720
|
UiNodeGroupEnum as UiNodeGroupEnum6
|
|
2593
2721
|
} from "@ory/client-fetch";
|
|
2594
|
-
import { jsx as
|
|
2722
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2595
2723
|
|
|
2596
2724
|
// src/components/form/social.tsx
|
|
2597
2725
|
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
2598
|
-
import { jsx as
|
|
2726
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2599
2727
|
|
|
2600
2728
|
// src/components/card/card-two-step.tsx
|
|
2601
|
-
import { Fragment as
|
|
2729
|
+
import { Fragment as Fragment7, jsx as jsx78, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2602
2730
|
|
|
2603
2731
|
// src/components/form/groups.tsx
|
|
2604
|
-
import { jsx as
|
|
2732
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2605
2733
|
|
|
2606
2734
|
// src/components/form/section.tsx
|
|
2607
2735
|
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
2608
|
-
import { jsx as
|
|
2736
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2609
2737
|
|
|
2610
2738
|
// src/components/generic/divider.tsx
|
|
2611
|
-
import { jsx as
|
|
2739
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2612
2740
|
|
|
2613
2741
|
// src/components/generic/page-header.tsx
|
|
2614
|
-
import { jsx as
|
|
2742
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
2615
2743
|
|
|
2616
2744
|
// src/components/settings/settings-card.tsx
|
|
2617
2745
|
import { UiNodeGroupEnum as UiNodeGroupEnum8 } from "@ory/client-fetch";
|
|
@@ -2620,36 +2748,36 @@ import { useIntl as useIntl19 } from "react-intl";
|
|
|
2620
2748
|
// src/components/settings/oidc-settings.tsx
|
|
2621
2749
|
import { useIntl as useIntl14 } from "react-intl";
|
|
2622
2750
|
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
2623
|
-
import { Fragment as
|
|
2751
|
+
import { Fragment as Fragment8, jsx as jsx83, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2624
2752
|
|
|
2625
2753
|
// src/components/settings/passkey-settings.tsx
|
|
2626
2754
|
import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
2627
2755
|
import { useIntl as useIntl15 } from "react-intl";
|
|
2628
|
-
import { Fragment as
|
|
2756
|
+
import { Fragment as Fragment9, jsx as jsx84, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2629
2757
|
|
|
2630
2758
|
// src/components/settings/recovery-codes-settings.tsx
|
|
2631
2759
|
import { useIntl as useIntl16 } from "react-intl";
|
|
2632
2760
|
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
2633
|
-
import { Fragment as
|
|
2761
|
+
import { Fragment as Fragment10, jsx as jsx85, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2634
2762
|
|
|
2635
2763
|
// src/components/settings/totp-settings.tsx
|
|
2636
2764
|
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
2637
2765
|
import { useIntl as useIntl17 } from "react-intl";
|
|
2638
|
-
import { Fragment as
|
|
2766
|
+
import { Fragment as Fragment11, jsx as jsx86, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
2639
2767
|
|
|
2640
2768
|
// src/components/settings/webauthn-settings.tsx
|
|
2641
2769
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
2642
2770
|
import { useIntl as useIntl18 } from "react-intl";
|
|
2643
|
-
import { Fragment as
|
|
2771
|
+
import { Fragment as Fragment12, jsx as jsx87, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
2644
2772
|
|
|
2645
2773
|
// src/components/settings/settings-card.tsx
|
|
2646
|
-
import { Fragment as
|
|
2774
|
+
import { Fragment as Fragment13, jsx as jsx88, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
2647
2775
|
|
|
2648
2776
|
// src/context/intl-context.tsx
|
|
2649
|
-
import { jsx as
|
|
2777
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
2650
2778
|
|
|
2651
2779
|
// src/context/provider.tsx
|
|
2652
|
-
import { jsx as
|
|
2780
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
2653
2781
|
|
|
2654
2782
|
// src/components/form/nodes/input.tsx
|
|
2655
2783
|
import {
|
|
@@ -2657,13 +2785,13 @@ import {
|
|
|
2657
2785
|
} from "@ory/client-fetch";
|
|
2658
2786
|
import { useEffect as useEffect5, useRef } from "react";
|
|
2659
2787
|
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
2660
|
-
import { jsx as
|
|
2788
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
2661
2789
|
var NodeInput = ({
|
|
2662
2790
|
node,
|
|
2663
2791
|
attributes
|
|
2664
2792
|
}) => {
|
|
2665
2793
|
var _a;
|
|
2666
|
-
const { Node: Node2 } =
|
|
2794
|
+
const { Node: Node2 } = useComponents();
|
|
2667
2795
|
const { setValue } = useFormContext22();
|
|
2668
2796
|
const {
|
|
2669
2797
|
onloadTrigger,
|
|
@@ -2711,30 +2839,30 @@ var NodeInput = ({
|
|
|
2711
2839
|
if (isResendNode || isScreenSelectionNode) {
|
|
2712
2840
|
return null;
|
|
2713
2841
|
}
|
|
2714
|
-
return /* @__PURE__ */
|
|
2842
|
+
return /* @__PURE__ */ jsx91(
|
|
2715
2843
|
Node2.Label,
|
|
2716
2844
|
{
|
|
2717
2845
|
attributes: { ...attrs, label: void 0 },
|
|
2718
2846
|
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2719
|
-
children: /* @__PURE__ */
|
|
2847
|
+
children: /* @__PURE__ */ jsx91(Node2.Button, { attributes: attrs, node, onClick: handleClick })
|
|
2720
2848
|
}
|
|
2721
2849
|
);
|
|
2722
2850
|
case UiNodeInputAttributesTypeEnum.DatetimeLocal:
|
|
2723
2851
|
throw new Error("Not implemented");
|
|
2724
2852
|
case UiNodeInputAttributesTypeEnum.Checkbox:
|
|
2725
|
-
return /* @__PURE__ */
|
|
2853
|
+
return /* @__PURE__ */ jsx91(
|
|
2726
2854
|
Node2.Label,
|
|
2727
2855
|
{
|
|
2728
2856
|
attributes: { ...attrs, label: void 0 },
|
|
2729
2857
|
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2730
|
-
children: /* @__PURE__ */
|
|
2858
|
+
children: /* @__PURE__ */ jsx91(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
|
|
2731
2859
|
}
|
|
2732
2860
|
);
|
|
2733
2861
|
case UiNodeInputAttributesTypeEnum.Hidden:
|
|
2734
|
-
return /* @__PURE__ */
|
|
2862
|
+
return /* @__PURE__ */ jsx91(Node2.Input, { attributes: attrs, node, onClick: handleClick });
|
|
2735
2863
|
default:
|
|
2736
2864
|
if (isPinCodeInput) {
|
|
2737
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsx91(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx91(
|
|
2738
2866
|
Node2.CodeInput,
|
|
2739
2867
|
{
|
|
2740
2868
|
attributes: attrs,
|
|
@@ -2743,25 +2871,25 @@ var NodeInput = ({
|
|
|
2743
2871
|
}
|
|
2744
2872
|
) });
|
|
2745
2873
|
}
|
|
2746
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ jsx91(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx91(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
|
|
2747
2875
|
}
|
|
2748
2876
|
};
|
|
2749
2877
|
|
|
2750
2878
|
// src/theme/default/components/form/captcha.tsx
|
|
2751
|
-
import { jsx as
|
|
2879
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
2752
2880
|
var DefaultCaptcha = ({ node }) => {
|
|
2753
2881
|
const { setValue } = useFormContext23();
|
|
2754
2882
|
const ref = useRef2();
|
|
2755
2883
|
const nodes = [];
|
|
2756
2884
|
if (isUiNodeInputAttributes7(node.attributes)) {
|
|
2757
2885
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2758
|
-
nodes.push(/* @__PURE__ */
|
|
2886
|
+
nodes.push(/* @__PURE__ */ jsx92(NodeInput, { node, attributes: node.attributes }, 1));
|
|
2759
2887
|
}
|
|
2760
2888
|
}
|
|
2761
2889
|
if (isUiNodeInputAttributes7(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2762
2890
|
const options = JSON.parse(node.attributes.value);
|
|
2763
2891
|
nodes.push(
|
|
2764
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ jsx92(
|
|
2765
2893
|
Turnstile,
|
|
2766
2894
|
{
|
|
2767
2895
|
ref,
|
|
@@ -2838,21 +2966,21 @@ function getOryComponents(overrides) {
|
|
|
2838
2966
|
}
|
|
2839
2967
|
|
|
2840
2968
|
// src/theme/default/flows/error.tsx
|
|
2841
|
-
import { jsx as
|
|
2969
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
2842
2970
|
function Error2({
|
|
2843
2971
|
error,
|
|
2844
2972
|
children
|
|
2845
2973
|
}) {
|
|
2846
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx93("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
|
|
2847
2975
|
}
|
|
2848
2976
|
|
|
2849
2977
|
// src/theme/default/flows/login.tsx
|
|
2850
|
-
import { FlowType as
|
|
2978
|
+
import { FlowType as FlowType17 } from "@ory/client-fetch";
|
|
2851
2979
|
import {
|
|
2852
2980
|
OryProvider,
|
|
2853
2981
|
OryTwoStepCard as OryTwoStepCard2
|
|
2854
2982
|
} from "@ory/elements-react";
|
|
2855
|
-
import { jsx as
|
|
2983
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
2856
2984
|
function Login({
|
|
2857
2985
|
flow,
|
|
2858
2986
|
config,
|
|
@@ -2860,25 +2988,25 @@ function Login({
|
|
|
2860
2988
|
components: flowOverrideComponents
|
|
2861
2989
|
}) {
|
|
2862
2990
|
const components = getOryComponents(flowOverrideComponents);
|
|
2863
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx94(
|
|
2864
2992
|
OryProvider,
|
|
2865
2993
|
{
|
|
2866
2994
|
config,
|
|
2867
2995
|
flow,
|
|
2868
|
-
flowType:
|
|
2996
|
+
flowType: FlowType17.Login,
|
|
2869
2997
|
components,
|
|
2870
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2998
|
+
children: children != null ? children : /* @__PURE__ */ jsx94(OryTwoStepCard2, {})
|
|
2871
2999
|
}
|
|
2872
3000
|
);
|
|
2873
3001
|
}
|
|
2874
3002
|
|
|
2875
3003
|
// src/theme/default/flows/recovery.tsx
|
|
2876
|
-
import { FlowType as
|
|
3004
|
+
import { FlowType as FlowType18 } from "@ory/client-fetch";
|
|
2877
3005
|
import {
|
|
2878
3006
|
OryProvider as OryProvider2,
|
|
2879
3007
|
OryTwoStepCard as OryTwoStepCard3
|
|
2880
3008
|
} from "@ory/elements-react";
|
|
2881
|
-
import { jsx as
|
|
3009
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
2882
3010
|
function Recovery({
|
|
2883
3011
|
flow,
|
|
2884
3012
|
config,
|
|
@@ -2886,25 +3014,25 @@ function Recovery({
|
|
|
2886
3014
|
components: flowOverrideComponents
|
|
2887
3015
|
}) {
|
|
2888
3016
|
const components = getOryComponents(flowOverrideComponents);
|
|
2889
|
-
return /* @__PURE__ */
|
|
3017
|
+
return /* @__PURE__ */ jsx95(
|
|
2890
3018
|
OryProvider2,
|
|
2891
3019
|
{
|
|
2892
3020
|
config,
|
|
2893
3021
|
flow,
|
|
2894
|
-
flowType:
|
|
3022
|
+
flowType: FlowType18.Recovery,
|
|
2895
3023
|
components,
|
|
2896
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3024
|
+
children: children != null ? children : /* @__PURE__ */ jsx95(OryTwoStepCard3, {})
|
|
2897
3025
|
}
|
|
2898
3026
|
);
|
|
2899
3027
|
}
|
|
2900
3028
|
|
|
2901
3029
|
// src/theme/default/flows/registration.tsx
|
|
2902
|
-
import { FlowType as
|
|
3030
|
+
import { FlowType as FlowType19 } from "@ory/client-fetch";
|
|
2903
3031
|
import {
|
|
2904
3032
|
OryProvider as OryProvider3,
|
|
2905
3033
|
OryTwoStepCard as OryTwoStepCard4
|
|
2906
3034
|
} from "@ory/elements-react";
|
|
2907
|
-
import { jsx as
|
|
3035
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
2908
3036
|
function Registration({
|
|
2909
3037
|
flow,
|
|
2910
3038
|
children,
|
|
@@ -2912,26 +3040,26 @@ function Registration({
|
|
|
2912
3040
|
config
|
|
2913
3041
|
}) {
|
|
2914
3042
|
const components = getOryComponents(flowOverrideComponents);
|
|
2915
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ jsx96(
|
|
2916
3044
|
OryProvider3,
|
|
2917
3045
|
{
|
|
2918
3046
|
config,
|
|
2919
3047
|
flow,
|
|
2920
|
-
flowType:
|
|
3048
|
+
flowType: FlowType19.Registration,
|
|
2921
3049
|
components,
|
|
2922
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3050
|
+
children: children != null ? children : /* @__PURE__ */ jsx96(OryTwoStepCard4, {})
|
|
2923
3051
|
}
|
|
2924
3052
|
);
|
|
2925
3053
|
}
|
|
2926
3054
|
|
|
2927
3055
|
// src/theme/default/flows/settings.tsx
|
|
2928
|
-
import { FlowType as
|
|
3056
|
+
import { FlowType as FlowType20 } from "@ory/client-fetch";
|
|
2929
3057
|
import {
|
|
2930
3058
|
HeadlessPageHeader,
|
|
2931
3059
|
OryProvider as OryProvider4,
|
|
2932
3060
|
OrySettingsCard
|
|
2933
3061
|
} from "@ory/elements-react";
|
|
2934
|
-
import { Fragment as
|
|
3062
|
+
import { Fragment as Fragment14, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
2935
3063
|
function Settings({
|
|
2936
3064
|
flow,
|
|
2937
3065
|
config,
|
|
@@ -2939,28 +3067,28 @@ function Settings({
|
|
|
2939
3067
|
components: flowOverrideComponents
|
|
2940
3068
|
}) {
|
|
2941
3069
|
const components = getOryComponents(flowOverrideComponents);
|
|
2942
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ jsx97(
|
|
2943
3071
|
OryProvider4,
|
|
2944
3072
|
{
|
|
2945
3073
|
config,
|
|
2946
3074
|
flow,
|
|
2947
|
-
flowType:
|
|
3075
|
+
flowType: FlowType20.Settings,
|
|
2948
3076
|
components,
|
|
2949
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
2951
|
-
/* @__PURE__ */
|
|
3077
|
+
children: children != null ? children : /* @__PURE__ */ jsxs44(Fragment14, { children: [
|
|
3078
|
+
/* @__PURE__ */ jsx97(HeadlessPageHeader, {}),
|
|
3079
|
+
/* @__PURE__ */ jsx97(OrySettingsCard, {})
|
|
2952
3080
|
] })
|
|
2953
3081
|
}
|
|
2954
3082
|
);
|
|
2955
3083
|
}
|
|
2956
3084
|
|
|
2957
3085
|
// src/theme/default/flows/verification.tsx
|
|
2958
|
-
import { FlowType as
|
|
3086
|
+
import { FlowType as FlowType21 } from "@ory/client-fetch";
|
|
2959
3087
|
import {
|
|
2960
3088
|
OryProvider as OryProvider5,
|
|
2961
3089
|
OryTwoStepCard as OryTwoStepCard5
|
|
2962
3090
|
} from "@ory/elements-react";
|
|
2963
|
-
import { jsx as
|
|
3091
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
2964
3092
|
function Verification({
|
|
2965
3093
|
flow,
|
|
2966
3094
|
config,
|
|
@@ -2968,14 +3096,14 @@ function Verification({
|
|
|
2968
3096
|
components: flowOverrideComponents
|
|
2969
3097
|
}) {
|
|
2970
3098
|
const components = getOryComponents(flowOverrideComponents);
|
|
2971
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ jsx98(
|
|
2972
3100
|
OryProvider5,
|
|
2973
3101
|
{
|
|
2974
3102
|
config,
|
|
2975
3103
|
flow,
|
|
2976
|
-
flowType:
|
|
3104
|
+
flowType: FlowType21.Verification,
|
|
2977
3105
|
components,
|
|
2978
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3106
|
+
children: children != null ? children : /* @__PURE__ */ jsx98(OryTwoStepCard5, {})
|
|
2979
3107
|
}
|
|
2980
3108
|
);
|
|
2981
3109
|
}
|