@ory/elements-react 1.0.0-next.30 → 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 +25 -0
- package/DEVELOPMENT.md +19 -4
- package/babel.config.js +10 -0
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +225 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -75
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +121 -110
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +969 -460
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +940 -381
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +6 -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) {
|
|
@@ -135,14 +305,19 @@ function RegistrationCardFooter() {
|
|
|
135
305
|
function handleScreenSelection() {
|
|
136
306
|
setValue("method", "profile");
|
|
137
307
|
if (screenSelectionNode) {
|
|
138
|
-
setValue(
|
|
308
|
+
setValue(
|
|
309
|
+
screenSelectionNode.attributes.name,
|
|
310
|
+
screenSelectionNode.attributes.value
|
|
311
|
+
);
|
|
139
312
|
}
|
|
140
313
|
}
|
|
141
|
-
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(
|
|
142
315
|
"button",
|
|
143
316
|
{
|
|
144
317
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
145
318
|
type: "submit",
|
|
319
|
+
name: screenSelectionNode.attributes.name,
|
|
320
|
+
value: screenSelectionNode.attributes.value,
|
|
146
321
|
onClick: handleScreenSelection,
|
|
147
322
|
children: intl.formatMessage({
|
|
148
323
|
id: "card.footer.select-another-method",
|
|
@@ -155,7 +330,7 @@ function RegistrationCardFooter() {
|
|
|
155
330
|
defaultMessage: "Already have an account?"
|
|
156
331
|
}),
|
|
157
332
|
" ",
|
|
158
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ jsx5(
|
|
159
334
|
"a",
|
|
160
335
|
{
|
|
161
336
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -177,12 +352,12 @@ function VerificationCardFooter() {
|
|
|
177
352
|
}
|
|
178
353
|
|
|
179
354
|
// src/theme/default/components/card/header.tsx
|
|
180
|
-
import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
355
|
+
import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
181
356
|
|
|
182
357
|
// src/theme/default/utils/constructCardHeader.ts
|
|
183
358
|
import {
|
|
184
359
|
FlowType as FlowType2,
|
|
185
|
-
isUiNodeInputAttributes
|
|
360
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes2
|
|
186
361
|
} from "@ory/client-fetch";
|
|
187
362
|
import { useIntl as useIntl2 } from "react-intl";
|
|
188
363
|
function joinWithCommaOr(list, orText = "or") {
|
|
@@ -196,7 +371,7 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
196
371
|
}
|
|
197
372
|
}
|
|
198
373
|
function useCardHeaderText(container, opts) {
|
|
199
|
-
var _a, _b;
|
|
374
|
+
var _a, _b, _c;
|
|
200
375
|
const nodes = container.nodes;
|
|
201
376
|
const intl = useIntl2();
|
|
202
377
|
switch (opts.flowType) {
|
|
@@ -310,7 +485,7 @@ function useCardHeaderText(container, opts) {
|
|
|
310
485
|
}
|
|
311
486
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
312
487
|
const identifier = nodes.find(
|
|
313
|
-
(node) =>
|
|
488
|
+
(node) => isUiNodeInputAttributes2(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
314
489
|
);
|
|
315
490
|
if (identifier) {
|
|
316
491
|
parts.push(
|
|
@@ -341,6 +516,15 @@ function useCardHeaderText(container, opts) {
|
|
|
341
516
|
}
|
|
342
517
|
)
|
|
343
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
|
+
};
|
|
344
528
|
}
|
|
345
529
|
return {
|
|
346
530
|
title: intl.formatMessage({
|
|
@@ -388,10 +572,10 @@ import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
|
388
572
|
|
|
389
573
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
390
574
|
import * as React3 from "react";
|
|
391
|
-
import { jsx as
|
|
575
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
392
576
|
var SvgArrowLeft = (props) => {
|
|
393
577
|
var _a, _b;
|
|
394
|
-
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" }) });
|
|
395
579
|
};
|
|
396
580
|
var arrow_left_default = SvgArrowLeft;
|
|
397
581
|
|
|
@@ -405,13 +589,16 @@ function omit(obj, keys) {
|
|
|
405
589
|
}
|
|
406
590
|
|
|
407
591
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
408
|
-
import { jsx as
|
|
592
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
409
593
|
function DefaultCurrentIdentifierButton() {
|
|
410
594
|
const { flow, flowType, config, formState } = useOryFlow2();
|
|
411
595
|
const ui = flow.ui;
|
|
412
596
|
if (formState.current === "provide_identifier") {
|
|
413
597
|
return null;
|
|
414
598
|
}
|
|
599
|
+
if (flowType === FlowType3.Login && flow.requested_aal === "aal2") {
|
|
600
|
+
return null;
|
|
601
|
+
}
|
|
415
602
|
const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
|
|
416
603
|
if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
|
|
417
604
|
return null;
|
|
@@ -425,7 +612,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
425
612
|
"node_type",
|
|
426
613
|
"maxlength"
|
|
427
614
|
]);
|
|
428
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ jsx7(
|
|
429
616
|
"a",
|
|
430
617
|
{
|
|
431
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",
|
|
@@ -434,7 +621,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
434
621
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
435
622
|
"data-testid": "ory/screen/login/action/restart",
|
|
436
623
|
children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
437
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ jsx7(
|
|
438
625
|
arrow_left_default,
|
|
439
626
|
{
|
|
440
627
|
size: 16,
|
|
@@ -442,7 +629,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
442
629
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
443
630
|
}
|
|
444
631
|
),
|
|
445
|
-
/* @__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 })
|
|
446
633
|
] })
|
|
447
634
|
}
|
|
448
635
|
);
|
|
@@ -479,47 +666,47 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
479
666
|
}
|
|
480
667
|
|
|
481
668
|
// src/theme/default/components/card/header.tsx
|
|
482
|
-
import { jsx as
|
|
669
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
483
670
|
function InnerCardHeader({ title, text }) {
|
|
484
|
-
const { Card } =
|
|
671
|
+
const { Card } = useComponents2();
|
|
485
672
|
return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
486
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ jsx8(Card.Logo, {}),
|
|
487
674
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__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, {})
|
|
491
678
|
] })
|
|
492
679
|
] });
|
|
493
680
|
}
|
|
494
681
|
function DefaultCardHeader() {
|
|
495
682
|
const context = useOryFlow3();
|
|
496
683
|
const { title, description } = useCardHeaderText(context.flow.ui, context);
|
|
497
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx8(InnerCardHeader, { title, text: description });
|
|
498
685
|
}
|
|
499
686
|
|
|
500
687
|
// src/theme/default/components/card/logo.tsx
|
|
501
688
|
import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
502
|
-
import { jsx as
|
|
689
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
503
690
|
function DefaultCardLogo() {
|
|
504
691
|
const flow = useOryFlow4();
|
|
505
692
|
if (flow.config.logoUrl) {
|
|
506
|
-
return /* @__PURE__ */
|
|
693
|
+
return /* @__PURE__ */ jsx9("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
507
694
|
}
|
|
508
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ jsx9("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: flow.config.name });
|
|
509
696
|
}
|
|
510
697
|
|
|
511
698
|
// src/theme/default/components/card/layout.tsx
|
|
512
|
-
import { jsx as
|
|
699
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
513
700
|
function DefaultCardLayout({ children }) {
|
|
514
|
-
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 });
|
|
515
702
|
}
|
|
516
703
|
|
|
517
704
|
// src/theme/default/components/card/index.tsx
|
|
518
|
-
import { jsx as
|
|
705
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
519
706
|
function DefaultCard({ children }) {
|
|
520
|
-
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: [
|
|
521
708
|
children,
|
|
522
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ jsx11(Badge, {})
|
|
523
710
|
] }) });
|
|
524
711
|
}
|
|
525
712
|
|
|
@@ -544,48 +731,52 @@ import {
|
|
|
544
731
|
uiTextToFormattedMessage,
|
|
545
732
|
useOryFlow as useOryFlow5
|
|
546
733
|
} from "@ory/elements-react";
|
|
734
|
+
import { useEffect } from "react";
|
|
735
|
+
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
736
|
+
import { useIntl as useIntl3 } from "react-intl";
|
|
737
|
+
import { useDebounceValue } from "usehooks-ts";
|
|
547
738
|
|
|
548
739
|
// src/theme/default/provider-logos/apple.svg
|
|
549
740
|
import * as React4 from "react";
|
|
550
|
-
import { jsx as
|
|
741
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
551
742
|
var SvgApple = (props) => {
|
|
552
743
|
var _a, _b;
|
|
553
|
-
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" }) });
|
|
554
745
|
};
|
|
555
746
|
var apple_default = SvgApple;
|
|
556
747
|
|
|
557
748
|
// src/theme/default/provider-logos/auth0.svg
|
|
558
749
|
import * as React5 from "react";
|
|
559
|
-
import { jsx as
|
|
750
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
560
751
|
var SvgAuth0 = (props) => {
|
|
561
752
|
var _a, _b;
|
|
562
|
-
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" }) });
|
|
563
754
|
};
|
|
564
755
|
var auth0_default = SvgAuth0;
|
|
565
756
|
|
|
566
757
|
// src/theme/default/provider-logos/discord.svg
|
|
567
758
|
import * as React6 from "react";
|
|
568
|
-
import { jsx as
|
|
759
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
569
760
|
var SvgDiscord = (props) => {
|
|
570
761
|
var _a, _b;
|
|
571
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: [
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
/* @__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" })
|
|
574
765
|
] });
|
|
575
766
|
};
|
|
576
767
|
var discord_default = SvgDiscord;
|
|
577
768
|
|
|
578
769
|
// src/theme/default/provider-logos/facebook.svg
|
|
579
770
|
import * as React7 from "react";
|
|
580
|
-
import { jsx as
|
|
771
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
581
772
|
var SvgFacebook = (props) => {
|
|
582
773
|
var _a, _b;
|
|
583
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: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
-
/* @__PURE__ */
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
/* @__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" })
|
|
589
780
|
] }) })
|
|
590
781
|
] });
|
|
591
782
|
};
|
|
@@ -593,124 +784,124 @@ var facebook_default = SvgFacebook;
|
|
|
593
784
|
|
|
594
785
|
// src/theme/default/provider-logos/generic.svg
|
|
595
786
|
import * as React8 from "react";
|
|
596
|
-
import { jsx as
|
|
787
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
597
788
|
var SvgGeneric = (props) => {
|
|
598
789
|
var _a, _b;
|
|
599
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: [
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
-
/* @__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" })
|
|
603
794
|
] });
|
|
604
795
|
};
|
|
605
796
|
var generic_default = SvgGeneric;
|
|
606
797
|
|
|
607
798
|
// src/theme/default/provider-logos/github.svg
|
|
608
799
|
import * as React9 from "react";
|
|
609
|
-
import { jsx as
|
|
800
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
610
801
|
var SvgGithub = (props) => {
|
|
611
802
|
var _a, _b;
|
|
612
|
-
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" }) });
|
|
613
804
|
};
|
|
614
805
|
var github_default = SvgGithub;
|
|
615
806
|
|
|
616
807
|
// src/theme/default/provider-logos/gitlab.svg
|
|
617
808
|
import * as React10 from "react";
|
|
618
|
-
import { jsx as
|
|
809
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
619
810
|
var SvgGitlab = (props) => {
|
|
620
811
|
var _a, _b;
|
|
621
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: [
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__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" })
|
|
626
817
|
] });
|
|
627
818
|
};
|
|
628
819
|
var gitlab_default = SvgGitlab;
|
|
629
820
|
|
|
630
821
|
// src/theme/default/provider-logos/google.svg
|
|
631
822
|
import * as React11 from "react";
|
|
632
|
-
import { jsx as
|
|
823
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
633
824
|
var SvgGoogle = (props) => {
|
|
634
825
|
var _a, _b;
|
|
635
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: [
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
/* @__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" })
|
|
640
831
|
] });
|
|
641
832
|
};
|
|
642
833
|
var google_default = SvgGoogle;
|
|
643
834
|
|
|
644
835
|
// src/theme/default/provider-logos/linkedin.svg
|
|
645
836
|
import * as React12 from "react";
|
|
646
|
-
import { jsx as
|
|
837
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
647
838
|
var SvgLinkedin = (props) => {
|
|
648
839
|
var _a, _b;
|
|
649
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: [
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
/* @__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" })
|
|
652
843
|
] });
|
|
653
844
|
};
|
|
654
845
|
var linkedin_default = SvgLinkedin;
|
|
655
846
|
|
|
656
847
|
// src/theme/default/provider-logos/microsoft.svg
|
|
657
848
|
import * as React13 from "react";
|
|
658
|
-
import { jsx as
|
|
849
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
659
850
|
var SvgMicrosoft = (props) => {
|
|
660
851
|
var _a, _b;
|
|
661
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: [
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
/* @__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" })
|
|
666
857
|
] });
|
|
667
858
|
};
|
|
668
859
|
var microsoft_default = SvgMicrosoft;
|
|
669
860
|
|
|
670
861
|
// src/theme/default/provider-logos/slack.svg
|
|
671
862
|
import * as React14 from "react";
|
|
672
|
-
import { jsx as
|
|
863
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
673
864
|
var SvgSlack = (props) => {
|
|
674
865
|
var _a, _b;
|
|
675
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: [
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__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" })
|
|
680
871
|
] });
|
|
681
872
|
};
|
|
682
873
|
var slack_default = SvgSlack;
|
|
683
874
|
|
|
684
875
|
// src/theme/default/provider-logos/spotify.svg
|
|
685
876
|
import * as React15 from "react";
|
|
686
|
-
import { jsx as
|
|
877
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
687
878
|
var SvgSpotify = (props) => {
|
|
688
879
|
var _a, _b;
|
|
689
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: [
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
/* @__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" })
|
|
692
883
|
] });
|
|
693
884
|
};
|
|
694
885
|
var spotify_default = SvgSpotify;
|
|
695
886
|
|
|
696
887
|
// src/theme/default/provider-logos/yandex.svg
|
|
697
888
|
import * as React16 from "react";
|
|
698
|
-
import { jsx as
|
|
889
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
699
890
|
var SvgYandex = (props) => {
|
|
700
891
|
var _a, _b;
|
|
701
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: [
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__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" })
|
|
704
895
|
] });
|
|
705
896
|
};
|
|
706
897
|
var yandex_default = SvgYandex;
|
|
707
898
|
|
|
708
899
|
// src/theme/default/provider-logos/x.svg
|
|
709
900
|
import * as React17 from "react";
|
|
710
|
-
import { jsx as
|
|
901
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
711
902
|
var SvgX = (props) => {
|
|
712
903
|
var _a, _b;
|
|
713
|
-
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" }) });
|
|
714
905
|
};
|
|
715
906
|
var x_default = SvgX;
|
|
716
907
|
|
|
@@ -733,13 +924,8 @@ var logos = {
|
|
|
733
924
|
};
|
|
734
925
|
var provider_logos_default = logos;
|
|
735
926
|
|
|
736
|
-
// src/theme/default/components/form/social.tsx
|
|
737
|
-
import { useIntl as useIntl3 } from "react-intl";
|
|
738
|
-
import { useEffect, useState } from "react";
|
|
739
|
-
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
740
|
-
|
|
741
927
|
// src/theme/default/components/form/spinner.tsx
|
|
742
|
-
import { jsx as
|
|
928
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
743
929
|
function Spinner({ className }) {
|
|
744
930
|
return /* @__PURE__ */ jsxs18(
|
|
745
931
|
"svg",
|
|
@@ -754,7 +940,7 @@ function Spinner({ className }) {
|
|
|
754
940
|
fill: "none",
|
|
755
941
|
xmlns: "http://www.w3.org/2000/svg",
|
|
756
942
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ jsx26("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx26(
|
|
758
944
|
"path",
|
|
759
945
|
{
|
|
760
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",
|
|
@@ -763,7 +949,7 @@ function Spinner({ className }) {
|
|
|
763
949
|
strokeLinejoin: "round"
|
|
764
950
|
}
|
|
765
951
|
) }),
|
|
766
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ jsx26("defs", { children: /* @__PURE__ */ jsx26("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx26(
|
|
767
953
|
"rect",
|
|
768
954
|
{
|
|
769
955
|
width: "24",
|
|
@@ -778,7 +964,7 @@ function Spinner({ className }) {
|
|
|
778
964
|
}
|
|
779
965
|
|
|
780
966
|
// src/theme/default/components/form/social.tsx
|
|
781
|
-
import { jsx as
|
|
967
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
782
968
|
function extractProvider(context) {
|
|
783
969
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
784
970
|
return context.provider;
|
|
@@ -803,7 +989,7 @@ function DefaultButtonSocial({
|
|
|
803
989
|
const {
|
|
804
990
|
flow: { ui }
|
|
805
991
|
} = useOryFlow5();
|
|
806
|
-
const [clicked, setClicked] =
|
|
992
|
+
const [clicked, setClicked] = useDebounceValue(false, 100);
|
|
807
993
|
const intl = useIntl3();
|
|
808
994
|
const {
|
|
809
995
|
formState: { isSubmitting }
|
|
@@ -813,14 +999,14 @@ function DefaultButtonSocial({
|
|
|
813
999
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
814
1000
|
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
815
1001
|
const localOnClick = () => {
|
|
816
|
-
setClicked(true);
|
|
817
1002
|
onClick == null ? void 0 : onClick();
|
|
1003
|
+
setClicked(true);
|
|
818
1004
|
};
|
|
819
1005
|
useEffect(() => {
|
|
820
1006
|
if (!isSubmitting) {
|
|
821
1007
|
setClicked(false);
|
|
822
1008
|
}
|
|
823
|
-
}, [isSubmitting]);
|
|
1009
|
+
}, [isSubmitting, setClicked]);
|
|
824
1010
|
return /* @__PURE__ */ jsxs19(
|
|
825
1011
|
"button",
|
|
826
1012
|
{
|
|
@@ -834,18 +1020,21 @@ function DefaultButtonSocial({
|
|
|
834
1020
|
"data-loading": clicked,
|
|
835
1021
|
disabled: isSubmitting,
|
|
836
1022
|
children: [
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
showLabel && node.meta.label ? /* @__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" }) }),
|
|
1024
|
+
showLabel && node.meta.label ? /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
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" })
|
|
1027
|
+
] }) : null
|
|
839
1028
|
]
|
|
840
1029
|
}
|
|
841
1030
|
);
|
|
842
1031
|
}
|
|
843
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */
|
|
1032
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx27(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
844
1033
|
function DefaultSocialButtonContainer({
|
|
845
1034
|
children,
|
|
846
1035
|
nodes
|
|
847
1036
|
}) {
|
|
848
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx27(
|
|
849
1038
|
"div",
|
|
850
1039
|
{
|
|
851
1040
|
className: cn("grid gap-3", {
|
|
@@ -860,14 +1049,14 @@ function DefaultSocialButtonContainer({
|
|
|
860
1049
|
}
|
|
861
1050
|
|
|
862
1051
|
// src/theme/default/components/form/index.tsx
|
|
863
|
-
import { jsx as
|
|
1052
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
864
1053
|
function DefaultFormContainer({
|
|
865
1054
|
children,
|
|
866
1055
|
onSubmit,
|
|
867
1056
|
action,
|
|
868
1057
|
method
|
|
869
1058
|
}) {
|
|
870
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ jsx28(
|
|
871
1060
|
"form",
|
|
872
1061
|
{
|
|
873
1062
|
onSubmit,
|
|
@@ -884,7 +1073,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
884
1073
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
885
1074
|
return null;
|
|
886
1075
|
}
|
|
887
|
-
return /* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ jsx28(
|
|
888
1077
|
"section",
|
|
889
1078
|
{
|
|
890
1079
|
className: cn(
|
|
@@ -896,7 +1085,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
896
1085
|
}
|
|
897
1086
|
function DefaultMessage({ message }) {
|
|
898
1087
|
const intl = useIntl4();
|
|
899
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsx28(
|
|
900
1089
|
"span",
|
|
901
1090
|
{
|
|
902
1091
|
className: cn(
|
|
@@ -916,58 +1105,81 @@ import { useIntl as useIntl5 } from "react-intl";
|
|
|
916
1105
|
|
|
917
1106
|
// src/theme/default/assets/icons/code.svg
|
|
918
1107
|
import * as React18 from "react";
|
|
919
|
-
import { jsx as
|
|
1108
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
920
1109
|
var SvgCode = (props) => {
|
|
921
1110
|
var _a, _b;
|
|
922
|
-
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" }) });
|
|
923
1112
|
};
|
|
924
1113
|
var code_default = SvgCode;
|
|
925
1114
|
|
|
926
1115
|
// src/theme/default/assets/icons/passkey.svg
|
|
927
1116
|
import * as React19 from "react";
|
|
928
|
-
import { jsx as
|
|
1117
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
929
1118
|
var SvgPasskey = (props) => {
|
|
930
1119
|
var _a, _b;
|
|
931
|
-
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" }) });
|
|
932
1121
|
};
|
|
933
1122
|
var passkey_default = SvgPasskey;
|
|
934
1123
|
|
|
935
1124
|
// src/theme/default/assets/icons/password.svg
|
|
936
1125
|
import * as React20 from "react";
|
|
937
|
-
import { jsx as
|
|
1126
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
938
1127
|
var SvgPassword = (props) => {
|
|
939
1128
|
var _a, _b;
|
|
940
|
-
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" }) });
|
|
941
1130
|
};
|
|
942
1131
|
var password_default = SvgPassword;
|
|
943
1132
|
|
|
944
1133
|
// src/theme/default/assets/icons/webauthn.svg
|
|
945
1134
|
import * as React21 from "react";
|
|
946
|
-
import { jsx as
|
|
1135
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
947
1136
|
var SvgWebauthn = (props) => {
|
|
948
1137
|
var _a, _b;
|
|
949
|
-
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" }) });
|
|
950
1139
|
};
|
|
951
1140
|
var webauthn_default = SvgWebauthn;
|
|
952
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
|
+
|
|
953
1160
|
// src/theme/default/utils/form.ts
|
|
954
1161
|
function isGroupImmediateSubmit(group) {
|
|
955
1162
|
return group === "code";
|
|
956
1163
|
}
|
|
957
1164
|
|
|
958
1165
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
959
|
-
import { jsx as
|
|
1166
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
960
1167
|
var iconsMap = {
|
|
961
1168
|
code: code_default,
|
|
962
1169
|
passkey: passkey_default,
|
|
963
1170
|
password: password_default,
|
|
964
1171
|
webauthn: webauthn_default,
|
|
1172
|
+
hardware_token: passkey_default,
|
|
1173
|
+
totp: totp_default,
|
|
1174
|
+
lookup_secret: code_asterix_default,
|
|
965
1175
|
...provider_logos_default
|
|
966
1176
|
};
|
|
967
1177
|
function DefaultAuthMethodListItem({
|
|
968
1178
|
onClick,
|
|
969
|
-
group
|
|
1179
|
+
group,
|
|
1180
|
+
title
|
|
970
1181
|
}) {
|
|
1182
|
+
var _a;
|
|
971
1183
|
const intl = useIntl5();
|
|
972
1184
|
const Icon = iconsMap[group] || null;
|
|
973
1185
|
return /* @__PURE__ */ jsxs20(
|
|
@@ -978,10 +1190,16 @@ function DefaultAuthMethodListItem({
|
|
|
978
1190
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
979
1191
|
"data-testid": `ory/form/auth-picker/${group}`,
|
|
980
1192
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col", children: [
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
|
|
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({
|
|
985
1203
|
id: `two-step.${group}.description`
|
|
986
1204
|
}) })
|
|
987
1205
|
] })
|
|
@@ -998,8 +1216,8 @@ import {
|
|
|
998
1216
|
import { cva } from "class-variance-authority";
|
|
999
1217
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
1000
1218
|
import { useIntl as useIntl6 } from "react-intl";
|
|
1001
|
-
import { useEffect as useEffect2, useState
|
|
1002
|
-
import { jsx as
|
|
1219
|
+
import { useEffect as useEffect2, useState } from "react";
|
|
1220
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1003
1221
|
var buttonStyles = cva(
|
|
1004
1222
|
[
|
|
1005
1223
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -1046,10 +1264,11 @@ var DefaultButton = ({
|
|
|
1046
1264
|
autocomplete: _ignoredAutocomplete,
|
|
1047
1265
|
label: _ignoredLabel,
|
|
1048
1266
|
node_type: _ignoredNodeType,
|
|
1267
|
+
maxlength: _ignoredMaxLength,
|
|
1049
1268
|
// End of skipped attributes
|
|
1050
1269
|
...rest
|
|
1051
1270
|
} = attributes;
|
|
1052
|
-
const [clicked, setClicked] =
|
|
1271
|
+
const [clicked, setClicked] = useState(false);
|
|
1053
1272
|
const intl = useIntl6();
|
|
1054
1273
|
const label = getNodeLabel(node);
|
|
1055
1274
|
const {
|
|
@@ -1082,8 +1301,8 @@ var DefaultButton = ({
|
|
|
1082
1301
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
1083
1302
|
"data-loading": clicked,
|
|
1084
1303
|
children: [
|
|
1085
|
-
clicked ? /* @__PURE__ */
|
|
1086
|
-
label ? /* @__PURE__ */
|
|
1304
|
+
clicked ? /* @__PURE__ */ jsx36(Spinner, {}) : null,
|
|
1305
|
+
label ? /* @__PURE__ */ jsx36("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
|
|
1087
1306
|
]
|
|
1088
1307
|
}
|
|
1089
1308
|
);
|
|
@@ -1159,7 +1378,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1159
1378
|
};
|
|
1160
1379
|
|
|
1161
1380
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1162
|
-
import { Fragment as
|
|
1381
|
+
import { Fragment as Fragment3, jsx as jsx37 } from "react/jsx-runtime";
|
|
1163
1382
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1164
1383
|
function computeLabelElements(labelText) {
|
|
1165
1384
|
const elements = [];
|
|
@@ -1175,7 +1394,7 @@ function computeLabelElements(labelText) {
|
|
|
1175
1394
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1176
1395
|
}
|
|
1177
1396
|
elements.push(
|
|
1178
|
-
/* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ jsx37(
|
|
1179
1398
|
"a",
|
|
1180
1399
|
{
|
|
1181
1400
|
href: url,
|
|
@@ -1200,13 +1419,13 @@ function CheckboxLabel({ label }) {
|
|
|
1200
1419
|
return null;
|
|
1201
1420
|
}
|
|
1202
1421
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1203
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ jsx37(Fragment3, { children: computeLabelElements(labelText) });
|
|
1204
1423
|
}
|
|
1205
1424
|
|
|
1206
1425
|
// src/theme/default/components/form/checkbox.tsx
|
|
1207
|
-
import { jsx as
|
|
1426
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1208
1427
|
function CheckboxSVG() {
|
|
1209
|
-
return /* @__PURE__ */
|
|
1428
|
+
return /* @__PURE__ */ jsx38(
|
|
1210
1429
|
"svg",
|
|
1211
1430
|
{
|
|
1212
1431
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -1215,7 +1434,7 @@ function CheckboxSVG() {
|
|
|
1215
1434
|
height: "16",
|
|
1216
1435
|
viewBox: "0 0 16 16",
|
|
1217
1436
|
fill: "none",
|
|
1218
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ jsx38(
|
|
1219
1438
|
"path",
|
|
1220
1439
|
{
|
|
1221
1440
|
fillRule: "evenodd",
|
|
@@ -1246,7 +1465,7 @@ var DefaultCheckbox = ({
|
|
|
1246
1465
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1247
1466
|
return /* @__PURE__ */ jsxs22("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1248
1467
|
/* @__PURE__ */ jsxs22("span", { className: "flex h-5 items-center", children: [
|
|
1249
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ jsx38(
|
|
1250
1469
|
"input",
|
|
1251
1470
|
{
|
|
1252
1471
|
...attributes,
|
|
@@ -1260,11 +1479,11 @@ var DefaultCheckbox = ({
|
|
|
1260
1479
|
...register(name, { value })
|
|
1261
1480
|
}
|
|
1262
1481
|
),
|
|
1263
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ jsx38(CheckboxSVG, {})
|
|
1264
1483
|
] }),
|
|
1265
1484
|
/* @__PURE__ */ jsxs22("span", { className: "flex flex-col", children: [
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
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(
|
|
1268
1487
|
"span",
|
|
1269
1488
|
{
|
|
1270
1489
|
className: cn(
|
|
@@ -1281,21 +1500,21 @@ var DefaultCheckbox = ({
|
|
|
1281
1500
|
};
|
|
1282
1501
|
|
|
1283
1502
|
// src/theme/default/components/form/group-container.tsx
|
|
1284
|
-
import { jsx as
|
|
1503
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1285
1504
|
function DefaultGroupContainer({ children }) {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsx39("div", { className: "grid grid-cols-1 gap-8", children });
|
|
1287
1506
|
}
|
|
1288
1507
|
|
|
1289
1508
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1290
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1291
1510
|
function DefaultHorizontalDivider() {
|
|
1292
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx40("hr", { className: "border-interface-border-default-primary" });
|
|
1293
1512
|
}
|
|
1294
1513
|
|
|
1295
1514
|
// src/theme/default/components/form/image.tsx
|
|
1296
|
-
import { jsx as
|
|
1515
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1297
1516
|
function DefaultImage({ attributes }) {
|
|
1298
|
-
return /* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ jsx41("figure", { children: /* @__PURE__ */ jsx41("img", { ...attributes }) });
|
|
1299
1518
|
}
|
|
1300
1519
|
|
|
1301
1520
|
// src/theme/default/components/form/input.tsx
|
|
@@ -1306,7 +1525,7 @@ import {
|
|
|
1306
1525
|
} from "@ory/elements-react";
|
|
1307
1526
|
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
1308
1527
|
import { useIntl as useIntl9 } from "react-intl";
|
|
1309
|
-
import { jsx as
|
|
1528
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1310
1529
|
var DefaultInput = ({
|
|
1311
1530
|
node,
|
|
1312
1531
|
attributes,
|
|
@@ -1333,7 +1552,7 @@ var DefaultInput = ({
|
|
|
1333
1552
|
placeholder: uiTextToFormattedMessage6(label, intl)
|
|
1334
1553
|
}
|
|
1335
1554
|
) : "";
|
|
1336
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ jsx42(
|
|
1337
1556
|
"input",
|
|
1338
1557
|
{
|
|
1339
1558
|
...rest,
|
|
@@ -1366,12 +1585,12 @@ import {
|
|
|
1366
1585
|
import {
|
|
1367
1586
|
messageTestId as messageTestId3,
|
|
1368
1587
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
1369
|
-
useComponents as
|
|
1588
|
+
useComponents as useComponents3,
|
|
1370
1589
|
useOryFlow as useOryFlow8
|
|
1371
1590
|
} from "@ory/elements-react";
|
|
1372
1591
|
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
1373
1592
|
import { useIntl as useIntl10 } from "react-intl";
|
|
1374
|
-
import { jsx as
|
|
1593
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1375
1594
|
function findResendNode(nodes) {
|
|
1376
1595
|
return nodes.find(
|
|
1377
1596
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1385,7 +1604,7 @@ function DefaultLabel({
|
|
|
1385
1604
|
}) {
|
|
1386
1605
|
const intl = useIntl10();
|
|
1387
1606
|
const label = getNodeLabel4(node);
|
|
1388
|
-
const { Message } =
|
|
1607
|
+
const { Message } = useComponents3();
|
|
1389
1608
|
const { config, flowType, flow } = useOryFlow8();
|
|
1390
1609
|
const { setValue, formState } = useFormContext5();
|
|
1391
1610
|
const isPassword = attributes.type === "password";
|
|
@@ -1398,7 +1617,7 @@ function DefaultLabel({
|
|
|
1398
1617
|
const fieldError = formState.errors[attributes.name];
|
|
1399
1618
|
return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1400
1619
|
label && /* @__PURE__ */ jsxs23("span", { className: "inline-flex justify-between", children: [
|
|
1401
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsx43(
|
|
1402
1621
|
"label",
|
|
1403
1622
|
{
|
|
1404
1623
|
...messageTestId3(label),
|
|
@@ -1410,7 +1629,7 @@ function DefaultLabel({
|
|
|
1410
1629
|
}
|
|
1411
1630
|
),
|
|
1412
1631
|
isPassword && config.project.recovery_enabled && flowType === FlowType6.Login && // TODO: make it possible to override with a custom component
|
|
1413
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ jsx43(
|
|
1414
1633
|
"a",
|
|
1415
1634
|
{
|
|
1416
1635
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -1421,7 +1640,7 @@ function DefaultLabel({
|
|
|
1421
1640
|
})
|
|
1422
1641
|
}
|
|
1423
1642
|
),
|
|
1424
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
1643
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx43(
|
|
1425
1644
|
"button",
|
|
1426
1645
|
{
|
|
1427
1646
|
type: "submit",
|
|
@@ -1434,8 +1653,8 @@ function DefaultLabel({
|
|
|
1434
1653
|
)
|
|
1435
1654
|
] }),
|
|
1436
1655
|
children,
|
|
1437
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1438
|
-
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 })
|
|
1439
1658
|
] });
|
|
1440
1659
|
}
|
|
1441
1660
|
|
|
@@ -1446,11 +1665,11 @@ import {
|
|
|
1446
1665
|
} from "@ory/elements-react";
|
|
1447
1666
|
import { forwardRef } from "react";
|
|
1448
1667
|
import { useIntl as useIntl11 } from "react-intl";
|
|
1449
|
-
import { jsx as
|
|
1668
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1450
1669
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
1451
1670
|
const intl = useIntl11();
|
|
1452
1671
|
const label = getNodeLabel5(node);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsx44(
|
|
1454
1673
|
"a",
|
|
1455
1674
|
{
|
|
1456
1675
|
...attributes,
|
|
@@ -1471,9 +1690,9 @@ import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
|
1471
1690
|
|
|
1472
1691
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1473
1692
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1474
|
-
import * as
|
|
1475
|
-
import { jsx as
|
|
1476
|
-
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(
|
|
1477
1696
|
OTPInput,
|
|
1478
1697
|
{
|
|
1479
1698
|
ref,
|
|
@@ -1486,10 +1705,10 @@ var InputOTP = React22.forwardRef(({ className, containerClassName, ...props },
|
|
|
1486
1705
|
}
|
|
1487
1706
|
));
|
|
1488
1707
|
InputOTP.displayName = "InputOTP";
|
|
1489
|
-
var InputOTPGroup =
|
|
1708
|
+
var InputOTPGroup = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1490
1709
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1491
|
-
var InputOTPSlot =
|
|
1492
|
-
const inputOTPContext =
|
|
1710
|
+
var InputOTPSlot = React24.forwardRef(({ index, className, ...props }, ref) => {
|
|
1711
|
+
const inputOTPContext = React24.useContext(OTPInputContext);
|
|
1493
1712
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1494
1713
|
return /* @__PURE__ */ jsxs24(
|
|
1495
1714
|
"div",
|
|
@@ -1503,8 +1722,8 @@ var InputOTPSlot = React22.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1503
1722
|
),
|
|
1504
1723
|
...props,
|
|
1505
1724
|
children: [
|
|
1506
|
-
/* @__PURE__ */
|
|
1507
|
-
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" }) })
|
|
1508
1727
|
]
|
|
1509
1728
|
}
|
|
1510
1729
|
);
|
|
@@ -1514,7 +1733,7 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
1514
1733
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1515
1734
|
import { useOryFlow as useOryFlow9 } from "@ory/elements-react";
|
|
1516
1735
|
import { FlowType as FlowType7 } from "@ory/client-fetch";
|
|
1517
|
-
import { jsx as
|
|
1736
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1518
1737
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1519
1738
|
const { setValue, watch } = useFormContext6();
|
|
1520
1739
|
const { maxlength, name } = attributes;
|
|
@@ -1524,14 +1743,14 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1524
1743
|
setValue(name, v);
|
|
1525
1744
|
};
|
|
1526
1745
|
const value = watch(name);
|
|
1527
|
-
return /* @__PURE__ */
|
|
1746
|
+
return /* @__PURE__ */ jsx46(
|
|
1528
1747
|
InputOTP,
|
|
1529
1748
|
{
|
|
1530
1749
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1531
1750
|
onChange: handleInputChange,
|
|
1532
1751
|
name,
|
|
1533
1752
|
value,
|
|
1534
|
-
children: /* @__PURE__ */
|
|
1753
|
+
children: /* @__PURE__ */ jsx46(
|
|
1535
1754
|
InputOTPGroup,
|
|
1536
1755
|
{
|
|
1537
1756
|
className: cn(
|
|
@@ -1539,7 +1758,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1539
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.
|
|
1540
1759
|
flowType === FlowType7.Settings && "max-w-[488px]"
|
|
1541
1760
|
),
|
|
1542
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
1761
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx46(InputOTPSlot, { index }, index))
|
|
1543
1762
|
}
|
|
1544
1763
|
)
|
|
1545
1764
|
}
|
|
@@ -1547,13 +1766,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1547
1766
|
};
|
|
1548
1767
|
|
|
1549
1768
|
// src/theme/default/components/form/section.tsx
|
|
1550
|
-
import { jsx as
|
|
1769
|
+
import { jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1551
1770
|
var DefaultFormSection = ({
|
|
1552
1771
|
children,
|
|
1553
1772
|
nodes: _nodes,
|
|
1554
1773
|
...rest
|
|
1555
1774
|
}) => {
|
|
1556
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ jsx47(
|
|
1557
1776
|
"form",
|
|
1558
1777
|
{
|
|
1559
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",
|
|
@@ -1569,8 +1788,8 @@ var DefaultFormSectionContent = ({
|
|
|
1569
1788
|
}) => {
|
|
1570
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: [
|
|
1571
1790
|
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-2", children: [
|
|
1572
|
-
/* @__PURE__ */
|
|
1573
|
-
/* @__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 })
|
|
1574
1793
|
] }),
|
|
1575
1794
|
children
|
|
1576
1795
|
] });
|
|
@@ -1586,7 +1805,7 @@ var DefaultFormSectionFooter = ({
|
|
|
1586
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"
|
|
1587
1806
|
),
|
|
1588
1807
|
children: [
|
|
1589
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ jsx47("span", { children: text }),
|
|
1590
1809
|
children
|
|
1591
1810
|
]
|
|
1592
1811
|
}
|
|
@@ -1596,29 +1815,43 @@ var DefaultFormSectionFooter = ({
|
|
|
1596
1815
|
// src/theme/default/components/form/text.tsx
|
|
1597
1816
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
1598
1817
|
import { useIntl as useIntl12 } from "react-intl";
|
|
1599
|
-
import { Fragment as
|
|
1818
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1600
1819
|
function DefaultText({ node, attributes }) {
|
|
1601
1820
|
var _a;
|
|
1602
1821
|
const intl = useIntl12();
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
"
|
|
1607
|
-
|
|
1608
|
-
"
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1822
|
+
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
1823
|
+
if (lookup) {
|
|
1824
|
+
return /* @__PURE__ */ jsxs26(Fragment4, { children: [
|
|
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(
|
|
1827
|
+
"pre",
|
|
1828
|
+
{
|
|
1829
|
+
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
1830
|
+
children: /* @__PURE__ */ jsx48("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
1831
|
+
},
|
|
1832
|
+
index
|
|
1833
|
+
))
|
|
1834
|
+
] });
|
|
1835
|
+
}
|
|
1836
|
+
return /* @__PURE__ */ jsx48(Fragment4, { children: /* @__PURE__ */ jsxs26(
|
|
1837
|
+
"p",
|
|
1838
|
+
{
|
|
1839
|
+
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
1840
|
+
id: attributes.id,
|
|
1841
|
+
children: [
|
|
1842
|
+
node.meta.label ? /* @__PURE__ */ jsx48("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
1843
|
+
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
1844
|
+
]
|
|
1845
|
+
}
|
|
1846
|
+
) });
|
|
1614
1847
|
}
|
|
1615
1848
|
|
|
1616
1849
|
// src/theme/default/components/generic/page-header.tsx
|
|
1617
|
-
import { useComponents as
|
|
1850
|
+
import { useComponents as useComponents4 } from "@ory/elements-react";
|
|
1618
1851
|
|
|
1619
1852
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1620
1853
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
1621
|
-
import { useCallback, useEffect as useEffect3, useState as
|
|
1854
|
+
import { useCallback, useEffect as useEffect3, useState as useState2 } from "react";
|
|
1622
1855
|
import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
|
|
1623
1856
|
|
|
1624
1857
|
// src/util/client.ts
|
|
@@ -1639,22 +1872,22 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
1639
1872
|
}
|
|
1640
1873
|
|
|
1641
1874
|
// src/theme/default/assets/icons/logout.svg
|
|
1642
|
-
import * as
|
|
1643
|
-
import { jsx as
|
|
1875
|
+
import * as React25 from "react";
|
|
1876
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1644
1877
|
var SvgLogout = (props) => {
|
|
1645
1878
|
var _a, _b;
|
|
1646
|
-
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" }) });
|
|
1647
1880
|
};
|
|
1648
1881
|
var logout_default = SvgLogout;
|
|
1649
1882
|
|
|
1650
1883
|
// src/theme/default/assets/icons/settings.svg
|
|
1651
|
-
import * as
|
|
1652
|
-
import { jsx as
|
|
1884
|
+
import * as React26 from "react";
|
|
1885
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1653
1886
|
var SvgSettings = (props) => {
|
|
1654
1887
|
var _a, _b;
|
|
1655
|
-
return /* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__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" })
|
|
1658
1891
|
] }) });
|
|
1659
1892
|
};
|
|
1660
1893
|
var settings_default = SvgSettings;
|
|
@@ -1701,10 +1934,10 @@ var getUserInitials = (session) => {
|
|
|
1701
1934
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1702
1935
|
import { forwardRef as forwardRef3 } from "react";
|
|
1703
1936
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1704
|
-
import { jsx as
|
|
1937
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1705
1938
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1706
1939
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1707
|
-
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(
|
|
1708
1941
|
DropdownMenuPrimitive.Content,
|
|
1709
1942
|
{
|
|
1710
1943
|
ref,
|
|
@@ -1719,7 +1952,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
1719
1952
|
}
|
|
1720
1953
|
) }));
|
|
1721
1954
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1722
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1955
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
1723
1956
|
DropdownMenuPrimitive.Item,
|
|
1724
1957
|
{
|
|
1725
1958
|
ref,
|
|
@@ -1737,7 +1970,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
1737
1970
|
}
|
|
1738
1971
|
));
|
|
1739
1972
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1740
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1973
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
1741
1974
|
DropdownMenuPrimitive.Label,
|
|
1742
1975
|
{
|
|
1743
1976
|
ref,
|
|
@@ -1755,32 +1988,32 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
|
1755
1988
|
import { forwardRef as forwardRef4 } from "react";
|
|
1756
1989
|
|
|
1757
1990
|
// src/theme/default/assets/icons/user.svg
|
|
1758
|
-
import * as
|
|
1759
|
-
import { jsx as
|
|
1991
|
+
import * as React27 from "react";
|
|
1992
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1760
1993
|
var SvgUser = (props) => {
|
|
1761
1994
|
var _a, _b;
|
|
1762
|
-
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" }) });
|
|
1763
1996
|
};
|
|
1764
1997
|
var user_default = SvgUser;
|
|
1765
1998
|
|
|
1766
1999
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1767
|
-
import { jsx as
|
|
2000
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1768
2001
|
var UserAvatar = forwardRef4(
|
|
1769
2002
|
({ initials, ...rest }, ref) => {
|
|
1770
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ jsx53(
|
|
1771
2004
|
"button",
|
|
1772
2005
|
{
|
|
1773
2006
|
ref,
|
|
1774
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",
|
|
1775
2008
|
...rest,
|
|
1776
|
-
children: /* @__PURE__ */
|
|
2009
|
+
children: /* @__PURE__ */ jsx53("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx53(
|
|
1777
2010
|
"img",
|
|
1778
2011
|
{
|
|
1779
2012
|
src: initials.avatar,
|
|
1780
2013
|
alt: initials.primary,
|
|
1781
2014
|
className: "w-full object-contain"
|
|
1782
2015
|
}
|
|
1783
|
-
) : /* @__PURE__ */
|
|
2016
|
+
) : /* @__PURE__ */ jsx53(
|
|
1784
2017
|
user_default,
|
|
1785
2018
|
{
|
|
1786
2019
|
size: 24,
|
|
@@ -1794,11 +2027,11 @@ var UserAvatar = forwardRef4(
|
|
|
1794
2027
|
UserAvatar.displayName = "UserAvatar";
|
|
1795
2028
|
|
|
1796
2029
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1797
|
-
import { jsx as
|
|
2030
|
+
import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1798
2031
|
var UserMenu = ({ session }) => {
|
|
1799
2032
|
const { config } = useOryFlow10();
|
|
1800
2033
|
const initials = getUserInitials(session);
|
|
1801
|
-
const [logoutFlow, setLogoutFlow] =
|
|
2034
|
+
const [logoutFlow, setLogoutFlow] = useState2();
|
|
1802
2035
|
const fetchLogoutFlow = useCallback(async () => {
|
|
1803
2036
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1804
2037
|
setLogoutFlow(flow);
|
|
@@ -1807,21 +2040,21 @@ var UserMenu = ({ session }) => {
|
|
|
1807
2040
|
void fetchLogoutFlow();
|
|
1808
2041
|
}, [fetchLogoutFlow]);
|
|
1809
2042
|
return /* @__PURE__ */ jsxs28(DropdownMenu, { children: [
|
|
1810
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ jsx54(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(UserAvatar, { initials }) }),
|
|
1811
2044
|
/* @__PURE__ */ jsxs28(DropdownMenuContent, { children: [
|
|
1812
2045
|
/* @__PURE__ */ jsxs28(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
1813
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ jsx54(UserAvatar, { disabled: true, initials }),
|
|
1814
2047
|
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
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 })
|
|
1817
2050
|
] })
|
|
1818
2051
|
] }),
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ jsx54(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs28("a", { href: "/settings", children: [
|
|
2053
|
+
/* @__PURE__ */ jsx54(settings_default, { size: 16 }),
|
|
1821
2054
|
" User settings"
|
|
1822
2055
|
] }) }),
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__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 }),
|
|
1825
2058
|
" Logout"
|
|
1826
2059
|
] }) })
|
|
1827
2060
|
] })
|
|
@@ -1830,31 +2063,32 @@ var UserMenu = ({ session }) => {
|
|
|
1830
2063
|
|
|
1831
2064
|
// src/theme/default/components/generic/page-header.tsx
|
|
1832
2065
|
import { useSession } from "@ory/elements-react/client";
|
|
1833
|
-
import { jsx as
|
|
2066
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1834
2067
|
var DefaultPageHeader = (_props) => {
|
|
1835
|
-
const { Card } =
|
|
2068
|
+
const { Card } = useComponents4();
|
|
1836
2069
|
const { session } = useSession();
|
|
1837
|
-
return /* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__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 })
|
|
1840
2073
|
] }) }) });
|
|
1841
2074
|
};
|
|
1842
2075
|
|
|
1843
2076
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1844
|
-
import { useEffect as useEffect4
|
|
2077
|
+
import { useEffect as useEffect4 } from "react";
|
|
1845
2078
|
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
2079
|
+
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
1846
2080
|
|
|
1847
2081
|
// src/theme/default/assets/icons/trash.svg
|
|
1848
|
-
import * as
|
|
1849
|
-
import { jsx as
|
|
2082
|
+
import * as React28 from "react";
|
|
2083
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
1850
2084
|
var SvgTrash = (props) => {
|
|
1851
2085
|
var _a, _b;
|
|
1852
|
-
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" }) });
|
|
1853
2087
|
};
|
|
1854
2088
|
var trash_default = SvgTrash;
|
|
1855
2089
|
|
|
1856
2090
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1857
|
-
import { jsx as
|
|
2091
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1858
2092
|
function DefaultSettingsOidc({
|
|
1859
2093
|
linkButtons,
|
|
1860
2094
|
unlinkButtons
|
|
@@ -1862,9 +2096,9 @@ function DefaultSettingsOidc({
|
|
|
1862
2096
|
const hasLinkButtons = linkButtons.length > 0;
|
|
1863
2097
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1864
2098
|
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-8", children: [
|
|
1865
|
-
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) => {
|
|
1866
2100
|
const attrs = button.attributes;
|
|
1867
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ jsx57(
|
|
1868
2102
|
DefaultButtonSocial,
|
|
1869
2103
|
{
|
|
1870
2104
|
showLabel: true,
|
|
@@ -1875,41 +2109,39 @@ function DefaultSettingsOidc({
|
|
|
1875
2109
|
attrs.value
|
|
1876
2110
|
);
|
|
1877
2111
|
}) }),
|
|
1878
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
2112
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx57(DefaultHorizontalDivider, {}) : null,
|
|
1879
2113
|
unlinkButtons.map((button) => {
|
|
1880
2114
|
if (button.attributes.node_type !== "input") {
|
|
1881
2115
|
return null;
|
|
1882
2116
|
}
|
|
1883
|
-
return /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ jsx57(UnlinkRow, { button }, button.attributes.value);
|
|
1884
2118
|
})
|
|
1885
2119
|
] });
|
|
1886
2120
|
}
|
|
1887
2121
|
function UnlinkRow({ button }) {
|
|
1888
2122
|
var _a, _b;
|
|
1889
|
-
const [clicked, setClicked] =
|
|
2123
|
+
const [clicked, setClicked] = useDebounceValue2(false, 100);
|
|
1890
2124
|
const {
|
|
1891
2125
|
formState: { isSubmitting }
|
|
1892
2126
|
} = useFormContext7();
|
|
1893
2127
|
const attrs = button.attributes;
|
|
1894
2128
|
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1895
|
-
const Logo =
|
|
2129
|
+
const Logo = provider_logos_default[attrs.value.split("-")[0]];
|
|
1896
2130
|
const localOnClick = () => {
|
|
1897
2131
|
button.onClick();
|
|
1898
|
-
|
|
1899
|
-
setClicked(true);
|
|
1900
|
-
}, 100);
|
|
2132
|
+
setClicked(true);
|
|
1901
2133
|
};
|
|
1902
2134
|
useEffect4(() => {
|
|
1903
2135
|
if (!isSubmitting) {
|
|
1904
2136
|
setClicked(false);
|
|
1905
2137
|
}
|
|
1906
|
-
}, [isSubmitting]);
|
|
2138
|
+
}, [isSubmitting, setClicked]);
|
|
1907
2139
|
return /* @__PURE__ */ jsxs30("div", { className: "flex justify-between", children: [
|
|
1908
2140
|
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-6", children: [
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
/* @__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 })
|
|
1911
2143
|
] }),
|
|
1912
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsx57(
|
|
1913
2145
|
"button",
|
|
1914
2146
|
{
|
|
1915
2147
|
...attrs,
|
|
@@ -1918,7 +2150,7 @@ function UnlinkRow({ button }) {
|
|
|
1918
2150
|
disabled: isSubmitting,
|
|
1919
2151
|
className: "relative",
|
|
1920
2152
|
title: `Unlink ${provider}`,
|
|
1921
|
-
children: clicked ? /* @__PURE__ */
|
|
2153
|
+
children: clicked ? /* @__PURE__ */ jsx57(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx57(
|
|
1922
2154
|
trash_default,
|
|
1923
2155
|
{
|
|
1924
2156
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -1931,9 +2163,9 @@ function UnlinkRow({ button }) {
|
|
|
1931
2163
|
}
|
|
1932
2164
|
|
|
1933
2165
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1934
|
-
import { useComponents as
|
|
2166
|
+
import { useComponents as useComponents5 } from "@ory/elements-react";
|
|
1935
2167
|
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
1936
|
-
import { jsx as
|
|
2168
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1937
2169
|
function DefaultSettingsPasskey({
|
|
1938
2170
|
triggerButton,
|
|
1939
2171
|
removeButtons
|
|
@@ -1941,11 +2173,11 @@ function DefaultSettingsPasskey({
|
|
|
1941
2173
|
const {
|
|
1942
2174
|
formState: { isSubmitting }
|
|
1943
2175
|
} = useFormContext8();
|
|
1944
|
-
const { Node } =
|
|
2176
|
+
const { Node: Node2 } = useComponents5();
|
|
1945
2177
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
1946
2178
|
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
|
|
2179
|
+
/* @__PURE__ */ jsx58("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx58(
|
|
2180
|
+
Node2.Button,
|
|
1949
2181
|
{
|
|
1950
2182
|
node: triggerButton,
|
|
1951
2183
|
attributes: triggerButton.attributes,
|
|
@@ -1953,8 +2185,8 @@ function DefaultSettingsPasskey({
|
|
|
1953
2185
|
}
|
|
1954
2186
|
) }),
|
|
1955
2187
|
hasRemoveButtons ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ jsx58(DefaultHorizontalDivider, {}),
|
|
2189
|
+
/* @__PURE__ */ jsx58("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1958
2190
|
var _a, _b;
|
|
1959
2191
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1960
2192
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -1965,25 +2197,25 @@ function DefaultSettingsPasskey({
|
|
|
1965
2197
|
{
|
|
1966
2198
|
className: "flex justify-between gap-6 md:items-center",
|
|
1967
2199
|
children: [
|
|
1968
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
1969
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2201
|
+
/* @__PURE__ */ jsx58(
|
|
1970
2202
|
passkey_default,
|
|
1971
2203
|
{
|
|
1972
2204
|
size: 32,
|
|
1973
2205
|
className: "text-interface-foreground-default-primary"
|
|
1974
2206
|
}
|
|
1975
2207
|
),
|
|
1976
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
1977
|
-
/* @__PURE__ */ jsxs31("div", { className: "flex-1 flex-col", children: [
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__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 })
|
|
1980
2212
|
] }),
|
|
1981
|
-
addedAt && /* @__PURE__ */
|
|
2213
|
+
addedAt && /* @__PURE__ */ jsx58("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
1982
2214
|
dateStyle: "long"
|
|
1983
2215
|
}).format(new Date(addedAt)) })
|
|
1984
2216
|
] })
|
|
1985
2217
|
] }),
|
|
1986
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ jsx58(
|
|
1987
2219
|
"button",
|
|
1988
2220
|
{
|
|
1989
2221
|
...node.attributes,
|
|
@@ -1991,7 +2223,7 @@ function DefaultSettingsPasskey({
|
|
|
1991
2223
|
onClick: node.onClick,
|
|
1992
2224
|
disabled: isSubmitting,
|
|
1993
2225
|
className: "relative",
|
|
1994
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2226
|
+
children: isSubmitting ? /* @__PURE__ */ jsx58(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx58(
|
|
1995
2227
|
trash_default,
|
|
1996
2228
|
{
|
|
1997
2229
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2010,38 +2242,38 @@ function DefaultSettingsPasskey({
|
|
|
2010
2242
|
}
|
|
2011
2243
|
|
|
2012
2244
|
// src/theme/default/assets/icons/download.svg
|
|
2013
|
-
import * as
|
|
2014
|
-
import { jsx as
|
|
2245
|
+
import * as React29 from "react";
|
|
2246
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2015
2247
|
var SvgDownload = (props) => {
|
|
2016
2248
|
var _a, _b;
|
|
2017
|
-
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" }) });
|
|
2018
2250
|
};
|
|
2019
2251
|
var download_default = SvgDownload;
|
|
2020
2252
|
|
|
2021
2253
|
// src/theme/default/assets/icons/eye.svg
|
|
2022
|
-
import * as
|
|
2023
|
-
import { jsx as
|
|
2254
|
+
import * as React30 from "react";
|
|
2255
|
+
import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2024
2256
|
var SvgEye = (props) => {
|
|
2025
2257
|
var _a, _b;
|
|
2026
|
-
return /* @__PURE__ */
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
/* @__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" })
|
|
2029
2261
|
] }) });
|
|
2030
2262
|
};
|
|
2031
2263
|
var eye_default = SvgEye;
|
|
2032
2264
|
|
|
2033
2265
|
// src/theme/default/assets/icons/refresh.svg
|
|
2034
|
-
import * as
|
|
2035
|
-
import { jsx as
|
|
2266
|
+
import * as React31 from "react";
|
|
2267
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2036
2268
|
var SvgRefresh = (props) => {
|
|
2037
2269
|
var _a, _b;
|
|
2038
|
-
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" }) });
|
|
2039
2271
|
};
|
|
2040
2272
|
var refresh_default = SvgRefresh;
|
|
2041
2273
|
|
|
2042
2274
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
2043
2275
|
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
2044
|
-
import { Fragment as
|
|
2276
|
+
import { Fragment as Fragment5, jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2045
2277
|
function DefaultSettingsRecoveryCodes({
|
|
2046
2278
|
codes,
|
|
2047
2279
|
regnerateButton,
|
|
@@ -2064,11 +2296,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2064
2296
|
};
|
|
2065
2297
|
const hasCodes = codes.length >= 1;
|
|
2066
2298
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2067
|
-
codes.length > 0 && /* @__PURE__ */
|
|
2299
|
+
codes.length > 0 && /* @__PURE__ */ jsx62(DefaultHorizontalDivider, {}),
|
|
2068
2300
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-4 justify-between", children: [
|
|
2069
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ jsx62("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2070
2302
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-2", children: [
|
|
2071
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
2303
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx62(
|
|
2072
2304
|
"button",
|
|
2073
2305
|
{
|
|
2074
2306
|
...regnerateButton.attributes,
|
|
@@ -2077,7 +2309,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2077
2309
|
onClick: onRegenerate,
|
|
2078
2310
|
disabled: isSubmitting,
|
|
2079
2311
|
"data-loading": isSubmitting,
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2312
|
+
children: /* @__PURE__ */ jsx62(
|
|
2081
2313
|
refresh_default,
|
|
2082
2314
|
{
|
|
2083
2315
|
size: 24,
|
|
@@ -2086,7 +2318,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2086
2318
|
)
|
|
2087
2319
|
}
|
|
2088
2320
|
),
|
|
2089
|
-
revealButton && /* @__PURE__ */
|
|
2321
|
+
revealButton && /* @__PURE__ */ jsx62(Fragment5, { children: /* @__PURE__ */ jsx62(
|
|
2090
2322
|
"button",
|
|
2091
2323
|
{
|
|
2092
2324
|
...revealButton.attributes,
|
|
@@ -2094,7 +2326,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2094
2326
|
className: "ml-auto",
|
|
2095
2327
|
onClick: onReveal,
|
|
2096
2328
|
title: "Reveal recovery codes",
|
|
2097
|
-
children: /* @__PURE__ */
|
|
2329
|
+
children: /* @__PURE__ */ jsx62(
|
|
2098
2330
|
eye_default,
|
|
2099
2331
|
{
|
|
2100
2332
|
size: 24,
|
|
@@ -2103,7 +2335,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2103
2335
|
)
|
|
2104
2336
|
}
|
|
2105
2337
|
) }),
|
|
2106
|
-
hasCodes && /* @__PURE__ */
|
|
2338
|
+
hasCodes && /* @__PURE__ */ jsx62(
|
|
2107
2339
|
"button",
|
|
2108
2340
|
{
|
|
2109
2341
|
onClick: onDownload,
|
|
@@ -2111,7 +2343,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2111
2343
|
className: "ml-auto",
|
|
2112
2344
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
2113
2345
|
title: "Download recovery codes",
|
|
2114
|
-
children: /* @__PURE__ */
|
|
2346
|
+
children: /* @__PURE__ */ jsx62(
|
|
2115
2347
|
download_default,
|
|
2116
2348
|
{
|
|
2117
2349
|
size: 24,
|
|
@@ -2122,32 +2354,32 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2122
2354
|
)
|
|
2123
2355
|
] })
|
|
2124
2356
|
] }),
|
|
2125
|
-
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(
|
|
2126
2358
|
"div",
|
|
2127
2359
|
{
|
|
2128
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",
|
|
2129
2361
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
2130
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
2362
|
+
children: codes.map((code) => /* @__PURE__ */ jsx62("p", { children: code }, code))
|
|
2131
2363
|
}
|
|
2132
2364
|
) }) : null
|
|
2133
2365
|
] });
|
|
2134
2366
|
}
|
|
2135
2367
|
|
|
2136
2368
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2137
|
-
import { useComponents as
|
|
2369
|
+
import { useComponents as useComponents6 } from "@ory/elements-react";
|
|
2138
2370
|
|
|
2139
2371
|
// src/theme/default/assets/icons/qrcode.svg
|
|
2140
|
-
import * as
|
|
2141
|
-
import { jsx as
|
|
2372
|
+
import * as React32 from "react";
|
|
2373
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2142
2374
|
var SvgQrcode = (props) => {
|
|
2143
2375
|
var _a, _b;
|
|
2144
|
-
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" }) });
|
|
2145
2377
|
};
|
|
2146
2378
|
var qrcode_default = SvgQrcode;
|
|
2147
2379
|
|
|
2148
2380
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2149
2381
|
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
2150
|
-
import { jsx as
|
|
2382
|
+
import { jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2151
2383
|
function DefaultSettingsTotp({
|
|
2152
2384
|
totpImage,
|
|
2153
2385
|
totpInput,
|
|
@@ -2155,7 +2387,7 @@ function DefaultSettingsTotp({
|
|
|
2155
2387
|
totpUnlink,
|
|
2156
2388
|
onUnlink
|
|
2157
2389
|
}) {
|
|
2158
|
-
const { Node, Card } =
|
|
2390
|
+
const { Node: Node2, Card } = useComponents6();
|
|
2159
2391
|
const {
|
|
2160
2392
|
formState: { isSubmitting }
|
|
2161
2393
|
} = useFormContext10();
|
|
@@ -2168,18 +2400,18 @@ function DefaultSettingsTotp({
|
|
|
2168
2400
|
...buttonAttrs
|
|
2169
2401
|
} = totpUnlink.attributes;
|
|
2170
2402
|
return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2171
|
-
/* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ jsx64("div", { className: "col-span-full", children: /* @__PURE__ */ jsx64(Card.Divider, {}) }),
|
|
2172
2404
|
/* @__PURE__ */ jsxs34("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
/* @__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(
|
|
2176
2408
|
"button",
|
|
2177
2409
|
{
|
|
2178
2410
|
type: type === "button" ? "button" : "submit",
|
|
2179
2411
|
...buttonAttrs,
|
|
2180
2412
|
onClick: onUnlink,
|
|
2181
2413
|
disabled: isSubmitting,
|
|
2182
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2414
|
+
children: isSubmitting ? /* @__PURE__ */ jsx64(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx64(
|
|
2183
2415
|
trash_default,
|
|
2184
2416
|
{
|
|
2185
2417
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2193,9 +2425,9 @@ function DefaultSettingsTotp({
|
|
|
2193
2425
|
}
|
|
2194
2426
|
if (totpImage && totpSecret && totpInput) {
|
|
2195
2427
|
return /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
|
|
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(
|
|
2430
|
+
Node2.Image,
|
|
2199
2431
|
{
|
|
2200
2432
|
node: totpImage,
|
|
2201
2433
|
attributes: {
|
|
@@ -2204,13 +2436,13 @@ function DefaultSettingsTotp({
|
|
|
2204
2436
|
}
|
|
2205
2437
|
) }) }) }),
|
|
2206
2438
|
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-6", children: [
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
|
|
2439
|
+
/* @__PURE__ */ jsx64(
|
|
2440
|
+
Node2.Label,
|
|
2209
2441
|
{
|
|
2210
2442
|
node: totpSecret,
|
|
2211
2443
|
attributes: totpSecret.attributes,
|
|
2212
|
-
children: /* @__PURE__ */
|
|
2213
|
-
|
|
2444
|
+
children: /* @__PURE__ */ jsx64(
|
|
2445
|
+
Node2.Input,
|
|
2214
2446
|
{
|
|
2215
2447
|
node: totpSecret,
|
|
2216
2448
|
attributes: {
|
|
@@ -2224,13 +2456,13 @@ function DefaultSettingsTotp({
|
|
|
2224
2456
|
)
|
|
2225
2457
|
}
|
|
2226
2458
|
),
|
|
2227
|
-
/* @__PURE__ */
|
|
2228
|
-
|
|
2459
|
+
/* @__PURE__ */ jsx64(
|
|
2460
|
+
Node2.Label,
|
|
2229
2461
|
{
|
|
2230
2462
|
attributes: totpInput.attributes,
|
|
2231
2463
|
node: totpInput,
|
|
2232
|
-
children: /* @__PURE__ */
|
|
2233
|
-
|
|
2464
|
+
children: /* @__PURE__ */ jsx64(
|
|
2465
|
+
Node2.CodeInput,
|
|
2234
2466
|
{
|
|
2235
2467
|
node: totpInput,
|
|
2236
2468
|
attributes: totpInput.attributes
|
|
@@ -2244,20 +2476,20 @@ function DefaultSettingsTotp({
|
|
|
2244
2476
|
}
|
|
2245
2477
|
|
|
2246
2478
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2247
|
-
import { useComponents as
|
|
2479
|
+
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
2248
2480
|
|
|
2249
2481
|
// src/theme/default/assets/icons/key.svg
|
|
2250
|
-
import * as
|
|
2251
|
-
import { jsx as
|
|
2482
|
+
import * as React33 from "react";
|
|
2483
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2252
2484
|
var SvgKey = (props) => {
|
|
2253
2485
|
var _a, _b;
|
|
2254
|
-
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" }) });
|
|
2255
2487
|
};
|
|
2256
2488
|
var key_default = SvgKey;
|
|
2257
2489
|
|
|
2258
2490
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2259
2491
|
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2260
|
-
import { jsx as
|
|
2492
|
+
import { jsx as jsx66, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2261
2493
|
function DefaultSettingsWebauthn({
|
|
2262
2494
|
nameInput,
|
|
2263
2495
|
triggerButton,
|
|
@@ -2266,17 +2498,17 @@ function DefaultSettingsWebauthn({
|
|
|
2266
2498
|
const {
|
|
2267
2499
|
formState: { isSubmitting }
|
|
2268
2500
|
} = useFormContext11();
|
|
2269
|
-
const { Node, Card } =
|
|
2501
|
+
const { Node: Node2, Card } = useComponents7();
|
|
2270
2502
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2271
2503
|
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
|
|
2272
2504
|
/* @__PURE__ */ jsxs35("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2273
|
-
/* @__PURE__ */
|
|
2274
|
-
|
|
2505
|
+
/* @__PURE__ */ jsx66("div", { className: "flex-1", children: /* @__PURE__ */ jsx66(
|
|
2506
|
+
Node2.Label,
|
|
2275
2507
|
{
|
|
2276
2508
|
node: nameInput,
|
|
2277
2509
|
attributes: nameInput.attributes,
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2279
|
-
|
|
2510
|
+
children: /* @__PURE__ */ jsx66(
|
|
2511
|
+
Node2.Input,
|
|
2280
2512
|
{
|
|
2281
2513
|
node: nameInput,
|
|
2282
2514
|
attributes: nameInput.attributes
|
|
@@ -2284,8 +2516,8 @@ function DefaultSettingsWebauthn({
|
|
|
2284
2516
|
)
|
|
2285
2517
|
}
|
|
2286
2518
|
) }),
|
|
2287
|
-
triggerButton ? /* @__PURE__ */
|
|
2288
|
-
|
|
2519
|
+
triggerButton ? /* @__PURE__ */ jsx66(
|
|
2520
|
+
Node2.Button,
|
|
2289
2521
|
{
|
|
2290
2522
|
node: triggerButton,
|
|
2291
2523
|
attributes: triggerButton.attributes,
|
|
@@ -2294,8 +2526,8 @@ function DefaultSettingsWebauthn({
|
|
|
2294
2526
|
) : null
|
|
2295
2527
|
] }),
|
|
2296
2528
|
hasRemoveButtons ? /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-8", children: [
|
|
2297
|
-
/* @__PURE__ */
|
|
2298
|
-
/* @__PURE__ */
|
|
2529
|
+
/* @__PURE__ */ jsx66(Card.Divider, {}),
|
|
2530
|
+
/* @__PURE__ */ jsx66("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2299
2531
|
var _a, _b;
|
|
2300
2532
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2301
2533
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2306,25 +2538,25 @@ function DefaultSettingsWebauthn({
|
|
|
2306
2538
|
{
|
|
2307
2539
|
className: "flex justify-between gap-6 md:items-center",
|
|
2308
2540
|
children: [
|
|
2309
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center flex-1", children: [
|
|
2310
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2542
|
+
/* @__PURE__ */ jsx66(
|
|
2311
2543
|
key_default,
|
|
2312
2544
|
{
|
|
2313
2545
|
size: 32,
|
|
2314
2546
|
className: "text-interface-foreground-default-primary"
|
|
2315
2547
|
}
|
|
2316
2548
|
),
|
|
2317
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4", children: [
|
|
2318
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex-col", children: [
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
/* @__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 })
|
|
2321
2553
|
] }),
|
|
2322
|
-
addedAt && /* @__PURE__ */
|
|
2554
|
+
addedAt && /* @__PURE__ */ jsx66("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2323
2555
|
dateStyle: "long"
|
|
2324
2556
|
}).format(new Date(addedAt)) })
|
|
2325
2557
|
] })
|
|
2326
2558
|
] }),
|
|
2327
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ jsx66(
|
|
2328
2560
|
"button",
|
|
2329
2561
|
{
|
|
2330
2562
|
...node.attributes,
|
|
@@ -2332,7 +2564,7 @@ function DefaultSettingsWebauthn({
|
|
|
2332
2564
|
onClick: node.onClick,
|
|
2333
2565
|
disabled: isSubmitting,
|
|
2334
2566
|
className: "relative",
|
|
2335
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2567
|
+
children: isSubmitting ? /* @__PURE__ */ jsx66(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx66(
|
|
2336
2568
|
trash_default,
|
|
2337
2569
|
{
|
|
2338
2570
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2351,16 +2583,342 @@ function DefaultSettingsWebauthn({
|
|
|
2351
2583
|
}
|
|
2352
2584
|
|
|
2353
2585
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2354
|
-
import { jsx as
|
|
2586
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2355
2587
|
function DefaultAuthMethodListContainer({
|
|
2356
2588
|
children
|
|
2357
2589
|
}) {
|
|
2358
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ jsx67("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2359
2591
|
}
|
|
2360
2592
|
|
|
2593
|
+
// src/theme/default/components/form/captcha.tsx
|
|
2594
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
|
|
2595
|
+
import { Turnstile } from "@marsidev/react-turnstile";
|
|
2596
|
+
import { useRef as useRef2 } from "react";
|
|
2597
|
+
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
2598
|
+
|
|
2599
|
+
// src/context/flow-context.tsx
|
|
2600
|
+
import {
|
|
2601
|
+
createContext as createContext2,
|
|
2602
|
+
useContext as useContext3,
|
|
2603
|
+
useState as useState3
|
|
2604
|
+
} from "react";
|
|
2605
|
+
|
|
2606
|
+
// src/context/form-state.ts
|
|
2607
|
+
import { FlowType as FlowType9 } from "@ory/client-fetch";
|
|
2608
|
+
import { useReducer } from "react";
|
|
2609
|
+
|
|
2610
|
+
// src/components/card/card-two-step.utils.ts
|
|
2611
|
+
import { FlowType as FlowType8, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
|
|
2612
|
+
|
|
2613
|
+
// src/context/flow-context.tsx
|
|
2614
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2615
|
+
var OryFlowContext = createContext2(null);
|
|
2616
|
+
|
|
2617
|
+
// src/context/intl-context.tsx
|
|
2618
|
+
import { IntlProvider as OriginalIntlProvider } from "react-intl";
|
|
2619
|
+
|
|
2620
|
+
// src/components/card/header.tsx
|
|
2621
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2622
|
+
|
|
2623
|
+
// src/components/form/form-provider.tsx
|
|
2624
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum5 } from "@ory/client-fetch";
|
|
2625
|
+
import { FormProvider, useForm as useForm2 } from "react-hook-form";
|
|
2626
|
+
|
|
2627
|
+
// src/components/form/form-helpers.ts
|
|
2628
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
|
|
2629
|
+
|
|
2630
|
+
// src/components/form/form-resolver.ts
|
|
2631
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
|
|
2632
|
+
|
|
2633
|
+
// src/components/form/form-provider.tsx
|
|
2634
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2635
|
+
|
|
2636
|
+
// src/components/card/card.tsx
|
|
2637
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2638
|
+
|
|
2639
|
+
// src/components/card/footer.tsx
|
|
2640
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2641
|
+
|
|
2642
|
+
// src/components/card/content.tsx
|
|
2643
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2644
|
+
|
|
2645
|
+
// src/components/card/card-two-step.tsx
|
|
2646
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum7 } from "@ory/client-fetch";
|
|
2647
|
+
import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
2648
|
+
|
|
2649
|
+
// src/components/form/form.tsx
|
|
2650
|
+
import {
|
|
2651
|
+
FlowType as FlowType16,
|
|
2652
|
+
isUiNodeAnchorAttributes,
|
|
2653
|
+
isUiNodeImageAttributes,
|
|
2654
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes5,
|
|
2655
|
+
isUiNodeScriptAttributes
|
|
2656
|
+
} from "@ory/client-fetch";
|
|
2657
|
+
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
2658
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
2659
|
+
|
|
2660
|
+
// src/components/form/useOryFormSubmit.ts
|
|
2661
|
+
import {
|
|
2662
|
+
FlowType as FlowType15
|
|
2663
|
+
} from "@ory/client-fetch";
|
|
2664
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
2665
|
+
|
|
2666
|
+
// src/util/onSubmitLogin.ts
|
|
2667
|
+
import {
|
|
2668
|
+
FlowType as FlowType10,
|
|
2669
|
+
handleFlowError,
|
|
2670
|
+
loginUrl
|
|
2671
|
+
} from "@ory/client-fetch";
|
|
2672
|
+
|
|
2673
|
+
// src/util/onSubmitRecovery.ts
|
|
2674
|
+
import {
|
|
2675
|
+
FlowType as FlowType11,
|
|
2676
|
+
handleContinueWith,
|
|
2677
|
+
handleFlowError as handleFlowError2,
|
|
2678
|
+
instanceOfContinueWithRecoveryUi,
|
|
2679
|
+
recoveryUrl
|
|
2680
|
+
} from "@ory/client-fetch";
|
|
2681
|
+
|
|
2682
|
+
// src/util/onSubmitRegistration.ts
|
|
2683
|
+
import {
|
|
2684
|
+
FlowType as FlowType12,
|
|
2685
|
+
handleContinueWith as handleContinueWith2,
|
|
2686
|
+
handleFlowError as handleFlowError3,
|
|
2687
|
+
registrationUrl
|
|
2688
|
+
} from "@ory/client-fetch";
|
|
2689
|
+
|
|
2690
|
+
// src/util/onSubmitSettings.ts
|
|
2691
|
+
import {
|
|
2692
|
+
FlowType as FlowType13,
|
|
2693
|
+
handleContinueWith as handleContinueWith3,
|
|
2694
|
+
handleFlowError as handleFlowError4,
|
|
2695
|
+
isResponseError,
|
|
2696
|
+
loginUrl as loginUrl2,
|
|
2697
|
+
settingsUrl
|
|
2698
|
+
} from "@ory/client-fetch";
|
|
2699
|
+
|
|
2700
|
+
// src/util/onSubmitVerification.ts
|
|
2701
|
+
import {
|
|
2702
|
+
FlowType as FlowType14,
|
|
2703
|
+
handleFlowError as handleFlowError5,
|
|
2704
|
+
verificationUrl
|
|
2705
|
+
} from "@ory/client-fetch";
|
|
2706
|
+
|
|
2707
|
+
// src/components/form/form.tsx
|
|
2708
|
+
import { Fragment as Fragment6, jsx as jsx74, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2709
|
+
|
|
2710
|
+
// src/components/form/messages.tsx
|
|
2711
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2712
|
+
|
|
2713
|
+
// src/components/form/nodes/node.tsx
|
|
2714
|
+
import {
|
|
2715
|
+
isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
|
|
2716
|
+
isUiNodeImageAttributes as isUiNodeImageAttributes2,
|
|
2717
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes6,
|
|
2718
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes2,
|
|
2719
|
+
isUiNodeTextAttributes,
|
|
2720
|
+
UiNodeGroupEnum as UiNodeGroupEnum6
|
|
2721
|
+
} from "@ory/client-fetch";
|
|
2722
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2723
|
+
|
|
2724
|
+
// src/components/form/social.tsx
|
|
2725
|
+
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
2726
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2727
|
+
|
|
2728
|
+
// src/components/card/card-two-step.tsx
|
|
2729
|
+
import { Fragment as Fragment7, jsx as jsx78, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2730
|
+
|
|
2731
|
+
// src/components/form/groups.tsx
|
|
2732
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2733
|
+
|
|
2734
|
+
// src/components/form/section.tsx
|
|
2735
|
+
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
2736
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2737
|
+
|
|
2738
|
+
// src/components/generic/divider.tsx
|
|
2739
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2740
|
+
|
|
2741
|
+
// src/components/generic/page-header.tsx
|
|
2742
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
2743
|
+
|
|
2744
|
+
// src/components/settings/settings-card.tsx
|
|
2745
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum8 } from "@ory/client-fetch";
|
|
2746
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
2747
|
+
|
|
2748
|
+
// src/components/settings/oidc-settings.tsx
|
|
2749
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
2750
|
+
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
2751
|
+
import { Fragment as Fragment8, jsx as jsx83, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2752
|
+
|
|
2753
|
+
// src/components/settings/passkey-settings.tsx
|
|
2754
|
+
import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
2755
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
2756
|
+
import { Fragment as Fragment9, jsx as jsx84, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2757
|
+
|
|
2758
|
+
// src/components/settings/recovery-codes-settings.tsx
|
|
2759
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
2760
|
+
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
2761
|
+
import { Fragment as Fragment10, jsx as jsx85, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2762
|
+
|
|
2763
|
+
// src/components/settings/totp-settings.tsx
|
|
2764
|
+
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
2765
|
+
import { useIntl as useIntl17 } from "react-intl";
|
|
2766
|
+
import { Fragment as Fragment11, jsx as jsx86, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
2767
|
+
|
|
2768
|
+
// src/components/settings/webauthn-settings.tsx
|
|
2769
|
+
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
2770
|
+
import { useIntl as useIntl18 } from "react-intl";
|
|
2771
|
+
import { Fragment as Fragment12, jsx as jsx87, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
2772
|
+
|
|
2773
|
+
// src/components/settings/settings-card.tsx
|
|
2774
|
+
import { Fragment as Fragment13, jsx as jsx88, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
2775
|
+
|
|
2776
|
+
// src/context/intl-context.tsx
|
|
2777
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
2778
|
+
|
|
2779
|
+
// src/context/provider.tsx
|
|
2780
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
2781
|
+
|
|
2782
|
+
// src/components/form/nodes/input.tsx
|
|
2783
|
+
import {
|
|
2784
|
+
UiNodeInputAttributesTypeEnum
|
|
2785
|
+
} from "@ory/client-fetch";
|
|
2786
|
+
import { useEffect as useEffect5, useRef } from "react";
|
|
2787
|
+
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
2788
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
2789
|
+
var NodeInput = ({
|
|
2790
|
+
node,
|
|
2791
|
+
attributes
|
|
2792
|
+
}) => {
|
|
2793
|
+
var _a;
|
|
2794
|
+
const { Node: Node2 } = useComponents();
|
|
2795
|
+
const { setValue } = useFormContext22();
|
|
2796
|
+
const {
|
|
2797
|
+
onloadTrigger,
|
|
2798
|
+
onclickTrigger,
|
|
2799
|
+
// These properties do not exist on input fields so we remove them (as we already have handled them).
|
|
2800
|
+
onclick: _ignoredOnclick,
|
|
2801
|
+
onload: _ignoredOnload,
|
|
2802
|
+
//
|
|
2803
|
+
...attrs
|
|
2804
|
+
} = attributes;
|
|
2805
|
+
const isResendNode = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
|
|
2806
|
+
const isScreenSelectionNode = "name" in node.attributes && node.attributes.name === "screen";
|
|
2807
|
+
const setFormValue = () => {
|
|
2808
|
+
if (attrs.value && !(isResendNode || isScreenSelectionNode)) {
|
|
2809
|
+
setValue(attrs.name, attrs.value);
|
|
2810
|
+
}
|
|
2811
|
+
};
|
|
2812
|
+
const hasRun = useRef(false);
|
|
2813
|
+
useEffect5(
|
|
2814
|
+
() => {
|
|
2815
|
+
setFormValue();
|
|
2816
|
+
if (!hasRun.current && onloadTrigger) {
|
|
2817
|
+
hasRun.current = true;
|
|
2818
|
+
triggerToWindowCall(onloadTrigger);
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
// TODO(jonas): make sure onloadTrigger is stable
|
|
2822
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
|
|
2823
|
+
[]
|
|
2824
|
+
);
|
|
2825
|
+
const handleClick = () => {
|
|
2826
|
+
setFormValue();
|
|
2827
|
+
if (onclickTrigger) {
|
|
2828
|
+
triggerToWindowCall(onclickTrigger);
|
|
2829
|
+
}
|
|
2830
|
+
};
|
|
2831
|
+
const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
|
|
2832
|
+
const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
|
|
2833
|
+
switch (attributes.type) {
|
|
2834
|
+
case UiNodeInputAttributesTypeEnum.Submit:
|
|
2835
|
+
case UiNodeInputAttributesTypeEnum.Button:
|
|
2836
|
+
if (isSocial) {
|
|
2837
|
+
return null;
|
|
2838
|
+
}
|
|
2839
|
+
if (isResendNode || isScreenSelectionNode) {
|
|
2840
|
+
return null;
|
|
2841
|
+
}
|
|
2842
|
+
return /* @__PURE__ */ jsx91(
|
|
2843
|
+
Node2.Label,
|
|
2844
|
+
{
|
|
2845
|
+
attributes: { ...attrs, label: void 0 },
|
|
2846
|
+
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2847
|
+
children: /* @__PURE__ */ jsx91(Node2.Button, { attributes: attrs, node, onClick: handleClick })
|
|
2848
|
+
}
|
|
2849
|
+
);
|
|
2850
|
+
case UiNodeInputAttributesTypeEnum.DatetimeLocal:
|
|
2851
|
+
throw new Error("Not implemented");
|
|
2852
|
+
case UiNodeInputAttributesTypeEnum.Checkbox:
|
|
2853
|
+
return /* @__PURE__ */ jsx91(
|
|
2854
|
+
Node2.Label,
|
|
2855
|
+
{
|
|
2856
|
+
attributes: { ...attrs, label: void 0 },
|
|
2857
|
+
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2858
|
+
children: /* @__PURE__ */ jsx91(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
|
|
2859
|
+
}
|
|
2860
|
+
);
|
|
2861
|
+
case UiNodeInputAttributesTypeEnum.Hidden:
|
|
2862
|
+
return /* @__PURE__ */ jsx91(Node2.Input, { attributes: attrs, node, onClick: handleClick });
|
|
2863
|
+
default:
|
|
2864
|
+
if (isPinCodeInput) {
|
|
2865
|
+
return /* @__PURE__ */ jsx91(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx91(
|
|
2866
|
+
Node2.CodeInput,
|
|
2867
|
+
{
|
|
2868
|
+
attributes: attrs,
|
|
2869
|
+
node,
|
|
2870
|
+
onClick: handleClick
|
|
2871
|
+
}
|
|
2872
|
+
) });
|
|
2873
|
+
}
|
|
2874
|
+
return /* @__PURE__ */ jsx91(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ jsx91(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2877
|
+
|
|
2878
|
+
// src/theme/default/components/form/captcha.tsx
|
|
2879
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
2880
|
+
var DefaultCaptcha = ({ node }) => {
|
|
2881
|
+
const { setValue } = useFormContext23();
|
|
2882
|
+
const ref = useRef2();
|
|
2883
|
+
const nodes = [];
|
|
2884
|
+
if (isUiNodeInputAttributes7(node.attributes)) {
|
|
2885
|
+
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2886
|
+
nodes.push(/* @__PURE__ */ jsx92(NodeInput, { node, attributes: node.attributes }, 1));
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
if (isUiNodeInputAttributes7(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2890
|
+
const options = JSON.parse(node.attributes.value);
|
|
2891
|
+
nodes.push(
|
|
2892
|
+
/* @__PURE__ */ jsx92(
|
|
2893
|
+
Turnstile,
|
|
2894
|
+
{
|
|
2895
|
+
ref,
|
|
2896
|
+
siteKey: options.sitekey,
|
|
2897
|
+
options: {
|
|
2898
|
+
action: options.action,
|
|
2899
|
+
size: "flexible",
|
|
2900
|
+
theme: options.theme,
|
|
2901
|
+
responseField: false,
|
|
2902
|
+
responseFieldName: options.response_field_name
|
|
2903
|
+
},
|
|
2904
|
+
onExpire: () => {
|
|
2905
|
+
var _a;
|
|
2906
|
+
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
2907
|
+
},
|
|
2908
|
+
onSuccess: (token) => {
|
|
2909
|
+
setValue(options.response_field_name, token);
|
|
2910
|
+
}
|
|
2911
|
+
},
|
|
2912
|
+
2
|
|
2913
|
+
)
|
|
2914
|
+
);
|
|
2915
|
+
}
|
|
2916
|
+
return nodes;
|
|
2917
|
+
};
|
|
2918
|
+
|
|
2361
2919
|
// src/theme/default/components/default-components.tsx
|
|
2362
2920
|
function getOryComponents(overrides) {
|
|
2363
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha;
|
|
2921
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
|
|
2364
2922
|
return {
|
|
2365
2923
|
Card: {
|
|
2366
2924
|
Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
|
|
@@ -2384,44 +2942,45 @@ function getOryComponents(overrides) {
|
|
|
2384
2942
|
Label: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Label) != null ? _H : DefaultLabel,
|
|
2385
2943
|
Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
|
|
2386
2944
|
Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
|
|
2387
|
-
Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton
|
|
2945
|
+
Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
|
|
2946
|
+
Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
|
|
2388
2947
|
},
|
|
2389
2948
|
Form: {
|
|
2390
|
-
Root: (
|
|
2391
|
-
Group: (
|
|
2392
|
-
OidcRoot: (
|
|
2393
|
-
RecoveryCodesSettings: (
|
|
2394
|
-
TotpSettings: (
|
|
2395
|
-
OidcSettings: (
|
|
2396
|
-
WebauthnSettings: (
|
|
2397
|
-
PasskeySettings: (
|
|
2949
|
+
Root: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Root) != null ? _R : DefaultFormContainer,
|
|
2950
|
+
Group: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Group) != null ? _T : DefaultGroupContainer,
|
|
2951
|
+
OidcRoot: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.OidcRoot) != null ? _V : DefaultSocialButtonContainer,
|
|
2952
|
+
RecoveryCodesSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.RecoveryCodesSettings) != null ? _X : DefaultSettingsRecoveryCodes,
|
|
2953
|
+
TotpSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.TotpSettings) != null ? _Z : DefaultSettingsTotp,
|
|
2954
|
+
OidcSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.OidcSettings) != null ? _$ : DefaultSettingsOidc,
|
|
2955
|
+
WebauthnSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.WebauthnSettings) != null ? _ba : DefaultSettingsWebauthn,
|
|
2956
|
+
PasskeySettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.PasskeySettings) != null ? _da : DefaultSettingsPasskey
|
|
2398
2957
|
},
|
|
2399
2958
|
Message: {
|
|
2400
|
-
Root: (
|
|
2401
|
-
Content: (
|
|
2959
|
+
Root: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Root) != null ? _fa : DefaultMessageContainer,
|
|
2960
|
+
Content: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Content) != null ? _ha : DefaultMessage
|
|
2402
2961
|
},
|
|
2403
2962
|
Page: {
|
|
2404
|
-
Header: (
|
|
2963
|
+
Header: (_ja = (_ia = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ia.Header) != null ? _ja : DefaultPageHeader
|
|
2405
2964
|
}
|
|
2406
2965
|
};
|
|
2407
2966
|
}
|
|
2408
2967
|
|
|
2409
2968
|
// src/theme/default/flows/error.tsx
|
|
2410
|
-
import { jsx as
|
|
2411
|
-
function
|
|
2969
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
2970
|
+
function Error2({
|
|
2412
2971
|
error,
|
|
2413
2972
|
children
|
|
2414
2973
|
}) {
|
|
2415
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx93("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
|
|
2416
2975
|
}
|
|
2417
2976
|
|
|
2418
2977
|
// src/theme/default/flows/login.tsx
|
|
2419
|
-
import { FlowType as
|
|
2978
|
+
import { FlowType as FlowType17 } from "@ory/client-fetch";
|
|
2420
2979
|
import {
|
|
2421
2980
|
OryProvider,
|
|
2422
|
-
OryTwoStepCard
|
|
2981
|
+
OryTwoStepCard as OryTwoStepCard2
|
|
2423
2982
|
} from "@ory/elements-react";
|
|
2424
|
-
import { jsx as
|
|
2983
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
2425
2984
|
function Login({
|
|
2426
2985
|
flow,
|
|
2427
2986
|
config,
|
|
@@ -2429,25 +2988,25 @@ function Login({
|
|
|
2429
2988
|
components: flowOverrideComponents
|
|
2430
2989
|
}) {
|
|
2431
2990
|
const components = getOryComponents(flowOverrideComponents);
|
|
2432
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx94(
|
|
2433
2992
|
OryProvider,
|
|
2434
2993
|
{
|
|
2435
2994
|
config,
|
|
2436
2995
|
flow,
|
|
2437
|
-
flowType:
|
|
2996
|
+
flowType: FlowType17.Login,
|
|
2438
2997
|
components,
|
|
2439
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2998
|
+
children: children != null ? children : /* @__PURE__ */ jsx94(OryTwoStepCard2, {})
|
|
2440
2999
|
}
|
|
2441
3000
|
);
|
|
2442
3001
|
}
|
|
2443
3002
|
|
|
2444
3003
|
// src/theme/default/flows/recovery.tsx
|
|
2445
|
-
import { FlowType as
|
|
3004
|
+
import { FlowType as FlowType18 } from "@ory/client-fetch";
|
|
2446
3005
|
import {
|
|
2447
3006
|
OryProvider as OryProvider2,
|
|
2448
|
-
OryTwoStepCard as
|
|
3007
|
+
OryTwoStepCard as OryTwoStepCard3
|
|
2449
3008
|
} from "@ory/elements-react";
|
|
2450
|
-
import { jsx as
|
|
3009
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
2451
3010
|
function Recovery({
|
|
2452
3011
|
flow,
|
|
2453
3012
|
config,
|
|
@@ -2455,25 +3014,25 @@ function Recovery({
|
|
|
2455
3014
|
components: flowOverrideComponents
|
|
2456
3015
|
}) {
|
|
2457
3016
|
const components = getOryComponents(flowOverrideComponents);
|
|
2458
|
-
return /* @__PURE__ */
|
|
3017
|
+
return /* @__PURE__ */ jsx95(
|
|
2459
3018
|
OryProvider2,
|
|
2460
3019
|
{
|
|
2461
3020
|
config,
|
|
2462
3021
|
flow,
|
|
2463
|
-
flowType:
|
|
3022
|
+
flowType: FlowType18.Recovery,
|
|
2464
3023
|
components,
|
|
2465
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3024
|
+
children: children != null ? children : /* @__PURE__ */ jsx95(OryTwoStepCard3, {})
|
|
2466
3025
|
}
|
|
2467
3026
|
);
|
|
2468
3027
|
}
|
|
2469
3028
|
|
|
2470
3029
|
// src/theme/default/flows/registration.tsx
|
|
2471
|
-
import { FlowType as
|
|
3030
|
+
import { FlowType as FlowType19 } from "@ory/client-fetch";
|
|
2472
3031
|
import {
|
|
2473
3032
|
OryProvider as OryProvider3,
|
|
2474
|
-
OryTwoStepCard as
|
|
3033
|
+
OryTwoStepCard as OryTwoStepCard4
|
|
2475
3034
|
} from "@ory/elements-react";
|
|
2476
|
-
import { jsx as
|
|
3035
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
2477
3036
|
function Registration({
|
|
2478
3037
|
flow,
|
|
2479
3038
|
children,
|
|
@@ -2481,26 +3040,26 @@ function Registration({
|
|
|
2481
3040
|
config
|
|
2482
3041
|
}) {
|
|
2483
3042
|
const components = getOryComponents(flowOverrideComponents);
|
|
2484
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ jsx96(
|
|
2485
3044
|
OryProvider3,
|
|
2486
3045
|
{
|
|
2487
3046
|
config,
|
|
2488
3047
|
flow,
|
|
2489
|
-
flowType:
|
|
3048
|
+
flowType: FlowType19.Registration,
|
|
2490
3049
|
components,
|
|
2491
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3050
|
+
children: children != null ? children : /* @__PURE__ */ jsx96(OryTwoStepCard4, {})
|
|
2492
3051
|
}
|
|
2493
3052
|
);
|
|
2494
3053
|
}
|
|
2495
3054
|
|
|
2496
3055
|
// src/theme/default/flows/settings.tsx
|
|
2497
|
-
import { FlowType as
|
|
3056
|
+
import { FlowType as FlowType20 } from "@ory/client-fetch";
|
|
2498
3057
|
import {
|
|
2499
3058
|
HeadlessPageHeader,
|
|
2500
3059
|
OryProvider as OryProvider4,
|
|
2501
3060
|
OrySettingsCard
|
|
2502
3061
|
} from "@ory/elements-react";
|
|
2503
|
-
import { Fragment as
|
|
3062
|
+
import { Fragment as Fragment14, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
2504
3063
|
function Settings({
|
|
2505
3064
|
flow,
|
|
2506
3065
|
config,
|
|
@@ -2508,28 +3067,28 @@ function Settings({
|
|
|
2508
3067
|
components: flowOverrideComponents
|
|
2509
3068
|
}) {
|
|
2510
3069
|
const components = getOryComponents(flowOverrideComponents);
|
|
2511
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ jsx97(
|
|
2512
3071
|
OryProvider4,
|
|
2513
3072
|
{
|
|
2514
3073
|
config,
|
|
2515
3074
|
flow,
|
|
2516
|
-
flowType:
|
|
3075
|
+
flowType: FlowType20.Settings,
|
|
2517
3076
|
components,
|
|
2518
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2519
|
-
/* @__PURE__ */
|
|
2520
|
-
/* @__PURE__ */
|
|
3077
|
+
children: children != null ? children : /* @__PURE__ */ jsxs44(Fragment14, { children: [
|
|
3078
|
+
/* @__PURE__ */ jsx97(HeadlessPageHeader, {}),
|
|
3079
|
+
/* @__PURE__ */ jsx97(OrySettingsCard, {})
|
|
2521
3080
|
] })
|
|
2522
3081
|
}
|
|
2523
3082
|
);
|
|
2524
3083
|
}
|
|
2525
3084
|
|
|
2526
3085
|
// src/theme/default/flows/verification.tsx
|
|
2527
|
-
import { FlowType as
|
|
3086
|
+
import { FlowType as FlowType21 } from "@ory/client-fetch";
|
|
2528
3087
|
import {
|
|
2529
3088
|
OryProvider as OryProvider5,
|
|
2530
|
-
OryTwoStepCard as
|
|
3089
|
+
OryTwoStepCard as OryTwoStepCard5
|
|
2531
3090
|
} from "@ory/elements-react";
|
|
2532
|
-
import { jsx as
|
|
3091
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
2533
3092
|
function Verification({
|
|
2534
3093
|
flow,
|
|
2535
3094
|
config,
|
|
@@ -2537,14 +3096,14 @@ function Verification({
|
|
|
2537
3096
|
components: flowOverrideComponents
|
|
2538
3097
|
}) {
|
|
2539
3098
|
const components = getOryComponents(flowOverrideComponents);
|
|
2540
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ jsx98(
|
|
2541
3100
|
OryProvider5,
|
|
2542
3101
|
{
|
|
2543
3102
|
config,
|
|
2544
3103
|
flow,
|
|
2545
|
-
flowType:
|
|
3104
|
+
flowType: FlowType21.Verification,
|
|
2546
3105
|
components,
|
|
2547
|
-
children: children != null ? children : /* @__PURE__ */
|
|
3106
|
+
children: children != null ? children : /* @__PURE__ */ jsx98(OryTwoStepCard5, {})
|
|
2548
3107
|
}
|
|
2549
3108
|
);
|
|
2550
3109
|
}
|
|
@@ -2560,7 +3119,7 @@ export {
|
|
|
2560
3119
|
DefaultFormContainer,
|
|
2561
3120
|
DefaultMessage,
|
|
2562
3121
|
DefaultMessageContainer,
|
|
2563
|
-
Error,
|
|
3122
|
+
Error2 as Error,
|
|
2564
3123
|
Login,
|
|
2565
3124
|
Recovery,
|
|
2566
3125
|
Registration,
|